From bf73772a560ddfdf0b404ba3f85eb26542031b7b Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sun, 10 Apr 2016 14:42:14 -0400 Subject: Local labels starting with capital letters are now decorated with a trailing colon; remove trailing whitespace; globally correct line endings to UNIX style --- audio/engine.asm | 96 +- audio/music_pointers.asm | 4 +- battle/ai/items.asm | 8 +- battle/ai/move.asm | 26 +- battle/ai/scoring.asm | 90 +- battle/ai/switch.asm | 2 +- battle/anims.asm | 22 +- battle/bg_effects.asm | 86 +- battle/core.asm | 190 +-- battle/effect_commands.asm | 186 +-- battle/effects/metronome.asm | 2 +- battle/effects/present.asm | 2 +- battle/misc.asm | 26 +- battle/objects/framesets.asm | 1482 +++++++++--------- battle/objects/functions.asm | 8 +- battle/objects/oam.asm | 2172 +++++++++++++-------------- battle/used_move_text.asm | 4 +- constants/misc_constants.asm | 2 +- constants/radio_constants.asm | 2 +- constants/trainer_constants.asm | 2 +- data/battle_tower.asm | 8 +- data/odd_eggs.asm | 4 +- data/pokedex/entries/001.asm | 2 +- data/pokedex/entries/002.asm | 2 +- data/pokedex/entries/003.asm | 2 +- data/pokedex/entries/004.asm | 2 +- data/pokedex/entries/005.asm | 2 +- data/pokedex/entries/006.asm | 2 +- data/pokedex/entries/007.asm | 2 +- data/pokedex/entries/008.asm | 2 +- data/pokedex/entries/009.asm | 2 +- data/pokedex/entries/010.asm | 2 +- data/pokedex/entries/011.asm | 2 +- data/pokedex/entries/012.asm | 2 +- data/pokedex/entries/013.asm | 2 +- data/pokedex/entries/014.asm | 2 +- data/pokedex/entries/015.asm | 2 +- data/pokedex/entries/016.asm | 2 +- data/pokedex/entries/017.asm | 2 +- data/pokedex/entries/018.asm | 2 +- data/pokedex/entries/019.asm | 2 +- data/pokedex/entries/020.asm | 2 +- data/pokedex/entries/021.asm | 2 +- data/pokedex/entries/022.asm | 2 +- data/pokedex/entries/023.asm | 2 +- data/pokedex/entries/024.asm | 2 +- data/pokedex/entries/025.asm | 2 +- data/pokedex/entries/026.asm | 2 +- data/pokedex/entries/027.asm | 2 +- data/pokedex/entries/028.asm | 2 +- data/pokedex/entries/029.asm | 2 +- data/pokedex/entries/030.asm | 2 +- data/pokedex/entries/031.asm | 2 +- data/pokedex/entries/032.asm | 2 +- data/pokedex/entries/033.asm | 2 +- data/pokedex/entries/034.asm | 2 +- data/pokedex/entries/035.asm | 2 +- data/pokedex/entries/036.asm | 2 +- data/pokedex/entries/037.asm | 2 +- data/pokedex/entries/038.asm | 2 +- data/pokedex/entries/039.asm | 2 +- data/pokedex/entries/040.asm | 2 +- data/pokedex/entries/041.asm | 2 +- data/pokedex/entries/042.asm | 2 +- data/pokedex/entries/043.asm | 2 +- data/pokedex/entries/044.asm | 2 +- data/pokedex/entries/045.asm | 2 +- data/pokedex/entries/046.asm | 2 +- data/pokedex/entries/047.asm | 2 +- data/pokedex/entries/048.asm | 2 +- data/pokedex/entries/049.asm | 2 +- data/pokedex/entries/050.asm | 2 +- data/pokedex/entries/051.asm | 2 +- data/pokedex/entries/052.asm | 2 +- data/pokedex/entries/053.asm | 2 +- data/pokedex/entries/054.asm | 2 +- data/pokedex/entries/055.asm | 2 +- data/pokedex/entries/056.asm | 2 +- data/pokedex/entries/057.asm | 2 +- data/pokedex/entries/058.asm | 2 +- data/pokedex/entries/059.asm | 2 +- data/pokedex/entries/060.asm | 2 +- data/pokedex/entries/061.asm | 2 +- data/pokedex/entries/062.asm | 2 +- data/pokedex/entries/063.asm | 2 +- data/pokedex/entries/064.asm | 2 +- data/pokedex/entries/065.asm | 2 +- data/pokedex/entries/066.asm | 2 +- data/pokedex/entries/067.asm | 2 +- data/pokedex/entries/068.asm | 2 +- data/pokedex/entries/069.asm | 2 +- data/pokedex/entries/070.asm | 2 +- data/pokedex/entries/071.asm | 2 +- data/pokedex/entries/072.asm | 2 +- data/pokedex/entries/073.asm | 2 +- data/pokedex/entries/074.asm | 2 +- data/pokedex/entries/075.asm | 2 +- data/pokedex/entries/076.asm | 2 +- data/pokedex/entries/077.asm | 2 +- data/pokedex/entries/078.asm | 2 +- data/pokedex/entries/079.asm | 2 +- data/pokedex/entries/080.asm | 2 +- data/pokedex/entries/081.asm | 2 +- data/pokedex/entries/082.asm | 2 +- data/pokedex/entries/083.asm | 2 +- data/pokedex/entries/084.asm | 2 +- data/pokedex/entries/085.asm | 2 +- data/pokedex/entries/086.asm | 2 +- data/pokedex/entries/087.asm | 2 +- data/pokedex/entries/088.asm | 2 +- data/pokedex/entries/089.asm | 2 +- data/pokedex/entries/090.asm | 2 +- data/pokedex/entries/091.asm | 2 +- data/pokedex/entries/092.asm | 2 +- data/pokedex/entries/093.asm | 2 +- data/pokedex/entries/094.asm | 2 +- data/pokedex/entries/095.asm | 2 +- data/pokedex/entries/096.asm | 2 +- data/pokedex/entries/097.asm | 2 +- data/pokedex/entries/098.asm | 2 +- data/pokedex/entries/099.asm | 2 +- data/pokedex/entries/100.asm | 2 +- data/pokedex/entries/101.asm | 2 +- data/pokedex/entries/102.asm | 2 +- data/pokedex/entries/103.asm | 2 +- data/pokedex/entries/104.asm | 2 +- data/pokedex/entries/105.asm | 2 +- data/pokedex/entries/106.asm | 2 +- data/pokedex/entries/107.asm | 2 +- data/pokedex/entries/108.asm | 2 +- data/pokedex/entries/109.asm | 2 +- data/pokedex/entries/110.asm | 2 +- data/pokedex/entries/111.asm | 2 +- data/pokedex/entries/112.asm | 2 +- data/pokedex/entries/113.asm | 2 +- data/pokedex/entries/114.asm | 2 +- data/pokedex/entries/115.asm | 2 +- data/pokedex/entries/116.asm | 2 +- data/pokedex/entries/117.asm | 2 +- data/pokedex/entries/118.asm | 2 +- data/pokedex/entries/119.asm | 2 +- data/pokedex/entries/120.asm | 2 +- data/pokedex/entries/121.asm | 2 +- data/pokedex/entries/122.asm | 2 +- data/pokedex/entries/123.asm | 2 +- data/pokedex/entries/124.asm | 2 +- data/pokedex/entries/125.asm | 2 +- data/pokedex/entries/126.asm | 2 +- data/pokedex/entries/127.asm | 2 +- data/pokedex/entries/128.asm | 2 +- data/pokedex/entries/129.asm | 2 +- data/pokedex/entries/130.asm | 2 +- data/pokedex/entries/131.asm | 2 +- data/pokedex/entries/132.asm | 2 +- data/pokedex/entries/133.asm | 2 +- data/pokedex/entries/134.asm | 2 +- data/pokedex/entries/135.asm | 2 +- data/pokedex/entries/136.asm | 2 +- data/pokedex/entries/137.asm | 2 +- data/pokedex/entries/138.asm | 2 +- data/pokedex/entries/139.asm | 2 +- data/pokedex/entries/140.asm | 2 +- data/pokedex/entries/141.asm | 2 +- data/pokedex/entries/142.asm | 2 +- data/pokedex/entries/143.asm | 2 +- data/pokedex/entries/144.asm | 2 +- data/pokedex/entries/145.asm | 2 +- data/pokedex/entries/146.asm | 2 +- data/pokedex/entries/147.asm | 2 +- data/pokedex/entries/148.asm | 2 +- data/pokedex/entries/149.asm | 2 +- data/pokedex/entries/150.asm | 2 +- data/pokedex/entries/151.asm | 2 +- data/pokedex/entries/152.asm | 2 +- data/pokedex/entries/153.asm | 2 +- data/pokedex/entries/154.asm | 2 +- data/pokedex/entries/155.asm | 2 +- data/pokedex/entries/156.asm | 2 +- data/pokedex/entries/157.asm | 2 +- data/pokedex/entries/158.asm | 2 +- data/pokedex/entries/159.asm | 2 +- data/pokedex/entries/160.asm | 2 +- data/pokedex/entries/161.asm | 2 +- data/pokedex/entries/162.asm | 2 +- data/pokedex/entries/163.asm | 2 +- data/pokedex/entries/164.asm | 2 +- data/pokedex/entries/165.asm | 2 +- data/pokedex/entries/166.asm | 2 +- data/pokedex/entries/167.asm | 2 +- data/pokedex/entries/168.asm | 2 +- data/pokedex/entries/169.asm | 2 +- data/pokedex/entries/170.asm | 2 +- data/pokedex/entries/171.asm | 2 +- data/pokedex/entries/172.asm | 2 +- data/pokedex/entries/173.asm | 2 +- data/pokedex/entries/174.asm | 2 +- data/pokedex/entries/175.asm | 2 +- data/pokedex/entries/176.asm | 2 +- data/pokedex/entries/177.asm | 2 +- data/pokedex/entries/178.asm | 2 +- data/pokedex/entries/179.asm | 2 +- data/pokedex/entries/180.asm | 2 +- data/pokedex/entries/181.asm | 2 +- data/pokedex/entries/182.asm | 2 +- data/pokedex/entries/183.asm | 2 +- data/pokedex/entries/184.asm | 2 +- data/pokedex/entries/185.asm | 2 +- data/pokedex/entries/186.asm | 2 +- data/pokedex/entries/187.asm | 2 +- data/pokedex/entries/188.asm | 2 +- data/pokedex/entries/189.asm | 2 +- data/pokedex/entries/190.asm | 2 +- data/pokedex/entries/191.asm | 2 +- data/pokedex/entries/192.asm | 2 +- data/pokedex/entries/193.asm | 2 +- data/pokedex/entries/194.asm | 2 +- data/pokedex/entries/195.asm | 2 +- data/pokedex/entries/196.asm | 2 +- data/pokedex/entries/197.asm | 2 +- data/pokedex/entries/198.asm | 2 +- data/pokedex/entries/199.asm | 2 +- data/pokedex/entries/200.asm | 2 +- data/pokedex/entries/201.asm | 2 +- data/pokedex/entries/202.asm | 2 +- data/pokedex/entries/203.asm | 2 +- data/pokedex/entries/204.asm | 2 +- data/pokedex/entries/205.asm | 2 +- data/pokedex/entries/206.asm | 2 +- data/pokedex/entries/207.asm | 2 +- data/pokedex/entries/208.asm | 2 +- data/pokedex/entries/209.asm | 2 +- data/pokedex/entries/210.asm | 2 +- data/pokedex/entries/211.asm | 2 +- data/pokedex/entries/212.asm | 2 +- data/pokedex/entries/213.asm | 2 +- data/pokedex/entries/214.asm | 2 +- data/pokedex/entries/215.asm | 2 +- data/pokedex/entries/216.asm | 2 +- data/pokedex/entries/217.asm | 2 +- data/pokedex/entries/218.asm | 2 +- data/pokedex/entries/219.asm | 2 +- data/pokedex/entries/220.asm | 2 +- data/pokedex/entries/221.asm | 2 +- data/pokedex/entries/222.asm | 2 +- data/pokedex/entries/223.asm | 2 +- data/pokedex/entries/224.asm | 2 +- data/pokedex/entries/225.asm | 2 +- data/pokedex/entries/226.asm | 2 +- data/pokedex/entries/227.asm | 2 +- data/pokedex/entries/228.asm | 2 +- data/pokedex/entries/229.asm | 2 +- data/pokedex/entries/230.asm | 2 +- data/pokedex/entries/231.asm | 2 +- data/pokedex/entries/232.asm | 2 +- data/pokedex/entries/233.asm | 2 +- data/pokedex/entries/234.asm | 2 +- data/pokedex/entries/235.asm | 2 +- data/pokedex/entries/236.asm | 2 +- data/pokedex/entries/237.asm | 2 +- data/pokedex/entries/238.asm | 2 +- data/pokedex/entries/239.asm | 2 +- data/pokedex/entries/240.asm | 2 +- data/pokedex/entries/241.asm | 2 +- data/pokedex/entries/242.asm | 2 +- data/pokedex/entries/243.asm | 2 +- data/pokedex/entries/244.asm | 2 +- data/pokedex/entries/245.asm | 2 +- data/pokedex/entries/246.asm | 2 +- data/pokedex/entries/247.asm | 2 +- data/pokedex/entries/248.asm | 2 +- data/pokedex/entries/249.asm | 2 +- data/pokedex/entries/250.asm | 2 +- data/pokedex/entries/251.asm | 2 +- data/sprite_engine.asm | 150 +- data/wild/swarm_water.asm | 2 +- engine/anim_hp_bar.asm | 6 +- engine/billspc.asm | 34 +- engine/breeding/egg.asm | 4 +- engine/card_flip.asm | 18 +- engine/color.asm | 32 +- engine/credits.asm | 66 +- engine/crystal_intro.asm | 20 +- engine/dummy_game.asm | 32 +- engine/events.asm | 18 +- engine/events_2.asm | 10 +- engine/evolve.asm | 20 +- engine/intro_menu.asm | 42 +- engine/items.asm | 20 +- engine/learn.asm | 2 +- engine/link.asm | 4 +- engine/mail.asm | 28 +- engine/main_menu.asm | 12 +- engine/map_object_action.asm | 2 +- engine/map_objects.asm | 164 +- engine/mart.asm | 14 +- engine/menu.asm | 2 +- engine/mon_menu.asm | 2 +- engine/move_mon.asm | 12 +- engine/mysterygift.asm | 4 +- engine/options_menu.asm | 132 +- engine/overworld.asm | 34 +- engine/pack.asm | 34 +- engine/party_menu.asm | 2 +- engine/phone.asm | 18 +- engine/player_movement.asm | 54 +- engine/player_object.asm | 4 +- engine/player_step.asm | 2 +- engine/pokecenter_pc.asm | 70 +- engine/pokedex.asm | 8 +- engine/pokegear.asm | 60 +- engine/printer.asm | 4 +- engine/radio.asm | 32 +- engine/scripting.asm | 16 +- engine/selectmenu.asm | 34 +- engine/slot_machine.asm | 34 +- engine/specials.asm | 2 +- engine/sprite_anims.asm | 2 +- engine/sprites.asm | 2 +- engine/startmenu.asm | 162 +- engine/stats_screen.asm | 16 +- engine/std_scripts.asm | 426 +++--- engine/time.asm | 6 +- engine/timeofdaypals.asm | 18 +- engine/timeset.asm | 20 +- engine/title.asm | 120 +- engine/tmhm2.asm | 8 +- engine/trade/animation.asm | 2 +- engine/trainer_card.asm | 10 +- engine/unown_puzzle.asm | 6 +- engine/wildmons.asm | 24 +- event/buena.asm | 8 +- event/celebi.asm | 14 +- event/daycare.asm | 36 +- event/dratini.asm | 14 +- event/halloffame.asm | 8 +- event/happiness_egg.asm | 2 +- event/kurt.asm | 2 +- event/magikarp.asm | 6 +- event/magnet_train.asm | 14 +- event/mom.asm | 30 +- event/mom_phone.asm | 4 +- event/overworld.asm | 16 +- event/poke_seer.asm | 2 +- event/special.asm | 8 +- gfx/load_pics.asm | 2 +- gfx/pics/pic_pointers.asm | 4 +- home.asm | 62 +- home/audio.asm | 6 +- home/battle.asm | 6 +- home/copy.asm | 4 +- home/copy2.asm | 10 +- home/decompress.asm | 16 +- home/farcall.asm | 6 +- home/handshake.asm | 16 +- home/init.asm | 2 +- home/joypad.asm | 60 +- home/lcd.asm | 2 +- home/map.asm | 34 +- home/map_objects.asm | 6 +- home/menu.asm | 6 +- home/mobile.asm | 12 +- home/movement.asm | 2 +- home/palettes.asm | 16 +- home/predef.asm | 4 +- home/rtc.asm | 4 +- home/serial.asm | 2 +- home/text.asm | 20 +- home/time.asm | 30 +- home/vblank.asm | 2 +- home/video.asm | 20 +- home/window.asm | 2 +- items/item_effects.asm | 36 +- lib/mobile/main.asm | 2 +- macros/text.asm | 2 +- macros/trade_anim.asm | 2 +- macros/wram.asm | 10 +- main.asm | 124 +- maps/AzaleaGym.asm | 10 +- maps/AzaleaTown.asm | 10 +- maps/BattleTowerOutside.asm | 4 +- maps/BlackthornCity.asm | 14 +- maps/BlackthornGym1F.asm | 10 +- maps/BlackthornGym2F.asm | 16 +- maps/BrunosRoom.asm | 8 +- maps/BurnedTower1F.asm | 8 +- maps/BurnedTowerB1F.asm | 4 +- maps/CeladonCafe.asm | 4 +- maps/CeladonCity.asm | 2 +- maps/CeladonDeptStore6F.asm | 18 +- maps/CeladonGameCorner.asm | 4 +- maps/CeladonGym.asm | 4 +- maps/CeladonPokeCenter1F.asm | 12 +- maps/CeruleanCity.asm | 2 +- maps/CeruleanGym.asm | 8 +- maps/CharcoalKiln.asm | 10 +- maps/CherrygroveCity.asm | 12 +- maps/CianwoodCity.asm | 8 +- maps/CianwoodGym.asm | 8 +- maps/CianwoodPharmacy.asm | 2 +- maps/CianwoodPokeCenter1F.asm | 2 +- maps/CinnabarIsland.asm | 2 +- maps/CopycatsHouse2F.asm | 48 +- maps/DarkCaveVioletEntrance.asm | 2 +- maps/DiglettsCave.asm | 2 +- maps/EarlsPokemonAcademy.asm | 22 +- maps/EcruteakCity.asm | 2 +- maps/EcruteakGym.asm | 10 +- maps/EcruteakPokeCenter1F.asm | 2 +- maps/ElmsLab.asm | 6 +- maps/FastShip1F.asm | 2 +- maps/FuchsiaCity.asm | 2 +- maps/FuchsiaGym.asm | 6 +- maps/GoldenrodCity.asm | 12 +- maps/GoldenrodDeptStore6F.asm | 18 +- maps/GoldenrodDeptStoreB1F.asm | 4 +- maps/GoldenrodDeptStoreElevator.asm | 8 +- maps/GoldenrodGameCorner.asm | 4 +- maps/GoldenrodGym.asm | 12 +- maps/IcePathB2FBlackthornSide.asm | 2 +- maps/IcePathB2FMahoganySide.asm | 2 +- maps/IlexForest.asm | 4 +- maps/IndigoPlateauPokeCenter1F.asm | 6 +- maps/KrissHouse1F.asm | 8 +- maps/KrissHouse2F.asm | 8 +- maps/KrissNeighborsHouse.asm | 4 +- maps/KurtsHouse.asm | 8 +- maps/LakeofRage.asm | 18 +- maps/LakeofRageHiddenPowerHouse.asm | 4 +- maps/LavRadioTower1F.asm | 4 +- maps/LavenderTown.asm | 2 +- maps/MahoganyGym.asm | 10 +- maps/MahoganyTown.asm | 6 +- maps/MountMoonSquare.asm | 4 +- maps/MountMortar1FInside.asm | 2 +- maps/MountMortar1FOutside.asm | 2 +- maps/MountMortar2FInside.asm | 2 +- maps/MountMortarB1F.asm | 2 +- maps/MrPokemonsHouse.asm | 18 +- maps/MrPsychicsHouse.asm | 4 +- maps/NationalPark.asm | 20 +- maps/NationalParkBugContest.asm | 2 +- maps/NewBarkTown.asm | 6 +- maps/OaksLab.asm | 10 +- maps/OlivineCity.asm | 6 +- maps/OlivineGoodRodHouse.asm | 4 +- maps/OlivineGym.asm | 12 +- maps/OlivineLighthouse2F.asm | 14 +- maps/OlivineLighthouse5F.asm | 2 +- maps/OlivinePort.asm | 2 +- maps/PalletTown.asm | 2 +- maps/PewterCity.asm | 2 +- maps/PewterGym.asm | 6 +- maps/RadioTower1F.asm | 10 +- maps/RadioTower2F.asm | 2 +- maps/RadioTower3F.asm | 2 +- maps/RedsHouse1F.asm | 4 +- maps/RockTunnel1F.asm | 4 +- maps/RockTunnelB1F.asm | 2 +- maps/Route11.asm | 2 +- maps/Route12.asm | 2 +- maps/Route13.asm | 2 +- maps/Route17.asm | 4 +- maps/Route19.asm | 6 +- maps/Route19FuchsiaGate.asm | 2 +- maps/Route20.asm | 2 +- maps/Route23.asm | 2 +- maps/Route25.asm | 2 +- maps/Route26.asm | 20 +- maps/Route27.asm | 20 +- maps/Route27SandstormHouse.asm | 8 +- maps/Route28.asm | 2 +- maps/Route28FamousSpeechHouse.asm | 6 +- maps/Route29.asm | 6 +- maps/Route2NuggetSpeechHouse.asm | 4 +- maps/Route30.asm | 20 +- maps/Route31.asm | 30 +- maps/Route32.asm | 46 +- maps/Route33.asm | 18 +- maps/Route34.asm | 40 +- maps/Route35.asm | 18 +- maps/Route36.asm | 90 +- maps/Route37.asm | 8 +- maps/Route38.asm | 36 +- maps/Route39.asm | 2 +- maps/Route4.asm | 2 +- maps/Route40.asm | 4 +- maps/Route42.asm | 16 +- maps/Route43.asm | 28 +- maps/Route44.asm | 22 +- maps/Route45.asm | 12 +- maps/Route46.asm | 10 +- maps/Route9.asm | 2 +- maps/RuinsofAlphOutside.asm | 2 +- maps/SafariZoneWardensHome.asm | 2 +- maps/SaffronCity.asm | 2 +- maps/SaffronGym.asm | 6 +- maps/SeafoamGym.asm | 6 +- maps/SilverCaveOutside.asm | 2 +- maps/SilverCaveRoom1.asm | 4 +- maps/SilverCaveRoom2.asm | 2 +- maps/TeamRocketBaseB1F.asm | 2 +- maps/TeamRocketBaseB2F.asm | 6 +- maps/TeamRocketBaseB3F.asm | 8 +- maps/TinTower1F.asm | 8 +- maps/TinTower4F.asm | 2 +- maps/TinTower5F.asm | 4 +- maps/TinTowerRoof.asm | 6 +- maps/Underground.asm | 4 +- maps/UndergroundPathSwitchRoomEntrances.asm | 4 +- maps/UnionCaveB2F.asm | 6 +- maps/VermilionCity.asm | 12 +- maps/VermilionGym.asm | 6 +- maps/VermilionPort.asm | 8 +- maps/VictoryRoad.asm | 4 +- maps/VioletCity.asm | 2 +- maps/VioletGym.asm | 10 +- maps/VioletPokeCenter1F.asm | 2 +- maps/ViridianCity.asm | 4 +- maps/ViridianGym.asm | 6 +- maps/ViridianPokeCenter1F.asm | 2 +- maps/WarehouseEntrance.asm | 6 +- maps/WhirlIslandB1F.asm | 6 +- maps/WhirlIslandLugiaChamber.asm | 6 +- misc/battle_tower_5c.asm | 2 +- misc/fixed_words.asm | 4 +- misc/gbc_only.asm | 4 +- misc/gfx_41.asm | 20 +- misc/mobile_12_2.asm | 2 +- misc/mobile_42.asm | 18 +- misc/mobile_46.asm | 16 +- misc/mobile_5f.asm | 16 +- misc/mobile_menu.asm | 2 +- predef/cgb.asm | 4 +- predef/crystal.asm | 2 +- text/types.asm | 2 +- tilesets/animations.asm | 84 +- wram.asm | 12 +- 537 files changed, 4556 insertions(+), 4556 deletions(-) diff --git a/audio/engine.asm b/audio/engine.asm index d01d74c7d..c8e976cc4 100644 --- a/audio/engine.asm +++ b/audio/engine.asm @@ -233,7 +233,7 @@ UpdateChannels: ; e8125 jp [hl] -.ChannelFnPtrs +.ChannelFnPtrs: dw .Channel1 dw .Channel2 dw .Channel3 @@ -245,11 +245,11 @@ UpdateChannels: ; e8125 dw .Channel7 dw .Channel8 -.Channel1 +.Channel1: ld a, [Danger] bit 7, a ret nz -.Channel5 +.Channel5: ld hl, Channel1NoteFlags - Channel1 add hl, bc bit NOTE_UNKN_3, [hl] @@ -317,8 +317,8 @@ UpdateChannels: ; e8125 ld [rNR14], a ret -.Channel2 -.Channel6 +.Channel2: +.Channel6: ld hl, Channel1NoteFlags - Channel1 add hl, bc bit NOTE_REST, [hl] ; rest @@ -377,8 +377,8 @@ UpdateChannels: ; e8125 ld [rNR24], a ret -.Channel3 -.Channel7 +.Channel3: +.Channel7: ld hl, Channel1NoteFlags - Channel1 add hl, bc bit NOTE_REST, [hl] ; rest @@ -478,8 +478,8 @@ endr ld [rNR32], a ret -.Channel4 -.Channel8 +.Channel4: +.Channel8: ld hl, Channel1NoteFlags - Channel1 add hl, bc bit NOTE_REST, [hl] ; rest @@ -2483,62 +2483,62 @@ _PlayCryHeader:: ; e8b79 ; Play cry de using parameters: ; CryPitch ; CryLength - + call MusicOff - + ; Overload the music id with the cry id ld hl, MusicID ld [hl], e inc hl ld [hl], d - + ; 3-byte pointers (bank, address) ld hl, Cries rept 3 add hl, de endr - + ld a, [hli] ld [MusicBank], 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 and 3 - + ; For each channel: inc a .loop push af call LoadChannel - + ld hl, Channel1Flags - Channel1 add hl, bc set SOUND_REST, [hl] - + ld hl, Channel1Flags2 - Channel1 add hl, bc set SOUND_CRY_PITCH, [hl] - + ld hl, Channel1CryPitch - Channel1 add hl, bc ld a, [CryPitch] ld [hli], a ld a, [CryPitch + 1] ld [hl], a - + ; No tempo for channel 4 ld a, [CurChannel] and 3 cp 3 jr nc, .start - + ; Tempo is effectively length ld hl, Channel1Tempo - Channel1 add hl, bc @@ -2551,14 +2551,14 @@ endr ld a, [wStereoPanningMask] and a jr z, .next - + ; Stereo only: Play cry from the monster's side. ; This only applies in-battle. - + ld a, [Options] bit 5, a ; stereo jr z, .next - + ; [Tracks] &= [CryTracks] ld hl, Channel1Tracks - Channel1 add hl, bc @@ -2568,23 +2568,23 @@ endr ld hl, Channel1Tracks - Channel1 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, [LastVolume] and a jr nz, .end - + ld a, [Volume] ld [LastVolume], a ld a, $77 ld [Volume], a - + .end ld a, 1 ; stop playing music ld [SFXPriority], a @@ -2699,24 +2699,24 @@ PlayStereoSFX:: ; e8ca6 ; play sfx de call MusicOff - + ; standard procedure if stereo's off ld a, [Options] bit 5, a jp z, _PlaySFX - + ; else, let's go ahead with this ld hl, MusicID ld [hl], e inc hl ld [hl], d - + ; get sfx ptr ld hl, SFX rept 3 add hl, de endr - + ; bank ld a, [hli] ld [MusicBank], a @@ -2724,22 +2724,22 @@ endr ld e, [hl] inc hl ld d, [hl] - + ; bit 2-3 call LoadMusicByte rlca rlca and 3 ; ch1-4 inc a - + .loop push af call LoadChannel - + ld hl, Channel1Flags - Channel1 add hl, bc set SOUND_SFX, [hl] - + push de ; get tracks for this channel ld a, [CurChannel] @@ -2751,47 +2751,47 @@ endr ld a, [hl] ld hl, wStereoPanningMask and [hl] - + ld hl, Channel1Tracks - Channel1 add hl, bc ld [hl], a - + ld hl, Channel1Field0x30 - Channel1 ; $c131 - Channel1 add hl, bc ld [hl], a - + ld a, [CryTracks] cp 2 ; ch 1-2 jr c, .skip - + ; ch3-4 ld a, [wSFXDuration] - + ld hl, Channel1Field0x2e - Channel1 ; $c12f - Channel1 add hl, bc ld [hl], a - + ld hl, Channel1Field0x2f - Channel1 ; $c130 - Channel1 add hl, bc ld [hl], a - + ld hl, Channel1Flags2 - Channel1 add hl, bc set SOUND_UNKN_0F, [hl] - + .skip pop de - + ; turn channel on ld hl, Channel1Flags - Channel1 add hl, bc set SOUND_CHANNEL_ON, [hl] ; on - + ; done? pop af dec a jr nz, .loop - + ; we're done call MusicOn ret diff --git a/audio/music_pointers.asm b/audio/music_pointers.asm index 11d55fe2c..7e0ca0c69 100644 --- a/audio/music_pointers.asm +++ b/audio/music_pointers.asm @@ -102,9 +102,9 @@ dba Music_LakeOfRageRocketRadio ; 0xef5b1 dba Music_Printer ; 0xf07fd dba Music_PostCredits ; 0xcfd9e - + ; Crystal adds the following songs: - + dba Music_Clair ; 0x1fa8d dba Music_MobileAdapterMenu ; 0x17801f dba Music_MobileAdapter ; 0x1fc87 diff --git a/battle/ai/items.asm b/battle/ai/items.asm index c7c8f8201..90bfb840d 100644 --- a/battle/ai/items.asm +++ b/battle/ai/items.asm @@ -318,7 +318,7 @@ AI_Items: ; 39196 jp c, .Use jp .DontUse -.StatusCheckContext +.StatusCheckContext: ld a, [EnemySubStatus5] bit SUBSTATUS_TOXIC, a jr z, .FailToxicCheck @@ -328,7 +328,7 @@ AI_Items: ; 39196 call Random cp 1 + 50 percent jp c, .Use -.FailToxicCheck +.FailToxicCheck: ld a, [EnemyMonStatus] and 1 << FRZ | SLP jp z, .DontUse @@ -344,7 +344,7 @@ AI_Items: ; 39196 call .Status jp c, .DontUse -.UseFullRestore +.UseFullRestore: call EnemyUsedFullRestore jp .Use ; 38220 @@ -676,7 +676,7 @@ AI_TrySwitch: ; 3844b ld c, a ld hl, OTPartyMon1HP ld d, 0 -.SwitchLoop +.SwitchLoop: ld a, [hli] ld b, a ld a, [hld] diff --git a/battle/ai/move.asm b/battle/ai/move.asm index eb6a0536d..0d1c6c968 100755 --- a/battle/ai/move.asm +++ b/battle/ai/move.asm @@ -31,24 +31,24 @@ endr ld hl, EnemyMonMoves ld c, 0 -.CheckDisabledMove +.CheckDisabledMove: cp [hl] jr z, .ScoreDisabledMove inc c inc hl jr .CheckDisabledMove -.ScoreDisabledMove +.ScoreDisabledMove: ld hl, Buffer1 ld b, 0 add hl, bc ld [hl], 80 ; Don't pick moves with 0 PP. -.CheckPP +.CheckPP: ld hl, Buffer1 - 1 ld de, EnemyMonPP ld b, 0 -.CheckMovePP +.CheckMovePP: inc b ld a, b cp EnemyMonMovesEnd - EnemyMonMoves + 1 @@ -63,7 +63,7 @@ endr ; Apply AI scoring layers depending on the trainer class. -.ApplyLayers +.ApplyLayers: ld hl, TrainerClassAttributes + TRNATTR_AI_MOVE_WEIGHTS ; If we have a battle in BattleTower just load the Attributes of the first TrainerClass (Falkner) @@ -82,7 +82,7 @@ endr push bc push hl -.CheckLayer +.CheckLayer: pop hl pop bc @@ -119,12 +119,12 @@ endr jr .CheckLayer ; Decrement the scores of all moves one by one until one reaches 0. -.DecrementScores +.DecrementScores: ld hl, Buffer1 ld de, EnemyMonMoves ld c, EnemyMonMovesEnd - EnemyMonMoves -.DecrementNextScore +.DecrementNextScore: ; If the enemy has no moves, this will infinite. ld a, [de] inc de @@ -145,7 +145,7 @@ endr ; 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 +.PickLowestScoreMoves: ld a, c .move_loop @@ -159,14 +159,14 @@ endr ld de, EnemyMonMoves ld c, NUM_MOVES -; Give a score of 0 to a blank move +; 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 +; Disregard the move if its score is not 1 .skip_load ld a, [hl] dec a @@ -183,8 +183,8 @@ endr dec c jr nz, .loop2 -; Randomly choose one of the moves with a score of 1 -.ChooseMove +; Randomly choose one of the moves with a score of 1 +.ChooseMove: ld hl, Buffer1 call Random and 3 diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm index e9df9c62a..9b8dd6e42 100644 --- a/battle/ai/scoring.asm +++ b/battle/ai/scoring.asm @@ -23,7 +23,7 @@ AI_Basic: ; 38591 ; Dismiss moves with special effects if they are ; useless or not a good choice right now. -; For example, healing moves, weather moves, Dream Eater... +; For example, healing moves, weather moves, Dream Eater... push hl push de push bc @@ -33,7 +33,7 @@ AI_Basic: ; 38591 pop hl jr nz, .discourage -; Dismiss status-only moves if the player can't be statused. +; Dismiss status-only moves if the player can't be statused. ld a, [wEnemyMoveStruct + MOVE_EFFECT] push hl push de @@ -680,7 +680,7 @@ rept 2 inc [hl] endr -; 30% chance to end up here if enemy's HP is full and player is not badly poisoned. +; 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%. @@ -771,7 +771,7 @@ AI_Smart_MirrorMove: ; 3895b jr nz, .asm_38968 ; ...do nothing if enemy is slower than player - call AICompareSpeed + call AICompareSpeed ret nc ; ...or dismiss this move if enemy is faster than player. @@ -784,7 +784,7 @@ AI_Smart_MirrorMove: ; 3895b ld de, 1 call IsInArray pop hl - + ; ...do nothing if he didn't use a useful move. ret nc @@ -813,11 +813,11 @@ AI_Smart_AccuracyDown: ; 38985 call AICheckPlayerMaxHP jr nc, .asm_389a0 -; ...and enemy's HP is above 50%... +; ...and enemy's HP is above 50%... call AICheckEnemyHalfHP jr nc, .asm_389a0 -; ...greatly encourage this move if player is badly poisoned. +; ...greatly encourage this move if player is badly poisoned. ld a, [PlayerSubStatus5] bit SUBSTATUS_TOXIC, a jr nz, .asm_3899d @@ -839,21 +839,21 @@ endr call AICheckPlayerQuarterHP jr nc, .asm_389bd -; If player's HP is above 25% but not full, 4% chance to greatly encourage this move. +; If player's HP is above 25% but not full, 4% chance to greatly encourage this move. call Random cp $a jr c, .asm_3899d -; If player's HP is between 25% and 50%,... +; If player's HP is between 25% and 50%,... call AICheckPlayerHalfHP jr nc, .asm_389b8 -; If player's HP is above 50% but not full, 20% chance to greatly encourage this move. +; If player's HP is above 50% but not full, 20% chance to greatly encourage this move. call AI_80_20 jr c, .asm_3899d jr .asm_389bf -; ...50% chance to greatly discourage this move. +; ...50% chance to greatly discourage this move. .asm_389b8 call AI_50_50 jr c, .asm_389bf @@ -863,7 +863,7 @@ rept 2 inc [hl] endr -; We only end up here if the move has not been already encouraged. +; We only end up here if the move has not been already encouraged. .asm_389bf ld a, [PlayerSubStatus5] bit SUBSTATUS_TOXIC, a @@ -873,14 +873,14 @@ endr bit SUBSTATUS_LEECH_SEED, a jr nz, .asm_389ef -; Discourage this move if enemy's evasion level is higher than player's accuracy level. +; Discourage this move if enemy's evasion level is higher than player's accuracy level. ld a, [EnemyEvaLevel] ld b, a ld a, [PlayerAccLevel] cp b jr c, .asm_389e4 -; Greatly encourage this move if the player is in the middle of Fury Cutter or Rollout. +; Greatly encourage this move if the player is in the middle of Fury Cutter or Rollout. ld a, [PlayerFuryCutterCount] and a jr nz, .asm_3899d @@ -895,7 +895,7 @@ endr ; Player is badly poisoned. ; 80% chance to greatly encourage this move. -; This would counter any previous discouragement. +; This would counter any previous discouragement. .asm_389e6 call Random cp $50 @@ -907,7 +907,7 @@ endr ; Player is seeded. ; 50% chance to encourage this move. -; This would partly counter any previous discouragement. +; This would partly counter any previous discouragement. .asm_389ef call AI_50_50 ret c @@ -931,7 +931,7 @@ AI_Smart_Haze: ; 389f5 jr c, .asm_38a12 jr .asm_389fb -; 85% chance to encourage this move if any of player's stat levels is higher than +2. +; 85% chance to encourage this move if any of player's stat levels is higher than +2. .asm_38a05 ld hl, PlayerAtkLevel ld c, $8 @@ -1164,7 +1164,7 @@ AI_Smart_Confuse: ; 38adb cp $19 jr c, .asm_38ae7 inc [hl] - + .asm_38ae7 ; Discourage again if player's HP is below 25%. call AICheckPlayerQuarterHP @@ -1220,10 +1220,10 @@ AI_Smart_Fly: ; 38b12 ld a, [PlayerSubStatus3] and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND ret z - + call AICompareSpeed ret nc - + rept 3 dec [hl] endr @@ -1246,9 +1246,9 @@ AI_Smart_Paralyze: ; 38b26 ; 50% chance to discourage this move if player's HP is below 25%. call AICheckPlayerQuarterHP jr nc, .asm_38b3a - + ; 80% chance to greatly encourage this move -; if enemy is slower than player and its HP is above 25%. +; if enemy is slower than player and its HP is above 25%. call AICompareSpeed ret c call AICheckEnemyQuarterHP @@ -1308,8 +1308,8 @@ AI_Smart_Substitute: ; 38b5c AI_Smart_HyperBeam: ; 38b63 call AICheckEnemyHalfHP jr c, .asm_38b72 - -; 50% chance to encourage this move if enemy's HP is below 25%. + +; 50% chance to encourage this move if enemy's HP is below 25%. call AICheckEnemyQuarterHP ret c call AI_50_50 @@ -1335,13 +1335,13 @@ AI_Smart_Rage: ; 38b7f bit SUBSTATUS_RAGE, a jr z, .asm_38b9b -; If enemy's Rage is building, 50% chance to encourage this move. +; If enemy's Rage is building, 50% chance to encourage this move. call AI_50_50 jr c, .asm_38b8c dec [hl] -; Encourage this move based on Rage's counter. +; Encourage this move based on Rage's counter. .asm_38b8c ld a, [wEnemyRageCounter] cp $2 @@ -1773,12 +1773,12 @@ AI_Smart_PriorityHit: ; 38d5a call AICompareSpeed ret c -; Dismiss this move if the player is flying or underground. +; Dismiss this move if the player is flying or underground. ld a, [PlayerSubStatus3] and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND jp nz, AIDiscourageMove -; Greatly encourage this move if it will KO the player. +; Greatly encourage this move if it will KO the player. ld a, $1 ld [hBattleTurn], a push hl @@ -1895,18 +1895,18 @@ AI_Smart_MeanLook: ; 38dfb pop hl jp z, AIDiscourageMove -; 80% chance to greatly encourage this move if the enemy is badly poisoned (weird). +; 80% chance to greatly encourage this move if the enemy is badly poisoned (weird). ld a, [EnemySubStatus5] bit SUBSTATUS_TOXIC, a jr nz, .asm_38e26 ; 80% chance to greatly encourage this move if the player is either -; in love, identified, stuck in Rollout, or has a Nightmare. +; in love, identified, stuck in Rollout, or has a Nightmare. ld a, [PlayerSubStatus1] and 1<