summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio.asm4
-rw-r--r--audio/engine_1.asm102
-rw-r--r--audio/engine_2.asm106
-rw-r--r--audio/engine_3.asm100
-rwxr-xr-x[-rw-r--r--]audio/headers/musicheaders02.asm2
-rwxr-xr-x[-rw-r--r--]audio/headers/musicheaders08.asm2
-rwxr-xr-x[-rw-r--r--]audio/headers/musicheaders1f.asm2
-rwxr-xr-x[-rw-r--r--]audio/headers/sfxheaders02.asm2
-rwxr-xr-x[-rw-r--r--]audio/headers/sfxheaders08.asm2
-rwxr-xr-x[-rw-r--r--]audio/headers/sfxheaders1f.asm2
-rw-r--r--audio/music/bikeriding.asm1
-rw-r--r--audio/music/celadon.asm1
-rw-r--r--audio/music/cinnabar.asm1
-rw-r--r--audio/music/cinnabarmansion.asm1
-rw-r--r--audio/music/cities1.asm1
-rw-r--r--audio/music/cities2.asm1
-rw-r--r--audio/music/credits.asm1
-rw-r--r--audio/music/defeatedgymleader.asm1
-rw-r--r--audio/music/defeatedtrainer.asm1
-rw-r--r--audio/music/defeatedwildmon.asm1
-rw-r--r--audio/music/dungeon1.asm1
-rw-r--r--audio/music/dungeon2.asm1
-rw-r--r--audio/music/dungeon3.asm1
-rw-r--r--audio/music/finalbattle.asm1
-rw-r--r--audio/music/gamecorner.asm1
-rw-r--r--audio/music/gym.asm1
-rw-r--r--audio/music/gymleaderbattle.asm1
-rw-r--r--audio/music/halloffame.asm1
-rw-r--r--audio/music/indigoplateau.asm1
-rw-r--r--audio/music/introbattle.asm1
-rw-r--r--audio/music/jigglypuffsong.asm1
-rw-r--r--audio/music/lavender.asm1
-rw-r--r--audio/music/meeteviltrainer.asm1
-rw-r--r--audio/music/meetfemaletrainer.asm1
-rw-r--r--audio/music/meetmaletrainer.asm1
-rw-r--r--audio/music/meetprofoak.asm1
-rw-r--r--audio/music/meetrival.asm1
-rw-r--r--audio/music/museumguy.asm1
-rw-r--r--audio/music/oakslab.asm1
-rw-r--r--audio/music/pallettown.asm1
-rw-r--r--audio/music/pkmnhealed.asm1
-rw-r--r--audio/music/pokecenter.asm1
-rw-r--r--audio/music/pokemontower.asm1
-rw-r--r--audio/music/routes1.asm1
-rw-r--r--audio/music/routes2.asm1
-rw-r--r--audio/music/routes3.asm1
-rw-r--r--audio/music/routes4.asm1
-rw-r--r--audio/music/safarizone.asm1
-rw-r--r--audio/music/silphco.asm1
-rw-r--r--audio/music/ssanne.asm1
-rw-r--r--audio/music/surfing.asm1
-rw-r--r--audio/music/titlescreen.asm1
-rw-r--r--audio/music/trainerbattle.asm1
-rw-r--r--audio/music/unusedsong.asm1
-rw-r--r--audio/music/vermilion.asm1
-rw-r--r--audio/music/wildbattle.asm1
-rw-r--r--audio/music/yellow/meetjessiejames.asm1
-rw-r--r--audio/music/yellow/surfingpikachu.asm1
-rw-r--r--audio/music/yellow/yellowintro.asm1
-rw-r--r--audio/music/yellow/yellowunusedsong.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_01.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_02.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_03.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_04.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_05.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_06.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_07.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_08.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_09.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_0a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_0b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_0c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_0d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_0e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_0f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_10.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_11.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_12.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_13.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_14.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_15.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_16.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_17.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_18.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_19.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_1a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_1b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_1c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_1d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_1e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_1f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_20.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_21.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_22.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_23.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_24.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_25.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_26.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_27.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_28.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_29.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_2a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_2b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_2c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_2d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_2e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_2f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_30.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_31.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_32.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_33.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_34.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_35.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_36.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_37.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_38.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_39.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_3a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_3b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_3c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_3d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_3e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_3f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_40.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_41.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_42.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_43.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_44.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_45.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_46.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_47.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_48.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_49.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_4a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_4b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_4c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_4d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_4e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_4f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_50.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_51.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_52.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_53.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_54.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_55.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_56.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_57.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_58.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_59.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_5a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_5b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_5c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_5d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_5e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_5f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_02_unused.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_01.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_02.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_03.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_04.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_05.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_06.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_07.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_08.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_09.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_0a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_0b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_0c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_0d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_0e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_0f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_10.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_11.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_12.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_13.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_14.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_15.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_16.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_17.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_18.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_19.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_1a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_1b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_1c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_1d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_1e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_1f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_20.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_21.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_22.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_23.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_24.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_25.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_26.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_27.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_28.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_29.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_2a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_2b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_2c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_2d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_2e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_2f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_30.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_31.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_32.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_33.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_34.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_35.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_36.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_37.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_38.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_39.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_3a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_3b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_3c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_3d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_3e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_3f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_40.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_41.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_42.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_43.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_44.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_45.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_46.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_47.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_48.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_49.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_4a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_4b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_4c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_4d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_4e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_4f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_50.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_51.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_52.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_53.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_54.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_55.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_56.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_57.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_58.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_59.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_5a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_5b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_5c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_5d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_5e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_5f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_60.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_61.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_62.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_63.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_64.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_65.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_66.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_67.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_68.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_69.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_6a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_6b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_6c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_6d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_6e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_6f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_70.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_71.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_72.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_73.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_74.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_75.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_76.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_08_77.asm1
-rwxr-xr-xaudio/sfx/sfx_08_pokeflute.asm1
-rwxr-xr-xaudio/sfx/sfx_08_pokeflute_ch3.asm1
-rwxr-xr-xaudio/sfx/sfx_08_unused.asm1
-rwxr-xr-xaudio/sfx/sfx_08_unused2.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_01.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_02.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_03.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_04.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_05.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_06.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_07.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_08.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_09.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_0a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_0b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_0c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_0d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_0e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_0f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_10.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_11.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_12.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_13.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_14.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_15.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_16.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_17.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_18.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_19.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_1a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_1b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_1c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_1d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_1e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_1f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_20.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_21.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_22.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_23.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_24.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_25.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_26.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_27.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_28.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_29.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_2a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_2b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_2c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_2d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_2e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_2f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_30.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_31.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_32.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_33.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_34.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_35.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_36.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_37.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_38.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_39.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_3a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_3b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_3c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_3d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_3e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_3f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_40.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_41.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_42.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_43.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_44.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_45.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_46.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_47.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_48.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_49.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_4a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_4b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_4c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_4d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_4e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_4f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_50.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_51.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_52.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_53.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_54.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_55.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_56.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_57.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_58.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_59.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_5a.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_5b.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_5c.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_5d.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_5e.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_5f.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_60.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_61.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_62.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_63.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_64.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_65.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_66.asm1
-rwxr-xr-x[-rw-r--r--]audio/sfx/sfx_1f_67.asm1
-rwxr-xr-xaudio/sfx/sfx_1f_unused.asm1
-rwxr-xr-xconstants/connection_constants.asm10
-rwxr-xr-xconstants/evolution_constants.asm8
-rwxr-xr-x[-rw-r--r--]constants/item_constants.asm3
-rwxr-xr-xconstants/list_constants.asm28
-rwxr-xr-xconstants/oam_constants.asm18
-rwxr-xr-x[-rw-r--r--]constants/palette_constants.asm2
-rwxr-xr-xconstants/sprite_constants.asm194
-rwxr-xr-xconstants/status_constants.asm64
-rwxr-xr-x[-rw-r--r--]constants/trainer_constants.asm2
-rwxr-xr-xconstants/type_constants.asm32
-rwxr-xr-xdata/hidden_objects.asm10
-rwxr-xr-xdata/mapObjects/redshouse2f.asm2
-rwxr-xr-xdata/mon_party_sprites.asm4
-rwxr-xr-xengine/HoF_room_pc.asm34
-rwxr-xr-xengine/battle/animations.asm269
-rwxr-xr-x[-rw-r--r--]engine/battle/bank_e_misc.asm30
-rw-r--r--engine/battle/battle_transitions.asm8
-rw-r--r--engine/battle/common_text.asm24
-rwxr-xr-xengine/battle/core.asm256
-rw-r--r--engine/battle/decrement_pp.asm16
-rw-r--r--engine/battle/draw_hud_pokeball_gfx.asm38
-rwxr-xr-x[-rw-r--r--]engine/battle/end_of_battle.asm4
-rw-r--r--engine/battle/experience.asm4
-rw-r--r--engine/battle/init_battle_variables.asm4
-rw-r--r--engine/battle/moveEffects/conversion_effect.asm2
-rw-r--r--engine/battle/moveEffects/drain_hp_effect.asm10
-rw-r--r--engine/battle/moveEffects/focus_energy_effect.asm2
-rw-r--r--engine/battle/moveEffects/haze_effect.asm10
-rw-r--r--engine/battle/moveEffects/heal_effect.asm2
-rw-r--r--engine/battle/moveEffects/leech_seed_effect.asm20
-rw-r--r--engine/battle/moveEffects/one_hit_ko_effect.asm8
-rw-r--r--engine/battle/moveEffects/paralyze_effect.asm4
-rw-r--r--engine/battle/moveEffects/pay_day_effect.asm6
-rw-r--r--engine/battle/moveEffects/recoil_effect.asm2
-rw-r--r--engine/battle/moveEffects/reflect_light_screen_effect.asm2
-rw-r--r--engine/battle/moveEffects/substitute_effect.asm26
-rw-r--r--engine/battle/moveEffects/transform_effect.asm14
-rwxr-xr-x[-rw-r--r--]engine/battle/read_trainer_party.asm4
-rw-r--r--engine/battle/scale_sprites.asm8
-rw-r--r--engine/battle/trainer_ai.asm25
-rwxr-xr-x[-rw-r--r--]engine/battle/trainer_pic_money_pointers.asm2
-rw-r--r--engine/battle/wild_encounters.asm16
-rwxr-xr-xengine/cable_club.asm8
-rwxr-xr-xengine/evolution.asm36
-rwxr-xr-xengine/evolve_trade.asm4
-rwxr-xr-xengine/evos_moves.asm10
-rwxr-xr-xengine/experience.asm22
-rwxr-xr-xengine/game_corner_slots.asm6
-rwxr-xr-xengine/game_corner_slots2.asm4
-rwxr-xr-xengine/gamefreak.asm32
-rwxr-xr-xengine/give_pokemon.asm8
-rwxr-xr-xengine/hall_of_fame.asm50
-rwxr-xr-xengine/hidden_object_functions14.asm16
-rwxr-xr-xengine/hidden_object_functions17.asm61
-rwxr-xr-xengine/hidden_object_functions18.asm90
-rwxr-xr-xengine/hidden_object_functions3.asm57
-rwxr-xr-xengine/hidden_object_functions7.asm92
-rwxr-xr-xengine/hp_bar.asm2
-rwxr-xr-xengine/in_game_trades.asm2
-rwxr-xr-xengine/intro.asm50
-rwxr-xr-xengine/items/itemfinder.asm10
-rwxr-xr-xengine/items/items.asm114
-rwxr-xr-xengine/items/tm_prices.asm6
-rwxr-xr-xengine/learn_move.asm2
-rwxr-xr-xengine/load_pokedex_tiles.asm4
-rw-r--r--engine/menu/bills_pc.asm15
-rwxr-xr-xengine/menu/diploma.asm10
-rwxr-xr-xengine/menu/main_menu.asm24
-rwxr-xr-xengine/menu/naming_screen.asm14
-rwxr-xr-xengine/menu/oaks_pc.asm2
-rwxr-xr-xengine/menu/party_menu.asm2
-rwxr-xr-xengine/menu/pc.asm36
-rwxr-xr-xengine/menu/pokedex.asm8
-rwxr-xr-xengine/menu/prize_menu.asm4
-rwxr-xr-xengine/menu/start_menu.asm6
-rwxr-xr-xengine/menu/start_sub_menus.asm48
-rwxr-xr-xengine/menu/status_screen.asm42
-rwxr-xr-xengine/menu/vending_machine.asm6
-rwxr-xr-xengine/multiply_divide.asm68
-rwxr-xr-xengine/oak_speech.asm24
-rwxr-xr-xengine/oak_speech2.asm52
-rwxr-xr-xengine/overworld/cable_club_npc.asm12
-rwxr-xr-xengine/overworld/card_key.asm4
-rwxr-xr-xengine/overworld/cinnabar_lab.asm14
-rwxr-xr-xengine/overworld/cut.asm54
-rwxr-xr-xengine/overworld/cut2.asm8
-rwxr-xr-xengine/overworld/doors.asm4
-rwxr-xr-xengine/overworld/elevator.asm4
-rwxr-xr-xengine/overworld/emotion_bubbles.asm6
-rwxr-xr-xengine/overworld/healing_machine.asm18
-rwxr-xr-xengine/overworld/hidden_items.asm18
-rw-r--r--engine/overworld/item.asm4
-rwxr-xr-xengine/overworld/ledges.asm2
-rw-r--r--engine/overworld/movement.asm56
-rwxr-xr-xengine/overworld/npc_movement.asm4
-rwxr-xr-xengine/overworld/oaks_aide.asm14
-rwxr-xr-xengine/overworld/player_animations.asm22
-rwxr-xr-xengine/overworld/pokecenter.asm2
-rwxr-xr-xengine/overworld/pokemart.asm8
-rwxr-xr-xengine/overworld/ssanne.asm2
-rwxr-xr-xengine/overworld/trainers.asm24
-rwxr-xr-xengine/palettes.asm10
-rwxr-xr-xengine/pokedex_rating.asm2
-rwxr-xr-xengine/predefs.asm8
-rwxr-xr-xengine/predefs12.asm20
-rwxr-xr-xengine/predefs17.asm4
-rwxr-xr-xengine/save.asm96
-rwxr-xr-xengine/slot_machine.asm12
-rwxr-xr-xengine/titlescreen.asm46
-rwxr-xr-xengine/titlescreen2.asm4
-rwxr-xr-xengine/town_map.asm40
-rwxr-xr-xengine/trade.asm2
-rw-r--r--home.asm218
-rw-r--r--home/audio.asm20
-rw-r--r--home/init.asm2
-rw-r--r--home/overworld.asm26
-rw-r--r--home/pic.asm16
-rw-r--r--home/predef.asm6
-rw-r--r--home/serial.asm624
-rw-r--r--home/text.asm8
-rw-r--r--macros.asm6
-rwxr-xr-xmain.asm148
-rwxr-xr-xscripts/agatha.asm29
-rwxr-xr-xscripts/battlecenterm.asm6
-rw-r--r--scripts/beach_house.asm12
-rwxr-xr-xscripts/bikeshop.asm28
-rwxr-xr-xscripts/billshouse.asm41
-rwxr-xr-xscripts/blueshouse.asm2
-rwxr-xr-xscripts/bruno.asm29
-rwxr-xr-xscripts/celadoncity.asm8
-rwxr-xr-xscripts/celadondiner.asm12
-rwxr-xr-xscripts/celadongamecorner.asm162
-rwxr-xr-xscripts/celadongym.asm100
-rwxr-xr-xscripts/celadonmansion1.asm6
-rwxr-xr-xscripts/celadonmansion3.asm4
-rwxr-xr-xscripts/celadonmansion5.asm6
-rwxr-xr-xscripts/celadonmart3.asm12
-rwxr-xr-xscripts/celadonmartelevator.asm8
-rwxr-xr-xscripts/celadonmartroof.asm42
-rwxr-xr-xscripts/ceruleancity.asm76
-rwxr-xr-xscripts/ceruleancity2.asm2
-rwxr-xr-xscripts/ceruleangym.asm62
-rwxr-xr-xscripts/ceruleanhouse1.asm2
-rwxr-xr-xscripts/ceruleanhouse2.asm6
-rwxr-xr-xscripts/ceruleanhousetrashed.asm10
-rwxr-xr-xscripts/cinnabargym.asm84
-rwxr-xr-xscripts/copycatshouse1f.asm2
-rwxr-xr-xscripts/copycatshouse2f.asm24
-rwxr-xr-xscripts/daycarem.asm6
-rwxr-xr-xscripts/fanclub.asm10
-rwxr-xr-xscripts/fightingdojo.asm58
-rwxr-xr-xscripts/fuchsiacity.asm28
-rwxr-xr-xscripts/fuchsiagym.asm128
-rwxr-xr-xscripts/fuchsiahouse2.asm36
-rwxr-xr-xscripts/fuchsiahouse3.asm6
-rwxr-xr-xscripts/gary.asm18
-rwxr-xr-xscripts/halloffameroom.asm2
-rwxr-xr-xscripts/lab2.asm8
-rwxr-xr-xscripts/lab3.asm12
-rwxr-xr-xscripts/lab4.asm18
-rwxr-xr-xscripts/lance.asm20
-rwxr-xr-xscripts/lavenderhouse1.asm36
-rwxr-xr-xscripts/lavenderhouse2.asm12
-rwxr-xr-xscripts/lavendermart.asm10
-rwxr-xr-xscripts/lavendertown.asm6
-rwxr-xr-xscripts/lorelei.asm30
-rwxr-xr-xscripts/mansion1.asm26
-rwxr-xr-xscripts/mansion2.asm20
-rwxr-xr-xscripts/mansion3.asm26
-rwxr-xr-xscripts/mansion4.asm24
-rwxr-xr-xscripts/mtmoon1.asm70
-rwxr-xr-xscripts/mtmoon3.asm94
-rwxr-xr-xscripts/mtmoonpokecenter.asm28
-rwxr-xr-xscripts/museum1f.asm36
-rwxr-xr-xscripts/namerater.asm20
-rwxr-xr-xscripts/oakslab.asm206
-rwxr-xr-xscripts/pallettown.asm8
-rwxr-xr-xscripts/pewtercity.asm34
-rwxr-xr-xscripts/pewtergym.asm60
-rwxr-xr-xscripts/pewterhouse1.asm2
-rwxr-xr-xscripts/pewtermart.asm4
-rwxr-xr-xscripts/pewterpokecenter.asm21
-rwxr-xr-xscripts/pokemontower2.asm26
-rwxr-xr-xscripts/pokemontower3.asm30
-rwxr-xr-xscripts/pokemontower4.asm30
-rwxr-xr-xscripts/pokemontower5.asm46
-rwxr-xr-xscripts/pokemontower6.asm46
-rwxr-xr-xscripts/pokemontower7.asm48
-rwxr-xr-xscripts/powerplant.asm58
-rwxr-xr-xscripts/redshouse1f.asm12
-rwxr-xr-xscripts/rockethideout1.asm52
-rwxr-xr-xscripts/rockethideout2.asm18
-rwxr-xr-xscripts/rockethideout3.asm22
-rwxr-xr-xscripts/rockethideout4.asm46
-rwxr-xr-xscripts/rockethideoutelevator.asm18
-rwxr-xr-xscripts/rocktunnel1.asm98
-rwxr-xr-xscripts/rocktunnel2.asm80
-rwxr-xr-xscripts/route1.asm18
-rwxr-xr-xscripts/route10.asm60
-rwxr-xr-xscripts/route11.asm100
-rwxr-xr-xscripts/route11gateupstairs.asm24
-rwxr-xr-xscripts/route12.asm80
-rwxr-xr-xscripts/route12gateupstairs.asm32
-rwxr-xr-xscripts/route12house.asm8
-rwxr-xr-xscripts/route13.asm100
-rwxr-xr-xscripts/route14.asm100
-rwxr-xr-xscripts/route15.asm120
-rwxr-xr-xscripts/route15gateupstairs.asm10
-rwxr-xr-xscripts/route16.asm70
-rwxr-xr-xscripts/route16gate.asm12
-rwxr-xr-xscripts/route16gateupstairs.asm14
-rwxr-xr-xscripts/route16house.asm10
-rwxr-xr-xscripts/route17.asm100
-rwxr-xr-xscripts/route18.asm30
-rwxr-xr-xscripts/route18gate.asm12
-rwxr-xr-xscripts/route18gateupstairs.asm14
-rwxr-xr-xscripts/route19.asm100
-rwxr-xr-xscripts/route20.asm108
-rwxr-xr-xscripts/route21.asm90
-rwxr-xr-xscripts/route22.asm94
-rwxr-xr-xscripts/route22gate.asm20
-rwxr-xr-xscripts/route23.asm32
-rwxr-xr-xscripts/route24.asm80
-rwxr-xr-xscripts/route25.asm90
-rwxr-xr-xscripts/route2gate.asm18
-rwxr-xr-xscripts/route2house.asm2
-rwxr-xr-xscripts/route3.asm80
-rwxr-xr-xscripts/route4.asm10
-rwxr-xr-xscripts/route5gate.asm16
-rwxr-xr-xscripts/route6.asm60
-rwxr-xr-xscripts/route6gate.asm2
-rwxr-xr-xscripts/route7gate.asm2
-rwxr-xr-xscripts/route8.asm90
-rwxr-xr-xscripts/route8gate.asm2
-rwxr-xr-xscripts/route9.asm108
-rwxr-xr-xscripts/safarizoneentrance.asm24
-rwxr-xr-xscripts/safarizonesecrethouse.asm12
-rwxr-xr-xscripts/saffrongym.asm112
-rwxr-xr-xscripts/saffronhouse1.asm2
-rwxr-xr-xscripts/saffronhouse2.asm12
-rwxr-xr-xscripts/seafoamislands1.asm6
-rwxr-xr-xscripts/seafoamislands2.asm6
-rwxr-xr-xscripts/seafoamislands3.asm6
-rwxr-xr-xscripts/seafoamislands4.asm8
-rwxr-xr-xscripts/seafoamislands5.asm12
-rwxr-xr-xscripts/silphco10.asm24
-rwxr-xr-xscripts/silphco11.asm60
-rwxr-xr-xscripts/silphco2.asm52
-rwxr-xr-xscripts/silphco3.asm28
-rwxr-xr-xscripts/silphco4.asm42
-rwxr-xr-xscripts/silphco5.asm52
-rwxr-xr-xscripts/silphco6.asm44
-rwxr-xr-xscripts/silphco7.asm80
-rwxr-xr-xscripts/silphco8.asm38
-rwxr-xr-xscripts/silphco9.asm42
-rwxr-xr-xscripts/silphcoelevator.asm8
-rwxr-xr-xscripts/ssanne10.asm62
-rwxr-xr-xscripts/ssanne2.asm20
-rwxr-xr-xscripts/ssanne5.asm22
-rwxr-xr-xscripts/ssanne6.asm18
-rwxr-xr-xscripts/ssanne7.asm22
-rwxr-xr-xscripts/ssanne8.asm42
-rwxr-xr-xscripts/ssanne9.asm54
-rwxr-xr-xscripts/undergroundpathentranceroute5.asm2
-rwxr-xr-xscripts/undergroundpathentranceroute7copy.asm20
-rwxr-xr-xscripts/unknowndungeon3.asm12
-rwxr-xr-xscripts/vermilioncity.asm50
-rwxr-xr-xscripts/vermiliondock.asm18
-rwxr-xr-xscripts/vermiliongym.asm72
-rwxr-xr-xscripts/vermilionhouse1.asm2
-rwxr-xr-xscripts/vermilionhouse2.asm6
-rwxr-xr-xscripts/vermilionhouse3.asm2
-rwxr-xr-xscripts/victoryroad1.asm22
-rwxr-xr-xscripts/victoryroad2.asm66
-rwxr-xr-xscripts/victoryroad3.asm48
-rwxr-xr-xscripts/viridiancity.asm56
-rwxr-xr-xscripts/viridianforest.asm30
-rwxr-xr-xscripts/viridiangym.asm120
-rwxr-xr-xscripts/viridianhouse.asm2
-rwxr-xr-xscripts/viridianmart.asm8
-rw-r--r--sram.asm36
-rw-r--r--text.asm4
-rw-r--r--text/maps/agatha.asm2
-rw-r--r--text/maps/bruno.asm2
-rw-r--r--text/maps/fuchsia_gym_1.asm4
-rw-r--r--text/maps/fuchsia_gym_2.asm8
-rw-r--r--text/maps/lorelei.asm2
-rw-r--r--text/maps/underground_path_route_7_entrance_unused.asm8
-rwxr-xr-xwram.asm360
672 files changed, 5278 insertions, 5609 deletions
diff --git a/audio.asm b/audio.asm
index 8b2ee0e3..aaf4f8ed 100644
--- a/audio.asm
+++ b/audio.asm
@@ -443,7 +443,7 @@ Music_Cities1AlternateTempo:: ; 0x9b81
ld [wcfc9], a
ld a, $ff
ld [wMusicHeaderPointer], a
- ld c, $64
+ ld c, 100
call DelayFrames
ld c, BANK(Music_Cities1)
ld a, MUSIC_CITIES1
@@ -557,7 +557,7 @@ Music8_OverwriteChannelPointer: ; 2231d (8:631d)
SECTION "Audio Engine 3", ROMX, BANK[AUDIO_3]
-Func_7d13b:: ; 7d13b (1f:513b)
+PlayPokedexRatingSfx:: ; 7d13b (1f:513b)
ld a, [$ffdc]
ld c, $0
ld hl, OwnedMonValues
diff --git a/audio/engine_1.asm b/audio/engine_1.asm
index 8343074a..fd74b16d 100644
--- a/audio/engine_1.asm
+++ b/audio/engine_1.asm
@@ -141,14 +141,14 @@ Music2_ApplyMusicAffects: ; 0x9138
.done
ld d, a
ld b, $3
- call Func_9838
+ call Music2_9838
ld [hl], d
ret
; this routine executes all music commands that take up no time,
; like tempo changes, duty changes etc. and doesn't return
; until the first note is reached
-Music2_PlayNextNote ; 0x91d0
+Music2_PlayNextNote: ; 0x91d0
ld hl, wc06e
add hl, bc
ld a, [hl]
@@ -238,7 +238,7 @@ Music2_endchannel: ; 0x91e6
ld a, c
cp CH4
jr z, .asm_9265
- call Func_96c7
+ call Music2_96c7
ret c
.asm_9265
ld a, [wc005]
@@ -431,7 +431,7 @@ Music2_pitchbend: ; 0x936d
ld b, a
ld a, d
and $f
- call Func_9858
+ call Music2_9858
ld b, $0
ld hl, wc0a6
add hl, bc
@@ -497,12 +497,12 @@ Music2_stereopanning: ; 0x93fa
jp Music2_endchannel
; this appears to never be used
-Music2_unknownmusic0xef ; 0x9407
+Music2_unknownmusic0xef: ; 0x9407
cp $ef ; is this command an unknownmusic0xef?
jr nz, Music2_dutycycle ; no
call Music2_GetNextMusicByte ; yes
push bc
- call Func_9876
+ call Music2_9876
pop bc
ld a, [wc003]
and a
@@ -579,12 +579,12 @@ Music2_unknownsfx0x20: ; 0x9472
or d
ld d, a
ld b, $1
- call Func_9838
+ call Music2_9838
ld [hl], d
call Music2_GetNextMusicByte
ld d, a
ld b, $2
- call Func_9838
+ call Music2_9838
ld [hl], d
call Music2_GetNextMusicByte
ld e, a
@@ -598,10 +598,10 @@ Music2_unknownsfx0x20: ; 0x9472
.sfxNoiseChannel
ld d, a
push de
- call Func_9629
- call Func_95f8
+ call Music2_9629
+ call Music2_95f8
pop de
- call Func_964b
+ call Music2_964b
ret
Music2_unknownsfx0x10:
@@ -651,7 +651,7 @@ asm_94fd
and a
jr nz, .asm_9508
ld a, d
- call Func_9876
+ call Music2_9876
.asm_9508
pop bc
pop de
@@ -668,7 +668,7 @@ Music2_notelength: ; 0x950a
add hl, bc
ld a, [hl]
ld l, b
- call Func_9847
+ call Music2_9847
ld a, c
cp CH4
jr nc, .sfxChannel
@@ -682,7 +682,7 @@ Music2_notelength: ; 0x950a
ld e, $0
cp CH7
jr z, .skip ; if noise channel
- call Func_9693
+ call Music2_9693
ld a, [wc0ea]
ld d, a
ld a, [wc0eb]
@@ -693,7 +693,7 @@ Music2_notelength: ; 0x950a
ld hl, wc0ce
add hl, bc
ld l, [hl]
- call Func_9847
+ call Music2_9847
ld e, l
ld d, h
ld hl, wc0ce
@@ -744,7 +744,7 @@ Music2_notepitch: ; 0x9568
jr .done
.notSfxChannel3
ld b, $2
- call Func_9838
+ call Music2_9838
ld a, $8
ld [hli], a
inc hl
@@ -758,13 +758,13 @@ Music2_notepitch: ; 0x9568
ld hl, wc0d6
add hl, bc
ld b, [hl]
- call Func_9858
+ call Music2_9858
ld b, $0
ld hl, wc02e
add hl, bc
bit 4, [hl]
jr z, .asm_95b8
- call Func_978f
+ call Music2_978f
.asm_95b8
push de
ld a, c
@@ -787,10 +787,10 @@ Music2_notepitch: ; 0x9568
add hl, bc
ld d, [hl]
ld b, $2
- call Func_9838
+ call Music2_9838
ld [hl], d
- call Func_9629
- call Func_95f8
+ call Music2_9629
+ call Music2_95f8
pop de
ld b, $0
ld hl, wc02e
@@ -804,10 +804,10 @@ Music2_notepitch: ; 0x9568
ld hl, wc066
add hl, bc
ld [hl], e
- call Func_964b
+ call Music2_964b
ret
-Func_95f8: ; 0x95f8
+Music2_95f8: ; 0x95f8
ld b, $0
ld hl, Unknown_9b27
add hl, bc
@@ -841,7 +841,7 @@ Func_95f8: ; 0x95f8
ld [$ff25], a
ret
-Func_9629: ; 0x9629
+Music2_9629: ; 0x9629
ld b, $0
ld hl, wc0b6
add hl, bc
@@ -861,11 +861,11 @@ Func_9629: ; 0x9629
ld d, a
.channel3
ld b, $1
- call Func_9838
+ call Music2_9838
ld [hl], d
ret
-Func_964b: ; 0x964b
+Music2_964b: ; 0x964b
ld a, c
cp CH2
jr z, .channel3
@@ -909,15 +909,15 @@ Func_964b: ; 0x964b
and $c7
ld d, a
ld b, $3
- call Func_9838
+ call Music2_9838
ld [hl], e
inc hl
ld [hl], d
- call Func_96b5
+ call Music2_96b5
ret
-Func_9693: ; 0x9693
- call Func_96e5
+Music2_9693: ; 0x9693
+ call Music2_96e5
jr nc, .asm_96ab
ld d, $0
ld a, [wc0f2]
@@ -937,8 +937,8 @@ Func_9693: ; 0x9693
.asm_96b4
ret
-Func_96b5: ; 0x96b5
- call Func_96e5
+Music2_96b5: ; 0x96b5
+ call Music2_96e5
jr nc, .asm_96c6
ld a, [wc0f1]
add e
@@ -953,8 +953,8 @@ Func_96b5: ; 0x96b5
.asm_96c6
ret
-Func_96c7: ; 0x96c7
- call Func_96e5
+Music2_96c7: ; 0x96c7
+ call Music2_96e5
jr nc, .asm_96e2
ld hl, wc006
ld e, c
@@ -976,7 +976,7 @@ Func_96c7: ; 0x96c7
ccf
ret
-Func_96e5: ; 0x96e5
+Music2_96e5: ; 0x96e5
ld a, [wc02a]
cp $14
jr nc, .asm_96ee
@@ -1083,7 +1083,7 @@ Music2_ApplyPitchBend: ; 0x96f9
add hl, bc
ld [hl], d
ld b, $3
- call Func_9838
+ call Music2_9838
ld a, e
ld [hli], a
ld [hl], d
@@ -1095,7 +1095,7 @@ Music2_ApplyPitchBend: ; 0x96f9
res 5, [hl]
ret
-Func_978f: ; 0x978f
+Music2_978f: ; 0x978f
ld hl, wc096
add hl, bc
ld [hl], d
@@ -1195,7 +1195,7 @@ Music2_ApplyDutyCycle: ; 0x980d
and $c0
ld d, a
ld b, $1
- call Func_9838
+ call Music2_9838
ld a, [hl]
and $3f
or d
@@ -1220,7 +1220,7 @@ Music2_GetNextMusicByte: ; 0x9825
ld [hl], d
ret
-Func_9838: ; 0x9838
+Music2_9838: ; 0x9838
ld a, c
ld hl, Unknown_9b17
add l
@@ -1234,7 +1234,7 @@ Func_9838: ; 0x9838
ld h, $ff
ret
-Func_9847: ; 0x9847
+Music2_9847: ; 0x9847
ld h, $0
.loop
srl a
@@ -1249,7 +1249,7 @@ Func_9847: ; 0x9847
.done
ret
-Func_9858: ; 0x9858
+Music2_9858: ; 0x9858
ld h, $0
ld l, a
add hl, hl
@@ -1274,16 +1274,16 @@ Func_9858: ; 0x9858
ld d, a
ret
-Func_9876:: ; 0x9876
+Music2_9876:: ; 0x9876
ld [wc001], a
cp $ff
- jp z, Func_9a34
+ jp z, Music2_9a34
cp $b9
- jp z, Func_994e
- jp c, Func_994e
+ jp z, Music2_994e
+ jp c, Music2_994e
cp $fe
jr z, .asm_988d
- jp nc, Func_994e
+ jp nc, Music2_994e
.asm_988d
xor a
ld [wc000], a
@@ -1355,9 +1355,9 @@ Func_9876:: ; 0x9876
ld [$ff1a], a
ld a, $77
ld [$ff24], a
- jp Func_9a8f
+ jp Music2_9a8f
-Func_994e: ; 0x994e
+Music2_994e: ; 0x994e
ld l, a
ld e, a
ld h, $0
@@ -1504,11 +1504,11 @@ Func_994e: ; 0x994e
.asm_9a2b
ld a, c
and a
- jp z, Func_9a8f
+ jp z, Music2_9a8f
dec c
jp .asm_9967
-Func_9a34: ; 0x9a34
+Music2_9a34: ; 0x9a34
ld a, $80
ld [$ff26], a
ld [$ff1a], a
@@ -1556,7 +1556,7 @@ FillMusicRAM2: ; 0x9a89
jr nz, .loop
ret
-Func_9a8f: ; 0x9a8f
+Music2_9a8f: ; 0x9a8f
ld a, [wc001]
ld l, a
ld e, a
diff --git a/audio/engine_2.asm b/audio/engine_2.asm
index 067ecc0c..5940b55a 100644
--- a/audio/engine_2.asm
+++ b/audio/engine_2.asm
@@ -141,7 +141,7 @@ Music8_ApplyMusicAffects: ; 218ae (8:58ae)
.done
ld d, a
ld b, $3
- call Func_21ff7
+ call Music8_21ff7
ld [hl], d
ret
@@ -245,7 +245,7 @@ Music8_endchannel: ; 21967 (8:5967)
ld a, c
cp CH4
jr z, .asm_219e6
- call Func_21e6d
+ call Music8_21e6d
ret c
.asm_219e6
ld a, [wc005]
@@ -438,7 +438,7 @@ Music8_pitchbend: ; 21aee (8:5aee)
ld b, a
ld a, d
and $f
- call Func_22017
+ call Music8_22017
ld b, $0
ld hl, wc0a6
add hl, bc
@@ -509,7 +509,7 @@ Music8_unknownmusic0xef: ; 21b88 (8:5b88)
jr nz, Music8_dutycycle ; no
call Music8_GetNextMusicByte ; yes
push bc
- call Func_22035
+ call Music8_22035
pop bc
ld a, [wc003]
and a
@@ -586,12 +586,12 @@ Music8_unknownsfx0x20: ; 21bf3
or d
ld d, a
ld b, $1
- call Func_21ff7
+ call Music8_21ff7
ld [hl], d
call Music8_GetNextMusicByte
ld d, a
ld b, $2
- call Func_21ff7
+ call Music8_21ff7
ld [hl], d
call Music8_GetNextMusicByte
ld e, a
@@ -605,10 +605,10 @@ Music8_unknownsfx0x20: ; 21bf3
.sfxNoiseChannel
ld d, a
push de
- call Func_21daa
- call Func_21d79
+ call Music8_21daa
+ call Music8_21d79
pop de
- call Func_21dcc
+ call Music8_21dcc
ret
Music8_unknownsfx0x10: ; 21c40 (8:5c40)
@@ -658,7 +658,7 @@ asm_21c7e
and a
jr nz, .asm_21c89
ld a, d
- call Func_22035
+ call Music8_22035
.asm_21c89
pop bc
pop de
@@ -675,7 +675,7 @@ Music8_notelength: ; 21c8b (8:5c8b)
add hl, bc
ld a, [hl]
ld l, b
- call Func_22006
+ call Music8_22006
ld a, c
cp CH4
jr nc, .sfxChannel
@@ -689,7 +689,7 @@ Music8_notelength: ; 21c8b (8:5c8b)
ld e, $0
cp CH7
jr z, .skip ; if noise channel
- call Func_21e2f
+ call Music8_21e2f
ld a, [wc0ea]
ld d, a
ld a, [wc0eb]
@@ -700,7 +700,7 @@ Music8_notelength: ; 21c8b (8:5c8b)
ld hl, wc0ce
add hl, bc
ld l, [hl]
- call Func_22006
+ call Music8_22006
ld e, l
ld d, h
ld hl, wc0ce
@@ -751,7 +751,7 @@ Music8_notepitch: ; 21ce9 (8:5ce9)
jr .done
.notSfxChannel3
ld b, $2
- call Func_21ff7
+ call Music8_21ff7
ld a, $8
ld [hli], a
inc hl
@@ -765,13 +765,13 @@ Music8_notepitch: ; 21ce9 (8:5ce9)
ld hl, wc0d6
add hl, bc
ld b, [hl]
- call Func_22017
+ call Music8_22017
ld b, $0
ld hl, wc02e
add hl, bc
bit 4, [hl]
jr z, .asm_21d39
- call Func_21f4e
+ call Music8_21f4e
.asm_21d39
push de
ld a, c
@@ -794,10 +794,10 @@ Music8_notepitch: ; 21ce9 (8:5ce9)
add hl, bc
ld d, [hl]
ld b, $2
- call Func_21ff7
+ call Music8_21ff7
ld [hl], d
- call Func_21daa
- call Func_21d79
+ call Music8_21daa
+ call Music8_21d79
pop de
ld b, $0
ld hl, wc02e
@@ -811,10 +811,10 @@ Music8_notepitch: ; 21ce9 (8:5ce9)
ld hl, wc066
add hl, bc
ld [hl], e
- call Func_21dcc
+ call Music8_21dcc
ret
-Func_21d79: ; 21d79 (8:5d79)
+Music8_21d79: ; 21d79 (8:5d79)
ld b, $0
ld hl, Unknown_222e6
add hl, bc
@@ -848,7 +848,7 @@ Func_21d79: ; 21d79 (8:5d79)
ld [$ff25], a
ret
-Func_21daa: ; 21daa (8:5daa)
+Music8_21daa: ; 21daa (8:5daa)
ld b, $0
ld hl, wc0b6
add hl, bc
@@ -868,11 +868,11 @@ Func_21daa: ; 21daa (8:5daa)
ld d, a
.channel3
ld b, $1
- call Func_21ff7
+ call Music8_21ff7
ld [hl], d
ret
-Func_21dcc: ; 21dcc (8:5dcc)
+Music8_21dcc: ; 21dcc (8:5dcc)
ld a, c
cp CH2
jr z, .channel3
@@ -916,18 +916,18 @@ Func_21dcc: ; 21dcc (8:5dcc)
and $c7
ld d, a
ld b, $3
- call Func_21ff7
+ call Music8_21ff7
ld [hl], e
inc hl
ld [hl], d
ld a, c
cp CH4
jr c, .musicChannel
- call Func_21e56
+ call Music8_21e56
.musicChannel
ret
-Func_21e19: ; 21e19 (8:5e19)
+Music8_21e19: ; 21e19 (8:5e19)
ld a, c
cp CH4
jr nz, .asm_21e2e
@@ -941,10 +941,10 @@ Func_21e19: ; 21e19 (8:5e19)
.asm_21e2e
ret
-Func_21e2f: ; 21e2f (8:5e2f)
- call Func_21e8b
+Music8_21e2f: ; 21e2f (8:5e2f)
+ call Music8_21e8b
jr c, .asm_21e39
- call Func_21e9f
+ call Music8_21e9f
jr nc, .asm_21e4c
.asm_21e39
ld d, $0
@@ -965,10 +965,10 @@ Func_21e2f: ; 21e2f (8:5e2f)
.asm_21e55
ret
-Func_21e56: ; 21e56 (8:5e56)
- call Func_21e8b
+Music8_21e56: ; 21e56 (8:5e56)
+ call Music8_21e8b
jr c, .asm_21e60
- call Func_21e9f
+ call Music8_21e9f
jr nc, .asm_21e6c
.asm_21e60
ld a, [wc0f1]
@@ -984,8 +984,8 @@ Func_21e56: ; 21e56 (8:5e56)
.asm_21e6c
ret
-Func_21e6d: ; 21e6d (8:5e6d)
- call Func_21e8b
+Music8_21e6d: ; 21e6d (8:5e6d)
+ call Music8_21e8b
jr nc, .asm_21e88
ld hl, wc006
ld e, c
@@ -1007,7 +1007,7 @@ Func_21e6d: ; 21e6d (8:5e6d)
ccf
ret
-Func_21e8b: ; 21e8b (8:5e8b)
+Music8_21e8b: ; 21e8b (8:5e8b)
ld a, [wc02a]
cp $14
jr nc, .asm_21e94
@@ -1024,7 +1024,7 @@ Func_21e8b: ; 21e8b (8:5e8b)
scf
ret
-Func_21e9f: ; 21e9f (8:5e9f)
+Music8_21e9f: ; 21e9f (8:5e9f)
ld a, [wc02d]
ld b, a
ld a, [wc02a]
@@ -1134,7 +1134,7 @@ Music8_ApplyPitchBend: ; 21eb8 (8:5eb8)
add hl, bc
ld [hl], d
ld b, $3
- call Func_21ff7
+ call Music8_21ff7
ld a, e
ld [hli], a
ld [hl], d
@@ -1146,7 +1146,7 @@ Music8_ApplyPitchBend: ; 21eb8 (8:5eb8)
res 5, [hl]
ret
-Func_21f4e: ; 21f4e (8:5f4e)
+Music8_21f4e: ; 21f4e (8:5f4e)
ld hl, wc096
add hl, bc
ld [hl], d
@@ -1246,7 +1246,7 @@ Music8_ApplyDutyCycle: ; 21fcc (8:5fcc)
and $c0
ld d, a
ld b, $1
- call Func_21ff7
+ call Music8_21ff7
ld a, [hl]
and $3f
or d
@@ -1271,7 +1271,7 @@ Music8_GetNextMusicByte: ; 21fe4 (8:5fe4)
ld [hl], d
ret
-Func_21ff7: ; 21ff7 (8:5ff7)
+Music8_21ff7: ; 21ff7 (8:5ff7)
ld a, c
ld hl, Unknown_222d6
add l
@@ -1285,7 +1285,7 @@ Func_21ff7: ; 21ff7 (8:5ff7)
ld h, $ff
ret
-Func_22006: ; 22006 (8:6006)
+Music8_22006: ; 22006 (8:6006)
ld h, $0
.loop
srl a
@@ -1300,7 +1300,7 @@ Func_22006: ; 22006 (8:6006)
.done
ret
-Func_22017: ; 22017 (8:6017)
+Music8_22017: ; 22017 (8:6017)
ld h, $0
ld l, a
add hl, hl
@@ -1325,16 +1325,16 @@ Func_22017: ; 22017 (8:6017)
ld d, a
ret
-Func_22035:: ; 22035 (8:6035)
+Music8_22035:: ; 22035 (8:6035)
ld [wc001], a
cp $ff
- jp z, Func_221f3
+ jp z, Music8_221f3
cp $e9
- jp z, Func_2210d
- jp c, Func_2210d
+ jp z, Music8_2210d
+ jp c, Music8_2210d
cp $fe
jr z, .asm_2204c
- jp nc, Func_2210d
+ jp nc, Music8_2210d
.asm_2204c
xor a
ld [wc000], a
@@ -1406,9 +1406,9 @@ Func_22035:: ; 22035 (8:6035)
ld [$ff1a], a
ld a, $77
ld [$ff24], a
- jp Func_2224e
+ jp Music8_2224e
-Func_2210d: ; 2210d (8:610d)
+Music8_2210d: ; 2210d (8:610d)
ld l, a
ld e, a
ld h, $0
@@ -1555,11 +1555,11 @@ Func_2210d: ; 2210d (8:610d)
.asm_221ea
ld a, c
and a
- jp z, Func_2224e
+ jp z, Music8_2224e
dec c
jp .asm_22126
-Func_221f3: ; 221f3 (8:61f3)
+Music8_221f3: ; 221f3 (8:61f3)
ld a, $80
ld [$ff26], a
ld [$ff1a], a
@@ -1607,7 +1607,7 @@ FillMusicRAM8: ; 22248 (8:6248)
jr nz, .loop
ret
-Func_2224e: ; 2224e (8:624e)
+Music8_2224e: ; 2224e (8:624e)
ld a, [wc001]
ld l, a
ld e, a
diff --git a/audio/engine_3.asm b/audio/engine_3.asm
index fabdecef..718b6016 100644
--- a/audio/engine_3.asm
+++ b/audio/engine_3.asm
@@ -141,7 +141,7 @@ Music1f_ApplyMusicAffects: ; 7d1ac (1f:51ac)
.done
ld d, a
ld b, $3
- call Func_7d8ac
+ call Music1f_7d8ac
ld [hl], d
ret
@@ -238,7 +238,7 @@ Music1f_endchannel: ; 7d25a (1f:525a)
ld a, c
cp CH4
jr z, .asm_7d2d9
- call Func_7d73b
+ call Music1f_7d73b
ret c
.asm_7d2d9
ld a, [wc005]
@@ -431,7 +431,7 @@ Music1f_pitchbend: ; 7d3e1 (1f:53e1)
ld b, a
ld a, d
and $f
- call Func_7d8cc
+ call Music1f_7d8cc
ld b, $0
ld hl, wc0a6
add hl, bc
@@ -502,7 +502,7 @@ Music1f_unknownmusic0xef: ; 7d47b (1f:547b)
jr nz, Music1f_dutycycle ; no
call Music1f_GetNextMusicByte ; yes
push bc
- call Func_7d8ea
+ call Music1f_7d8ea
pop bc
ld a, [wc003]
and a
@@ -579,12 +579,12 @@ Music1f_unknownsfx0x20: ; 7d4e6 (1f:54e6)
or d
ld d, a
ld b, $1
- call Func_7d8ac
+ call Music1f_7d8ac
ld [hl], d
call Music1f_GetNextMusicByte
ld d, a
ld b, $2
- call Func_7d8ac
+ call Music1f_7d8ac
ld [hl], d
call Music1f_GetNextMusicByte
ld e, a
@@ -598,13 +598,13 @@ Music1f_unknownsfx0x20: ; 7d4e6 (1f:54e6)
.sfxNoiseChannel
ld d, a
push de
- call Func_7d69d
- call Func_7d66c
+ call Music1f_7d69d
+ call Music1f_7d66c
pop de
- call Func_7d6bf
+ call Music1f_7d6bf
ret
-Music1f_unknownsfx0x10 ; 7d533 (1f:5533)
+Music1f_unknownsfx0x10: ; 7d533 (1f:5533)
ld a, c
cp CH4
jr c, Music1f_note ; if not a sfx
@@ -651,7 +651,7 @@ asm_7d571
and a
jr nz, .asm_7d57c
ld a, d
- call Func_7d8ea
+ call Music1f_7d8ea
.asm_7d57c
pop bc
pop de
@@ -668,7 +668,7 @@ Music1f_notelength: ; 7d57e (1f:557e)
add hl, bc
ld a, [hl]
ld l, b
- call Func_7d8bb
+ call Music1f_7d8bb
ld a, c
cp CH4
jr nc, .sfxChannel
@@ -682,7 +682,7 @@ Music1f_notelength: ; 7d57e (1f:557e)
ld e, $0
cp CH7
jr z, .skip ; if noise channel
- call Func_7d707
+ call Music1f_7d707
ld a, [wc0ea]
ld d, a
ld a, [wc0eb]
@@ -693,7 +693,7 @@ Music1f_notelength: ; 7d57e (1f:557e)
ld hl, wc0ce
add hl, bc
ld l, [hl]
- call Func_7d8bb
+ call Music1f_7d8bb
ld e, l
ld d, h
ld hl, wc0ce
@@ -744,7 +744,7 @@ Music1f_notepitch: ; 7d5dc (1f:55dc)
jr .quit
.notSfxChannel3
ld b, $2
- call Func_7d8ac
+ call Music1f_7d8ac
ld a, $8
ld [hli], a
inc hl
@@ -758,13 +758,13 @@ Music1f_notepitch: ; 7d5dc (1f:55dc)
ld hl, wc0d6
add hl, bc
ld b, [hl]
- call Func_7d8cc
+ call Music1f_7d8cc
ld b, $0
ld hl, wc02e
add hl, bc
bit 4, [hl]
jr z, .asm_7d62c
- call Func_7d803
+ call Music1f_7d803
.asm_7d62c
push de
ld a, c
@@ -787,10 +787,10 @@ Music1f_notepitch: ; 7d5dc (1f:55dc)
add hl, bc
ld d, [hl]
ld b, $2
- call Func_7d8ac
+ call Music1f_7d8ac
ld [hl], d
- call Func_7d69d
- call Func_7d66c
+ call Music1f_7d69d
+ call Music1f_7d66c
pop de
ld b, $0
ld hl, wc02e
@@ -804,10 +804,10 @@ Music1f_notepitch: ; 7d5dc (1f:55dc)
ld hl, wc066
add hl, bc
ld [hl], e
- call Func_7d6bf
+ call Music1f_7d6bf
ret
-Func_7d66c: ; 7d66c (1f:566c)
+Music1f_7d66c: ; 7d66c (1f:566c)
ld b, $0
ld hl, Unknown_7db9b
add hl, bc
@@ -841,7 +841,7 @@ Func_7d66c: ; 7d66c (1f:566c)
ld [$ff25], a
ret
-Func_7d69d: ; 7d69d (1f:569d)
+Music1f_7d69d: ; 7d69d (1f:569d)
ld b, $0
ld hl, wc0b6
add hl, bc
@@ -861,11 +861,11 @@ Func_7d69d: ; 7d69d (1f:569d)
ld d, a
.channel3
ld b, $1
- call Func_7d8ac
+ call Music1f_7d8ac
ld [hl], d
ret
-Func_7d6bf: ; 7d6bf (1f:56bf)
+Music1f_7d6bf: ; 7d6bf (1f:56bf)
ld a, c
cp CH2
jr z, .channel3
@@ -909,15 +909,15 @@ Func_7d6bf: ; 7d6bf (1f:56bf)
and $c7
ld d, a
ld b, $3
- call Func_7d8ac
+ call Music1f_7d8ac
ld [hl], e
inc hl
ld [hl], d
- call Func_7d729
+ call Music1f_7d729
ret
-Func_7d707: ; 7d707 (1f:5707)
- call Func_7d759
+Music1f_7d707: ; 7d707 (1f:5707)
+ call Music1f_7d759
jr nc, .asm_7d71f
ld d, $0
ld a, [wc0f2]
@@ -937,8 +937,8 @@ Func_7d707: ; 7d707 (1f:5707)
.asm_7d728
ret
-Func_7d729: ; 7d729 (1f:5729)
- call Func_7d759
+Music1f_7d729: ; 7d729 (1f:5729)
+ call Music1f_7d759
jr nc, .asm_7d73a
ld a, [wc0f1]
add e
@@ -953,8 +953,8 @@ Func_7d729: ; 7d729 (1f:5729)
.asm_7d73a
ret
-Func_7d73b: ; 7d73b (1f:573b)
- call Func_7d759
+Music1f_7d73b: ; 7d73b (1f:573b)
+ call Music1f_7d759
jr nc, .asm_7d756
ld hl, wc006
ld e, c
@@ -976,7 +976,7 @@ Func_7d73b: ; 7d73b (1f:573b)
ccf
ret
-Func_7d759: ; 7d759 (1f:5759)
+Music1f_7d759: ; 7d759 (1f:5759)
ld a, [wc02a]
cp $14
jr nc, .asm_7d762
@@ -1083,7 +1083,7 @@ Music1f_ApplyPitchBend: ; 7d76d (1f:576d)
add hl, bc
ld [hl], d
ld b, $3
- call Func_7d8ac
+ call Music1f_7d8ac
ld a, e
ld [hli], a
ld [hl], d
@@ -1095,7 +1095,7 @@ Music1f_ApplyPitchBend: ; 7d76d (1f:576d)
res 5, [hl]
ret
-Func_7d803: ; 7d803 (1f:5803)
+Music1f_7d803: ; 7d803 (1f:5803)
ld hl, wc096
add hl, bc
ld [hl], d
@@ -1195,7 +1195,7 @@ Music1f_ApplyDutyCycle: ; 7d881 (1f:5881)
and $c0
ld d, a
ld b, $1
- call Func_7d8ac
+ call Music1f_7d8ac
ld a, [hl]
and $3f
or d
@@ -1220,7 +1220,7 @@ Music1f_GetNextMusicByte: ; 7d899 (1f:5899)
ld [hl], d
ret
-Func_7d8ac: ; 7d8ac (1f:58ac)
+Music1f_7d8ac: ; 7d8ac (1f:58ac)
ld a, c
ld hl, Unknown_7db8b
add l
@@ -1234,7 +1234,7 @@ Func_7d8ac: ; 7d8ac (1f:58ac)
ld h, $ff
ret
-Func_7d8bb: ; 7d8bb (1f:58bb)
+Music1f_7d8bb: ; 7d8bb (1f:58bb)
ld h, $0
.loop
srl a
@@ -1249,7 +1249,7 @@ Func_7d8bb: ; 7d8bb (1f:58bb)
.done
ret
-Func_7d8cc: ; 7d8cc (1f:58cc)
+Music1f_7d8cc: ; 7d8cc (1f:58cc)
ld h, $0
ld l, a
add hl, hl
@@ -1274,16 +1274,16 @@ Func_7d8cc: ; 7d8cc (1f:58cc)
ld d, a
ret
-Func_7d8ea:: ; 7d8ea (1f:58ea)
+Music1f_7d8ea:: ; 7d8ea (1f:58ea)
ld [wc001], a
cp $ff
- jp z, Func_7daa8
+ jp z, Music1f_7daa8
cp $c2
- jp z, Func_7d9c2
- jp c, Func_7d9c2
+ jp z, Music1f_7d9c2
+ jp c, Music1f_7d9c2
cp $fe
jr z, .asm_7d901
- jp nc, Func_7d9c2
+ jp nc, Music1f_7d9c2
.asm_7d901
xor a
ld [wc000], a
@@ -1355,9 +1355,9 @@ Func_7d8ea:: ; 7d8ea (1f:58ea)
ld [$ff1a], a
ld a, $77
ld [$ff24], a
- jp Func_7db03
+ jp Music1f_7db03
-Func_7d9c2: ; 7d9c2 (1f:59c2)
+Music1f_7d9c2: ; 7d9c2 (1f:59c2)
ld l, a
ld e, a
ld h, $0
@@ -1504,11 +1504,11 @@ Func_7d9c2: ; 7d9c2 (1f:59c2)
.asm_7da9f
ld a, c
and a
- jp z, Func_7db03
+ jp z, Music1f_7db03
dec c
jp .asm_7d9db
-Func_7daa8: ; 7daa8 (1f:5aa8)
+Music1f_7daa8: ; 7daa8 (1f:5aa8)
ld a, $80
ld [$ff26], a
ld [$ff1a], a
@@ -1556,7 +1556,7 @@ FillMusicRAM1f: ; 7dafd (1f:5afd)
jr nz, .loop
ret
-Func_7db03: ; 7db03 (1f:5b03)
+Music1f_7db03: ; 7db03 (1f:5b03)
ld a, [wc001]
ld l, a
ld e, a
diff --git a/audio/headers/musicheaders02.asm b/audio/headers/musicheaders02.asm
index dd5b4b5b..a6449436 100644..100755
--- a/audio/headers/musicheaders02.asm
+++ b/audio/headers/musicheaders02.asm
@@ -182,5 +182,3 @@ Music_IndigoPlateau:: ; 82f1 (2:42f1)
dw Music_IndigoPlateau_Ch3
db CH3
dw Music_IndigoPlateau_Ch4
-
-; 0x82fd \ No newline at end of file
diff --git a/audio/headers/musicheaders08.asm b/audio/headers/musicheaders08.asm
index b4ef7375..85cf2825 100644..100755
--- a/audio/headers/musicheaders08.asm
+++ b/audio/headers/musicheaders08.asm
@@ -54,4 +54,4 @@ Music_DefeatedGymLeader:: ; 202f4 (8:42f4)
db CH2
dw Music_DefeatedGymLeader_Ch3
-; 202fd \ No newline at end of file
+; 202fd
diff --git a/audio/headers/musicheaders1f.asm b/audio/headers/musicheaders1f.asm
index beb70cf4..7846e48f 100644..100755
--- a/audio/headers/musicheaders1f.asm
+++ b/audio/headers/musicheaders1f.asm
@@ -156,5 +156,3 @@ Music_MeetMaleTrainer:: ; 7c2f4 (1f:42f4)
dw Music_MeetMaleTrainer_Ch2
db CH2
dw Music_MeetMaleTrainer_Ch3
-
-; 0x7c2fd \ No newline at end of file
diff --git a/audio/headers/sfxheaders02.asm b/audio/headers/sfxheaders02.asm
index d1c185c0..b5cff17a 100644..100755
--- a/audio/headers/sfxheaders02.asm
+++ b/audio/headers/sfxheaders02.asm
@@ -560,5 +560,3 @@ SFX_02_5e:: ; 8228 (2:4228)
SFX_02_5f:: ; 822b (2:422b)
db CH4
dw SFX_02_5f_Ch1
-
-; 0x822e \ No newline at end of file
diff --git a/audio/headers/sfxheaders08.asm b/audio/headers/sfxheaders08.asm
index 547c8d4a..311c2877 100644..100755
--- a/audio/headers/sfxheaders08.asm
+++ b/audio/headers/sfxheaders08.asm
@@ -704,5 +704,3 @@ SFX_08_76:: ; 202b2 (8:42b2)
SFX_08_77:: ; 202bb (8:42bb)
db CH4
dw SFX_08_77_Ch1
-
-; 0x202be \ No newline at end of file
diff --git a/audio/headers/sfxheaders1f.asm b/audio/headers/sfxheaders1f.asm
index 4db63a59..52766a76 100644..100755
--- a/audio/headers/sfxheaders1f.asm
+++ b/audio/headers/sfxheaders1f.asm
@@ -594,5 +594,3 @@ SFX_1f_66:: ; 7c240 (1f:4240)
SFX_1f_67:: ; 7c246 (1f:4246)
db CH4
dw SFX_1f_67_Ch1
-
-; 0x7c249 \ No newline at end of file
diff --git a/audio/music/bikeriding.asm b/audio/music/bikeriding.asm
index 662f2fc8..6da2f9d6 100644
--- a/audio/music/bikeriding.asm
+++ b/audio/music/bikeriding.asm
@@ -702,4 +702,3 @@ Music_BikeRiding_branch_7dec2::
triangle3 1
triangle3 1
endchannel
-; 0x7ded1
diff --git a/audio/music/celadon.asm b/audio/music/celadon.asm
index 77dc2ab8..71758fe4 100644
--- a/audio/music/celadon.asm
+++ b/audio/music/celadon.asm
@@ -409,4 +409,3 @@ Music_Celadon_branch_b7c1::
F# 2
E_ 2
loopchannel 0, Music_Celadon_branch_b7c1
-; 0xb86d
diff --git a/audio/music/cinnabar.asm b/audio/music/cinnabar.asm
index 4fcbe842..f3a12c5e 100644
--- a/audio/music/cinnabar.asm
+++ b/audio/music/cinnabar.asm
@@ -352,4 +352,3 @@ Music_Cinnabar_branch_b93f::
C_ 1
rest 1
loopchannel 0, Music_Cinnabar_branch_b93f
-; 0xb9eb
diff --git a/audio/music/cinnabarmansion.asm b/audio/music/cinnabarmansion.asm
index 690fb915..f461ec56 100644
--- a/audio/music/cinnabarmansion.asm
+++ b/audio/music/cinnabarmansion.asm
@@ -170,4 +170,3 @@ Music_CinnabarMansion_branch_7edb5::
rest 8
cymbal3 8
loopchannel 0, Music_CinnabarMansion_branch_7edb5
-; 0x7edda
diff --git a/audio/music/cities1.asm b/audio/music/cities1.asm
index 82754e0e..4b068045 100644
--- a/audio/music/cities1.asm
+++ b/audio/music/cities1.asm
@@ -655,4 +655,3 @@ Music_Cities1_branch_ad6e::
triangle2 2
triangle2 2
endchannel
-; 0xad77
diff --git a/audio/music/cities2.asm b/audio/music/cities2.asm
index 34297e68..e0e4ab5e 100644
--- a/audio/music/cities2.asm
+++ b/audio/music/cities2.asm
@@ -414,4 +414,3 @@ Music_Cities2_branch_b64c::
E_ 2
G# 2
loopchannel 0, Music_Cities2_branch_b64c
-; 0xb6c7
diff --git a/audio/music/credits.asm b/audio/music/credits.asm
index 4c3fa487..803e3d02 100644
--- a/audio/music/credits.asm
+++ b/audio/music/credits.asm
@@ -818,4 +818,3 @@ Music_Credits_branch_7ffed::
A_ 1
rest 3
endchannel
-; 0x7fffa
diff --git a/audio/music/defeatedgymleader.asm b/audio/music/defeatedgymleader.asm
index 96c2b9fc..e3e6a3de 100644
--- a/audio/music/defeatedgymleader.asm
+++ b/audio/music/defeatedgymleader.asm
@@ -605,4 +605,3 @@ Music_DefeatedGymLeader_branch_23e65::
G_ 2
E_ 2
loopchannel 0, Music_DefeatedGymLeader_branch_23e65
-; 0x23f52
diff --git a/audio/music/defeatedtrainer.asm b/audio/music/defeatedtrainer.asm
index 624190f6..015aaaf5 100644
--- a/audio/music/defeatedtrainer.asm
+++ b/audio/music/defeatedtrainer.asm
@@ -264,4 +264,3 @@ Music_DefeatedTrainer_branch_23b24::
octave 4
A_ 3
loopchannel 0, Music_DefeatedTrainer_branch_23b24
-; 0x23b74
diff --git a/audio/music/defeatedwildmon.asm b/audio/music/defeatedwildmon.asm
index 93b4d3ff..6b378400 100644
--- a/audio/music/defeatedwildmon.asm
+++ b/audio/music/defeatedwildmon.asm
@@ -300,4 +300,3 @@ Music_DefeatedWildMon_branch_23c21::
octave 4
D# 4
loopchannel 0, Music_DefeatedWildMon_branch_23c21
-; 0x23cad
diff --git a/audio/music/dungeon1.asm b/audio/music/dungeon1.asm
index e73eb707..ac6b3e07 100644
--- a/audio/music/dungeon1.asm
+++ b/audio/music/dungeon1.asm
@@ -673,4 +673,3 @@ Music_Dungeon1_branch_7e202::
snare8 4
snare9 4
endchannel
-; 0x7e20b
diff --git a/audio/music/dungeon2.asm b/audio/music/dungeon2.asm
index e65de5be..57e1805c 100644
--- a/audio/music/dungeon2.asm
+++ b/audio/music/dungeon2.asm
@@ -315,4 +315,3 @@ Music_Dungeon2_branch_7e9dd::
snare9 4
snare7 4
loopchannel 0, Music_Dungeon2_branch_7e9dd
-; 0x7e9f1
diff --git a/audio/music/dungeon3.asm b/audio/music/dungeon3.asm
index 1bfdb682..796d1e78 100644
--- a/audio/music/dungeon3.asm
+++ b/audio/music/dungeon3.asm
@@ -754,4 +754,3 @@ Music_Dungeon3_Ch4:: ; 7ece4 (1f:6ce4)
rest 16
rest 10
endchannel
-; 0x7ed0f
diff --git a/audio/music/finalbattle.asm b/audio/music/finalbattle.asm
index eabc06ec..7e4eb43b 100644
--- a/audio/music/finalbattle.asm
+++ b/audio/music/finalbattle.asm
@@ -1342,4 +1342,3 @@ Music_FinalBattle_branch_2396c::
octave 5
E_ 2
endchannel
-; 0x2397d
diff --git a/audio/music/gamecorner.asm b/audio/music/gamecorner.asm
index a80652e3..97ed4e77 100644
--- a/audio/music/gamecorner.asm
+++ b/audio/music/gamecorner.asm
@@ -625,4 +625,3 @@ Music_GameCorner_branch_7e4ab::
A_ 1
rest 1
endchannel
-; 0x7e4c0
diff --git a/audio/music/gym.asm b/audio/music/gym.asm
index b4cb2a8d..3ee51100 100644
--- a/audio/music/gym.asm
+++ b/audio/music/gym.asm
@@ -355,4 +355,3 @@ Music_Gym_branch_be4d::
F_ 2
A# 2
endchannel
-; 0xbe56
diff --git a/audio/music/gymleaderbattle.asm b/audio/music/gymleaderbattle.asm
index c4e7907e..c4a702e5 100644
--- a/audio/music/gymleaderbattle.asm
+++ b/audio/music/gymleaderbattle.asm
@@ -1398,4 +1398,3 @@ Music_GymLeaderBattle_branch_227b1::
octave 4
G_ 6
loopchannel 0, Music_GymLeaderBattle_branch_227b1
-; 0x22919
diff --git a/audio/music/halloffame.asm b/audio/music/halloffame.asm
index d2347aa6..86fff1c8 100644
--- a/audio/music/halloffame.asm
+++ b/audio/music/halloffame.asm
@@ -94,4 +94,3 @@ Music_HallOfFame_branch_7fbfe::
E_ 4
G_ 4
loopchannel 0, Music_HallOfFame_Ch3
-; 0x7fc1f
diff --git a/audio/music/indigoplateau.asm b/audio/music/indigoplateau.asm
index 32ce02c2..ab4df7a7 100644
--- a/audio/music/indigoplateau.asm
+++ b/audio/music/indigoplateau.asm
@@ -319,4 +319,3 @@ Music_IndigoPlateau_branch_a7a8::
mutedsnare3 1
mutedsnare3 1
endchannel
-; 0xa7c5
diff --git a/audio/music/introbattle.asm b/audio/music/introbattle.asm
index d3464680..ff7d85d8 100644
--- a/audio/music/introbattle.asm
+++ b/audio/music/introbattle.asm
@@ -327,4 +327,3 @@ Music_IntroBattle_Ch4:: ; 7f95b (1f:795b)
rest 16
rest 14
endchannel
-; 0x7fa19
diff --git a/audio/music/jigglypuffsong.asm b/audio/music/jigglypuffsong.asm
index 8d676150..e21d331f 100644
--- a/audio/music/jigglypuffsong.asm
+++ b/audio/music/jigglypuffsong.asm
@@ -38,4 +38,3 @@ Music_JigglypuffSong_Ch2:: ; 7fb9a (1f:7b9a)
G# 4
E_ 10
endchannel
-; 0x7fbaf
diff --git a/audio/music/lavender.asm b/audio/music/lavender.asm
index b2d36593..b655a488 100644
--- a/audio/music/lavender.asm
+++ b/audio/music/lavender.asm
@@ -197,4 +197,3 @@ Music_Lavender_branch_bc26::
triangle2 8
triangle2 8
loopchannel 0, Music_Lavender_branch_bc26
-; 0xbc2e
diff --git a/audio/music/meeteviltrainer.asm b/audio/music/meeteviltrainer.asm
index af4245ba..77324e5c 100644
--- a/audio/music/meeteviltrainer.asm
+++ b/audio/music/meeteviltrainer.asm
@@ -78,4 +78,3 @@ Music_MeetEvilTrainer_branch_7f6ee::
rest 3
A# 4
loopchannel 0, Music_MeetEvilTrainer_branch_7f6ee
-; 0x7f6f9
diff --git a/audio/music/meetfemaletrainer.asm b/audio/music/meetfemaletrainer.asm
index 35c6ec16..b416987d 100644
--- a/audio/music/meetfemaletrainer.asm
+++ b/audio/music/meetfemaletrainer.asm
@@ -116,4 +116,3 @@ Music_MeetFemaleTrainer_branch_7f770::
F# 1
rest 1
endchannel
-; 0x7f77b
diff --git a/audio/music/meetmaletrainer.asm b/audio/music/meetmaletrainer.asm
index 8a937fc3..0a2e8396 100644
--- a/audio/music/meetmaletrainer.asm
+++ b/audio/music/meetmaletrainer.asm
@@ -188,4 +188,3 @@ Music_MeetMaleTrainer_branch_7f7ea::
D# 1
rest 1
loopchannel 0, Music_MeetMaleTrainer_branch_7f7ea
-; 0x7f844
diff --git a/audio/music/meetprofoak.asm b/audio/music/meetprofoak.asm
index e095557d..a2f0abca 100644
--- a/audio/music/meetprofoak.asm
+++ b/audio/music/meetprofoak.asm
@@ -421,4 +421,3 @@ Music_MeetProfOak_branch_b101::
rest 1
loopchannel 2, Music_MeetProfOak_branch_b101
loopchannel 0, Music_MeetProfOak_branch_b0bc
-; 0xb119
diff --git a/audio/music/meetrival.asm b/audio/music/meetrival.asm
index fb138e61..1588e1c7 100644
--- a/audio/music/meetrival.asm
+++ b/audio/music/meetrival.asm
@@ -394,4 +394,3 @@ Music_MeetRival_branch_b2b5::
G_ 1
rest 1
loopchannel 0, Music_MeetRival_branch_b24b
-; 0xb2c8
diff --git a/audio/music/museumguy.asm b/audio/music/museumguy.asm
index 533ac343..2e2b79bf 100644
--- a/audio/music/museumguy.asm
+++ b/audio/music/museumguy.asm
@@ -335,4 +335,3 @@ Music_MuseumGuy_branch_aee1::
mutedsnare3 1
mutedsnare3 1
loopchannel 0, Music_MuseumGuy_branch_aee1
-; 0xaf59
diff --git a/audio/music/oakslab.asm b/audio/music/oakslab.asm
index 51c6cbf6..018a3e92 100644
--- a/audio/music/oakslab.asm
+++ b/audio/music/oakslab.asm
@@ -391,4 +391,3 @@ Music_OaksLab_branch_7ef5c::
E_ 1
rest 3
loopchannel 0, Music_OaksLab_branch_7ef5c
-; 0x7f04a
diff --git a/audio/music/pallettown.asm b/audio/music/pallettown.asm
index 71be9eb1..9d64b331 100644
--- a/audio/music/pallettown.asm
+++ b/audio/music/pallettown.asm
@@ -312,4 +312,3 @@ Music_PalletTown_branch_a8e3::
F# 8
loopchannel 0, Music_PalletTown_branch_a8e3
endchannel
-; 0xa913
diff --git a/audio/music/pkmnhealed.asm b/audio/music/pkmnhealed.asm
index 24247326..c802f217 100644
--- a/audio/music/pkmnhealed.asm
+++ b/audio/music/pkmnhealed.asm
@@ -45,4 +45,3 @@ Music_PkmnHealed_Ch3:: ; 9bd2 (2:5bd2)
E_ 6
rest 2
endchannel
-; 0x9bde
diff --git a/audio/music/pokecenter.asm b/audio/music/pokecenter.asm
index de6e0873..d0c9ef2c 100644
--- a/audio/music/pokecenter.asm
+++ b/audio/music/pokecenter.asm
@@ -373,4 +373,3 @@ Music_Pokecenter_branch_bfeb::
F# 2
A_ 2
endchannel
-; 0xbff4
diff --git a/audio/music/pokemontower.asm b/audio/music/pokemontower.asm
index e04dcb30..9bb7826e 100644
--- a/audio/music/pokemontower.asm
+++ b/audio/music/pokemontower.asm
@@ -456,4 +456,3 @@ Music_PokemonTower_branch_7f1a2::
D# 1
rest 1
loopchannel 0, Music_PokemonTower_branch_7f1a2
-; 0x7f243
diff --git a/audio/music/routes1.asm b/audio/music/routes1.asm
index 9876b0ea..81f138eb 100644
--- a/audio/music/routes1.asm
+++ b/audio/music/routes1.asm
@@ -402,4 +402,3 @@ Music_Routes1_Ch4:: ; 9d24 (2:5d24)
mutedsnare1 2
loopchannel 0, Music_Routes1_Ch4
endchannel
-; 0x9db9
diff --git a/audio/music/routes2.asm b/audio/music/routes2.asm
index 9ba376ce..3926c8de 100644
--- a/audio/music/routes2.asm
+++ b/audio/music/routes2.asm
@@ -423,4 +423,3 @@ Music_Routes2_Ch4:: ; 9f08 (2:5f08)
rest 3
loopchannel 0, Music_Routes2_Ch4
endchannel
-; 0x9fad
diff --git a/audio/music/routes3.asm b/audio/music/routes3.asm
index e62ca9bd..09a0516f 100644
--- a/audio/music/routes3.asm
+++ b/audio/music/routes3.asm
@@ -513,4 +513,3 @@ Music_Routes3_branch_a17a::
mutedsnare3 1
mutedsnare3 1
loopchannel 0, Music_Routes3_branch_a17a
-; 0xa26a
diff --git a/audio/music/routes4.asm b/audio/music/routes4.asm
index 742244bc..d67411f7 100644
--- a/audio/music/routes4.asm
+++ b/audio/music/routes4.asm
@@ -679,4 +679,3 @@ Music_Routes4_branch_a4a8::
mutedsnare2 2
mutedsnare2 2
loopchannel 0, Music_Routes4_branch_a4a8
-; 0xa5f0
diff --git a/audio/music/safarizone.asm b/audio/music/safarizone.asm
index 3e0657fd..afa81f17 100644
--- a/audio/music/safarizone.asm
+++ b/audio/music/safarizone.asm
@@ -109,4 +109,3 @@ Music_SafariZone_branch_bca5::
A_ 2
rest 2
endchannel
-; 0xbcbb
diff --git a/audio/music/silphco.asm b/audio/music/silphco.asm
index c5cb1675..853d248d 100644
--- a/audio/music/silphco.asm
+++ b/audio/music/silphco.asm
@@ -998,4 +998,3 @@ Music_SilphCo_branch_7f5c9::
E_ 4
F_ 4
loopchannel 0, Music_SilphCo_branch_7f5c9
-; 0x7f69d
diff --git a/audio/music/ssanne.asm b/audio/music/ssanne.asm
index db55e3b6..62fd1a02 100644
--- a/audio/music/ssanne.asm
+++ b/audio/music/ssanne.asm
@@ -336,4 +336,3 @@ Music_SSAnne_Ch3:: ; b4cb (2:74cb)
G# 8
B_ 8
loopchannel 0, Music_SSAnne_Ch3
-; 0xb504
diff --git a/audio/music/surfing.asm b/audio/music/surfing.asm
index 2b829caf..4ee84233 100644
--- a/audio/music/surfing.asm
+++ b/audio/music/surfing.asm
@@ -333,4 +333,3 @@ Music_Surfing_branch_7fb03::
D_ 2
E_ 2
loopchannel 0, Music_Surfing_branch_7fb03
-; 0x7fb7d
diff --git a/audio/music/titlescreen.asm b/audio/music/titlescreen.asm
index 359ff877..edd3352f 100644
--- a/audio/music/titlescreen.asm
+++ b/audio/music/titlescreen.asm
@@ -675,4 +675,3 @@ Music_TitleScreen_branch_7e842::
snare2 1
rest 3
endchannel
-; 0x7e850
diff --git a/audio/music/trainerbattle.asm b/audio/music/trainerbattle.asm
index 52642fdc..ffc17e20 100644
--- a/audio/music/trainerbattle.asm
+++ b/audio/music/trainerbattle.asm
@@ -1855,4 +1855,3 @@ Music_TrainerBattle_branch_22d9c::
D_ 2
C_ 2
loopchannel 0, Music_TrainerBattle_branch_22d9c
-; 0x23099
diff --git a/audio/music/unusedsong.asm b/audio/music/unusedsong.asm
index fb51fd15..c2c87891 100644
--- a/audio/music/unusedsong.asm
+++ b/audio/music/unusedsong.asm
@@ -336,4 +336,3 @@ Music_UnusedSong_branch_a9d8::
rest 6
loopchannel 0, Music_UnusedSong_branch_a9d8
endchannel
-; 0xaa6f
diff --git a/audio/music/vermilion.asm b/audio/music/vermilion.asm
index 5dfd5702..59ea3e08 100644
--- a/audio/music/vermilion.asm
+++ b/audio/music/vermilion.asm
@@ -321,4 +321,3 @@ Music_Vermilion_branch_bb3f::
triangle1 1
triangle1 1
endchannel
-; 0xbb58
diff --git a/audio/music/wildbattle.asm b/audio/music/wildbattle.asm
index 70ce7d3f..e37e4b06 100644
--- a/audio/music/wildbattle.asm
+++ b/audio/music/wildbattle.asm
@@ -736,4 +736,3 @@ Music_WildBattle_branch_232d8::
C# 2
G# 2
loopchannel 0, Music_WildBattle_branch_232d8
-; 0x233a6
diff --git a/audio/music/yellow/meetjessiejames.asm b/audio/music/yellow/meetjessiejames.asm
index 5ef52491..168b1bdc 100644
--- a/audio/music/yellow/meetjessiejames.asm
+++ b/audio/music/yellow/meetjessiejames.asm
@@ -307,4 +307,3 @@ Music_MeetJessieJames_branch_83235::
rest 1
loopchannel 0, Music_MeetJessieJames_branch_83235
endchannel
-; 0x832ba
diff --git a/audio/music/yellow/surfingpikachu.asm b/audio/music/yellow/surfingpikachu.asm
index 1832bb03..466a2c53 100644
--- a/audio/music/yellow/surfingpikachu.asm
+++ b/audio/music/yellow/surfingpikachu.asm
@@ -688,4 +688,3 @@ Music_SurfingPikachu_branch_82ea0::
D# 1
rest 1
loopchannel 0, Music_SurfingPikachu_branch_82ea0
-; 0x82fbe
diff --git a/audio/music/yellow/yellowintro.asm b/audio/music/yellow/yellowintro.asm
index 4d9cf938..9b0b52ab 100644
--- a/audio/music/yellow/yellowintro.asm
+++ b/audio/music/yellow/yellowintro.asm
@@ -482,4 +482,3 @@ Music_YellowIntro_Ch3:: ; 7f749 (1f:7749)
E_ 1
rest 15
endchannel
-; 0x7f860
diff --git a/audio/music/yellow/yellowunusedsong.asm b/audio/music/yellow/yellowunusedsong.asm
index e8c2a7ba..86e55ee8 100644
--- a/audio/music/yellow/yellowunusedsong.asm
+++ b/audio/music/yellow/yellowunusedsong.asm
@@ -324,4 +324,3 @@ Music_YellowUnusedSong_branch_830c3::
snare3 4
snare3 4
loopchannel 0, Music_YellowUnusedSong_branch_830c3
-; 0x8316d
diff --git a/audio/sfx/sfx_02_01.asm b/audio/sfx/sfx_02_01.asm
index e92c35b8..0de37099 100644..100755
--- a/audio/sfx/sfx_02_01.asm
+++ b/audio/sfx/sfx_02_01.asm
@@ -1,4 +1,3 @@
SFX_02_01_Ch1: ; 82fd (2:42fd)
unknownnoise0x20 0, 193, 51
endchannel
-; 0x8301 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_02.asm b/audio/sfx/sfx_02_02.asm
index ca252725..ce8efcf0 100644..100755
--- a/audio/sfx/sfx_02_02.asm
+++ b/audio/sfx/sfx_02_02.asm
@@ -1,4 +1,3 @@
SFX_02_02_Ch1: ; 8301 (2:4301)
unknownnoise0x20 0, 177, 51
endchannel
-; 0x8305 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_03.asm b/audio/sfx/sfx_02_03.asm
index 4eb687a8..3fc19143 100644..100755
--- a/audio/sfx/sfx_02_03.asm
+++ b/audio/sfx/sfx_02_03.asm
@@ -1,4 +1,3 @@
SFX_02_03_Ch1: ; 8305 (2:4305)
unknownnoise0x20 0, 161, 51
endchannel
-; 0x8309 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_04.asm b/audio/sfx/sfx_02_04.asm
index 45caab6b..35abd908 100644..100755
--- a/audio/sfx/sfx_02_04.asm
+++ b/audio/sfx/sfx_02_04.asm
@@ -1,4 +1,3 @@
SFX_02_04_Ch1: ; 8309 (2:4309)
unknownnoise0x20 0, 129, 51
endchannel
-; 0x830d \ No newline at end of file
diff --git a/audio/sfx/sfx_02_05.asm b/audio/sfx/sfx_02_05.asm
index 156254e5..5aca7085 100644..100755
--- a/audio/sfx/sfx_02_05.asm
+++ b/audio/sfx/sfx_02_05.asm
@@ -6,4 +6,3 @@ SFX_02_05_Ch1: ; 830d (2:430d)
unknownnoise0x20 3, 130, 51
unknownnoise0x20 2, 129, 50
endchannel
-; 0x8320 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_06.asm b/audio/sfx/sfx_02_06.asm
index 03f8d4aa..f2031c3f 100644..100755
--- a/audio/sfx/sfx_02_06.asm
+++ b/audio/sfx/sfx_02_06.asm
@@ -1,4 +1,3 @@
SFX_02_06_Ch1: ; 8320 (2:4320)
unknownnoise0x20 0, 81, 42
endchannel
-; 0x8324 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_07.asm b/audio/sfx/sfx_02_07.asm
index 02fd9e06..58ae12fd 100644..100755
--- a/audio/sfx/sfx_02_07.asm
+++ b/audio/sfx/sfx_02_07.asm
@@ -2,4 +2,3 @@ SFX_02_07_Ch1: ; 8324 (2:4324)
unknownnoise0x20 1, 65, 43
unknownnoise0x20 0, 97, 42
endchannel
-; 0x832b \ No newline at end of file
diff --git a/audio/sfx/sfx_02_08.asm b/audio/sfx/sfx_02_08.asm
index 4efce48f..5a172e25 100644..100755
--- a/audio/sfx/sfx_02_08.asm
+++ b/audio/sfx/sfx_02_08.asm
@@ -1,4 +1,3 @@
SFX_02_08_Ch1: ; 832b (2:432b)
unknownnoise0x20 0, 129, 16
endchannel
-; 0x832f \ No newline at end of file
diff --git a/audio/sfx/sfx_02_09.asm b/audio/sfx/sfx_02_09.asm
index bb04efca..47f85e16 100644..100755
--- a/audio/sfx/sfx_02_09.asm
+++ b/audio/sfx/sfx_02_09.asm
@@ -1,4 +1,3 @@
SFX_02_09_Ch1: ; 832f (2:432f)
unknownnoise0x20 0, 130, 35
endchannel
-; 0x8333 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_0a.asm b/audio/sfx/sfx_02_0a.asm
index 128c9a74..3d43afa9 100644..100755
--- a/audio/sfx/sfx_02_0a.asm
+++ b/audio/sfx/sfx_02_0a.asm
@@ -1,4 +1,3 @@
SFX_02_0a_Ch1: ; 8333 (2:4333)
unknownnoise0x20 0, 130, 37
endchannel
-; 0x8337 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_0b.asm b/audio/sfx/sfx_02_0b.asm
index de643bd6..9c8d38ca 100644..100755
--- a/audio/sfx/sfx_02_0b.asm
+++ b/audio/sfx/sfx_02_0b.asm
@@ -1,4 +1,3 @@
SFX_02_0b_Ch1: ; 8337 (2:4337)
unknownnoise0x20 0, 130, 38
endchannel
-; 0x833b \ No newline at end of file
diff --git a/audio/sfx/sfx_02_0c.asm b/audio/sfx/sfx_02_0c.asm
index 98c4ef19..4f3568e1 100644..100755
--- a/audio/sfx/sfx_02_0c.asm
+++ b/audio/sfx/sfx_02_0c.asm
@@ -1,4 +1,3 @@
SFX_02_0c_Ch1: ; 833b (2:433b)
unknownnoise0x20 0, 161, 16
endchannel
-; 0x833f \ No newline at end of file
diff --git a/audio/sfx/sfx_02_0d.asm b/audio/sfx/sfx_02_0d.asm
index dfa8e738..154b5c1e 100644..100755
--- a/audio/sfx/sfx_02_0d.asm
+++ b/audio/sfx/sfx_02_0d.asm
@@ -1,4 +1,3 @@
SFX_02_0d_Ch1: ; 833f (2:433f)
unknownnoise0x20 0, 162, 17
endchannel
-; 0x8343 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_0e.asm b/audio/sfx/sfx_02_0e.asm
index 52b0dd4d..d1333575 100644..100755
--- a/audio/sfx/sfx_02_0e.asm
+++ b/audio/sfx/sfx_02_0e.asm
@@ -1,4 +1,3 @@
SFX_02_0e_Ch1: ; 8343 (2:4343)
unknownnoise0x20 0, 162, 80
endchannel
-; 0x8347 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_0f.asm b/audio/sfx/sfx_02_0f.asm
index 5a2404fc..32156d7d 100644..100755
--- a/audio/sfx/sfx_02_0f.asm
+++ b/audio/sfx/sfx_02_0f.asm
@@ -2,4 +2,3 @@ SFX_02_0f_Ch1: ; 8347 (2:4347)
unknownnoise0x20 0, 161, 24
unknownnoise0x20 0, 49, 51
endchannel
-; 0x834e \ No newline at end of file
diff --git a/audio/sfx/sfx_02_10.asm b/audio/sfx/sfx_02_10.asm
index 057fd81b..61d57b01 100644..100755
--- a/audio/sfx/sfx_02_10.asm
+++ b/audio/sfx/sfx_02_10.asm
@@ -2,4 +2,3 @@ SFX_02_10_Ch1: ; 834e (2:434e)
unknownnoise0x20 2, 145, 40
unknownnoise0x20 0, 113, 24
endchannel
-; 0x8355 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_11.asm b/audio/sfx/sfx_02_11.asm
index 3ab56c2b..f4bde465 100644..100755
--- a/audio/sfx/sfx_02_11.asm
+++ b/audio/sfx/sfx_02_11.asm
@@ -1,4 +1,3 @@
SFX_02_11_Ch1: ; 8355 (2:4355)
unknownnoise0x20 0, 145, 34
endchannel
-; 0x8359 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_12.asm b/audio/sfx/sfx_02_12.asm
index 608e341c..908c3fb2 100644..100755
--- a/audio/sfx/sfx_02_12.asm
+++ b/audio/sfx/sfx_02_12.asm
@@ -1,4 +1,3 @@
SFX_02_12_Ch1: ; 8359 (2:4359)
unknownnoise0x20 0, 113, 34
endchannel
-; 0x835d \ No newline at end of file
diff --git a/audio/sfx/sfx_02_13.asm b/audio/sfx/sfx_02_13.asm
index 38b06431..bd985ab4 100644..100755
--- a/audio/sfx/sfx_02_13.asm
+++ b/audio/sfx/sfx_02_13.asm
@@ -1,4 +1,3 @@
SFX_02_13_Ch1: ; 835d (2:435d)
unknownnoise0x20 0, 97, 34
endchannel
-; 0x8361 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_14.asm b/audio/sfx/sfx_02_14.asm
index 70dfe276..3a289882 100644..100755
--- a/audio/sfx/sfx_02_14.asm
+++ b/audio/sfx/sfx_02_14.asm
@@ -19,4 +19,3 @@ SFX_02_14_Ch3: ; 89a5 (2:49a5)
unknownnoise0x20 14, 148, 44
unknownnoise0x20 8, 129, 28
endchannel
-; 0x89af \ No newline at end of file
diff --git a/audio/sfx/sfx_02_15.asm b/audio/sfx/sfx_02_15.asm
index 619cb208..91b6c951 100644..100755
--- a/audio/sfx/sfx_02_15.asm
+++ b/audio/sfx/sfx_02_15.asm
@@ -22,4 +22,3 @@ SFX_02_15_Ch3: ; 8bbd (2:4bbd)
unknownnoise0x20 3, 130, 28
unknownnoise0x20 8, 113, 44
endchannel
-; 0x8bca \ No newline at end of file
diff --git a/audio/sfx/sfx_02_16.asm b/audio/sfx/sfx_02_16.asm
index 4e095a04..fe15f6b6 100644..100755
--- a/audio/sfx/sfx_02_16.asm
+++ b/audio/sfx/sfx_02_16.asm
@@ -15,4 +15,3 @@ SFX_02_16_Ch2: ; 8b1b (2:4b1b)
SFX_02_16_Ch3: ; 8b29 (2:4b29)
endchannel
-; 0x8b2a \ No newline at end of file
diff --git a/audio/sfx/sfx_02_17.asm b/audio/sfx/sfx_02_17.asm
index f8b66456..ecc34899 100644..100755
--- a/audio/sfx/sfx_02_17.asm
+++ b/audio/sfx/sfx_02_17.asm
@@ -28,4 +28,3 @@ SFX_02_17_Ch3: ; 88e4 (2:48e4)
unknownnoise0x20 12, 182, 76
unknownnoise0x20 15, 162, 92
endchannel
-; 0x88f1 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_18.asm b/audio/sfx/sfx_02_18.asm
index 4d546cbf..73f8f41e 100644..100755
--- a/audio/sfx/sfx_02_18.asm
+++ b/audio/sfx/sfx_02_18.asm
@@ -30,4 +30,3 @@ SFX_02_18_Ch3: ; 8c93 (2:4c93)
unknownnoise0x20 7, 195, 76
unknownnoise0x20 8, 161, 92
endchannel
-; 0x8ca6 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_19.asm b/audio/sfx/sfx_02_19.asm
index 3cc7ae73..d78b66b4 100644..100755
--- a/audio/sfx/sfx_02_19.asm
+++ b/audio/sfx/sfx_02_19.asm
@@ -17,4 +17,3 @@ SFX_02_19_Ch2: ; 8a48 (2:4a48)
SFX_02_19_Ch3: ; 8a5a (2:4a5a)
endchannel
-; 0x8a5b \ No newline at end of file
diff --git a/audio/sfx/sfx_02_1a.asm b/audio/sfx/sfx_02_1a.asm
index 8b029d5c..036703b5 100644..100755
--- a/audio/sfx/sfx_02_1a.asm
+++ b/audio/sfx/sfx_02_1a.asm
@@ -20,4 +20,3 @@ SFX_02_1a_Ch3: ; 89fa (2:49fa)
unknownnoise0x20 15, 215, 156
unknownnoise0x20 15, 242, 172
endchannel
-; 0x8a0d \ No newline at end of file
diff --git a/audio/sfx/sfx_02_1b.asm b/audio/sfx/sfx_02_1b.asm
index 8626d876..0e1112f6 100644..100755
--- a/audio/sfx/sfx_02_1b.asm
+++ b/audio/sfx/sfx_02_1b.asm
@@ -19,4 +19,3 @@ SFX_02_1b_Ch3: ; 8a2b (2:4a2b)
unknownnoise0x20 15, 230, 76
unknownnoise0x20 8, 177, 92
endchannel
-; 0x8a35 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_1c.asm b/audio/sfx/sfx_02_1c.asm
index d96c0eb8..3a06819f 100644..100755
--- a/audio/sfx/sfx_02_1c.asm
+++ b/audio/sfx/sfx_02_1c.asm
@@ -21,4 +21,3 @@ SFX_02_1c_Ch3: ; 8c4b (2:4c4b)
unknownnoise0x20 11, 215, 92
unknownnoise0x20 15, 194, 76
endchannel
-; 0x8c55 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_1d.asm b/audio/sfx/sfx_02_1d.asm
index f5db0868..1501e2ab 100644..100755
--- a/audio/sfx/sfx_02_1d.asm
+++ b/audio/sfx/sfx_02_1d.asm
@@ -33,4 +33,3 @@ SFX_02_1d_Ch3: ; 876d (2:476d)
unknownnoise0x20 6, 212, 61
unknownnoise0x20 8, 193, 59
endchannel
-; 0x8786 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_1e.asm b/audio/sfx/sfx_02_1e.asm
index 524d67d7..1036f953 100644..100755
--- a/audio/sfx/sfx_02_1e.asm
+++ b/audio/sfx/sfx_02_1e.asm
@@ -33,4 +33,3 @@ SFX_02_1e_Ch3: ; 8c0c (2:4c0c)
unknownnoise0x20 3, 164, 44
unknownnoise0x20 8, 145, 60
endchannel
-; 0x8c25 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_1f.asm b/audio/sfx/sfx_02_1f.asm
index 9506fb43..8f603856 100644..100755
--- a/audio/sfx/sfx_02_1f.asm
+++ b/audio/sfx/sfx_02_1f.asm
@@ -35,4 +35,3 @@ SFX_02_1f_Ch3: ; 8aa5 (2:4aa5)
unknownnoise0x20 4, 193, 44
unknownnoise0x20 8, 161, 76
endchannel
-; 0x8abe \ No newline at end of file
diff --git a/audio/sfx/sfx_02_20.asm b/audio/sfx/sfx_02_20.asm
index 00923339..741ae0e8 100644..100755
--- a/audio/sfx/sfx_02_20.asm
+++ b/audio/sfx/sfx_02_20.asm
@@ -27,4 +27,3 @@ SFX_02_20_Ch2: ; 8ae5 (2:4ae5)
SFX_02_20_Ch3: ; 8b0b (2:4b0b)
endchannel
-; 0x8b0c \ No newline at end of file
diff --git a/audio/sfx/sfx_02_21.asm b/audio/sfx/sfx_02_21.asm
index 60ecb431..4c7bebee 100644..100755
--- a/audio/sfx/sfx_02_21.asm
+++ b/audio/sfx/sfx_02_21.asm
@@ -38,4 +38,3 @@ SFX_02_21_Ch3: ; 8b78 (2:4b78)
unknownnoise0x20 9, 194, 44
unknownnoise0x20 4, 161, 60
endchannel
-; 0x8b97 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_22.asm b/audio/sfx/sfx_02_22.asm
index 3f7a2783..6d4a8f7d 100644..100755
--- a/audio/sfx/sfx_02_22.asm
+++ b/audio/sfx/sfx_02_22.asm
@@ -21,4 +21,3 @@ SFX_02_22_Ch3: ; 89d5 (2:49d5)
unknownnoise0x20 2, 97, 33
unknownnoise0x20 8, 97, 17
endchannel
-; 0x89df \ No newline at end of file
diff --git a/audio/sfx/sfx_02_23.asm b/audio/sfx/sfx_02_23.asm
index c7e0a345..fb0ff58c 100644..100755
--- a/audio/sfx/sfx_02_23.asm
+++ b/audio/sfx/sfx_02_23.asm
@@ -27,4 +27,3 @@ SFX_02_23_Ch3: ; 8927 (2:4927)
unknownnoise0x20 8, 183, 92
unknownnoise0x20 15, 194, 93
endchannel
-; 0x8937 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_24.asm b/audio/sfx/sfx_02_24.asm
index f092bae9..c1ff6fcc 100644..100755
--- a/audio/sfx/sfx_02_24.asm
+++ b/audio/sfx/sfx_02_24.asm
@@ -29,4 +29,3 @@ SFX_02_24_Ch3: ; 897d (2:497d)
unknownnoise0x20 4, 116, 16
unknownnoise0x20 4, 113, 32
endchannel
-; 0x8987 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_25.asm b/audio/sfx/sfx_02_25.asm
index 4025d4f7..f324be84 100644..100755
--- a/audio/sfx/sfx_02_25.asm
+++ b/audio/sfx/sfx_02_25.asm
@@ -32,4 +32,3 @@ SFX_02_25_Ch3: ; 8855 (2:4855)
unknownnoise0x20 12, 210, 61
unknownnoise0x20 8, 209, 44
endchannel
-; 0x886b \ No newline at end of file
diff --git a/audio/sfx/sfx_02_26.asm b/audio/sfx/sfx_02_26.asm
index eae085f4..6ecd820f 100644..100755
--- a/audio/sfx/sfx_02_26.asm
+++ b/audio/sfx/sfx_02_26.asm
@@ -22,4 +22,3 @@ SFX_02_26_Ch3: ; 8d51 (2:4d51)
unknownnoise0x20 3, 194, 108
unknownnoise0x20 8, 209, 92
endchannel
-; 0x8d5e \ No newline at end of file
diff --git a/audio/sfx/sfx_02_27.asm b/audio/sfx/sfx_02_27.asm
index c019aab3..2449cf89 100644..100755
--- a/audio/sfx/sfx_02_27.asm
+++ b/audio/sfx/sfx_02_27.asm
@@ -28,4 +28,3 @@ SFX_02_27_Ch3: ; 8d94 (2:4d94)
unknownnoise0x20 8, 179, 76
unknownnoise0x20 8, 161, 92
endchannel
-; 0x8da7 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_28.asm b/audio/sfx/sfx_02_28.asm
index c183df6b..bb872795 100644..100755
--- a/audio/sfx/sfx_02_28.asm
+++ b/audio/sfx/sfx_02_28.asm
@@ -19,4 +19,3 @@ SFX_02_28_Ch3: ; 8dc5 (2:4dc5)
unknownnoise0x20 14, 196, 60
unknownnoise0x20 8, 209, 44
endchannel
-; 0x8dcf \ No newline at end of file
diff --git a/audio/sfx/sfx_02_29.asm b/audio/sfx/sfx_02_29.asm
index 872fa90a..466a8bc8 100644..100755
--- a/audio/sfx/sfx_02_29.asm
+++ b/audio/sfx/sfx_02_29.asm
@@ -28,4 +28,3 @@ SFX_02_29_Ch3: ; 8e6b (2:4e6b)
unknownnoise0x20 3, 162, 92
unknownnoise0x20 8, 177, 108
endchannel
-; 0x8e7e \ No newline at end of file
diff --git a/audio/sfx/sfx_02_2a.asm b/audio/sfx/sfx_02_2a.asm
index f5313860..13356384 100644..100755
--- a/audio/sfx/sfx_02_2a.asm
+++ b/audio/sfx/sfx_02_2a.asm
@@ -19,4 +19,3 @@ SFX_02_2a_Ch3: ; 8ce6 (2:4ce6)
unknownnoise0x20 4, 230, 60
unknownnoise0x20 15, 242, 76
endchannel
-; 0x8cf0 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_2b.asm b/audio/sfx/sfx_02_2b.asm
index c0792c94..5aa42f68 100644..100755
--- a/audio/sfx/sfx_02_2b.asm
+++ b/audio/sfx/sfx_02_2b.asm
@@ -22,4 +22,3 @@ SFX_02_2b_Ch3: ; 8ea4 (2:4ea4)
unknownnoise0x20 9, 228, 124
unknownnoise0x20 15, 226, 108
endchannel
-; 0x8eb1 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_2c.asm b/audio/sfx/sfx_02_2c.asm
index e923c9e1..39f2a7da 100644..100755
--- a/audio/sfx/sfx_02_2c.asm
+++ b/audio/sfx/sfx_02_2c.asm
@@ -32,4 +32,3 @@ SFX_02_2c_Ch3: ; 8fd4 (2:4fd4)
unknownnoise0x20 6, 180, 60
unknownnoise0x20 8, 193, 44
endchannel
-; 0x8fe7 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_2d.asm b/audio/sfx/sfx_02_2d.asm
index 70e71eb1..1e9ef3e5 100644..100755
--- a/audio/sfx/sfx_02_2d.asm
+++ b/audio/sfx/sfx_02_2d.asm
@@ -16,4 +16,3 @@ SFX_02_2d_Ch2: ; 8cb5 (2:4cb5)
SFX_02_2d_Ch3: ; 8cc7 (2:4cc7)
endchannel
-; 0x8cc8 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_2e.asm b/audio/sfx/sfx_02_2e.asm
index d95bfbe3..d0c25b47 100644..100755
--- a/audio/sfx/sfx_02_2e.asm
+++ b/audio/sfx/sfx_02_2e.asm
@@ -28,4 +28,3 @@ SFX_02_2e_Ch3: ; 8f35 (2:4f35)
unknownnoise0x20 2, 226, 60
unknownnoise0x20 8, 209, 44
endchannel
-; 0x8f48 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_2f.asm b/audio/sfx/sfx_02_2f.asm
index 08ea2788..ba0ecd23 100644..100755
--- a/audio/sfx/sfx_02_2f.asm
+++ b/audio/sfx/sfx_02_2f.asm
@@ -24,4 +24,3 @@ SFX_02_2f_Ch3: ; 8d1e (2:4d1e)
unknownnoise0x20 5, 163, 60
unknownnoise0x20 8, 145, 44
endchannel
-; 0x8d2b \ No newline at end of file
diff --git a/audio/sfx/sfx_02_30.asm b/audio/sfx/sfx_02_30.asm
index 7131fc1a..41a18486 100644..100755
--- a/audio/sfx/sfx_02_30.asm
+++ b/audio/sfx/sfx_02_30.asm
@@ -29,4 +29,3 @@ SFX_02_30_Ch3: ; 8eef (2:4eef)
unknownnoise0x20 8, 196, 108
unknownnoise0x20 15, 179, 92
endchannel
-; 0x8eff \ No newline at end of file
diff --git a/audio/sfx/sfx_02_31.asm b/audio/sfx/sfx_02_31.asm
index 79d09433..331413d3 100644..100755
--- a/audio/sfx/sfx_02_31.asm
+++ b/audio/sfx/sfx_02_31.asm
@@ -27,4 +27,3 @@ SFX_02_31_Ch3: ; 8f7e (2:4f7e)
unknownnoise0x20 1, 178, 91
unknownnoise0x20 15, 194, 76
endchannel
-; 0x8f8e \ No newline at end of file
diff --git a/audio/sfx/sfx_02_32.asm b/audio/sfx/sfx_02_32.asm
index f2fbf611..a38da7fd 100644..100755
--- a/audio/sfx/sfx_02_32.asm
+++ b/audio/sfx/sfx_02_32.asm
@@ -36,4 +36,3 @@ SFX_02_32_Ch3: ; 8e19 (2:4e19)
unknownnoise0x20 5, 146, 26
unknownnoise0x20 8, 129, 24
endchannel
-; 0x8e35 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_33.asm b/audio/sfx/sfx_02_33.asm
index f4387a3a..555f9b14 100644..100755
--- a/audio/sfx/sfx_02_33.asm
+++ b/audio/sfx/sfx_02_33.asm
@@ -22,4 +22,3 @@ SFX_02_33_Ch3: ; 900d (2:500d)
unknownnoise0x20 8, 196, 69
unknownnoise0x20 8, 177, 68
endchannel
-; 0x901a \ No newline at end of file
diff --git a/audio/sfx/sfx_02_34.asm b/audio/sfx/sfx_02_34.asm
index 4c2fa4cc..a8b21680 100644..100755
--- a/audio/sfx/sfx_02_34.asm
+++ b/audio/sfx/sfx_02_34.asm
@@ -22,4 +22,3 @@ SFX_02_34_Ch3: ; 9040 (2:5040)
unknownnoise0x20 14, 210, 86
unknownnoise0x20 8, 209, 102
endchannel
-; 0x904d \ No newline at end of file
diff --git a/audio/sfx/sfx_02_35.asm b/audio/sfx/sfx_02_35.asm
index 33685f61..61b2a5ac 100644..100755
--- a/audio/sfx/sfx_02_35.asm
+++ b/audio/sfx/sfx_02_35.asm
@@ -25,4 +25,3 @@ SFX_02_35_Ch2: ; 9070 (2:5070)
SFX_02_35_Ch3: ; 9092 (2:5092)
endchannel
-; 0x9093 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_36.asm b/audio/sfx/sfx_02_36.asm
index e648e3dd..972f87a6 100644..100755
--- a/audio/sfx/sfx_02_36.asm
+++ b/audio/sfx/sfx_02_36.asm
@@ -22,4 +22,3 @@ SFX_02_36_Ch3: ; 90b9 (2:50b9)
unknownnoise0x20 1, 162, 57
unknownnoise0x20 8, 145, 73
endchannel
-; 0x90c6 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_37.asm b/audio/sfx/sfx_02_37.asm
index 0fc80e1a..c286b018 100644..100755
--- a/audio/sfx/sfx_02_37.asm
+++ b/audio/sfx/sfx_02_37.asm
@@ -23,4 +23,3 @@ SFX_02_37_Ch3: ; 87b0 (2:47b0)
unknownnoise0x20 15, 215, 60
unknownnoise0x20 8, 193, 44
endchannel
-; 0x87bd \ No newline at end of file
diff --git a/audio/sfx/sfx_02_38.asm b/audio/sfx/sfx_02_38.asm
index 2c982a3d..9b6ba80f 100644..100755
--- a/audio/sfx/sfx_02_38.asm
+++ b/audio/sfx/sfx_02_38.asm
@@ -31,4 +31,3 @@ SFX_02_38_Ch3: ; 8803 (2:4803)
unknownnoise0x20 12, 183, 76
unknownnoise0x20 15, 162, 92
endchannel
-; 0x8813 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_39.asm b/audio/sfx/sfx_02_39.asm
index 5aa9b436..3d50aef5 100644..100755
--- a/audio/sfx/sfx_02_39.asm
+++ b/audio/sfx/sfx_02_39.asm
@@ -24,4 +24,3 @@ SFX_02_39_Ch3: ; 8899 (2:4899)
unknownnoise0x20 10, 182, 44
unknownnoise0x20 8, 145, 28
endchannel
-; 0x88a6 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_3a.asm b/audio/sfx/sfx_02_3a.asm
index 1844b2ab..96c93702 100644..100755
--- a/audio/sfx/sfx_02_3a.asm
+++ b/audio/sfx/sfx_02_3a.asm
@@ -45,4 +45,3 @@ SFX_02_3a_Ch3: ; ad9e (2:6d9e)
B_ 2
rest 2
endchannel
-; 0xadae \ No newline at end of file
diff --git a/audio/sfx/sfx_02_3b.asm b/audio/sfx/sfx_02_3b.asm
index 9c59d670..190b1299 100644..100755
--- a/audio/sfx/sfx_02_3b.asm
+++ b/audio/sfx/sfx_02_3b.asm
@@ -67,4 +67,3 @@ SFX_02_3b_Ch3: ; b34d (2:734d)
rest 1
A_ 8
endchannel
-; 0xb362 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_3c.asm b/audio/sfx/sfx_02_3c.asm
index e695705e..95e2029d 100644..100755
--- a/audio/sfx/sfx_02_3c.asm
+++ b/audio/sfx/sfx_02_3c.asm
@@ -6,4 +6,3 @@ SFX_02_3c_Ch1: ; 840a (2:440a)
unknownsfx0x20 8, 226, 0, 2
unknownsfx0x10 8
endchannel
-; 0x841b \ No newline at end of file
diff --git a/audio/sfx/sfx_02_3d.asm b/audio/sfx/sfx_02_3d.asm
index 206c0c35..469776a4 100644..100755
--- a/audio/sfx/sfx_02_3d.asm
+++ b/audio/sfx/sfx_02_3d.asm
@@ -5,4 +5,3 @@ SFX_02_3d_Ch1: ; 84b7 (2:44b7)
unknownsfx0x20 15, 242, 80, 6
unknownsfx0x10 8
endchannel
-; 0x84c6 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_3e.asm b/audio/sfx/sfx_02_3e.asm
index 18d49ff3..36824962 100644..100755
--- a/audio/sfx/sfx_02_3e.asm
+++ b/audio/sfx/sfx_02_3e.asm
@@ -7,4 +7,3 @@ SFX_02_3e_Ch1: ; 84d9 (2:44d9)
unknownsfx0x20 15, 242, 0, 6
unknownsfx0x10 8
endchannel
-; 0x84ee \ No newline at end of file
diff --git a/audio/sfx/sfx_02_3f.asm b/audio/sfx/sfx_02_3f.asm
index b7009e79..dffd99cb 100644..100755
--- a/audio/sfx/sfx_02_3f.asm
+++ b/audio/sfx/sfx_02_3f.asm
@@ -2,4 +2,3 @@ SFX_02_3f_Ch1: ; 83c3 (2:43c3)
unknownnoise0x20 1, 226, 51
unknownnoise0x20 8, 225, 34
endchannel
-; 0x83ca \ No newline at end of file
diff --git a/audio/sfx/sfx_02_40.asm b/audio/sfx/sfx_02_40.asm
index a5789282..2aa521b4 100644..100755
--- a/audio/sfx/sfx_02_40.asm
+++ b/audio/sfx/sfx_02_40.asm
@@ -5,4 +5,3 @@ SFX_02_40_Ch1: ; 8462 (2:4462)
unknownsfx0x20 0, 145, 192, 7
unknownsfx0x20 12, 161, 208, 7
endchannel
-; 0x8475 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_41.asm b/audio/sfx/sfx_02_41.asm
index de5be1c7..a21595f3 100644..100755
--- a/audio/sfx/sfx_02_41.asm
+++ b/audio/sfx/sfx_02_41.asm
@@ -75,4 +75,3 @@ SFX_02_41_Ch3: ; b2f7 (2:72f7)
F_ 2
rest 2
endchannel
-; 0xb316 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_42.asm b/audio/sfx/sfx_02_42.asm
index 5dfcb574..9f997b36 100644..100755
--- a/audio/sfx/sfx_02_42.asm
+++ b/audio/sfx/sfx_02_42.asm
@@ -57,4 +57,3 @@ SFX_02_42_Ch3: ; b39d (2:739d)
F_ 4
D# 8
endchannel
-; 0xb3a7 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_43.asm b/audio/sfx/sfx_02_43.asm
index c8f88914..3bb6f7ed 100644..100755
--- a/audio/sfx/sfx_02_43.asm
+++ b/audio/sfx/sfx_02_43.asm
@@ -6,4 +6,3 @@ SFX_02_43_Ch1: ; 84c6 (2:44c6)
unknownsfx0x20 15, 243, 0, 6
unknownsfx0x10 8
endchannel
-; 0x84d9 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_44.asm b/audio/sfx/sfx_02_44.asm
index 8ecfc89b..c03155d1 100644..100755
--- a/audio/sfx/sfx_02_44.asm
+++ b/audio/sfx/sfx_02_44.asm
@@ -5,4 +5,3 @@ SFX_02_44_Ch1: ; 84ee (2:44ee)
unknownsfx0x20 15, 242, 80, 6
unknownsfx0x10 8
endchannel
-; 0x84fd \ No newline at end of file
diff --git a/audio/sfx/sfx_02_45.asm b/audio/sfx/sfx_02_45.asm
index d06160b0..a2b9f83d 100644..100755
--- a/audio/sfx/sfx_02_45.asm
+++ b/audio/sfx/sfx_02_45.asm
@@ -11,4 +11,3 @@ SFX_02_45_Ch1: ; 84fd (2:44fd)
unknownsfx0x20 3, 161, 192, 7
unknownsfx0x20 8, 161, 0, 7
endchannel
-; 0x8528 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_46.asm b/audio/sfx/sfx_02_46.asm
index 64d4acce..b75ef176 100644..100755
--- a/audio/sfx/sfx_02_46.asm
+++ b/audio/sfx/sfx_02_46.asm
@@ -5,4 +5,3 @@ SFX_02_46_Ch1: ; 8528 (2:4528)
unknownsfx0x20 4, 240, 0, 2
unknownsfx0x20 1, 0, 0, 0
endchannel
-; 0x853b \ No newline at end of file
diff --git a/audio/sfx/sfx_02_47.asm b/audio/sfx/sfx_02_47.asm
index afcd01eb..f498077c 100644..100755
--- a/audio/sfx/sfx_02_47.asm
+++ b/audio/sfx/sfx_02_47.asm
@@ -5,4 +5,3 @@ SFX_02_47_Ch1: ; 853b (2:453b)
unknownsfx0x20 6, 240, 0, 7
unknownsfx0x20 1, 0, 0, 0
endchannel
-; 0x854e \ No newline at end of file
diff --git a/audio/sfx/sfx_02_48.asm b/audio/sfx/sfx_02_48.asm
index 0db1b90d..e22443cc 100644..100755
--- a/audio/sfx/sfx_02_48.asm
+++ b/audio/sfx/sfx_02_48.asm
@@ -8,4 +8,3 @@ SFX_02_48_Ch1: ; 854e (2:454e)
unknownsfx0x20 15, 23, 0, 4
unknownsfx0x10 8
endchannel
-; 0x8569 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_49.asm b/audio/sfx/sfx_02_49.asm
index b19c3fcc..6cf3e647 100644..100755
--- a/audio/sfx/sfx_02_49.asm
+++ b/audio/sfx/sfx_02_49.asm
@@ -6,4 +6,3 @@ SFX_02_49_Ch1: ; 8569 (2:4569)
unknownsfx0x20 4, 241, 128, 7
unknownsfx0x20 4, 0, 0, 0
endchannel
-; 0x8580 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_4a.asm b/audio/sfx/sfx_02_4a.asm
index 278c927d..1cb0e857 100644..100755
--- a/audio/sfx/sfx_02_4a.asm
+++ b/audio/sfx/sfx_02_4a.asm
@@ -7,4 +7,3 @@ SFX_02_4a_Ch1: ; 8580 (2:4580)
unknownsfx0x10 8
unknownsfx0x20 1, 0, 0, 0
endchannel
-; 0x8595 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_4b.asm b/audio/sfx/sfx_02_4b.asm
index 923aa8e7..173a6c9d 100644..100755
--- a/audio/sfx/sfx_02_4b.asm
+++ b/audio/sfx/sfx_02_4b.asm
@@ -8,4 +8,3 @@ SFX_02_4b_Ch1: ; 8595 (2:4595)
unknownsfx0x20 15, 23, 0, 7
unknownsfx0x10 8
endchannel
-; 0x85b0 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_4c.asm b/audio/sfx/sfx_02_4c.asm
index b9063058..a52fefcf 100644..100755
--- a/audio/sfx/sfx_02_4c.asm
+++ b/audio/sfx/sfx_02_4c.asm
@@ -8,4 +8,3 @@ SFX_02_4c_Ch1: ; 85b0 (2:45b0)
unknownsfx0x20 15, 23, 0, 5
unknownsfx0x10 8
endchannel
-; 0x85cb \ No newline at end of file
diff --git a/audio/sfx/sfx_02_4d.asm b/audio/sfx/sfx_02_4d.asm
index 1d492dde..c7063722 100644..100755
--- a/audio/sfx/sfx_02_4d.asm
+++ b/audio/sfx/sfx_02_4d.asm
@@ -4,4 +4,3 @@ SFX_02_4d_Ch1: ; 85cb (2:45cb)
unknownsfx0x20 15, 210, 0, 5
unknownsfx0x10 8
endchannel
-; 0x85d6 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_4e.asm b/audio/sfx/sfx_02_4e.asm
index b690ee55..78b64198 100644..100755
--- a/audio/sfx/sfx_02_4e.asm
+++ b/audio/sfx/sfx_02_4e.asm
@@ -4,4 +4,3 @@ SFX_02_4e_Ch1: ; 85d6 (2:45d6)
unknownsfx0x20 15, 242, 0, 4
unknownsfx0x10 8
endchannel
-; 0x85e1 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_4f.asm b/audio/sfx/sfx_02_4f.asm
index 32ebf8cc..53e523d0 100644..100755
--- a/audio/sfx/sfx_02_4f.asm
+++ b/audio/sfx/sfx_02_4f.asm
@@ -4,4 +4,3 @@ SFX_02_4f_Ch1: ; 85e1 (2:45e1)
unknownnoise0x20 2, 241, 34
unknownnoise0x20 1, 0, 0
endchannel
-; 0x85ee \ No newline at end of file
diff --git a/audio/sfx/sfx_02_50.asm b/audio/sfx/sfx_02_50.asm
index 023b255f..5a5cd2b6 100644..100755
--- a/audio/sfx/sfx_02_50.asm
+++ b/audio/sfx/sfx_02_50.asm
@@ -16,4 +16,3 @@ SFX_02_50_Ch1: ; 85ee (2:45ee)
unknownnoise0x20 2, 65, 18
unknownnoise0x20 2, 0, 0
endchannel
-; 0x861f \ No newline at end of file
diff --git a/audio/sfx/sfx_02_51.asm b/audio/sfx/sfx_02_51.asm
index 956fb558..cb55b512 100644..100755
--- a/audio/sfx/sfx_02_51.asm
+++ b/audio/sfx/sfx_02_51.asm
@@ -16,4 +16,3 @@ SFX_02_51_Ch2: ; 8636 (2:4636)
unknownsfx0x20 15, 240, 1, 4
unknownsfx0x20 1, 0, 0, 0
endchannel
-; 0x8649 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_52.asm b/audio/sfx/sfx_02_52.asm
index 9534b08d..22b72929 100644..100755
--- a/audio/sfx/sfx_02_52.asm
+++ b/audio/sfx/sfx_02_52.asm
@@ -4,4 +4,3 @@ SFX_02_52_Ch1: ; 8649 (2:4649)
unknownsfx0x20 15, 210, 0, 7
unknownsfx0x10 8
endchannel
-; 0x8654 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_53.asm b/audio/sfx/sfx_02_53.asm
index 4b739723..e81724b0 100644..100755
--- a/audio/sfx/sfx_02_53.asm
+++ b/audio/sfx/sfx_02_53.asm
@@ -8,4 +8,3 @@ SFX_02_53_Ch1: ; 8654 (2:4654)
unknownnoise0x20 8, 244, 85
unknownnoise0x20 8, 241, 68
endchannel
-; 0x866d \ No newline at end of file
diff --git a/audio/sfx/sfx_02_54.asm b/audio/sfx/sfx_02_54.asm
index 4f3343fb..72f79c78 100644..100755
--- a/audio/sfx/sfx_02_54.asm
+++ b/audio/sfx/sfx_02_54.asm
@@ -20,4 +20,3 @@ SFX_02_54_Ch2: ; 868c (2:468c)
unknownsfx0x20 15, 240, 130, 4
unknownsfx0x20 15, 242, 130, 4
endchannel
-; 0x86ab \ No newline at end of file
diff --git a/audio/sfx/sfx_02_55.asm b/audio/sfx/sfx_02_55.asm
index ec138968..57182f34 100644..100755
--- a/audio/sfx/sfx_02_55.asm
+++ b/audio/sfx/sfx_02_55.asm
@@ -10,4 +10,3 @@ SFX_02_55_Ch1: ; 86ab (2:46ab)
unknownsfx0x20 15, 226, 0, 7
unknownsfx0x10 8
endchannel
-; 0x86c8 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_56.asm b/audio/sfx/sfx_02_56.asm
index 5dfab306..d27fba19 100644..100755
--- a/audio/sfx/sfx_02_56.asm
+++ b/audio/sfx/sfx_02_56.asm
@@ -5,4 +5,3 @@ SFX_02_56_Ch1: ; 83e1 (2:43e1)
unknownnoise0x20 8, 244, 85
unknownnoise0x20 8, 241, 68
endchannel
-; 0x83f1 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_57.asm b/audio/sfx/sfx_02_57.asm
index 1b7e4237..8f8d06e2 100644..100755
--- a/audio/sfx/sfx_02_57.asm
+++ b/audio/sfx/sfx_02_57.asm
@@ -2,4 +2,3 @@ SFX_02_57_Ch1: ; 83f1 (2:43f1)
unknownnoise0x20 9, 241, 68
unknownnoise0x20 8, 209, 67
endchannel
-; 0x83f8 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_58.asm b/audio/sfx/sfx_02_58.asm
index b98ad41e..3a9836fb 100644..100755
--- a/audio/sfx/sfx_02_58.asm
+++ b/audio/sfx/sfx_02_58.asm
@@ -9,4 +9,3 @@ SFX_02_58_Ch2: ; 83ff (2:43ff)
unknownsfx0x20 2, 8, 0, 0
unknownsfx0x20 8, 177, 65, 7
endchannel
-; 0x840a \ No newline at end of file
diff --git a/audio/sfx/sfx_02_59.asm b/audio/sfx/sfx_02_59.asm
index a4985d1f..c4ea93f7 100644..100755
--- a/audio/sfx/sfx_02_59.asm
+++ b/audio/sfx/sfx_02_59.asm
@@ -9,4 +9,3 @@ SFX_02_59_Ch2: ; 8422 (2:4422)
unknownsfx0x20 1, 8, 0, 0
unknownsfx0x20 4, 161, 97, 7
endchannel
-; 0x842d \ No newline at end of file
diff --git a/audio/sfx/sfx_02_5a.asm b/audio/sfx/sfx_02_5a.asm
index a9bb7f69..d0d6f875 100644..100755
--- a/audio/sfx/sfx_02_5a.asm
+++ b/audio/sfx/sfx_02_5a.asm
@@ -11,4 +11,3 @@ SFX_02_5a_Ch2: ; 8438 (2:4438)
unknownsfx0x20 4, 145, 193, 6
unknownsfx0x20 8, 162, 161, 7
endchannel
-; 0x8447 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_5b.asm b/audio/sfx/sfx_02_5b.asm
index e14879ed..b09369db 100644..100755
--- a/audio/sfx/sfx_02_5b.asm
+++ b/audio/sfx/sfx_02_5b.asm
@@ -4,4 +4,3 @@ SFX_02_5b_Ch1: ; 8447 (2:4447)
unknownsfx0x20 15, 241, 0, 3
unknownsfx0x10 8
endchannel
-; 0x8452 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_5c.asm b/audio/sfx/sfx_02_5c.asm
index 34866769..477fd03b 100644..100755
--- a/audio/sfx/sfx_02_5c.asm
+++ b/audio/sfx/sfx_02_5c.asm
@@ -5,4 +5,3 @@ SFX_02_5c_Ch1: ; 8452 (2:4452)
unknownnoise0x20 12, 97, 35
unknownnoise0x20 6, 65, 84
endchannel
-; 0x8462 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_5d.asm b/audio/sfx/sfx_02_5d.asm
index 2a05d5dd..2411c9ee 100644..100755
--- a/audio/sfx/sfx_02_5d.asm
+++ b/audio/sfx/sfx_02_5d.asm
@@ -21,4 +21,3 @@ SFX_02_5d_Ch2: ; 8494 (2:4494)
unknownsfx0x20 2, 196, 161, 7
unknownsfx0x20 15, 210, 225, 7
endchannel
-; 0x84b7 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_5e.asm b/audio/sfx/sfx_02_5e.asm
index ade4d200..5f631c2d 100644..100755
--- a/audio/sfx/sfx_02_5e.asm
+++ b/audio/sfx/sfx_02_5e.asm
@@ -19,4 +19,3 @@ SFX_02_5e_Ch1: ; 83ca (2:43ca)
G_ 8
rest 12
endchannel
-; 0x83e1 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_5f.asm b/audio/sfx/sfx_02_5f.asm
index 48c6539e..c4fe674c 100644..100755
--- a/audio/sfx/sfx_02_5f.asm
+++ b/audio/sfx/sfx_02_5f.asm
@@ -7,4 +7,3 @@ SFX_02_5f_Ch1: ; 86c8 (2:46c8)
unknownsfx0x20 15, 68, 0, 7
unknownsfx0x20 15, 36, 0, 7
endchannel
-; 0x86e3 \ No newline at end of file
diff --git a/audio/sfx/sfx_02_unused.asm b/audio/sfx/sfx_02_unused.asm
index db3a8b26..bd9bdfb3 100644..100755
--- a/audio/sfx/sfx_02_unused.asm
+++ b/audio/sfx/sfx_02_unused.asm
@@ -29,4 +29,3 @@ SFX_02_unused_Ch3: ; 8719 (2:4719)
unknownnoise0x20 12, 125, 76
unknownnoise0x20 15, 211, 76
endchannel
-; 0x872f \ No newline at end of file
diff --git a/audio/sfx/sfx_08_01.asm b/audio/sfx/sfx_08_01.asm
index e5e03793..7d86e4ad 100644..100755
--- a/audio/sfx/sfx_08_01.asm
+++ b/audio/sfx/sfx_08_01.asm
@@ -1,4 +1,3 @@
SFX_08_01_Ch1: ; 202fd (8:42fd)
unknownnoise0x20 0, 193, 51
endchannel
-; 0x20301 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_02.asm b/audio/sfx/sfx_08_02.asm
index d86123b5..1fe0d185 100644..100755
--- a/audio/sfx/sfx_08_02.asm
+++ b/audio/sfx/sfx_08_02.asm
@@ -1,4 +1,3 @@
SFX_08_02_Ch1: ; 20301 (8:4301)
unknownnoise0x20 0, 177, 51
endchannel
-; 0x20305 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_03.asm b/audio/sfx/sfx_08_03.asm
index 9b29488f..141c4e5b 100644..100755
--- a/audio/sfx/sfx_08_03.asm
+++ b/audio/sfx/sfx_08_03.asm
@@ -1,4 +1,3 @@
SFX_08_03_Ch1: ; 20305 (8:4305)
unknownnoise0x20 0, 161, 51
endchannel
-; 0x20309 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_04.asm b/audio/sfx/sfx_08_04.asm
index 63c3b508..923fd349 100644..100755
--- a/audio/sfx/sfx_08_04.asm
+++ b/audio/sfx/sfx_08_04.asm
@@ -1,4 +1,3 @@
SFX_08_04_Ch1: ; 20309 (8:4309)
unknownnoise0x20 0, 129, 51
endchannel
-; 0x2030d \ No newline at end of file
diff --git a/audio/sfx/sfx_08_05.asm b/audio/sfx/sfx_08_05.asm
index 6fcd5f68..54745d1f 100644..100755
--- a/audio/sfx/sfx_08_05.asm
+++ b/audio/sfx/sfx_08_05.asm
@@ -6,4 +6,3 @@ SFX_08_05_Ch1: ; 2030d (8:430d)
unknownnoise0x20 3, 130, 51
unknownnoise0x20 2, 129, 50
endchannel
-; 0x20320 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_06.asm b/audio/sfx/sfx_08_06.asm
index 6e8c2b8c..ecd2b191 100644..100755
--- a/audio/sfx/sfx_08_06.asm
+++ b/audio/sfx/sfx_08_06.asm
@@ -1,4 +1,3 @@
SFX_08_06_Ch1: ; 20320 (8:4320)
unknownnoise0x20 0, 81, 42
endchannel
-; 0x20324 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_07.asm b/audio/sfx/sfx_08_07.asm
index 5281cc7b..a520de0d 100644..100755
--- a/audio/sfx/sfx_08_07.asm
+++ b/audio/sfx/sfx_08_07.asm
@@ -2,4 +2,3 @@ SFX_08_07_Ch1: ; 20324 (8:4324)
unknownnoise0x20 1, 65, 43
unknownnoise0x20 0, 97, 42
endchannel
-; 0x2032b \ No newline at end of file
diff --git a/audio/sfx/sfx_08_08.asm b/audio/sfx/sfx_08_08.asm
index 4d28817b..6def0c55 100644..100755
--- a/audio/sfx/sfx_08_08.asm
+++ b/audio/sfx/sfx_08_08.asm
@@ -1,4 +1,3 @@
SFX_08_08_Ch1: ; 2032b (8:432b)
unknownnoise0x20 0, 129, 16
endchannel
-; 0x2032f \ No newline at end of file
diff --git a/audio/sfx/sfx_08_09.asm b/audio/sfx/sfx_08_09.asm
index 94eac4b0..c49c5cb7 100644..100755
--- a/audio/sfx/sfx_08_09.asm
+++ b/audio/sfx/sfx_08_09.asm
@@ -1,4 +1,3 @@
SFX_08_09_Ch1: ; 2032f (8:432f)
unknownnoise0x20 0, 130, 35
endchannel
-; 0x20333 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_0a.asm b/audio/sfx/sfx_08_0a.asm
index c7a3a090..f5f2ab3c 100644..100755
--- a/audio/sfx/sfx_08_0a.asm
+++ b/audio/sfx/sfx_08_0a.asm
@@ -1,4 +1,3 @@
SFX_08_0a_Ch1: ; 20333 (8:4333)
unknownnoise0x20 0, 130, 37
endchannel
-; 0x20337 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_0b.asm b/audio/sfx/sfx_08_0b.asm
index 8010f4c9..2d45ef7e 100644..100755
--- a/audio/sfx/sfx_08_0b.asm
+++ b/audio/sfx/sfx_08_0b.asm
@@ -1,4 +1,3 @@
SFX_08_0b_Ch1: ; 20337 (8:4337)
unknownnoise0x20 0, 130, 38
endchannel
-; 0x2033b \ No newline at end of file
diff --git a/audio/sfx/sfx_08_0c.asm b/audio/sfx/sfx_08_0c.asm
index 8a87cf9a..782ecf90 100644..100755
--- a/audio/sfx/sfx_08_0c.asm
+++ b/audio/sfx/sfx_08_0c.asm
@@ -1,4 +1,3 @@
SFX_08_0c_Ch1: ; 2033b (8:433b)
unknownnoise0x20 0, 161, 16
endchannel
-; 0x2033f \ No newline at end of file
diff --git a/audio/sfx/sfx_08_0d.asm b/audio/sfx/sfx_08_0d.asm
index d5997986..d9ef41d0 100644..100755
--- a/audio/sfx/sfx_08_0d.asm
+++ b/audio/sfx/sfx_08_0d.asm
@@ -1,4 +1,3 @@
SFX_08_0d_Ch1: ; 2033f (8:433f)
unknownnoise0x20 0, 162, 17
endchannel
-; 0x20343 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_0e.asm b/audio/sfx/sfx_08_0e.asm
index f98ceb2e..885225ea 100644..100755
--- a/audio/sfx/sfx_08_0e.asm
+++ b/audio/sfx/sfx_08_0e.asm
@@ -1,4 +1,3 @@
SFX_08_0e_Ch1: ; 20343 (8:4343)
unknownnoise0x20 0, 162, 80
endchannel
-; 0x20347 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_0f.asm b/audio/sfx/sfx_08_0f.asm
index 22452696..64f1cbe4 100644..100755
--- a/audio/sfx/sfx_08_0f.asm
+++ b/audio/sfx/sfx_08_0f.asm
@@ -2,4 +2,3 @@ SFX_08_0f_Ch1: ; 20347 (8:4347)
unknownnoise0x20 0, 161, 24
unknownnoise0x20 0, 49, 51
endchannel
-; 0x2034e \ No newline at end of file
diff --git a/audio/sfx/sfx_08_10.asm b/audio/sfx/sfx_08_10.asm
index cc94f730..3643a769 100644..100755
--- a/audio/sfx/sfx_08_10.asm
+++ b/audio/sfx/sfx_08_10.asm
@@ -2,4 +2,3 @@ SFX_08_10_Ch1: ; 2034e (8:434e)
unknownnoise0x20 2, 145, 40
unknownnoise0x20 0, 113, 24
endchannel
-; 0x20355 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_11.asm b/audio/sfx/sfx_08_11.asm
index 7ac28d21..bec0220f 100644..100755
--- a/audio/sfx/sfx_08_11.asm
+++ b/audio/sfx/sfx_08_11.asm
@@ -1,4 +1,3 @@
SFX_08_11_Ch1: ; 20355 (8:4355)
unknownnoise0x20 0, 145, 34
endchannel
-; 0x20359 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_12.asm b/audio/sfx/sfx_08_12.asm
index 3d5bebad..7e93326b 100644..100755
--- a/audio/sfx/sfx_08_12.asm
+++ b/audio/sfx/sfx_08_12.asm
@@ -1,4 +1,3 @@
SFX_08_12_Ch1: ; 20359 (8:4359)
unknownnoise0x20 0, 113, 34
endchannel
-; 0x2035d \ No newline at end of file
diff --git a/audio/sfx/sfx_08_13.asm b/audio/sfx/sfx_08_13.asm
index e6712805..7feb8deb 100644..100755
--- a/audio/sfx/sfx_08_13.asm
+++ b/audio/sfx/sfx_08_13.asm
@@ -1,4 +1,3 @@
SFX_08_13_Ch1: ; 2035d (8:435d)
unknownnoise0x20 0, 97, 34
endchannel
-; 0x20361 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_14.asm b/audio/sfx/sfx_08_14.asm
index b037b6a1..83837768 100644..100755
--- a/audio/sfx/sfx_08_14.asm
+++ b/audio/sfx/sfx_08_14.asm
@@ -19,4 +19,3 @@ SFX_08_14_Ch3: ; 20c4d (8:4c4d)
unknownnoise0x20 14, 148, 44
unknownnoise0x20 8, 129, 28
endchannel
-; 0x20c57 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_15.asm b/audio/sfx/sfx_08_15.asm
index 40cacf00..94705f71 100644..100755
--- a/audio/sfx/sfx_08_15.asm
+++ b/audio/sfx/sfx_08_15.asm
@@ -22,4 +22,3 @@ SFX_08_15_Ch3: ; 20e65 (8:4e65)
unknownnoise0x20 3, 130, 28
unknownnoise0x20 8, 113, 44
endchannel
-; 0x20e72 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_16.asm b/audio/sfx/sfx_08_16.asm
index bbe80ddb..e2109f2b 100644..100755
--- a/audio/sfx/sfx_08_16.asm
+++ b/audio/sfx/sfx_08_16.asm
@@ -15,4 +15,3 @@ SFX_08_16_Ch2: ; 20dc3 (8:4dc3)
SFX_08_16_Ch3: ; 20dd1 (8:4dd1)
endchannel
-; 0x20dd2 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_17.asm b/audio/sfx/sfx_08_17.asm
index 03587fa4..c8efc25f 100644..100755
--- a/audio/sfx/sfx_08_17.asm
+++ b/audio/sfx/sfx_08_17.asm
@@ -28,4 +28,3 @@ SFX_08_17_Ch3: ; 20b8c (8:4b8c)
unknownnoise0x20 12, 182, 76
unknownnoise0x20 15, 162, 92
endchannel
-; 0x20b99 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_18.asm b/audio/sfx/sfx_08_18.asm
index b1e97f95..fce2f3e8 100644..100755
--- a/audio/sfx/sfx_08_18.asm
+++ b/audio/sfx/sfx_08_18.asm
@@ -30,4 +30,3 @@ SFX_08_18_Ch3: ; 20f3b (8:4f3b)
unknownnoise0x20 7, 195, 76
unknownnoise0x20 8, 161, 92
endchannel
-; 0x20f4e \ No newline at end of file
diff --git a/audio/sfx/sfx_08_19.asm b/audio/sfx/sfx_08_19.asm
index 097796bc..ad3a22ad 100644..100755
--- a/audio/sfx/sfx_08_19.asm
+++ b/audio/sfx/sfx_08_19.asm
@@ -17,4 +17,3 @@ SFX_08_19_Ch2: ; 20cf0 (8:4cf0)
SFX_08_19_Ch3: ; 20d02 (8:4d02)
endchannel
-; 0x20d03 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_1a.asm b/audio/sfx/sfx_08_1a.asm
index 089460e4..96df0f42 100644..100755
--- a/audio/sfx/sfx_08_1a.asm
+++ b/audio/sfx/sfx_08_1a.asm
@@ -20,4 +20,3 @@ SFX_08_1a_Ch3: ; 20ca2 (8:4ca2)
unknownnoise0x20 15, 215, 156
unknownnoise0x20 15, 242, 172
endchannel
-; 0x20cb5 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_1b.asm b/audio/sfx/sfx_08_1b.asm
index 1eec17f5..bd7e288f 100644..100755
--- a/audio/sfx/sfx_08_1b.asm
+++ b/audio/sfx/sfx_08_1b.asm
@@ -19,4 +19,3 @@ SFX_08_1b_Ch3: ; 20cd3 (8:4cd3)
unknownnoise0x20 15, 230, 76
unknownnoise0x20 8, 177, 92
endchannel
-; 0x20cdd \ No newline at end of file
diff --git a/audio/sfx/sfx_08_1c.asm b/audio/sfx/sfx_08_1c.asm
index ec6b03a7..e3b904b0 100644..100755
--- a/audio/sfx/sfx_08_1c.asm
+++ b/audio/sfx/sfx_08_1c.asm
@@ -21,4 +21,3 @@ SFX_08_1c_Ch3: ; 20ef3 (8:4ef3)
unknownnoise0x20 11, 215, 92
unknownnoise0x20 15, 194, 76
endchannel
-; 0x20efd \ No newline at end of file
diff --git a/audio/sfx/sfx_08_1d.asm b/audio/sfx/sfx_08_1d.asm
index 7162b031..a6f82cf2 100644..100755
--- a/audio/sfx/sfx_08_1d.asm
+++ b/audio/sfx/sfx_08_1d.asm
@@ -33,4 +33,3 @@ SFX_08_1d_Ch3: ; 20a15 (8:4a15)
unknownnoise0x20 6, 212, 61
unknownnoise0x20 8, 193, 59
endchannel
-; 0x20a2e \ No newline at end of file
diff --git a/audio/sfx/sfx_08_1e.asm b/audio/sfx/sfx_08_1e.asm
index 13475f11..1312f6f2 100644..100755
--- a/audio/sfx/sfx_08_1e.asm
+++ b/audio/sfx/sfx_08_1e.asm
@@ -33,4 +33,3 @@ SFX_08_1e_Ch3: ; 20eb4 (8:4eb4)
unknownnoise0x20 3, 164, 44
unknownnoise0x20 8, 145, 60
endchannel
-; 0x20ecd \ No newline at end of file
diff --git a/audio/sfx/sfx_08_1f.asm b/audio/sfx/sfx_08_1f.asm
index a882c512..ab708929 100644..100755
--- a/audio/sfx/sfx_08_1f.asm
+++ b/audio/sfx/sfx_08_1f.asm
@@ -35,4 +35,3 @@ SFX_08_1f_Ch3: ; 20d4d (8:4d4d)
unknownnoise0x20 4, 193, 44
unknownnoise0x20 8, 161, 76
endchannel
-; 0x20d66 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_20.asm b/audio/sfx/sfx_08_20.asm
index 94a54b0a..633276a8 100644..100755
--- a/audio/sfx/sfx_08_20.asm
+++ b/audio/sfx/sfx_08_20.asm
@@ -27,4 +27,3 @@ SFX_08_20_Ch2: ; 20d8d (8:4d8d)
SFX_08_20_Ch3: ; 20db3 (8:4db3)
endchannel
-; 0x20db4 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_21.asm b/audio/sfx/sfx_08_21.asm
index 4bfaac76..5279435a 100644..100755
--- a/audio/sfx/sfx_08_21.asm
+++ b/audio/sfx/sfx_08_21.asm
@@ -38,4 +38,3 @@ SFX_08_21_Ch3: ; 20e20 (8:4e20)
unknownnoise0x20 9, 194, 44
unknownnoise0x20 4, 161, 60
endchannel
-; 0x20e3f \ No newline at end of file
diff --git a/audio/sfx/sfx_08_22.asm b/audio/sfx/sfx_08_22.asm
index b922acb3..6a54311f 100644..100755
--- a/audio/sfx/sfx_08_22.asm
+++ b/audio/sfx/sfx_08_22.asm
@@ -21,4 +21,3 @@ SFX_08_22_Ch3: ; 20c7d (8:4c7d)
unknownnoise0x20 2, 97, 33
unknownnoise0x20 8, 97, 17
endchannel
-; 0x20c87 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_23.asm b/audio/sfx/sfx_08_23.asm
index 9a78abd2..03b63546 100644..100755
--- a/audio/sfx/sfx_08_23.asm
+++ b/audio/sfx/sfx_08_23.asm
@@ -27,4 +27,3 @@ SFX_08_23_Ch3: ; 20bcf (8:4bcf)
unknownnoise0x20 8, 183, 92
unknownnoise0x20 15, 194, 93
endchannel
-; 0x20bdf \ No newline at end of file
diff --git a/audio/sfx/sfx_08_24.asm b/audio/sfx/sfx_08_24.asm
index 2bdc4e9d..f94e2535 100644..100755
--- a/audio/sfx/sfx_08_24.asm
+++ b/audio/sfx/sfx_08_24.asm
@@ -29,4 +29,3 @@ SFX_08_24_Ch3: ; 20c25 (8:4c25)
unknownnoise0x20 4, 116, 16
unknownnoise0x20 4, 113, 32
endchannel
-; 0x20c2f \ No newline at end of file
diff --git a/audio/sfx/sfx_08_25.asm b/audio/sfx/sfx_08_25.asm
index 84f8f816..55954029 100644..100755
--- a/audio/sfx/sfx_08_25.asm
+++ b/audio/sfx/sfx_08_25.asm
@@ -32,4 +32,3 @@ SFX_08_25_Ch3: ; 20afd (8:4afd)
unknownnoise0x20 12, 210, 61
unknownnoise0x20 8, 209, 44
endchannel
-; 0x20b13 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_26.asm b/audio/sfx/sfx_08_26.asm
index 90ae7cb9..c166605b 100644..100755
--- a/audio/sfx/sfx_08_26.asm
+++ b/audio/sfx/sfx_08_26.asm
@@ -22,4 +22,3 @@ SFX_08_26_Ch3: ; 20ff9 (8:4ff9)
unknownnoise0x20 3, 194, 108
unknownnoise0x20 8, 209, 92
endchannel
-; 0x21006 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_27.asm b/audio/sfx/sfx_08_27.asm
index 6eb9474d..9443379c 100644..100755
--- a/audio/sfx/sfx_08_27.asm
+++ b/audio/sfx/sfx_08_27.asm
@@ -28,4 +28,3 @@ SFX_08_27_Ch3: ; 2103c (8:503c)
unknownnoise0x20 8, 179, 76
unknownnoise0x20 8, 161, 92
endchannel
-; 0x2104f \ No newline at end of file
diff --git a/audio/sfx/sfx_08_28.asm b/audio/sfx/sfx_08_28.asm
index 2d6b2a3c..178ce5de 100644..100755
--- a/audio/sfx/sfx_08_28.asm
+++ b/audio/sfx/sfx_08_28.asm
@@ -19,4 +19,3 @@ SFX_08_28_Ch3: ; 2106d (8:506d)
unknownnoise0x20 14, 196, 60
unknownnoise0x20 8, 209, 44
endchannel
-; 0x21077 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_29.asm b/audio/sfx/sfx_08_29.asm
index 66842f0a..ff22501f 100644..100755
--- a/audio/sfx/sfx_08_29.asm
+++ b/audio/sfx/sfx_08_29.asm
@@ -28,4 +28,3 @@ SFX_08_29_Ch3: ; 21113 (8:5113)
unknownnoise0x20 3, 162, 92
unknownnoise0x20 8, 177, 108
endchannel
-; 0x21126 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_2a.asm b/audio/sfx/sfx_08_2a.asm
index d3494708..8b9aeeaf 100644..100755
--- a/audio/sfx/sfx_08_2a.asm
+++ b/audio/sfx/sfx_08_2a.asm
@@ -19,4 +19,3 @@ SFX_08_2a_Ch3: ; 20f8e (8:4f8e)
unknownnoise0x20 4, 230, 60
unknownnoise0x20 15, 242, 76
endchannel
-; 0x20f98 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_2b.asm b/audio/sfx/sfx_08_2b.asm
index 301c9712..b35755a4 100644..100755
--- a/audio/sfx/sfx_08_2b.asm
+++ b/audio/sfx/sfx_08_2b.asm
@@ -22,4 +22,3 @@ SFX_08_2b_Ch3: ; 2114c (8:514c)
unknownnoise0x20 9, 228, 124
unknownnoise0x20 15, 226, 108
endchannel
-; 0x21159 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_2c.asm b/audio/sfx/sfx_08_2c.asm
index d3844d4a..b2dbc764 100644..100755
--- a/audio/sfx/sfx_08_2c.asm
+++ b/audio/sfx/sfx_08_2c.asm
@@ -32,4 +32,3 @@ SFX_08_2c_Ch3: ; 2127c (8:527c)
unknownnoise0x20 6, 180, 60
unknownnoise0x20 8, 193, 44
endchannel
-; 0x2128f \ No newline at end of file
diff --git a/audio/sfx/sfx_08_2d.asm b/audio/sfx/sfx_08_2d.asm
index 3e28d648..4f7f5422 100644..100755
--- a/audio/sfx/sfx_08_2d.asm
+++ b/audio/sfx/sfx_08_2d.asm
@@ -16,4 +16,3 @@ SFX_08_2d_Ch2: ; 20f5d (8:4f5d)
SFX_08_2d_Ch3: ; 20f6f (8:4f6f)
endchannel
-; 0x20f70 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_2e.asm b/audio/sfx/sfx_08_2e.asm
index fea62a2f..7a6e9257 100644..100755
--- a/audio/sfx/sfx_08_2e.asm
+++ b/audio/sfx/sfx_08_2e.asm
@@ -28,4 +28,3 @@ SFX_08_2e_Ch3: ; 211dd (8:51dd)
unknownnoise0x20 2, 226, 60
unknownnoise0x20 8, 209, 44
endchannel
-; 0x211f0 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_2f.asm b/audio/sfx/sfx_08_2f.asm
index fcfa40e0..d26e86c0 100644..100755
--- a/audio/sfx/sfx_08_2f.asm
+++ b/audio/sfx/sfx_08_2f.asm
@@ -24,4 +24,3 @@ SFX_08_2f_Ch3: ; 20fc6 (8:4fc6)
unknownnoise0x20 5, 163, 60
unknownnoise0x20 8, 145, 44
endchannel
-; 0x20fd3 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_30.asm b/audio/sfx/sfx_08_30.asm
index 600b72f2..08e7da69 100644..100755
--- a/audio/sfx/sfx_08_30.asm
+++ b/audio/sfx/sfx_08_30.asm
@@ -29,4 +29,3 @@ SFX_08_30_Ch3: ; 21197 (8:5197)
unknownnoise0x20 8, 196, 108
unknownnoise0x20 15, 179, 92
endchannel
-; 0x211a7 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_31.asm b/audio/sfx/sfx_08_31.asm
index d43791b0..4c06c624 100644..100755
--- a/audio/sfx/sfx_08_31.asm
+++ b/audio/sfx/sfx_08_31.asm
@@ -27,4 +27,3 @@ SFX_08_31_Ch3: ; 21226 (8:5226)
unknownnoise0x20 1, 178, 91
unknownnoise0x20 15, 194, 76
endchannel
-; 0x21236 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_32.asm b/audio/sfx/sfx_08_32.asm
index 886df035..255d24c7 100644..100755
--- a/audio/sfx/sfx_08_32.asm
+++ b/audio/sfx/sfx_08_32.asm
@@ -36,4 +36,3 @@ SFX_08_32_Ch3: ; 210c1 (8:50c1)
unknownnoise0x20 5, 146, 26
unknownnoise0x20 8, 129, 24
endchannel
-; 0x210dd \ No newline at end of file
diff --git a/audio/sfx/sfx_08_33.asm b/audio/sfx/sfx_08_33.asm
index 098dd501..55b09fb1 100644..100755
--- a/audio/sfx/sfx_08_33.asm
+++ b/audio/sfx/sfx_08_33.asm
@@ -22,4 +22,3 @@ SFX_08_33_Ch3: ; 212b5 (8:52b5)
unknownnoise0x20 8, 196, 69
unknownnoise0x20 8, 177, 68
endchannel
-; 0x212c2 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_34.asm b/audio/sfx/sfx_08_34.asm
index f355ed72..cabd1ebe 100644..100755
--- a/audio/sfx/sfx_08_34.asm
+++ b/audio/sfx/sfx_08_34.asm
@@ -22,4 +22,3 @@ SFX_08_34_Ch3: ; 212e8 (8:52e8)
unknownnoise0x20 14, 210, 86
unknownnoise0x20 8, 209, 102
endchannel
-; 0x212f5 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_35.asm b/audio/sfx/sfx_08_35.asm
index d55d627c..732f7a1e 100644..100755
--- a/audio/sfx/sfx_08_35.asm
+++ b/audio/sfx/sfx_08_35.asm
@@ -25,4 +25,3 @@ SFX_08_35_Ch2: ; 21318 (8:5318)
SFX_08_35_Ch3: ; 2133a (8:533a)
endchannel
-; 0x2133b \ No newline at end of file
diff --git a/audio/sfx/sfx_08_36.asm b/audio/sfx/sfx_08_36.asm
index f51a37a0..47d08af1 100644..100755
--- a/audio/sfx/sfx_08_36.asm
+++ b/audio/sfx/sfx_08_36.asm
@@ -22,4 +22,3 @@ SFX_08_36_Ch3: ; 21361 (8:5361)
unknownnoise0x20 1, 162, 57
unknownnoise0x20 8, 145, 73
endchannel
-; 0x2136e \ No newline at end of file
diff --git a/audio/sfx/sfx_08_37.asm b/audio/sfx/sfx_08_37.asm
index 813c4504..8df47703 100644..100755
--- a/audio/sfx/sfx_08_37.asm
+++ b/audio/sfx/sfx_08_37.asm
@@ -23,4 +23,3 @@ SFX_08_37_Ch3: ; 20a58 (8:4a58)
unknownnoise0x20 15, 215, 60
unknownnoise0x20 8, 193, 44
endchannel
-; 0x20a65 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_38.asm b/audio/sfx/sfx_08_38.asm
index b162539e..77df04e1 100644..100755
--- a/audio/sfx/sfx_08_38.asm
+++ b/audio/sfx/sfx_08_38.asm
@@ -31,4 +31,3 @@ SFX_08_38_Ch3: ; 20aab (8:4aab)
unknownnoise0x20 12, 183, 76
unknownnoise0x20 15, 162, 92
endchannel
-; 0x20abb \ No newline at end of file
diff --git a/audio/sfx/sfx_08_39.asm b/audio/sfx/sfx_08_39.asm
index ecce76f2..a4d0e0a4 100644..100755
--- a/audio/sfx/sfx_08_39.asm
+++ b/audio/sfx/sfx_08_39.asm
@@ -24,4 +24,3 @@ SFX_08_39_Ch3: ; 20b41 (8:4b41)
unknownnoise0x20 10, 182, 44
unknownnoise0x20 8, 145, 28
endchannel
-; 0x20b4e \ No newline at end of file
diff --git a/audio/sfx/sfx_08_3a.asm b/audio/sfx/sfx_08_3a.asm
index 24cb206c..afbc50d4 100644..100755
--- a/audio/sfx/sfx_08_3a.asm
+++ b/audio/sfx/sfx_08_3a.asm
@@ -61,4 +61,3 @@ SFX_08_3a_Ch3: ; 239b0 (8:79b0)
rest 1
A_ 8
endchannel
-; 0x239c7 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_3b.asm b/audio/sfx/sfx_08_3b.asm
index 910cf9dc..cb7c9a52 100644..100755
--- a/audio/sfx/sfx_08_3b.asm
+++ b/audio/sfx/sfx_08_3b.asm
@@ -67,4 +67,3 @@ SFX_08_3b_Ch3: ; 239fe (8:79fe)
rest 1
A_ 8
endchannel
-; 0x23a13 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_3c.asm b/audio/sfx/sfx_08_3c.asm
index e9ebca58..0ac2343c 100644..100755
--- a/audio/sfx/sfx_08_3c.asm
+++ b/audio/sfx/sfx_08_3c.asm
@@ -6,4 +6,3 @@ SFX_08_3c_Ch1: ; 203dd (8:43dd)
unknownsfx0x20 8, 226, 0, 2
unknownsfx0x10 8
endchannel
-; 0x203ee \ No newline at end of file
diff --git a/audio/sfx/sfx_08_3d.asm b/audio/sfx/sfx_08_3d.asm
index c2d411af..aa9867a1 100644..100755
--- a/audio/sfx/sfx_08_3d.asm
+++ b/audio/sfx/sfx_08_3d.asm
@@ -5,4 +5,3 @@ SFX_08_3d_Ch1: ; 203ee (8:43ee)
unknownsfx0x20 15, 242, 80, 6
unknownsfx0x10 8
endchannel
-; 0x203fd \ No newline at end of file
diff --git a/audio/sfx/sfx_08_3e.asm b/audio/sfx/sfx_08_3e.asm
index 3ac78576..30aefce4 100644..100755
--- a/audio/sfx/sfx_08_3e.asm
+++ b/audio/sfx/sfx_08_3e.asm
@@ -7,4 +7,3 @@ SFX_08_3e_Ch1: ; 203fd (8:43fd)
unknownsfx0x20 15, 242, 0, 6
unknownsfx0x10 8
endchannel
-; 0x20412 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_3f.asm b/audio/sfx/sfx_08_3f.asm
index a834f917..800684d3 100644..100755
--- a/audio/sfx/sfx_08_3f.asm
+++ b/audio/sfx/sfx_08_3f.asm
@@ -2,4 +2,3 @@ SFX_08_3f_Ch1: ; 203d6 (8:43d6)
unknownnoise0x20 1, 226, 51
unknownnoise0x20 8, 225, 34
endchannel
-; 0x203dd \ No newline at end of file
diff --git a/audio/sfx/sfx_08_40.asm b/audio/sfx/sfx_08_40.asm
index 7603a54a..7dfae9a7 100644..100755
--- a/audio/sfx/sfx_08_40.asm
+++ b/audio/sfx/sfx_08_40.asm
@@ -5,4 +5,3 @@ SFX_08_40_Ch1: ; 203c3 (8:43c3)
unknownsfx0x20 0, 145, 192, 7
unknownsfx0x20 12, 161, 208, 7
endchannel
-; 0x203d6 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_41.asm b/audio/sfx/sfx_08_41.asm
index f4825bb4..ef5998cd 100644..100755
--- a/audio/sfx/sfx_08_41.asm
+++ b/audio/sfx/sfx_08_41.asm
@@ -9,4 +9,3 @@ SFX_08_41_Ch2: ; 20436 (8:4436)
duty 2
unknownsfx0x20 15, 194, 130, 7
endchannel
-; 0x2043d \ No newline at end of file
diff --git a/audio/sfx/sfx_08_42.asm b/audio/sfx/sfx_08_42.asm
index 43232843..247a68f3 100644..100755
--- a/audio/sfx/sfx_08_42.asm
+++ b/audio/sfx/sfx_08_42.asm
@@ -9,4 +9,3 @@ SFX_08_42_Ch1: ; 2043d (8:443d)
SFX_08_42_Ch2: ; 20448 (8:4448)
unknownnoise0x20 15, 162, 34
endchannel
-; 0x2044c \ No newline at end of file
diff --git a/audio/sfx/sfx_08_43.asm b/audio/sfx/sfx_08_43.asm
index 53b1676d..23e3b5f0 100644..100755
--- a/audio/sfx/sfx_08_43.asm
+++ b/audio/sfx/sfx_08_43.asm
@@ -9,4 +9,3 @@ SFX_08_43_Ch2: ; 20453 (8:4453)
unknownnoise0x20 8, 244, 34
unknownnoise0x20 15, 242, 33
endchannel
-; 0x2045d \ No newline at end of file
diff --git a/audio/sfx/sfx_08_44.asm b/audio/sfx/sfx_08_44.asm
index 59a587bb..d626f3a1 100644..100755
--- a/audio/sfx/sfx_08_44.asm
+++ b/audio/sfx/sfx_08_44.asm
@@ -11,4 +11,3 @@ SFX_08_44_Ch1: ; 2045d (8:445d)
unknownnoise0x20 2, 49, 17
unknownnoise0x20 8, 65, 51
endchannel
-; 0x2047f \ No newline at end of file
diff --git a/audio/sfx/sfx_08_45.asm b/audio/sfx/sfx_08_45.asm
index 5b22cbcc..00e5a659 100644..100755
--- a/audio/sfx/sfx_08_45.asm
+++ b/audio/sfx/sfx_08_45.asm
@@ -13,4 +13,3 @@ SFX_08_45_Ch2: ; 20490 (8:4490)
unknownsfx0x20 15, 146, 0, 6
unknownsfx0x20 15, 146, 130, 7
endchannel
-; 0x2049b \ No newline at end of file
diff --git a/audio/sfx/sfx_08_46.asm b/audio/sfx/sfx_08_46.asm
index b1d35eb1..de64873a 100644..100755
--- a/audio/sfx/sfx_08_46.asm
+++ b/audio/sfx/sfx_08_46.asm
@@ -59,4 +59,3 @@ SFX_08_46_Ch3: ; 23a44 (8:7a44)
G_ 2
G# 4
endchannel
-; 0x23a53 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_47.asm b/audio/sfx/sfx_08_47.asm
index 87e76a17..6ca2e38c 100644..100755
--- a/audio/sfx/sfx_08_47.asm
+++ b/audio/sfx/sfx_08_47.asm
@@ -1,4 +1,3 @@
SFX_08_47_Ch1: ; 204aa (8:44aa)
unknownnoise0x20 2, 161, 18
endchannel
-; 0x204ae \ No newline at end of file
diff --git a/audio/sfx/sfx_08_48.asm b/audio/sfx/sfx_08_48.asm
index ace8ada4..f974a6f9 100644..100755
--- a/audio/sfx/sfx_08_48.asm
+++ b/audio/sfx/sfx_08_48.asm
@@ -4,4 +4,3 @@ SFX_08_48_Ch1: ; 204ae (8:44ae)
unknownsfx0x20 15, 242, 128, 7
unknownsfx0x10 8
endchannel
-; 0x204b9 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_49.asm b/audio/sfx/sfx_08_49.asm
index 6219a615..0d4ef5e7 100644..100755
--- a/audio/sfx/sfx_08_49.asm
+++ b/audio/sfx/sfx_08_49.asm
@@ -4,4 +4,3 @@ SFX_08_49_Ch1: ; 204b9 (8:44b9)
unknownsfx0x20 15, 242, 0, 5
unknownsfx0x10 8
endchannel
-; 0x204c4 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_4a.asm b/audio/sfx/sfx_08_4a.asm
index 3ebc3281..d79cef4e 100644..100755
--- a/audio/sfx/sfx_08_4a.asm
+++ b/audio/sfx/sfx_08_4a.asm
@@ -1,4 +1,3 @@
SFX_08_4a_Ch1: ; 204c4 (8:44c4)
unknownnoise0x20 2, 161, 34
endchannel
-; 0x204c8 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_4b.asm b/audio/sfx/sfx_08_4b.asm
index 980af0c9..5b654931 100644..100755
--- a/audio/sfx/sfx_08_4b.asm
+++ b/audio/sfx/sfx_08_4b.asm
@@ -1,4 +1,3 @@
SFX_08_4b_Ch1: ; 204c8 (8:44c8)
unknownnoise0x20 8, 241, 84
endchannel
-; 0x204cc \ No newline at end of file
diff --git a/audio/sfx/sfx_08_4c.asm b/audio/sfx/sfx_08_4c.asm
index f7f32305..b80af081 100644..100755
--- a/audio/sfx/sfx_08_4c.asm
+++ b/audio/sfx/sfx_08_4c.asm
@@ -3,4 +3,3 @@ SFX_08_4c_Ch1: ; 204cc (8:44cc)
unknownnoise0x20 4, 255, 18
unknownnoise0x20 10, 241, 85
endchannel
-; 0x204d6 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_4d.asm b/audio/sfx/sfx_08_4d.asm
index da4fa223..3dc43ae0 100644..100755
--- a/audio/sfx/sfx_08_4d.asm
+++ b/audio/sfx/sfx_08_4d.asm
@@ -3,4 +3,3 @@ SFX_08_4d_Ch1: ; 204d6 (8:44d6)
unknownnoise0x20 8, 242, 53
unknownnoise0x20 10, 241, 85
endchannel
-; 0x204e0 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_4e.asm b/audio/sfx/sfx_08_4e.asm
index f371f7ee..db621af9 100644..100755
--- a/audio/sfx/sfx_08_4e.asm
+++ b/audio/sfx/sfx_08_4e.asm
@@ -2,4 +2,3 @@ SFX_08_4e_Ch1: ; 204e0 (8:44e0)
unknownnoise0x20 15, 159, 35
unknownnoise0x20 8, 241, 33
endchannel
-; 0x204e7 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_4f.asm b/audio/sfx/sfx_08_4f.asm
index 3200b9aa..74337020 100644..100755
--- a/audio/sfx/sfx_08_4f.asm
+++ b/audio/sfx/sfx_08_4f.asm
@@ -4,4 +4,3 @@ SFX_08_4f_Ch1: ; 204e7 (8:44e7)
unknownnoise0x20 2, 225, 58
unknownnoise0x20 6, 241, 52
endchannel
-; 0x204f4 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_50.asm b/audio/sfx/sfx_08_50.asm
index 176da9c1..ae3f9974 100644..100755
--- a/audio/sfx/sfx_08_50.asm
+++ b/audio/sfx/sfx_08_50.asm
@@ -3,4 +3,3 @@ SFX_08_50_Ch1: ; 204f4 (8:44f4)
unknownnoise0x20 2, 244, 20
unknownnoise0x20 15, 241, 50
endchannel
-; 0x204fe \ No newline at end of file
diff --git a/audio/sfx/sfx_08_51.asm b/audio/sfx/sfx_08_51.asm
index 85cd06bb..bd4f3b24 100644..100755
--- a/audio/sfx/sfx_08_51.asm
+++ b/audio/sfx/sfx_08_51.asm
@@ -4,4 +4,3 @@ SFX_08_51_Ch1: ; 204fe (8:44fe)
unknownnoise0x20 8, 244, 34
unknownnoise0x20 15, 242, 33
endchannel
-; 0x2050b \ No newline at end of file
diff --git a/audio/sfx/sfx_08_52.asm b/audio/sfx/sfx_08_52.asm
index d5ca41b6..9bf7c91d 100644..100755
--- a/audio/sfx/sfx_08_52.asm
+++ b/audio/sfx/sfx_08_52.asm
@@ -4,4 +4,3 @@ SFX_08_52_Ch1: ; 2050b (8:450b)
unknownnoise0x20 6, 242, 35
loopchannel 4, SFX_08_52_Ch1
endchannel
-; 0x20519 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_53.asm b/audio/sfx/sfx_08_53.asm
index 07215881..c61465e9 100644..100755
--- a/audio/sfx/sfx_08_53.asm
+++ b/audio/sfx/sfx_08_53.asm
@@ -4,4 +4,3 @@ SFX_08_53_Ch1: ; 20519 (8:4519)
unknownnoise0x20 6, 242, 35
unknownnoise0x20 15, 242, 34
endchannel
-; 0x20526 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_54.asm b/audio/sfx/sfx_08_54.asm
index 019cb3a1..25a2c4fd 100644..100755
--- a/audio/sfx/sfx_08_54.asm
+++ b/audio/sfx/sfx_08_54.asm
@@ -4,4 +4,3 @@ SFX_08_54_Ch1: ; 20526 (8:4526)
unknownnoise0x20 8, 242, 84
unknownnoise0x20 8, 241, 101
endchannel
-; 0x20533 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_55.asm b/audio/sfx/sfx_08_55.asm
index 93049b71..caecb7ce 100644..100755
--- a/audio/sfx/sfx_08_55.asm
+++ b/audio/sfx/sfx_08_55.asm
@@ -8,4 +8,3 @@ SFX_08_55_Ch1: ; 20533 (8:4533)
unknownnoise0x20 12, 145, 16
unknownnoise0x20 8, 242, 65
endchannel
-; 0x2054c \ No newline at end of file
diff --git a/audio/sfx/sfx_08_56.asm b/audio/sfx/sfx_08_56.asm
index 05d62e90..d5653379 100644..100755
--- a/audio/sfx/sfx_08_56.asm
+++ b/audio/sfx/sfx_08_56.asm
@@ -3,4 +3,3 @@ SFX_08_56_Ch1: ; 2054c (8:454c)
unknownnoise0x20 1, 180, 34
unknownnoise0x20 8, 241, 68
endchannel
-; 0x20556 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_57.asm b/audio/sfx/sfx_08_57.asm
index d8fa8880..40e0ea8f 100644..100755
--- a/audio/sfx/sfx_08_57.asm
+++ b/audio/sfx/sfx_08_57.asm
@@ -4,4 +4,3 @@ SFX_08_57_Ch1: ; 20556 (8:4556)
unknownnoise0x20 4, 241, 68
unknownnoise0x20 8, 241, 85
endchannel
-; 0x20563 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_58.asm b/audio/sfx/sfx_08_58.asm
index 66a07ba4..3cb23fb0 100644..100755
--- a/audio/sfx/sfx_08_58.asm
+++ b/audio/sfx/sfx_08_58.asm
@@ -2,4 +2,3 @@ SFX_08_58_Ch1: ; 20563 (8:4563)
unknownnoise0x20 4, 255, 85
unknownnoise0x20 8, 241, 101
endchannel
-; 0x2056a \ No newline at end of file
diff --git a/audio/sfx/sfx_08_59.asm b/audio/sfx/sfx_08_59.asm
index b67845d6..c42f6127 100644..100755
--- a/audio/sfx/sfx_08_59.asm
+++ b/audio/sfx/sfx_08_59.asm
@@ -3,4 +3,3 @@ SFX_08_59_Ch1: ; 2056a (8:456a)
unknownnoise0x20 2, 196, 34
unknownnoise0x20 8, 242, 52
endchannel
-; 0x20574 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_5a.asm b/audio/sfx/sfx_08_5a.asm
index 6d9994ab..282fea80 100644..100755
--- a/audio/sfx/sfx_08_5a.asm
+++ b/audio/sfx/sfx_08_5a.asm
@@ -2,4 +2,3 @@ SFX_08_5a_Ch1: ; 20574 (8:4574)
unknownnoise0x20 4, 241, 52
unknownnoise0x20 15, 242, 100
endchannel
-; 0x2057b \ No newline at end of file
diff --git a/audio/sfx/sfx_08_5b.asm b/audio/sfx/sfx_08_5b.asm
index 2a1cc2fa..7bf3e2c8 100644..100755
--- a/audio/sfx/sfx_08_5b.asm
+++ b/audio/sfx/sfx_08_5b.asm
@@ -2,4 +2,3 @@ SFX_08_5b_Ch1: ; 2057b (8:457b)
unknownnoise0x20 2, 241, 34
unknownnoise0x20 15, 242, 18
endchannel
-; 0x20582 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_5c.asm b/audio/sfx/sfx_08_5c.asm
index f395fa7e..25618291 100644..100755
--- a/audio/sfx/sfx_08_5c.asm
+++ b/audio/sfx/sfx_08_5c.asm
@@ -3,4 +3,3 @@ SFX_08_5c_Ch1: ; 20582 (8:4582)
unknownnoise0x20 15, 244, 1
unknownnoise0x20 15, 242, 1
endchannel
-; 0x2058c \ No newline at end of file
diff --git a/audio/sfx/sfx_08_5d.asm b/audio/sfx/sfx_08_5d.asm
index 2b54b1b9..9bd39269 100644..100755
--- a/audio/sfx/sfx_08_5d.asm
+++ b/audio/sfx/sfx_08_5d.asm
@@ -2,4 +2,3 @@ SFX_08_5d_Ch1: ; 2058c (8:458c)
unknownnoise0x20 8, 241, 50
unknownnoise0x20 8, 241, 51
endchannel
-; 0x20593 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_5e.asm b/audio/sfx/sfx_08_5e.asm
index 24159908..a765d263 100644..100755
--- a/audio/sfx/sfx_08_5e.asm
+++ b/audio/sfx/sfx_08_5e.asm
@@ -14,4 +14,3 @@ SFX_08_5e_Ch2: ; 205a4 (8:45a4)
unknownnoise0x20 0, 209, 34
unknownnoise0x20 6, 161, 50
endchannel
-; 0x205b1 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_5f.asm b/audio/sfx/sfx_08_5f.asm
index b8084264..0cb02ba3 100644..100755
--- a/audio/sfx/sfx_08_5f.asm
+++ b/audio/sfx/sfx_08_5f.asm
@@ -4,4 +4,3 @@ SFX_08_5f_Ch1: ; 205b1 (8:45b1)
unknownnoise0x20 3, 194, 51
unknownnoise0x20 8, 241, 84
endchannel
-; 0x205be \ No newline at end of file
diff --git a/audio/sfx/sfx_08_60.asm b/audio/sfx/sfx_08_60.asm
index fcf2bb8b..7aa37833 100644..100755
--- a/audio/sfx/sfx_08_60.asm
+++ b/audio/sfx/sfx_08_60.asm
@@ -2,4 +2,3 @@ SFX_08_60_Ch1: ; 205be (8:45be)
unknownnoise0x20 12, 241, 84
unknownnoise0x20 8, 241, 100
endchannel
-; 0x205c5 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_61.asm b/audio/sfx/sfx_08_61.asm
index 39c12c1e..343a5c0c 100644..100755
--- a/audio/sfx/sfx_08_61.asm
+++ b/audio/sfx/sfx_08_61.asm
@@ -5,4 +5,3 @@ SFX_08_61_Ch1: ; 205c5 (8:45c5)
unknownnoise0x20 15, 130, 50
unknownnoise0x20 8, 241, 52
endchannel
-; 0x205d5 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_62.asm b/audio/sfx/sfx_08_62.asm
index 13f4b95a..a7cfed2d 100644..100755
--- a/audio/sfx/sfx_08_62.asm
+++ b/audio/sfx/sfx_08_62.asm
@@ -2,4 +2,3 @@ SFX_08_62_Ch1: ; 205d5 (8:45d5)
unknownnoise0x20 2, 210, 50
unknownnoise0x20 15, 242, 67
endchannel
-; 0x205dc \ No newline at end of file
diff --git a/audio/sfx/sfx_08_63.asm b/audio/sfx/sfx_08_63.asm
index bd5b9e2f..432d088c 100644..100755
--- a/audio/sfx/sfx_08_63.asm
+++ b/audio/sfx/sfx_08_63.asm
@@ -5,4 +5,3 @@ SFX_08_63_Ch1: ; 205dc (8:45dc)
unknownnoise0x20 7, 100, 0
unknownnoise0x20 15, 242, 85
endchannel
-; 0x205ec \ No newline at end of file
diff --git a/audio/sfx/sfx_08_64.asm b/audio/sfx/sfx_08_64.asm
index b615919f..c34d64ce 100644..100755
--- a/audio/sfx/sfx_08_64.asm
+++ b/audio/sfx/sfx_08_64.asm
@@ -10,4 +10,3 @@ SFX_08_64_Ch2: ; 205f7 (8:45f7)
unknownnoise0x20 15, 63, 34
unknownnoise0x20 15, 242, 33
endchannel
-; 0x205fe \ No newline at end of file
diff --git a/audio/sfx/sfx_08_65.asm b/audio/sfx/sfx_08_65.asm
index e0368e06..a92539c3 100644..100755
--- a/audio/sfx/sfx_08_65.asm
+++ b/audio/sfx/sfx_08_65.asm
@@ -5,4 +5,3 @@ SFX_08_65_Ch1: ; 205fe (8:45fe)
unknownnoise0x20 8, 242, 66
unknownnoise0x20 15, 242, 65
endchannel
-; 0x2060e \ No newline at end of file
diff --git a/audio/sfx/sfx_08_66.asm b/audio/sfx/sfx_08_66.asm
index 07f1ab05..d72b0349 100644..100755
--- a/audio/sfx/sfx_08_66.asm
+++ b/audio/sfx/sfx_08_66.asm
@@ -7,4 +7,3 @@ SFX_08_66_Ch1: ; 2060e (8:460e)
unknownnoise0x20 8, 255, 84
unknownnoise0x20 15, 242, 84
endchannel
-; 0x20624 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_67.asm b/audio/sfx/sfx_08_67.asm
index aa327873..6e94addf 100644..100755
--- a/audio/sfx/sfx_08_67.asm
+++ b/audio/sfx/sfx_08_67.asm
@@ -25,4 +25,3 @@ SFX_08_67_Ch3: ; 2064a (8:464a)
unknownnoise0x20 3, 161, 17
loopchannel 10, SFX_08_67_Ch3
endchannel
-; 0x20655 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_68.asm b/audio/sfx/sfx_08_68.asm
index efa46f92..691b9b1f 100644..100755
--- a/audio/sfx/sfx_08_68.asm
+++ b/audio/sfx/sfx_08_68.asm
@@ -19,4 +19,3 @@ SFX_08_68_Ch3: ; 20673 (8:4673)
unknownnoise0x20 1, 209, 41
loopchannel 6, SFX_08_68_Ch3
endchannel
-; 0x2067e \ No newline at end of file
diff --git a/audio/sfx/sfx_08_69.asm b/audio/sfx/sfx_08_69.asm
index 26395cfa..f202a156 100644..100755
--- a/audio/sfx/sfx_08_69.asm
+++ b/audio/sfx/sfx_08_69.asm
@@ -16,4 +16,3 @@ SFX_08_69_Ch2: ; 20695 (8:4695)
unknownnoise0x20 12, 245, 156
unknownnoise0x20 15, 244, 172
endchannel
-; 0x206a9 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_6a.asm b/audio/sfx/sfx_08_6a.asm
index efe39d5d..3076956a 100644..100755
--- a/audio/sfx/sfx_08_6a.asm
+++ b/audio/sfx/sfx_08_6a.asm
@@ -26,4 +26,3 @@ SFX_08_6a_Ch3: ; 206db (8:46db)
unknownnoise0x20 15, 195, 50
loopchannel 2, SFX_08_6a_Ch3
endchannel
-; 0x206ec \ No newline at end of file
diff --git a/audio/sfx/sfx_08_6b.asm b/audio/sfx/sfx_08_6b.asm
index d0491d28..60783be6 100644..100755
--- a/audio/sfx/sfx_08_6b.asm
+++ b/audio/sfx/sfx_08_6b.asm
@@ -19,4 +19,3 @@ SFX_08_6b_Ch2: ; 2070b (8:470b)
loopchannel 5, SFX_08_6b_Ch2
unknownnoise0x20 8, 129, 18
endchannel
-; 0x20722 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_6c.asm b/audio/sfx/sfx_08_6c.asm
index c9a020cd..cf83608d 100644..100755
--- a/audio/sfx/sfx_08_6c.asm
+++ b/audio/sfx/sfx_08_6c.asm
@@ -23,4 +23,3 @@ SFX_08_6c_Ch3: ; 20748 (8:4748)
unknownnoise0x20 15, 244, 65
loopchannel 3, SFX_08_6c_Ch3
endchannel
-; 0x20759 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_6d.asm b/audio/sfx/sfx_08_6d.asm
index 6e94d9eb..6971a30e 100644..100755
--- a/audio/sfx/sfx_08_6d.asm
+++ b/audio/sfx/sfx_08_6d.asm
@@ -23,4 +23,3 @@ SFX_08_6d_Ch3: ; 20787 (8:4787)
unknownnoise0x20 2, 210, 42
loopchannel 21, SFX_08_6d_Ch3
endchannel
-; 0x20792 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_6e.asm b/audio/sfx/sfx_08_6e.asm
index 3f0a40d5..00b2c148 100644..100755
--- a/audio/sfx/sfx_08_6e.asm
+++ b/audio/sfx/sfx_08_6e.asm
@@ -25,4 +25,3 @@ SFX_08_6e_Ch3: ; 207c0 (8:47c0)
unknownnoise0x20 5, 210, 18
loopchannel 9, SFX_08_6e_Ch3
endchannel
-; 0x207d1 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_6f.asm b/audio/sfx/sfx_08_6f.asm
index bb5ca6e8..69b85d33 100644..100755
--- a/audio/sfx/sfx_08_6f.asm
+++ b/audio/sfx/sfx_08_6f.asm
@@ -19,4 +19,3 @@ SFX_08_6f_Ch3: ; 207ef (8:47ef)
unknownnoise0x20 4, 242, 68
loopchannel 9, SFX_08_6f_Ch3
endchannel
-; 0x207fa \ No newline at end of file
diff --git a/audio/sfx/sfx_08_70.asm b/audio/sfx/sfx_08_70.asm
index 01c90d9a..7a07b340 100644..100755
--- a/audio/sfx/sfx_08_70.asm
+++ b/audio/sfx/sfx_08_70.asm
@@ -30,4 +30,3 @@ SFX_08_70_Ch3: ; 20834 (8:4834)
unknownnoise0x20 15, 207, 16
unknownnoise0x20 15, 194, 16
endchannel
-; 0x20847 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_71.asm b/audio/sfx/sfx_08_71.asm
index a594e0be..7b306557 100644..100755
--- a/audio/sfx/sfx_08_71.asm
+++ b/audio/sfx/sfx_08_71.asm
@@ -16,4 +16,3 @@ SFX_08_71_Ch2: ; 2085e (8:485e)
unknownsfx0x20 15, 255, 225, 7
unknownsfx0x20 15, 242, 226, 7
endchannel
-; 0x20875 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_72.asm b/audio/sfx/sfx_08_72.asm
index cfd83636..13000d01 100644..100755
--- a/audio/sfx/sfx_08_72.asm
+++ b/audio/sfx/sfx_08_72.asm
@@ -10,4 +10,3 @@ SFX_08_72_Ch2: ; 20880 (8:4880)
duty 3
unknownsfx0x20 8, 241, 1, 7
endchannel
-; 0x20887 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_73.asm b/audio/sfx/sfx_08_73.asm
index 6097a9cb..7829fbcd 100644..100755
--- a/audio/sfx/sfx_08_73.asm
+++ b/audio/sfx/sfx_08_73.asm
@@ -16,4 +16,3 @@ SFX_08_73_Ch2: ; 2089e (8:489e)
unknownsfx0x20 6, 225, 144, 6
unknownsfx0x20 8, 225, 16, 7
endchannel
-; 0x208b5 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_74.asm b/audio/sfx/sfx_08_74.asm
index ed322dcb..f8144908 100644..100755
--- a/audio/sfx/sfx_08_74.asm
+++ b/audio/sfx/sfx_08_74.asm
@@ -20,4 +20,3 @@ SFX_08_74_Ch3: ; 208d3 (8:48d3)
unknownnoise0x20 15, 255, 85
unknownnoise0x20 15, 243, 86
endchannel
-; 0x208e0 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_75.asm b/audio/sfx/sfx_08_75.asm
index 0a25cb45..cda1c65f 100644..100755
--- a/audio/sfx/sfx_08_75.asm
+++ b/audio/sfx/sfx_08_75.asm
@@ -27,4 +27,3 @@ SFX_08_75_Ch2: ; 208f0 (8:48f0)
octave 5
G# 8
endchannel
-; 0x20902 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_76.asm b/audio/sfx/sfx_08_76.asm
index 7a1891ae..b60e51aa 100644..100755
--- a/audio/sfx/sfx_08_76.asm
+++ b/audio/sfx/sfx_08_76.asm
@@ -45,4 +45,3 @@ SFX_08_76_Ch3: ; 20980 (8:4980)
unknownnoise0x20 1, 209, 41
loopchannel 26, SFX_08_76_Ch3
endchannel
-; 0x2098b \ No newline at end of file
diff --git a/audio/sfx/sfx_08_77.asm b/audio/sfx/sfx_08_77.asm
index 84def9b8..840a0ea5 100644..100755
--- a/audio/sfx/sfx_08_77.asm
+++ b/audio/sfx/sfx_08_77.asm
@@ -7,4 +7,3 @@ SFX_08_77_Ch1: ; 20412 (8:4412)
unknownsfx0x20 10, 225, 224, 7
unknownsfx0x20 1, 0, 0, 0
endchannel
-; 0x2042d \ No newline at end of file
diff --git a/audio/sfx/sfx_08_pokeflute.asm b/audio/sfx/sfx_08_pokeflute.asm
index 103e2d56..4ccf89d8 100755
--- a/audio/sfx/sfx_08_pokeflute.asm
+++ b/audio/sfx/sfx_08_pokeflute.asm
@@ -12,4 +12,3 @@ SFX_08_PokeFlute_Ch2: ; 22325 (8:6325)
rest 5
rest 5
endchannel
-; 0x2232f \ No newline at end of file
diff --git a/audio/sfx/sfx_08_pokeflute_ch3.asm b/audio/sfx/sfx_08_pokeflute_ch3.asm
index cf3f32a7..0652e673 100755
--- a/audio/sfx/sfx_08_pokeflute_ch3.asm
+++ b/audio/sfx/sfx_08_pokeflute_ch3.asm
@@ -11,4 +11,3 @@ SFX_08_PokeFlute_Ch3: ; 2049b (8:449b)
octave 6
C_ 13
endchannel
-; 0x204aa \ No newline at end of file
diff --git a/audio/sfx/sfx_08_unused.asm b/audio/sfx/sfx_08_unused.asm
index 4ba4c212..25e4840c 100755
--- a/audio/sfx/sfx_08_unused.asm
+++ b/audio/sfx/sfx_08_unused.asm
@@ -29,4 +29,3 @@ SFX_08_unused_Ch3: ; 209c1 (8:49c1)
unknownnoise0x20 12, 125, 76
unknownnoise0x20 15, 211, 76
endchannel
-; 0x209d7 \ No newline at end of file
diff --git a/audio/sfx/sfx_08_unused2.asm b/audio/sfx/sfx_08_unused2.asm
index 0bfe4dd3..1eca4432 100755
--- a/audio/sfx/sfx_08_unused2.asm
+++ b/audio/sfx/sfx_08_unused2.asm
@@ -54,4 +54,3 @@ SFX_08_unused2_Ch3: ; 22359 (8:6359)
B_ 4
rest 4
endchannel
-; 0x22370 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_01.asm b/audio/sfx/sfx_1f_01.asm
index e7a40492..bd3a2efe 100644..100755
--- a/audio/sfx/sfx_1f_01.asm
+++ b/audio/sfx/sfx_1f_01.asm
@@ -1,4 +1,3 @@
SFX_1f_01_Ch1: ; 7c2fd (1f:42fd)
unknownnoise0x20 0, 193, 51
endchannel
-; 0x7c301 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_02.asm b/audio/sfx/sfx_1f_02.asm
index bb95fe0b..9ee8923b 100644..100755
--- a/audio/sfx/sfx_1f_02.asm
+++ b/audio/sfx/sfx_1f_02.asm
@@ -1,4 +1,3 @@
SFX_1f_02_Ch1: ; 7c301 (1f:4301)
unknownnoise0x20 0, 177, 51
endchannel
-; 0x7c305 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_03.asm b/audio/sfx/sfx_1f_03.asm
index 3d6fa66a..55d249a7 100644..100755
--- a/audio/sfx/sfx_1f_03.asm
+++ b/audio/sfx/sfx_1f_03.asm
@@ -1,4 +1,3 @@
SFX_1f_03_Ch1: ; 7c305 (1f:4305)
unknownnoise0x20 0, 161, 51
endchannel
-; 0x7c309 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_04.asm b/audio/sfx/sfx_1f_04.asm
index 3d73e1a3..8906de66 100644..100755
--- a/audio/sfx/sfx_1f_04.asm
+++ b/audio/sfx/sfx_1f_04.asm
@@ -1,4 +1,3 @@
SFX_1f_04_Ch1: ; 7c309 (1f:4309)
unknownnoise0x20 0, 129, 51
endchannel
-; 0x7c30d \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_05.asm b/audio/sfx/sfx_1f_05.asm
index 3db77f2e..9c0e679b 100644..100755
--- a/audio/sfx/sfx_1f_05.asm
+++ b/audio/sfx/sfx_1f_05.asm
@@ -6,4 +6,3 @@ SFX_1f_05_Ch1: ; 7c30d (1f:430d)
unknownnoise0x20 3, 130, 51
unknownnoise0x20 2, 129, 50
endchannel
-; 0x7c320 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_06.asm b/audio/sfx/sfx_1f_06.asm
index 1d6c85cf..429f18ff 100644..100755
--- a/audio/sfx/sfx_1f_06.asm
+++ b/audio/sfx/sfx_1f_06.asm
@@ -1,4 +1,3 @@
SFX_1f_06_Ch1: ; 7c320 (1f:4320)
unknownnoise0x20 0, 81, 42
endchannel
-; 0x7c324 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_07.asm b/audio/sfx/sfx_1f_07.asm
index 69982127..1dd80c9e 100644..100755
--- a/audio/sfx/sfx_1f_07.asm
+++ b/audio/sfx/sfx_1f_07.asm
@@ -2,4 +2,3 @@ SFX_1f_07_Ch1: ; 7c324 (1f:4324)
unknownnoise0x20 1, 65, 43
unknownnoise0x20 0, 97, 42
endchannel
-; 0x7c32b \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_08.asm b/audio/sfx/sfx_1f_08.asm
index 8798fc9b..f741bdf1 100644..100755
--- a/audio/sfx/sfx_1f_08.asm
+++ b/audio/sfx/sfx_1f_08.asm
@@ -1,4 +1,3 @@
SFX_1f_08_Ch1: ; 7c32b (1f:432b)
unknownnoise0x20 0, 129, 16
endchannel
-; 0x7c32f \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_09.asm b/audio/sfx/sfx_1f_09.asm
index ef7a87bc..73ed88fa 100644..100755
--- a/audio/sfx/sfx_1f_09.asm
+++ b/audio/sfx/sfx_1f_09.asm
@@ -1,4 +1,3 @@
SFX_1f_09_Ch1: ; 7c32f (1f:432f)
unknownnoise0x20 0, 130, 35
endchannel
-; 0x7c333 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_0a.asm b/audio/sfx/sfx_1f_0a.asm
index 4b3ffa3e..fb2f620f 100644..100755
--- a/audio/sfx/sfx_1f_0a.asm
+++ b/audio/sfx/sfx_1f_0a.asm
@@ -1,4 +1,3 @@
SFX_1f_0a_Ch1: ; 7c333 (1f:4333)
unknownnoise0x20 0, 130, 37
endchannel
-; 0x7c337 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_0b.asm b/audio/sfx/sfx_1f_0b.asm
index a7f558fd..46adb73d 100644..100755
--- a/audio/sfx/sfx_1f_0b.asm
+++ b/audio/sfx/sfx_1f_0b.asm
@@ -1,4 +1,3 @@
SFX_1f_0b_Ch1: ; 7c337 (1f:4337)
unknownnoise0x20 0, 130, 38
endchannel
-; 0x7c33b \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_0c.asm b/audio/sfx/sfx_1f_0c.asm
index 50d7d56f..bd3fb373 100644..100755
--- a/audio/sfx/sfx_1f_0c.asm
+++ b/audio/sfx/sfx_1f_0c.asm
@@ -1,4 +1,3 @@
SFX_1f_0c_Ch1: ; 7c33b (1f:433b)
unknownnoise0x20 0, 161, 16
endchannel
-; 0x7c33f \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_0d.asm b/audio/sfx/sfx_1f_0d.asm
index b329482b..2f48df5b 100644..100755
--- a/audio/sfx/sfx_1f_0d.asm
+++ b/audio/sfx/sfx_1f_0d.asm
@@ -1,4 +1,3 @@
SFX_1f_0d_Ch1: ; 7c33f (1f:433f)
unknownnoise0x20 0, 162, 17
endchannel
-; 0x7c343 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_0e.asm b/audio/sfx/sfx_1f_0e.asm
index 7b36809b..88ba9d30 100644..100755
--- a/audio/sfx/sfx_1f_0e.asm
+++ b/audio/sfx/sfx_1f_0e.asm
@@ -1,4 +1,3 @@
SFX_1f_0e_Ch1: ; 7c343 (1f:4343)
unknownnoise0x20 0, 162, 80
endchannel
-; 0x7c347 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_0f.asm b/audio/sfx/sfx_1f_0f.asm
index f8e11b6d..e314bae2 100644..100755
--- a/audio/sfx/sfx_1f_0f.asm
+++ b/audio/sfx/sfx_1f_0f.asm
@@ -2,4 +2,3 @@ SFX_1f_0f_Ch1: ; 7c347 (1f:4347)
unknownnoise0x20 0, 161, 24
unknownnoise0x20 0, 49, 51
endchannel
-; 0x7c34e \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_10.asm b/audio/sfx/sfx_1f_10.asm
index 049d47a8..7c22724d 100644..100755
--- a/audio/sfx/sfx_1f_10.asm
+++ b/audio/sfx/sfx_1f_10.asm
@@ -2,4 +2,3 @@ SFX_1f_10_Ch1: ; 7c34e (1f:434e)
unknownnoise0x20 2, 145, 40
unknownnoise0x20 0, 113, 24
endchannel
-; 0x7c355 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_11.asm b/audio/sfx/sfx_1f_11.asm
index 503396fb..b36fd06b 100644..100755
--- a/audio/sfx/sfx_1f_11.asm
+++ b/audio/sfx/sfx_1f_11.asm
@@ -1,4 +1,3 @@
SFX_1f_11_Ch1: ; 7c355 (1f:4355)
unknownnoise0x20 0, 145, 34
endchannel
-; 0x7c359 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_12.asm b/audio/sfx/sfx_1f_12.asm
index 344281f5..21913c25 100644..100755
--- a/audio/sfx/sfx_1f_12.asm
+++ b/audio/sfx/sfx_1f_12.asm
@@ -1,4 +1,3 @@
SFX_1f_12_Ch1: ; 7c359 (1f:4359)
unknownnoise0x20 0, 113, 34
endchannel
-; 0x7c35d \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_13.asm b/audio/sfx/sfx_1f_13.asm
index 2eab2643..d9294eaa 100644..100755
--- a/audio/sfx/sfx_1f_13.asm
+++ b/audio/sfx/sfx_1f_13.asm
@@ -1,4 +1,3 @@
SFX_1f_13_Ch1: ; 7c35d (1f:435d)
unknownnoise0x20 0, 97, 34
endchannel
-; 0x7c361 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_14.asm b/audio/sfx/sfx_1f_14.asm
index 373bb2c3..4f52b842 100644..100755
--- a/audio/sfx/sfx_1f_14.asm
+++ b/audio/sfx/sfx_1f_14.asm
@@ -19,4 +19,3 @@ SFX_1f_14_Ch3: ; 7ca1a (1f:4a1a)
unknownnoise0x20 14, 148, 44
unknownnoise0x20 8, 129, 28
endchannel
-; 0x7ca24 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_15.asm b/audio/sfx/sfx_1f_15.asm
index b3edbdbd..0f16cb0e 100644..100755
--- a/audio/sfx/sfx_1f_15.asm
+++ b/audio/sfx/sfx_1f_15.asm
@@ -22,4 +22,3 @@ SFX_1f_15_Ch3: ; 7cc32 (1f:4c32)
unknownnoise0x20 3, 130, 28
unknownnoise0x20 8, 113, 44
endchannel
-; 0x7cc3f \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_16.asm b/audio/sfx/sfx_1f_16.asm
index 7c2346fb..450403b4 100644..100755
--- a/audio/sfx/sfx_1f_16.asm
+++ b/audio/sfx/sfx_1f_16.asm
@@ -15,4 +15,3 @@ SFX_1f_16_Ch2: ; 7cb90 (1f:4b90)
SFX_1f_16_Ch3: ; 7cb9e (1f:4b9e)
endchannel
-; 0x7cb9f \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_17.asm b/audio/sfx/sfx_1f_17.asm
index bfda0fe3..7f0d0fad 100644..100755
--- a/audio/sfx/sfx_1f_17.asm
+++ b/audio/sfx/sfx_1f_17.asm
@@ -28,4 +28,3 @@ SFX_1f_17_Ch3: ; 7c959 (1f:4959)
unknownnoise0x20 12, 182, 76
unknownnoise0x20 15, 162, 92
endchannel
-; 0x7c966 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_18.asm b/audio/sfx/sfx_1f_18.asm
index 7e532f3e..066128bb 100644..100755
--- a/audio/sfx/sfx_1f_18.asm
+++ b/audio/sfx/sfx_1f_18.asm
@@ -30,4 +30,3 @@ SFX_1f_18_Ch3: ; 7cd08 (1f:4d08)
unknownnoise0x20 7, 195, 76
unknownnoise0x20 8, 161, 92
endchannel
-; 0x7cd1b \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_19.asm b/audio/sfx/sfx_1f_19.asm
index c9609be5..119a5f9f 100644..100755
--- a/audio/sfx/sfx_1f_19.asm
+++ b/audio/sfx/sfx_1f_19.asm
@@ -17,4 +17,3 @@ SFX_1f_19_Ch2: ; 7cabd (1f:4abd)
SFX_1f_19_Ch3: ; 7cacf (1f:4acf)
endchannel
-; 0x7cad0 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_1a.asm b/audio/sfx/sfx_1f_1a.asm
index 2498f122..38a6df2a 100644..100755
--- a/audio/sfx/sfx_1f_1a.asm
+++ b/audio/sfx/sfx_1f_1a.asm
@@ -20,4 +20,3 @@ SFX_1f_1a_Ch3: ; 7ca6f (1f:4a6f)
unknownnoise0x20 15, 215, 156
unknownnoise0x20 15, 242, 172
endchannel
-; 0x7ca82 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_1b.asm b/audio/sfx/sfx_1f_1b.asm
index df3167b1..12c4a66b 100644..100755
--- a/audio/sfx/sfx_1f_1b.asm
+++ b/audio/sfx/sfx_1f_1b.asm
@@ -19,4 +19,3 @@ SFX_1f_1b_Ch3: ; 7caa0 (1f:4aa0)
unknownnoise0x20 15, 230, 76
unknownnoise0x20 8, 177, 92
endchannel
-; 0x7caaa \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_1c.asm b/audio/sfx/sfx_1f_1c.asm
index 4e7ac177..4ed5efc6 100644..100755
--- a/audio/sfx/sfx_1f_1c.asm
+++ b/audio/sfx/sfx_1f_1c.asm
@@ -21,4 +21,3 @@ SFX_1f_1c_Ch3: ; 7ccc0 (1f:4cc0)
unknownnoise0x20 11, 215, 92
unknownnoise0x20 15, 194, 76
endchannel
-; 0x7ccca \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_1d.asm b/audio/sfx/sfx_1f_1d.asm
index 703b55d5..ce7f4b4c 100644..100755
--- a/audio/sfx/sfx_1f_1d.asm
+++ b/audio/sfx/sfx_1f_1d.asm
@@ -33,4 +33,3 @@ SFX_1f_1d_Ch3: ; 7c7e2 (1f:47e2)
unknownnoise0x20 6, 212, 61
unknownnoise0x20 8, 193, 59
endchannel
-; 0x7c7fb \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_1e.asm b/audio/sfx/sfx_1f_1e.asm
index 4733a534..86f88f54 100644..100755
--- a/audio/sfx/sfx_1f_1e.asm
+++ b/audio/sfx/sfx_1f_1e.asm
@@ -33,4 +33,3 @@ SFX_1f_1e_Ch3: ; 7cc81 (1f:4c81)
unknownnoise0x20 3, 164, 44
unknownnoise0x20 8, 145, 60
endchannel
-; 0x7cc9a \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_1f.asm b/audio/sfx/sfx_1f_1f.asm
index 9188186b..2733036b 100644..100755
--- a/audio/sfx/sfx_1f_1f.asm
+++ b/audio/sfx/sfx_1f_1f.asm
@@ -35,4 +35,3 @@ SFX_1f_1f_Ch3: ; 7cb1a (1f:4b1a)
unknownnoise0x20 4, 193, 44
unknownnoise0x20 8, 161, 76
endchannel
-; 0x7cb33 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_20.asm b/audio/sfx/sfx_1f_20.asm
index 2d0b1fc6..8449e4db 100644..100755
--- a/audio/sfx/sfx_1f_20.asm
+++ b/audio/sfx/sfx_1f_20.asm
@@ -27,4 +27,3 @@ SFX_1f_20_Ch2: ; 7cb5a (1f:4b5a)
SFX_1f_20_Ch3: ; 7cb80 (1f:4b80)
endchannel
-; 0x7cb81 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_21.asm b/audio/sfx/sfx_1f_21.asm
index 31c600b0..faf056f2 100644..100755
--- a/audio/sfx/sfx_1f_21.asm
+++ b/audio/sfx/sfx_1f_21.asm
@@ -38,4 +38,3 @@ SFX_1f_21_Ch3: ; 7cbed (1f:4bed)
unknownnoise0x20 9, 194, 44
unknownnoise0x20 4, 161, 60
endchannel
-; 0x7cc0c \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_22.asm b/audio/sfx/sfx_1f_22.asm
index a239822f..bc9c9690 100644..100755
--- a/audio/sfx/sfx_1f_22.asm
+++ b/audio/sfx/sfx_1f_22.asm
@@ -21,4 +21,3 @@ SFX_1f_22_Ch3: ; 7ca4a (1f:4a4a)
unknownnoise0x20 2, 97, 33
unknownnoise0x20 8, 97, 17
endchannel
-; 0x7ca54 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_23.asm b/audio/sfx/sfx_1f_23.asm
index dd021169..51066146 100644..100755
--- a/audio/sfx/sfx_1f_23.asm
+++ b/audio/sfx/sfx_1f_23.asm
@@ -27,4 +27,3 @@ SFX_1f_23_Ch3: ; 7c99c (1f:499c)
unknownnoise0x20 8, 183, 92
unknownnoise0x20 15, 194, 93
endchannel
-; 0x7c9ac \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_24.asm b/audio/sfx/sfx_1f_24.asm
index 448541e6..f4d4e4de 100644..100755
--- a/audio/sfx/sfx_1f_24.asm
+++ b/audio/sfx/sfx_1f_24.asm
@@ -29,4 +29,3 @@ SFX_1f_24_Ch3: ; 7c9f2 (1f:49f2)
unknownnoise0x20 4, 116, 16
unknownnoise0x20 4, 113, 32
endchannel
-; 0x7c9fc \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_25.asm b/audio/sfx/sfx_1f_25.asm
index b0db2369..4b137a75 100644..100755
--- a/audio/sfx/sfx_1f_25.asm
+++ b/audio/sfx/sfx_1f_25.asm
@@ -32,4 +32,3 @@ SFX_1f_25_Ch3: ; 7c8ca (1f:48ca)
unknownnoise0x20 12, 210, 61
unknownnoise0x20 8, 209, 44
endchannel
-; 0x7c8e0 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_26.asm b/audio/sfx/sfx_1f_26.asm
index f0b205d5..f3613315 100644..100755
--- a/audio/sfx/sfx_1f_26.asm
+++ b/audio/sfx/sfx_1f_26.asm
@@ -22,4 +22,3 @@ SFX_1f_26_Ch3: ; 7cdc6 (1f:4dc6)
unknownnoise0x20 3, 194, 108
unknownnoise0x20 8, 209, 92
endchannel
-; 0x7cdd3 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_27.asm b/audio/sfx/sfx_1f_27.asm
index de7adafb..81ec2ab1 100644..100755
--- a/audio/sfx/sfx_1f_27.asm
+++ b/audio/sfx/sfx_1f_27.asm
@@ -28,4 +28,3 @@ SFX_1f_27_Ch3: ; 7ce09 (1f:4e09)
unknownnoise0x20 8, 179, 76
unknownnoise0x20 8, 161, 92
endchannel
-; 0x7ce1c \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_28.asm b/audio/sfx/sfx_1f_28.asm
index c76c94a7..2a510f48 100644..100755
--- a/audio/sfx/sfx_1f_28.asm
+++ b/audio/sfx/sfx_1f_28.asm
@@ -19,4 +19,3 @@ SFX_1f_28_Ch3: ; 7ce3a (1f:4e3a)
unknownnoise0x20 14, 196, 60
unknownnoise0x20 8, 209, 44
endchannel
-; 0x7ce44 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_29.asm b/audio/sfx/sfx_1f_29.asm
index bc19ea3b..cb7b5b0c 100644..100755
--- a/audio/sfx/sfx_1f_29.asm
+++ b/audio/sfx/sfx_1f_29.asm
@@ -28,4 +28,3 @@ SFX_1f_29_Ch3: ; 7cee0 (1f:4ee0)
unknownnoise0x20 3, 162, 92
unknownnoise0x20 8, 177, 108
endchannel
-; 0x7cef3 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_2a.asm b/audio/sfx/sfx_1f_2a.asm
index b91e4c2e..fb0d330f 100644..100755
--- a/audio/sfx/sfx_1f_2a.asm
+++ b/audio/sfx/sfx_1f_2a.asm
@@ -19,4 +19,3 @@ SFX_1f_2a_Ch3: ; 7cd5b (1f:4d5b)
unknownnoise0x20 4, 230, 60
unknownnoise0x20 15, 242, 76
endchannel
-; 0x7cd65 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_2b.asm b/audio/sfx/sfx_1f_2b.asm
index da51e7c9..1b588221 100644..100755
--- a/audio/sfx/sfx_1f_2b.asm
+++ b/audio/sfx/sfx_1f_2b.asm
@@ -22,4 +22,3 @@ SFX_1f_2b_Ch3: ; 7cf19 (1f:4f19)
unknownnoise0x20 9, 228, 124
unknownnoise0x20 15, 226, 108
endchannel
-; 0x7cf26 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_2c.asm b/audio/sfx/sfx_1f_2c.asm
index a480b584..9c051799 100644..100755
--- a/audio/sfx/sfx_1f_2c.asm
+++ b/audio/sfx/sfx_1f_2c.asm
@@ -32,4 +32,3 @@ SFX_1f_2c_Ch3: ; 7d049 (1f:5049)
unknownnoise0x20 6, 180, 60
unknownnoise0x20 8, 193, 44
endchannel
-; 0x7d05c \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_2d.asm b/audio/sfx/sfx_1f_2d.asm
index f4c4ecd9..c46af9f2 100644..100755
--- a/audio/sfx/sfx_1f_2d.asm
+++ b/audio/sfx/sfx_1f_2d.asm
@@ -16,4 +16,3 @@ SFX_1f_2d_Ch2: ; 7cd2a (1f:4d2a)
SFX_1f_2d_Ch3: ; 7cd3c (1f:4d3c)
endchannel
-; 0x7cd3d \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_2e.asm b/audio/sfx/sfx_1f_2e.asm
index 2c72b5a1..50f9f172 100644..100755
--- a/audio/sfx/sfx_1f_2e.asm
+++ b/audio/sfx/sfx_1f_2e.asm
@@ -28,4 +28,3 @@ SFX_1f_2e_Ch3: ; 7cfaa (1f:4faa)
unknownnoise0x20 2, 226, 60
unknownnoise0x20 8, 209, 44
endchannel
-; 0x7cfbd \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_2f.asm b/audio/sfx/sfx_1f_2f.asm
index 9b0bf71b..10b6698c 100644..100755
--- a/audio/sfx/sfx_1f_2f.asm
+++ b/audio/sfx/sfx_1f_2f.asm
@@ -24,4 +24,3 @@ SFX_1f_2f_Ch3: ; 7cd93 (1f:4d93)
unknownnoise0x20 5, 163, 60
unknownnoise0x20 8, 145, 44
endchannel
-; 0x7cda0 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_30.asm b/audio/sfx/sfx_1f_30.asm
index b6833986..8862b34c 100644..100755
--- a/audio/sfx/sfx_1f_30.asm
+++ b/audio/sfx/sfx_1f_30.asm
@@ -29,4 +29,3 @@ SFX_1f_30_Ch3: ; 7cf64 (1f:4f64)
unknownnoise0x20 8, 196, 108
unknownnoise0x20 15, 179, 92
endchannel
-; 0x7cf74 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_31.asm b/audio/sfx/sfx_1f_31.asm
index b67f3863..018a0298 100644..100755
--- a/audio/sfx/sfx_1f_31.asm
+++ b/audio/sfx/sfx_1f_31.asm
@@ -27,4 +27,3 @@ SFX_1f_31_Ch3: ; 7cff3 (1f:4ff3)
unknownnoise0x20 1, 178, 91
unknownnoise0x20 15, 194, 76
endchannel
-; 0x7d003 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_32.asm b/audio/sfx/sfx_1f_32.asm
index 92bb6a6f..853b9da3 100644..100755
--- a/audio/sfx/sfx_1f_32.asm
+++ b/audio/sfx/sfx_1f_32.asm
@@ -36,4 +36,3 @@ SFX_1f_32_Ch3: ; 7ce8e (1f:4e8e)
unknownnoise0x20 5, 146, 26
unknownnoise0x20 8, 129, 24
endchannel
-; 0x7ceaa \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_33.asm b/audio/sfx/sfx_1f_33.asm
index 607635c7..a15fb1d6 100644..100755
--- a/audio/sfx/sfx_1f_33.asm
+++ b/audio/sfx/sfx_1f_33.asm
@@ -22,4 +22,3 @@ SFX_1f_33_Ch3: ; 7d082 (1f:5082)
unknownnoise0x20 8, 196, 69
unknownnoise0x20 8, 177, 68
endchannel
-; 0x7d08f \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_34.asm b/audio/sfx/sfx_1f_34.asm
index 59a5bd3a..1bd919ec 100644..100755
--- a/audio/sfx/sfx_1f_34.asm
+++ b/audio/sfx/sfx_1f_34.asm
@@ -22,4 +22,3 @@ SFX_1f_34_Ch3: ; 7d0b5 (1f:50b5)
unknownnoise0x20 14, 210, 86
unknownnoise0x20 8, 209, 102
endchannel
-; 0x7d0c2 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_35.asm b/audio/sfx/sfx_1f_35.asm
index 10d4c3a2..befa3e39 100644..100755
--- a/audio/sfx/sfx_1f_35.asm
+++ b/audio/sfx/sfx_1f_35.asm
@@ -25,4 +25,3 @@ SFX_1f_35_Ch2: ; 7d0e5 (1f:50e5)
SFX_1f_35_Ch3: ; 7d107 (1f:5107)
endchannel
-; 0x7d108 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_36.asm b/audio/sfx/sfx_1f_36.asm
index 376b5f3a..9382bb60 100644..100755
--- a/audio/sfx/sfx_1f_36.asm
+++ b/audio/sfx/sfx_1f_36.asm
@@ -22,4 +22,3 @@ SFX_1f_36_Ch3: ; 7d12e (1f:512e)
unknownnoise0x20 1, 162, 57
unknownnoise0x20 8, 145, 73
endchannel
-; 0x7d13b \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_37.asm b/audio/sfx/sfx_1f_37.asm
index 41698fd9..b8812f2a 100644..100755
--- a/audio/sfx/sfx_1f_37.asm
+++ b/audio/sfx/sfx_1f_37.asm
@@ -23,4 +23,3 @@ SFX_1f_37_Ch3: ; 7c825 (1f:4825)
unknownnoise0x20 15, 215, 60
unknownnoise0x20 8, 193, 44
endchannel
-; 0x7c832 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_38.asm b/audio/sfx/sfx_1f_38.asm
index 885eee1f..62bd652c 100644..100755
--- a/audio/sfx/sfx_1f_38.asm
+++ b/audio/sfx/sfx_1f_38.asm
@@ -31,4 +31,3 @@ SFX_1f_38_Ch3: ; 7c878 (1f:4878)
unknownnoise0x20 12, 183, 76
unknownnoise0x20 15, 162, 92
endchannel
-; 0x7c888 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_39.asm b/audio/sfx/sfx_1f_39.asm
index d29da9aa..30703f3a 100644..100755
--- a/audio/sfx/sfx_1f_39.asm
+++ b/audio/sfx/sfx_1f_39.asm
@@ -24,4 +24,3 @@ SFX_1f_39_Ch3: ; 7c90e (1f:490e)
unknownnoise0x20 10, 182, 44
unknownnoise0x20 8, 145, 28
endchannel
-; 0x7c91b \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_3a.asm b/audio/sfx/sfx_1f_3a.asm
index 1d92127e..f39fe5f6 100644..100755
--- a/audio/sfx/sfx_1f_3a.asm
+++ b/audio/sfx/sfx_1f_3a.asm
@@ -45,4 +45,3 @@ SFX_1f_3a_Ch3: ; 7e877 (1f:6877)
B_ 2
rest 2
endchannel
-; 0x7e887 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_3b.asm b/audio/sfx/sfx_1f_3b.asm
index 3ce00c8a..66e3ba03 100644..100755
--- a/audio/sfx/sfx_1f_3b.asm
+++ b/audio/sfx/sfx_1f_3b.asm
@@ -67,4 +67,3 @@ SFX_1f_3b_Ch3: ; 7ee5f (1f:6e5f)
rest 1
A_ 8
endchannel
-; 0x7ee74 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_3c.asm b/audio/sfx/sfx_1f_3c.asm
index fb476203..688e89d2 100644..100755
--- a/audio/sfx/sfx_1f_3c.asm
+++ b/audio/sfx/sfx_1f_3c.asm
@@ -6,4 +6,3 @@ SFX_1f_3c_Ch1: ; 7c3f3 (1f:43f3)
unknownsfx0x20 8, 226, 0, 2
unknownsfx0x10 8
endchannel
-; 0x7c404 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_3d.asm b/audio/sfx/sfx_1f_3d.asm
index f7acd76f..f5eb6afa 100644..100755
--- a/audio/sfx/sfx_1f_3d.asm
+++ b/audio/sfx/sfx_1f_3d.asm
@@ -5,4 +5,3 @@ SFX_1f_3d_Ch1: ; 7c490 (1f:4490)
unknownsfx0x20 15, 242, 80, 6
unknownsfx0x10 8
endchannel
-; 0x7c49f \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_3e.asm b/audio/sfx/sfx_1f_3e.asm
index 411b544d..604e553b 100644..100755
--- a/audio/sfx/sfx_1f_3e.asm
+++ b/audio/sfx/sfx_1f_3e.asm
@@ -7,4 +7,3 @@ SFX_1f_3e_Ch1: ; 7c4b2 (1f:44b2)
unknownsfx0x20 15, 242, 0, 6
unknownsfx0x10 8
endchannel
-; 0x7c4c7 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_3f.asm b/audio/sfx/sfx_1f_3f.asm
index de7a44cf..68ab34d5 100644..100755
--- a/audio/sfx/sfx_1f_3f.asm
+++ b/audio/sfx/sfx_1f_3f.asm
@@ -2,4 +2,3 @@ SFX_1f_3f_Ch1: ; 7c3c3 (1f:43c3)
unknownnoise0x20 1, 226, 51
unknownnoise0x20 8, 225, 34
endchannel
-; 0x7c3ca \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_40.asm b/audio/sfx/sfx_1f_40.asm
index 216bd569..04f89afb 100644..100755
--- a/audio/sfx/sfx_1f_40.asm
+++ b/audio/sfx/sfx_1f_40.asm
@@ -5,4 +5,3 @@ SFX_1f_40_Ch1: ; 7c44b (1f:444b)
unknownsfx0x20 0, 145, 192, 7
unknownsfx0x20 12, 161, 208, 7
endchannel
-; 0x7c45e \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_41.asm b/audio/sfx/sfx_1f_41.asm
index 6f854c74..415d43d5 100644..100755
--- a/audio/sfx/sfx_1f_41.asm
+++ b/audio/sfx/sfx_1f_41.asm
@@ -75,4 +75,3 @@ SFX_1f_41_Ch3: ; 7ee09 (1f:6e09)
F_ 2
rest 2
endchannel
-; 0x7ee28 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_42.asm b/audio/sfx/sfx_1f_42.asm
index 6c8c388a..103b01c6 100644..100755
--- a/audio/sfx/sfx_1f_42.asm
+++ b/audio/sfx/sfx_1f_42.asm
@@ -57,4 +57,3 @@ SFX_1f_42_Ch3: ; 7eeaf (1f:6eaf)
F_ 4
D# 8
endchannel
-; 0x7eeb9 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_43.asm b/audio/sfx/sfx_1f_43.asm
index 59b7339c..1f238fb0 100644..100755
--- a/audio/sfx/sfx_1f_43.asm
+++ b/audio/sfx/sfx_1f_43.asm
@@ -6,4 +6,3 @@ SFX_1f_43_Ch1: ; 7c49f (1f:449f)
unknownsfx0x20 15, 243, 0, 6
unknownsfx0x10 8
endchannel
-; 0x7c4b2 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_44.asm b/audio/sfx/sfx_1f_44.asm
index bc2ff935..fc404eab 100644..100755
--- a/audio/sfx/sfx_1f_44.asm
+++ b/audio/sfx/sfx_1f_44.asm
@@ -5,4 +5,3 @@ SFX_1f_44_Ch1: ; 7c4c7 (1f:44c7)
unknownsfx0x20 15, 242, 80, 6
unknownsfx0x10 8
endchannel
-; 0x7c4d6 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_45.asm b/audio/sfx/sfx_1f_45.asm
index c2f734ad..f6548431 100644..100755
--- a/audio/sfx/sfx_1f_45.asm
+++ b/audio/sfx/sfx_1f_45.asm
@@ -12,4 +12,3 @@ SFX_1f_45_Ch1: ; 7c4d6 (1f:44d6)
unknownsfx0x20 3, 129, 192, 7
unknownsfx0x20 3, 129, 0, 7
endchannel
-; 0x7c505 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_46.asm b/audio/sfx/sfx_1f_46.asm
index 4e9026b7..3cd98880 100644..100755
--- a/audio/sfx/sfx_1f_46.asm
+++ b/audio/sfx/sfx_1f_46.asm
@@ -5,4 +5,3 @@ SFX_1f_46_Ch1: ; 7c505 (1f:4505)
unknownsfx0x20 4, 240, 0, 2
unknownsfx0x20 1, 0, 0, 0
endchannel
-; 0x7c518 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_47.asm b/audio/sfx/sfx_1f_47.asm
index f56c49b7..729369e8 100644..100755
--- a/audio/sfx/sfx_1f_47.asm
+++ b/audio/sfx/sfx_1f_47.asm
@@ -5,4 +5,3 @@ SFX_1f_47_Ch1: ; 7c518 (1f:4518)
unknownsfx0x20 4, 240, 0, 7
unknownsfx0x20 1, 0, 0, 0
endchannel
-; 0x7c52b \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_48.asm b/audio/sfx/sfx_1f_48.asm
index c46af22b..35aa7ad5 100644..100755
--- a/audio/sfx/sfx_1f_48.asm
+++ b/audio/sfx/sfx_1f_48.asm
@@ -8,4 +8,3 @@ SFX_1f_48_Ch1: ; 7c52b (1f:452b)
unknownsfx0x20 15, 23, 0, 4
unknownsfx0x10 8
endchannel
-; 0x7c546 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_49.asm b/audio/sfx/sfx_1f_49.asm
index 0f20dcd3..160979ac 100644..100755
--- a/audio/sfx/sfx_1f_49.asm
+++ b/audio/sfx/sfx_1f_49.asm
@@ -6,4 +6,3 @@ SFX_1f_49_Ch1: ; 7c546 (1f:4546)
unknownsfx0x20 4, 241, 128, 7
unknownsfx0x20 4, 0, 0, 0
endchannel
-; 0x7c55d \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_4a.asm b/audio/sfx/sfx_1f_4a.asm
index c0d8324b..187e9b10 100644..100755
--- a/audio/sfx/sfx_1f_4a.asm
+++ b/audio/sfx/sfx_1f_4a.asm
@@ -7,4 +7,3 @@ SFX_1f_4a_Ch1: ; 7c55d (1f:455d)
unknownsfx0x10 8
unknownsfx0x20 1, 0, 0, 0
endchannel
-; 0x7c572 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_4b.asm b/audio/sfx/sfx_1f_4b.asm
index c4d33187..b3065b2f 100644..100755
--- a/audio/sfx/sfx_1f_4b.asm
+++ b/audio/sfx/sfx_1f_4b.asm
@@ -8,4 +8,3 @@ SFX_1f_4b_Ch1: ; 7c572 (1f:4572)
unknownsfx0x20 15, 23, 0, 7
unknownsfx0x10 8
endchannel
-; 0x7c58d \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_4c.asm b/audio/sfx/sfx_1f_4c.asm
index 811d4bc7..56004e05 100644..100755
--- a/audio/sfx/sfx_1f_4c.asm
+++ b/audio/sfx/sfx_1f_4c.asm
@@ -8,4 +8,3 @@ SFX_1f_4c_Ch1: ; 7c58d (1f:458d)
unknownsfx0x20 15, 23, 0, 5
unknownsfx0x10 8
endchannel
-; 0x7c5a8 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_4d.asm b/audio/sfx/sfx_1f_4d.asm
index 8dcb0a8b..c57299c0 100644..100755
--- a/audio/sfx/sfx_1f_4d.asm
+++ b/audio/sfx/sfx_1f_4d.asm
@@ -4,4 +4,3 @@ SFX_1f_4d_Ch1: ; 7c5a8 (1f:45a8)
unknownsfx0x20 15, 210, 0, 5
unknownsfx0x10 8
endchannel
-; 0x7c5b3 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_4e.asm b/audio/sfx/sfx_1f_4e.asm
index 92f1a396..624c2137 100644..100755
--- a/audio/sfx/sfx_1f_4e.asm
+++ b/audio/sfx/sfx_1f_4e.asm
@@ -4,4 +4,3 @@ SFX_1f_4e_Ch1: ; 7c5b3 (1f:45b3)
unknownsfx0x20 15, 242, 0, 4
unknownsfx0x10 8
endchannel
-; 0x7c5be \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_4f.asm b/audio/sfx/sfx_1f_4f.asm
index aab678ab..91394f9f 100644..100755
--- a/audio/sfx/sfx_1f_4f.asm
+++ b/audio/sfx/sfx_1f_4f.asm
@@ -4,4 +4,3 @@ SFX_1f_4f_Ch1: ; 7c5be (1f:45be)
unknownnoise0x20 2, 241, 34
unknownnoise0x20 1, 0, 0
endchannel
-; 0x7c5cb \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_50.asm b/audio/sfx/sfx_1f_50.asm
index fba01b43..50cc4ee7 100644..100755
--- a/audio/sfx/sfx_1f_50.asm
+++ b/audio/sfx/sfx_1f_50.asm
@@ -16,4 +16,3 @@ SFX_1f_50_Ch1: ; 7c5cb (1f:45cb)
unknownnoise0x20 2, 65, 18
unknownnoise0x20 2, 0, 0
endchannel
-; 0x7c5fc \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_51.asm b/audio/sfx/sfx_1f_51.asm
index 4df2d1d8..438877f1 100644..100755
--- a/audio/sfx/sfx_1f_51.asm
+++ b/audio/sfx/sfx_1f_51.asm
@@ -16,4 +16,3 @@ SFX_1f_51_Ch2: ; 7c613 (1f:4613)
unknownsfx0x20 15, 240, 1, 4
unknownsfx0x20 1, 0, 0, 0
endchannel
-; 0x7c626 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_52.asm b/audio/sfx/sfx_1f_52.asm
index 6fa9eaa2..98ef0d30 100644..100755
--- a/audio/sfx/sfx_1f_52.asm
+++ b/audio/sfx/sfx_1f_52.asm
@@ -4,4 +4,3 @@ SFX_1f_52_Ch1: ; 7c626 (1f:4626)
unknownsfx0x20 15, 210, 0, 7
unknownsfx0x10 8
endchannel
-; 0x7c631 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_53.asm b/audio/sfx/sfx_1f_53.asm
index 86e7ce4a..04415233 100644..100755
--- a/audio/sfx/sfx_1f_53.asm
+++ b/audio/sfx/sfx_1f_53.asm
@@ -8,4 +8,3 @@ SFX_1f_53_Ch1: ; 7c631 (1f:4631)
unknownnoise0x20 8, 244, 85
unknownnoise0x20 8, 241, 68
endchannel
-; 0x7c64a \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_54.asm b/audio/sfx/sfx_1f_54.asm
index acdc3da5..faf5304e 100644..100755
--- a/audio/sfx/sfx_1f_54.asm
+++ b/audio/sfx/sfx_1f_54.asm
@@ -20,4 +20,3 @@ SFX_1f_54_Ch2: ; 7c669 (1f:4669)
unknownsfx0x20 15, 240, 130, 4
unknownsfx0x20 15, 242, 130, 4
endchannel
-; 0x7c688 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_55.asm b/audio/sfx/sfx_1f_55.asm
index 9a27c885..e2fbffae 100644..100755
--- a/audio/sfx/sfx_1f_55.asm
+++ b/audio/sfx/sfx_1f_55.asm
@@ -10,4 +10,3 @@ SFX_1f_55_Ch1: ; 7c688 (1f:4688)
unknownsfx0x20 15, 226, 0, 7
unknownsfx0x10 8
endchannel
-; 0x7c6a5 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_56.asm b/audio/sfx/sfx_1f_56.asm
index 77624440..30de8cd2 100644..100755
--- a/audio/sfx/sfx_1f_56.asm
+++ b/audio/sfx/sfx_1f_56.asm
@@ -5,4 +5,3 @@ SFX_1f_56_Ch1: ; 7c3ca (1f:43ca)
unknownnoise0x20 8, 244, 85
unknownnoise0x20 8, 241, 68
endchannel
-; 0x7c3da \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_57.asm b/audio/sfx/sfx_1f_57.asm
index 36880103..b73bb687 100644..100755
--- a/audio/sfx/sfx_1f_57.asm
+++ b/audio/sfx/sfx_1f_57.asm
@@ -2,4 +2,3 @@ SFX_1f_57_Ch1: ; 7c3da (1f:43da)
unknownnoise0x20 9, 241, 68
unknownnoise0x20 8, 209, 67
endchannel
-; 0x7c3e1 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_58.asm b/audio/sfx/sfx_1f_58.asm
index ac61fe40..f5844495 100644..100755
--- a/audio/sfx/sfx_1f_58.asm
+++ b/audio/sfx/sfx_1f_58.asm
@@ -9,4 +9,3 @@ SFX_1f_58_Ch2: ; 7c3e8 (1f:43e8)
unknownsfx0x20 2, 8, 0, 0
unknownsfx0x20 8, 177, 65, 7
endchannel
-; 0x7c3f3 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_59.asm b/audio/sfx/sfx_1f_59.asm
index a50d05c0..9c17156f 100644..100755
--- a/audio/sfx/sfx_1f_59.asm
+++ b/audio/sfx/sfx_1f_59.asm
@@ -9,4 +9,3 @@ SFX_1f_59_Ch2: ; 7c40b (1f:440b)
unknownsfx0x20 1, 8, 0, 0
unknownsfx0x20 4, 161, 97, 7
endchannel
-; 0x7c416 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_5a.asm b/audio/sfx/sfx_1f_5a.asm
index 8c050129..29b947b7 100644..100755
--- a/audio/sfx/sfx_1f_5a.asm
+++ b/audio/sfx/sfx_1f_5a.asm
@@ -11,4 +11,3 @@ SFX_1f_5a_Ch2: ; 7c421 (1f:4421)
unknownsfx0x20 4, 145, 193, 6
unknownsfx0x20 8, 162, 161, 7
endchannel
-; 0x7c430 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_5b.asm b/audio/sfx/sfx_1f_5b.asm
index 771aa496..bc2e6fef 100644..100755
--- a/audio/sfx/sfx_1f_5b.asm
+++ b/audio/sfx/sfx_1f_5b.asm
@@ -4,4 +4,3 @@ SFX_1f_5b_Ch1: ; 7c430 (1f:4430)
unknownsfx0x20 15, 241, 0, 3
unknownsfx0x10 8
endchannel
-; 0x7c43b \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_5c.asm b/audio/sfx/sfx_1f_5c.asm
index 8ac03d9c..8671002c 100644..100755
--- a/audio/sfx/sfx_1f_5c.asm
+++ b/audio/sfx/sfx_1f_5c.asm
@@ -5,4 +5,3 @@ SFX_1f_5c_Ch1: ; 7c43b (1f:443b)
unknownnoise0x20 12, 97, 35
unknownnoise0x20 6, 65, 84
endchannel
-; 0x7c44b \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_5d.asm b/audio/sfx/sfx_1f_5d.asm
index f0606032..3a325f27 100644..100755
--- a/audio/sfx/sfx_1f_5d.asm
+++ b/audio/sfx/sfx_1f_5d.asm
@@ -34,4 +34,3 @@ ELSE
unknownsfx0x20 15, 210, 225, 7
ENDC
endchannel
-; 0x7c490
diff --git a/audio/sfx/sfx_1f_5e.asm b/audio/sfx/sfx_1f_5e.asm
index e6bbaa64..6adbb979 100644..100755
--- a/audio/sfx/sfx_1f_5e.asm
+++ b/audio/sfx/sfx_1f_5e.asm
@@ -8,4 +8,3 @@ SFX_1f_5e_Ch1: ; 7c6a5 (1f:46a5)
unknownnoise0x20 15, 231, 67
unknownnoise0x20 15, 242, 67
endchannel
-; 0x7c6be \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_5f.asm b/audio/sfx/sfx_1f_5f.asm
index 7ae72e98..efc1a5e3 100644..100755
--- a/audio/sfx/sfx_1f_5f.asm
+++ b/audio/sfx/sfx_1f_5f.asm
@@ -4,4 +4,3 @@ SFX_1f_5f_Ch1: ; 7c6be (1f:46be)
unknownsfx0x20 12, 194, 64, 7
unknownsfx0x10 8
endchannel
-; 0x7c6c9 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_60.asm b/audio/sfx/sfx_1f_60.asm
index 3f098eeb..907aa79f 100644..100755
--- a/audio/sfx/sfx_1f_60.asm
+++ b/audio/sfx/sfx_1f_60.asm
@@ -4,4 +4,3 @@ SFX_1f_60_Ch1: ; 7c6c9 (1f:46c9)
unknownsfx0x20 12, 194, 128, 6
unknownsfx0x10 8
endchannel
-; 0x7c6d4 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_61.asm b/audio/sfx/sfx_1f_61.asm
index 745ce3a4..0afe5055 100644..100755
--- a/audio/sfx/sfx_1f_61.asm
+++ b/audio/sfx/sfx_1f_61.asm
@@ -3,4 +3,3 @@ SFX_1f_61_Ch1: ; 7c6d4 (1f:46d4)
unknownnoise0x20 2, 175, 49
unknownnoise0x20 15, 242, 65
endchannel
-; 0x7c6de \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_62.asm b/audio/sfx/sfx_1f_62.asm
index 71be0e5d..8029ff02 100644..100755
--- a/audio/sfx/sfx_1f_62.asm
+++ b/audio/sfx/sfx_1f_62.asm
@@ -2,4 +2,3 @@ SFX_1f_62_Ch1: ; 7c6de (1f:46de)
unknownnoise0x20 2, 210, 50
unknownnoise0x20 15, 242, 67
endchannel
-; 0x7c6e5 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_63.asm b/audio/sfx/sfx_1f_63.asm
index 88ce100d..2114130a 100644..100755
--- a/audio/sfx/sfx_1f_63.asm
+++ b/audio/sfx/sfx_1f_63.asm
@@ -5,4 +5,3 @@ SFX_1f_63_Ch1: ; 7c6e5 (1f:46e5)
unknownnoise0x20 3, 192, 34
unknownnoise0x20 15, 210, 36
endchannel
-; 0x7c6f5 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_64.asm b/audio/sfx/sfx_1f_64.asm
index 703343ad..ab5a4c04 100644..100755
--- a/audio/sfx/sfx_1f_64.asm
+++ b/audio/sfx/sfx_1f_64.asm
@@ -4,4 +4,3 @@ SFX_1f_64_Ch1: ; 7c6f5 (1f:46f5)
unknownsfx0x20 1, 242, 224, 6
unknownsfx0x20 8, 241, 0, 7
endchannel
-; 0x7c704 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_65.asm b/audio/sfx/sfx_1f_65.asm
index b8708858..dc564910 100644..100755
--- a/audio/sfx/sfx_1f_65.asm
+++ b/audio/sfx/sfx_1f_65.asm
@@ -3,4 +3,3 @@ SFX_1f_65_Ch1: ; 7c704 (1f:4704)
unknownsfx0x20 2, 241, 0, 7
unknownsfx0x20 8, 129, 224, 7
endchannel
-; 0x7c70f \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_66.asm b/audio/sfx/sfx_1f_66.asm
index 1b581a91..068917bb 100644..100755
--- a/audio/sfx/sfx_1f_66.asm
+++ b/audio/sfx/sfx_1f_66.asm
@@ -12,4 +12,3 @@ SFX_1f_66_Ch2: ; 7c71e (1f:471e)
unknownsfx0x20 2, 193, 65, 7
unknownsfx0x20 15, 209, 129, 7
endchannel
-; 0x7c72d \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_67.asm b/audio/sfx/sfx_1f_67.asm
index 4bd391a1..a81d47bf 100644..100755
--- a/audio/sfx/sfx_1f_67.asm
+++ b/audio/sfx/sfx_1f_67.asm
@@ -12,4 +12,3 @@ SFX_1f_67_Ch1: ; 7c72d (1f:472d)
unknownsfx0x20 15, 18, 224, 7
unknownsfx0x10 8
endchannel
-; 0x7c758 \ No newline at end of file
diff --git a/audio/sfx/sfx_1f_unused.asm b/audio/sfx/sfx_1f_unused.asm
index 773c069e..dfb16ee1 100755
--- a/audio/sfx/sfx_1f_unused.asm
+++ b/audio/sfx/sfx_1f_unused.asm
@@ -29,4 +29,3 @@ SFX_1f_unused_Ch3: ; 7c78e (1f:478e)
unknownnoise0x20 12, 125, 76
unknownnoise0x20 15, 211, 76
endchannel
-; 0x7c7a4 \ No newline at end of file
diff --git a/constants/connection_constants.asm b/constants/connection_constants.asm
index 389ba867..916d6c4f 100755
--- a/constants/connection_constants.asm
+++ b/constants/connection_constants.asm
@@ -1,5 +1,5 @@
-; connection directions
-EAST EQU 1
-WEST EQU 2
-SOUTH EQU 4
-NORTH EQU 8 \ No newline at end of file
+; connection directions
+EAST EQU 1
+WEST EQU 2
+SOUTH EQU 4
+NORTH EQU 8
diff --git a/constants/evolution_constants.asm b/constants/evolution_constants.asm
index 96b063cc..2e3f3613 100755
--- a/constants/evolution_constants.asm
+++ b/constants/evolution_constants.asm
@@ -1,4 +1,4 @@
-; Evolution types
-EV_LEVEL EQU 1
-EV_ITEM EQU 2
-EV_TRADE EQU 3 \ No newline at end of file
+; Evolution types
+EV_LEVEL EQU 1
+EV_ITEM EQU 2
+EV_TRADE EQU 3
diff --git a/constants/item_constants.asm b/constants/item_constants.asm
index be320371..bc73a20b 100644..100755
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -78,7 +78,6 @@ EXP__ALL EQU $4B
OLD_ROD EQU $4C
GOOD_ROD EQU $4D
SUPER_ROD EQU $4E
-; XXX todo: compare this to $32
PP_UP EQU $4F
ETHER EQU $50
MAX_ETHER EQU $51
@@ -138,4 +137,4 @@ TM_46 EQU $F6
TM_47 EQU $F7
TM_48 EQU $F8
TM_49 EQU $F9
-TM_50 EQU $FA \ No newline at end of file
+TM_50 EQU $FA
diff --git a/constants/list_constants.asm b/constants/list_constants.asm
index 1299f7d8..aab542ec 100755
--- a/constants/list_constants.asm
+++ b/constants/list_constants.asm
@@ -1,14 +1,14 @@
-; list menu ID's
-PCPOKEMONLISTMENU EQU $00 ; PC pokemon withdraw/deposit lists
-MOVESLISTMENU EQU $01 ; XXX where is this used?
-PRICEDITEMLISTMENU EQU $02 ; Pokemart buy menu / Pokemart buy/sell choose quantity menu
-ITEMLISTMENU EQU $03 ; Start menu Item menu / Pokemart sell menu
-SPECIALLISTMENU EQU $04 ; list of special "items" e.g. floor list in elevators / list of badges
-
-MONSTER_NAME EQU 1
-MOVE_NAME EQU 2
-; ???_NAME EQU 3
-ITEM_NAME EQU 4
-PLAYEROT_NAME EQU 5
-ENEMYOT_NAME EQU 6
-TRAINER_NAME EQU 7 \ No newline at end of file
+; list menu ID's
+PCPOKEMONLISTMENU EQU $00 ; PC pokemon withdraw/deposit lists
+MOVESLISTMENU EQU $01 ; XXX where is this used?
+PRICEDITEMLISTMENU EQU $02 ; Pokemart buy menu / Pokemart buy/sell choose quantity menu
+ITEMLISTMENU EQU $03 ; Start menu Item menu / Pokemart sell menu
+SPECIALLISTMENU EQU $04 ; list of special "items" e.g. floor list in elevators / list of badges
+
+MONSTER_NAME EQU 1
+MOVE_NAME EQU 2
+; ???_NAME EQU 3
+ITEM_NAME EQU 4
+PLAYEROT_NAME EQU 5
+ENEMYOT_NAME EQU 6
+TRAINER_NAME EQU 7
diff --git a/constants/oam_constants.asm b/constants/oam_constants.asm
index a707e16d..ddf95648 100755
--- a/constants/oam_constants.asm
+++ b/constants/oam_constants.asm
@@ -1,9 +1,9 @@
-; OAM flags used by this game
-OAMFLAG_ENDOFDATA EQU %00000001 ; pseudo OAM flag, only used by game logic
-OAMFLAG_CANBEMASKED EQU %00000010 ; pseudo OAM flag, only used by game logic
-OAMFLAG_VFLIPPED EQU %00100000 ; OAM flag flips the sprite vertically.
-; Used for making left facing sprites face right and to alternate between left and right foot animation when walking up or down
-
-; OAM attribute flags
-OAM_HFLIP EQU %00100000 ; horizontal flip
-OAM_VFLIP EQU %01000000 ; vertical flip \ No newline at end of file
+; OAM flags used by this game
+OAMFLAG_ENDOFDATA EQU %00000001 ; pseudo OAM flag, only used by game logic
+OAMFLAG_CANBEMASKED EQU %00000010 ; pseudo OAM flag, only used by game logic
+OAMFLAG_VFLIPPED EQU %00100000 ; OAM flag flips the sprite vertically.
+; Used for making left facing sprites face right and to alternate between left and right foot animation when walking up or down
+
+; OAM attribute flags
+OAM_HFLIP EQU %00100000 ; horizontal flip
+OAM_VFLIP EQU %01000000 ; vertical flip
diff --git a/constants/palette_constants.asm b/constants/palette_constants.asm
index 669c5296..981f621d 100644..100755
--- a/constants/palette_constants.asm
+++ b/constants/palette_constants.asm
@@ -35,4 +35,4 @@ PAL_YELLOWBAR EQU $20
PAL_REDBAR EQU $21
PAL_BADGE EQU $22
PAL_CAVE EQU $23
-PAL_GAMEFREAK EQU $24 \ No newline at end of file
+PAL_GAMEFREAK EQU $24
diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm
index b3ae8e21..dc249d59 100755
--- a/constants/sprite_constants.asm
+++ b/constants/sprite_constants.asm
@@ -1,97 +1,97 @@
-; pokemon's overworld sprites
-SPRITE_MON EQU $0
-SPRITE_BALL_M EQU $1
-SPRITE_HELIX EQU $2
-SPRITE_FAIRY EQU $3
-SPRITE_BIRD_M EQU $4
-SPRITE_WATER EQU $5
-SPRITE_BUG EQU $6
-SPRITE_GRASS EQU $7
-SPRITE_SNAKE EQU $8
-SPRITE_QUADRUPED EQU $9
-
-; overworld sprites
-SPRITE_RED EQU $01
-SPRITE_BLUE EQU $02
-SPRITE_OAK EQU $03
-SPRITE_BUG_CATCHER EQU $04
-SPRITE_SLOWBRO EQU $05
-SPRITE_LASS EQU $06
-SPRITE_BLACK_HAIR_BOY_1 EQU $07
-SPRITE_LITTLE_GIRL EQU $08
-SPRITE_BIRD EQU $09
-SPRITE_FAT_BALD_GUY EQU $0a
-SPRITE_GAMBLER EQU $0b
-SPRITE_BLACK_HAIR_BOY_2 EQU $0c
-SPRITE_GIRL EQU $0d
-SPRITE_HIKER EQU $0e
-SPRITE_FOULARD_WOMAN EQU $0f
-SPRITE_GENTLEMAN EQU $10
-SPRITE_DAISY EQU $11
-SPRITE_BIKER EQU $12
-SPRITE_SAILOR EQU $13
-SPRITE_COOK EQU $14
-SPRITE_BIKE_SHOP_GUY EQU $15
-SPRITE_MR_FUJI EQU $16
-SPRITE_GIOVANNI EQU $17
-SPRITE_ROCKET EQU $18
-SPRITE_MEDIUM EQU $19
-SPRITE_WAITER EQU $1a
-SPRITE_ERIKA EQU $1b
-SPRITE_MOM_GEISHA EQU $1c
-SPRITE_BRUNETTE_GIRL EQU $1d
-SPRITE_LANCE EQU $1e
-SPRITE_OAK_SCIENTIST_AIDE EQU $1f
-SPRITE_OAK_AIDE EQU $20
-SPRITE_ROCKER EQU $21
-SPRITE_SWIMMER EQU $22
-SPRITE_WHITE_PLAYER EQU $23
-SPRITE_GYM_HELPER EQU $24
-SPRITE_OLD_PERSON EQU $25
-SPRITE_MART_GUY EQU $26
-SPRITE_FISHER EQU $27
-SPRITE_OLD_MEDIUM_WOMAN EQU $28
-SPRITE_NURSE EQU $29
-SPRITE_CABLE_CLUB_WOMAN EQU $2a
-SPRITE_MR_MASTERBALL EQU $2b
-SPRITE_LAPRAS_GIVER EQU $2c
-SPRITE_WARDEN EQU $2d
-SPRITE_SS_CAPTAIN EQU $2e
-SPRITE_FISHER2 EQU $2f
-SPRITE_BLACKBELT EQU $30
-SPRITE_GUARD EQU $31
-;SPRITE_COP_GUARD EQU $32
-SPRITE_MOM EQU $33
-SPRITE_BALDING_GUY EQU $34
-SPRITE_YOUNG_BOY EQU $35
-SPRITE_GAMEBOY_KID EQU $36
-SPRITE_GAMEBOY_KID_COPY EQU $37
-SPRITE_CLEFAIRY EQU $38
-SPRITE_AGATHA EQU $39
-SPRITE_BRUNO EQU $3a
-SPRITE_LORELEI EQU $3b
-SPRITE_SEEL EQU $3c
-SPRITE_BALL EQU $3d
-SPRITE_OMANYTE EQU $3e
-SPRITE_BOULDER EQU $3f
-SPRITE_PAPER_SHEET EQU $40
-SPRITE_BOOK_MAP_DEX EQU $41
-SPRITE_CLIPBOARD EQU $42
-SPRITE_SNORLAX EQU $43
-SPRITE_OLD_AMBER_COPY EQU $44
-SPRITE_OLD_AMBER EQU $45
-SPRITE_LYING_OLD_MAN_UNUSED_1 EQU $46
-SPRITE_LYING_OLD_MAN_UNUSED_2 EQU $47
-SPRITE_LYING_OLD_MAN EQU $48
-
-; different kinds of people events
-ITEM EQU $80
-TRAINER EQU $40
-
-BOULDER_MOVEMENT_BYTE_2 EQU $10
-
-; sprite facing directions
-SPRITE_FACING_DOWN EQU $00
-SPRITE_FACING_UP EQU $04
-SPRITE_FACING_LEFT EQU $08
-SPRITE_FACING_RIGHT EQU $0C \ No newline at end of file
+; pokemon's overworld sprites
+SPRITE_MON EQU $0
+SPRITE_BALL_M EQU $1
+SPRITE_HELIX EQU $2
+SPRITE_FAIRY EQU $3
+SPRITE_BIRD_M EQU $4
+SPRITE_WATER EQU $5
+SPRITE_BUG EQU $6
+SPRITE_GRASS EQU $7
+SPRITE_SNAKE EQU $8
+SPRITE_QUADRUPED EQU $9
+
+; overworld sprites
+SPRITE_RED EQU $01
+SPRITE_BLUE EQU $02
+SPRITE_OAK EQU $03
+SPRITE_BUG_CATCHER EQU $04
+SPRITE_SLOWBRO EQU $05
+SPRITE_LASS EQU $06
+SPRITE_BLACK_HAIR_BOY_1 EQU $07
+SPRITE_LITTLE_GIRL EQU $08
+SPRITE_BIRD EQU $09
+SPRITE_FAT_BALD_GUY EQU $0a
+SPRITE_GAMBLER EQU $0b
+SPRITE_BLACK_HAIR_BOY_2 EQU $0c
+SPRITE_GIRL EQU $0d
+SPRITE_HIKER EQU $0e
+SPRITE_FOULARD_WOMAN EQU $0f
+SPRITE_GENTLEMAN EQU $10
+SPRITE_DAISY EQU $11
+SPRITE_BIKER EQU $12
+SPRITE_SAILOR EQU $13
+SPRITE_COOK EQU $14
+SPRITE_BIKE_SHOP_GUY EQU $15
+SPRITE_MR_FUJI EQU $16
+SPRITE_GIOVANNI EQU $17
+SPRITE_ROCKET EQU $18
+SPRITE_MEDIUM EQU $19
+SPRITE_WAITER EQU $1a
+SPRITE_ERIKA EQU $1b
+SPRITE_MOM_GEISHA EQU $1c
+SPRITE_BRUNETTE_GIRL EQU $1d
+SPRITE_LANCE EQU $1e
+SPRITE_OAK_SCIENTIST_AIDE EQU $1f
+SPRITE_OAK_AIDE EQU $20
+SPRITE_ROCKER EQU $21
+SPRITE_SWIMMER EQU $22
+SPRITE_WHITE_PLAYER EQU $23
+SPRITE_GYM_HELPER EQU $24
+SPRITE_OLD_PERSON EQU $25
+SPRITE_MART_GUY EQU $26
+SPRITE_FISHER EQU $27
+SPRITE_OLD_MEDIUM_WOMAN EQU $28
+SPRITE_NURSE EQU $29
+SPRITE_CABLE_CLUB_WOMAN EQU $2a
+SPRITE_MR_MASTERBALL EQU $2b
+SPRITE_LAPRAS_GIVER EQU $2c
+SPRITE_WARDEN EQU $2d
+SPRITE_SS_CAPTAIN EQU $2e
+SPRITE_FISHER2 EQU $2f
+SPRITE_BLACKBELT EQU $30
+SPRITE_GUARD EQU $31
+;SPRITE_COP_GUARD EQU $32
+SPRITE_MOM EQU $33
+SPRITE_BALDING_GUY EQU $34
+SPRITE_YOUNG_BOY EQU $35
+SPRITE_GAMEBOY_KID EQU $36
+SPRITE_GAMEBOY_KID_COPY EQU $37
+SPRITE_CLEFAIRY EQU $38
+SPRITE_AGATHA EQU $39
+SPRITE_BRUNO EQU $3a
+SPRITE_LORELEI EQU $3b
+SPRITE_SEEL EQU $3c
+SPRITE_BALL EQU $3d
+SPRITE_OMANYTE EQU $3e
+SPRITE_BOULDER EQU $3f
+SPRITE_PAPER_SHEET EQU $40
+SPRITE_BOOK_MAP_DEX EQU $41
+SPRITE_CLIPBOARD EQU $42
+SPRITE_SNORLAX EQU $43
+SPRITE_OLD_AMBER_COPY EQU $44
+SPRITE_OLD_AMBER EQU $45
+SPRITE_LYING_OLD_MAN_UNUSED_1 EQU $46
+SPRITE_LYING_OLD_MAN_UNUSED_2 EQU $47
+SPRITE_LYING_OLD_MAN EQU $48
+
+; different kinds of people events
+ITEM EQU $80
+TRAINER EQU $40
+
+BOULDER_MOVEMENT_BYTE_2 EQU $10
+
+; sprite facing directions
+SPRITE_FACING_DOWN EQU $00
+SPRITE_FACING_UP EQU $04
+SPRITE_FACING_LEFT EQU $08
+SPRITE_FACING_RIGHT EQU $0C
diff --git a/constants/status_constants.asm b/constants/status_constants.asm
index 3b5aee06..d9be6250 100755
--- a/constants/status_constants.asm
+++ b/constants/status_constants.asm
@@ -1,32 +1,32 @@
-; non-volatile statuses
-SLP EQU %111 ; sleep counter
-PSN EQU 3
-BRN EQU 4
-FRZ EQU 5
-PAR EQU 6
-
-; volatile statuses 1
-StoringEnergy EQU 0 ; Bide
-ThrashingAbout EQU 1 ; e.g. Thrash
-AttackingMultipleTimes EQU 2 ; e.g. Double Kick, Fury Attack
-Flinched EQU 3
-ChargingUp EQU 4 ; e.g. Solar Beam, Fly
-UsingTrappingMove EQU 5 ; e.g. Wrap
-Invulnerable EQU 6 ; charging up Fly/Dig
-Confused EQU 7
-
-; volatile statuses 2
-UsingXAccuracy EQU 0
-ProtectedByMist EQU 1
-GettingPumped EQU 2 ; Focus Energy
-; EQU 3 ; unused?
-HasSubstituteUp EQU 4
-NeedsToRecharge EQU 5 ; Hyper Beam
-UsingRage EQU 6
-Seeded EQU 7
-
-; volatile statuses 3
-BadlyPoisoned EQU 0
-HasLightScreenUp EQU 1
-HasReflectUp EQU 2
-Transformed EQU 3
+; non-volatile statuses
+SLP EQU %111 ; sleep counter
+PSN EQU 3
+BRN EQU 4
+FRZ EQU 5
+PAR EQU 6
+
+; volatile statuses 1
+StoringEnergy EQU 0 ; Bide
+ThrashingAbout EQU 1 ; e.g. Thrash
+AttackingMultipleTimes EQU 2 ; e.g. Double Kick, Fury Attack
+Flinched EQU 3
+ChargingUp EQU 4 ; e.g. Solar Beam, Fly
+UsingTrappingMove EQU 5 ; e.g. Wrap
+Invulnerable EQU 6 ; charging up Fly/Dig
+Confused EQU 7
+
+; volatile statuses 2
+UsingXAccuracy EQU 0
+ProtectedByMist EQU 1
+GettingPumped EQU 2 ; Focus Energy
+; EQU 3 ; unused?
+HasSubstituteUp EQU 4
+NeedsToRecharge EQU 5 ; Hyper Beam
+UsingRage EQU 6
+Seeded EQU 7
+
+; volatile statuses 3
+BadlyPoisoned EQU 0
+HasLightScreenUp EQU 1
+HasReflectUp EQU 2
+Transformed EQU 3
diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm
index 37a51376..f98352f9 100644..100755
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -45,4 +45,4 @@ SONY3 EQU $2B
LORELEI EQU $2C
CHANNELER EQU $2D
AGATHA EQU $2E
-LANCE EQU $2F \ No newline at end of file
+LANCE EQU $2F
diff --git a/constants/type_constants.asm b/constants/type_constants.asm
index 7ded18c3..b36dc179 100755
--- a/constants/type_constants.asm
+++ b/constants/type_constants.asm
@@ -1,16 +1,16 @@
-; Elemental types
-NORMAL EQU $00
-FIGHTING EQU $01
-FLYING EQU $02
-POISON EQU $03
-GROUND EQU $04
-ROCK EQU $05
-BUG EQU $07
-GHOST EQU $08
-FIRE EQU $14
-WATER EQU $15
-GRASS EQU $16
-ELECTRIC EQU $17
-PSYCHIC EQU $18
-ICE EQU $19
-DRAGON EQU $1A \ No newline at end of file
+; Elemental types
+NORMAL EQU $00
+FIGHTING EQU $01
+FLYING EQU $02
+POISON EQU $03
+GROUND EQU $04
+ROCK EQU $05
+BUG EQU $07
+GHOST EQU $08
+FIRE EQU $14
+WATER EQU $15
+GRASS EQU $16
+ELECTRIC EQU $17
+PSYCHIC EQU $18
+ICE EQU $19
+DRAGON EQU $1A
diff --git a/data/hidden_objects.asm b/data/hidden_objects.asm
index 74d053bb..0e36dbc4 100755
--- a/data/hidden_objects.asm
+++ b/data/hidden_objects.asm
@@ -233,10 +233,10 @@ ViridianPokecenterHiddenObjects: ; 46b93 (11:6b93)
ViridianMartHiddenObjects: ; 46ba0 (11:6ba0)
db $FF
ViridianSchoolHiddenObjects: ; 46ba1 (11:6ba1)
- db $04,$03,$20 ; ViridianSchoolNotebook
+ db $04,$03,(ViridianSchoolNotebook_id - TextPredefs) / 2 + 1
db Bank(PrintNotebookText)
dw PrintNotebookText
- db $00,$03,$21 ; ViridianSchoolBlackboard
+ db $00,$03,(ViridianSchoolBlackboard_id - TextPredefs) / 2 + 1
db BANK(PrintBlackboardLinkCableText)
dw PrintBlackboardLinkCableText
db $FF
@@ -743,13 +743,13 @@ LavenderHouse1HiddenObjects: ; 46fc2 (11:6fc2)
dw PrintMagazinesText
db $FF
CeladonMansion5HiddenObjects: ; 46fd5 (11:6fd5)
- db $00,$03,$34 ; LinkCableHelp
+ db $00,$03,(LinkCableHelp_id - TextPredefs) / 2 + 1
db BANK(PrintBlackboardLinkCableText)
dw PrintBlackboardLinkCableText
- db $00,$04,$34 ; LinkCableHelp
+ db $00,$04,(LinkCableHelp_id - TextPredefs) / 2 + 1
db BANK(PrintBlackboardLinkCableText)
dw PrintBlackboardLinkCableText
- db $04,$03,$35 ; TMNotebook
+ db $04,$03,(TMNotebook_id - TextPredefs) / 2 + 1
db Bank(PrintNotebookText)
dw PrintNotebookText
db $FF
diff --git a/data/mapObjects/redshouse2f.asm b/data/mapObjects/redshouse2f.asm
index f8680121..e7c64c6f 100755
--- a/data/mapObjects/redshouse2f.asm
+++ b/data/mapObjects/redshouse2f.asm
@@ -1,4 +1,4 @@
-RedsHouse2FObject: ; 0x5c0d0 ?
+RedsHouse2FObject: ; 0x5c0d0
db $0A ; border block
db $1 ; warps
diff --git a/data/mon_party_sprites.asm b/data/mon_party_sprites.asm
index 92297b6d..7e434dce 100755
--- a/data/mon_party_sprites.asm
+++ b/data/mon_party_sprites.asm
@@ -13,8 +13,8 @@ MonPartyData: ; 7190d (1c:590d)
dn SPRITE_SNAKE, SPRITE_SNAKE ;Ekans/Arbok
dn SPRITE_FAIRY, SPRITE_FAIRY ;Pikachu/Raichu
dn SPRITE_MON, SPRITE_MON ;Sandshrew/Sandslash
- dn SPRITE_MON, SPRITE_MON ;Nidoran?/Nidorina
- dn SPRITE_MON, SPRITE_MON ;Nidoqueen/Nidoran?
+ dn SPRITE_MON, SPRITE_MON ;NidoranF/Nidorina
+ dn SPRITE_MON, SPRITE_MON ;Nidoqueen/NidoranM
dn SPRITE_MON, SPRITE_MON ;Nidorino/Nidoking
dn SPRITE_FAIRY, SPRITE_FAIRY ;Clefairy/Clefable
dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Vulpix/Ninetales
diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm
index ae4ecb0d..c33e9141 100755
--- a/engine/HoF_room_pc.asm
+++ b/engine/HoF_room_pc.asm
@@ -1,7 +1,7 @@
HallOfFamePC: ; 7405c (1d:405c)
callba AnimateHallOfFame
call ClearScreen
- ld c, $64
+ ld c, 100
call DelayFrames
call DisableLCD
ld hl, vFont
@@ -19,27 +19,27 @@ HallOfFamePC: ; 7405c (1d:405c)
hlCoord 0, 14
call Func_7417b
ld a, $c0
- ld [rBGP], a ; $ff47
+ ld [rBGP], a
call EnableLCD
ld a, $ff
call PlaySoundWaitForCurrent
ld c, BANK(Music_Credits)
ld a, MUSIC_CREDITS
call PlayMusic
- ld c, $80
+ ld c, 128
call DelayFrames
xor a
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
ld [wTrainerEngageDistance], a
jp Credits
Func_740ba: ; 740ba (1d:40ba)
- ld hl, DataTable_74160 ; $4160
+ ld hl, DataTable_74160
ld b, $4
.asm_740bf
ld a, [hli]
- ld [rBGP], a ; $ff47
- ld c, $5
+ ld [rBGP], a
+ ld c, 5
call DelayFrames
dec b
jr nz, .asm_740bf
@@ -116,7 +116,7 @@ Func_74152: ; 74152 (1d:4152)
cp l
jr nz, Func_74152
ld a, h
- ld [rSCX], a ; $ff43
+ ld [rSCX], a
.asm_7415a
ld a, [$ff44]
cp h
@@ -128,11 +128,11 @@ DataTable_74160: ; 74160 (1d:4160)
Func_74164: ; 74164 (1d:4164)
ld a, l
- ld [H_AUTOBGTRANSFERDEST], a ; $ffbc
+ ld [H_AUTOBGTRANSFERDEST], a
ld a, h
ld [$ffbd], a
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3
Func_74171: ; 74171 (1d:4171)
@@ -157,7 +157,7 @@ FillMiddleOfScreenWithWhite: ; 74183 (1d:4183)
jp FillMemory
Credits: ; 7418e (1d:418e)
- ld de, CreditsOrder ; $4243
+ ld de, CreditsOrder
push de
.asm_74192
pop de
@@ -183,7 +183,7 @@ Credits: ; 7418e (1d:418e)
jr z, .showTheEnd
push hl
push hl
- ld hl, CreditsTextPointers ; $42c3
+ ld hl, CreditsTextPointers
add a
ld c, a
ld b, $0
@@ -205,20 +205,20 @@ Credits: ; 7418e (1d:418e)
jr .asm_7419b
.asm_741d5
call Func_740ba
- ld c, $5a
+ ld c, 90
jr .asm_741de
.asm_741dc
- ld c, $6e
+ ld c, 110
.asm_741de
call DelayFrames
call DisplayCreditsMon
jr .asm_74192
.asm_741e6
call Func_740ba
- ld c, $78
+ ld c, 120
jr .asm_741ef
.asm_741ed
- ld c, $8c
+ ld c, 140
.asm_741ef
call DelayFrames
jr .asm_74192
@@ -229,7 +229,7 @@ Credits: ; 7418e (1d:418e)
pop de
jr .asm_7419b
.showTheEnd
- ld c, $10
+ ld c, 16
call DelayFrames
call FillMiddleOfScreenWithWhite
pop de
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index dc08e0e1..cdd28422 100755
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -170,7 +170,7 @@ PlayAnimation: ; 780f1 (1e:40f1)
ld l,a
ld h,0
add hl,hl
- ld de,AttackAnimationPointers ; $607d ; animation command stream pointers
+ ld de,AttackAnimationPointers ; animation command stream pointers
add hl,de
ld a,[hli]
ld h,[hl]
@@ -199,7 +199,7 @@ PlayAnimation: ; 780f1 (1e:40f1)
ld [wAnimSoundID],a ; store sound
push hl
push de
- call Func_7986f
+ call GetMoveSound
call PlaySound
pop de
pop hl
@@ -383,7 +383,7 @@ MoveAnimation: ; 78d5e (1e:4d5e)
push bc
push af
call WaitForSoundToFinish
- call Func_78e23
+ call SetAnimationPalette
ld a,[W_ANIMATIONID]
and a
jr z,.AnimationFinished
@@ -500,19 +500,19 @@ AnimationShakeScreenHorizontallySlow: ; 78e01 (1e:4e01)
push bc
push bc
.asm_78e03
- ld a, [rWX] ; $ff4b
+ ld a, [rWX]
inc a
- ld [rWX], a ; $ff4b
- ld c, $2
+ ld [rWX], a
+ ld c, 2
call DelayFrames
dec b
jr nz, .asm_78e03
pop bc
.asm_78e11
- ld a, [rWX] ; $ff4b
+ ld a, [rWX]
dec a
- ld [rWX], a ; $ff4b
- ld c, $2
+ ld [rWX], a
+ ld c, 2
call DelayFrames
dec b
jr nz, .asm_78e11
@@ -521,7 +521,7 @@ AnimationShakeScreenHorizontallySlow: ; 78e01 (1e:4e01)
jr nz, AnimationShakeScreenHorizontallySlow
ret
-Func_78e23: ; 78e23 (1e:4e23)
+SetAnimationPalette: ; 78e23 (1e:4e23)
ld a, [wOnSGB]
and a
ld a, $e4
@@ -529,7 +529,7 @@ Func_78e23: ; 78e23 (1e:4e23)
ld a, $f0
ld [wcc79], a
ld b, $e4
- ld a, [W_ANIMATIONID] ; W_ANIMATIONID
+ ld a, [W_ANIMATIONID]
cp TRADE_BALL_DROP_ANIM
jr c, .asm_78e3f
cp TRADE_BALL_POOF_ANIM + 1
@@ -537,24 +537,24 @@ Func_78e23: ; 78e23 (1e:4e23)
ld b, $f0
.asm_78e3f
ld a, b
- ld [rOBP0], a ; $ff48
+ ld [rOBP0], a
ld a, $6c
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
ret
.asm_78e47
ld a, $e4
ld [wcc79], a
- ld [rOBP0], a ; $ff48
+ ld [rOBP0], a
ld a, $6c
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
ret
PlaySubanimation: ; 78e53 (1e:4e53)
ld a,[wAnimSoundID]
cp a,$FF
jr z,.skipPlayingSound
- call Func_7986f
- call PlaySound ; play sound effect
+ call GetMoveSound
+ call PlaySound
.skipPlayingSound
ld hl,wOAMBuffer ; base address of OAM buffer
ld a,l
@@ -581,7 +581,7 @@ PlaySubanimation: ; 78e53 (1e:4e53)
push hl
ld e,[hl] ; base coordinate ID
ld d,0
- ld hl,FrameBlockBaseCoords ; $7c85 ; base coordinate table
+ ld hl,FrameBlockBaseCoords ; base coordinate table
add hl,de
add hl,de
ld a,[hli]
@@ -667,7 +667,7 @@ AnimationIdSpecialEffects: ; 78ef5 (1e:4ef5)
dw AnimationFlashScreen
db TAIL_WHIP
- dw Func_790d0
+ dw TailWhipAnimationUnused
db GROWL
dw DoGrowlSpecialEffects
@@ -703,13 +703,13 @@ AnimationIdSpecialEffects: ; 78ef5 (1e:4ef5)
dw DoRockSlideSpecialEffects
db TRADE_BALL_DROP_ANIM
- dw Func_79041
+ dw TradeHidePokemon
db TRADE_BALL_SHAKE_ANIM
- dw Func_7904c
+ dw TradeShakePokeball
db TRADE_BALL_TILT_ANIM
- dw Func_7907c
+ dw TradeJumpPokeball
db TOSS_ANIM
dw DoBallTossSpecialEffects
@@ -742,7 +742,7 @@ DoBallTossSpecialEffects: ; 78f3e (1e:4f3e)
jr nz,.skipPlayingSound
; if it is the beginning of the subanimation, play a sound
ld a,(SFX_08_41 - SFX_Headers_08) / 3
- call PlaySound ; play sound
+ call PlaySound
.skipPlayingSound
ld a,[W_ISINBATTLE]
cp a,02 ; is it a trainer battle?
@@ -788,7 +788,7 @@ DoBallShakeSpecialEffects: ; 78f96 (1e:4f96)
jr nz,.skipPlayingSound
; if it is the beginning of a shake, play a sound and wait 2/3 of a second
ld a,(SFX_08_3c - SFX_Headers_08) / 3
- call PlaySound ; play sound
+ call PlaySound
ld c,40
call DelayFrames
.skipPlayingSound
@@ -875,8 +875,8 @@ DoBlizzardSpecialEffects: ; 79016 (1e:5016)
ret
; flashes the screen at 3 points in the subanimation
-; XXX is this unused?
-Func_7902e: ; 7902e (1e:502e)
+; unused
+FlashScreenUnused: ; 7902e (1e:502e)
ld a,[W_SUBANIMCOUNTER]
cp a,14
jp z,AnimationFlashScreen
@@ -887,8 +887,7 @@ Func_7902e: ; 7902e (1e:502e)
ret
; function to make the pokemon disappear at the beginning of the animation
-; XXX probably a trade-related animation
-Func_79041: ; 79041 (1e:5041)
+TradeHidePokemon: ; 79041 (1e:5041)
ld a,[W_SUBANIMCOUNTER]
cp a,6
ret nz
@@ -896,8 +895,7 @@ Func_79041: ; 79041 (1e:5041)
jp Func_7980c ; make pokemon disappear
; function to make a shaking pokeball jump up at the end of the animation
-; XXX probably a trade-related animation
-Func_7904c: ; 7904c (1e:504c)
+TradeShakePokeball: ; 7904c (1e:504c)
ld a,[W_SUBANIMCOUNTER]
cp a,1
ret nz
@@ -924,15 +922,14 @@ Func_7904c: ; 7904c (1e:504c)
.done
call AnimationCleanOAM
ld a,(SFX_02_44 - SFX_Headers_02) / 3
- jp PlaySound ; play sound
+ jp PlaySound
BallMoveDistances1: ; 79078 (1e:5078)
db -12,-12,-8
db $ff ; terminator
; function to make the pokeball jump up
-; XXX probably a trade-related animation
-Func_7907c ; 507C
+TradeJumpPokeball: ; 507C
ld de,BallMoveDistances2
.loop
ld hl,wOAMBuffer ; OAM buffer
@@ -985,7 +982,7 @@ DoGrowlSpecialEffects: ; 790bc (1e:50bc)
ret
; this is associated with Tail Whip, but Tail Whip doesn't use any subanimations
-Func_790d0: ; 790d0 (1e:50d0)
+TailWhipAnimationUnused: ; 790d0 (1e:50d0)
ld a,1
ld [W_SUBANIMCOUNTER],a
ld c,20
@@ -1183,46 +1180,46 @@ AnimationFlashScreen: ; 791be (1e:51be)
AnimationDarkScreenPalette: ; 791d6 (1e:51d6)
; Changes the screen's palette to a dark palette.
ld bc, $6f6f
- jr Func_791fc
+ jr SetAnimationBGPalette
AnimationDarkenMonPalette: ; 791db (1e:51db)
; Darkens the mon sprite's palette.
ld bc, $f9f4
- jr Func_791fc
+ jr SetAnimationBGPalette
-Func_791e0: ; 791e0 (1e:51e0)
+AnimationUnusedPalette1: ; 791e0 (1e:51e0)
ld bc, $fef8
- jr Func_791fc
+ jr SetAnimationBGPalette
-Func_791e5: ; 791e5 (1e:51e5)
+AnimationUnusedPalette2: ; 791e5 (1e:51e5)
ld bc, $ffff
- jr Func_791fc
+ jr SetAnimationBGPalette
AnimationResetScreenPalette: ; 791ea (1e:51ea)
; Restores the screen's palette to the normal palette.
ld bc, $e4e4
- jr Func_791fc
+ jr SetAnimationBGPalette
-Func_791ef: ; 791ef (1e:51ef)
+AnimationUnusedPalette3: ; 791ef (1e:51ef)
ld bc, $0000
- jr Func_791fc
+ jr SetAnimationBGPalette
AnimationLightScreenPalette: ; 791f4 (1e:51f4)
; Changes the screen to use a palette with light colors.
ld bc, $9090
- jr Func_791fc
+ jr SetAnimationBGPalette
-Func_791f9: ; 791f9 (1e:51f9)
+AnimationUnusedPalette4: ; 791f9 (1e:51f9)
ld bc, $4040
-Func_791fc: ; 791fc (1e:51fc)
+SetAnimationBGPalette: ; 791fc (1e:51fc)
ld a, [wOnSGB]
and a
ld a, b
jr z, .asm_79204
ld a, c
.asm_79204
- ld [rBGP], a ; $ff47
+ ld [rBGP], a
ret
ld b, $5
@@ -1246,45 +1243,45 @@ AnimationWaterDropletsEverywhere: ; 79215 (1e:5215)
call LoadAnimationTileset
ld d, $20
ld a, $f0
- ld [W_BASECOORDX], a ; wd081
+ ld [W_BASECOORDX], a
ld a, $71
ld [wd09f], a
.asm_79228
ld a, $10
- ld [W_BASECOORDY], a ; wd082
+ ld [W_BASECOORDY], a
ld a, $0
ld [wd08a], a
- call Func_79246
+ call _AnimationWaterDroplets
ld a, $18
- ld [W_BASECOORDY], a ; wd082
+ ld [W_BASECOORDY], a
ld a, $20
ld [wd08a], a
- call Func_79246
+ call _AnimationWaterDroplets
dec d
jr nz, .asm_79228
ret
-Func_79246: ; 79246 (1e:5246)
+_AnimationWaterDroplets: ; 79246 (1e:5246)
ld hl, wOAMBuffer
.asm_79249
- ld a, [W_BASECOORDY] ; wd082
+ ld a, [W_BASECOORDY]
ld [hli], a
- ld a, [W_BASECOORDX] ; wd081
+ ld a, [W_BASECOORDX]
add $1b
- ld [W_BASECOORDX], a ; wd081
+ ld [W_BASECOORDX], a
ld [hli], a
ld a, [wd09f]
ld [hli], a
xor a
ld [hli], a
- ld a, [W_BASECOORDX] ; wd081
+ ld a, [W_BASECOORDX]
cp $90
jr c, .asm_79249
sub $a8
- ld [W_BASECOORDX], a ; wd081
- ld a, [W_BASECOORDY] ; wd082
+ ld [W_BASECOORDX], a
+ ld a, [W_BASECOORDY]
add $10
- ld [W_BASECOORDY], a ; wd082
+ ld [W_BASECOORDY], a
cp $70
jr c, .asm_79249
call AnimationCleanOAM
@@ -1304,7 +1301,7 @@ AnimationSlideMonUp: ; 7927a (1e:527a)
ld a, $ff
.asm_79291
ld [wd09f], a
- jp Func_792bf
+ jp _AnimationSlideMonUp
AnimationSlideMonDown: ; 79297 (1e:5297)
; Slides the mon's sprite down out of the screen.
@@ -1314,7 +1311,7 @@ AnimationSlideMonDown: ; 79297 (1e:5297)
call GetMonSpriteTileMapPointerFromRowCount
push bc
push de
- call Func_79aae
+ call CopyPicTiles
call Delay3
call AnimationHideMonPic
pop de
@@ -1327,15 +1324,15 @@ AnimationSlideMonOut: ; 792af (1e:52af)
; Slides the mon's sprite out of the screen horizontally.
ld e, $8
ld a, $3
- ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM
- jp Func_795f8
+ ld [W_SUBANIMTRANSFORM], a
+ jp AnimationSlideMonLeft
AnimationSlideEnemyMonOut: ; 792b9 (1e:52b9)
; Slides the enemy mon out of the screen horizontally.
- ld hl, AnimationSlideMonOut ; $52af
+ ld hl, AnimationSlideMonOut
jp CallWithTurnFlipped
-Func_792bf: ; 792bf (1e:52bf)
+_AnimationSlideMonUp: ; 792bf (1e:52bf)
push de
push hl
push bc
@@ -1368,16 +1365,16 @@ Func_792bf: ; 792bf (1e:52bf)
add $7
dec c
jr nz, .asm_792eb
- ld c, $2
+ ld c, 2
call DelayFrames
pop bc
pop hl
pop de
dec c
- jr nz, Func_792bf
+ jr nz, _AnimationSlideMonUp
ret
-Func_792fd: ; 792fd (1e:52fd)
+_AnimationShakeEnemyHUD: ; 792fd (1e:52fd)
ld a, $10
ld [W_BASECOORDX], a
ld a, $30
@@ -1390,7 +1387,7 @@ Func_792fd: ; 792fd (1e:52fd)
ld e, a
ld b, $5
.asm_79314
- call Func_79329
+ call Animations_79329
inc d
dec b
jr nz, .asm_79314
@@ -1403,12 +1400,12 @@ Func_792fd: ; 792fd (1e:52fd)
ld [W_BASECOORDX], a
jr .asm_7930e
-Func_79329: ; 79329 (1e:5329)
+Animations_79329: ; 79329 (1e:5329)
ld a, e
add $8
ld e, a
ld [hli], a
- ld a, [W_BASECOORDX] ; wd081
+ ld a, [W_BASECOORDX]
ld [hli], a
ld a, d
ld [hli], a
@@ -1464,7 +1461,7 @@ AdjustOAMBlockYPos2: ; 79352 (1e:5352)
AnimationBlinkEnemyMon: ; 79369 (1e:5369)
; Make the enemy mon's sprite blink on and off for a second or two
- ld hl, AnimationBlinkMon ; $536f
+ ld hl, AnimationBlinkMon
jp CallWithTurnFlipped
AnimationBlinkMon: ; 7936f (1e:536f)
@@ -1474,10 +1471,10 @@ AnimationBlinkMon: ; 7936f (1e:536f)
.asm_79372
push bc
call AnimationHideMonPic
- ld c, $5
+ ld c, 5
call DelayFrames
call AnimationShowMonPic
- ld c, $5
+ ld c, 5
call DelayFrames
pop bc
dec c
@@ -1502,7 +1499,7 @@ AnimationShowMonPic: ; 7939e (1e:539e)
xor a
call GetTileIDList
call GetMonSpriteTileMapPointerFromRowCount
- call Func_79aae
+ call CopyPicTiles
jp Delay3
AnimationShowEnemyMonPic: ; 793ab (1e:53ab)
@@ -1537,7 +1534,7 @@ AnimationShakeBackAndForth: ; 793b1 (1e:53b1)
push hl
call GetTileIDList
pop hl
- call Func_79aae
+ call CopyPicTiles
call Delay3
pop hl
ld bc, $0709
@@ -1545,7 +1542,7 @@ AnimationShakeBackAndForth: ; 793b1 (1e:53b1)
pop af
call GetTileIDList
pop hl
- call Func_79aae
+ call CopyPicTiles
call Delay3
pop hl
ld bc, $0709
@@ -1562,7 +1559,7 @@ AnimationMoveMonHorizontally: ; 793f9 (1e:53f9)
; Shifts the mon's sprite horizontally to a fixed location. Used by lots of
; animations like Tackle/Body Slam.
call AnimationHideMonPic
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
hlCoord 2, 5
jr z, .asm_79407
@@ -1572,13 +1569,13 @@ AnimationMoveMonHorizontally: ; 793f9 (1e:53f9)
push hl
call GetTileIDList
pop hl
- call Func_79aae
- ld c, $3
+ call CopyPicTiles
+ ld c, 3
jp DelayFrames
AnimationResetMonPosition: ; 79415 (1e:5415)
; Resets the mon's sprites to be located at the normal coordinates.
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
ld a, $66
jr z, .asm_7941e
@@ -1590,24 +1587,24 @@ AnimationResetMonPosition: ; 79415 (1e:5415)
AnimationSpiralBallsInward: ; 79424 (1e:5424)
; Creates an effect that looks like energy balls sprialing into the
; player mon's sprite. Used in Focus Energy, for example.
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
jr z, .asm_79435
ld a, $d8
ld [wd08a], a
ld a, $50
- ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM
+ ld [W_SUBANIMTRANSFORM], a
jr .asm_7943c
.asm_79435
xor a
ld [wd08a], a
- ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM
+ ld [W_SUBANIMTRANSFORM], a
.asm_7943c
ld d, $7a
ld c, $3
xor a
call Func_797e8
- ld hl, SpiralBallAnimationCoordinates ; $5476
+ ld hl, SpiralBallAnimationCoordinates
.asm_79447
push hl
ld c, $3
@@ -1621,7 +1618,7 @@ AnimationSpiralBallsInward: ; 79424 (1e:5424)
ld [de], a
inc de
inc hl
- ld a, [W_SUBANIMTRANSFORM] ; W_SUBANIMTRANSFORM
+ ld a, [W_SUBANIMTRANSFORM]
add [hl]
ld [de], a
inc hl
@@ -1630,7 +1627,7 @@ AnimationSpiralBallsInward: ; 79424 (1e:5424)
inc de
dec c
jr nz, .asm_7944d
- ld c, $5
+ ld c, 5
call DelayFrames
pop hl
inc hl
@@ -1674,7 +1671,7 @@ AnimationSquishMonPic: ; 794a1 (1e:54a1)
ld c, $4
.asm_794a3
push bc
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
jr z, .asm_794b1
hlCoord 16, 0
@@ -1687,11 +1684,11 @@ AnimationSquishMonPic: ; 794a1 (1e:54a1)
push de
xor a
ld [wd09f], a
- call Func_794d4
+ call _AnimationSquishMonPic
pop hl
ld a, $1
ld [wd09f], a
- call Func_794d4
+ call _AnimationSquishMonPic
pop bc
dec c
jr nz, .asm_794a3
@@ -1699,7 +1696,7 @@ AnimationSquishMonPic: ; 794a1 (1e:54a1)
ld c, $2
jp DelayFrame
-Func_794d4: ; 794d4 (1e:54d4)
+_AnimationSquishMonPic: ; 794d4 (1e:54d4)
ld c, $7
.asm_794d6
push bc
@@ -1727,7 +1724,7 @@ Func_794d4: ; 794d4 (1e:54d4)
AnimationShootBallsUpward: ; 794f9 (1e:54f9)
; Shoots one pillar of "energy" balls upwards. Used in Teleport/Sky Attack
; animations.
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
jr z, .asm_79503
ld bc, $80
@@ -1736,14 +1733,14 @@ AnimationShootBallsUpward: ; 794f9 (1e:54f9)
ld bc, $3028
.asm_79506
ld a, b
- ld [W_BASECOORDY], a ; wd082
+ ld [W_BASECOORDY], a
ld a, c
- ld [W_BASECOORDX], a ; wd081
+ ld [W_BASECOORDX], a
ld bc, $501
- call Func_79517
+ call _AnimationShootBallsUpward
jp AnimationCleanOAM
-Func_79517: ; 79517 (1e:5517)
+_AnimationShootBallsUpward: ; 79517 (1e:5517)
push bc
xor a
ld [wd09f], a
@@ -1752,10 +1749,10 @@ Func_79517: ; 79517 (1e:5517)
ld d, $7a
ld hl, wOAMBuffer
push bc
- ld a, [W_BASECOORDY] ; wd082
+ ld a, [W_BASECOORDY]
ld e, a
.asm_7952a
- call Func_79329
+ call Animations_79329
dec b
jr nz, .asm_7952a
call DelayFrame
@@ -1766,7 +1763,7 @@ Func_79517: ; 79517 (1e:5517)
push bc
ld hl, wOAMBuffer
.asm_7953c
- ld a, [W_BASECOORDY] ; wd082
+ ld a, [W_BASECOORDY]
add $8
ld e, a
ld a, [hl]
@@ -1812,7 +1809,7 @@ AnimationShootManyBallsUpward: ; 79566 (1e:5566)
ld [W_BASECOORDX], a
ld bc, $0401
push hl
- call Func_79517
+ call _AnimationShootBallsUpward
pop hl
jr .loop
@@ -1839,7 +1836,7 @@ AnimationMinimizeMon: ; 7959f (1e:559f)
pop hl
ld de, $194
add hl, de
- ld de, MinimizedMonSprite ; $55c4
+ ld de, MinimizedMonSprite
ld c, $5
.asm_795b4
ld a, [de]
@@ -1867,8 +1864,8 @@ AnimationSlideMonDownAndHide: ; 795c9 (1e:55c9)
push af
call GetTileIDList
call GetMonSpriteTileMapPointerFromRowCount
- call Func_79aae
- ld c, $8
+ call CopyPicTiles
+ ld c, 8
call DelayFrames
pop af
inc a
@@ -1882,8 +1879,8 @@ AnimationSlideMonDownAndHide: ; 795c9 (1e:55c9)
call FillMemory
jp Func_79652
-Func_795f8: ; 795f8 (1e:55f8)
- ld a, [H_WHOSETURN] ; $fff3
+AnimationSlideMonLeft: ; 795f8 (1e:55f8)
+ ld a, [H_WHOSETURN]
and a
jr z, .asm_79602
hlCoord 12, 0
@@ -1898,7 +1895,7 @@ Func_795f8: ; 795f8 (1e:55f8)
.asm_7960a
ld c, $8
.asm_7960c
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
jr z, .asm_79616
call Func_7963c
@@ -1915,7 +1912,7 @@ Func_795f8: ; 795f8 (1e:55f8)
pop de
dec b
jr nz, .asm_7960a
- ld a, [W_SUBANIMTRANSFORM] ; W_SUBANIMTRANSFORM
+ ld a, [W_SUBANIMTRANSFORM]
ld c, a
call DelayFrames
pop hl
@@ -1945,11 +1942,11 @@ AnimationSlideMonHalfLeft: ; 79645 (1e:5645)
ld e, $4
ld a, $4
ld [W_SUBANIMTRANSFORM], a
- call Func_795f8
+ call AnimationSlideMonLeft
jp Delay3
Func_79652: ; 79652 (1e:5652)
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
ld hl, vBackPic
jr z, .asm_7965d
@@ -2028,7 +2025,7 @@ AnimationSubstitute: ; 796e0 (1e:56e0)
call FillMemory
ld a, [$fff3]
and a
- jr z, .asm_79715 ; 0x796ed $26
+ jr z, .asm_79715
ld hl, SlowbroSprite ; facing down sprite
ld de, wTempPic + $120
call CopySlowbroSpriteData
@@ -2065,13 +2062,13 @@ CopySlowbroSpriteData: ; 7973f (1e:573f)
jp FarCopyData2
Func_79747: ; 79747 (1e:5747)
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
ld hl, wccf7
- ld a, [W_PLAYERBATTSTATUS2] ; W_PLAYERBATTSTATUS2
+ ld a, [W_PLAYERBATTSTATUS2]
jr z, .asm_79758
ld hl, wccf3
- ld a, [W_ENEMYBATTSTATUS2] ; W_ENEMYBATTSTATUS2
+ ld a, [W_ENEMYBATTSTATUS2]
.asm_79758
push hl
bit 4, a
@@ -2102,7 +2099,7 @@ AnimationBoundUpAndDown: ; 7977a (1e:577a)
call AnimationSlideMonDown
pop bc
dec c
- jr nz, .asm_7977c ; 0x79782 $f8
+ jr nz, .asm_7977c
jp AnimationShowMonPic
AnimationTransformMon: ; 79787 (1e:5787)
@@ -2114,7 +2111,7 @@ AnimationTransformMon: ; 79787 (1e:5787)
ld [wHPBarMaxHP], a
Func_79793: ; 79793 (1e:5793)
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
jr z, .asm_797b0
ld a, [wHPBarMaxHP]
@@ -2137,7 +2134,7 @@ Func_79793: ; 79793 (1e:5793)
xor a
call GetTileIDList
call GetMonSpriteTileMapPointerFromRowCount
- call Func_79aae
+ call CopyPicTiles
pop af
ld [wBattleMonSpecies2], a
.asm_797d3
@@ -2147,11 +2144,11 @@ Func_79793: ; 79793 (1e:5793)
AnimationHideEnemyMonPic: ; 797d8 (1e:57d8)
; Hides the enemy mon's sprite
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
- ld hl, AnimationHideMonPic ; $5801
+ ld [H_AUTOBGTRANSFERENABLED], a
+ ld hl, AnimationHideMonPic
call CallWithTurnFlipped
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3
Func_797e8: ; 797e8 (1e:57e8)
@@ -2163,17 +2160,17 @@ Func_797e8: ; 797e8 (1e:57e8)
pop bc
xor a
ld e, a
- ld [W_BASECOORDX], a ; wd081
+ ld [W_BASECOORDX], a
ld hl, wOAMBuffer
.asm_797fa
- call Func_79329
+ call Animations_79329
dec c
jr nz, .asm_797fa
ret
AnimationHideMonPic: ; 79801 (1e:5801)
; Hides the mon's sprite.
- ld a, [H_WHOSETURN] ; $fff3
+ ld a, [H_WHOSETURN]
and a
jr z, .asm_7980a
ld a, $c
@@ -2269,13 +2266,15 @@ Func_79862: ; 79862 (1e:5862)
jr nz, Func_79862
ret
-Func_79869: ; 79869 (1e:5869)
+; get the sound of the move id in b
+GetMoveSoundB: ; 79869 (1e:5869)
ld a, b
- call Func_7986f
+ call GetMoveSound
ld b, a
ret
-Func_7986f: ; 7986f (1e:586f)
+; get the sound of the move id in a
+GetMoveSound: ; 7986f (1e:586f)
ld hl,MoveSoundTable
ld e,a
ld d,0
@@ -2496,7 +2495,7 @@ MoveSoundTable: ; 798bc (1e:58bc)
db (SFX_08_4b - SFX_Headers_08) / 3,$00,$80
db (SFX_08_4b - SFX_Headers_08) / 3,$00,$80
-Func_79aae: ; 79aae (1e:5aae)
+CopyPicTiles: ; 79aae (1e:5aae)
ld a, [H_WHOSETURN]
and a
ld a, $31 ; base tile ID of player mon sprite
@@ -2507,15 +2506,17 @@ Func_79aae: ; 79aae (1e:5aae)
ld [hBaseTileID], a
jr asm_79acb
-Func_79aba: ; 79aba (1e:5aba)
+; copy the tiles used when a mon is being sent out
+; and "growing" out of the pokeball
+CopyGrowingMonTiles: ; 79aba (1e:5aba)
call GetPredefRegisters
ld a, [wcd6c]
and a
jr nz, .asm_79ac8
- ld de, Unknown_79b02 ; $5b02
+ ld de, Unknown_79b02 ; 5x5
jr asm_79acb
.asm_79ac8
- ld de, Unknown_79b1b ; $5b1b
+ ld de, Unknown_79b1b ; 3x3
asm_79acb: ; 79acb (1e:5acb)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
@@ -2811,7 +2812,7 @@ AnimationShakeEnemyHUD: ; 79d77 (1e:5d77)
call Func_79e0d
ld a, $38
ld [hWY], a
- call Func_792fd
+ call _AnimationShakeEnemyHUD
ld hl, vBGMap0
call Func_79e0d
call AnimationHideMonPic
@@ -2854,12 +2855,12 @@ Func_79de9: ; 79de9 (1e:5de9)
ld a, [wTrainerSpriteOffset]
add d
ld [hSCX], a
- ld c, $2
+ ld c, 2
call DelayFrames
ld a, [wTrainerSpriteOffset]
sub d
ld [hSCX], a
- ld c, $2
+ ld c, 2
call DelayFrames
dec e
jr nz, .asm_79dee
@@ -2926,7 +2927,7 @@ TossBallAnimation: ; 79e16 (1e:5e16)
ld [W_ANIMATIONID],a
call PlayAnimation
ld a,(SFX_08_43 - SFX_Headers_08) / 3
- call PlaySound ; play sound effect
+ call PlaySound
ld a,BLOCKBALL_ANIM
ld [W_ANIMATIONID],a
jp PlayAnimation
diff --git a/engine/battle/bank_e_misc.asm b/engine/battle/bank_e_misc.asm
index 78b27108..80fa971a 100644..100755
--- a/engine/battle/bank_e_misc.asm
+++ b/engine/battle/bank_e_misc.asm
@@ -52,40 +52,40 @@ FormatMovesString: ; 39b87 (e:5b87)
ret
; XXX this is called in a few places, but it doesn't appear to do anything useful
-Func_39bd5: ; 39bd5 (e:5bd5)
+InitList: ; 39bd5 (e:5bd5)
ld a, [wd11b]
cp $1
- jr nz, .asm_39be6
+ jr nz, .notEnemy
ld hl, wEnemyPartyCount
ld de, wEnemyMonOT
ld a, ENEMYOT_NAME
- jr .asm_39c18
-.asm_39be6
+ jr .done
+.notEnemy
cp $4
- jr nz, .calcAttackStat4
+ jr nz, .notPlayer
ld hl, wPartyCount
ld de, wPartyMonOT
ld a, PLAYEROT_NAME
- jr .asm_39c18
-.calcAttackStat4
+ jr .done
+.notPlayer
cp $5
- jr nz, .asm_39c02
+ jr nz, .notMonster
ld hl, wStringBuffer2 + 11
ld de, MonsterNames
ld a, MONSTER_NAME
- jr .asm_39c18
-.asm_39c02
+ jr .done
+.notMonster
cp $2
- jr nz, .asm_39c10
+ jr nz, .notBag
ld hl, wNumBagItems
ld de, ItemNames
ld a, ITEM_NAME
- jr .asm_39c18
-.asm_39c10
+ jr .done
+.notBag
ld hl, wStringBuffer2 + 11
ld de, ItemNames
ld a, ITEM_NAME
-.asm_39c18
+.done
ld [wNameListType], a
ld a, l
ld [wList], a
@@ -119,4 +119,4 @@ GetMonSpecies: ; 39c37 (e:5c37)
add hl, de
ld a, [hl]
ld [wcf91], a
- ret \ No newline at end of file
+ ret
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index f1aa4161..b231459d 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -352,7 +352,7 @@ BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
cp $1
jr z, .done
ld [rBGP], a
- ld c, $2
+ ld c, 2
call DelayFrames
jr .loop
.done
@@ -389,13 +389,13 @@ BattleTransition_Shrink: ; 70b7f (1c:4b7f)
call BattleTransition_CopyTiles2
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
- ld c, $6
+ ld c, 6
call DelayFrames
pop bc
dec c
jr nz, .loop
call BattleTransition_BlackScreen
- ld c, $a
+ ld c, 10
jp DelayFrames
; used for high level trainer dungeon battles
@@ -427,7 +427,7 @@ BattleTransition_Split: ; 70bca (1c:4bca)
dec c
jr nz, .loop
call BattleTransition_BlackScreen
- ld c, $a
+ ld c, 10
jp DelayFrames
BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm
index 9a00bd98..11309a86 100644
--- a/engine/battle/common_text.asm
+++ b/engine/battle/common_text.asm
@@ -1,8 +1,8 @@
PrintBeginningBattleText: ; 58d99 (16:4d99)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
dec a
jr nz, .trainerBattle
- ld a, [W_CURMAP] ; W_CURMAP
+ ld a, [W_CURMAP]
cp POKEMONTOWER_3
jr c, .notPokemonTower
cp LAVENDER_HOUSE_1
@@ -11,7 +11,7 @@ PrintBeginningBattleText: ; 58d99 (16:4d99)
ld a, [wEnemyMonSpecies2]
call PlayCry
ld hl, WildMonAppearedText
- ld a, [W_MOVEMISSED] ; W_MOVEMISSED
+ ld a, [W_MOVEMISSED]
and a
jr z, .notFishing
ld hl, HookedMonAttackedText
@@ -19,7 +19,7 @@ PrintBeginningBattleText: ; 58d99 (16:4d99)
jr .wildBattle
.trainerBattle
call .playSFX
- ld c, $14
+ ld c, 20
call DelayFrames
ld hl, TrainerWantsToFightText
.wildBattle
@@ -139,22 +139,22 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59)
GoText: ; 58eae (16:4eae)
TX_FAR _GoText
- db $08 ; asm
+ TX_ASM
jr PrintPlayerMon1Text
DoItText: ; 58eb5 (16:4eb5)
TX_FAR _DoItText
- db $08 ; asm
+ TX_ASM
jr PrintPlayerMon1Text
GetmText: ; 58ebc (16:4ebc)
TX_FAR _GetmText
- db $08 ; asm
+ TX_ASM
jr PrintPlayerMon1Text
EnemysWeakText: ; 58ec3 (16:4ec3)
TX_FAR _EnemysWeakText
- db $08 ; asm
+ TX_ASM
PrintPlayerMon1Text:
ld hl, PlayerMon1Text
@@ -170,7 +170,7 @@ RetreatMon: ; 58ed1 (16:4ed1)
PlayerMon2Text: ; 58ed7 (16:4ed7)
TX_FAR _PlayerMon2Text
- db $08 ; asm
+ TX_ASM
push de
push bc
ld hl, wEnemyMonHP + 1
@@ -216,17 +216,17 @@ PlayerMon2Text: ; 58ed7 (16:4ed7)
EnoughText: ; 58f25 (16:4f25)
TX_FAR _EnoughText
- db $08 ; asm
+ TX_ASM
jr PrintComeBackText
OKExclamationText: ; 58f2c (16:4f2c)
TX_FAR _OKExclamationText
- db $08 ; asm
+ TX_ASM
jr PrintComeBackText
GoodText: ; 58f33 (16:4f33)
TX_FAR _GoodText
- db $08 ; asm
+ TX_ASM
jr PrintComeBackText
PrintComeBackText: ; 58f3a (16:4f3a)
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 04a6de1c..ec67d094 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -177,7 +177,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
ld a, $31
ld [$ffe1], a
hlCoord 1, 5
- predef Func_3f0c6
+ predef CopyUncompressedPicToTilemap
xor a
ld [hWY], a
ld [rWY], a
@@ -620,7 +620,7 @@ HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd)
or [hl]
ret nz ; test if fainted
call DrawHUDsAndHPBars
- ld c, $14
+ ld c, 20
call DelayFrames
xor a
ret
@@ -823,7 +823,7 @@ HandleEnemyMonFainted: ; 3c525 (f:4525)
ld [wcd6a], a
jp MainInBattleLoop
-FaintEnemyPokemon ; 0x3c567
+FaintEnemyPokemon: ; 0x3c567
call ReadPlayerMonCurHPAndStatus
ld a, [W_ISINBATTLE]
dec a
@@ -1020,10 +1020,10 @@ TrainerBattleVictory: ; 3c696 (f:4696)
cp LINK_STATE_BATTLING
ret z
call ScrollTrainerPicAfterBattle
- ld c, $28
+ ld c, 40
call DelayFrames
call PrintEndBattleText
-; win money
+; win money
ld hl, MoneyForWinningText
call PrintText
ld de, wPlayerMoney + 2
@@ -1218,7 +1218,7 @@ HandlePlayerBlackOut: ; 3c837 (f:4837)
ld bc, $815
call ClearScreenArea
call ScrollTrainerPicAfterBattle
- ld c, $28
+ ld c, 40
call DelayFrames
ld hl, Sony1WinText
call PrintText
@@ -1506,7 +1506,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
ld a,$CF
ld [$FFE1],a
hlCoord 15, 6
- predef Func_3f073
+ predef AnimateSendingOutMon
ld a,[wEnemyMonSpecies2]
call PlayCry
call DrawEnemyHUDAndHPBar
@@ -1642,7 +1642,7 @@ TryRunningFromBattle: ; 3cab9 (f:4ab9)
ld b, a
ld a, [H_QUOTIENT + 3]
cp b
- jr nc, .canEscape ; if the random value was less than or equal to the quotient
+ jr nc, .canEscape ; if the random value was less than or equal to the quotient
; plus 30 times the number of attempts, the player can escape
; can't escape
ld a, $1
@@ -1836,7 +1836,7 @@ SendOutMon: ; 3cc91 (f:4c91)
ld a, POOF_ANIM
call PlayMoveAnimation
hlCoord 4, 11
- predef Func_3f073
+ predef AnimateSendingOutMon
ld a, [wcf91]
call PlayCry
call PrintEmptyString
@@ -1852,8 +1852,8 @@ AnimateRetreatingPlayerMon: ; 3ccfa (f:4cfa)
xor a
ld [wcd6c], a
ld [H_DOWNARROWBLINKCNT1], a
- predef Func_79aba
- ld c, $4
+ predef CopyGrowingMonTiles
+ ld c, 4
call DelayFrames
call .clearScreenArea
hlCoord 4, 9
@@ -1862,7 +1862,7 @@ AnimateRetreatingPlayerMon: ; 3ccfa (f:4cfa)
ld [wcd6c], a
xor a
ld [H_DOWNARROWBLINKCNT1], a
- predef Func_79aba
+ predef CopyGrowingMonTiles
call Delay3
call .clearScreenArea
ld a, $4c
@@ -2110,12 +2110,12 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
; the following simulates the keystrokes by drawing menus on screen
hlCoord 9, 14
ld [hl], "▶"
- ld c, $50
+ ld c, 80
call DelayFrames
ld [hl], $7f
hlCoord 9, 16
ld [hl], "▶"
- ld c, $32
+ ld c, 50
call DelayFrames
ld [hl], $ec
ld a, $2 ; select the "ITEM" menu
@@ -2490,7 +2490,7 @@ PartyMenuOrRockOrRun:
SwitchPlayerMon: ; 3d1ba (f:51ba)
callab RetreatMon
- ld c, $32
+ ld c, 50
call DelayFrames
call AnimateRetreatingPlayerMon
ld a, [wWhichPokemon]
@@ -2815,7 +2815,7 @@ AnyMoveToSelect: ; 3d3f5 (f:53f5)
.asm_3d423
ld hl, NoMovesLeftText
call PrintText
- ld c, $3c
+ ld c, 60
call DelayFrames
xor a
ret
@@ -2930,8 +2930,8 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
ld c, a
ld b, $0 ; which item in the menu is the cursor pointing to? (0-3)
add hl, bc ; point to the item (move) in memory
- ld a, [hl]
- ld [wPlayerSelectedMove], a ; update wPlayerSelectedMove even if the move
+ ld a, [hl]
+ ld [wPlayerSelectedMove], a ; update wPlayerSelectedMove even if the move
; isn't actually selected (just pointed to by the cursor)
ld a, [wPlayerMonNumber]
ld [wWhichPokemon], a
@@ -2947,7 +2947,7 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
ld a, [hl]
and $3f
ld [wcd6d], a
-; print TYPE/<type> and <curPP>/<maxPP>
+; print TYPE/<type> and <curPP>/<maxPP>
hlCoord 1, 9
ld de, TypeText
call PlaceString
@@ -2963,7 +2963,7 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
ld de, wd11e
ld bc, $102
call PrintNumber
- call GetCurrentMove
+ call GetCurrentMove
hlCoord 2, 10
predef PrintMoveType
.moveDisabled
@@ -3174,13 +3174,13 @@ PlayerCanExecuteMove: ; 3d6b0 (f:56b0)
ld hl,ResidualEffects1
ld de,1
call IsInArray
- jp c,JumpMoveEffect ; ResidualEffects1 moves skip damage calculation and accuracy tests
- ; unless executed as part of their exclusive effect functions
+ jp c,JumpMoveEffect ; ResidualEffects1 moves skip damage calculation and accuracy tests
+ ; unless executed as part of their exclusive effect functions
ld a,[W_PLAYERMOVEEFFECT]
ld hl,SpecialEffectsCont
ld de,1
call IsInArray
- call c,JumpMoveEffect ; execute the effects of SpecialEffectsCont moves (e.g. Wrap, Thrash) but don't skip anything
+ call c,JumpMoveEffect ; execute the effects of SpecialEffectsCont moves (e.g. Wrap, Thrash) but don't skip anything
PlayerCalcMoveDamage: ; 3d6dc (f:56dc)
ld a,[W_PLAYERMOVEEFFECT]
ld hl,SetDamageEffects
@@ -3203,7 +3203,7 @@ handleIfPlayerMoveMissed
and a
jr z,getPlayerAnimationType
ld a,[W_PLAYERMOVEEFFECT]
- sub a,EXPLODE_EFFECT
+ sub a,EXPLODE_EFFECT
jr z,playPlayerMoveAnimation ; don't play any animation if the move missed, unless it was EXPLODE_EFFECT
jr playerCheckIfFlyOrChargeEffect
getPlayerAnimationType
@@ -3232,7 +3232,7 @@ playPlayerMoveAnimation
call nz,Bankswitch
jr MirrorMoveCheck
playerCheckIfFlyOrChargeEffect
- ld c,$1E
+ ld c,30
call DelayFrames
ld a,[W_PLAYERMOVEEFFECT]
cp a,FLY_EFFECT
@@ -3298,7 +3298,7 @@ MirrorMoveCheck
ld a,[wPlayerNumAttacksLeft]
dec a
ld [wPlayerNumAttacksLeft],a
- jp nz,getPlayerAnimationType ; for multi-hit moves, apply attack until PlayerNumAttacksLeft hits 0 or the enemy faints.
+ jp nz,getPlayerAnimationType ; for multi-hit moves, apply attack until PlayerNumAttacksLeft hits 0 or the enemy faints.
; damage calculation and accuracy tests only happen for the first hit
res AttackingMultipleTimes,[hl] ; clear attacking multiple times status when all attacks are over
ld hl,MultiHitText
@@ -3509,8 +3509,8 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
.MonHurtItselfOrFullyParalysed
ld hl,W_PLAYERBATTSTATUS1
ld a,[hl]
- ; clear bide, thrashing, charging up, and trapping moves such as warp (already cleared for confusion damage)
- and $ff ^ ((1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << ChargingUp) | (1 << UsingTrappingMove))
+ ; clear bide, thrashing, charging up, and trapping moves such as warp (already cleared for confusion damage)
+ and $ff ^ ((1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << ChargingUp) | (1 << UsingTrappingMove))
ld [hl],a
ld a,[W_PLAYERMOVEEFFECT]
cp a,FLY_EFFECT
@@ -3588,7 +3588,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
ld hl,wPlayerNumAttacksLeft
dec [hl] ; did Thrashing About counter hit 0?
ld hl,PlayerCalcMoveDamage ; skip DecrementPP
- jp nz,.returnToHL
+ jp nz,.returnToHL
push hl
ld hl,W_PLAYERBATTSTATUS1
res ThrashingAbout,[hl] ; no longer thrashing about
@@ -3609,7 +3609,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
ld a,[wPlayerNumAttacksLeft]
dec a ; did multi-turn move end?
ld [wPlayerNumAttacksLeft],a
- ld hl,getPlayerAnimationType ; if it didn't, skip damage calculation (deal damage equal to last hit),
+ ld hl,getPlayerAnimationType ; if it didn't, skip damage calculation (deal damage equal to last hit),
; DecrementPP and MoveHitTest
jp nz,.returnToHL
jp .returnToHL
@@ -3706,7 +3706,7 @@ PrintMoveIsDisabledText: ; 3da88 (f:5a88)
ld de, W_ENEMYBATTSTATUS1
.removeChargingUp
ld a, [de]
- res ChargingUp, a ; end the pokemon's
+ res ChargingUp, a ; end the pokemon's
ld [de], a
ld a, [hl]
ld [wd11e], a
@@ -3766,9 +3766,14 @@ PrintMonName1Text: ; 3daf5 (f:5af5)
ld hl, MonName1Text
jp PrintText
+; this function wastes time calling DetermineExclamationPointTextNum
+; and choosing between Used1Text and Used2Text, even though
+; those text strings are identical and both continue at PrintInsteadText
+; this likely had to do with Japanese grammar that got translated,
+; but the functionality didn't get removed
MonName1Text: ; 3dafb (f:5afb)
TX_FAR _MonName1Text
- db $08 ; asm
+ TX_ASM
ld a, [H_WHOSETURN]
and a
ld a, [W_PLAYERMOVENUM]
@@ -3779,7 +3784,7 @@ MonName1Text: ; 3dafb (f:5afb)
.asm_3db11
ld [hl], a
ld [wd11e], a
- call Func_3db85
+ call DetermineExclamationPointTextNum
ld a, [wMonIsDisobedient]
and a
ld hl, Used2Text
@@ -3793,33 +3798,35 @@ MonName1Text: ; 3dafb (f:5afb)
Used1Text: ; 3db2d (f:5b2d)
TX_FAR _Used1Text
- db $08 ; asm
+ TX_ASM
jr PrintInsteadText
Used2Text: ; 3db34 (f:5b34)
TX_FAR _Used2Text
- db $08 ; asm
+ TX_ASM
+ ; fall through
PrintInsteadText: ; 3db39 (f:5b39)
ld a, [wMonIsDisobedient]
and a
- jr z, PrintCF4BText
+ jr z, PrintMoveName
ld hl, InsteadText
ret
InsteadText: ; 3db43 (f:5b43)
TX_FAR _InsteadText
- db $08 ; asm
+ TX_ASM
+ ; fall through
-PrintCF4BText: ; 3db48 (f:5b48)
- ld hl, CF4BText
+PrintMoveName: ; 3db48 (f:5b48)
+ ld hl, _PrintMoveName
ret
-CF4BText: ; 3db4c (f:5b4c)
+_PrintMoveName: ; 3db4c (f:5b4c)
TX_FAR _CF4BText
- db $08 ; asm
+ TX_ASM
ld hl, ExclamationPointPointerTable
- ld a, [wd11e]
+ ld a, [wd11e] ; exclamation point num
add a
push bc
ld b, $0
@@ -3858,29 +3865,36 @@ ExclamationPoint5Text: ; 3db80 (f:5b80)
TX_FAR _ExclamationPoint5Text
db "@"
-Func_3db85: ; 3db85 (f:5b85)
+; this function does nothing useful
+; if the move being used is in set [1-4] from ExclamationPointMoveSets,
+; use ExclamationPoint[1-4]Text
+; otherwise, use ExclamationPoint5Text
+; but all five text strings are identical
+; this likely had to do with Japanese grammar that got translated,
+; but the functionality didn't get removed
+DetermineExclamationPointTextNum: ; 3db85 (f:5b85)
push bc
- ld a, [wd11e] ; move number
+ ld a, [wd11e] ; move ID
ld c, a
ld b, $0
- ld hl, UnknownMovesList_3dba3
-.asm_3db8f
+ ld hl, ExclamationPointMoveSets
+.loop
ld a, [hli]
cp $ff
- jr z, .asm_3db9d
+ jr z, .done
cp c
- jr z, .asm_3db9d
+ jr z, .done
and a
- jr nz, .asm_3db8f
+ jr nz, .loop
inc b
- jr .asm_3db8f
-.asm_3db9d
+ jr .loop
+.done
ld a, b
- ld [wd11e], a
+ ld [wd11e], a ; exclamation point num
pop bc
ret
-UnknownMovesList_3dba3: ; 3dba3 (f:5ba3)
+ExclamationPointMoveSets: ; 3dba3 (f:5ba3)
db SWORDS_DANCE, GROWTH
db $00
db RECOVER, BIDE, SELFDESTRUCT, AMNESIA
@@ -3923,7 +3937,7 @@ PrintMoveFailureText: ; 3dbe2 (f:5be2)
; if you get here, the mon used jump kick or hi jump kick and missed
ld hl, W_DAMAGE ; since the move missed, W_DAMAGE will always contain 0 at this point.
- ; Thus, recoil damage will always be equal to 1
+ ; Thus, recoil damage will always be equal to 1
; even if it was intended to be potential damage/8.
ld a, [hli]
ld b, [hl]
@@ -3990,7 +4004,7 @@ PrintCriticalOHKOText: ; 3dc5c (f:5c5c)
xor a
ld [wCriticalHitOrOHKO], a
.done
- ld c, $14
+ ld c, 20
jp DelayFrames
CriticalOHKOTextPointers: ; 3dc7a (f:5c7a)
@@ -4677,7 +4691,7 @@ CriticalHitTest: ; 3e023 (f:6023)
jr z, .calcCriticalHitProbability
ld hl, W_ENEMYMOVEPOWER
ld de, W_ENEMYBATTSTATUS2
-.calcCriticalHitProbability ; 0x3e04f
+.calcCriticalHitProbability
ld a, [hld] ; read base power from RAM
and a
ret z ; do nothing if zero
@@ -4776,7 +4790,7 @@ HandleCounterMove: ; 3e093 (f:6093)
ld a,[hli]
or [hl]
ret z ; If we made it here, Counter still misses if the last move used in battle did no damage to its target.
- ; W_DAMAGE is shared by both players, so Counter may strike back damage dealt by the Counter user itself
+ ; W_DAMAGE is shared by both players, so Counter may strike back damage dealt by the Counter user itself
; if the conditions meet, even though 99% of the times damage will come from the target.
; if it did damage, double it
ld a,[hl]
@@ -5037,9 +5051,9 @@ ApplyAttackToPlayerPokemonDone
AttackSubstitute: ; 3e25e (f:625e)
; Unlike the two ApplyAttackToPokemon functions, Attack Substitute is shared by player and enemy.
; Self-confusion damage as well as Hi-Jump Kick and Jump Kick recoil cause a momentary turn swap before being applied.
-; If the user has a Substitute up and would take damage because of that,
+; If the user has a Substitute up and would take damage because of that,
; damage will be applied to the other player's Substitute.
-; Normal recoil such as from Double-Edge isn't affected by this glitch,
+; Normal recoil such as from Double-Edge isn't affected by this glitch,
; because this function is never called in that case.
ld hl,SubstituteTookDamageText
@@ -5064,7 +5078,7 @@ AttackSubstitute: ; 3e25e (f:625e)
ld [de],a
ret nc
.substituteBroke
-; If the target's Substitute breaks, W_DAMAGE isn't updated with the amount of HP
+; If the target's Substitute breaks, W_DAMAGE isn't updated with the amount of HP
; the Substitute had before being attacked.
ld h,b
ld l,c
@@ -5565,7 +5579,7 @@ CalcHitChance: ; 3e624 (f:6624)
; the second iteration multiplies by the evasion ratio
.loop
push bc
- ld hl, StatModifierRatios ; $76cb ; stat modifier ratios
+ ld hl, StatModifierRatios ; stat modifier ratios
dec b
sla b
ld c,b
@@ -5771,7 +5785,7 @@ playEnemyMoveAnimation: ; 3e7a4 (f:67a4)
EnemyCheckIfFlyOrChargeEffect: ; 3e7d1 (f:67d1)
call SwapPlayerAndEnemyLevels
- ld c, $1e
+ ld c, 30
call DelayFrames
ld a, [W_ENEMYMOVEEFFECT]
cp FLY_EFFECT
@@ -6023,7 +6037,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
.monHurtItselfOrFullyParalysed
ld hl, W_ENEMYBATTSTATUS1
ld a, [hl]
- ; clear bide, thrashing about, charging up, and multi-turn moves such as warp
+ ; clear bide, thrashing about, charging up, and multi-turn moves such as warp
and $ff ^ ((1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << ChargingUp) | (1 << UsingTrappingMove))
ld [hl], a
ld a, [W_ENEMYMOVEEFFECT]
@@ -6119,7 +6133,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
call PrintText
ld hl, wEnemyNumAttacksLeft
dec [hl] ; did multi-turn move end?
- ld hl, GetEnemyAnimationType ; if it didn't, skip damage calculation (deal damage equal to last hit),
+ ld hl, GetEnemyAnimationType ; if it didn't, skip damage calculation (deal damage equal to last hit),
; DecrementPP and MoveHitTest
jp nz, .enemyReturnToHL
jp .enemyReturnToHL
@@ -6442,7 +6456,7 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92)
ld a, $31
ld [$ffe1], a
hlCoord 1, 5
- predef_jump Func_3f0c6
+ predef_jump CopyUncompressedPicToTilemap
; does nothing since no stats are ever selected (barring glitches)
DoubleOrHalveSelectedStats: ; 3ed02 (f:6d02)
@@ -6753,8 +6767,8 @@ BattleRandom:
push hl
push bc
push af
-
-; point to seed 0 so we pick the first number the next time
+
+; point to seed 0 so we pick the first number the next time
xor a
ld [wLinkBattleRandomNumberListIndex], a
@@ -6763,11 +6777,11 @@ BattleRandom:
.loop
ld a, [hl]
ld c, a
-; multiply by 5
+; multiply by 5
add a
add a
add c
-; add 1
+; add 1
inc a
ld [hli], a
dec b
@@ -6782,11 +6796,11 @@ BattleRandom:
HandleExplodingAnimation: ; 3eed3 (f:6ed3)
ld a, [H_WHOSETURN]
and a
- ld hl, wEnemyMonType1 ; wcfea
+ ld hl, wEnemyMonType1
ld de, W_ENEMYBATTSTATUS1
ld a, [W_PLAYERMOVENUM]
jr z, .asm_3eeea
- ld hl, wBattleMonType1 ; wd019
+ ld hl, wBattleMonType1
ld de, W_ENEMYBATTSTATUS1
ld a, [W_ENEMYMOVENUM]
.asm_3eeea
@@ -6818,14 +6832,15 @@ PlayMoveAnimation: ; 3ef07 (f:6f07)
InitBattle: ; 3ef12 (f:6f12)
ld a, [W_CUROPPONENT]
and a
- jr z, asm_3ef23
+ jr z, DetermineWildOpponent
InitOpponent: ; 3ef18 (f:6f18)
ld a, [W_CUROPPONENT]
ld [wcf91], a
ld [wEnemyMonSpecies2], a
- jr asm_3ef3d
-asm_3ef23: ; 3ef23 (f:6f23)
+ jr InitBattleCommon
+
+DetermineWildOpponent: ; 3ef23 (f:6f23)
ld a, [wd732]
bit 1, a
jr z, .asm_3ef2f
@@ -6838,7 +6853,7 @@ asm_3ef23: ; 3ef23 (f:6f23)
ret nz
callab TryDoWildEncounter
ret nz
-asm_3ef3d: ; 3ef3d (f:6f3d)
+InitBattleCommon: ; 3ef3d (f:6f3d)
ld a, [wMapPalOffset]
push af
ld hl, wd358
@@ -6860,7 +6875,7 @@ asm_3ef3d: ; 3ef3d (f:6f3d)
dec a
ld [wAICount], a
hlCoord 12, 0
- predef Func_3f0c6
+ predef CopyUncompressedPicToTilemap
ld a, $ff
ld [wEnemyMonPartyPos], a
ld a, $2
@@ -6914,7 +6929,7 @@ InitWildBattle: ; 3ef8b (f:6f8b)
ld [W_TRAINERCLASS], a
ld [$ffe1], a
hlCoord 12, 0
- predef Func_3f0c6
+ predef CopyUncompressedPicToTilemap
; common code that executes after init battle code specific to trainer or wild battles
InitBattle_Common: ; 3efeb (f:6feb)
@@ -6960,9 +6975,9 @@ InitBattle_Common: ; 3efeb (f:6feb)
_LoadTrainerPic: ; 3f04b (f:704b)
; wd033-wd034 contain pointer to pic
- ld a, [wTrainerPicPointer] ; wd033
+ ld a, [wTrainerPicPointer]
ld e, a
- ld a, [wTrainerPicPointer + 1] ; wd034
+ ld a, [wTrainerPicPointer + 1]
ld d, a ; de contains pointer to trainer pic
ld a, [wLinkState]
and a
@@ -6977,13 +6992,14 @@ _LoadTrainerPic: ; 3f04b (f:704b)
jp LoadUncompressedSpriteData
; unreferenced
-Func_3f069: ; 3f069 (f:7069)
+ResetCryModifiers: ; 3f069 (f:7069)
xor a
ld [wc0f1], a
ld [wc0f2], a
jp PlaySound
-Func_3f073: ; 3f073 (f:7073)
+; animtes the mon "growing" out of the pokeball
+AnimateSendingOutMon: ; 3f073 (f:7073)
ld a, [wPredefRegisters]
ld h, a
ld a, [wPredefRegisters + 1]
@@ -7002,16 +7018,16 @@ Func_3f073: ; 3f073 (f:7073)
ld a, $1
ld [wcd6c], a
ld bc, $303
- predef Func_79aba
- ld c, $4
+ predef CopyGrowingMonTiles
+ ld c, 4
call DelayFrames
ld bc, -41
add hl, bc
xor a
ld [wcd6c], a
ld bc, $505
- predef Func_79aba
- ld c, $5
+ predef CopyGrowingMonTiles
+ ld c, 5
call DelayFrames
ld bc, -41
jr .asm_3f0bf
@@ -7021,15 +7037,15 @@ Func_3f073: ; 3f073 (f:7073)
add hl, bc
ld a, [H_DOWNARROWBLINKCNT1]
add $31
- jr asm_3f0d0
+ jr CopyUncompressedPicToHL
-Func_3f0c6: ; 3f0c6 (f:70c6)
+CopyUncompressedPicToTilemap: ; 3f0c6 (f:70c6)
ld a, [wPredefRegisters]
ld h, a
ld a, [wPredefRegisters + 1]
ld l, a
ld a, [$ffe1]
-asm_3f0d0: ; 3f0d0 (f:70d0)
+CopyUncompressedPicToHL: ; 3f0d0 (f:70d0)
ld bc, $707
ld de, $14
push af
@@ -7052,7 +7068,7 @@ asm_3f0d0: ; 3f0d0 (f:70d0)
dec b
jr nz, .asm_3f0de
ret
-
+
.asm_3f0ed
push bc
ld b, $0
@@ -7342,7 +7358,7 @@ PoisonEffect: ; 3f24f (f:724f)
cp POISON_EFFECT
ret nz
.didntAffect
- ld c, $32
+ ld c, 50
call DelayFrames
jp PrintDidntAffectText
@@ -7604,17 +7620,17 @@ StatModifierUpEffect: ; 3f428 (f:7428)
add hl, bc
pop bc
xor a
- ld [H_MULTIPLICAND], a
+ ld [H_MULTIPLICAND], a
ld a, [de]
ld [H_MULTIPLICAND + 1], a
inc de
ld a, [de]
ld [H_MULTIPLICAND + 2], a
ld a, [hli]
- ld [H_MULTIPLIER], a
+ ld [H_MULTIPLIER], a
call Multiply
ld a, [hl]
- ld [H_DIVISOR], a
+ ld [H_DIVISOR], a
ld b, $4
call Divide
pop hl
@@ -7638,7 +7654,7 @@ UpdateStat: ; 3f4c3 (f:74c3)
UpdateStatDone: ; 3f4ca (f:74ca)
ld b, c
inc b
- call Func_3f688
+ call PrintStatText
ld hl, W_PLAYERBATTSTATUS2
ld de, W_PLAYERMOVENUM
ld bc, wccf7
@@ -7694,7 +7710,7 @@ PrintNothingHappenedText: ; 3f522 (f:7522)
MonsStatsRoseText: ; 3f528 (f:7528)
TX_FAR _MonsStatsRoseText
- db $08 ; asm
+ TX_ASM
ld hl, GreatlyRoseText
ld a, [H_WHOSETURN]
and a
@@ -7808,7 +7824,7 @@ StatModifierDownEffect: ; 3f54c (f:754c)
jr nz, .recalculateStat
ld a, [hl]
and a
- jp z, Func_3f64d
+ jp z, CantLowerAnymore_Pop
.recalculateStat
; recalculate affected stat
; paralysis and burn penalties, as well as badge boosts are ignored
@@ -7822,17 +7838,17 @@ StatModifierDownEffect: ; 3f54c (f:754c)
add hl, bc
pop bc
xor a
- ld [H_MULTIPLICAND], a
+ ld [H_MULTIPLICAND], a
ld a, [de]
ld [H_MULTIPLICAND + 1], a
inc de
ld a, [de]
ld [H_MULTIPLICAND + 2], a
ld a, [hli]
- ld [H_MULTIPLIER], a
+ ld [H_MULTIPLIER], a
call Multiply
ld a, [hl]
- ld [H_DIVISOR], a
+ ld [H_DIVISOR], a
ld b, $4
call Divide
pop hl
@@ -7856,7 +7872,7 @@ UpdateLoweredStatDone: ; 3f62c (f:762c)
ld b, c
inc b
push de
- call Func_3f688
+ call PrintStatText
pop de
ld a, [de]
cp $44
@@ -7876,7 +7892,7 @@ UpdateLoweredStatDone: ; 3f62c (f:762c)
call QuarterSpeedDueToParalysis
jp HalveAttackDueToBurn
-Func_3f64d: ; 3f64d (f:764d)
+CantLowerAnymore_Pop: ; 3f64d (f:764d)
pop de
pop hl
inc [hl]
@@ -7896,7 +7912,7 @@ MoveMissed: ; 3f65a (f:765a)
MonsStatsFellText: ; 3f661 (f:7661)
TX_FAR _MonsStatsFellText
- db $08 ; asm
+ TX_ASM
ld hl, FellText
ld a, [H_WHOSETURN]
and a
@@ -7919,7 +7935,7 @@ FellText: ; 3f683 (f:7683)
TX_FAR _FellText
db "@"
-Func_3f688: ; 3f688 (f:7688)
+PrintStatText: ; 3f688 (f:7688)
ld hl, StatsTextStrings
ld c, $50
.asm_3f68d
@@ -8028,7 +8044,7 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
srl b
cp b
jr nc, .asm_3f76e
- ld c, $32
+ ld c, 50
call DelayFrames
ld a, [W_PLAYERMOVENUM]
cp TELEPORT
@@ -8043,7 +8059,7 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
ld a, [W_PLAYERMOVENUM]
jr .asm_3f7e4
.asm_3f77e
- ld c, $32
+ ld c, 50
call DelayFrames
ld hl, IsUnaffectedText
ld a, [W_PLAYERMOVENUM]
@@ -8070,7 +8086,7 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
srl b
cp b
jr nc, .asm_3f7c1
- ld c, $32
+ ld c, 50
call DelayFrames
ld a, [W_ENEMYMOVENUM]
cp TELEPORT
@@ -8085,7 +8101,7 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
ld a, [W_ENEMYMOVENUM]
jr .asm_3f7e4
.asm_3f7d1
- ld c, $32
+ ld c, 50
call DelayFrames
ld hl, IsUnaffectedText
ld a, [W_ENEMYMOVENUM]
@@ -8095,7 +8111,7 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
.asm_3f7e4
push af
call PlayBattleAnimation
- ld c, $14
+ ld c, 20
call DelayFrames
pop af
ld hl, RanFromBattleText
@@ -8230,7 +8246,7 @@ ChargeEffect: ; 3f88c (f:788c)
ChargeMoveEffectText: ; 3f8c8 (f:78c8)
TX_FAR _ChargeMoveEffectText
- db $08 ; asm
+ TX_ASM
ld a, [wWhichTrade]
cp RAZOR_WIND
ld hl, MadeWhirlwindText
@@ -8287,8 +8303,8 @@ TrappingEffect: ; 3f917 (f:7917)
.trappingEffect
bit UsingTrappingMove, [hl]
ret nz
- call ClearHyperBeam ; since this effect is called before testing whether the move will hit,
- ; the target won't need to recharge even if the trapping move missed
+ call ClearHyperBeam ; since this effect is called before testing whether the move will hit,
+ ; the target won't need to recharge even if the trapping move missed
set UsingTrappingMove, [hl] ; mon is now using a trapping move
call BattleRandom ; 3/8 chance for 2 and 3 attacks, and 1/8 chance for 4 and 5 attacks
and $3
@@ -8346,7 +8362,7 @@ ConfusionSideEffectSuccess: ; 3f96f (f:796f)
set Confused, [hl] ; mon is now confused
push af
call BattleRandom
- and $3
+ and $3
inc a
inc a
ld [bc], a ; confusion status will last 2-5 turns
@@ -8363,7 +8379,7 @@ BecameConfusedText: ; 3f9a1 (f:79a1)
ConfusionEffectFailed: ; 3f9a6 (f:79a6)
cp CONFUSION_SIDE_EFFECT
ret z
- ld c, $32
+ ld c, 50
call DelayFrames
jp ConditionalPrintButItFailed
@@ -8410,7 +8426,7 @@ RageEffect: ; 3f9df (f:79df)
ret
MimicEffect: ; 3f9ed (f:79ed)
- ld c, $32
+ ld c, 50
call DelayFrames
call MoveHitTest
ld a, [W_MOVEMISSED]
@@ -8527,12 +8543,12 @@ DisableEffect: ; 3fa8a (f:7a8a)
ld a, [H_WHOSETURN]
and a
ld hl, wBattleMonPP
- jr nz, .enemyTurn
+ jr nz, .enemyTurn
ld a, [wLinkState]
cp LINK_STATE_BATTLING
pop hl ; wEnemyMonMoves
jr nz, .playerTurnNotLinkBattle
-; .playerTurnLinkBattle
+; .playerTurnLinkBattle
push hl
ld hl, wEnemyMonPP
.enemyTurn
@@ -8557,7 +8573,7 @@ DisableEffect: ; 3fa8a (f:7a8a)
and $7
inc a ; 1-8 turns disabled
inc c ; move 1-4 will be disabled
- swap c
+ swap c
add c ; map disabled move to high nibble of W_ENEMYDISABLEDMOVE / W_PLAYERDISABLEDMOVE
ld [de], a
call PlayCurrentMoveAnimation2
@@ -8568,7 +8584,7 @@ DisableEffect: ; 3fa8a (f:7a8a)
inc hl ; wEnemyDisabledMoveNumber
.printDisableText
ld a, [wd11e] ; move number
- ld [hl], a
+ ld [hl], a
call GetMoveName
ld hl, MoveWasDisabledText
jp PrintText
@@ -8659,12 +8675,12 @@ ParalyzedMayNotAttackText: ; 3fb74 (f:7b74)
CheckTargetSubstitute: ; 3fb79 (f:7b79)
push hl
ld hl, W_ENEMYBATTSTATUS2
- ld a, [H_WHOSETURN]
+ ld a, [H_WHOSETURN]
and a
jr z, .next1
ld hl, W_PLAYERBATTSTATUS2
.next1
- bit HasSubstituteUp, [hl]
+ bit HasSubstituteUp, [hl]
pop hl
ret
diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm
index ecf5040b..7345c5c1 100644
--- a/engine/battle/decrement_pp.asm
+++ b/engine/battle/decrement_pp.asm
@@ -9,15 +9,15 @@ DecrementPP: ; 68000 (1a:4000)
; W_PLAYERBATTSTATUS2 status flags later
and a, (1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << AttackingMultipleTimes)
ret nz ; if any of these statuses are true, don't decrement PP
- bit UsingRage, [hl]
+ bit UsingRage, [hl]
ret nz ; don't decrement PP either if Pokemon is using Rage
ld hl, wBattleMonPP ; PP of first move (in battle)
-
-; decrement PP in the battle struct
- call .DecrementPP
-
-; decrement PP in the party struct
- ld a, [W_PLAYERBATTSTATUS3]
+
+; decrement PP in the battle struct
+ call .DecrementPP
+
+; decrement PP in the party struct
+ ld a, [W_PLAYERBATTSTATUS3]
bit Transformed, a
ret nz ; Return if transformed. Pokemon Red stores the "current pokemon's" PP
; separately from the "Pokemon in your party's" PP. This is
@@ -31,7 +31,7 @@ DecrementPP: ; 68000 (1a:4000)
ld hl, wPartyMon1PP ; PP of first move (in party)
ld a, [wPlayerMonNumber] ; which mon in party is active
- ld bc, wPartyMon2 - wPartyMon1
+ ld bc, wPartyMon2 - wPartyMon1
call AddNTimes ; calculate address of the mon to modify
.DecrementPP
ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use?
diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm
index fce3701c..ba47d8f3 100644
--- a/engine/battle/draw_hud_pokeball_gfx.asm
+++ b/engine/battle/draw_hud_pokeball_gfx.asm
@@ -1,7 +1,7 @@
DrawAllPokeballs: ; 3a849 (e:6849)
call LoadPartyPokeballGfx
call SetupOwnPartyPokeballs
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
dec a
ret z ; return if wild pokémon
jp SetupEnemyPartyPokeballs
@@ -11,7 +11,7 @@ DrawEnemyPokeballs: ; 0x3a857
jp SetupEnemyPartyPokeballs
LoadPartyPokeballGfx: ; 3a85d (e:685d)
- ld de, PokeballTileGraphics ; $697e
+ ld de, PokeballTileGraphics
ld hl, vSprites + $310
ld bc, (BANK(PokeballTileGraphics) << 8) + $04
jp CopyVideoData
@@ -19,10 +19,10 @@ LoadPartyPokeballGfx: ; 3a85d (e:685d)
SetupOwnPartyPokeballs: ; 3a869 (e:6869)
call PlacePlayerHUDTiles
ld hl, wPartyMon1
- ld de, wPartyCount ; wPartyCount
+ ld de, wPartyCount
call SetupPokeballs
ld a, $60
- ld hl, W_BASECOORDX ; wd081
+ ld hl, W_BASECOORDX
ld [hli], a
ld [hl], a
ld a, $8
@@ -33,9 +33,9 @@ SetupOwnPartyPokeballs: ; 3a869 (e:6869)
SetupEnemyPartyPokeballs: ; 3a887 (e:6887)
call PlaceEnemyHUDTiles
ld hl, wEnemyMons
- ld de, wEnemyPartyCount ; wEnemyPartyCount
+ ld de, wEnemyPartyCount
call SetupPokeballs
- ld hl, W_BASECOORDX ; wd081
+ ld hl, W_BASECOORDX
ld a, $48
ld [hli], a
ld [hl], $20
@@ -98,31 +98,31 @@ WritePokeballOAMData: ; 3a8e1 (e:68e1)
ld de, wBuffer
ld c, PARTY_LENGTH
.loop
- ld a, [W_BASECOORDY] ; wd082
+ ld a, [W_BASECOORDY]
ld [hli], a
- ld a, [W_BASECOORDX] ; wd081
+ ld a, [W_BASECOORDX]
ld [hli], a
ld a, [de]
ld [hli], a
xor a
ld [hli], a
- ld a, [W_BASECOORDX] ; wd081
+ ld a, [W_BASECOORDX]
ld b, a
ld a, [wTrainerEngageDistance]
add b
- ld [W_BASECOORDX], a ; wd081
+ ld [W_BASECOORDX], a
inc de
dec c
jr nz, .loop
ret
PlacePlayerHUDTiles: ; 3a902 (e:6902)
- ld hl, PlayerBattleHUDGraphicsTiles ; $6916
+ ld hl, PlayerBattleHUDGraphicsTiles
ld de, wTrainerFacingDirection
ld bc, $3
call CopyData
hlCoord 18, 10
- ld de, rIE ; $ffff
+ ld de, rIE
jr PlaceHUDTiles
PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916)
@@ -132,7 +132,7 @@ PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916)
db $6F ; lower-left triangle tile of the HUD
PlaceEnemyHUDTiles: ; 3a919 (e:6919)
- ld hl, EnemyBattleHUDGraphicsTiles ; $692d
+ ld hl, EnemyBattleHUDGraphicsTiles
ld de, wTrainerFacingDirection
ld bc, $3
call CopyData
@@ -165,10 +165,10 @@ PlaceHUDTiles: ; 3a930 (e:6930)
SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
call LoadPartyPokeballGfx
- ld hl, wPartyMon1Species ; wPartyMon1Species (aliases: wPartyMon1)
- ld de, wPartyCount ; wPartyCount
+ ld hl, wPartyMons
+ ld de, wPartyCount
call SetupPokeballs
- ld hl, W_BASECOORDX ; wd081
+ ld hl, W_BASECOORDX
ld a, $50
ld [hli], a
ld [hl], $40
@@ -176,10 +176,10 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
ld [wTrainerEngageDistance], a
ld hl, wOAMBuffer
call WritePokeballOAMData
- ld hl, wEnemyMons ; wEnemyMon1Species
- ld de, wEnemyPartyCount ; wEnemyPartyCount
+ ld hl, wEnemyMons
+ ld de, wEnemyPartyCount
call SetupPokeballs
- ld hl, W_BASECOORDX ; wd081
+ ld hl, W_BASECOORDX
ld a, $50
ld [hli], a
ld [hl], $68
diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm
index f03dd07f..d1452770 100644..100755
--- a/engine/battle/end_of_battle.asm
+++ b/engine/battle/end_of_battle.asm
@@ -21,7 +21,7 @@ EndOfBattle: ; 137aa (4:77aa)
.placeWinOrLoseString
hlCoord 6, 8
call PlaceString
- ld c, $c8
+ ld c, 200
call DelayFrames
jr .evolution
.notLinkBattle
@@ -85,4 +85,4 @@ DrawText: ; 13864 (4:7864)
PickUpPayDayMoneyText: ; 1386b (4:786b)
TX_FAR _PickUpPayDayMoneyText
- db "@" \ No newline at end of file
+ db "@"
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm
index 9bd67654..4e4d0f3c 100644
--- a/engine/battle/experience.asm
+++ b/engine/battle/experience.asm
@@ -341,7 +341,7 @@ BoostExp: ; 5549f (15:549f)
GainedText: ; 554b2 (15:54b2)
TX_FAR _GainedText
- db $08 ; asm
+ TX_ASM
ld a, [wBoostExpByExpAll]
ld hl, WithExpAllText
and a
@@ -355,7 +355,7 @@ GainedText: ; 554b2 (15:54b2)
WithExpAllText: ; 554cb (15:54cb)
TX_FAR _WithExpAllText
- db $08 ; asm
+ TX_ASM
ld hl, ExpPointsText
ret
diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm
index 457cc4e1..edb1f13e 100644
--- a/engine/battle/init_battle_variables.asm
+++ b/engine/battle/init_battle_variables.asm
@@ -13,7 +13,7 @@ InitBattleVariables: ; 525af (14:65af)
ld [wCriticalHitOrOHKO], a
ld [wBattleMonSpecies], a
ld [wPartyGainExpFlags], a
- ld [wPlayerMonNumber], a
+ ld [wPlayerMonNumber], a
ld [wEscapedFromBattle], a
ld [wMapPalOffset], a
ld hl, wcf1d
@@ -27,7 +27,7 @@ InitBattleVariables: ; 525af (14:65af)
jr nz, .loop
inc a
ld [wccd9], a
- ld a, [W_CURMAP]
+ ld a, [W_CURMAP]
cp SAFARI_ZONE_EAST
jr c, .notSafariBattle
cp SAFARI_ZONE_REST_HOUSE_1
diff --git a/engine/battle/moveEffects/conversion_effect.asm b/engine/battle/moveEffects/conversion_effect.asm
index 2f05afb3..e4c5b4bd 100644
--- a/engine/battle/moveEffects/conversion_effect.asm
+++ b/engine/battle/moveEffects/conversion_effect.asm
@@ -13,7 +13,7 @@ ConversionEffect_: ; 139a3 (4:79a3)
.conversionEffect
bit Invulnerable, a ; is mon immune to typical attacks (dig/fly)
jr nz, PrintButItFailedText
-; copy target's types to user
+; copy target's types to user
ld a, [hli]
ld [de], a
inc de
diff --git a/engine/battle/moveEffects/drain_hp_effect.asm b/engine/battle/moveEffects/drain_hp_effect.asm
index 517d53d1..be52e76d 100644
--- a/engine/battle/moveEffects/drain_hp_effect.asm
+++ b/engine/battle/moveEffects/drain_hp_effect.asm
@@ -1,5 +1,5 @@
DrainHPEffect_: ; 783f (1:783f)
- ld hl, W_DAMAGE
+ ld hl, W_DAMAGE
ld a, [hl]
srl a ; divide damage by 2
ld [hli], a
@@ -17,8 +17,8 @@ DrainHPEffect_: ; 783f (1:783f)
ld a, [H_WHOSETURN]
and a
jp z, .addDamageToAttackerHP
- ld hl, wEnemyMonHP
- ld de, wEnemyMonMaxHP
+ ld hl, wEnemyMonHP
+ ld de, wEnemyMonMaxHP
.addDamageToAttackerHP
ld bc, wHPBarOldHP+1
; copy current HP to wHPBarOldHP
@@ -41,7 +41,7 @@ DrainHPEffect_: ; 783f (1:783f)
add b
ld [hld], a
ld [wHPBarNewHP], a
- ld a, [W_DAMAGE]
+ ld a, [W_DAMAGE]
ld b, [hl]
adc b
ld [hli], a
@@ -87,7 +87,7 @@ DrainHPEffect_: ; 783f (1:783f)
and a
ld a, [W_PLAYERMOVEEFFECT]
jr z, .next3
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [W_ENEMYMOVEEFFECT]
.next3
cp DREAM_EATER_EFFECT
jr nz, .printText
diff --git a/engine/battle/moveEffects/focus_energy_effect.asm b/engine/battle/moveEffects/focus_energy_effect.asm
index f01e61cc..20a0c07e 100644
--- a/engine/battle/moveEffects/focus_energy_effect.asm
+++ b/engine/battle/moveEffects/focus_energy_effect.asm
@@ -12,7 +12,7 @@ FocusEnergyEffect_: ; 27f86 (9:7f86)
ld hl, GettingPumpedText
jp PrintText
.alreadyUsing
- ld c, $32
+ ld c, 50
call DelayFrames
ld hl, PrintButItFailedText_
ld b, BANK(PrintButItFailedText_)
diff --git a/engine/battle/moveEffects/haze_effect.asm b/engine/battle/moveEffects/haze_effect.asm
index 14b5f5dd..5c5443c0 100644
--- a/engine/battle/moveEffects/haze_effect.asm
+++ b/engine/battle/moveEffects/haze_effect.asm
@@ -1,11 +1,11 @@
HazeEffect_: ; 139da (4:79da)
ld a, $7
-; store 7 on every stat mod
+; store 7 on every stat mod
ld hl, wPlayerMonAttackMod
call ResetStatMods
ld hl, wEnemyMonAttackMod
call ResetStatMods
-; copy unmodified stats to battle stats
+; copy unmodified stats to battle stats
ld hl, wPlayerMonUnmodifiedAttack
ld de, wBattleMonAttack
call ResetStats
@@ -25,7 +25,7 @@ HazeEffect_: ; 139da (4:79da)
ld [hl], $0
and SLP | (1 << FRZ)
jr z, .cureVolatileStatuses
-; prevent the Pokemon from executing a move if it was asleep or frozen
+; prevent the Pokemon from executing a move if it was asleep or frozen
ld a, $ff
ld [de], a
@@ -51,7 +51,7 @@ CureVolatileStatuses: ; 13a37 (4:7a37)
inc hl ; BATTSTATUS2
ld a, [hl]
; clear UsingXAccuracy, ProtectedByMist, GettingPumped, and Seeded statuses
- and $ff ^((1 << UsingXAccuracy) | (1 << ProtectedByMist) | (1 << GettingPumped) | (1 << Seeded))
+ and $ff ^((1 << UsingXAccuracy) | (1 << ProtectedByMist) | (1 << GettingPumped) | (1 << Seeded))
ld [hli], a ; BATTSTATUS3
ld a, [hl]
and %11110000 | (1 << Transformed) ; clear Bad Poison, Reflect and Light Screen statuses
@@ -61,7 +61,7 @@ CureVolatileStatuses: ; 13a37 (4:7a37)
ResetStatMods: ; 13a43 (4:7a43)
ld b, $8
.loop
- ld [hli], a
+ ld [hli], a
dec b
jr nz, .loop
ret
diff --git a/engine/battle/moveEffects/heal_effect.asm b/engine/battle/moveEffects/heal_effect.asm
index 862917f7..d9729747 100644
--- a/engine/battle/moveEffects/heal_effect.asm
+++ b/engine/battle/moveEffects/heal_effect.asm
@@ -76,7 +76,7 @@ HealEffect_: ; 3b9ec (e:79ec)
ld a, [de]
sbc [hl]
jr c, .playAnim
-; copy max HP to current HP if an overflow ocurred
+; copy max HP to current HP if an overflow ocurred
ld a, [hli]
ld [de], a
ld [wHPBarNewHP+1], a
diff --git a/engine/battle/moveEffects/leech_seed_effect.asm b/engine/battle/moveEffects/leech_seed_effect.asm
index e29fd7c2..1b0afe4b 100644
--- a/engine/battle/moveEffects/leech_seed_effect.asm
+++ b/engine/battle/moveEffects/leech_seed_effect.asm
@@ -1,20 +1,20 @@
LeechSeedEffect_: ; 2bea9 (a:7ea9)
callab MoveHitTest
- ld a, [W_MOVEMISSED]
+ ld a, [W_MOVEMISSED]
and a
jr nz, .moveMissed
- ld hl, W_ENEMYBATTSTATUS2
- ld de, wEnemyMonType1
- ld a, [H_WHOSETURN]
+ ld hl, W_ENEMYBATTSTATUS2
+ ld de, wEnemyMonType1
+ ld a, [H_WHOSETURN]
and a
jr z, .leechSeedEffect
- ld hl, W_PLAYERBATTSTATUS2
- ld de, wBattleMonType1
+ ld hl, W_PLAYERBATTSTATUS2
+ ld de, wBattleMonType1
.leechSeedEffect
; miss if the target is grass-type or already seeded
ld a, [de]
cp GRASS
- jr z, .moveMissed
+ jr z, .moveMissed
inc de
ld a, [de]
cp GRASS
@@ -23,12 +23,12 @@ LeechSeedEffect_: ; 2bea9 (a:7ea9)
jr nz, .moveMissed
set Seeded, [hl]
callab PlayCurrentMoveAnimation
- ld hl, WasSeededText ; $7ef2
+ ld hl, WasSeededText
jp PrintText
.moveMissed
- ld c, $32
+ ld c, 50
call DelayFrames
- ld hl, EvadedAttackText ; $7ef7
+ ld hl, EvadedAttackText
jp PrintText
WasSeededText: ; 2bef2 (a:7ef2)
diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm
index cc0eca7b..907db80c 100644
--- a/engine/battle/moveEffects/one_hit_ko_effect.asm
+++ b/engine/battle/moveEffects/one_hit_ko_effect.asm
@@ -1,5 +1,5 @@
OneHitKOEffect_: ; 33f57 (c:7f57)
- ld hl, W_DAMAGE
+ ld hl, W_DAMAGE
xor a
ld [hli], a
ld [hl], a ; set the damage output to zero
@@ -7,7 +7,7 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
ld [wCriticalHitOrOHKO], a
ld hl, wBattleMonSpeed + 1
ld de, wEnemyMonSpeed + 1
- ld a, [H_WHOSETURN]
+ ld a, [H_WHOSETURN]
and a
jr z, .compareSpeed
ld hl, wEnemyMonSpeed + 1
@@ -24,7 +24,7 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
ld a, [hl]
sbc b
jr c, .userIsSlower
- ld hl, W_DAMAGE
+ ld hl, W_DAMAGE
ld a, $ff
ld [hli], a
ld [hl], a
@@ -34,5 +34,5 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
.userIsSlower
; keep damage at 0 and set move missed flag if target's current speed is higher instead
ld a, $1
- ld [W_MOVEMISSED], a
+ ld [W_MOVEMISSED], a
ret
diff --git a/engine/battle/moveEffects/paralyze_effect.asm b/engine/battle/moveEffects/paralyze_effect.asm
index 69acbb01..b88e6479 100644
--- a/engine/battle/moveEffects/paralyze_effect.asm
+++ b/engine/battle/moveEffects/paralyze_effect.asm
@@ -4,7 +4,7 @@ ParalyzeEffect_: ; 52601 (14:6601)
ld a, [H_WHOSETURN]
and a
jp z, .next
- ld hl, wBattleMonStatus
+ ld hl, wBattleMonStatus
ld de, W_ENEMYMOVETYPE
.next
ld a, [hl]
@@ -28,7 +28,7 @@ ParalyzeEffect_: ; 52601 (14:6601)
push hl
callab MoveHitTest
pop hl
- ld a, [W_MOVEMISSED]
+ ld a, [W_MOVEMISSED]
and a
jr nz, .didntAffect
set PAR, [hl]
diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm
index fc937d1b..26e69ef5 100644
--- a/engine/battle/moveEffects/pay_day_effect.asm
+++ b/engine/battle/moveEffects/pay_day_effect.asm
@@ -9,19 +9,19 @@ PayDayEffect_ ; 2feb8 (b:7eb8)
ld a, [wEnemyMonLevel]
.payDayEffect
; level * 2
- add a
+ add a
ld [H_DIVIDEND + 3], a
xor a
ld [H_DIVIDEND], a
ld [H_DIVIDEND + 1], a
ld [H_DIVIDEND + 2], a
-; convert to BCD
+; convert to BCD
ld a, 100
ld [H_DIVISOR], a
ld b, $4
call Divide
ld a, [H_QUOTIENT + 3]
- ld [hli], a
+ ld [hli], a
ld a, [H_REMAINDER]
ld [H_DIVIDEND + 3], a
ld a, 10
diff --git a/engine/battle/moveEffects/recoil_effect.asm b/engine/battle/moveEffects/recoil_effect.asm
index fe516c03..95b54922 100644
--- a/engine/battle/moveEffects/recoil_effect.asm
+++ b/engine/battle/moveEffects/recoil_effect.asm
@@ -46,7 +46,7 @@ RecoilEffect_: ; 1392c (4:792c)
ld [wHPBarNewHP+1], a
jr nc, .getHPBarCoords
; if recoil damage is higher than the Pokemon's HP, set its HP to 0
- xor a
+ xor a
ld [hli], a
ld [hl], a
ld hl, wHPBarNewHP
diff --git a/engine/battle/moveEffects/reflect_light_screen_effect.asm b/engine/battle/moveEffects/reflect_light_screen_effect.asm
index 7da98699..df34827f 100644
--- a/engine/battle/moveEffects/reflect_light_screen_effect.asm
+++ b/engine/battle/moveEffects/reflect_light_screen_effect.asm
@@ -27,7 +27,7 @@ ReflectLightScreenEffect_: ; 3bb97 (e:7b97)
pop hl
jp PrintText
.moveFailed
- ld c, $32
+ ld c, 50
call DelayFrames
ld hl, PrintButItFailedText_
jp BankswitchEtoF
diff --git a/engine/battle/moveEffects/substitute_effect.asm b/engine/battle/moveEffects/substitute_effect.asm
index 8412e281..444c755b 100644
--- a/engine/battle/moveEffects/substitute_effect.asm
+++ b/engine/battle/moveEffects/substitute_effect.asm
@@ -11,15 +11,15 @@ SubstituteEffect_: ; 17dad (5:7dad)
ld de, wEnemySubstituteHP
ld bc, W_ENEMYBATTSTATUS2
.notEnemy
- ld a, [bc]
+ ld a, [bc]
bit HasSubstituteUp, a ; user already has substitute?
- jr nz, .alreadyHasSubstitute
+ jr nz, .alreadyHasSubstitute
; quarter health to remove from user
-; assumes max HP is 1023 or lower
+; assumes max HP is 1023 or lower
push bc
ld a, [hli]
ld b, [hl]
- srl a
+ srl a
rr b
srl a
rr b ; max hp / 4
@@ -27,29 +27,29 @@ SubstituteEffect_: ; 17dad (5:7dad)
ld de, wBattleMonHP - wBattleMonMaxHP
add hl, de ; point hl to current HP low byte
pop de
- ld a, b
+ ld a, b
ld [de], a ; save copy of HP to subtract in ccd7/ccd8 [how much HP substitute has]
ld a, [hld]
-; subtract [max hp / 4] to current HP
- sub b
+; subtract [max hp / 4] to current HP
+ sub b
ld d, a
ld a, [hl]
- sbc 0
+ sbc 0
pop bc
jr c, .notEnoughHP ; underflow means user would be left with negative health
; bug: since it only brances on carry, it will possibly leave user with 0 HP
.userHasZeroOrMoreHP
ldi [hl], a ; save resulting HP after substraction into current HP
- ld [hl], d
+ ld [hl], d
ld h, b
ld l, c
- set HasSubstituteUp, [hl]
- ld a, [W_OPTIONS]
+ set HasSubstituteUp, [hl]
+ ld a, [W_OPTIONS]
bit 7, a ; battle animation is enabled?
- ld hl, PlayCurrentMoveAnimation
+ ld hl, PlayCurrentMoveAnimation
ld b, BANK(PlayCurrentMoveAnimation)
jr z, .animationEnabled
- ld hl, AnimationSubstitute
+ ld hl, AnimationSubstitute
ld b, BANK(AnimationSubstitute)
.animationEnabled
call Bankswitch ; jump to routine depending on animation setting
diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm
index 6504bf03..1b992df6 100644
--- a/engine/battle/moveEffects/transform_effect.asm
+++ b/engine/battle/moveEffects/transform_effect.asm
@@ -24,7 +24,7 @@ TransformEffect_: ; 3bab1 (e:7ab1)
ld hl, W_ENEMYBATTSTATUS2
.transformEffect
; animation(s) played are different if target has Substitute up
- bit HasSubstituteUp, [hl]
+ bit HasSubstituteUp, [hl]
push af
ld hl, Func_79747
ld b, BANK(Func_79747)
@@ -49,13 +49,13 @@ TransformEffect_: ; 3bab1 (e:7ab1)
pop de
pop hl
push hl
-; transform user into opposing Pokemon
+; transform user into opposing Pokemon
; species
- ld a, [hl]
+ ld a, [hl]
ld [de], a
-; type 1, type 2, catch rate, and moves
+; type 1, type 2, catch rate, and moves
ld bc, $5
- add hl, bc
+ add hl, bc
inc de
inc de
inc de
@@ -82,7 +82,7 @@ TransformEffect_: ; 3bab1 (e:7ab1)
ld a, [hli]
ld [de], a
inc de
-; Attack, Defense, Speed, and Special stats
+; Attack, Defense, Speed, and Special stats
inc hl
inc hl
inc hl
@@ -91,7 +91,7 @@ TransformEffect_: ; 3bab1 (e:7ab1)
inc de
ld bc, $8
call CopyData
- ld bc, wBattleMonMoves - wBattleMonPP
+ ld bc, wBattleMonMoves - wBattleMonPP
add hl, bc ; ld hl, wBattleMonMoves
ld b, NUM_MOVES
.copyPPLoop
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index 3cdfb5cb..e373ef93 100644..100755
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -143,7 +143,7 @@ ReadTrainer: ; 39c53 (e:5c53)
ld [wEnemyMon6Moves + 2],a
.FinishUp
; clear wAmountMoneyWon addresses
- xor a
+ xor a
ld de,wAmountMoneyWon
ld [de],a
inc de
@@ -163,4 +163,4 @@ ReadTrainer: ; 39c53 (e:5c53)
inc de
dec b
jr nz,.LastLoop ; repeat W_CURENEMYLVL times
- ret \ No newline at end of file
+ ret
diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm
index dae4ad42..ed227984 100644
--- a/engine/battle/scale_sprites.asm
+++ b/engine/battle/scale_sprites.asm
@@ -41,16 +41,16 @@ ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55)
ScaleLastSpriteColumnByTwo: ; 2fe7d (b:7e7d)
ld a, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows
- ld [H_SPRITEINTERLACECOUNTER], a ; $ff8b
- ld bc, -1 ; $ffff
+ ld [H_SPRITEINTERLACECOUNTER], a
+ ld bc, -1
.columnInnerLoop
ld a, [de]
dec de
swap a ; only high nybble contains information
call ScalePixelsByTwo
- ld a, [H_SPRITEINTERLACECOUNTER] ; $ff8b
+ ld a, [H_SPRITEINTERLACECOUNTER]
dec a
- ld [H_SPRITEINTERLACECOUNTER], a ; $ff8b
+ ld [H_SPRITEINTERLACECOUNTER], a
jr nz, .columnInnerLoop
dec de ; skip last 4 rows of new column
dec de
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index 191cfd5e..59611ef1 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -40,7 +40,7 @@ AIEnemyTrainerChooseMoves: ; 39719 (e:5719)
and a
jr z, .loopFindMinimumEntries
push hl
- ld hl, AIMoveChoiceModificationFunctionPointers ; $57a3
+ ld hl, AIMoveChoiceModificationFunctionPointers
dec a
add a
ld c, a
@@ -81,7 +81,7 @@ AIEnemyTrainerChooseMoves: ; 39719 (e:5719)
.filterMinimalEntries ; all minimal entries now have value 1. All other slots will be disabled (move set to 0)
ld a, [de]
and a
- jr nz, .moveExisting ; 0x3978a $1
+ jr nz, .moveExisting
ld [hl], a
.moveExisting
ld a, [hl]
@@ -145,7 +145,7 @@ AIMoveChoiceModification1: ; 397ab (e:57ab)
ld [hl], a
jr .nextMove
-StatusAilmentMoveEffects ; 57e2
+StatusAilmentMoveEffects: ; 57e2
db $01 ; unused sleep effect
db SLEEP_EFFECT
db POISON_EFFECT
@@ -157,7 +157,7 @@ StatusAilmentMoveEffects ; 57e2
; that fall in-bewteen
AIMoveChoiceModification2: ; 397e7 (e:57e7)
ld a, [wAILayer2Encouragement]
- cp $1
+ cp $1
ret nz
ld hl, wBuffer - 1 ; temp move selection array (-1 byte offset)
ld de, wEnemyMonMoves ; enemy moves
@@ -325,8 +325,8 @@ TrainerClassMoveChoiceModifications: ; 3989b (e:589b)
db 1,3,0 ; LANCE
INCLUDE "engine/battle/trainer_pic_money_pointers.asm"
-
-INCLUDE "text/trainer_names.asm"
+
+INCLUDE "text/trainer_names.asm"
INCLUDE "engine/battle/bank_e_misc.asm"
@@ -337,7 +337,6 @@ INCLUDE "data/trainer_moves.asm"
INCLUDE "data/trainer_parties.asm"
TrainerAI: ; 3a52e (e:652e)
-;XXX called at 34964, 3c342, 3c398
and a
ld a,[W_ISINBATTLE]
dec a
@@ -553,7 +552,7 @@ DecrementAICount: ; 3a695 (e:6695)
scf
ret
-Func_3a69b: ; 3a69b (e:669b)
+AIPlayRestoringSFX: ; 3a69b (e:669b)
ld a,(SFX_08_3e - SFX_Headers_08) / 3
jp PlaySoundWaitForCurrent
@@ -712,7 +711,7 @@ AIBattleWithdrawText: ; 3a781 (e:6781)
db "@"
AIUseFullHeal: ; 3a786 (e:6786)
- call Func_3a69b
+ call AIPlayRestoringSFX
call AICureStatus
ld a,FULL_HEAL
jp AIPrintItemUse
@@ -731,21 +730,21 @@ AICureStatus: ; 3a791 (e:6791)
ret
AIUseXAccuracy: ; 0x3a7a8 unused
- call Func_3a69b
+ call AIPlayRestoringSFX
ld hl,W_ENEMYBATTSTATUS2
set 0,[hl]
ld a,X_ACCURACY
jp AIPrintItemUse
AIUseGuardSpec: ; 3a7b5 (e:67b5)
- call Func_3a69b
+ call AIPlayRestoringSFX
ld hl,W_ENEMYBATTSTATUS2
set 1,[hl]
ld a,GUARD_SPEC_
jp AIPrintItemUse
AIUseDireHit: ; 0x3a7c2 unused
- call Func_3a69b
+ call AIPlayRestoringSFX
ld hl,W_ENEMYBATTSTATUS2
set 2,[hl]
ld a,DIRE_HIT
@@ -808,7 +807,7 @@ AIIncreaseStat: ; 3a808 (e:6808)
ld a,[hl]
push af
push hl
- ld a,$AF
+ ld a,ANIM_AF
ld [hli],a
ld [hl],b
callab StatModifierUpEffect
diff --git a/engine/battle/trainer_pic_money_pointers.asm b/engine/battle/trainer_pic_money_pointers.asm
index 3d32eb00..3f684db3 100644..100755
--- a/engine/battle/trainer_pic_money_pointers.asm
+++ b/engine/battle/trainer_pic_money_pointers.asm
@@ -140,4 +140,4 @@ TrainerPicAndMoneyPointers: ; 39914 (e:5914)
money 9900
dw LancePic
- money 9900 \ No newline at end of file
+ money 9900
diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm
index 03119b90..87512583 100644
--- a/engine/battle/wild_encounters.asm
+++ b/engine/battle/wild_encounters.asm
@@ -23,7 +23,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
jr z, .lastRepelStep
ld [wRepelRemainingSteps], a
.asm_1389e
-; determine if wild pokmon can appear in the half-block were standing in
+; determine if wild pokemon can appear in the half-block we're standing in
; is the bottom right tile (9,9) of the half-block we're standing in a grass/water tile?
hlCoord 9, 9
ld c, [hl]
@@ -35,9 +35,9 @@ TryDoWildEncounter: ; 13870 (4:7870)
cp c
ld a, [W_WATERRATE]
jr z, .CanEncounter
-; even if not in grass/water, standing anywhere we can encounter pokmon
-; so long as the map is indoor and has wild pokmon defined.
-; as long as its not Viridian Forest or Safari Zone.
+; even if not in grass/water, standing anywhere we can encounter pokemon
+; so long as the map is "indoor" and has wild pokemon defined.
+; ...as long as it's not Viridian Forest or Safari Zone.
ld a, [W_CURMAP]
cp REDS_HOUSE_1F ; is this an indoor map?
jr c, .CantEncounter2
@@ -61,15 +61,15 @@ TryDoWildEncounter: ; 13870 (4:7870)
inc hl
jr .determineEncounterSlot
.gotEncounterSlot
-; determine which wild pokmon (grass or water) can appear in the half-block were standing in
+; determine which wild pokemon (grass or water) can appear in the half-block we're standing in
ld c, [hl]
ld hl, W_GRASSMONS
- aCoord 8, 9
- cp $14 ; is the bottom left tile (8,9) of the half-block we're standing in a water tile?
+ aCoord 8, 9
+ cp $14 ; is the bottom left tile (8,9) of the half-block we're standing in a water tile?
jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default
ld hl, W_WATERMONS
; since the bottom right tile of a "left shore" half-block is $14 but the bottom left tile is not,
-; "left shore" half-blocks (such as the one in the east coast of Cinnabar) load grass encounters.
+; "left shore" half-blocks (such as the one in the east coast of Cinnabar) load grass encounters.
.gotWildEncounterType
ld b, $0
add hl, bc
diff --git a/engine/cable_club.asm b/engine/cable_club.asm
index 2cfb1734..3cbc0867 100755
--- a/engine/cable_club.asm
+++ b/engine/cable_club.asm
@@ -2,7 +2,7 @@
; In the Colosseum, it starts a battle. In the Trade Centre, it displays the trade selection screen.
; Before doing either action, it swaps random numbers, trainer names and party data with the other gameboy.
CableClub_DoBattleOrTrade: ; 5317 (1:5317)
- ld c, $50
+ ld c, 80
call DelayFrames
call ClearScreen
call UpdateSprites
@@ -359,7 +359,7 @@ TradeCenter_SelectMon:
.displayEnemyMonStats
ld a, $1
ld [wd11b], a
- callab Func_39bd5
+ callab InitList
ld hl, wEnemyMons
call TradeCenter_DisplayStats
jp .getNewInput
@@ -418,7 +418,7 @@ TradeCenter_SelectMon:
; unreachable code
ld a, $4
ld [wd11b], a
- callab Func_39bd5
+ callab InitList
call TradeCenter_DisplayStats
jp .getNewInput
.playerMonMenu_ANotPressed
@@ -513,7 +513,7 @@ TradeCenter_SelectMon:
ld [wCurrentMenuItem], a
ld a, $4
ld [wd11b], a
- callab Func_39bd5
+ callab InitList
call TradeCenter_DisplayStats
call LoadScreenTilesFromBuffer1
jp .playerMonMenu
diff --git a/engine/evolution.asm b/engine/evolution.asm
index 7ae88fdf..76537530 100755
--- a/engine/evolution.asm
+++ b/engine/evolution.asm
@@ -1,4 +1,4 @@
-Func_7bde9: ; 7bde9 (1e:7de9)
+EvolveMon: ; 7bde9 (1e:7de9)
push hl
push de
push bc
@@ -13,17 +13,17 @@ Func_7bde9: ; 7bde9 (1e:7de9)
ld [wc0ee], a
call PlaySound
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ld a, (SFX_08_3c - SFX_Headers_08) / 3
call PlaySound
call Delay3
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ld [hTilesetType], a
ld a, [wHPBarMaxHP]
ld [wcf1d], a
ld c, $0
- call Func_7beb4
+ call EvolutionSetWholeScreenPalette
ld a, [wHPBarMaxHP + 1]
ld [wcf91], a
ld [wd0b5], a
@@ -37,23 +37,23 @@ Func_7bde9: ; 7bde9 (1e:7de9)
ld [wd0b5], a
call Func_7beb9
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ld a, [wHPBarMaxHP]
call PlayCry
call WaitForSoundToFinish
ld c, BANK(Music_SafariZone)
ld a, MUSIC_SAFARI_ZONE
call PlayMusic
- ld c, $50
+ ld c, 80
call DelayFrames
ld c, $1
- call Func_7beb4
+ call EvolutionSetWholeScreenPalette
ld bc, $110
.asm_7be63
push bc
- call asm_7befa
+ call Func_7befa
jr c, .asm_7bea9
- call asm_7bec2
+ call Func_7bec2
pop bc
inc b
dec c
@@ -73,7 +73,7 @@ Func_7bde9: ; 7bde9 (1e:7de9)
ld a, [wcf1d]
call PlayCry
ld c, $0
- call Func_7beb4
+ call EvolutionSetWholeScreenPalette
pop af
ld [wd0b5], a
pop af
@@ -93,7 +93,7 @@ Func_7bde9: ; 7bde9 (1e:7de9)
ld a, [wHPBarMaxHP]
jr .asm_7be81
-Func_7beb4: ; 7beb4 (1e:7eb4)
+EvolutionSetWholeScreenPalette: ; 7beb4 (1e:7eb4)
ld b, $b
jp GoPAL_SET
@@ -101,7 +101,8 @@ Func_7beb9: ; 7beb9 (1e:7eb9)
call GetMonHeader
hlCoord 7, 2
jp LoadFlippedFrontSpriteByMonIndex
-asm_7bec2: ; 7bec2 (1e:7ec2)
+
+Func_7bec2: ; 7bec2 (1e:7ec2)
ld a, $31
ld [wHPBarOldHP], a
call Func_7bed6
@@ -109,13 +110,13 @@ asm_7bec2: ; 7bec2 (1e:7ec2)
ld [wHPBarOldHP], a
call Func_7bed6
dec b
- jr nz, asm_7bec2
+ jr nz, Func_7bec2
ret
Func_7bed6: ; 7bed6 (1e:7ed6)
push bc
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 7, 2
ld bc, $707
ld de, $d
@@ -132,11 +133,12 @@ Func_7bed6: ; 7bed6 (1e:7ed6)
dec b
jr nz, .asm_7bee3
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
pop bc
ret
-asm_7befa: ; 7befa (1e:7efa)
+
+Func_7befa: ; 7befa (1e:7efa)
call DelayFrame
push bc
call JoypadLowSensitivity
@@ -146,7 +148,7 @@ asm_7befa: ; 7befa (1e:7efa)
jr nz, .asm_7bf0d
.asm_7bf08
dec c
- jr nz, asm_7befa
+ jr nz, Func_7befa
and a
ret
.asm_7bf0d
diff --git a/engine/evolve_trade.asm b/engine/evolve_trade.asm
index ec230677..c7297527 100755
--- a/engine/evolve_trade.asm
+++ b/engine/evolve_trade.asm
@@ -31,9 +31,9 @@ EvolveTradeMon: ; 17d7d (5:7d7d)
ret nz
.ok
- ld a, [wPartyCount] ; wPartyCount
+ ld a, [wPartyCount]
dec a
- ld [wWhichPokemon], a ; wWhichPokemon
+ ld [wWhichPokemon], a
ld a, $1
ld [wccd4], a
ld a, LINK_STATE_TRADING
diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm
index 23bffa8d..bddaffe5 100755
--- a/engine/evos_moves.asm
+++ b/engine/evos_moves.asm
@@ -117,7 +117,7 @@ Evolution_PartyMonLoop: ; loop over party mons
call CopyStringToCF4B
ld hl, IsEvolvingText
call PrintText
- ld c, $32
+ ld c, 50
call DelayFrames
xor a
ld [H_AUTOBGTRANSFERENABLED], a
@@ -129,7 +129,7 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, $ff
ld [wUpdateSpritesEnabled], a
call ClearSprites
- callab Func_7bde9
+ callab EvolveMon
jp c, CancelledEvolution
ld hl, EvolvedText
call PrintText
@@ -149,7 +149,7 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, (SFX_02_3b - SFX_Headers_02) / 3
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
- ld c, $28
+ ld c, 40
call DelayFrames
call ClearScreen
call RenameEvolvedMon
@@ -407,13 +407,13 @@ WriteMonMoves: ; 3afb8 (e:6fb8)
and a
jp z, .done ; end of list
ld b, a
- ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL
+ ld a, [W_CURENEMYLVL]
cp b
jp c, .done ; mon level < move level (assumption: learnset is sorted by level)
ld a, [wHPBarMaxHP]
and a
jr z, .skipMinLevelCheck
- ld a, [wWhichTrade] ; wWhichTrade (min move level)
+ ld a, [wWhichTrade] ; min move level)
cp b
jr nc, .nextMove2 ; min level >= move level
.skipMinLevelCheck
diff --git a/engine/experience.asm b/engine/experience.asm
index 68d22843..752536cf 100755
--- a/engine/experience.asm
+++ b/engine/experience.asm
@@ -38,19 +38,19 @@ CalcExperience: ; 58f6a (16:4f6a)
add hl, bc
call CalcDSquared
ld a, d
- ld [H_MULTIPLIER], a ; $ff99
+ ld [H_MULTIPLIER], a
call Multiply
ld a, [hl]
and $f0
swap a
- ld [H_MULTIPLIER], a ; $ff99
+ ld [H_MULTIPLIER], a
call Multiply
ld a, [hli]
and $f
- ld [H_DIVISOR], a ; $ff99
+ ld [H_DIVISOR], a
ld b, $4
call Divide
- ld a, [H_MULTIPLICAND] ; $ff96 (aliases: H_NUMTOPRINT)
+ ld a, [H_MULTIPLICAND] ; (aliases: H_NUMTOPRINT)
push af
ld a, [H_MULTIPLICAND+1]
push af
@@ -59,9 +59,9 @@ CalcExperience: ; 58f6a (16:4f6a)
call CalcDSquared
ld a, [hl]
and $7f
- ld [H_MULTIPLIER], a ; $ff99
+ ld [H_MULTIPLIER], a
call Multiply
- ld a, [H_MULTIPLICAND] ; $ff96 (aliases: H_NUMTOPRINT)
+ ld a, [H_MULTIPLICAND] ; (aliases: H_NUMTOPRINT)
push af
ld a, [H_MULTIPLICAND+1]
push af
@@ -70,7 +70,7 @@ CalcExperience: ; 58f6a (16:4f6a)
ld a, [hli]
push af
xor a
- ld [H_MULTIPLICAND], a ; $ff96
+ ld [H_MULTIPLICAND], a
ld [H_MULTIPLICAND+1], a
ld a, d
ld [H_MULTIPLICAND+2], a
@@ -85,9 +85,9 @@ CalcExperience: ; 58f6a (16:4f6a)
ld a, [H_MULTIPLICAND+1]
sbc b
ld [H_MULTIPLICAND+1], a
- ld a, [H_MULTIPLICAND] ; $ff96
+ ld a, [H_MULTIPLICAND]
sbc b
- ld [H_MULTIPLICAND], a ; $ff96
+ ld [H_MULTIPLICAND], a
pop af
and $80
jr nz, .subtractSquaredTerm ; check sign
@@ -135,11 +135,11 @@ CalcExperience: ; 58f6a (16:4f6a)
; calculates d*d
CalcDSquared: ; 59010 (16:5010)
xor a
- ld [H_MULTIPLICAND], a ; $ff96 (aliases: H_NUMTOPRINT)
+ ld [H_MULTIPLICAND], a ; (aliases: H_NUMTOPRINT)
ld [H_MULTIPLICAND+1], a
ld a, d
ld [H_MULTIPLICAND+2], a
- ld [H_MULTIPLIER], a ; $ff99 (aliases: H_DIVISOR, H_REMAINDER, H_POWEROFTEN)
+ ld [H_MULTIPLIER], a ; (aliases: H_DIVISOR, H_REMAINDER, H_POWEROFTEN)
jp Multiply
; each entry has the following scheme:
diff --git a/engine/game_corner_slots.asm b/engine/game_corner_slots.asm
index 52f61daf..01d42d21 100755
--- a/engine/game_corner_slots.asm
+++ b/engine/game_corner_slots.asm
@@ -27,13 +27,13 @@ StartSlotMachine: ; 37e2d (d:7e2d)
call PromptUserToPlaySlots
ret
.printOutOfOrder
- ld a, $28
+ tx_pre_id GameCornerOutOfOrderText
jr .printText
.printOutToLunch
- ld a, $29
+ tx_pre_id GameCornerOutToLunchText
jr .printText
.printSomeonesKeys
- ld a, $2a
+ tx_pre_id GameCornerSomeonesKeysText
.printText
push af
call EnableAutoTextBoxDrawing
diff --git a/engine/game_corner_slots2.asm b/engine/game_corner_slots2.asm
index 66e51237..850b1f99 100755
--- a/engine/game_corner_slots2.asm
+++ b/engine/game_corner_slots2.asm
@@ -6,13 +6,13 @@ AbleToPlaySlotsCheck ; 2ff09 (b:7f09)
predef IsItemInBag_ ; IsItemInBag_
ld a, b
and a
- ld b, $33 ; GameCornerCoinCaseText
+ ld b, (GameCornerCoinCaseText_id - TextPredefs) / 2 + 1
jr z, .printCoinCaseRequired
ld hl, wPlayerCoins
ld a, [hli]
or [hl]
jr nz, .done ; able to play
- ld b, $32 ; GameCornerNoCoinsText
+ ld b, (GameCornerNoCoinsText_id - TextPredefs) / 2 + 1
.printCoinCaseRequired
call EnableAutoTextBoxDrawing
ld a, b
diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm
index d0f1bbac..32dda60e 100755
--- a/engine/gamefreak.asm
+++ b/engine/gamefreak.asm
@@ -1,25 +1,25 @@
LoadShootingStarGraphics: ; 70000 (1c:4000)
ld a, $f9
- ld [rOBP0], a ; $ff48
+ ld [rOBP0], a
ld a, $a4
- ld [rOBP1], a ; $ff49
- ld de, AnimationTileset2 + $30 ; $471e ; star tile (top left quadrant)
+ ld [rOBP1], a
+ ld de, AnimationTileset2 + $30 ; star tile (top left quadrant)
ld hl, vChars1 + $200
ld bc, (BANK(AnimationTileset2) << 8) + $01
call CopyVideoData
- ld de, AnimationTileset2 + $130 ; $481e ; star tile (bottom left quadrant)
+ ld de, AnimationTileset2 + $130 ; star tile (bottom left quadrant)
ld hl, vChars1 + $210
ld bc, (BANK(AnimationTileset2) << 8) + $01
call CopyVideoData
- ld de, FallingStar ; $4190
+ ld de, FallingStar
ld hl, vChars1 + $220
ld bc, (BANK(FallingStar) << 8) + $01
call CopyVideoData
- ld hl, GameFreakLogoOAMData ; $4140
+ ld hl, GameFreakLogoOAMData
ld de, wOAMBuffer + $60
ld bc, $40
call CopyData
- ld hl, GameFreakShootingStarOAMData ; $4180
+ ld hl, GameFreakShootingStarOAMData
ld de, wOAMBuffer
ld bc, $10
jp CopyData
@@ -66,7 +66,7 @@ AnimateShootingStar: ; 70044 (1c:4044)
jr nz, .asm_7007b
ld b, $3
.asm_70083
- ld hl, rOBP0 ; $ff48
+ ld hl, rOBP0
rrc [hl]
rrc [hl]
ld c, $a
@@ -78,15 +78,15 @@ AnimateShootingStar: ; 70044 (1c:4044)
ld a, $18
.asm_70098
push af
- ld hl, OAMData_700ee ; $40ee
+ ld hl, OAMData_700ee
ld bc, $4
call CopyData
pop af
dec a
jr nz, .asm_70098
xor a
- ld [wWhichTrade], a ; wWhichTrade
- ld hl, PointerTable_700f2 ; $40f2
+ ld [wWhichTrade], a
+ ld hl, PointerTable_700f2
ld c, $6
.asm_700af
ld a, [hli]
@@ -110,11 +110,11 @@ AnimateShootingStar: ; 70044 (1c:4044)
inc hl
dec c
jr nz, .asm_700ba
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
cp $18
jr z, .asm_700d5
add $6
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
.asm_700d5
call Func_7011f
push af
@@ -174,7 +174,7 @@ Func_7011f: ; 7011f (1c:411f)
ld b, $8
.asm_70121
ld hl, wOAMBuffer + $5c
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld de, $fffc
ld c, a
.asm_7012b
@@ -182,9 +182,9 @@ Func_7011f: ; 7011f (1c:411f)
add hl, de
dec c
jr nz, .asm_7012b
- ld a, [rOBP1] ; $ff49
+ ld a, [rOBP1]
xor $a0
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
ld c, $3
call CheckForUserInterruption
ret c
diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm
index 64876d22..0d451bf6 100755
--- a/engine/give_pokemon.asm
+++ b/engine/give_pokemon.asm
@@ -2,14 +2,14 @@ _GivePokemon: ; 4fda5 (13:7da5)
call EnableAutoTextBoxDrawing
xor a
ld [wccd3], a
- ld a, [wPartyCount] ; wPartyCount
+ ld a, [wPartyCount]
cp PARTY_LENGTH
jr c, .asm_4fe01
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
cp MONS_PER_BOX
jr nc, .asm_4fdf9
xor a
- ld [W_ENEMYBATTSTATUS3], a ; W_ENEMYBATTSTATUS3
+ ld [W_ENEMYBATTSTATUS3], a
ld a, [wcf91]
ld [wEnemyMonSpecies2], a
callab LoadEnemyMonData
@@ -56,7 +56,7 @@ SetPokedexOwnedFlag: ; 4fe11 (13:7e11)
ld a, [wd11e]
dec a
ld c, a
- ld hl, wPokedexOwned ; wPokedexOwned
+ ld hl, wPokedexOwned
ld b, $1
predef FlagActionPredef
pop af
diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm
index 30979118..7882a226 100755
--- a/engine/hall_of_fame.asm
+++ b/engine/hall_of_fame.asm
@@ -11,7 +11,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
ld a, $7f
call FillMemory
call EnableLCD
- ld hl, rLCDC ; $ff40
+ ld hl, rLCDC
set 3, [hl]
xor a
ld hl, wHallOfFame
@@ -24,7 +24,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
ld [wd358], a
ld [wTrainerScreenY], a
inc a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ld hl, wd5a2
ld a, [hl]
inc a
@@ -45,17 +45,17 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
inc c
push hl
push bc
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
ld a, c
ld [wTrainerEngageDistance], a
- ld hl, wPartyMon1Level ; wPartyMon1Level
+ ld hl, wPartyMon1Level
ld bc, wPartyMon2 - wPartyMon1
call AddNTimes
ld a, [hl]
ld [wTrainerFacingDirection], a
call Func_70278
call Func_702e1
- ld c, $50
+ ld c, 80
call DelayFrames
hlCoord 2, 13
ld b, $3
@@ -79,15 +79,15 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
ld [hl], $ff
call SaveHallOfFameTeams
xor a
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
inc a
ld [wTrainerScreenY], a
call Func_70278
- call Func_70377
+ call HoFDisplayPlayerStats
call Func_70423
xor a
ld [hWY], a
- ld hl, rLCDC ; $ff40
+ ld hl, rLCDC
res 3, [hl]
ret
@@ -100,7 +100,7 @@ Func_70278: ; 70278 (1c:4278)
ld [hSCY], a
ld a, $c0
ld [hSCX], a
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld [wcf91], a
ld [wd0b5], a
ld [wBattleMonSpecies2], a
@@ -108,7 +108,7 @@ Func_70278: ; 70278 (1c:4278)
ld a, [wTrainerScreenY]
and a
jr z, .asm_7029d
- call Func_7033e
+ call HoFLoadPlayerPics
jr .asm_702ab
.asm_7029d
hlCoord 12, 5
@@ -120,7 +120,7 @@ Func_70278: ; 70278 (1c:4278)
ld c, $0
call GoPAL_SET
ld a, $e4
- ld [rBGP], a ; $ff47
+ ld [rBGP], a
ld c, $31
call Func_7036d
ld d, $a0
@@ -148,7 +148,7 @@ Func_70278: ; 70278 (1c:4278)
Func_702e1: ; 702e1 (1c:42e1)
ld a, [wTrainerEngageDistance]
- ld hl, wPartyMonNicks ; wPartyMonNicks
+ ld hl, wPartyMonNicks
call GetPartyMonName
call Func_702f0
jp Func_70404
@@ -167,11 +167,11 @@ Func_702f0: ; 702f0 (1c:42f0)
ld a, [wTrainerFacingDirection]
hlCoord 8, 7
call PrintLevelCommon
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld [wd0b5], a
hlCoord 3, 9
predef PrintMonType
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
jp PlayCry
HoFMonInfoText: ; 70329 (1c:4329)
@@ -179,8 +179,8 @@ HoFMonInfoText: ; 70329 (1c:4329)
next "TYPE1/"
next "TYPE2/@"
-Func_7033e: ; 7033e (1c:433e)
- ld de, RedPicFront ; $6ede
+HoFLoadPlayerPics: ; 7033e (1c:433e)
+ ld de, RedPicFront
ld a, BANK(RedPicFront)
call UncompressSpriteFromDE
ld hl, S_SPRITEBUFFER1
@@ -189,7 +189,7 @@ Func_7033e: ; 7033e (1c:433e)
call CopyData
ld de, vFrontPic
call InterlaceMergeSpriteBuffers
- ld de, RedPicBack ; $7e0a
+ ld de, RedPicBack
ld a, BANK(RedPicBack)
call UncompressSpriteFromDE
predef ScaleSpriteByTwo
@@ -202,7 +202,7 @@ Func_7036d: ; 7036d (1c:436d)
hlCoord 12, 5
predef_jump CopyTileIDsFromList
-Func_70377: ; 70377 (1c:4377)
+HoFDisplayPlayerStats: ; 70377 (1c:4377)
ld hl, wd747
set 3, [hl]
predef DisplayDexRating
@@ -215,7 +215,7 @@ Func_70377: ; 70377 (1c:4377)
ld c, $9
call TextBoxBorder
hlCoord 7, 2
- ld de, wPlayerName ; wd158
+ ld de, wPlayerName
call PlaceString
hlCoord 1, 6
ld de, HoFPlayTimeText
@@ -233,18 +233,18 @@ Func_70377: ; 70377 (1c:4377)
ld de, HoFMoneyText
call PlaceString
hlCoord 4, 10
- ld de, wPlayerMoney ; wPlayerMoney
+ ld de, wPlayerMoney
ld c, $a3
call PrintBCDNumber
ld hl, DexSeenOwnedText
- call Func_703e2
+ call HoFPrintTextAndDelay
ld hl, DexRatingText
- call Func_703e2
+ call HoFPrintTextAndDelay
ld hl, wcc5d
-Func_703e2: ; 703e2 (1c:43e2)
+HoFPrintTextAndDelay: ; 703e2 (1c:43e2)
call PrintText
- ld c, $78
+ ld c, 120
jp DelayFrames
HoFPlayTimeText: ; 703ea (1c:43ea)
@@ -266,7 +266,7 @@ Func_70404: ; 70404 (1c:4404)
ld bc, HOF_MON
ld a, [wTrainerEngageDistance]
call AddNTimes
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld [hli], a
ld a, [wTrainerFacingDirection]
ld [hli], a
diff --git a/engine/hidden_object_functions14.asm b/engine/hidden_object_functions14.asm
index a162c905..e0ed973d 100755
--- a/engine/hidden_object_functions14.asm
+++ b/engine/hidden_object_functions14.asm
@@ -11,7 +11,7 @@ TMNotebook: ; 529a4 (14:69a4)
db "@"
ViridianSchoolNotebook: ; 529aa (14:69aa)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianSchoolNotebookText1
call PrintText
call TurnPageSchoolNotebook
@@ -66,8 +66,7 @@ ViridianSchoolNotebookText4: ; 52a03 (14:6a03)
PrintFightingDojoText2: ; 52a08 (14:6a08)
call EnableAutoTextBoxDrawing
- ld a, $37
- jp PrintPredefTextID
+ tx_pre_jump FightingDojoText_52a10
FightingDojoText_52a10: ; 52a10 (14:6a10)
TX_FAR _FightingDojoText_52a10
@@ -75,8 +74,7 @@ FightingDojoText_52a10: ; 52a10 (14:6a10)
PrintFightingDojoText3: ; 52a15 (14:6a15)
call EnableAutoTextBoxDrawing
- ld a, $38
- jp PrintPredefTextID
+ tx_pre_jump FightingDojoText_52a1d
FightingDojoText_52a1d: ; 52a1d (14:6a1d)
TX_FAR _FightingDojoText_52a1d
@@ -84,8 +82,7 @@ FightingDojoText_52a1d: ; 52a1d (14:6a1d)
PrintFightingDojoText: ; 52a22 (14:6a22)
call EnableAutoTextBoxDrawing
- ld a, $36
- jp PrintPredefTextID
+ tx_pre_jump FightingDojoText
FightingDojoText: ; 52a2a (14:6a2a)
TX_FAR _FightingDojoText
@@ -93,11 +90,10 @@ FightingDojoText: ; 52a2a (14:6a2a)
PrintIndigoPlateauHQText: ; 52a2f (14:6a2f)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
- ld a, $27
- jp PrintPredefTextID
+ tx_pre_jump IndigoPlateauHQText
IndigoPlateauHQText: ; 52a3d (14:6a3d)
TX_FAR _IndigoPlateauHQText
diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm
index 9dbcbf98..46140927 100755
--- a/engine/hidden_object_functions17.asm
+++ b/engine/hidden_object_functions17.asm
@@ -1,7 +1,6 @@
PrintRedsNESText: ; 5db79 (17:5b79)
call EnableAutoTextBoxDrawing
- ld a, $4 ; RedBedroomSNESText
- jp PrintPredefTextID
+ tx_pre_jump RedBedroomSNESText
RedBedroomSNESText: ; 5db81 (17:5b81)
TX_FAR _RedBedroomSNESText
@@ -9,19 +8,17 @@ RedBedroomSNESText: ; 5db81 (17:5b81)
OpenRedsPC: ; 5db86 (17:5b86)
call EnableAutoTextBoxDrawing
- ld a, $3
- jp PrintPredefTextID
+ tx_pre_jump RedBedroomPCText
-RedBedroomPC: ; 5db8e (17:5b8e)
+RedBedroomPCText: ; 5db8e (17:5b8e)
db $fc ; FuncTX_ItemStoragePC
Route15GateLeftBinoculars: ; 5db8f (17:5b8f)
ld a, [wSpriteStateData1 + 9]
- cp $4 ; i
+ cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
- ld a, $a ; text id Route15UpstairsBinocularsText
- call PrintPredefTextID
+ tx_pre Route15UpstairsBinocularsText
ld a, ARTICUNO
ld [wcf91], a
call PlayCry
@@ -36,8 +33,7 @@ AerodactylFossil: ; 5dbad (17:5bad)
ld [wcf91], a
call DisplayMonFrontSpriteInBox
call EnableAutoTextBoxDrawing
- ld a, $9
- call PrintPredefTextID
+ tx_pre AerodactylFossilText
ret
AerodactylFossilText: ; 5dbbe (17:5bbe)
@@ -49,8 +45,7 @@ KabutopsFossil: ; 5bdc3 (17:5bc3)
ld [wcf91], a
call DisplayMonFrontSpriteInBox
call EnableAutoTextBoxDrawing
- ld a, $b
- call PrintPredefTextID
+ tx_pre KabutopsFossilText
ret
KabutopsFossilText: ; 5dbd4 (17:5bd4)
@@ -61,7 +56,7 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9)
; Displays a pokemon's front sprite in a pop-up window.
; [wcf91] = pokemon interal id number
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
xor a
ld [hWY], a
@@ -78,7 +73,7 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9)
ld a, $80
ld [$ffe1], a
hlCoord 10, 11
- predef Func_3f073
+ predef AnimateSendingOutMon
call WaitForTextScrollButtonPress
call LoadScreenTilesFromBuffer1
call Delay3
@@ -95,7 +90,7 @@ PrintBlackboardLinkCableText: ; 5dc1a (17:5c1a)
ret
LinkCableHelp: ; 5dc29 (17:5c29)
- db $08 ; asm
+ TX_ASM
call SaveScreenTilesToBuffer1
ld hl, LinkCableHelpText1
call PrintText
@@ -125,10 +120,10 @@ LinkCableHelp: ; 5dc29 (17:5c29)
call PrintText
call HandleMenuInput
bit 1, a
- jr nz, .asm_5dc93 ; 0x5dc74 $1d
+ jr nz, .asm_5dc93
ld a, [wCurrentMenuItem]
cp $3
- jr z, .asm_5dc93 ; 0x5dc7b $16
+ jr z, .asm_5dc93
ld hl, wd730
res 6, [hl]
ld hl, LinkCableInfoTexts
@@ -179,7 +174,7 @@ LinkCableInfoText3: ; 5dce8 (17:5ce8)
db "@"
ViridianSchoolBlackboard: ; 5dced (17:5ced)
- db $08 ; asm
+ TX_ASM
call SaveScreenTilesToBuffer1
ld hl, ViridianSchoolBlackboardText1
call PrintText
@@ -307,8 +302,7 @@ ViridianBlackboardFrozenText: ; 5ddea (17:5dea)
PrintTrashText: ; 5ddef (17:5def)
call EnableAutoTextBoxDrawing
- ld a, $26
- jp PrintPredefTextID
+ tx_pre_jump VermilionGymTrashText
VermilionGymTrashText: ; 5ddf7 (17:5df7)
TX_FAR _VermilionGymTrashText
@@ -316,7 +310,7 @@ VermilionGymTrashText: ; 5ddf7 (17:5df7)
GymTrashScript: ; 5ddfc (17:5dfc)
call EnableAutoTextBoxDrawing
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld [wcd5b], a
; Don't do the trash can puzzle if it's already been done.
@@ -324,8 +318,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
bit 0, a
jr z, .ok
- ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash)
- jp PrintPredefTextID
+ tx_pre_jump VermilionGymTrashText
.ok
bit 1, a
@@ -337,7 +330,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
cp b
jr z, .openFirstLock
- ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash)
+ tx_pre_id VermilionGymTrashText
jr .done
.openFirstLock
@@ -345,7 +338,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
ld hl, wd773
set 1, [hl]
- ld hl, GymTrashCans ; $5e7d
+ ld hl, GymTrashCans
ld a, [wcd5b]
; * 5
ld b, a
@@ -375,7 +368,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
and $f
ld [wd744], a
- ld a, $3b ; DisplayTextID $3b = VermilionGymTrashSuccesText1 (first lock opened!)
+ tx_pre_id VermilionGymTrashSuccesText1
jr .done
.trySecondLock
@@ -393,7 +386,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
and $e
ld [wd743], a
- ld a, $3e ; DisplayTextID $3e = VermilionGymTrashFailText (locks reset!)
+ tx_pre_id VermilionGymTrashFailText
jr .done
.openSecondLock
@@ -403,7 +396,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
ld hl, wd126
set 6, [hl]
- ld a, $3d ; DisplayTextID $3d = VermilionGymTrashSuccesText3 (2nd lock opened!)
+ tx_pre_id VermilionGymTrashSuccesText3
.done
jp PrintPredefTextID
@@ -428,19 +421,21 @@ GymTrashCans: ; 5de7d (17:5e7d)
VermilionGymTrashSuccesText1: ; 5dec8 (17:5ec8)
TX_FAR _VermilionGymTrashSuccesText1
- db $08 ; asm
+ TX_ASM
call WaitForSoundToFinish
ld a, (SFX_02_49 - SFX_Headers_02) / 3
call PlaySound
call WaitForSoundToFinish
jp TextScriptEnd
+; unused
VermilionGymTrashSuccesText2: ; 5dedb (17:5edb)
TX_FAR _VermilionGymTrashSuccesText2
db "@"
-UnnamedText_5dee0: ; 5dee0 (17:5ee0)
- db $08 ; asm
+; unused
+VermilionGymTrashSuccesPlaySfx: ; 5dee0 (17:5ee0)
+ TX_ASM
call WaitForSoundToFinish
ld a, (SFX_02_49 - SFX_Headers_02) / 3
call PlaySound
@@ -449,7 +444,7 @@ UnnamedText_5dee0: ; 5dee0 (17:5ee0)
VermilionGymTrashSuccesText3: ; 5deef (17:5eef)
TX_FAR _VermilionGymTrashSuccesText3
- db $08 ; asm
+ TX_ASM
call WaitForSoundToFinish
ld a, (SFX_02_57 - SFX_Headers_02) / 3
call PlaySound
@@ -458,7 +453,7 @@ VermilionGymTrashSuccesText3: ; 5deef (17:5eef)
VermilionGymTrashFailText: ; 5df02 (17:5f02)
TX_FAR _VermilionGymTrashFailText
- db $08 ; asm
+ TX_ASM
call WaitForSoundToFinish
ld a, (SFX_02_51 - SFX_Headers_02) / 3
call PlaySound
diff --git a/engine/hidden_object_functions18.asm b/engine/hidden_object_functions18.asm
index 7696626f..e293b0a0 100755
--- a/engine/hidden_object_functions18.asm
+++ b/engine/hidden_object_functions18.asm
@@ -1,31 +1,31 @@
GymStatues: ; 62419 (18:6419)
-; if in a gym and have the corresponding badge, a = $D and jp PrintPredefTextID
-; if in a gym and don’t have the corresponding badge, a = $C and jp PrintPredefTextID
+; if in a gym and have the corresponding badge, a = GymStatueText2_id and jp PrintPredefTextID
+; if in a gym and don’t have the corresponding badge, a = GymStatueText1_id and jp PrintPredefTextID
; else ret
call EnableAutoTextBoxDrawing
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
ld hl, .BadgeFlags
ld a, [W_CURMAP]
ld b, a
-.asm_62429
+.loop
ld a, [hli]
cp $ff
ret z
cp b
- jr z, .asm_62433 ; 0x6242e $3
+ jr z, .match
inc hl
- jr .asm_62429 ; 0x62431 $f6
-.asm_62433
+ jr .loop
+.match
ld b, [hl]
ld a, [wd72a]
and b
cp b
- ld a, $d
- jr z, .asm_6243f ; 0x6243b $2
- ld a, $c
-.asm_6243f
+ tx_pre_id GymStatueText2
+ jr z, .haveBadge
+ tx_pre_id GymStatueText1
+.haveBadge
jp PrintPredefTextID
.BadgeFlags: ; 62442 (18:6442)
@@ -49,41 +49,53 @@ GymStatueText2: ; 62458 (18:6458)
PrintBenchGuyText: ; 6245d (18:645d)
call EnableAutoTextBoxDrawing
- ld hl, PokeCenterMapIDList
+ ld hl, BenchGuyTextPointers
ld a, [W_CURMAP]
ld b, a
-.asm_62467
+.loop
ld a, [hli]
cp $ff
ret z
cp b
- jr z, .asm_62472
+ jr z, .match
inc hl
inc hl
- jr .asm_62467
-.asm_62472
+ jr .loop
+.match
ld a, [hli]
ld b, a
ld a, [wSpriteStateData1 + 9]
cp b
- jr nz, .asm_62467
+ jr nz, .loop ; player isn't facing left at the bench guy
ld a, [hl]
jp PrintPredefTextID
-; format: db map id, 08, text id of PredefTextIDPointerTable
-PokeCenterMapIDList: ; 6247e (18:647e)
- db VIRIDIAN_POKECENTER,$08,$0F
- db PEWTER_POKECENTER,$08,$10
- db CERULEAN_POKECENTER,$08,$11
- db LAVENDER_POKECENTER,$08,$12
- db VERMILION_POKECENTER,$08,$13
- db CELADON_POKECENTER,$08,$14
- db CELADON_HOTEL,$08,$15
- db FUCHSIA_POKECENTER,$08,$16
- db CINNABAR_POKECENTER,$08,$17
- db SAFFRON_POKECENTER,$08,$18
- db MT_MOON_POKECENTER,$08,$19
- db ROCK_TUNNEL_POKECENTER,$08,$1A
+; format: db map id, player sprite facing direction, text id of PredefTextIDPointerTable
+BenchGuyTextPointers: ; 6247e (18:647e)
+ db VIRIDIAN_POKECENTER, SPRITE_FACING_LEFT
+ db (ViridianCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db PEWTER_POKECENTER, SPRITE_FACING_LEFT
+ db (PewterCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db CERULEAN_POKECENTER, SPRITE_FACING_LEFT
+ db (CeruleanCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db LAVENDER_POKECENTER, SPRITE_FACING_LEFT
+ db (LavenderCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db VERMILION_POKECENTER, SPRITE_FACING_LEFT
+ db (VermilionCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db CELADON_POKECENTER, SPRITE_FACING_LEFT
+ db (CeladonCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db CELADON_HOTEL, SPRITE_FACING_LEFT
+ db (CeladonCityHotelText_id - TextPredefs) / 2 + 1
+ db FUCHSIA_POKECENTER, SPRITE_FACING_LEFT
+ db (FuchsiaCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db CINNABAR_POKECENTER, SPRITE_FACING_LEFT
+ db (CinnabarIslandPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db SAFFRON_POKECENTER, SPRITE_FACING_LEFT
+ db (SaffronCityPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db MT_MOON_POKECENTER, SPRITE_FACING_LEFT
+ db (MtMoonPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
+ db ROCK_TUNNEL_POKECENTER,SPRITE_FACING_LEFT
+ db (RockTunnelPokecenterBenchGuyText_id - TextPredefs) / 2 + 1
db $FF
ViridianCityPokecenterBenchGuyText: ; 624a3 (18:64a3)
@@ -139,11 +151,11 @@ CinnabarIslandPokecenterBenchGuyText: ; 624df (18:64df)
db "@"
SaffronCityPokecenterBenchGuyText: ; 624e4 (18:64e4)
- db $8 ; asm
+ TX_ASM
ld a, [wd838]
bit 7, a
ld hl, SaffronCityPokecenterBenchGuyText2
- jr nz, .asm_624f2 ; 0x624ed $3
+ jr nz, .asm_624f2
ld hl, SaffronCityPokecenterBenchGuyText1
.asm_624f2
call PrintText
@@ -163,13 +175,12 @@ CeladonCityHotelText: ; 62502 (18:6502)
ret
-TerminatorText_62508: ; 62508 (18:6508)
+UnusedPredefText: ; 62508 (18:6508)
db "@"
PrintBookcaseText: ; 6509 (18:6509)
call EnableAutoTextBoxDrawing
- ld a, $e ; BookcaseText
- jp PrintPredefTextID
+ tx_pre_jump BookcaseText
BookcaseText: ; 62511 (18:6511)
TX_FAR _BookcaseText
@@ -177,13 +188,12 @@ BookcaseText: ; 62511 (18:6511)
OpenPokemonCenterPC: ; 62516 (18:6516)
ld a, [wSpriteStateData1 + 9]
- cp $4 ; check to see if player is facing up
+ cp SPRITE_FACING_UP ; check to see if player is facing up
ret nz
call EnableAutoTextBoxDrawing
ld a, $1
ld [wAutoTextBoxDrawingControl], a
- ld a, $1f ; PredefText1f
- jp PrintPredefTextID
+ tx_pre_jump PokemonCenterPCText
-PredefText1f: ; 62529 (18:6529)
+PokemonCenterPCText: ; 62529 (18:6529)
db $F9 ; FuncTX_PokemonCenterPC
diff --git a/engine/hidden_object_functions3.asm b/engine/hidden_object_functions3.asm
index c471c7bb..c40073cb 100755
--- a/engine/hidden_object_functions3.asm
+++ b/engine/hidden_object_functions3.asm
@@ -40,27 +40,44 @@ PrintBookshelfText: ; fb50 (3:7b50)
; format: db tileset id, bookshelf tile id, text id
BookshelfTileIDs: ; fb8b (3:7b8b)
- db PLATEAU, $30, $3A
- db HOUSE, $3D, $3F
- db HOUSE, $1E, $40
- db MANSION, $32, $40
- db REDS_HOUSE_1, $32, $40
- db LAB, $28, $40
- db LOBBY, $16, $41
- db GYM, $1D, $40
- db DOJO, $1D, $40
- db GATE, $22, $40
- db MART, $54, $42
- db MART, $55, $42
- db POKECENTER, $54, $42
- db POKECENTER, $55, $42
- db LOBBY, $50, $42
- db LOBBY, $52, $42
- db SHIP, $36, $40
+ db PLATEAU, $30
+ db (IndigoPlateauStatues_id - TextPredefs) / 2 + 1
+ db HOUSE, $3D
+ db (TownMapText_id - TextPredefs) / 2 + 1
+ db HOUSE, $1E
+ db (BookOrSculptureText_id - TextPredefs) / 2 + 1
+ db MANSION, $32
+ db (BookOrSculptureText_id - TextPredefs) / 2 + 1
+ db REDS_HOUSE_1, $32
+ db (BookOrSculptureText_id - TextPredefs) / 2 + 1
+ db LAB, $28
+ db (BookOrSculptureText_id - TextPredefs) / 2 + 1
+ db LOBBY, $16
+ db (ElevatorText_id - TextPredefs) / 2 + 1
+ db GYM, $1D
+ db (BookOrSculptureText_id - TextPredefs) / 2 + 1
+ db DOJO, $1D
+ db (BookOrSculptureText_id - TextPredefs) / 2 + 1
+ db GATE, $22
+ db (BookOrSculptureText_id - TextPredefs) / 2 + 1
+ db MART, $54
+ db (PokemonStuffText_id - TextPredefs) / 2 + 1
+ db MART, $55
+ db (PokemonStuffText_id - TextPredefs) / 2 + 1
+ db POKECENTER, $54
+ db (PokemonStuffText_id - TextPredefs) / 2 + 1
+ db POKECENTER, $55
+ db (PokemonStuffText_id - TextPredefs) / 2 + 1
+ db LOBBY, $50
+ db (PokemonStuffText_id - TextPredefs) / 2 + 1
+ db LOBBY, $52
+ db (PokemonStuffText_id - TextPredefs) / 2 + 1
+ db SHIP, $36
+ db (BookOrSculptureText_id - TextPredefs) / 2 + 1
db $FF
IndigoPlateauStatues: ; fbbf (3:7bbf)
- db $08 ; asm
+ TX_ASM
ld hl, IndigoPlateauStatuesText1
call PrintText
ld a, [W_XCOORD]
@@ -85,7 +102,7 @@ IndigoPlateauStatuesText3: ; fbe3 (3:7be3)
db "@"
BookOrSculptureText: ; fbe8 (3:7be8)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonBooksText
ld a, [W_CURMAPTILESET]
cp MANSION ; Celadon Mansion tileset
@@ -113,7 +130,7 @@ ElevatorText: ; fc0d (3:7c0d)
TownMapText: ; fc12 (3:7c12)
TX_FAR _TownMapText
db $06
- db $08 ; asm
+ TX_ASM
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, wd730
diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm
index f97190de..f29b0925 100755
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -1,7 +1,6 @@
PrintNewBikeText: ; 1e94b (7:694b)
call EnableAutoTextBoxDrawing
- ld a, $39
- jp PrintPredefTextID
+ tx_pre_jump NewBicycleText
NewBicycleText: ; 1e953 (7:6953)
TX_FAR _NewBicycleText
@@ -9,8 +8,7 @@ NewBicycleText: ; 1e953 (7:6953)
DisplayOakLabLeftPoster: ; 1e958 (7:6958)
call EnableAutoTextBoxDrawing
- ld a, $05 ; PushStartText
- jp PrintPredefTextID
+ tx_pre_jump PushStartText
PushStartText: ; 1e960 (7:6960)
TX_FAR _PushStartText
@@ -23,10 +21,10 @@ DisplayOakLabRightPoster: ; 1e965 (7:6965)
call CountSetBits
ld a, [wd11e]
cp $2
- ld a, $6 ; SaveOptionText
- jr c, .asm_1e97b
- ld a, $7 ; StrengthsAndWeaknessesText
-.asm_1e97b
+ tx_pre_id SaveOptionText
+ jr c, .ownThreeOrMoreMon
+ tx_pre_id StrengthsAndWeaknessesText
+.ownThreeOrMoreMon
jp PrintPredefTextID
SaveOptionText: ; 1e97e (7:697e)
@@ -40,29 +38,29 @@ StrengthsAndWeaknessesText: ; 1e983 (7:6983)
SafariZoneCheck: ; 1e988 (7:6988)
ld hl, wd790
bit 7, [hl]
- jr z, asm_1e9ab
- ld a, [W_NUMSAFARIBALLS] ; W_NUMSAFARIBALLS
+ jr z, SafariZoneGameOver
+ ld a, [W_NUMSAFARIBALLS]
and a
- jr z, asm_1e9b0
- jr asm_1e9ab
+ jr z, SafariZoneGameStillGoing
+ jr SafariZoneGameOver
SafariZoneCheckSteps: ; 1e997 (7:6997)
- ld a, [wSafariSteps] ; wd70d
+ ld a, [wSafariSteps]
ld b, a
- ld a, [wSafariSteps + 1] ; wd70e
+ ld a, [wSafariSteps + 1]
ld c, a
or b
- jr z, asm_1e9b0
+ jr z, SafariZoneGameStillGoing
dec bc
ld a, b
- ld [wSafariSteps], a ; wd70d
+ ld [wSafariSteps], a
ld a, c
- ld [wSafariSteps + 1], a ; wd70e
-asm_1e9ab: ; 1e9ab (7:69ab)
+ ld [wSafariSteps + 1], a
+SafariZoneGameOver: ; 1e9ab (7:69ab)
xor a
ld [wSafariZoneGameOver], a
ret
-asm_1e9b0: ; 1e9b0 (7:69b0)
+SafariZoneGameStillGoing: ; 1e9b0 (7:69b0)
call EnableAutoTextBoxDrawing
xor a
ld [wMusicHeaderPointer], a
@@ -76,12 +74,12 @@ asm_1e9b0: ; 1e9b0 (7:69b0)
cp $b9
jr nz, .asm_1e9c2
ld a, $d3
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
xor a
ld [wd528], a
ld a, SAFARI_ZONE_ENTRANCE
- ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
+ ld [H_DOWNARROWBLINKCNT1], a
ld a, $3
ld [wDestinationWarpID], a
ld a, $5
@@ -99,8 +97,8 @@ PrintSafariGameOverText: ; 1e9ed (7:69ed)
jp PrintText
SafariGameOverText: ; 1e9f7 (7:69f7)
- db $08 ; asm
- ld a, [W_NUMSAFARIBALLS] ; W_NUMSAFARIBALLS
+ TX_ASM
+ ld a, [W_NUMSAFARIBALLS]
and a
jr z, .asm_1ea04
ld hl, TimesUpText
@@ -120,17 +118,16 @@ GameOverText: ; 1ea12 (7:6a12)
PrintCinnabarQuiz: ; 1ea17 (7:6a17)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
- ld a, $31
- jp PrintPredefTextID
+ tx_pre_jump CinnabarGymQuiz
CinnabarGymQuiz: ; 1ea25 (7:6a25)
- db $08 ; asm
+ TX_ASM
xor a
ld [wda38], a
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
push af
and $f
ld [$ffdb], a
@@ -200,7 +197,7 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
call YesNoChoice
ld a, [$ffdc]
ld c, a
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
cp c
jr nz, .asm_1eab8
ld hl, wd126
@@ -267,7 +264,7 @@ CinnabarGymQuiz_1eb0a: ; 1eb0a (7:6b0a)
add a
ld d, $0
ld e, a
- ld hl, CinnabarGymGateCoords ; $6b48
+ ld hl, CinnabarGymGateCoords
add hl, de
ld a, [hli]
ld b, [hl]
@@ -309,8 +306,7 @@ CinnabarGymGateCoords: ; 1eb48 (7:6b48)
PrintMagazinesText: ; 1eb60 (7:6b60)
call EnableAutoTextBoxDrawing
- ld a, $30
- call PrintPredefTextID
+ tx_pre MagazinesText
ret
MagazinesText: ; 1eb69 (7:6b69)
@@ -320,7 +316,7 @@ MagazinesText: ; 1eb69 (7:6b69)
BillsHousePC: ; 1eb6e (7:6b6e)
call EnableAutoTextBoxDrawing
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
ld a, [wd7f2]
bit 7, a
@@ -330,29 +326,27 @@ BillsHousePC: ; 1eb6e (7:6b6e)
bit 6, a
jr nz, .asm_1eb8b
.asm_1eb86
- ld a, $2d
- jp PrintPredefTextID
+ tx_pre_jump BillsHouseMonitorText
.asm_1eb8b
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $2e
- call PrintPredefTextID
- ld c, $20
+ tx_pre BillsHouseInitiatedText
+ ld c, 32
call DelayFrames
ld a, (SFX_02_3c - SFX_Headers_02) / 3
call PlaySound
call WaitForSoundToFinish
- ld c, $50
+ ld c, 80
call DelayFrames
ld a, (SFX_02_48 - SFX_Headers_02) / 3
call PlaySound
call WaitForSoundToFinish
- ld c, $30
+ ld c, 48
call DelayFrames
ld a, (SFX_02_3c - SFX_Headers_02) / 3
call PlaySound
call WaitForSoundToFinish
- ld c, $20
+ ld c, 32
call DelayFrames
ld a, (SFX_02_3a - SFX_Headers_02) / 3
call PlaySound
@@ -364,8 +358,7 @@ BillsHousePC: ; 1eb6e (7:6b6e)
.asm_1ebd2
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $2f
- call PrintPredefTextID
+ tx_pre BillsHousePokemonList
ret
BillsHouseMonitorText: ; 1ebdd (7:6bdd)
@@ -375,21 +368,21 @@ BillsHouseMonitorText: ; 1ebdd (7:6bdd)
BillsHouseInitiatedText: ; 1ebe2 (7:6be2)
TX_FAR _BillsHouseInitiatedText
db $06
- db $08 ; asm
+ TX_ASM
ld a, $ff
ld [wc0ee], a
call PlaySound
- ld c, $10
+ ld c, 16
call DelayFrames
ld a, (SFX_02_49 - SFX_Headers_02) / 3
call PlaySound
call WaitForSoundToFinish
- ld c, $3c
+ ld c, 60
call DelayFrames
jp TextScriptEnd
BillsHousePokemonList: ; 1ec05 (7:6c05)
- db $08 ; asm
+ TX_ASM
call SaveScreenTilesToBuffer1
ld hl, BillsHousePokemonListText1
call PrintText
@@ -459,11 +452,10 @@ BillsHousePokemonListText2: ; 1ecaa (7:6caa)
DisplayOakLabEmailText: ; 1ecaf (7:6caf)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
- ld a, $8 ; OakLabEmailText
- jp PrintPredefTextID
+ tx_pre_jump OakLabEmailText
OakLabEmailText: ; 1ecbd (7:6cbd)
TX_FAR _OakLabEmailText
diff --git a/engine/hp_bar.asm b/engine/hp_bar.asm
index 333b0b90..61209778 100755
--- a/engine/hp_bar.asm
+++ b/engine/hp_bar.asm
@@ -143,7 +143,7 @@ UpdateHPBar_AnimateHPBar: ; fab1 (3:7ab1)
push de
ld d, $6
call DrawHPBar
- ld c, $2
+ ld c, 2
call DelayFrames
pop de
ld a, [wHPBarDelta] ; +1 or -1
diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm
index cb03a074..32b55002 100755
--- a/engine/in_game_trades.asm
+++ b/engine/in_game_trades.asm
@@ -22,7 +22,7 @@ DoInGameTradeDialogue: ; 71ad9 (1c:5ad9)
pop af
ld l,a
ld h,$0
- ld de,InGameTradeTextPointers ; $5d64
+ ld de,InGameTradeTextPointers
add hl,hl
add hl,de
ld a,[hli]
diff --git a/engine/intro.asm b/engine/intro.asm
index 7c0464d3..2043771d 100755
--- a/engine/intro.asm
+++ b/engine/intro.asm
@@ -106,12 +106,12 @@ PlayIntroScene: ; 4169d (10:569d)
call PlaySound
xor a
ld [wd09f], a
- ld de, IntroNidorinoAnimation4 ; $5931
+ ld de, IntroNidorinoAnimation4
call AnimateIntroNidorino
; hop
ld a, (SFX_1f_60 - SFX_Headers_1f) / 3
call PlaySound
- ld de, IntroNidorinoAnimation5 ; $593c
+ ld de, IntroNidorinoAnimation5
call AnimateIntroNidorino
ld c, $14
call CheckForUserInterruption
@@ -119,7 +119,7 @@ PlayIntroScene: ; 4169d (10:569d)
ld a, $24
ld [wd09f], a
- ld de, IntroNidorinoAnimation6 ; $5947
+ ld de, IntroNidorinoAnimation6
call AnimateIntroNidorino
ld c, $1e
call CheckForUserInterruption
@@ -130,17 +130,17 @@ PlayIntroScene: ; 4169d (10:569d)
call PlaySound
ld a, $48
ld [wd09f], a
- ld de, IntroNidorinoAnimation7 ; $5950
+ ld de, IntroNidorinoAnimation7
jp AnimateIntroNidorino
AnimateIntroNidorino: ; 41793 (10:5793)
ld a, [de]
cp $50
ret z
- ld [W_BASECOORDY], a ; wd082
+ ld [W_BASECOORDY], a
inc de
ld a, [de]
- ld [W_BASECOORDX], a ; wd081
+ ld [W_BASECOORDX], a
push de
ld c, $24
call Func_417ae
@@ -155,10 +155,10 @@ Func_417ae: ; 417ae (10:57ae)
ld a, [wd09f]
ld d, a
.asm_417b5
- ld a, [W_BASECOORDY] ; wd082
+ ld a, [W_BASECOORDY]
add [hl]
ld [hli], a
- ld a, [W_BASECOORDX] ; wd081
+ ld a, [W_BASECOORDX]
add [hl]
ld [hli], a
ld a, d
@@ -174,14 +174,14 @@ Func_417c7: ; 417c7 (10:57c7)
ld d, $0
.asm_417cc
push bc
- ld a, [W_BASECOORDY] ; wd082
+ ld a, [W_BASECOORDY]
ld e, a
.asm_417d1
ld a, e
add $8
ld e, a
ld [hli], a
- ld a, [W_BASECOORDX] ; wd081
+ ld a, [W_BASECOORDX]
ld [hli], a
ld a, d
ld [hli], a
@@ -190,9 +190,9 @@ Func_417c7: ; 417c7 (10:57c7)
inc d
dec c
jr nz, .asm_417d1
- ld a, [W_BASECOORDX] ; wd081
+ ld a, [W_BASECOORDX]
add $8
- ld [W_BASECOORDX], a ; wd081
+ ld [W_BASECOORDX], a
pop bc
dec b
jr nz, .asm_417cc
@@ -236,9 +236,9 @@ Func_4180e: ; 4180e (10:580e)
.asm_4181d
push de
ld a, $2
- ld [W_BASECOORDX], a ; wd081
+ ld [W_BASECOORDX], a
xor a
- ld [W_BASECOORDY], a ; wd082
+ ld [W_BASECOORDY], a
ld c, $24
call Func_417ae
pop de
@@ -265,27 +265,27 @@ CopyTileIDsFromList_ZeroBaseTileID: ; 41842 (10:5842)
predef_jump CopyTileIDsFromList
Func_41849: ; 41849 (10:5849)
- predef Func_79869
+ predef GetMoveSoundB
ld a, b
jp PlaySound
LoadIntroGraphics: ; 41852 (10:5852)
- ld hl, FightIntroBackMon ; $5a99
+ ld hl, FightIntroBackMon
ld de, vChars2
ld bc, $600
ld a, BANK(FightIntroBackMon)
call FarCopyData2
- ld hl, GameFreakIntro ; $5959
+ ld hl, GameFreakIntro
ld de, vChars2 + $600
ld bc, $140
ld a, BANK(GameFreakIntro)
call FarCopyData2
- ld hl, GameFreakIntro ; $5959
+ ld hl, GameFreakIntro
ld de, vChars1
ld bc, $140
ld a, BANK(GameFreakIntro)
call FarCopyData2
- ld hl, FightIntroFrontMon ; $6099
+ ld hl, FightIntroFrontMon
ld de, vChars0
ld bc, $6c0
ld a, BANK(FightIntroFrontMon)
@@ -296,26 +296,26 @@ PlayShootingStar: ; 4188a (10:588a)
call GoPAL_SET
callba LoadCopyrightAndTextBoxTiles
ld a, $e4
- ld [rBGP], a ; $ff47
- ld c, $b4
+ ld [rBGP], a
+ ld c, 180
call DelayFrames
call ClearScreen
call DisableLCD
xor a
- ld [W_CUROPPONENT], a ; wd059
+ ld [W_CUROPPONENT], a
call Func_418e9
call LoadIntroGraphics
call EnableLCD
- ld hl, rLCDC ; $ff40
+ ld hl, rLCDC
res 5, [hl]
set 3, [hl]
- ld c, $40
+ ld c, 64
call DelayFrames
callba AnimateShootingStar
push af
pop af
jr c, .asm_418d0
- ld c, $28
+ ld c, 40
call DelayFrames
.asm_418d0
ld a, BANK(Music_IntroBattle)
diff --git a/engine/items/itemfinder.asm b/engine/items/itemfinder.asm
index d7e5b3ce..96abecd3 100755
--- a/engine/items/itemfinder.asm
+++ b/engine/items/itemfinder.asm
@@ -22,23 +22,23 @@ HiddenItemNear: ; 7481f (1d:481f)
inc hl
ld e, [hl]
inc hl
- jr nz, .asm_74824 ; 0x74845 $dd
+ jr nz, .asm_74824
ld a, [W_YCOORD]
call Func_7486b
cp d
- jr nc, .asm_74824 ; 0x7484e $d4
+ jr nc, .asm_74824
ld a, [W_YCOORD]
add $4
cp d
- jr c, .asm_74824 ; 0x74856 $cc
+ jr c, .asm_74824
ld a, [W_XCOORD]
call Func_7486b
cp e
- jr nc, .asm_74824 ; 0x7485f $c3
+ jr nc, .asm_74824
ld a, [W_XCOORD]
add $5
cp e
- jr c, .asm_74824 ; 0x74867 $bb
+ jr c, .asm_74824
scf
ret
diff --git a/engine/items/items.asm b/engine/items/items.asm
index 21e6e924..ea4b7403 100755
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -115,7 +115,7 @@ ItemUseBall: ; d687 (3:5687)
ld a,[W_NUMINBOX] ;is Box full?
cp a,MONS_PER_BOX
jp z,BoxFullCannotThrowBall
-.UseBall ;$56a7
+.UseBall
;ok, you can use a ball
xor a
ld [wd11c],a
@@ -126,7 +126,7 @@ ItemUseBall: ; d687 (3:5687)
; remove a Safari Ball from inventory
ld hl,W_NUMSAFARIBALLS
dec [hl]
-.skipSafariZoneCode ;$56b6
+.skipSafariZoneCode
call GoPAL_SET_CF1C
ld a,$43
ld [wd11e],a
@@ -144,8 +144,8 @@ ItemUseBall: ; d687 (3:5687)
ld de,wPlayerName
ld bc,11
call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno glitch)
- jp .BallSuccess ;$578b
-.notOldManBattle ;$56e9
+ jp .BallSuccess
+.notOldManBattle
ld a,[W_CURMAP]
cp a,POKEMONTOWER_6
jr nz,.loop
@@ -155,13 +155,13 @@ ItemUseBall: ; d687 (3:5687)
jp z,.next12
; if not fighting ghost Marowak, loop until a random number in the current
; pokeball's allowed range is found
-.loop ;$56fa
+.loop
call Random
ld b,a
ld hl,wcf91
ld a,[hl]
cp a,MASTER_BALL
- jp z,.BallSuccess ;$578b
+ jp z,.BallSuccess
cp a,POKE_BALL
jr z,.checkForAilments
ld a,200
@@ -173,7 +173,7 @@ ItemUseBall: ; d687 (3:5687)
ld a,150 ;get only numbers <= 150 for Ultra Ball
cp b
jr c,.loop
-.checkForAilments ;$571a
+.checkForAilments
; pokemon can be caught more easily with any (primary) status ailment
; Frozen/Asleep pokemon are relatively even easier to catch
; for Frozen/Asleep pokemon, any random number from 0-24 ensures a catch.
@@ -185,12 +185,12 @@ ItemUseBall: ; d687 (3:5687)
ld c,12
jr z,.notFrozenOrAsleep
ld c,25
-.notFrozenOrAsleep ;$5728
+.notFrozenOrAsleep
ld a,b
sub c
- jp c,.BallSuccess ;$578b
+ jp c,.BallSuccess
ld b,a
-.noAilments ;$572e
+.noAilments
push bc ;save RANDOM number
xor a
ld [H_MULTIPLICAND],a
@@ -207,7 +207,7 @@ ItemUseBall: ; d687 (3:5687)
ld a,12 ;any other BallFactor
jr nz,.next7
ld a,8
-.next7 ;$574d
+.next7
ld [H_DIVISOR],a
ld b,4 ; number of bytes in dividend
call Divide
@@ -226,7 +226,7 @@ ItemUseBall: ; d687 (3:5687)
and a
jr nz,.next8
inc a
-.next8 ;$5766
+.next8
ld [H_DIVISOR],a
ld b,4
call Divide ; ((MaxHP * 255) / BallFactor) / (CurHP / 4)
@@ -235,7 +235,7 @@ ItemUseBall: ; d687 (3:5687)
jr z,.next9
ld a,255
ld [H_QUOTIENT + 3],a
-.next9 ;$5776
+.next9
pop bc
ld a,[wEnemyMonCatchRate] ;enemy: Catch Rate
cp b
@@ -248,9 +248,9 @@ ItemUseBall: ; d687 (3:5687)
ld a,[H_QUOTIENT + 3]
cp b
jr c,.next10
-.BallSuccess ;$578b
+.BallSuccess
jr .BallSuccess2
-.next10 ;$578d
+.next10
ld a,[H_QUOTIENT + 3]
ld [wd11e],a
xor a
@@ -271,7 +271,7 @@ ItemUseBall: ; d687 (3:5687)
ld b,150
cp a,ULTRA_BALL
jr z,.next11
-.next11 ;$57b8
+.next11
ld a,b
ld [H_DIVISOR],a
ld b,4
@@ -294,11 +294,11 @@ ItemUseBall: ; d687 (3:5687)
ld b,5
jr z,.next14
ld b,10
-.next14 ;$57e6
+.next14
ld a,[H_QUOTIENT + 3]
add b
ld [H_QUOTIENT + 3],a
-.next13 ;$57eb
+.next13
ld a,[H_QUOTIENT + 3]
cp a,10
ld b,$20
@@ -310,10 +310,10 @@ ItemUseBall: ; d687 (3:5687)
ld b,$62
jr c,.next12
ld b,$63
-.next12 ;$5801
+.next12
ld a,b
ld [wd11e],a
-.BallSuccess2 ;$5805
+.BallSuccess2
ld c,20
call DelayFrames
ld a,TOSS_ANIM
@@ -362,14 +362,14 @@ ItemUseBall: ; d687 (3:5687)
ld a,$4c
ld [wEnemyMonSpecies2],a
jr .next16
-.next15 ;$5871
+.next15
set Transformed,[hl]
ld hl,wcceb
ld a,[wEnemyMonDVs]
ld [hli],a
ld a,[wEnemyMonDVs + 1]
ld [hl],a
-.next16 ;$587e
+.next16
ld a,[wcf91]
push af
ld a,[wEnemyMonSpecies2]
@@ -419,7 +419,7 @@ ItemUseBall: ; d687 (3:5687)
ld a,[wEnemyMonSpecies] ;caught mon_ID
ld [wd11e],a
predef ShowPokedexData
-.checkParty ;$58f4
+.checkParty
ld a,[wPartyCount]
cp a,PARTY_LENGTH ;is party full?
jr z,.sendToBox
@@ -428,7 +428,7 @@ ItemUseBall: ; d687 (3:5687)
call ClearSprites
call AddPartyMon ;add mon to Party
jr .End
-.sendToBox ;$5907
+.sendToBox
call ClearSprites
call SendNewMonToBox
ld hl,ItemUseBallText07
@@ -436,22 +436,22 @@ ItemUseBall: ; d687 (3:5687)
bit 0,a ;already met Bill?
jr nz,.sendToBox2
ld hl,ItemUseBallText08
-.sendToBox2 ;$591a
+.sendToBox2
call PrintText
jr .End
-.printText1 ;$591f
+.printText1
ld hl,ItemUseBallText05
-.printText0 ;$5922
+.printText0
call PrintText
call ClearSprites
-.End ;$5928
+.End
ld a,[W_BATTLETYPE]
and a
ret nz
ld hl,wNumBagItems
inc a
ld [wcf96],a
- jp RemoveItemFromInventory ;remove ITEM (XXX)
+ jp RemoveItemFromInventory
ItemUseBallText00: ; d937 (3:5937)
;"It dodged the thrown ball!"
;"This pokemon can't be caught"
@@ -645,8 +645,8 @@ ItemUseEvoStone: ; da5b (3:5a5b)
ld a,$01
ld [wccd4],a
ld a,(SFX_02_3e - SFX_Headers_02) / 3
- call PlaySoundWaitForCurrent ; play sound
- call WaitForSoundToFinish ; wait for sound to end
+ call PlaySoundWaitForCurrent
+ call WaitForSoundToFinish
callab TryEvolvingMon ; try to evolve pokemon
ld a,[wd121]
and a
@@ -918,7 +918,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld bc,2 * 20
call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled
ld a,(SFX_02_3d - SFX_Headers_02) / 3
- call PlaySoundWaitForCurrent ; play sound
+ call PlaySoundWaitForCurrent
ld a,[hFlags_0xFFF6]
set 0,a
ld [hFlags_0xFFF6],a
@@ -1068,7 +1068,7 @@ ItemUseMedicine: ; dabb (3:5abb)
cp a,FULL_HEAL
jr z,.playStatusAilmentCuringSound
ld a,(SFX_02_3d - SFX_Headers_02) / 3 ; HP healing sound
- call PlaySoundWaitForCurrent ; play sound
+ call PlaySoundWaitForCurrent
ld a,[hFlags_0xFFF6]
set 0,a
ld [hFlags_0xFFF6],a
@@ -1179,7 +1179,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld bc,10
call CopyData ; copy the stat's name to wcf4b
ld a,(SFX_02_3e - SFX_Headers_02) / 3
- call PlaySound ; play sound
+ call PlaySound
ld hl,VitaminStatRoseText
call PrintText
jp RemoveUsedItem
@@ -1722,7 +1722,7 @@ PlayedFluteHadEffectText: ; e215 (3:6215)
call PlaySound ; turn off music
ld a, (SFX_02_5e - SFX_Headers_02) / 3
ld c, BANK(SFX_02_5e)
- call PlayMusic ; play music
+ call PlayMusic
.musicWaitLoop ; wait for music to finish playing
ld a,[wc028]
cp a,$b8
@@ -1747,7 +1747,7 @@ OldRodCode: ; e24c (3:624c)
jp c, ItemUseNotTime
ld bc, (5 << 8) | MAGIKARP
ld a, $1 ; set bite
- jr RodResponse ; 0xe257 $34
+ jr RodResponse
GoodRodCode: ; e259 (3:6259)
call FishingInit
@@ -1780,7 +1780,7 @@ INCLUDE "data/good_rod.asm"
SuperRodCode: ; e283 (3:6283)
call FishingInit
jp c, ItemUseNotTime
- call ReadSuperRodData ; 0xe8ea
+ call ReadSuperRodData
ld a, e
RodResponse: ; e28d (3:628d)
ld [wWhichTrade], a
@@ -1825,7 +1825,7 @@ FishingInit: ; e2b4 (3:62b4)
ld hl,ItemUseText00
call PrintText
ld a,(SFX_02_3e - SFX_Headers_02) / 3
- call PlaySound ; play sound
+ call PlaySound
ld c,80
call DelayFrames
and a
@@ -1848,9 +1848,9 @@ ItemUseItemfinder: ; e2e1 (3:62e1)
ld c,4
.loop
ld a,(SFX_02_4a - SFX_Headers_02) / 3
- call PlaySoundWaitForCurrent ; play sound
+ call PlaySoundWaitForCurrent
ld a,(SFX_02_5a - SFX_Headers_02) / 3
- call PlaySoundWaitForCurrent ; play sound
+ call PlaySoundWaitForCurrent
dec c
jr nz,.loop
ld hl,ItemfinderFoundItemText
@@ -2147,7 +2147,7 @@ ItemUseTMHM: ; e479 (3:6479)
jr nz,.checkIfAlreadyLearnedMove
; if the pokemon can't learn the move
ld a,(SFX_02_51 - SFX_Headers_02) / 3
- call PlaySoundWaitForCurrent ; play sound
+ call PlaySoundWaitForCurrent
ld hl,MonCannotLearnMachineMoveText
call PrintText
jr .chooseMon
@@ -2187,7 +2187,7 @@ PrintItemUseTextAndRemoveItem: ; e563 (3:6563)
ld hl,ItemUseText00
call PrintText
ld a,(SFX_02_3e - SFX_Headers_02) / 3
- call PlaySound ; play sound
+ call PlaySound
call WaitForTextScrollButtonPress ; wait for button press
RemoveUsedItem: ; e571 (3:6571)
@@ -2568,7 +2568,7 @@ IsKeyItem_: ; e764 (3:6764)
INCLUDE "data/key_items.asm"
SendNewMonToBox: ; e7a4 (3:67a4)
- ld de, W_NUMINBOX ; wda80
+ ld de, W_NUMINBOX
ld a, [de]
inc a
ld [de], a
@@ -2587,7 +2587,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
call GetMonHeader
ld hl, wBoxMonOT
ld bc, $b
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
dec a
jr z, .asm_e7ee
dec a
@@ -2598,7 +2598,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
ld d, h
ld e, l
pop hl
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
dec a
ld b, a
.asm_e7db
@@ -2615,11 +2615,11 @@ SendNewMonToBox: ; e7a4 (3:67a4)
dec b
jr nz, .asm_e7db
.asm_e7ee
- ld hl, wPlayerName ; wd158
+ ld hl, wPlayerName
ld de, wBoxMonOT
ld bc, $b
call CopyData
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
dec a
jr z, .asm_e82a
ld hl, wBoxMonNicks
@@ -2632,7 +2632,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
ld d, h
ld e, l
pop hl
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
dec a
ld b, a
.asm_e817
@@ -2653,7 +2653,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
ld a, $2
ld [wd07d], a
predef AskName
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
dec a
jr z, .asm_e867
ld hl, wBoxMons
@@ -2666,7 +2666,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
ld d, h
ld e, l
pop hl
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
dec a
ld b, a
.asm_e854
@@ -2683,13 +2683,13 @@ SendNewMonToBox: ; e7a4 (3:67a4)
dec b
jr nz, .asm_e854
.asm_e867
- ld a, [wEnemyMonLevel] ; wEnemyMonLevel
+ ld a, [wEnemyMonLevel]
ld [wEnemyMonBoxLevel], a
ld hl, wEnemyMon
ld de, wBoxMon1
ld bc, $c
call CopyData
- ld hl, wPlayerID ; wPlayerID
+ ld hl, wPlayerID
ld a, [hli]
ld [de], a
inc de
@@ -2697,11 +2697,11 @@ SendNewMonToBox: ; e7a4 (3:67a4)
ld [de], a
inc de
push de
- ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL
+ ld a, [W_CURENEMYLVL]
ld d, a
callab CalcExperience
pop de
- ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND)
+ ld a, [H_NUMTOPRINT] ; (aliases: H_MULTIPLICAND)
ld [de], a
inc de
ld a, [$ff97]
@@ -2723,7 +2723,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
inc de
ld a, [hli]
ld [de], a
- ld hl, wEnemyMonPP ; wcffe
+ ld hl, wEnemyMonPP
ld b, $4
.asm_e8b1
ld a, [hli]
@@ -2777,7 +2777,7 @@ ReadSuperRodData: ; e8ea (3:68ea)
ld e, $2 ; $2 if no fishing groups found
ret
-.ReadFishingGroup ; 0xe8f6
+.ReadFishingGroup
; hl points to the fishing group entry in the index
inc hl ; skip map id
@@ -2790,7 +2790,7 @@ ReadSuperRodData: ; e8ea (3:68ea)
inc hl ; point to data
ld e, $0 ; no bite yet
-.RandomLoop ; 0xe90c
+.RandomLoop
call Random
srl a
ret c ; 50% chance of no battle
diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm
index 7c5c56fa..4decc82d 100755
--- a/engine/items/tm_prices.asm
+++ b/engine/items/tm_prices.asm
@@ -6,7 +6,7 @@ GetMachinePrice: ; 7bf86 (1e:7f86)
sub TM_01
ret c
ld d, a
- ld hl, TechnicalMachinePrices ; $7fa7
+ ld hl, TechnicalMachinePrices
srl a
ld c, a
ld b, 0
@@ -17,9 +17,9 @@ GetMachinePrice: ; 7bf86 (1e:7f86)
swap a
.highNybbleIsPrice
and $f0
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
xor a
- ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
+ ld [H_DOWNARROWBLINKCNT1], a
ld [$ff8d], a
ret
diff --git a/engine/learn_move.asm b/engine/learn_move.asm
index 75056edb..3c7663b2 100755
--- a/engine/learn_move.asm
+++ b/engine/learn_move.asm
@@ -206,7 +206,7 @@ TryingToLearnText: ; 6fc3 (1:6fc3)
OneTwoAndText: ; 6fc8 (1:6fc8)
TX_FAR _OneTwoAndText
db $a
- db $8
+ TX_ASM
ld a, (SFX_02_58 - SFX_Headers_02) / 3
call PlaySoundWaitForCurrent
ld hl, PoofText
diff --git a/engine/load_pokedex_tiles.asm b/engine/load_pokedex_tiles.asm
index e8205ef8..5c1f1c93 100755
--- a/engine/load_pokedex_tiles.asm
+++ b/engine/load_pokedex_tiles.asm
@@ -1,11 +1,11 @@
; Loads tile patterns for tiles used in the pokedex.
LoadPokedexTilePatterns: ; 17840 (5:7840)
call LoadHpBarAndStatusTilePatterns
- ld de,PokedexTileGraphics ; $6488
+ ld de,PokedexTileGraphics
ld hl,vChars2 + $600
ld bc,(BANK(PokedexTileGraphics) << 8) + $12
call CopyVideoData
- ld de,PokeballTileGraphics ; $697e
+ ld de,PokeballTileGraphics
ld hl,vChars2 + $720
ld bc,(BANK(PokeballTileGraphics) << 8) + $01
jp CopyVideoData ; load pokeball tile for marking caught mons
diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm
index 61e6204e..c9dd41b1 100644
--- a/engine/menu/bills_pc.asm
+++ b/engine/menu/bills_pc.asm
@@ -357,7 +357,7 @@ BoxNoPCText: ; 21713 (8:5713)
Func_2171b:: ; 2171b (8:571b)
ld hl, wPartyMon1Moves
ld bc, wPartyMon2 - wPartyMon1
- jr .asm_21729 ; 0x21721 $6
+ jr .asm_21729
ld hl, wBoxMon1Moves
ld bc, wBoxMon2 - wBoxMon1
.asm_21729
@@ -375,7 +375,7 @@ Func_2171b:: ; 2171b (8:571b)
pop hl
ret c
dec b
- jr nz, .asm_21731 ; 0x21741 $ee
+ jr nz, .asm_21731
and a
ret
@@ -523,8 +523,7 @@ CableClubLeftGameboy:: ; 5824 (8:5825)
.asm_2183a
ld [wLinkState], a
call EnableAutoTextBoxDrawing
- ld a, $22 ; JustAMomentText
- jp PrintPredefTextID
+ tx_pre_jump JustAMomentText
CableClubRightGameboy:: ; 5845 (8:5845)
ld a, [hSerialConnectionStatus]
@@ -541,8 +540,7 @@ CableClubRightGameboy:: ; 5845 (8:5845)
.asm_2185a
ld [wLinkState], a
call EnableAutoTextBoxDrawing
- ld a, $22 ; JustAMomentText
- jp PrintPredefTextID
+ tx_pre_jump JustAMomentText
JustAMomentText:: ; 21865 (8:5865)
TX_FAR _JustAMomentText
@@ -552,9 +550,8 @@ JustAMomentText:: ; 21865 (8:5865)
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
- ld a, $23
- jp PrintPredefTextID
+ tx_pre_jump OpenBillsPCText
-PredefText23:: ; 21878 (8:5878)
+OpenBillsPCText:: ; 21878 (8:5878)
db $FD ; FuncTX_BillsPC
diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm
index 1624ed70..067cd7d2 100755
--- a/engine/menu/diploma.asm
+++ b/engine/menu/diploma.asm
@@ -7,7 +7,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
ld hl, wd730
set 6, [hl]
call DisableLCD
- ld hl, CircleTile ; $7d88
+ ld hl, CircleTile
ld de, vChars2 + $700
ld bc, $0010
ld a, BANK(CircleTile)
@@ -15,7 +15,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
ld hl, wTileMap
ld bc, $1012
predef Diploma_TextBoxBorder
- ld hl, DiplomaTextPointersAndCoords ; $6784
+ ld hl, DiplomaTextPointersAndCoords
ld c, $5
.asm_56715
push bc
@@ -32,7 +32,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
inc hl
pop bc
dec c
- jr nz, .asm_56715 ; 0x56725 $ee
+ jr nz, .asm_56715
hlCoord 10, 4
ld de, wPlayerName
call PlaceString
@@ -48,7 +48,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
ld [hli], a
inc hl
dec c
- jr nz, .asm_5673e ; 0x56747 $f5
+ jr nz, .asm_5673e
call EnableLCD
callba LoadTrainerInfoTextBoxTiles
ld b, $8
@@ -73,7 +73,7 @@ Func_56777: ; 56777 (15:6777)
cp $50
ret z
dec c
- jr .asm_5677d ; 0x56782 $f9
+ jr .asm_5677d
DiplomaTextPointersAndCoords: ; 56784 (15:6784)
dw DiplomaText
diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm
index 756c7755..f0628367 100755
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -52,7 +52,7 @@ MainMenu: ; 5af2 (1:5af2)
.next2
ld hl,wd730
res 6,[hl]
- call UpdateSprites ; OAM?
+ call UpdateSprites
xor a
ld [wCurrentMenuItem],a
ld [wLastMenuItem],a
@@ -208,7 +208,7 @@ LinkMenu: ; 5c0a (1:5c0a)
ld a, b
ld [wLinkMenuSelectionSendBuffer], a
and $3
- ld [wCurrentMenuItem], a ; wCurrentMenuItem
+ ld [wCurrentMenuItem], a
.doneChoosingMenuSelection
ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
@@ -261,14 +261,14 @@ LinkMenu: ; 5c0a (1:5c0a)
ld [wd72d], a
ld hl, PleaseWaitText
call PrintText
- ld c, $32
+ ld c, 50
call DelayFrames
ld hl, wd732
res 1, [hl]
ld a, [W_ANIMATIONID]
ld [wDestinationMap], a
call SpecialWarpIn
- ld c, $14
+ ld c, 20
call DelayFrames
xor a
ld [wMenuJoypadPollCount], a
@@ -304,7 +304,7 @@ Func_5d52: ; 5d52 (1:5d52)
ld hl, wd732
res 1, [hl]
call OakSpeech
- ld c, $14
+ ld c, 20
call DelayFrames
; enter map after using a special warp or loading the game from the main menu
@@ -338,7 +338,7 @@ TradeCenterText: ; 5d97 (1:5d97)
ContinueGame: ; 5db5 (1:5db5)
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
hlCoord 4, 7
ld b, $8
ld c, $e
@@ -347,7 +347,7 @@ ContinueGame: ; 5db5 (1:5db5)
ld de, SaveScreenInfoText
call PlaceString
hlCoord 12, 9
- ld de, wPlayerName ; wd158
+ ld de, wPlayerName
call PlaceString
hlCoord 17, 11
call Func_5e2f
@@ -356,8 +356,8 @@ ContinueGame: ; 5db5 (1:5db5)
hlCoord 13, 15
call Func_5e55
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
- ld c, $1e
+ ld [H_AUTOBGTRANSFERENABLED], a
+ ld c, 30
jp DelayFrames
PrintSaveScreenText: ; 5def (1:5def)
@@ -383,7 +383,7 @@ PrintSaveScreenText: ; 5def (1:5def)
call Func_5e55
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
- ld c, $1e
+ ld c, 30
jp DelayFrames
Func_5e2f: ; 5e2f (1:5e2f)
@@ -398,7 +398,7 @@ Func_5e2f: ; 5e2f (1:5e2f)
Func_5e42: ; 5e42 (1:5e42)
push hl
- ld hl, wPokedexOwned ; wPokedexOwned
+ ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
pop hl
@@ -481,7 +481,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a)
jr nz,.loop
.exitMenu
ld a,(SFX_02_40 - SFX_Headers_02) / 3
- call PlaySound ; play sound
+ call PlaySound
ret
.eraseOldMenuCursor
ld [wTopMenuItemX],a
diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm
index df862d69..bd1c39dd 100755
--- a/engine/menu/naming_screen.asm
+++ b/engine/menu/naming_screen.asm
@@ -195,7 +195,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
.asm_667e
pop de
- ld de, .asm_65ed ; $65ed
+ ld de, .asm_65ed
push de
.asm_6683
ld a, [wHPBarOldHP]
@@ -231,10 +231,10 @@ DisplayNamingScreen: ; 6596 (1:6596)
call CalcStringLength
ld a, [wHPBarNewHP]
cp $e5
- ld de, Dakutens ; $6885
+ ld de, Dakutens
jr z, .asm_66e3
cp $e4
- ld de, Handakutens ; $68d6
+ ld de, Handakutens
jr z, .asm_66e3
ld a, [wd07d]
cp $2
@@ -332,12 +332,12 @@ ED_Tile: ; 6767 (1:6767)
PrintAlphabet: ; 676f (1:676f)
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ld a, [wHPBarOldHP]
and a
- ld de, LowerCaseAlphabet ; $679e
+ ld de, LowerCaseAlphabet
jr nz, .asm_677e
- ld de, UpperCaseAlphabet ; $67d6
+ ld de, UpperCaseAlphabet
.asm_677e
hlCoord 2, 5
ld bc, $509
@@ -357,7 +357,7 @@ PrintAlphabet: ; 676f (1:676f)
jr nz, .asm_6784
call PlaceString
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
jp Delay3
LowerCaseAlphabet: ; 679e (1:679e)
diff --git a/engine/menu/oaks_pc.asm b/engine/menu/oaks_pc.asm
index 6e7edda2..7ff03c46 100755
--- a/engine/menu/oaks_pc.asm
+++ b/engine/menu/oaks_pc.asm
@@ -5,7 +5,7 @@ OpenOaksPC: ; 1e915 (7:6915)
ld hl, GetDexRatedText
call PrintText
call YesNoChoice
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
and a
jr nz, .asm_1e932
predef DisplayDexRating
diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm
index 242edd40..6b365e2b 100755
--- a/engine/menu/party_menu.asm
+++ b/engine/menu/party_menu.asm
@@ -21,7 +21,7 @@ DrawPartyMenu_: ; 12cd2 (4:6cd2)
xor a
ld [H_AUTOBGTRANSFERENABLED],a
call ClearScreen
- call UpdateSprites ; move sprites
+ call UpdateSprites
callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
RedrawPartyMenu_: ; 12ce3 (4:6ce3)
diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm
index 97895ca6..edc8a751 100755
--- a/engine/menu/pc.asm
+++ b/engine/menu/pc.asm
@@ -1,13 +1,13 @@
ActivatePC: ; 17e2c (5:7e2c)
- call SaveScreenTilesToBuffer2 ;XXX: copy background from wTileMap to wTileMapBackup2
+ call SaveScreenTilesToBuffer2
ld a, (SFX_02_45 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
+ call PlaySound
ld hl, TurnedOnPC1Text
call PrintText
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ call WaitForSoundToFinish
ld hl, wFlags_0xcd60
set 3, [hl]
- call LoadScreenTilesFromBuffer2 ;XXX: restore saved screen
+ call LoadScreenTilesFromBuffer2
call Delay3
PCMainMenu: ; 17e48 (5:7e48)
callba Func_213c8
@@ -52,28 +52,28 @@ PCMainMenu: ; 17e48 (5:7e48)
res 5, [hl]
set 3, [hl]
ld a, (SFX_02_47 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ call PlaySound
+ call WaitForSoundToFinish
ld hl, AccessedMyPCText
call PrintText
callba PlayerPC
jr ReloadMainMenu
OaksPC: ; 17ec0 (5:7ec0)
ld a, (SFX_02_47 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ call PlaySound
+ call WaitForSoundToFinish
callba OpenOaksPC
jr ReloadMainMenu
PKMNLeague: ; 17ed2 (5:7ed2)
ld a, (SFX_02_47 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ call PlaySound
+ call WaitForSoundToFinish
callba PKMNLeaguePC
jr ReloadMainMenu
BillsPC: ; 17ee4 (5:7ee4)
ld a, (SFX_02_47 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ call PlaySound
+ call WaitForSoundToFinish
ld a, [wd7f1] ;has to do with having met Bill
bit 0, a
jr nz, .billsPC ;if you've met bill, use that bill's instead of someone's
@@ -88,12 +88,12 @@ ReloadMainMenu: ; 17f06 (5:7f06)
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
call ReloadMapData
- call UpdateSprites ;XXX: moves sprites
+ call UpdateSprites
jp PCMainMenu
LogOff: ; 17f13 (5:7f13)
ld a, (SFX_02_46 - SFX_Headers_02) / 3
- call PlaySound ;XXX: play sound or stop music
- call WaitForSoundToFinish ;XXX: wait for sound to be done
+ call PlaySound
+ call WaitForSoundToFinish
ld hl, wFlags_0xcd60
res 3, [hl]
res 5, [hl]
@@ -117,7 +117,7 @@ AccessedMyPCText: ; 17f32 (5:7f32)
; removes one of the specified item ID [$FFdb] from bag (if existent)
RemoveItemByID: ; 17f37 (5:7f37)
- ld hl, wBagItems ; wd31e
+ ld hl, wBagItems
ld a, [$ffdb]
ld b, a
xor a
@@ -137,6 +137,6 @@ RemoveItemByID: ; 17f37 (5:7f37)
ld a, $1
ld [wcf96], a
ld a, [$ffdc]
- ld [wWhichPokemon], a ; wWhichPokemon
- ld hl, wNumBagItems ; wNumBagItems
+ ld [wWhichPokemon], a
+ ld hl, wNumBagItems
jp RemoveItemFromInventory
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
index 4351ae4c..e2e53d45 100755
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -1,7 +1,7 @@
ShowPokedexMenu: ; 40000 (10:4000)
call GBPalWhiteOut
call ClearScreen
- call UpdateSprites ; move sprites
+ call UpdateSprites
ld a,[wListScrollOffset]
push af
xor a
@@ -140,7 +140,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
.choseCry
ld a,[wd11e]
call GetCryData ; get cry data
- call PlaySound ; play sound
+ call PlaySound
jr .handleMenuInput
.choseArea
predef LoadTownMap_Nest ; display pokemon areas
@@ -573,8 +573,8 @@ HeightWeightText: ; 40448 (10:4448)
db "HT ?",$60,"??",$61,$4E,"WT ???lb@"
; XXX does anything point to this?
-Unknown_4045D: ; 4045d (10:445d)
- db $54,$50
+PokeText: ; 4045d (10:445d)
+ db "#@"
; horizontal line that divides the pokedex text description from the rest of the data
PokedexDataDividerLine: ; 4045f (10:445f)
diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm
index 0e904200..d12308f8 100755
--- a/engine/menu/prize_menu.asm
+++ b/engine/menu/prize_menu.asm
@@ -79,7 +79,7 @@ GetPrizeMenuId: ; 5278e (14:678e)
inc hl
push hl
ld hl,W_PRIZE1
- call CopyString ; XXX what does this do
+ call CopyString
pop hl
ld a,[hli]
ld h,[hl]
@@ -152,7 +152,7 @@ PrintPrizePrice: ; 5287a (14:687a)
ld b,$01
ld c,$07
call TextBoxBorder
- call UpdateSprites ; XXX save OAM?
+ call UpdateSprites
hlCoord 12, 0
ld de,.CoinText
call PlaceString
diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm
index da17822b..0db0d052 100755
--- a/engine/menu/start_menu.asm
+++ b/engine/menu/start_menu.asm
@@ -1,7 +1,7 @@
DisplayStartMenu:: ; 2acd (0:2acd)
- ld a,$04 ; hardcoded Bank, not sure what's it refers to
+ ld a,BANK(StartMenu_Pokedex)
ld [H_LOADEDROMBANK],a
- ld [$2000],a ; ROM bank 4
+ ld [MBC1RomBank],a
ld a,[wWalkBikeSurfState] ; walking/biking/surfing
ld [wWalkBikeSurfStateCopy],a
ld a, (SFX_02_3f - SFX_Headers_02) / 3 ; Start menu sound
@@ -10,7 +10,7 @@ DisplayStartMenu:: ; 2acd (0:2acd)
RedisplayStartMenu:: ; 2adf (0:2adf)
callba DrawStartMenu
callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
- call UpdateSprites ; move sprites
+ call UpdateSprites
.loop
call HandleMenuInput
ld b,a
diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm
index 589224ab..b84657d5 100755
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -325,7 +325,7 @@ StartMenu_Item: ; 13302 (4:7302)
.exitMenu
call LoadScreenTilesFromBuffer2 ; restore saved screen
call LoadTextBoxTilePatterns
- call UpdateSprites ; move sprites
+ call UpdateSprites
jp RedisplayStartMenu
.choseItem
; erase menu cursor (blank each tile in front of an item name)
@@ -499,7 +499,7 @@ UsableItems_CloseMenu: ; 13459 (4:7459)
StartMenu_TrainerInfo: ; 13460 (4:7460)
call GBPalWhiteOut
call ClearScreen
- call UpdateSprites ; move sprites
+ call UpdateSprites
ld a,[hTilesetType]
push af
xor a
@@ -535,25 +535,25 @@ DrawTrainerInfo: ; 1349a (4:749a)
ld de,vChars2
ld bc,$70 * 4
call CopyData
- ld hl,TrainerInfoTextBoxTileGraphics ; $7b98 ; trainer info text box tile patterns
+ ld hl,TrainerInfoTextBoxTileGraphics ; trainer info text box tile patterns
ld de,vChars2 + $770
ld bc,$0080
push bc
call TrainerInfo_FarCopyData
- ld hl,BlankLeaderNames ; $7c28
+ ld hl,BlankLeaderNames
ld de,vChars2 + $600
ld bc,$0170
call TrainerInfo_FarCopyData
pop bc
- ld hl,BadgeNumbersTileGraphics ; $7d98 ; badge number tile patterns
+ ld hl,BadgeNumbersTileGraphics ; badge number tile patterns
ld de,vChars1 + $580
call TrainerInfo_FarCopyData
- ld hl,GymLeaderFaceAndBadgeTileGraphics ; $6a9e ; gym leader face and badge tile patterns
+ ld hl,GymLeaderFaceAndBadgeTileGraphics ; gym leader face and badge tile patterns
ld de,vChars2 + $200
ld bc,$0400
ld a,$03
call FarCopyData2
- ld hl,TextBoxGraphics ; $6288
+ ld hl,TextBoxGraphics
ld de,$00d0
add hl,de ; hl = colon tile pattern
ld de,vChars1 + $560
@@ -562,7 +562,7 @@ DrawTrainerInfo: ; 1349a (4:749a)
push bc
call FarCopyData2
pop bc
- ld hl,TrainerInfoTextBoxTileGraphics + $80 ; $7c18 ; background tile pattern
+ ld hl,TrainerInfoTextBoxTileGraphics + $80 ; background tile pattern
ld de,vChars1 + $570
call TrainerInfo_FarCopyData
call EnableLCD
@@ -705,9 +705,9 @@ StartMenu_Option: ; 135f6 (4:75f6)
SwitchPartyMon: ; 13613 (4:7613)
call SwitchPartyMon_Stats
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
call SwitchPartyMon_OAM
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
call SwitchPartyMon_OAM
jp RedrawPartyMenu_
@@ -741,7 +741,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld a, [wMenuItemToSwap]
and a
jr nz, .asm_13661
- ld a, [wWhichPokemon] ; wWhichPokemon
+ ld a, [wWhichPokemon]
inc a
ld [wMenuItemToSwap], a
ret
@@ -751,8 +751,8 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld a, [wMenuItemToSwap]
dec a
ld b, a
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
- ld [wWhichTrade], a ; wWhichTrade
+ ld a, [wCurrentMenuItem]
+ ld [wWhichTrade], a
cp b
jr nz, .asm_1367b
xor a
@@ -767,7 +767,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld hl, wPartySpecies
ld d, h
ld e, l
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
add l
ld l, a
jr nc, .asm_1368e
@@ -780,14 +780,14 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
inc d
.asm_13696
ld a, [hl]
- ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld [H_DIVIDEND], a ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ld a, [de]
ld [hl], a
- ld a, [H_DIVIDEND] ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld a, [H_DIVIDEND] ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ld [de], a
ld hl, wPartyMons
ld bc, wPartyMon2 - wPartyMon1
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
call AddNTimes
push hl
ld de, wSwitchPartyMonTempBuffer
@@ -805,14 +805,14 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld hl, wSwitchPartyMonTempBuffer
ld bc, $2c
call CopyData
- ld hl, wPartyMonOT ; wd273
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld hl, wPartyMonOT
+ ld a, [wCurrentMenuItem]
call SkipFixedLengthTextEntries
push hl
ld de, wSwitchPartyMonTempBuffer
ld bc, $b
call CopyData
- ld hl, wPartyMonOT ; wd273
+ ld hl, wPartyMonOT
ld a, [wMenuItemToSwap]
call SkipFixedLengthTextEntries
pop de
@@ -823,14 +823,14 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld hl, wSwitchPartyMonTempBuffer
ld bc, $b
call CopyData
- ld hl, wPartyMonNicks ; wPartyMonNicks
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld hl, wPartyMonNicks
+ ld a, [wCurrentMenuItem]
call SkipFixedLengthTextEntries
push hl
ld de, wSwitchPartyMonTempBuffer
ld bc, $b
call CopyData
- ld hl, wPartyMonNicks ; wPartyMonNicks
+ ld hl, wPartyMonNicks
ld a, [wMenuItemToSwap]
call SkipFixedLengthTextEntries
pop de
@@ -842,7 +842,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld bc, $b
call CopyData
ld a, [wMenuItemToSwap]
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
xor a
ld [wMenuItemToSwap], a
ld [wd07d], a
diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm
index b5254694..c9261804 100755
--- a/engine/menu/status_screen.asm
+++ b/engine/menu/status_screen.asm
@@ -67,7 +67,7 @@ StatusScreen: ; 12953 (4:6953)
call LoadMonData
ld a, [wcc49]
cp $2 ; 2 means we're in a PC box
- jr c, .DontRecalculate ; 0x1295b $14
+ jr c, .DontRecalculate
ld a, [wLoadedMonBoxLevel]
ld [wLoadedMonLevel], a
ld [W_CURENEMYLVL], a
@@ -82,17 +82,17 @@ StatusScreen: ; 12953 (4:6953)
ld [$ff24], a ; Reduce the volume
call GBPalWhiteOutWithDelay3
call ClearScreen
- call UpdateSprites ; move sprites (?)
+ call UpdateSprites
call LoadHpBarAndStatusTilePatterns
- ld de, BattleHudTiles1 ; $6080 ; source
+ ld de, BattleHudTiles1 ; source
ld hl, vChars2 + $6d0 ; dest
ld bc, (BANK(BattleHudTiles1) << 8) + $03 ; bank bytes/8
call CopyVideoDataDouble ; ·│ :L and halfarrow line end
- ld de, BattleHudTiles2 ; $6098
+ ld de, BattleHudTiles2
ld hl, vChars2 + $780
ld bc, (BANK(BattleHudTiles2) << 8) + $01
call CopyVideoDataDouble ; │
- ld de, BattleHudTiles3 ; $60b0
+ ld de, BattleHudTiles3
ld hl, vChars2 + $760
ld bc, (BANK(BattleHudTiles3) << 8) + $02
call CopyVideoDataDouble ; ─┘
@@ -127,7 +127,7 @@ StatusScreen: ; 12953 (4:6953)
hlCoord 16, 6
ld de, wLoadedMonStatus
call PrintStatusCondition
- jr nz, .StatusWritten ; 0x129fc $9
+ jr nz, .StatusWritten
hlCoord 16, 6
ld de, OKText
call PlaceString ; "OK"
@@ -147,14 +147,14 @@ StatusScreen: ; 12953 (4:6953)
call PrintNumber ; Pokémon no.
hlCoord 11, 10
predef PrintMonType
- ld hl, NamePointers2 ; $6a9d
- call .unk_12a7e
+ ld hl, NamePointers2
+ call .asm_12a7e
ld d, h
ld e, l
hlCoord 9, 1
call PlaceString ; Pokémon name
- ld hl, OTPointers ; $6a95
- call .unk_12a7e
+ ld hl, OTPointers
+ call .asm_12a7e
ld d, h
ld e, l
hlCoord 12, 16
@@ -175,7 +175,7 @@ StatusScreen: ; 12953 (4:6953)
pop af
ld [hTilesetType], a
ret
-.unk_12a7e ; 0x12a7e ; I don't know what this does, iterates over pointers?
+.asm_12a7e ; I don't know what this does, iterates over pointers?
ld a, [wcc49]
add a
ld c, a
@@ -221,20 +221,20 @@ OKText: ; 12ac4 (4:6ac4)
db "OK@"
; Draws a line starting from hl high b and wide c
-DrawLineBox ; 0x12ac7
+DrawLineBox: ; 0x12ac7
ld de, $0014 ; New line
.PrintVerticalLine
ld [hl], $78 ; │
add hl, de
dec b
- jr nz, .PrintVerticalLine ; 0x12ace $fa
+ jr nz, .PrintVerticalLine
ld [hl], $77 ; ┘
dec hl
.PrintHorizLine
ld [hl], $76 ; ─
dec hl
dec c
- jr nz, .PrintHorizLine ; 0x12ad7 $fa
+ jr nz, .PrintHorizLine
ld [hl], $6f ; ← (halfarrow ending)
ret
@@ -244,14 +244,14 @@ PTile: ; 12adc (4:6adc) ; This is a single 1bpp "P" tile
PrintStatsBox: ; 12ae4 (4:6ae4)
ld a, d
and a ; a is 0 from the status screen
- jr nz, .DifferentBox ; 0x12ae6 $12
+ jr nz, .DifferentBox
hlCoord 0, 8
ld b, $8
ld c, $8
call TextBoxBorder ; Draws the box
hlCoord 1, 9 ; Start printing stats from here
ld bc, $0019 ; Number offset
- jr .PrintStats ; 0x12af8 $10
+ jr .PrintStats
.DifferentBox
hlCoord 9, 2
ld b, $8
@@ -328,7 +328,7 @@ StatusScreen2: ; 12b57 (4:6b57)
call Func_12ccb ; Print "PP"
ld a, b
and a
- jr z, .InitPP ; 0x12bb3 $6
+ jr z, .InitPP
ld c, a
ld a, "-"
call Func_12ccb ; Fill the rest with --
@@ -339,7 +339,7 @@ StatusScreen2: ; 12b57 (4:6b57)
.PrintPP ; 12bc3
ld a, [hli]
and a
- jr z, .PPDone ; 0x12bc5 $4a
+ jr z, .PPDone
push bc
push hl
push de
@@ -382,7 +382,7 @@ StatusScreen2: ; 12b57 (4:6b57)
inc b
ld a, b
cp $4
- jr nz, .PrintPP ; 0x12c0f $b2
+ jr nz, .PrintPP
.PPDone
hlCoord 9, 3
ld de, EXPPointsText
@@ -390,7 +390,7 @@ StatusScreen2: ; 12b57 (4:6b57)
ld a, [wLoadedMonLevel] ; level
push af
cp MAX_LEVEL
- jr z, .Level100 ; 0x12c20 $4
+ jr z, .Level100
inc a
ld [wLoadedMonLevel], a ; Increase temporarily if not 100
.Level100
@@ -434,7 +434,7 @@ StatusScreen2: ; 12b57 (4:6b57)
.asm_12c86 ; This does some magic with lvl/exp?
ld a, [wLoadedMonLevel] ; Load level
cp MAX_LEVEL
- jr z, .asm_12ca7 ; 0x12c8b $1a ; If 100
+ jr z, .asm_12ca7 ; If 100
inc a
ld d, a
callab CalcExperience
diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm
index 88cfcf65..d5209440 100755
--- a/engine/menu/vending_machine.asm
+++ b/engine/menu/vending_machine.asm
@@ -52,9 +52,9 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0)
ld c, 1
call GiveItem
jr nc, .BagFull
- ld b, $3c ; number of times to play the "brrrrr" sound
-.playDeliverySound ; 0x74f63
- ld c, $2
+ ld b, 60 ; number of times to play the "brrrrr" sound
+.playDeliverySound
+ ld c, 2
call DelayFrames
push bc
ld a, (SFX_02_53 - SFX_Headers_02) / 3
diff --git a/engine/multiply_divide.asm b/engine/multiply_divide.asm
index 4aa5fa26..e55ab430 100755
--- a/engine/multiply_divide.asm
+++ b/engine/multiply_divide.asm
@@ -2,15 +2,15 @@ _Multiply: ; 37d41 (d:7d41)
ld a, $8
ld b, a
xor a
- ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld [H_DIVIDEND], a ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ld [$ff9b], a
- ld [H_SAVEDNUMTOPRINT], a ; $ff9c
+ ld [H_SAVEDNUMTOPRINT], a
ld [$ff9d], a
ld [$ff9e], a
.asm_37d4f
- ld a, [H_REMAINDER] ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
+ ld a, [H_REMAINDER] ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
srl a
- ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
+ ld [H_REMAINDER], a ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
jr nc, .asm_37d77
ld a, [$ff9e]
ld c, a
@@ -22,14 +22,14 @@ _Multiply: ; 37d41 (d:7d41)
ld a, [$ff97]
adc c
ld [$ff9d], a
- ld a, [H_SAVEDNUMTOPRINT] ; $ff9c
+ ld a, [H_SAVEDNUMTOPRINT]
ld c, a
- ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND)
+ ld a, [H_NUMTOPRINT] ; (aliases: H_MULTIPLICAND)
adc c
- ld [H_SAVEDNUMTOPRINT], a ; $ff9c
+ ld [H_SAVEDNUMTOPRINT], a
ld a, [$ff9b]
ld c, a
- ld a, [H_DIVIDEND] ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld a, [H_DIVIDEND] ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
adc c
ld [$ff9b], a
.asm_37d77
@@ -41,29 +41,29 @@ _Multiply: ; 37d41 (d:7d41)
ld a, [$ff97]
rl a
ld [$ff97], a
- ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND)
+ ld a, [H_NUMTOPRINT] ; (aliases: H_MULTIPLICAND)
rl a
- ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND)
- ld a, [H_DIVIDEND] ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld [H_NUMTOPRINT], a ; (aliases: H_MULTIPLICAND)
+ ld a, [H_DIVIDEND] ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
rl a
- ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld [H_DIVIDEND], a ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
jr .asm_37d4f
.asm_37d94
ld a, [$ff9e]
ld [$ff98], a
ld a, [$ff9d]
ld [$ff97], a
- ld a, [H_SAVEDNUMTOPRINT] ; $ff9c
- ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND)
+ ld a, [H_SAVEDNUMTOPRINT]
+ ld [H_NUMTOPRINT], a ; (aliases: H_MULTIPLICAND)
ld a, [$ff9b]
- ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld [H_DIVIDEND], a ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ret
_Divide: ; 37da5 (d:7da5)
xor a
ld [$ff9a], a
ld [$ff9b], a
- ld [H_SAVEDNUMTOPRINT], a ; $ff9c
+ ld [H_SAVEDNUMTOPRINT], a
ld [$ff9d], a
ld [$ff9e], a
ld a, $9
@@ -71,17 +71,17 @@ _Divide: ; 37da5 (d:7da5)
.asm_37db3
ld a, [$ff9a]
ld c, a
- ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND)
+ ld a, [H_NUMTOPRINT] ; (aliases: H_MULTIPLICAND)
sub c
ld d, a
- ld a, [H_REMAINDER] ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
+ ld a, [H_REMAINDER] ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
ld c, a
- ld a, [H_DIVIDEND] ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld a, [H_DIVIDEND] ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
sbc c
jr c, .asm_37dce
- ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld [H_DIVIDEND], a ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ld a, d
- ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND)
+ ld [H_NUMTOPRINT], a ; (aliases: H_MULTIPLICAND)
ld a, [$ff9e]
inc a
ld [$ff9e], a
@@ -96,9 +96,9 @@ _Divide: ; 37da5 (d:7da5)
ld a, [$ff9d]
rl a
ld [$ff9d], a
- ld a, [H_SAVEDNUMTOPRINT] ; $ff9c
+ ld a, [H_SAVEDNUMTOPRINT]
rl a
- ld [H_SAVEDNUMTOPRINT], a ; $ff9c
+ ld [H_SAVEDNUMTOPRINT], a
ld a, [$ff9b]
rl a
ld [$ff9b], a
@@ -107,13 +107,13 @@ _Divide: ; 37da5 (d:7da5)
ld a, $8
ld e, a
ld a, [$ff9a]
- ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
+ ld [H_REMAINDER], a ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
xor a
ld [$ff9a], a
- ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND)
- ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld a, [H_NUMTOPRINT] ; (aliases: H_MULTIPLICAND)
+ ld [H_DIVIDEND], a ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ld a, [$ff97]
- ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND)
+ ld [H_NUMTOPRINT], a ; (aliases: H_MULTIPLICAND)
ld a, [$ff98]
ld [$ff97], a
.asm_37e04
@@ -122,22 +122,22 @@ _Divide: ; 37da5 (d:7da5)
jr nz, .asm_37e0a
dec b
.asm_37e0a
- ld a, [H_REMAINDER] ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
+ ld a, [H_REMAINDER] ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
srl a
- ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
+ ld [H_REMAINDER], a ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
ld a, [$ff9a]
rr a
ld [$ff9a], a
jr .asm_37db3
.asm_37e18
- ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND)
- ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
+ ld a, [H_NUMTOPRINT] ; (aliases: H_MULTIPLICAND)
+ ld [H_REMAINDER], a ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN)
ld a, [$ff9e]
ld [$ff98], a
ld a, [$ff9d]
ld [$ff97], a
- ld a, [H_SAVEDNUMTOPRINT] ; $ff9c
- ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND)
+ ld a, [H_SAVEDNUMTOPRINT]
+ ld [H_NUMTOPRINT], a ; (aliases: H_MULTIPLICAND)
ld a, [$ff9b]
- ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
+ ld [H_DIVIDEND], a ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT)
ret
diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm
index 0cbdaa3d..72ccc389 100755
--- a/engine/oak_speech.asm
+++ b/engine/oak_speech.asm
@@ -1,11 +1,11 @@
SetDefaultNames: ; 60ca (1:60ca)
ld a, [wd358]
push af
- ld a, [W_OPTIONS] ; W_OPTIONS
+ ld a, [W_OPTIONS]
push af
ld a, [wd732]
push af
- ld hl, wPlayerName ; wd158
+ ld hl, wPlayerName
ld bc, $d8a
xor a
call FillMemory
@@ -16,18 +16,18 @@ SetDefaultNames: ; 60ca (1:60ca)
pop af
ld [wd732], a
pop af
- ld [W_OPTIONS], a ; W_OPTIONS
+ ld [W_OPTIONS], a
pop af
ld [wd358], a
ld a, [wd08a]
and a
call z, Func_5bff
ld hl, NintenText
- ld de, wPlayerName ; wd158
+ ld de, wPlayerName
ld bc, $b
call CopyData
ld hl, SonyText
- ld de, W_RIVALNAME ; wd34a
+ ld de, W_RIVALNAME
ld bc, $b
jp CopyData
@@ -37,7 +37,7 @@ OakSpeech: ; 6115 (1:6115)
ld a, BANK(Music_Routes2) ; bank of song
ld c,a
ld a, MUSIC_ROUTES2 ; song #
- call PlayMusic ; plays music
+ call PlayMusic
call ClearScreen
call LoadTextBoxTilePatterns
call SetDefaultNames
@@ -111,10 +111,10 @@ Func_61bc: ; 61bc (1:61bc)
call PlaySound
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ld c,4
call DelayFrames
- ld de,RedSprite ; $4180
+ ld de,RedSprite
ld hl,vSprites
ld bc,(BANK(RedSprite) << 8) | $0C
call CopyVideoData
@@ -139,8 +139,8 @@ Func_61bc: ; 61bc (1:61bc)
call PlaySound ; stop music
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
- ld c,$14
+ ld [MBC1RomBank],a
+ ld c,20
call DelayFrames
hlCoord 6, 5
ld b,7
@@ -149,7 +149,7 @@ Func_61bc: ; 61bc (1:61bc)
call LoadTextBoxTilePatterns
ld a,1
ld [wUpdateSpritesEnabled],a
- ld c,$32
+ ld c,50
call DelayFrames
call GBFadeOutToWhite
jp ClearScreen
@@ -229,4 +229,4 @@ IntroPredef3B: ; 62a4 (1:62a4)
.next
xor a
ld [$FFE1],a
- predef_jump Func_3f0c6
+ predef_jump CopyUncompressedPicToTilemap
diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm
index 34d98fd7..d8043484 100755
--- a/engine/oak_speech2.asm
+++ b/engine/oak_speech2.asm
@@ -1,17 +1,17 @@
LoadDefaultNamesPlayer: ; 695d (1:695d)
call Func_6a12
- ld de, DefaultNamesPlayer ; $6aa8
+ ld de, DefaultNamesPlayer
call DisplayIntroNameTextBox
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
and a
jr z, .asm_697a
- ld hl, DefaultNamesPlayerList ; $6af2
+ ld hl, DefaultNamesPlayerList
call Func_6ad6
- ld de, wPlayerName ; wd158
+ ld de, wPlayerName
call Func_69ec
jr .asm_6999
.asm_697a
- ld hl, wPlayerName ; wd158
+ ld hl, wPlayerName
xor a
ld [wd07d], a
call DisplayNamingScreen
@@ -20,7 +20,7 @@ LoadDefaultNamesPlayer: ; 695d (1:695d)
jr z, .asm_697a
call ClearScreen
call Delay3
- ld de, RedPicFront ; $6ede
+ ld de, RedPicFront
ld b, BANK(RedPicFront)
call IntroPredef3B
.asm_6999
@@ -32,19 +32,19 @@ YourNameIsText: ; 699f (1:699f)
db "@"
LoadDefaultNamesRival: ; 69a4 (1:69a4)
- call Func_6a12 ; 0x69a4 call 0x6a12
+ call Func_6a12
ld de, DefaultNamesRival
call DisplayIntroNameTextBox
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
and a
jr z, .asm_69c1
ld hl, DefaultNamesRivalList
call Func_6ad6
- ld de, W_RIVALNAME ; wd34a
+ ld de, W_RIVALNAME
call Func_69ec
jr .asm_69e1
.asm_69c1
- ld hl, W_RIVALNAME ; wd34a
+ ld hl, W_RIVALNAME
ld a, $1
ld [wd07d], a
call DisplayNamingScreen
@@ -53,7 +53,7 @@ LoadDefaultNamesRival: ; 69a4 (1:69a4)
jr z, .asm_69c1
call ClearScreen
call Delay3
- ld de, Rival1Pic ; $6049
+ ld de, Rival1Pic
ld b, $13
call IntroPredef3B
.asm_69e1
@@ -69,7 +69,7 @@ Func_69ec: ; 69ec (1:69ec)
ld hl, wTileMap
ld bc, $c0b
call ClearScreenArea
- ld c, $a
+ ld c, 10
call DelayFrames
pop de
ld hl, wcd6d
@@ -91,9 +91,9 @@ asm_6a19: ; 6a19 (1:6a19)
push bc
ld [$ff8d], a
ld a, d
- ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
+ ld [H_DOWNARROWBLINKCNT1], a
ld a, e
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
ld c, a
ld a, [$ff8d]
and a
@@ -105,7 +105,7 @@ asm_6a19: ; 6a19 (1:6a19)
ld e, l
.asm_6a2f
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ld a, [$ff8d]
and a
jr nz, .asm_6a3c
@@ -128,9 +128,9 @@ asm_6a19: ; 6a19 (1:6a19)
ld [hl], a
.asm_6a4a
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
- ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c
+ ld a, [H_DOWNARROWBLINKCNT2]
ld c, a
ld h, d
ld l, e
@@ -144,9 +144,9 @@ asm_6a19: ; 6a19 (1:6a19)
.asm_6a5f
ld d, h
ld e, l
- ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b
+ ld a, [H_DOWNARROWBLINKCNT1]
dec a
- ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
+ ld [H_DOWNARROWBLINKCNT1], a
jr nz, .asm_6a2f
pop bc
pop de
@@ -160,22 +160,22 @@ DisplayIntroNameTextBox: ; 6a6c (1:6a6c)
ld c, $9
call TextBoxBorder
hlCoord 3, 0
- ld de, .namestring ; $6aa3
+ ld de, .namestring
call PlaceString
pop de
hlCoord 2, 2
call PlaceString
call UpdateSprites
xor a
- ld [wCurrentMenuItem], a ; wCurrentMenuItem
- ld [wLastMenuItem], a ; wLastMenuItem
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
inc a
- ld [wTopMenuItemX], a ; wTopMenuItemX
- ld [wMenuWatchedKeys], a ; wMenuWatchedKeys
+ ld [wTopMenuItemX], a
+ ld [wMenuWatchedKeys], a
inc a
- ld [wTopMenuItemY], a ; wTopMenuItemY
+ ld [wTopMenuItemY], a
inc a
- ld [wMaxMenuItem], a ; wMaxMenuItem
+ ld [wMaxMenuItem], a
jp HandleMenuInput
.namestring ; 6aa3 (1:6aa3)
diff --git a/engine/overworld/cable_club_npc.asm b/engine/overworld/cable_club_npc.asm
index bdab41a6..86a7ab7d 100755
--- a/engine/overworld/cable_club_npc.asm
+++ b/engine/overworld/cable_club_npc.asm
@@ -5,7 +5,7 @@ CableClubNPC: ; 71c5 (1:71c5)
bit 5, a ; received pokedex?
jp nz, .receivedPokedex
; if the player hasn't received the pokedex
- ld c, $3c
+ ld c, 60
call DelayFrames
ld hl, CableClubNPCMakingPreparationsText
call PrintText
@@ -72,24 +72,24 @@ CableClubNPC: ; 71c5 (1:71c5)
ld hl, wUnknownSerialCounter
ld a, [hli]
inc a
- jr nz, Func_72a8 ; 0x726b $3b
+ jr nz, Func_72a8
ld a, [hl]
inc a
- jr nz, Func_72a8 ; 0x726f $37
+ jr nz, Func_72a8
ld b, $a
.asm_7273
call DelayFrame
call Serial_SendZeroByte
dec b
- jr nz, .asm_7273 ; 0x727a $f7
+ jr nz, .asm_7273
call CloseLinkConnection
ld hl, CableClubNPCLinkClosedBecauseOfInactivityText
call PrintText
- jr Func_7298 ; 0x7285 $11
+ jr Func_7298
.failedToEstablishConnection
ld hl, CableClubNPCAreaReservedFor2FriendsLinkedByCableText
call PrintText
- jr Func_7298 ; 0x728d $9
+ jr Func_7298
.choseNo
call CloseLinkConnection
ld hl, CableClubNPCPleaseComeAgainText
diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm
index c4df0d51..94c1868c 100755
--- a/engine/overworld/card_key.asm
+++ b/engine/overworld/card_key.asm
@@ -27,7 +27,7 @@ PrintCardKeyText: ; 52673 (14:6673)
jr z, .noCardKey
call GetCoordsInFrontOfPlayer
push de
- ld a, $1
+ tx_pre_id CardKeySuccessText
ld [H_DOWNARROWBLINKCNT2], a
call PrintPredefTextID
pop de
@@ -54,7 +54,7 @@ PrintCardKeyText: ; 52673 (14:6673)
ld a, (SFX_1f_57 - SFX_Headers_1f) / 3
jp PlaySound
.noCardKey
- ld a, $2
+ tx_pre_id CardKeyFailText
ld [H_DOWNARROWBLINKCNT2], a
jp PrintPredefTextID
diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm
index eefa2176..a23348db 100755
--- a/engine/overworld/cinnabar_lab.asm
+++ b/engine/overworld/cinnabar_lab.asm
@@ -2,16 +2,16 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
ld hl, wd730
set 6, [hl]
xor a
- ld [wCurrentMenuItem], a ; wCurrentMenuItem
+ ld [wCurrentMenuItem], a
ld a, $3
- ld [wMenuWatchedKeys], a ; wMenuWatchedKeys
+ ld [wMenuWatchedKeys], a
ld a, [wcd37]
dec a
- ld [wMaxMenuItem], a ; wMaxMenuItem
+ ld [wMaxMenuItem], a
ld a, $2
- ld [wTopMenuItemY], a ; wTopMenuItemY
+ ld [wTopMenuItemY], a
ld a, $1
- ld [wTopMenuItemX], a ; wTopMenuItemX
+ ld [wTopMenuItemX], a
ld a, [wcd37]
dec a
ld bc, $2
@@ -30,7 +30,7 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
bit 1, a
jr nz, .asm_610a7
ld hl, wcc5b
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
ld d, $0
ld e, a
add hl, de
@@ -55,7 +55,7 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
ld hl, LabFossil_610ae
call PrintText
call YesNoChoice
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
and a
jr nz, .asm_610a7
ld hl, LabFossil_610b3
diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm
index 7b92bca3..26a65b5b 100755
--- a/engine/overworld/cut.asm
+++ b/engine/overworld/cut.asm
@@ -1,7 +1,7 @@
UsedCut: ; ef54 (3:6f54)
xor a
ld [wcd6a], a
- ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET
+ ld a, [W_CURMAPTILESET]
and a ; OVERWORLD
jr z, .asm_ef6b
cp GYM
@@ -9,28 +9,28 @@ UsedCut: ; ef54 (3:6f54)
ld a, [wTileInFrontOfPlayer]
cp $50 ; gym cut tree
jr nz, .asm_ef77
- jr asm_ef82
+ jr .asm_ef82
.asm_ef6b
dec a
ld a, [wTileInFrontOfPlayer]
cp $3d ; cut tree
- jr z, asm_ef82
+ jr z, .asm_ef82
cp $52 ; grass
- jr z, asm_ef82
+ jr z, .asm_ef82
.asm_ef77
- ld hl, NothingToCutText
+ ld hl, .NothingToCutText
jp PrintText
-NothingToCutText: ; ef7d (3:6f7d)
+.NothingToCutText
TX_FAR _NothingToCutText
db "@"
-asm_ef82: ; ef82 (3:6f82)
+.asm_ef82
ld [wcd4d], a
ld a, $1
ld [wcd6a], a
- ld a, [wWhichPokemon] ; wWhichPokemon
- ld hl, wPartyMonNicks ; wPartyMonNicks
+ ld a, [wWhichPokemon]
+ ld hl, wPartyMonNicks
call GetPartyMonName
ld hl, wd730
set 6, [hl]
@@ -54,7 +54,7 @@ asm_ef82: ; ef82 (3:6f82)
ld a, $ff
ld [wUpdateSpritesEnabled], a
call AnimateCutTree
- ld de, CutTreeBlockSwaps ; $7100
+ ld de, CutTreeBlockSwaps
call Func_f09f
call RedrawMapView
callba Func_79e96
@@ -75,15 +75,15 @@ AnimateCutTree: ; eff7 (3:6ff7)
xor a
ld [wcd50], a
ld a, $e4
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
ld a, [wcd4d]
cp $52
jr z, .asm_f020
- ld de, Overworld_GFX + $2d0 ; $42d0 ; cuttable tree sprite top row
+ ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row
ld hl, vChars1 + $7c0
ld bc, (BANK(Overworld_GFX) << 8) + $02
call CopyVideoData
- ld de, Overworld_GFX + $3d0 ; $43d0 ; cuttable tree sprite bottom row
+ ld de, Overworld_GFX + $3d0 ; cuttable tree sprite bottom row
ld hl, vChars1 + $7e0
ld bc, (BANK(Overworld_GFX) << 8) + $02
call CopyVideoData
@@ -111,7 +111,7 @@ AnimateCutTree: ; eff7 (3:6ff7)
ret
LoadCutTreeAnimationTilePattern: ; f04c (3:704c)
- ld de, AnimationTileset2 + $60 ; $474e ; tile depicting a leaf
+ ld de, AnimationTileset2 + $60 ; tile depicting a leaf
ld bc, (BANK(AnimationTileset2) << 8) + $01
jp CopyVideoData
@@ -173,7 +173,7 @@ BoulderDustAnimationOffsets: ; f097 (3:7097)
Func_f09f: ; f09f (3:709f)
push de
- ld a, [W_CURMAPWIDTH] ; wd369
+ ld a, [W_CURMAPWIDTH]
add $6
ld c, a
ld b, $0
@@ -185,27 +185,27 @@ Func_f09f: ; f09f (3:709f)
add hl, bc
ld a, [wSpriteStateData1 + 9]
and a
- jr z, .asm_f0c7
- cp $4
- jr z, .asm_f0cf
- cp $8
- jr z, .asm_f0d7
- ld a, [W_XBLOCKCOORD] ; wd364
+ jr z, .down
+ cp SPRITE_FACING_UP
+ jr z, .up
+ cp SPRITE_FACING_LEFT
+ jr z, .left
+ ld a, [W_XBLOCKCOORD]
and a
jr z, .asm_f0e0
jr .asm_f0ec
-.asm_f0c7
- ld a, [W_YBLOCKCOORD] ; wd363
+.down
+ ld a, [W_YBLOCKCOORD]
and a
jr z, .asm_f0e0
jr .asm_f0df
-.asm_f0cf
- ld a, [W_YBLOCKCOORD] ; wd363
+.up
+ ld a, [W_YBLOCKCOORD]
and a
jr z, .asm_f0e1
jr .asm_f0e0
-.asm_f0d7
- ld a, [W_XBLOCKCOORD] ; wd364
+.left
+ ld a, [W_XBLOCKCOORD]
and a
jr z, .asm_f0e6
jr .asm_f0e0
diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm
index de2b9d55..9cb011b4 100755
--- a/engine/overworld/cut2.asm
+++ b/engine/overworld/cut2.asm
@@ -15,9 +15,9 @@ Func_79e96: ; 79e96 (1e:5e96)
ld [wd08a], a
ld c, $2
call AdjustOAMBlockXPos2
- ld a, [rOBP1] ; $ff49
+ ld a, [rOBP1]
xor $64
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
call DelayFrame
pop bc
dec c
@@ -65,9 +65,9 @@ Func_79eed: ; 79eed (1e:5eed)
ld [wd08a], a
ld c, $1
call AdjustOAMBlockXPos2
- ld a, [rOBP1] ; $ff49
+ ld a, [rOBP1]
xor $64
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
call DelayFrame
pop bc
dec c
diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm
index ac345af9..641c021f 100755
--- a/engine/overworld/doors.asm
+++ b/engine/overworld/doors.asm
@@ -1,8 +1,8 @@
; returns whether the player is standing on a door tile in carry
IsPlayerStandingOnDoorTile: ; 1a609 (6:6609)
push de
- ld hl, DoorTileIDPointers ; $662c
- ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET
+ ld hl, DoorTileIDPointers
+ ld a, [W_CURMAPTILESET]
ld de, $3
call IsInArray
pop de
diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm
index 3a23d410..f5b1d14c 100755
--- a/engine/overworld/elevator.asm
+++ b/engine/overworld/elevator.asm
@@ -10,7 +10,7 @@ ShakeElevator: ; 7bf15 (1e:7f15)
ld d, a
ld e, $1
; number of times to play collision sfx
- ld b, $64
+ ld b, 100
.asm_7bf30
ld a, e
xor $fe
@@ -22,7 +22,7 @@ ShakeElevator: ; 7bf15 (1e:7f15)
ld a, (SFX_02_5b - SFX_Headers_02) / 3
call PlayMusic
pop bc
- ld c, $2
+ ld c, 2
call DelayFrames
dec b
jr nz, .asm_7bf30
diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm
index 7106063b..01b3ae85 100755
--- a/engine/overworld/emotion_bubbles.asm
+++ b/engine/overworld/emotion_bubbles.asm
@@ -2,7 +2,7 @@ EmotionBubble: ; 17c47 (5:7c47)
ld a, [wcd50]
ld c, a
ld b, $0
- ld hl, EmotionBubblesPointerTable ; $7caf
+ ld hl, EmotionBubblesPointerTable
add hl, bc
add hl, bc
ld e, [hl]
@@ -45,10 +45,10 @@ EmotionBubble: ; 17c47 (5:7c47)
ld a, [hl]
add $8
ld c, a
- ld de, EmotionBubblesOAM ; $7cb5
+ ld de, EmotionBubblesOAM
xor a
call WriteOAMBlock
- ld c, $3c
+ ld c, 60
call DelayFrames
pop af
ld [wUpdateSpritesEnabled], a
diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm
index 90d306c3..d00bbc05 100755
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -1,5 +1,5 @@
AnimateHealingMachine: ; 70433 (1c:4433)
- ld de, PokeCenterFlashingMonitorAndHealBall ; $44b7
+ ld de, PokeCenterFlashingMonitorAndHealBall
ld hl, vChars0 + $7c0
ld bc, (BANK(PokeCenterFlashingMonitorAndHealBall) << 8) + $03
call CopyVideoData
@@ -8,12 +8,12 @@ AnimateHealingMachine: ; 70433 (1c:4433)
push af
ld [hl], $ff
push hl
- ld a, [rOBP1] ; $ff49
+ ld a, [rOBP1]
push af
ld a, $e0
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
ld hl, wOAMBuffer + $84
- ld de, PokeCenterOAMData ; $44d7
+ ld de, PokeCenterOAMData
call Func_70503
ld a, $4
ld [wMusicHeaderPointer], a
@@ -24,18 +24,18 @@ AnimateHealingMachine: ; 70433 (1c:4433)
ld a, [wMusicHeaderPointer]
and a
jr nz, .asm_70464
- ld a, [wPartyCount] ; wPartyCount
+ ld a, [wPartyCount]
ld b, a
.asm_7046e
call Func_70503
ld a, (SFX_02_4a - SFX_Headers_02) / 3
call PlaySound
- ld c, $1e
+ ld c, 30
call DelayFrames
dec b
jr nz, .asm_7046e
ld a, [wc0ef]
- cp $1f
+ cp BANK(Music1f_UpdateMusic)
ld [wc0f0], a
jr nz, .asm_70495
ld a, $ff
@@ -53,10 +53,10 @@ AnimateHealingMachine: ; 70433 (1c:4433)
ld a, [wc026]
cp MUSIC_PKMN_HEALED
jr z, .asm_704a2
- ld c, $20
+ ld c, 32
call DelayFrames
pop af
- ld [rOBP1], a ; $ff49
+ ld [rOBP1], a
pop hl
pop af
ld [hl], a
diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm
index 17288a17..868f118f 100755
--- a/engine/overworld/hidden_items.asm
+++ b/engine/overworld/hidden_items.asm
@@ -16,15 +16,13 @@ HiddenItems: ; 76688 (1d:6688)
ld a, [wWhichTrade] ; item ID
ld [wd11e], a
call GetItemName
- ld a, $24
- jp PrintPredefTextID
+ tx_pre_jump FoundHiddenItemText
INCLUDE "data/hidden_item_coords.asm"
FoundHiddenItemText: ; 7675b (1d:675b)
-; XXX where is the pointer to this?
TX_FAR _FoundHiddenItemText
- db $8
+ TX_ASM
ld a, [wWhichTrade] ; item ID
ld b, a
ld c, 1
@@ -36,8 +34,8 @@ FoundHiddenItemText: ; 7675b (1d:675b)
ld b, $1
predef FlagActionPredef
ld a, (SFX_02_3b - SFX_Headers_02) / 3
- call PlaySoundWaitForCurrent ; play sound
- call WaitForSoundToFinish ; wait for sound to finish playing
+ call PlaySoundWaitForCurrent
+ call WaitForSoundToFinish
jp TextScriptEnd
.BagFull
call WaitForTextScrollButtonPress ; wait for button press
@@ -113,10 +111,10 @@ HiddenCoins: ; 76799 (1d:6799)
ld a, [wPlayerCoins + 1]
cp $99
jr nz, .RoomInCoinCase
- ld a, $2c
+ tx_pre_id DroppedHiddenCoinsText
jr .done
.RoomInCoinCase
- ld a, $2b
+ tx_pre_id FoundHiddenCoinsText
.done
jp PrintPredefTextID
@@ -146,10 +144,10 @@ Func_76857: ; 76857 (1d:6857)
cp $ff ; end of the list?
ret z ; if so, we're done here
cp b
- jr nz, .asm_76877 ; 0x7686b $a
+ jr nz, .asm_76877
ld a, [hli]
cp d
- jr nz, .asm_76878 ; 0x7686f $7
+ jr nz, .asm_76878
ld a, [hli]
cp e
jr nz, .loop
diff --git a/engine/overworld/item.asm b/engine/overworld/item.asm
index a49fc268..b00405bf 100644
--- a/engine/overworld/item.asm
+++ b/engine/overworld/item.asm
@@ -1,7 +1,7 @@
PickupItem:
call EnableAutoTextBoxDrawing
- ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c
+ ld a, [H_DOWNARROWBLINKCNT2]
ld b, a
ld hl, W_MISSABLEOBJECTLIST
.missableObjectsListLoop
@@ -18,7 +18,7 @@ PickupItem:
ld [$ffdb], a
ld hl, W_MAPSPRITEEXTRADATA
- ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c
+ ld a, [H_DOWNARROWBLINKCNT2]
dec a
add a
ld d, 0
diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm
index b8c19181..3a183c0f 100755
--- a/engine/overworld/ledges.asm
+++ b/engine/overworld/ledges.asm
@@ -2,7 +2,7 @@ HandleLedges: ; 1a672 (6:6672)
ld a, [wd736]
bit 6, a ; already jumping down ledge
ret nz
- ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET
+ ld a, [W_CURMAPTILESET]
and a ; OVERWORLD
ret nz
predef GetTileAndCoordsInFrontOfPlayer
diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm
index c4482700..dac03f3a 100644
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -22,39 +22,39 @@ UpdatePlayerSprite: ; 4e31 (1:4e31)
.lowerLeftTileIsMapTile
call DetectCollisionBetweenSprites
ld h, $c1
- ld a, [wWalkCounter] ; wcfc5
+ ld a, [wWalkCounter]
and a
jr nz, .asm_4e90
ld a, [wd528]
bit 2, a
- jr z, .asm_4e65
- xor a
- jr .asm_4e86
-.asm_4e65
+ jr z, .notDown
+ xor a ; ld a, SPRITE_FACING_DOWN
+ jr .done
+.notDown
bit 3, a
- jr z, .asm_4e6d
- ld a, $4
- jr .asm_4e86
-.asm_4e6d
+ jr z, .notUp
+ ld a, SPRITE_FACING_UP
+ jr .done
+.notUp
bit 1, a
- jr z, .asm_4e75
- ld a, $8
- jr .asm_4e86
-.asm_4e75
+ jr z, .notLeft
+ ld a, SPRITE_FACING_LEFT
+ jr .done
+.notLeft
bit 0, a
- jr z, .asm_4e7d
- ld a, $c
- jr .asm_4e86
-.asm_4e7d
+ jr z, .notRight
+ ld a, SPRITE_FACING_RIGHT
+ jr .done
+.notRight
xor a
ld [wSpriteStateData1 + 7], a
ld [wSpriteStateData1 + 8], a
jr .asm_4eab
-.asm_4e86
+.done
ld [wSpriteStateData1 + 9], a
ld a, [wFontLoaded]
bit 0, a
- jr nz, .asm_4e7d
+ jr nz, .notRight
.asm_4e90
ld a, [wd736]
bit 7, a
@@ -108,7 +108,7 @@ Func_4ed1: ; 4ed1 (1:4ed1)
swap a
dec a
add a
- ld hl, W_MAPSPRITEDATA ; wd4e4
+ ld hl, W_MAPSPRITEDATA
add l
ld l, a
ld a, [hl] ; read movement byte 2
@@ -138,7 +138,7 @@ Func_4ed1: ; 4ed1 (1:4ed1)
jp z, UpdateSpriteMovementDelay ; c1x1 == 2
cp $3
jp z, UpdateSpriteInWalkingAnimation ; c1x1 == 3
- ld a, [wWalkCounter] ; wcfc5
+ ld a, [wWalkCounter]
and a
ret nz ; don't do anything yet if player is currently moving (redundant, already tested in CheckSpriteAvailability)
call InitializeSpriteScreenPosition
@@ -212,7 +212,7 @@ Func_4ed1: ; 4ed1 (1:4ed1)
cp $2
jr z, .moveRight ; movement byte 2 = $2 only allows left or right
.moveUp
- ld de, -2*20 ; $ffd8
+ ld de, -2*20
add hl, de ; move tile pointer two rows up
ld de, $ff00
ld bc, $804
@@ -440,7 +440,7 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd)
ld a, [H_CURRENTSPRITEOFFSET]
add $4
ld l, a
- ld a, [W_YCOORD] ; wd361
+ ld a, [W_YCOORD]
ld b, a
ld a, [hl] ; c2x4 (Y position + 4)
sub b ; relative to player position
@@ -449,7 +449,7 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd)
dec h
ld [hli], a ; c1x4 (screen Y position)
inc h
- ld a, [W_XCOORD] ; wd362
+ ld a, [W_XCOORD]
ld b, a
ld a, [hli] ; c2x6 (X position + 4)
sub b ; relative to player position
@@ -475,7 +475,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc)
add $4
ld l, a
ld b, [hl] ; c2x4: Y pos (+4)
- ld a, [W_YCOORD] ; wd361
+ ld a, [W_YCOORD]
cp b
jr z, .skipYVisibilityTest
jr nc, .spriteInvisible ; above screen region
@@ -485,7 +485,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc)
.skipYVisibilityTest
inc l
ld b, [hl] ; c2x5: X pos (+4)
- ld a, [W_XCOORD] ; wd362
+ ld a, [W_XCOORD]
cp b
jr z, .skipXVisibilityTest
jr nc, .spriteInvisible ; left of screen region
@@ -503,7 +503,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc)
ld a, [hld]
cp d
jr nc, .spriteInvisible ; standing on tile with ID >=$60 (bottom right tile)
- ld bc, -20 ; $ffec
+ ld bc, -20
add hl, bc ; go back one row of tiles
ld a, [hli]
cp d
@@ -521,7 +521,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc)
jr .done
.spriteVisible
ld c, a
- ld a, [wWalkCounter] ; wcfc5
+ ld a, [wWalkCounter]
and a
jr nz, .done ; if player is currently walking, we're done
call UpdateSpriteImage
diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm
index 84e39853..73a3fdfb 100755
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -52,7 +52,7 @@ ProfOakMovementScriptPointerTable: ; 1a442 (6:6442)
dw Func_1a4f4
Func_1a44c: ; 1a44c (6:644c)
- ld a, [W_XCOORD] ; wd362
+ ld a, [W_XCOORD]
sub $a
ld [wcca1], a
jr z, .asm_1a475
@@ -63,7 +63,7 @@ Func_1a44c: ; 1a44c (6:644c)
call FillMemory
ld [hl], $ff
ld a, [wSpriteIndex]
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
ld de, wNPCMovementDirections2
call MoveSprite
ld a, $1
diff --git a/engine/overworld/oaks_aide.asm b/engine/overworld/oaks_aide.asm
index 68135287..00f6ea82 100755
--- a/engine/overworld/oaks_aide.asm
+++ b/engine/overworld/oaks_aide.asm
@@ -1,10 +1,10 @@
-OaksAideScript ; 0x59035
+OaksAideScript: ; 0x59035
ld hl, OaksAideHiText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_59086 ; 0x59042 $42
+ jr nz, .asm_59086
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
@@ -13,8 +13,8 @@ OaksAideScript ; 0x59035
ld b, a
ld a, [$ffdb]
cp b
- jr z, .asm_59059 ; 0x59055 $2
- jr nc, .asm_5907c ; 0x59057 $23
+ jr z, .asm_59059
+ jr nc, .asm_5907c
.asm_59059
ld hl, OaksAideHereYouGoText
call PrintText
@@ -26,17 +26,17 @@ OaksAideScript ; 0x59035
ld hl, OaksAideGotItemText
call PrintText
ld a, $1
- jr .asm_5908e ; 0x59071 $1b
+ jr .asm_5908e
.BagFull
ld hl, OaksAideNoRoomText
call PrintText
xor a
- jr .asm_5908e ; 0x5907a $12
+ jr .asm_5908e
.asm_5907c
ld hl, OaksAideUhOhText
call PrintText
ld a, $80
- jr .asm_5908e ; 0x59084 $8
+ jr .asm_5908e
.asm_59086
ld hl, OaksAideComeBackText
call PrintText
diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm
index 6602cedd..d68e4e57 100755
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -58,7 +58,7 @@ EnterMapAnim: ; 70510 (1c:4510)
ld a, 12
ld [hli], a ; wFlyAnimCounter
ld [hl], $8 ; wFlyAnimBirdSpriteImageIndex (facing right)
- ld de, FlyAnimationEnterScreenCoords ; $4592
+ ld de, FlyAnimationEnterScreenCoords
call DoFlyAnimation
call LoadPlayerSpriteGraphics
jr .restoreDefaultMusic
@@ -154,7 +154,7 @@ _LeaveMapAnim: ; 705ba (1c:45ba)
ld a, $c
ld [hli], a ; wFlyAnimCounter
ld [hl], $c ; wFlyAnimBirdSpriteImageIndex (facing right)
- ld de, FlyAnimationScreenCoords1 ; $464f
+ ld de, FlyAnimationScreenCoords1
call DoFlyAnimation
ld c, 40
call DelayFrames
@@ -162,7 +162,7 @@ _LeaveMapAnim: ; 705ba (1c:45ba)
ld a, 11
ld [hli], a ; wFlyAnimCounter
ld [hl], $8 ; wFlyAnimBirdSpriteImageIndex (facing left)
- ld de, FlyAnimationScreenCoords2 ; $4667
+ ld de, FlyAnimationScreenCoords2
call DoFlyAnimation
call GBFadeOutToWhite
jp RestoreFacingDirectionAndYScreenPos
@@ -248,11 +248,11 @@ DoFlyAnimation: ; 706ae (1c:46ae)
ret
LoadBirdSpriteGraphics: ; 706d7 (1c:46d7)
- ld de, BirdSprite ; $4d80
+ ld de, BirdSprite
ld hl, vNPCSprites
ld bc, (BANK(BirdSprite) << 8) + $0c
call CopyVideoData
- ld de, BirdSprite + $c0 ; $4e40 ; moving amination sprite
+ ld de, BirdSprite + $c0 ; moving amination sprite
ld hl, vNPCSprites2
ld bc, (BANK(BirdSprite) << 8) + $0c
jp CopyVideoData
@@ -379,28 +379,28 @@ IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787)
db $FF
Func_707b6: ; 707b6 (1c:47b6)
- ld c, $a
+ ld c, 10
call DelayFrames
ld hl, wd736
set 6, [hl]
- ld de, RedSprite ; $4180
+ ld de, RedSprite
ld hl, vNPCSprites
ld bc, (BANK(RedSprite) << 8) + $0c
call CopyVideoData
ld a, $4
- ld hl, RedFishingTiles ; $4866
+ ld hl, RedFishingTiles
call LoadAnimSpriteGfx
ld a, [wSpriteStateData1 + 2]
ld c, a
ld b, $0
- ld hl, FishingRodGfxProperties ; $4856
+ ld hl, FishingRodGfxProperties
add hl, bc
ld de, wOAMBuffer + $9c
ld bc, $4
call CopyData
- ld c, $64
+ ld c, 100
call DelayFrames
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
and a
ld hl, NoNibbleText
jr z, .asm_70836
diff --git a/engine/overworld/pokecenter.asm b/engine/overworld/pokecenter.asm
index 3c640d8e..5b2e4cbb 100755
--- a/engine/overworld/pokecenter.asm
+++ b/engine/overworld/pokecenter.asm
@@ -43,7 +43,7 @@ DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6)
.done
ld hl, PokemonCenterFarewellText
call PrintText
- jp UpdateSprites ; move sprites
+ jp UpdateSprites
PokemonCenterWelcomeText: ; 705d (1:705d)
TX_FAR _PokemonCenterWelcomeText
diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm
index 8325b93f..fa93e1db 100755
--- a/engine/overworld/pokemart.asm
+++ b/engine/overworld/pokemart.asm
@@ -1,7 +1,7 @@
DisplayPokemartDialogue_: ; 6c20 (1:6c20)
ld a,[wListScrollOffset]
ld [wd07e],a
- call UpdateSprites ; move sprites
+ call UpdateSprites
xor a
ld [wcf0a],a ; flag that is set if something is sold or bought
.loop
@@ -36,7 +36,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
ld [wcf93],a
ld a,$02
ld [wd11b],a
- callab Func_39bd5
+ callab InitList
ld a,[wNumBagItems]
and a
jp z,.bagEmpty
@@ -113,7 +113,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
ld [wcf93],a
ld a,$03
ld [wd11b],a
- callab Func_39bd5
+ callab InitList
ld hl,PokemartBuyingGreetingText
call PrintText
call SaveScreenTilesToBuffer1 ; save screen
@@ -204,7 +204,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
call PrintText
ld a,$01
ld [wUpdateSpritesEnabled],a
- call UpdateSprites ; move sprites
+ call UpdateSprites
ld a,[wd07e]
ld [wListScrollOffset],a
ret
diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm
index f1a8ecf9..4cac4957 100755
--- a/engine/overworld/ssanne.asm
+++ b/engine/overworld/ssanne.asm
@@ -84,7 +84,7 @@ LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
ret
LoadSmokeTile: ; 79fd4 (1e:5fd4)
- ld de, SSAnneSmokePuffTile ; $5fdd
+ ld de, SSAnneSmokePuffTile
ld bc, (BANK(SSAnneSmokePuffTile) << 8) + $01
jp CopyVideoData
diff --git a/engine/overworld/trainers.asm b/engine/overworld/trainers.asm
index 4aaab3ed..2b08997b 100755
--- a/engine/overworld/trainers.asm
+++ b/engine/overworld/trainers.asm
@@ -77,7 +77,7 @@ _SetSpritePosition2: ; 5685d (15:685d)
TrainerWalkUpToPlayer: ; 56881 (15:6881)
ld a, [wSpriteIndex]
swap a
- ld [wTrainerSpriteOffset], a ; wWhichTrade
+ ld [wTrainerSpriteOffset], a
call ReadTrainerScreenPosition
ld a, [wTrainerFacingDirection]
and a
@@ -164,7 +164,7 @@ GetSpriteDataPointer: ; 56903 (15:6903)
TrainerEngage: ; 5690f (15:690f)
push hl
push de
- ld a, [wTrainerSpriteOffset] ; wWhichTrade
+ ld a, [wTrainerSpriteOffset]
add $2
ld d, $0
ld e, a
@@ -175,7 +175,7 @@ TrainerEngage: ; 5690f (15:690f)
jr nz, .spriteOnScreen ; test if sprite is on screen
jp .noEngage
.spriteOnScreen
- ld a, [wTrainerSpriteOffset] ; wWhichTrade
+ ld a, [wTrainerSpriteOffset]
add $9
ld d, $0
ld e, a
@@ -218,7 +218,7 @@ TrainerEngage: ; 5690f (15:690f)
jp .noEngage
.engage
call CheckPlayerIsInFrontOfSprite
- ld a, [wTrainerSpriteOffset] ; wWhichTrade
+ ld a, [wTrainerSpriteOffset]
and a
jr z, .noEngage
ld hl, wFlags_0xcd60
@@ -226,14 +226,14 @@ TrainerEngage: ; 5690f (15:690f)
call EngageMapTrainer
ld a, $ff
.noEngage: ; 56988 (15:6988)
- ld [wTrainerSpriteOffset], a ; wWhichTrade
+ ld [wTrainerSpriteOffset], a
pop de
pop hl
ret
; reads trainer's Y position to wTrainerScreenY and X position to wTrainerScreenX
ReadTrainerScreenPosition: ; 5698e (15:698e)
- ld a, [wTrainerSpriteOffset] ; wWhichTrade
+ ld a, [wTrainerSpriteOffset]
add $4
ld d, $0
ld e, a
@@ -241,7 +241,7 @@ ReadTrainerScreenPosition: ; 5698e (15:698e)
add hl, de
ld a, [hl]
ld [wTrainerScreenY], a
- ld a, [wTrainerSpriteOffset] ; wWhichTrade
+ ld a, [wTrainerSpriteOffset]
add $6
ld d, $0
ld e, a
@@ -291,10 +291,10 @@ CheckSpriteCanSeePlayer: ; 569af (15:69af)
; tests if the player is in front of the sprite (rather than behind it)
CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3)
- ld a, [W_CURMAP] ; W_CURMAP
+ ld a, [W_CURMAP]
cp POWER_PLANT
- jp z, .engage ; XXX not sure why bypass this for power plant (maybe to get voltorb fake items to work?)
- ld a, [wTrainerSpriteOffset] ; wWhichTrade
+ jp z, .engage ; bypass this for power plant to get voltorb fake items to work
+ ld a, [wTrainerSpriteOffset]
add $4
ld d, $0
ld e, a
@@ -306,7 +306,7 @@ CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3)
ld a, $c
.notOnTopmostTile
ld [wTrainerScreenY], a
- ld a, [wTrainerSpriteOffset] ; wWhichTrade
+ ld a, [wTrainerSpriteOffset]
add $6
ld d, $0
ld e, a
@@ -345,5 +345,5 @@ CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3)
.noEngage
xor a
.done
- ld [wTrainerSpriteOffset], a ; wWhichTrade
+ ld [wTrainerSpriteOffset], a
ret
diff --git a/engine/palettes.asm b/engine/palettes.asm
index ed06cf4e..a9160d21 100755
--- a/engine/palettes.asm
+++ b/engine/palettes.asm
@@ -78,7 +78,7 @@ BuildStatusScreenPalPacket: ; 71e4f (1c:5e4f)
push af
ld hl, wcf2e
ld a, [wcf25]
- add $1f
+ add PAL_GREENBAR
ld [hli], a
inc hl
pop af
@@ -280,7 +280,7 @@ DeterminePaletteIDOutOfBattle: ; 71f9d (1c:5f9d)
ret
SendBlkPacket_PartyMenu: ; 71fb6 (1c:5fb6)
- ld hl, BlkPacket_PartyMenu ; $62f4
+ ld hl, BlkPacket_PartyMenu
ld de, wcf2e
ld bc, $30
jp CopyData
@@ -501,7 +501,7 @@ Func_7210b: ; 7210b (1c:610b)
push de
call DisableLCD
ld a, $e4
- ld [rBGP], a ; $ff47
+ ld [rBGP], a
ld de, vChars1
ld a, [wcf2d]
and a
@@ -527,11 +527,11 @@ Func_7210b: ; 7210b (1c:610b)
dec c
jr nz, .asm_72132
ld a, $e3
- ld [rLCDC], a ; $ff40
+ ld [rLCDC], a
pop hl
call SendSGBPacket
xor a
- ld [rBGP], a ; $ff47
+ ld [rBGP], a
ei
ret
diff --git a/engine/pokedex_rating.asm b/engine/pokedex_rating.asm
index 080025c6..881c9716 100755
--- a/engine/pokedex_rating.asm
+++ b/engine/pokedex_rating.asm
@@ -33,7 +33,7 @@ DisplayDexRating: ; 44169 (11:4169)
call PrintText
pop hl
call PrintText
- callba Func_7d13b
+ callba PlayPokedexRatingSfx
jp WaitForTextScrollButtonPress ; wait for button press
.label3
ld de, wcc5b
diff --git a/engine/predefs.asm b/engine/predefs.asm
index f6ecf018..90065d51 100755
--- a/engine/predefs.asm
+++ b/engine/predefs.asm
@@ -53,11 +53,11 @@ PredefPointers:: ; 4fe79 (13:7e79)
; these are pointers to ASM routines.
; they appear to be used in overworld map scripts.
add_predef DrawPlayerHUDAndHPBar
- add_predef Func_3f0c6
- add_predef Func_3f073
+ add_predef CopyUncompressedPicToTilemap
+ add_predef AnimateSendingOutMon
add_predef ScaleSpriteByTwo
add_predef LoadMonBackPic
- add_predef Func_79aba
+ add_predef CopyGrowingMonTiles
add_predef LoadMissableObjects
add_predef HealParty
add_predef MoveAnimation; 08 play move animation
@@ -103,7 +103,7 @@ PredefPointers:: ; 4fe79 (13:7e79)
add_predef BattleTransition
add_predef CopyTileIDsFromList
add_predef PlayIntro
- add_predef Func_79869
+ add_predef GetMoveSoundB
add_predef FlashScreen
add_predef GetTileAndCoordsInFrontOfPlayer
add_predef StatusScreen
diff --git a/engine/predefs12.asm b/engine/predefs12.asm
index 90032a14..f318447e 100755
--- a/engine/predefs12.asm
+++ b/engine/predefs12.asm
@@ -4,7 +4,7 @@ ChangeBGPalColor0_4Frames: ; 480eb (12:40eb)
ld a, [rBGP]
or b
ld [rBGP], a
- ld c, $4
+ ld c, 4
call DelayFrames
ld a, [rBGP]
and %11111100
@@ -17,7 +17,7 @@ Func_480ff: ; 480ff (12:40ff)
ld [wd0a0], a
xor a
.asm_48108
- ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND)
+ ld [H_NUMTOPRINT], a ; (aliases: H_MULTIPLICAND)
call Func_48119
call Func_48119
dec b
@@ -28,11 +28,11 @@ Func_480ff: ; 480ff (12:40ff)
ret
Func_48119: ; 48119 (12:4119)
- ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND)
+ ld a, [H_NUMTOPRINT] ; (aliases: H_MULTIPLICAND)
xor b
- ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND)
- ld [rWY], a ; $ff4a
- ld c, $3
+ ld [H_NUMTOPRINT], a ; (aliases: H_MULTIPLICAND)
+ ld [rWY], a
+ ld c, 3
jp DelayFrames
Func_48125: ; 48125 (12:4125)
@@ -41,14 +41,14 @@ Func_48125: ; 48125 (12:4125)
.asm_48129
ld [$ff97], a
call Func_4813f
- ld c, $1
+ ld c, 1
call DelayFrames
call Func_4813f
dec b
ld a, b
jr nz, .asm_48129
ld a, $7
- ld [rWX], a ; $ff4b
+ ld [rWX], a
ret
Func_4813f: ; 4813f (12:413f)
@@ -60,6 +60,6 @@ Func_4813f: ; 4813f (12:413f)
xor a
.asm_48149
add $7
- ld [rWX], a ; $ff4b
- ld c, $4
+ ld [rWX], a
+ ld c, 4
jp DelayFrames
diff --git a/engine/predefs17.asm b/engine/predefs17.asm
index 74977ee8..a674b45a 100755
--- a/engine/predefs17.asm
+++ b/engine/predefs17.asm
@@ -2,8 +2,8 @@
; so that the full Pokedex information gets displayed in Oak's lab
StarterDex: ; 5c0dc (17:40dc)
ld a, %01001011 ; set starter flags
- ld [wPokedexOwned], a ; wPokedexOwned
+ ld [wPokedexOwned], a
predef ShowPokedexData
xor a ; unset starter flags
- ld [wPokedexOwned], a ; wPokedexOwned
+ ld [wPokedexOwned], a
ret
diff --git a/engine/save.asm b/engine/save.asm
index 93b70be4..3cc7539a 100755
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -18,7 +18,7 @@ LoadSAV: ; 735e8 (1c:75e8)
set 6, [hl]
ld hl, FileDataDestroyedText
call PrintText
- ld c, $64
+ ld c, 100
call DelayFrames
pop hl
res 6, [hl]
@@ -54,7 +54,7 @@ LoadSAVCheckSum: ; 73623 (1c:7623)
.Func_73652 ; 73652 (1c:7652)
ld hl, S_SAVEDPLAYERNAME
- ld de, wPlayerName ; wd158
+ ld de, wPlayerName
ld bc, $b
call CopyData
ld hl, S_SAVEDMAINDATA
@@ -110,11 +110,11 @@ LoadSAVCheckSum2: ; 736bd (1c:76bd)
cp c
jp nz, SAVBadCheckSum
ld hl, S_SAVEDPARTYDATA
- ld de, wPartyCount ; wPartyCount
+ ld de, wPartyCount
ld bc, wPokedexOwned - wPartyCount
call CopyData
ld hl, S_SAVEDMAINDATA
- ld de, wPokedexOwned ; wPokedexOwned
+ ld de, wPokedexOwned
ld bc, wPokedexSeenEnd - wPokedexOwned
call CopyData
and a
@@ -129,12 +129,12 @@ SAVGoodChecksum: ; 736f8 (1c:76f8)
ld [MBC1SRamEnable], a
ret
-Func_73701: ; 0x73701
+Func_73701: ; 73701 (1c:7701)
call LoadSAVCheckSum
call LoadSAVCheckSum1
jp LoadSAVCheckSum2
-SaveSAV: ;$770a
+SaveSAV: ; 7370a (1c:770a)
callba PrintSaveScreenText
ld hl,WouldYouLikeToSaveText
call SaveSAVConfirm
@@ -149,22 +149,22 @@ SaveSAV: ;$770a
call SaveSAVConfirm
and a
ret nz
-.save ;$772d
- call SaveSAVtoSRAM ;$7848
+.save
+ call SaveSAVtoSRAM
hlCoord 1, 13
ld bc,$0412
call ClearScreenArea ; clear area 4x12 starting at 13,1
hlCoord 1, 14
ld de,NowSavingString
call PlaceString
- ld c,$78
+ ld c,120
call DelayFrames
ld hl,GameSavedText
call PrintText
ld a, (SFX_02_5d - SFX_Headers_02) / 3 ;sound for saved game
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
- ld c,$1e
+ ld c,30
jp DelayFrames
NowSavingString:
@@ -292,7 +292,7 @@ SAVCheckSum: ; 73856 (1c:7856)
Func_73863: ; 73863 (1c:7863)
ld hl, $a000
- ld de, S_SAVEDBOXESCHECKSUM2 ; $ba4d
+ ld de, S_SAVEDBOXES1CHECKSUM2 ; S_SAVEDBOXES2CHECKSUM2
ld b, $6
.asm_7386b
push bc
@@ -308,7 +308,7 @@ Func_73863: ; 73863 (1c:7863)
ret
Func_7387b: ; 7387b (1c:787b)
- ld hl, PointerTable_73895 ; $7895
+ ld hl, PointerTable_73895
ld a, [wd5a0]
and $7f
cp $6
@@ -327,12 +327,12 @@ Func_7387b: ; 7387b (1c:787b)
ret
PointerTable_73895: ; 73895 (1c:7895)
- dw S_SAVEDBOX1
- dw S_SAVEDBOX2
- dw S_SAVEDBOX3
- dw S_SAVEDBOX4
- dw S_SAVEDBOX5
- dw S_SAVEDBOX6
+ dw S_SAVEDBOX1 ; S_SAVEDBOX7
+ dw S_SAVEDBOX2 ; S_SAVEDBOX8
+ dw S_SAVEDBOX3 ; S_SAVEDBOX9
+ dw S_SAVEDBOX4 ; S_SAVEDBOX10
+ dw S_SAVEDBOX5 ; S_SAVEDBOX11
+ dw S_SAVEDBOX6 ; S_SAVEDBOX12
ChangeBox:: ; 738a1 (1c:78a1)
ld hl, WhenYouChangeBoxText
@@ -402,7 +402,7 @@ Func_7390e: ; 7390e (1c:790e)
ld hl, $a000
ld bc, $1a4c
call SAVCheckSum
- ld [S_SAVEDBOXESCHECKSUM], a
+ ld [S_SAVEDBOXES1CHECKSUM], a ; S_SAVEDBOXES2CHECKSUM
call Func_73863
xor a
ld [MBC1SRamBankingMode], a
@@ -411,21 +411,21 @@ Func_7390e: ; 7390e (1c:790e)
Func_7393f: ; 7393f (1c:793f)
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ld a, $3
- ld [wMenuWatchedKeys], a ; wMenuWatchedKeys
+ ld [wMenuWatchedKeys], a
ld a, $b
- ld [wMaxMenuItem], a ; wMaxMenuItem
+ ld [wMaxMenuItem], a
ld a, $1
- ld [wTopMenuItemY], a ; wTopMenuItemY
+ ld [wTopMenuItemY], a
ld a, $c
- ld [wTopMenuItemX], a ; wTopMenuItemX
+ ld [wTopMenuItemX], a
xor a
ld [wcc37], a
ld a, [wd5a0]
and $7f
- ld [wCurrentMenuItem], a ; wCurrentMenuItem
- ld [wLastMenuItem], a ; wLastMenuItem
+ ld [wCurrentMenuItem], a
+ ld [wLastMenuItem], a
ld hl, wTileMap
ld b, $2
ld c, $9
@@ -438,7 +438,7 @@ Func_7393f: ; 7393f (1c:793f)
call TextBoxBorder
ld hl, hFlags_0xFFF6
set 2, [hl]
- ld de, BoxNames ; $79d9
+ ld de, BoxNames
hlCoord 13, 1
call PlaceString
ld hl, hFlags_0xFFF6
@@ -461,7 +461,7 @@ Func_7393f: ; 7393f (1c:793f)
call PlaceString
call Func_73a84
hlCoord 18, 1
- ld de, wWhichTrade ; wWhichTrade
+ ld de, wWhichTrade
ld bc, $14
ld a, $c
.asm_739c2
@@ -477,7 +477,7 @@ Func_7393f: ; 7393f (1c:793f)
dec a
jr nz, .asm_739c2
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ret
ChooseABoxText: ; 739d4 (1c:79d4)
@@ -518,22 +518,22 @@ Func_73a29: ; 73a29 (1c:7a29)
ret
Func_73a4b: ; 73a4b (1c:7a4b)
- ld hl, S_SAVEDBOX1
+ ld hl, S_SAVEDBOX1 ; S_SAVEDBOX7
call Func_73a7f
- ld hl, S_SAVEDBOX2
+ ld hl, S_SAVEDBOX2 ; S_SAVEDBOX8
call Func_73a7f
- ld hl, S_SAVEDBOX3
+ ld hl, S_SAVEDBOX3 ; S_SAVEDBOX9
call Func_73a7f
- ld hl, S_SAVEDBOX4
+ ld hl, S_SAVEDBOX4 ; S_SAVEDBOX10
call Func_73a7f
- ld hl, S_SAVEDBOX5
+ ld hl, S_SAVEDBOX5 ; S_SAVEDBOX11
call Func_73a7f
- ld hl, S_SAVEDBOX6
+ ld hl, S_SAVEDBOX6 ; S_SAVEDBOX12
call Func_73a7f
- ld hl, S_SAVEDBOX1
+ ld hl, S_SAVEDBOX1 ; S_SAVEDBOX7
ld bc, $6 * (S_SAVEDBOX2 - S_SAVEDBOX1) ; $1a4c
call SAVCheckSum
- ld [S_SAVEDBOXESCHECKSUM], a
+ ld [S_SAVEDBOXES1CHECKSUM], a ; S_SAVEDBOXES2CHECKSUM
call Func_73863
ret
@@ -545,7 +545,7 @@ Func_73a7f: ; 73a7f (1c:7a7f)
ret
Func_73a84: ; 73a84 (1c:7a84)
- ld hl, wWhichTrade ; wWhichTrade
+ ld hl, wWhichTrade
push hl
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
@@ -566,29 +566,29 @@ Func_73a84: ; 73a84 (1c:7a84)
ld c, a
ld b, $0
add hl, bc
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
ld [hl], a
ret
Func_73ab8: ; 73ab8 (1c:7ab8)
- ld a, [S_SAVEDBOX1]
+ ld a, [S_SAVEDBOX1] ; S_SAVEDBOX7
ld [hli], a
- ld a, [S_SAVEDBOX2]
+ ld a, [S_SAVEDBOX2] ; S_SAVEDBOX8
ld [hli], a
- ld a, [S_SAVEDBOX3]
+ ld a, [S_SAVEDBOX3] ; S_SAVEDBOX9
ld [hli], a
- ld a, [S_SAVEDBOX4]
+ ld a, [S_SAVEDBOX4] ; S_SAVEDBOX10
ld [hli], a
- ld a, [S_SAVEDBOX5]
+ ld a, [S_SAVEDBOX5] ; S_SAVEDBOX11
ld [hli], a
- ld a, [S_SAVEDBOX6]
+ ld a, [S_SAVEDBOX6] ; S_SAVEDBOX12
ld [hli], a
ret
-SAVCheckRandomID: ;$7ad1
+SAVCheckRandomID: ; 73ad1 (1c:7ad1)
;checks if Sav file is the same by checking player's name 1st letter ($a598)
; and the two random numbers generated at game beginning
-;(which are stored at wPlayerID)
+;(which are stored at wPlayerID)s
ld a,$0a
ld [$0000],a
ld a,$01
@@ -646,7 +646,7 @@ SaveHallOfFameTeams: ; 73b0d (1c:7b0d)
LoadHallOfFameTeams: ; 73b3f (1c:7b3f)
ld hl, sHallOfFame
ld bc, HOF_TEAM
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
call AddNTimes
ld de, wcc5b
ld bc, HOF_TEAM
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index e3e452f3..0b9f8bc9 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -128,7 +128,7 @@ MainSlotMachineLoop: ; 37395 (d:7395)
jr nz, .skip2
ld hl, OutOfCoinsSlotMachineText
call PrintText
- ld c, $3c
+ ld c, 60
jp DelayFrames
.skip2
ld hl, OneMoreGoSlotMachineText
@@ -202,13 +202,13 @@ SlotMachine_37480: ; 37480 (d:7480)
ret
SlotMachine_374ad: ; 374ad (d:74ad)
- ld c, $14
+ ld c, 20
.loop1
push bc
call SlotMachine_37813
call SlotMachine_37823
call SlotMachine_37833
- ld c, $2
+ ld c, 2
call DelayFrames
pop bc
dec c
@@ -437,7 +437,7 @@ SlotMachine_37588: ; 37588 (d:7588)
ld a, [$ff47]
xor $40
ld [$ff47], a
- ld c, $5
+ ld c, 5
call DelayFrames
dec b
jr nz, .asm_37638
@@ -456,7 +456,7 @@ SlotMachine_37588: ; 37588 (d:7588)
jp .loop
SlotsMachineText_37665: ; 37665 (d:7665)
- db $08 ; asm
+ TX_ASM
push bc
call SlotMachine_37728
ld hl, LinedUpText
@@ -674,7 +674,7 @@ SlotMachine_3776b: ; 3776b (d:776b)
ld [W_SUBANIMTRANSFORM], a
ld a, [wTrainerScreenX]
cp $7
- ld c, $8
+ ld c, 8
jr nc, .skip2
srl c
.skip2
diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm
index ed23fbc4..e582d1be 100755
--- a/engine/titlescreen.asm
+++ b/engine/titlescreen.asm
@@ -5,10 +5,10 @@ CopyFixedLengthText: ; 42b1 (1:42b1)
SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
ld hl, NintenText
- ld de, wPlayerName ; wd158
+ ld de, wPlayerName
call CopyFixedLengthText
ld hl, SonyText
- ld de, W_RIVALNAME ; wd34a
+ ld de, W_RIVALNAME
call CopyFixedLengthText
xor a
ld [hWY], a
@@ -24,7 +24,7 @@ SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
LoadTitlescreenGraphics: ; 42dd (1:42dd)
call GBPalWhiteOut
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
xor a
ld [hTilesetType], a
ld [hSCX], a
@@ -35,27 +35,27 @@ LoadTitlescreenGraphics: ; 42dd (1:42dd)
call ClearScreen
call DisableLCD
call LoadFontTilePatterns
- ld hl, NintendoCopyrightLogoGraphics ; $60c8
+ ld hl, NintendoCopyrightLogoGraphics
ld de, vTitleLogo2 + $100
ld bc, $50
ld a, BANK(NintendoCopyrightLogoGraphics)
call FarCopyData2
- ld hl, GamefreakLogoGraphics ; $61f8
+ ld hl, GamefreakLogoGraphics
ld de, vTitleLogo2 + $100 + $50
ld bc, $90
ld a, BANK(GamefreakLogoGraphics)
call FarCopyData2
- ld hl, PokemonLogoGraphics ; $5380
+ ld hl, PokemonLogoGraphics
ld de, vTitleLogo
ld bc, $600
ld a, BANK(PokemonLogoGraphics)
call FarCopyData2 ; first chunk
- ld hl, PokemonLogoGraphics+$600 ; $5980
+ ld hl, PokemonLogoGraphics+$600
ld de, vTitleLogo2
ld bc, $100
ld a, BANK(PokemonLogoGraphics)
call FarCopyData2 ; second chunk
- ld hl, Version_GFX ; $402f
+ ld hl, Version_GFX
IF DEF(_RED)
ld de,vChars2 + $600
ld bc,$50
@@ -97,7 +97,7 @@ ENDC
ld a, $74
ld [hl], a
hlCoord 2, 17
- ld de, .titlescreenTilemap ; $437f
+ ld de, .titlescreenTilemap
ld b, $10
.asm_4377
ld a, [de]
@@ -121,7 +121,7 @@ IF DEF(_BLUE)
ld a,SQUIRTLE ; which Pokemon to show first on the title screen
ENDC
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
call Func_4524
ld a, $9b
call Func_4533
@@ -135,9 +135,9 @@ ENDC
call GoPAL_SET
call GBPalNormal
ld a, $e4
- ld [rOBP0], a ; $ff48
+ ld [rOBP0], a
ld bc, $ffaf ; background scroll Y
- ld hl, .TitleScreenPokemonLogoYScrolls ; $43db
+ ld hl, .TitleScreenPokemonLogoYScrolls
.asm_43c6
ld a, [hli]
and a
@@ -176,7 +176,7 @@ ENDC
ret
.asm_43f4
call LoadScreenTilesFromBuffer1
- ld c, $24
+ ld c, 36
call DelayFrames
ld a, (SFX_1f_63 - SFX_Headers_1f) / 3
call PlaySound
@@ -219,7 +219,7 @@ ENDC
call Func_4496
jr .asm_443b
.asm_4459
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
call PlayCry
call WaitForSoundToFinish
call GBPalWhiteOutWithDelay3
@@ -227,7 +227,7 @@ ENDC
xor a
ld [hWY], a
inc a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
call ClearScreen
ld a, $98
call Func_4533
@@ -260,7 +260,7 @@ Func_4496: ; 4496 (1:4496)
ld hl, TitleMons
add hl, bc
ld a, [hl]
- ld hl, wWhichTrade ; wWhichTrade
+ ld hl, wWhichTrade
; Can't be the same as before.
cp [hl]
@@ -289,7 +289,7 @@ Func_44cf: ; 44cf (1:44cf)
jr nz, .wait
ld a, h
- ld [rSCX], a ; $ff43
+ ld [rSCX], a
.wait2
ld a, [$ff44] ; rLY
@@ -298,14 +298,14 @@ Func_44cf: ; 44cf (1:44cf)
ret
Func_44dd: ; 44dd (1:44dd)
- ld hl, PlayerCharacterTitleGraphics ; $66a8
+ ld hl, PlayerCharacterTitleGraphics
ld de, vSprites
ld bc, $230
ld a, BANK(PlayerCharacterTitleGraphics)
call FarCopyData2
call ClearSprites
xor a
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
ld hl, wOAMBuffer
ld de, $605a
ld b, $7
@@ -319,10 +319,10 @@ Func_44dd: ; 44dd (1:44dd)
ld [hli], a
add $8
ld e, a
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld [hli], a
inc a
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
inc hl
dec c
jr nz, .asm_44fd
@@ -358,12 +358,12 @@ LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538)
call LoadTextBoxTilePatterns
LoadCopyrightTiles: ; 4541 (1:4541)
- ld de, NintendoCopyrightLogoGraphics ; $60c8
+ ld de, NintendoCopyrightLogoGraphics
ld hl, vChars2 + $600
ld bc, (BANK(NintendoCopyrightLogoGraphics) << 8) + $1c
call CopyVideoData
hlCoord 2, 7
- ld de, CopyrightTextString ; $4556
+ ld de, CopyrightTextString
jp PlaceString
CopyrightTextString: ; 4556 (1:4556)
diff --git a/engine/titlescreen2.asm b/engine/titlescreen2.asm
index dc1c633a..57e5c3d5 100755
--- a/engine/titlescreen2.asm
+++ b/engine/titlescreen2.asm
@@ -74,7 +74,7 @@ _TitleScroll: ; 3726a (d:726a)
jr nz, .wait
ld a, h
- ld [rSCX], a ; $ff43
+ ld [rSCX], a
.wait2
ld a, [$ff44] ; rLY
@@ -89,7 +89,7 @@ TitleBallYTable: ; 372a0 (d:72a0)
Func_372ac: ; 372ac (d:72ac)
; Animate the TitleBall if a starter just got scrolled out.
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
cp STARTER1
jr z, .ok
cp STARTER2
diff --git a/engine/town_map.asm b/engine/town_map.asm
index 5a718519..0dd84226 100755
--- a/engine/town_map.asm
+++ b/engine/town_map.asm
@@ -7,7 +7,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
push hl
ld a, $1
ld [hJoy7], a
- ld a, [W_CURMAP] ; W_CURMAP
+ ld a, [W_CURMAP]
push af
ld b, $0
call Func_711c4
@@ -19,11 +19,11 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
ld bc, $10
call CopyData
ld hl, vSprites + $40
- ld de, TownMapCursor ; $4f40
+ ld de, TownMapCursor
ld bc, (BANK(TownMapCursor) << 8) + $04
call CopyVideoDataDouble
xor a
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
pop af
jr Func_70e92
@@ -31,8 +31,8 @@ Func_70e7e: ; 70e7e (1c:4e7e)
ld hl, wTileMap
ld bc, $114
call ClearScreenArea
- ld hl, TownMapOrder ; $4f11
- ld a, [wWhichTrade] ; wWhichTrade
+ ld hl, TownMapOrder
+ ld a, [wWhichTrade]
ld c, a
ld b, $0
add hl, bc
@@ -86,22 +86,22 @@ Func_70e92: ; 70e92 (1c:4e92)
ld [hl], a
ret
.asm_70ef2
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
inc a
cp $2f
jr nz, .asm_70efb
xor a
.asm_70efb
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
jp Func_70e7e
.asm_70f01
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
dec a
cp $ff
jr nz, .asm_70f0b
ld a, $2e
.asm_70f0b
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
jp Func_70e7e
INCLUDE "data/town_map_order.asm"
@@ -139,11 +139,11 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
call LoadTownMap
call LoadPlayerSpriteGraphics
call LoadFontTilePatterns
- ld de, BirdSprite ; $4d80
+ ld de, BirdSprite
ld hl, vSprites + $40
ld bc, (BANK(BirdSprite) << 8) + $0c
call CopyVideoData
- ld de, TownMapUpArrow ; $5093
+ ld de, TownMapUpArrow
ld hl, vChars1 + $6d0
ld bc, (BANK(TownMapUpArrow) << 8) + $01
call CopyVideoDataDouble
@@ -156,7 +156,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
ld hl, wTileMap
ld de, ToText
call PlaceString
- ld a, [W_CURMAP] ; W_CURMAP
+ ld a, [W_CURMAP]
ld b, $0
call Func_711c4
ld hl, wTrainerEngageDistance
@@ -177,7 +177,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
hlCoord 3, 0
ld de, wcd6d
call PlaceString
- ld c, $f
+ ld c, 15
call DelayFrames
hlCoord 18, 0
ld [hl], $ed
@@ -248,7 +248,7 @@ ToText: ; 7106d (1c:506d)
db "To@"
Func_71070: ; 71070 (1c:5070)
- ld hl, wWhichTrade ; wWhichTrade
+ ld hl, wWhichTrade
ld [hl], $ff
inc hl
ld a, [W_TOWNVISITEDFLAG]
@@ -283,18 +283,18 @@ LoadTownMap: ; 7109b (1c:509b)
ld c, $12
call TextBoxBorder
call DisableLCD
- ld hl, WorldMapTileGraphics ; $65a8
+ ld hl, WorldMapTileGraphics
ld de, vChars2 + $600
ld bc, $100
ld a, BANK(WorldMapTileGraphics)
call FarCopyData2
- ld hl, MonNestIcon ; $56be
+ ld hl, MonNestIcon
ld de, vSprites + $40
ld bc, $8
ld a, BANK(MonNestIcon)
call FarCopyDataDouble
ld hl, wTileMap
- ld de, CompressedMap ; $5100
+ ld de, CompressedMap
.asm_710d3
ld a, [de]
and a
@@ -401,7 +401,7 @@ Func_711ef: ; 711ef (1c:51ef)
call PlaceString
jr .asm_7123e
.asm_71236
- ld a, [W_CURMAP] ; W_CURMAP
+ ld a, [W_CURMAP]
ld b, $0
call Func_711c4
.asm_7123e
@@ -545,7 +545,7 @@ Func_712f1: ; 712f1 (1c:52f1)
cp REDS_HOUSE_1F
jr c, .asm_71304
ld bc, $4
- ld hl, InternalMapEntries ; $5382
+ ld hl, InternalMapEntries
.asm_712fb
cp [hl]
jr c, .asm_71301
@@ -555,7 +555,7 @@ Func_712f1: ; 712f1 (1c:52f1)
inc hl
jr .asm_7130d
.asm_71304
- ld hl, ExternalMapEntries ; $5313
+ ld hl, ExternalMapEntries
ld c, a
ld b, $0
add hl, bc
diff --git a/engine/trade.asm b/engine/trade.asm
index bb4fa4e1..6309e8d5 100755
--- a/engine/trade.asm
+++ b/engine/trade.asm
@@ -662,7 +662,7 @@ Trade_AnimMonMoveVertical: ; 41525 (10:5525)
.loop
call Trade_AddOffsetsToOAMCoords
call Trade_AnimCircledMon
- ld c, $8
+ ld c, 8
call DelayFrames
dec d
jr nz, .loop
diff --git a/home.asm b/home.asm
index 53d08d64..06a0aec3 100644
--- a/home.asm
+++ b/home.asm
@@ -154,7 +154,7 @@ LoadDestinationWarpPosition:: ; 1313 (0:1313)
push af
ld a,[wPredefParentBank]
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ld a,b
add a
add a
@@ -166,7 +166,7 @@ LoadDestinationWarpPosition:: ; 1313 (0:1313)
call CopyData
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
@@ -258,7 +258,7 @@ LoadMonData:: ; 1372 (0:1372)
jp Bankswitch
-Func_137a:: ; 137a (0:137a)
+OverwritewMoves:: ; 137a (0:137a)
; Write c to [wMoves + b]. Unused.
ld hl, wMoves
ld e, b
@@ -299,17 +299,17 @@ LoadFrontSpriteByMonIndex:: ; 1389 (0:1389)
pop hl
ld a, [H_LOADEDROMBANK]
push af
- ld a, Bank(asm_3f0d0)
+ ld a, Bank(CopyUncompressedPicToHL)
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
xor a
ld [$ffe1], a
- call asm_3f0d0
+ call CopyUncompressedPicToHL
xor a
ld [W_SPRITEFLIPPED], a
pop af
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ret
@@ -499,17 +499,17 @@ PrintStatusCondition:: ; 14e1 (0:14e1)
ld [hl],"T"
and a
ret
-PrintStatusConditionNotFainted ; 14f6
+PrintStatusConditionNotFainted: ; 14f6
ld a,[H_LOADEDROMBANK]
push af
ld a,BANK(PrintStatusAilment)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
call PrintStatusAilment ; print status condition
pop bc
ld a,b
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; function to print pokemon level, leaving off the ":L" if the level is at least 100
@@ -544,8 +544,8 @@ PrintLevelCommon:: ; 1523 (0:1523)
ld b,$41 ; no leading zeroes, left-aligned, one byte
jp PrintNumber
-Func_152e:: ; 152e (0:152e)
-; Unused.
+GetwMoves:: ; 152e (0:152e)
+; Unused. Returns the move at index a from wMoves in a
ld hl,wMoves
ld c,a
ld b,0
@@ -561,7 +561,7 @@ GetMonHeader:: ; 1537 (0:1537)
push af
ld a,BANK(BaseStats)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
push bc
push de
push hl
@@ -616,7 +616,7 @@ GetMonHeader:: ; 1537 (0:1537)
pop bc
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; copy party pokemon's name to wcd6d
@@ -800,7 +800,7 @@ LoadUncompressedSpriteData:: ; 1672 (0:1672)
add a
add a
add a ; 8*tiles is height in bytes
- ld [H_SPRITEHEIGHT], a ; $ff8c
+ ld [H_SPRITEHEIGHT], a
ld a, $7
sub b ; 7-h ; skip for vertical center (in tiles, relative to current column)
ld b, a
@@ -832,11 +832,11 @@ AlignSpriteDataCentered:: ; 16c2 (0:16c2)
ld b, $0
ld c, a
add hl, bc
- ld a, [H_SPRITEWIDTH] ; $ff8b
+ ld a, [H_SPRITEWIDTH]
.columnLoop
push af
push hl
- ld a, [H_SPRITEHEIGHT] ; $ff8c
+ ld a, [H_SPRITEHEIGHT]
ld c, a
.columnInnerLoop
ld a, [de]
@@ -875,7 +875,7 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea)
ld de, S_SPRITEBUFFER1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1
ld bc, S_SPRITEBUFFER0 + (SPRITEBUFFERSIZE - 1) ; source 1: end of buffer 0
ld a, SPRITEBUFFERSIZE/2 ; $c4
- ld [H_SPRITEINTERLACECOUNTER], a ; $ff8b
+ ld [H_SPRITEINTERLACECOUNTER], a
.interlaceLoop
ld a, [de]
dec de
@@ -889,9 +889,9 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea)
ld a, [bc]
dec bc
ld [hld], a ; write byte of source 1
- ld a, [H_SPRITEINTERLACECOUNTER] ; $ff8b
+ ld a, [H_SPRITEINTERLACECOUNTER]
dec a
- ld [H_SPRITEINTERLACECOUNTER], a ; $ff8b
+ ld [H_SPRITEINTERLACECOUNTER], a
jr nz, .interlaceLoop
ld a, [W_SPRITEFLIPPED]
and a
@@ -934,11 +934,11 @@ UpdateSprites:: ; 2429 (0:2429)
push af
ld a, Bank(_UpdateSprites)
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
call _UpdateSprites
pop af
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ret
INCLUDE "data/mart_inventories.asm"
@@ -971,7 +971,7 @@ PokeCenterSignText:: ; 24ef (0:24ef)
Predef5CText:: ; 24f4 (0:24f4)
; XXX better label (what does predef $5C do?)
- db $08 ; asm
+ TX_ASM
predef PickupItem
jp TextScriptEnd
@@ -1130,7 +1130,7 @@ DisplayTextID:: ; 2920 (0:2920)
jp z,FuncTX_PokemonCenterPC
cp a,$f5 ; Vending Machine
jr nz,.notVendingMachine
- callba VendingMachineMenu ; jump banks to vending machine routine
+ callba VendingMachineMenu ; jump banks to vending machine routine
jr AfterDisplayingTextID
.notVendingMachine
cp a,$f7 ; slot machine
@@ -1181,7 +1181,7 @@ CloseTextDisplay:: ; 29e8 (0:29e8)
jr nz,.restoreSpriteFacingDirectionLoop
ld a,BANK(InitMapSprites)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
call InitMapSprites ; reload sprite tile pattern data (since it was partially overwritten by text tile patterns)
ld hl,wFontLoaded
res 0,[hl]
@@ -1191,7 +1191,7 @@ CloseTextDisplay:: ; 29e8 (0:29e8)
call LoadCurrentMapView
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
jp UpdateSprites
DisplayPokemartDialogue:: ; 2a2e (0:2a2e)
@@ -1207,11 +1207,11 @@ DisplayPokemartDialogue:: ; 2a2e (0:2a2e)
push af
ld a,Bank(DisplayPokemartDialogue_)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
call DisplayPokemartDialogue_
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
jp AfterDisplayingTextID
PokemartGreetingText:: ; 2a55 (0:2a55)
@@ -1244,11 +1244,11 @@ DisplayPokemonCenterDialogue:: ; 2a72 (0:2a72)
push af
ld a,Bank(DisplayPokemonCenterDialogue_)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
call DisplayPokemonCenterDialogue_
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
jp AfterDisplayingTextID
DisplaySafariGameOverText:: ; 2a90 (0:2a90)
@@ -1329,8 +1329,8 @@ AddAmountSoldToMoney:: ; 2b9e (0:2b9e)
ld [wTextBoxID],a
call DisplayTextBoxID ; redraw money text box
ld a, (SFX_02_5a - SFX_Headers_02) / 3
- call PlaySoundWaitForCurrent ; play sound
- jp WaitForSoundToFinish ; wait until sound is done playing
+ call PlaySoundWaitForCurrent
+ jp WaitForSoundToFinish
; function to remove an item (in varying quantities) from the player's bag or PC box
; INPUT:
@@ -1342,11 +1342,11 @@ RemoveItemFromInventory:: ; 2bbb (0:2bbb)
push af
ld a,BANK(RemoveItemFromInventory_)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
call RemoveItemFromInventory_
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; function to add an item (in varying quantities) to the player's bag or PC box
@@ -1361,12 +1361,12 @@ AddItemToInventory:: ; 2bcf (0:2bcf)
push af
ld a,BANK(AddItemToInventory_)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
call AddItemToInventory_
pop bc
ld a,b
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
pop bc
ret
@@ -1408,7 +1408,7 @@ DisplayListMenuID:: ; 2be6 (0:2be6)
ld a,[wListMenuID]
and a ; is it a PC pokemon list?
jr nz,.skipMovingSprites
- call UpdateSprites ; move sprites
+ call UpdateSprites
.skipMovingSprites
ld a,1 ; max menu item ID is 1 if the list has less than 2 entries
ld [wcc37],a
@@ -1900,7 +1900,7 @@ GetMonName:: ; 2f9e (0:2f9e)
push af
ld a,BANK(MonsterNames) ; 07
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ld a,[wd11e]
dec a
ld hl,MonsterNames ; 421E
@@ -1916,7 +1916,7 @@ GetMonName:: ; 2f9e (0:2f9e)
pop de
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
pop hl
ret
@@ -2051,7 +2051,7 @@ ReloadMapData:: ; 3071 (0:3071)
call EnableLCD
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; reloads tileset tile patterns
@@ -2065,7 +2065,7 @@ ReloadTilesetTilePatterns:: ; 3090 (0:3090)
call EnableLCD
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; shows the town map and lets the player choose a destination to fly to
@@ -2109,12 +2109,12 @@ TossItem:: ; 30c4 (0:30c4)
push af
ld a,BANK(TossItem_)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
call TossItem_
pop de
ld a,d
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; checks if an item is a key item
@@ -2142,12 +2142,12 @@ DisplayTextBoxID:: ; 30e8 (0:30e8)
push af
ld a,BANK(DisplayTextBoxID_)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
call DisplayTextBoxID_
pop bc
ld a,b
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; not zero if an NPC movement script is running, the player character is
@@ -2184,12 +2184,12 @@ RunNPCMovementScript:: ; 310e (0:310e)
push af
ld a, [wNPCMovementScriptBank]
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ld a, [wNPCMovementScriptFunctionNum]
call CallFunctionInTable
pop af
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ret
.NPCMovementScriptPointerTables
dw ProfOakMovementScriptPointerTable
@@ -2312,7 +2312,7 @@ TalkToTrainer:: ; 31cc (0:31cc)
ld a, $6
call ReadTrainerHeaderInfo ; print after battle text
jp PrintText
-.trainerNotYetFought ; 0x31ed
+.trainerNotYetFought
ld a, $4
call ReadTrainerHeaderInfo ; print before battle text
call PrintText
@@ -2354,7 +2354,7 @@ CheckFightingMapTrainers:: ; 3219 (0:3219)
ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
xor a
- ldh [$b4], a
+ ld [hJoyHeld], a
call TrainerWalkUpToPlayer_Bank0
ld hl, W_CURMAPSCRIPT
inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle)
@@ -2392,7 +2392,7 @@ EndTrainerBattle:: ; 3275 (0:3275)
res 7, [hl]
ld hl, wFlags_0xcd60
res 0, [hl] ; player is no longer engaged by any trainer
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, ResetButtonPressedAndMapScript
ld a, $2
@@ -2436,32 +2436,32 @@ TrainerWalkUpToPlayer_Bank0:: ; 32cf (0:32cf)
; sets opponent type and mon set/lvl based on the engaging trainer data
InitBattleEnemyParameters:: ; 32d7 (0:32d7)
ld a, [wEngagedTrainerClass]
- ld [W_CUROPPONENT], a ; wd059
+ ld [W_CUROPPONENT], a
ld [W_ENEMYMONORTRAINERCLASS], a
cp $c8
- ld a, [wEngagedTrainerSet] ; wcd2e
+ ld a, [wEngagedTrainerSet]
jr c, .noTrainer
- ld [W_TRAINERNO], a ; wd05d
+ ld [W_TRAINERNO], a
ret
.noTrainer
- ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
+ ld [W_CURENEMYLVL], a
ret
GetSpritePosition1:: ; 32ef (0:32ef)
ld hl, _GetSpritePosition1
- jr asm_3301
+ jr SpritePositionBankswitch
GetSpritePosition2:: ; 32f4 (0:32f4)
ld hl, _GetSpritePosition2
- jr asm_3301 ; 0x32f7 $8
+ jr SpritePositionBankswitch
SetSpritePosition1:: ; 32f9 (0:32f9)
ld hl, _SetSpritePosition1
- jr asm_3301
+ jr SpritePositionBankswitch
SetSpritePosition2:: ; 32fe (0:32fe)
ld hl, _SetSpritePosition2
-asm_3301:: ; 3301 (0:3301)
+SpritePositionBankswitch:: ; 3301 (0:3301)
ld b, BANK(_GetSpritePosition1) ; BANK(_GetSpritePosition2), BANK(_SetSpritePosition1), BANK(_SetSpritePosition2)
jp Bankswitch ; indirect jump to one of the four functions
@@ -2497,11 +2497,11 @@ CheckForEngagingTrainers:: ; 3306 (0:3306)
ld [wTrainerEngageDistance], a
ld a, [wSpriteIndex]
swap a
- ld [wTrainerSpriteOffset], a ; wWhichTrade
+ ld [wTrainerSpriteOffset], a
predef TrainerEngage
pop de
pop hl
- ld a, [wTrainerSpriteOffset] ; wWhichTrade
+ ld a, [wTrainerSpriteOffset]
and a
ret nz ; break if the trainer is engaging
.trainerAlreadyFought
@@ -2539,7 +2539,7 @@ EngageMapTrainer:: ; 336a (0:336a)
ld a, [hli] ; load trainer class
ld [wEngagedTrainerClass], a
ld a, [hl] ; load trainer mon set
- ld [wEnemyMonAttackMod], a ; wcd2e
+ ld [wEnemyMonAttackMod], a
jp PlayTrainerMusic
PrintEndBattleText:: ; 3381 (0:3381)
@@ -2584,13 +2584,15 @@ GetSavedEndBattleTextPointer:: ; 33b7 (0:33b7)
TrainerEndBattleText:: ; 33cf (0:33cf)
TX_FAR _TrainerNameText
- db $08
+ TX_ASM
call GetSavedEndBattleTextPointer
call TextCommandProcessor
jp TextScriptEnd
+; only engage withe trainer if the player is not already
+; engaged with another trainer
; XXX unused?
-Func_33dd:: ; 33dd (0:33dd)
+CheckIfAlreadyEngaged:: ; 33dd (0:33dd)
ld a, [wFlags_0xcd60]
bit 0, a
ret nz
@@ -2606,13 +2608,13 @@ PlayTrainerMusic:: ; 33e8 (0:33e8)
ret z
cp $c8 + SONY3
ret z
- ld a, [W_GYMLEADERNO] ; W_GYMLEADERNO
+ ld a, [W_GYMLEADERNO]
and a
ret nz
xor a
ld [wMusicHeaderPointer], a
ld a, $ff
- call PlaySound ; stop music
+ call PlaySound
ld a, BANK(Music_MeetEvilTrainer)
ld [wc0ef], a
ld [wc0f0], a
@@ -2719,13 +2721,13 @@ IsItemInBag:: ; 3493 (0:3493)
DisplayPokedex:: ; 349b (0:349b)
ld [wd11e], a
- ld b, BANK(Func_7c18)
- ld hl, Func_7c18
+ ld b, BANK(_DisplayPokedex)
+ ld hl, _DisplayPokedex
jp Bankswitch
SetSpriteFacingDirectionAndDelay:: ; 34a6 (0:34a6)
call SetSpriteFacingDirection
- ld c, $6
+ ld c, 6
jp DelayFrames
SetSpriteFacingDirection:: ; 34ae (0:34ae)
@@ -2842,7 +2844,7 @@ DecodeRLEList:: ; 350c (0:350c)
ld a, [wRLEByteCount]
add c
ld [wRLEByteCount], a ; update total number of written bytes
- ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b
+ ld a, [H_DOWNARROWBLINKCNT1]
call FillMemory ; write a c-times to output
inc de
jr .listLoop
@@ -2903,7 +2905,7 @@ GetTrainerInformation:: ; 3566 (0:3566)
jr nz, .linkBattle
ld a, Bank(TrainerPicAndMoneyPointers)
call BankswitchHome
- ld a, [W_TRAINERCLASS] ; wd031
+ ld a, [W_TRAINERCLASS]
dec a
ld hl, TrainerPicAndMoneyPointers
ld bc, $5
@@ -2960,14 +2962,14 @@ BankswitchHome:: ; 35bc (0:35bc)
ld [wcf08],a
ld a,[wcf09]
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
BankswitchBack:: ; 35cd (0:35cd)
; returns from BankswitchHome
ld a,[wcf08]
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
Bankswitch:: ; 35d6 (0:35d6)
@@ -2977,7 +2979,7 @@ Bankswitch:: ; 35d6 (0:35d6)
push af
ld a,b
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ld bc,.Return
push bc
jp [hl]
@@ -2985,7 +2987,7 @@ Bankswitch:: ; 35d6 (0:35d6)
pop bc
ld a,b
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; displays yes/no choice
@@ -3178,13 +3180,13 @@ SaveScreenTilesToBuffer2:: ; 36f4 (0:36f4)
LoadScreenTilesFromBuffer2:: ; 3701 (0:3701)
call LoadScreenTilesFromBuffer2DisableBGTransfer
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ret
; loads screen tiles stored in wTileMapBackup2 but leaves H_AUTOBGTRANSFERENABLED disabled
LoadScreenTilesFromBuffer2DisableBGTransfer:: ; 3709 (0:3709)
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ld hl, wTileMapBackup2
ld de, wTileMap
ld bc, $168
@@ -3199,13 +3201,13 @@ SaveScreenTilesToBuffer1:: ; 3719 (0:3719)
LoadScreenTilesFromBuffer1:: ; 3725 (0:3725)
xor a
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ld hl, wTileMapBackup
ld de, wTileMap
ld bc, $168
call CopyData
ld a, $1
- ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
+ ld [H_AUTOBGTRANSFERENABLED], a
ret
DelayFrames:: ; 3739 (0:3739)
@@ -3279,11 +3281,11 @@ GetName:: ; 376b (0:376b)
ld e,l
ld d,h
jr .gotPtr
-.otherEntries ; $378d
+.otherEntries
;2-7 = OTHER ENTRIES
ld a,[wPredefBank]
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ld a,[wNameListType] ;VariousNames' entryID
dec a
add a
@@ -3291,7 +3293,7 @@ GetName:: ; 376b (0:376b)
ld e,a
jr nc,.skip
inc d
-.skip ; $37a0
+.skip
ld hl,NamePointers
add hl,de
ld a,[hli]
@@ -3321,7 +3323,7 @@ GetName:: ; 376b (0:376b)
ld de,wcd6d
ld bc,$0014
call CopyData
-.gotPtr ; $37cd
+.gotPtr
ld a,e
ld [wcf8d],a
ld a,d
@@ -3331,7 +3333,7 @@ GetName:: ; 376b (0:376b)
pop hl
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
GetItemPrice:: ; 37df (0:37df)
@@ -3346,7 +3348,7 @@ GetItemPrice:: ; 37df (0:37df)
ld a, $f ; hardcoded Bank
.asm_37ed
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ld hl, wItemPrices
ld a, [hli]
ld h, [hl]
@@ -3370,13 +3372,13 @@ GetItemPrice:: ; 37df (0:37df)
.getTMPrice
ld a, Bank(GetMachinePrice)
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
call GetMachinePrice
.asm_381c
ld de, hItemPrice
pop af
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ret
; copies a string from [de] to [wcf4b]
@@ -3486,7 +3488,7 @@ ManualTextScroll:: ; 3898 (0:3898)
ld a, (SFX_02_40 - SFX_Headers_02) / 3
jp PlaySound
.inLinkBattle
- ld c, $41
+ ld c, 65
jp DelayFrames
; function to do multiplication
@@ -3521,11 +3523,11 @@ Divide:: ; 38b9 (0:38b9)
push af
ld a,Bank(_Divide)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
call _Divide
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
pop bc
pop de
pop hl
@@ -3753,7 +3755,7 @@ CalcStat:: ; 394a (0:394a)
ld [H_MULTIPLICAND+1], a
xor a
ld [H_MULTIPLICAND], a
- ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL
+ ld a, [W_CURENEMYLVL]
ld [H_MULTIPLIER], a
call Multiply ; ((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level
ld a, [H_MULTIPLICAND]
@@ -3771,7 +3773,7 @@ CalcStat:: ; 394a (0:394a)
cp $1
ld a, $5
jr nz, .notHPStat
- ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL
+ ld a, [W_CURENEMYLVL]
ld b, a
ld a, [H_MULTIPLICAND+2]
add b
@@ -3816,25 +3818,25 @@ AddEnemyMonToPlayerParty:: ; 3a53 (0:3a53)
push af
ld a, BANK(_AddEnemyMonToPlayerParty)
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
call _AddEnemyMonToPlayerParty
pop bc
ld a, b
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ret
Func_3a68:: ; 3a68 (0:3a68)
ld a, [H_LOADEDROMBANK]
push af
- ld a, BANK(Func_f51e)
+ ld a, BANK(MoveMon)
ld [H_LOADEDROMBANK], a
- ld [$2000], a
- call Func_f51e
+ ld [MBC1RomBank], a
+ call MoveMon
pop bc
ld a, b
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ret
; skips a text entries, each of size $b (like trainer name, OT name, rival name, ...)
@@ -4010,7 +4012,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2)
pop hl
jr nz,.skipPlayingSound
ld a,(SFX_02_40 - SFX_Headers_02) / 3
- call PlaySound ; play sound
+ call PlaySound
.skipPlayingSound
pop af
ld [H_DOWNARROWBLINKCNT2],a
@@ -4648,7 +4650,7 @@ CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ; 3eb5 (0:3eb5)
ret
PrintPredefTextID:: ; 3ef5 (0:3ef5)
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
ld hl, TextPredefs
call SetMapTextPointer
ld hl, wcf11
@@ -4677,7 +4679,7 @@ SetMapTextPointer:: ; 3f0f (0:3f0f)
TextPredefs::
add_tx_pre CardKeySuccessText ; 01
add_tx_pre CardKeyFailText ; 02
- add_tx_pre RedBedroomPC ; 03
+ add_tx_pre RedBedroomPCText ; 03
add_tx_pre RedBedroomSNESText ; 04
add_tx_pre PushStartText ; 05
add_tx_pre SaveOptionText ; 06
@@ -4701,17 +4703,17 @@ TextPredefs::
add_tx_pre SaffronCityPokecenterBenchGuyText ; 18
add_tx_pre MtMoonPokecenterBenchGuyText ; 19
add_tx_pre RockTunnelPokecenterBenchGuyText ; 1A
- add_tx_pre UnusedBenchGuyText1 ; 1B
- add_tx_pre UnusedBenchGuyText2 ; 1C
- add_tx_pre UnusedBenchGuyText3 ; 1D
- add_tx_pre TerminatorText_62508 ; 1E
- add_tx_pre PredefText1f ; 1F
+ add_tx_pre UnusedBenchGuyText1 ; 1B XXX unused
+ add_tx_pre UnusedBenchGuyText2 ; 1C XXX unused
+ add_tx_pre UnusedBenchGuyText3 ; 1D XXX unused
+ add_tx_pre UnusedPredefText ; 1E XXX unused
+ add_tx_pre PokemonCenterPCText ; 1F
add_tx_pre ViridianSchoolNotebook ; 20
add_tx_pre ViridianSchoolBlackboard ; 21
add_tx_pre JustAMomentText ; 22
- add_tx_pre PredefText23 ; 23
+ add_tx_pre OpenBillsPCText ; 23
add_tx_pre FoundHiddenItemText ; 24
- add_tx_pre HiddenItemBagFullText ; 25
+ add_tx_pre HiddenItemBagFullText ; 25 XXX unused
add_tx_pre VermilionGymTrashText ; 26
add_tx_pre IndigoPlateauHQText ; 27
add_tx_pre GameCornerOutOfOrderText ; 28
@@ -4734,7 +4736,7 @@ TextPredefs::
add_tx_pre NewBicycleText ; 39
add_tx_pre IndigoPlateauStatues ; 3A
add_tx_pre VermilionGymTrashSuccesText1 ; 3B
- add_tx_pre VermilionGymTrashSuccesText2 ; 3C
+ add_tx_pre VermilionGymTrashSuccesText2 ; 3C XXX unused
add_tx_pre VermilionGymTrashSuccesText3 ; 3D
add_tx_pre VermilionGymTrashFailText ; 3E
add_tx_pre TownMapText ; 3F
diff --git a/home/audio.asm b/home/audio.asm
index 9210924c..1301550c 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -4,19 +4,19 @@ PlayDefaultMusic:: ; 2307 (0:2307)
ld c, a
ld d, a
ld [wcfca], a
- jr asm_2324
+ jr Func_2324
Func_2312:: ; 2312 (0:2312)
ld c, $a
ld d, $0
ld a, [wd72e]
bit 5, a
- jr z, asm_2324
+ jr z, Func_2324
xor a
ld [wcfca], a
ld c, $8
ld d, c
-asm_2324:: ; 2324 (0:2324)
+Func_2324:: ; 2324 (0:2324)
ld a, [wWalkBikeSurfState]
and a
jr z, .asm_2343
@@ -146,27 +146,27 @@ PlaySound:: ; 23b1 (0:23b1)
ld [$ffb9], a
ld a, [wc0ef]
ld [H_LOADEDROMBANK], a
- ld [$2000], a
- cp BANK(Func_9876)
+ ld [MBC1RomBank], a
+ cp BANK(Music2_9876)
jr nz, .checkForBank08
.bank02
ld a, b
- call Func_9876
+ call Music2_9876
jr .asm_240b
.checkForBank08
- cp BANK(Func_22035)
+ cp BANK(Music8_22035)
jr nz, .bank1F
.bank08
ld a, b
- call Func_22035
+ call Music8_22035
jr .asm_240b
.bank1F
ld a, b
- call Func_7d8ea
+ call Music1f_7d8ea
.asm_240b
ld a, [$ffb9]
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
jr .asm_2425
.asm_2414
ld a, b
diff --git a/home/init.asm b/home/init.asm
index cc89ad34..4ac2a4eb 100644
--- a/home/init.asm
+++ b/home/init.asm
@@ -1,7 +1,7 @@
SoftReset::
call StopAllSounds
call GBPalWhiteOut
- ld c, $20
+ ld c, 32
call DelayFrames
; fallthrough
diff --git a/home/overworld.asm b/home/overworld.asm
index c5c180c7..0e62a932 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -257,7 +257,7 @@ OverworldLoopLessDelay::
jr z,.noSpinning
callba LoadSpinnerArrowTiles ; spin while moving
.noSpinning
- call UpdateSprites ; move sprites
+ call UpdateSprites
.moveAhead2
ld hl,wFlags_0xcd60
res 2,[hl]
@@ -335,7 +335,7 @@ OverworldLoopLessDelay::
and a
jr z,.allPokemonFainted
.noFaintCheck
- ld c,$0a
+ ld c,10
call DelayFrames
jp EnterMap
.allPokemonFainted
@@ -778,7 +778,7 @@ HandleFlyWarpOrDungeonWarp::
call LeaveMapAnim
ld a, Bank(SpecialWarpIn)
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
call SpecialWarpIn
jp SpecialEnterMap
@@ -1120,7 +1120,7 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d)
ld bc,$3c40 ; Y and X position of player sprite
ld a,[wSpriteStateData1 + 9] ; direction the player is facing
.checkIfPlayerFacingUp
- cp a,$04
+ cp SPRITE_FACING_UP
jr nz,.checkIfPlayerFacingDown
; facing up
ld a,b
@@ -1129,7 +1129,7 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d)
ld a,$08
jr .doneCheckingDirection
.checkIfPlayerFacingDown
- cp a,$00
+ cp SPRITE_FACING_DOWN
jr nz,.checkIfPlayerFacingRight
; facing down
ld a,b
@@ -1138,7 +1138,7 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d)
ld a,$04
jr .doneCheckingDirection
.checkIfPlayerFacingRight
- cp a,$0c
+ cp SPRITE_FACING_RIGHT
jr nz,.playerFacingLeft
; facing right
ld a,c
@@ -1358,7 +1358,7 @@ LoadCurrentMapView:: ; 0caa (0:0caa)
push af
ld a,[W_TILESETBANK] ; tile data ROM bank
ld [H_LOADEDROMBANK],a
- ld [$2000],a ; switch to ROM bank that contains tile data
+ ld [MBC1RomBank],a ; switch to ROM bank that contains tile data
ld a,[wCurrentTileBlockMapViewPointer] ; address of upper left corner of current map view
ld e,a
ld a,[wCurrentTileBlockMapViewPointer + 1]
@@ -1440,7 +1440,7 @@ LoadCurrentMapView:: ; 0caa (0:0caa)
jr nz,.rowLoop2
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a ; restore previous ROM bank
+ ld [MBC1RomBank],a ; restore previous ROM bank
ret
AdvancePlayerSprite:: ; 0d27 (0:0d27)
@@ -1981,7 +1981,7 @@ RunMapScript:: ; 101b (0:101b)
ret
LoadWalkingPlayerSpriteGraphics:: ; 104d (0:104d)
- ld de,RedSprite ; $4180
+ ld de,RedSprite
ld hl,vNPCSprites
jr LoadPlayerSpriteGraphicsCommon
@@ -2276,7 +2276,7 @@ LoadMapHeader:: ; 107c (0:107c)
push af
ld a, BANK(MapSongBanks)
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ld hl, MapSongBanks
add hl,bc
add hl,bc
@@ -2286,7 +2286,7 @@ LoadMapHeader:: ; 107c (0:107c)
ld [wd35c],a ; music 2
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; function to copy map connection data from ROM to WRAM
@@ -2359,7 +2359,7 @@ LoadMapData:: ; 1241 (0:1241)
.restoreRomBank
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
ret
; function to switch to the ROM bank that a map is stored in
@@ -2378,7 +2378,7 @@ SwitchToMapRomBank:: ; 12bc (0:12bc)
call BankswitchBack
ld a,[$ffe8]
ld [H_LOADEDROMBANK],a
- ld [$2000],a ; switch to map ROM bank
+ ld [MBC1RomBank],a ; switch to map ROM bank
pop bc
pop hl
ret
diff --git a/home/pic.asm b/home/pic.asm
index 6aa2e5c0..4bc7b31c 100644
--- a/home/pic.asm
+++ b/home/pic.asm
@@ -6,7 +6,7 @@ UncompressSpriteData:: ; 24fd (0:24fd)
push af
ld a, b
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ld a, $a
ld [$0], a
xor a
@@ -14,7 +14,7 @@ UncompressSpriteData:: ; 24fd (0:24fd)
call _UncompressSpriteData
pop af
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ret
; initializes necessary data to load a sprite and runs UncompressSpriteDataLoop
@@ -31,7 +31,7 @@ _UncompressSpriteData:: ; 251a (0:251a)
xor a
ld [W_SPRITECURPOSX], a
ld [W_SPRITECURPOSY], a
- ld [W_SPRITELOADFLAGS], a ; wd0a8
+ ld [W_SPRITELOADFLAGS], a
call ReadNextInputByte ; first byte of input determines sprite width (high nybble) and height (low nybble) in tiles (8x8 pixels)
ld b, a
and $f
@@ -57,13 +57,13 @@ _UncompressSpriteData:: ; 251a (0:251a)
; note that this is an endless loop which is terminated during a call to MoveToNextBufferPosition by manipulating the stack
UncompressSpriteDataLoop:: ; 2556 (0:2556)
ld hl, S_SPRITEBUFFER1
- ld a, [W_SPRITELOADFLAGS] ; wd0a8
+ ld a, [W_SPRITELOADFLAGS]
bit 0, a
jr z, .useSpriteBuffer1 ; check which buffer to use
ld hl, S_SPRITEBUFFER2
.useSpriteBuffer1
call StoreSpriteOutputPointer
- ld a, [W_SPRITELOADFLAGS] ; wd0a8
+ ld a, [W_SPRITELOADFLAGS]
bit 1, a
jr z, .startDecompression ; check if last iteration
call ReadNextInputBit ; if last chunk, read 1-2 bit unpacking mode
@@ -195,12 +195,12 @@ MoveToNextBufferPosition:: ; 25d8 (0:25d8)
pop hl
xor a
ld [W_SPRITECURPOSX], a
- ld a, [W_SPRITELOADFLAGS] ; wd0a8
+ ld a, [W_SPRITELOADFLAGS]
bit 1, a
jr nz, .done ; test if there is one more sprite to go
xor $1
set 1, a
- ld [W_SPRITELOADFLAGS], a ; wd0a8
+ ld [W_SPRITELOADFLAGS], a
jp UncompressSpriteDataLoop
.done
jp UnpackSprite
@@ -539,7 +539,7 @@ ReverseNybble:: ; 2837 (0:2837)
; resets sprite buffer pointers to buffer 1 and 2, depending on W_SPRITELOADFLAGS
ResetSpriteBufferPointers:: ; 2841 (0:2841)
- ld a, [W_SPRITELOADFLAGS] ; wd0a8
+ ld a, [W_SPRITELOADFLAGS]
bit 0, a
jr nz, .buffer2Selected
ld de, S_SPRITEBUFFER1
diff --git a/home/predef.asm b/home/predef.asm
index 8efe3000..2fac9aca 100644
--- a/home/predef.asm
+++ b/home/predef.asm
@@ -14,13 +14,13 @@ Predef::
push af
ld a, BANK(GetPredefPointer)
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
call GetPredefPointer
ld a, [wPredefBank]
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ld de, .done
push de
@@ -29,7 +29,7 @@ Predef::
pop af
ld [H_LOADEDROMBANK], a
- ld [$2000], a
+ ld [MBC1RomBank], a
ret
GetPredefRegisters::
diff --git a/home/serial.asm b/home/serial.asm
index 86d74040..1f0146d9 100644
--- a/home/serial.asm
+++ b/home/serial.asm
@@ -1,312 +1,312 @@
-Serial:: ; 2125 (0:2125)
- push af
- push bc
- push de
- push hl
- ld a, [hSerialConnectionStatus]
- inc a
- jr z, .connectionNotYetEstablished
- ld a, [rSB]
- ld [hSerialReceiveData], a
- ld a, [hSerialSendData]
- ld [rSB], a
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- jr z, .done
-; using external clock
- ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
- jr .done
-.connectionNotYetEstablished
- ld a, [rSB]
- ld [hSerialReceiveData], a
- ld [hSerialConnectionStatus], a
- cp USING_INTERNAL_CLOCK
- jr z, .usingInternalClock
-; using external clock
- xor a
- ld [rSB], a
- ld a, $3
- ld [rDIV], a
-.waitLoop
- ld a, [rDIV]
- bit 7, a
- jr nz, .waitLoop
- ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
- jr .done
-.usingInternalClock
- xor a
- ld [rSB], a
-.done
- ld a, $1
- ld [hSerialReceivedNewData], a
- ld a, SERIAL_NO_DATA_BYTE
- ld [hSerialSendData], a
- pop hl
- pop de
- pop bc
- pop af
- reti
-
-; hl = send data
-; de = receive data
-; bc = length of data
-Serial_ExchangeBytes:: ; 216f (0:216f)
- ld a, 1
- ld [hSerialIgnoringInitialData], a
-.loop
- ld a, [hl]
- ld [hSerialSendData], a
- call Serial_ExchangeByte
- push bc
- ld b, a
- inc hl
- ld a, 48
-.waitLoop
- dec a
- jr nz, .waitLoop
- ld a, [hSerialIgnoringInitialData]
- and a
- ld a, b
- pop bc
- jr z, .storeReceivedByte
- dec hl
- cp SERIAL_PREAMBLE_BYTE
- jr nz, .loop
- xor a
- ld [hSerialIgnoringInitialData], a
- jr .loop
-.storeReceivedByte
- ld [de], a
- inc de
- dec bc
- ld a, b
- or c
- jr nz, .loop
- ret
-
-Serial_ExchangeByte:: ; 219a (0:219a)
- xor a
- ld [hSerialReceivedNewData], a
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- jr nz, .asm_21a7
- ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
-.asm_21a7
- ld a, [hSerialReceivedNewData]
- and a
- jr nz, .asm_21f1
- ld a, [hSerialConnectionStatus]
- cp USING_EXTERNAL_CLOCK
- jr nz, .asm_21cc
- call IsUnknownCounterZero
- jr z, .asm_21cc
- call WaitLoop_15Iterations
- push hl
- ld hl, wUnknownSerialCounter + 1
- inc [hl]
- jr nz, .asm_21c3
- dec hl
- inc [hl]
-.asm_21c3
- pop hl
- call IsUnknownCounterZero
- jr nz, .asm_21a7
- jp SetUnknownCounterToFFFF
-.asm_21cc
- ld a, [rIE]
- and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
- cp (1 << SERIAL)
- jr nz, .asm_21a7
- ld a, [wUnknownSerialCounter2]
- dec a
- ld [wUnknownSerialCounter2], a
- jr nz, .asm_21a7
- ld a, [wUnknownSerialCounter2 + 1]
- dec a
- ld [wUnknownSerialCounter2 + 1], a
- jr nz, .asm_21a7
- ld a, [hSerialConnectionStatus]
- cp USING_EXTERNAL_CLOCK
- jr z, .asm_21f1
- ld a, 255
-.waitLoop
- dec a
- jr nz, .waitLoop
-.asm_21f1
- xor a
- ld [hSerialReceivedNewData], a
- ld a, [rIE]
- and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
- sub (1 << SERIAL)
- jr nz, .asm_2204
- ld [wUnknownSerialCounter2], a
- ld a, $50
- ld [wUnknownSerialCounter2 + 1], a
-.asm_2204
- ld a, [hSerialReceiveData]
- cp SERIAL_NO_DATA_BYTE
- ret nz
- call IsUnknownCounterZero
- jr z, .asm_221f
- push hl
- ld hl, wUnknownSerialCounter + 1
- ld a, [hl]
- dec a
- ld [hld], a
- inc a
- jr nz, .asm_2219
- dec [hl]
-.asm_2219
- pop hl
- call IsUnknownCounterZero
- jr z, SetUnknownCounterToFFFF
-.asm_221f
- ld a, [rIE]
- and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
- cp (1 << SERIAL)
- ld a, SERIAL_NO_DATA_BYTE
- ret z
- ld a, [hl]
- ld [hSerialSendData], a
- call DelayFrame
- jp Serial_ExchangeByte
-
-WaitLoop_15Iterations:: ; 2231 (0:2231)
- ld a, 15
-.waitLoop
- dec a
- jr nz, .waitLoop
- ret
-
-IsUnknownCounterZero:: ; 2237 (0:2237)
- push hl
- ld hl, wUnknownSerialCounter
- ld a, [hli]
- or [hl]
- pop hl
- ret
-
-; a is always 0 when this is called
-SetUnknownCounterToFFFF:: ; 223f (0:223f)
- dec a
- ld [wUnknownSerialCounter], a
- ld [wUnknownSerialCounter + 1], a
- ret
-
-; This is used to exchange the button press and selected menu item on the link menu.
-; The data is sent thrice and read twice to increase reliability.
-Serial_ExchangeLinkMenuSelection:: ; 2247 (0:2247)
- ld hl, wLinkMenuSelectionSendBuffer
- ld de, wLinkMenuSelectionReceiveBuffer
- ld c, 2 ; number of bytes to save
- ld a, 1
- ld [hSerialIgnoringInitialData], a
-.loop
- call DelayFrame
- ld a, [hl]
- ld [hSerialSendData], a
- call Serial_ExchangeByte
- ld b, a
- inc hl
- ld a, [hSerialIgnoringInitialData]
- and a
- ld a, 0
- ld [hSerialIgnoringInitialData], a
- jr nz, .loop
- ld a, b
- ld [de], a
- inc de
- dec c
- jr nz, .loop
- ret
-
-Serial_PrintWaitingTextAndSyncAndExchangeNybble:: ; 226e (0:226e)
- call SaveScreenTilesToBuffer1
- callab PrintWaitingText
- call Serial_SyncAndExchangeNybble
- jp LoadScreenTilesFromBuffer1
-
-Serial_SyncAndExchangeNybble:: ; 227f (0:227f)
- ld a, $ff
- ld [wSerialExchangeNybbleReceiveData], a
-.loop1
- call Serial_ExchangeNybble
- call DelayFrame
- call IsUnknownCounterZero
- jr z, .next1
- push hl
- ld hl, wUnknownSerialCounter + 1
- dec [hl]
- jr nz, .next2
- dec hl
- dec [hl]
- jr nz, .next2
- pop hl
- xor a
- jp SetUnknownCounterToFFFF
-.next2
- pop hl
-.next1
- ld a, [wSerialExchangeNybbleReceiveData]
- inc a
- jr z, .loop1
- ld b, 10
-.loop2
- call DelayFrame
- call Serial_ExchangeNybble
- dec b
- jr nz, .loop2
- ld b, 10
-.loop3
- call DelayFrame
- call Serial_SendZeroByte
- dec b
- jr nz, .loop3
- ld a, [wSerialExchangeNybbleReceiveData]
- ld [wSerialSyncAndExchangeNybbleReceiveData], a
- ret
-
-Serial_ExchangeNybble:: ; 22c3 (0:22c3)
- call .doExchange
- ld a, [wSerialExchangeNybbleSendData]
- add $60
- ld [hSerialSendData], a
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- jr nz, .doExchange
- ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
-.doExchange
- ld a, [hSerialReceiveData]
- ld [wSerialExchangeNybbleTempReceiveData], a
- and $f0
- cp $60
- ret nz
- xor a
- ld [hSerialReceiveData], a
- ld a, [wSerialExchangeNybbleTempReceiveData]
- and $f
- ld [wSerialExchangeNybbleReceiveData], a
- ret
-
-Serial_SendZeroByte:: ; 22ed (0:22ed)
- xor a
- ld [hSerialSendData], a
- ld a, [hSerialConnectionStatus]
- cp USING_INTERNAL_CLOCK
- ret nz
- ld a, START_TRANSFER_INTERNAL_CLOCK
- ld [rSC], a
- ret
-
-Serial_TryEstablishingExternallyClockedConnection:: ; 22fa (0:22fa)
- ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK
- ld [rSB], a
- xor a
- ld [hSerialReceiveData], a
- ld a, START_TRANSFER_EXTERNAL_CLOCK
- ld [rSC], a
- ret \ No newline at end of file
+Serial:: ; 2125 (0:2125)
+ push af
+ push bc
+ push de
+ push hl
+ ld a, [hSerialConnectionStatus]
+ inc a
+ jr z, .connectionNotYetEstablished
+ ld a, [rSB]
+ ld [hSerialReceiveData], a
+ ld a, [hSerialSendData]
+ ld [rSB], a
+ ld a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ jr z, .done
+; using external clock
+ ld a, START_TRANSFER_EXTERNAL_CLOCK
+ ld [rSC], a
+ jr .done
+.connectionNotYetEstablished
+ ld a, [rSB]
+ ld [hSerialReceiveData], a
+ ld [hSerialConnectionStatus], a
+ cp USING_INTERNAL_CLOCK
+ jr z, .usingInternalClock
+; using external clock
+ xor a
+ ld [rSB], a
+ ld a, $3
+ ld [rDIV], a
+.waitLoop
+ ld a, [rDIV]
+ bit 7, a
+ jr nz, .waitLoop
+ ld a, START_TRANSFER_EXTERNAL_CLOCK
+ ld [rSC], a
+ jr .done
+.usingInternalClock
+ xor a
+ ld [rSB], a
+.done
+ ld a, $1
+ ld [hSerialReceivedNewData], a
+ ld a, SERIAL_NO_DATA_BYTE
+ ld [hSerialSendData], a
+ pop hl
+ pop de
+ pop bc
+ pop af
+ reti
+
+; hl = send data
+; de = receive data
+; bc = length of data
+Serial_ExchangeBytes:: ; 216f (0:216f)
+ ld a, 1
+ ld [hSerialIgnoringInitialData], a
+.loop
+ ld a, [hl]
+ ld [hSerialSendData], a
+ call Serial_ExchangeByte
+ push bc
+ ld b, a
+ inc hl
+ ld a, 48
+.waitLoop
+ dec a
+ jr nz, .waitLoop
+ ld a, [hSerialIgnoringInitialData]
+ and a
+ ld a, b
+ pop bc
+ jr z, .storeReceivedByte
+ dec hl
+ cp SERIAL_PREAMBLE_BYTE
+ jr nz, .loop
+ xor a
+ ld [hSerialIgnoringInitialData], a
+ jr .loop
+.storeReceivedByte
+ ld [de], a
+ inc de
+ dec bc
+ ld a, b
+ or c
+ jr nz, .loop
+ ret
+
+Serial_ExchangeByte:: ; 219a (0:219a)
+ xor a
+ ld [hSerialReceivedNewData], a
+ ld a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ jr nz, .asm_21a7
+ ld a, START_TRANSFER_INTERNAL_CLOCK
+ ld [rSC], a
+.asm_21a7
+ ld a, [hSerialReceivedNewData]
+ and a
+ jr nz, .asm_21f1
+ ld a, [hSerialConnectionStatus]
+ cp USING_EXTERNAL_CLOCK
+ jr nz, .asm_21cc
+ call IsUnknownCounterZero
+ jr z, .asm_21cc
+ call WaitLoop_15Iterations
+ push hl
+ ld hl, wUnknownSerialCounter + 1
+ inc [hl]
+ jr nz, .asm_21c3
+ dec hl
+ inc [hl]
+.asm_21c3
+ pop hl
+ call IsUnknownCounterZero
+ jr nz, .asm_21a7
+ jp SetUnknownCounterToFFFF
+.asm_21cc
+ ld a, [rIE]
+ and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
+ cp (1 << SERIAL)
+ jr nz, .asm_21a7
+ ld a, [wUnknownSerialCounter2]
+ dec a
+ ld [wUnknownSerialCounter2], a
+ jr nz, .asm_21a7
+ ld a, [wUnknownSerialCounter2 + 1]
+ dec a
+ ld [wUnknownSerialCounter2 + 1], a
+ jr nz, .asm_21a7
+ ld a, [hSerialConnectionStatus]
+ cp USING_EXTERNAL_CLOCK
+ jr z, .asm_21f1
+ ld a, 255
+.waitLoop
+ dec a
+ jr nz, .waitLoop
+.asm_21f1
+ xor a
+ ld [hSerialReceivedNewData], a
+ ld a, [rIE]
+ and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
+ sub (1 << SERIAL)
+ jr nz, .asm_2204
+ ld [wUnknownSerialCounter2], a
+ ld a, $50
+ ld [wUnknownSerialCounter2 + 1], a
+.asm_2204
+ ld a, [hSerialReceiveData]
+ cp SERIAL_NO_DATA_BYTE
+ ret nz
+ call IsUnknownCounterZero
+ jr z, .asm_221f
+ push hl
+ ld hl, wUnknownSerialCounter + 1
+ ld a, [hl]
+ dec a
+ ld [hld], a
+ inc a
+ jr nz, .asm_2219
+ dec [hl]
+.asm_2219
+ pop hl
+ call IsUnknownCounterZero
+ jr z, SetUnknownCounterToFFFF
+.asm_221f
+ ld a, [rIE]
+ and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
+ cp (1 << SERIAL)
+ ld a, SERIAL_NO_DATA_BYTE
+ ret z
+ ld a, [hl]
+ ld [hSerialSendData], a
+ call DelayFrame
+ jp Serial_ExchangeByte
+
+WaitLoop_15Iterations:: ; 2231 (0:2231)
+ ld a, 15
+.waitLoop
+ dec a
+ jr nz, .waitLoop
+ ret
+
+IsUnknownCounterZero:: ; 2237 (0:2237)
+ push hl
+ ld hl, wUnknownSerialCounter
+ ld a, [hli]
+ or [hl]
+ pop hl
+ ret
+
+; a is always 0 when this is called
+SetUnknownCounterToFFFF:: ; 223f (0:223f)
+ dec a
+ ld [wUnknownSerialCounter], a
+ ld [wUnknownSerialCounter + 1], a
+ ret
+
+; This is used to exchange the button press and selected menu item on the link menu.
+; The data is sent thrice and read twice to increase reliability.
+Serial_ExchangeLinkMenuSelection:: ; 2247 (0:2247)
+ ld hl, wLinkMenuSelectionSendBuffer
+ ld de, wLinkMenuSelectionReceiveBuffer
+ ld c, 2 ; number of bytes to save
+ ld a, 1
+ ld [hSerialIgnoringInitialData], a
+.loop
+ call DelayFrame
+ ld a, [hl]
+ ld [hSerialSendData], a
+ call Serial_ExchangeByte
+ ld b, a
+ inc hl
+ ld a, [hSerialIgnoringInitialData]
+ and a
+ ld a, 0
+ ld [hSerialIgnoringInitialData], a
+ jr nz, .loop
+ ld a, b
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .loop
+ ret
+
+Serial_PrintWaitingTextAndSyncAndExchangeNybble:: ; 226e (0:226e)
+ call SaveScreenTilesToBuffer1
+ callab PrintWaitingText
+ call Serial_SyncAndExchangeNybble
+ jp LoadScreenTilesFromBuffer1
+
+Serial_SyncAndExchangeNybble:: ; 227f (0:227f)
+ ld a, $ff
+ ld [wSerialExchangeNybbleReceiveData], a
+.loop1
+ call Serial_ExchangeNybble
+ call DelayFrame
+ call IsUnknownCounterZero
+ jr z, .next1
+ push hl
+ ld hl, wUnknownSerialCounter + 1
+ dec [hl]
+ jr nz, .next2
+ dec hl
+ dec [hl]
+ jr nz, .next2
+ pop hl
+ xor a
+ jp SetUnknownCounterToFFFF
+.next2
+ pop hl
+.next1
+ ld a, [wSerialExchangeNybbleReceiveData]
+ inc a
+ jr z, .loop1
+ ld b, 10
+.loop2
+ call DelayFrame
+ call Serial_ExchangeNybble
+ dec b
+ jr nz, .loop2
+ ld b, 10
+.loop3
+ call DelayFrame
+ call Serial_SendZeroByte
+ dec b
+ jr nz, .loop3
+ ld a, [wSerialExchangeNybbleReceiveData]
+ ld [wSerialSyncAndExchangeNybbleReceiveData], a
+ ret
+
+Serial_ExchangeNybble:: ; 22c3 (0:22c3)
+ call .doExchange
+ ld a, [wSerialExchangeNybbleSendData]
+ add $60
+ ld [hSerialSendData], a
+ ld a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ jr nz, .doExchange
+ ld a, START_TRANSFER_INTERNAL_CLOCK
+ ld [rSC], a
+.doExchange
+ ld a, [hSerialReceiveData]
+ ld [wSerialExchangeNybbleTempReceiveData], a
+ and $f0
+ cp $60
+ ret nz
+ xor a
+ ld [hSerialReceiveData], a
+ ld a, [wSerialExchangeNybbleTempReceiveData]
+ and $f
+ ld [wSerialExchangeNybbleReceiveData], a
+ ret
+
+Serial_SendZeroByte:: ; 22ed (0:22ed)
+ xor a
+ ld [hSerialSendData], a
+ ld a, [hSerialConnectionStatus]
+ cp USING_INTERNAL_CLOCK
+ ret nz
+ ld a, START_TRANSFER_INTERNAL_CLOCK
+ ld [rSC], a
+ ret
+
+Serial_TryEstablishingExternallyClockedConnection:: ; 22fa (0:22fa)
+ ld a, ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK
+ ld [rSB], a
+ xor a
+ ld [hSerialReceiveData], a
+ ld a, START_TRANSFER_EXTERNAL_CLOCK
+ ld [rSC], a
+ ret
diff --git a/home/text.asm b/home/text.asm
index 276b652e..fabcd843 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -293,7 +293,7 @@ Char51:: ; 1ab4 (0:1ab4)
hlCoord 1, 13
ld bc,$0412
call ClearScreenArea
- ld c,$14
+ ld c,20
call DelayFrames
pop de
hlCoord 1, 14
@@ -308,7 +308,7 @@ Char49:: ; 1ad5 (0:1ad5)
hlCoord 1, 10
ld bc,$0712
call ClearScreenArea
- ld c,$14
+ ld c,20
call DelayFrames
pop de
pop hl
@@ -690,7 +690,7 @@ TextCommand17:: ; 1ca3 (0:1ca3)
ld d,a
ld a,[hli]
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
push hl
ld l,e
ld h,d
@@ -698,7 +698,7 @@ TextCommand17:: ; 1ca3 (0:1ca3)
pop hl
pop af
ld [H_LOADEDROMBANK],a
- ld [$2000],a
+ ld [MBC1RomBank],a
jp NextTextCommand
TextCommandJumpTable:: ; 1cc1 (0:1cc1)
diff --git a/macros.asm b/macros.asm
index b80f1442..bf1b8a89 100644
--- a/macros.asm
+++ b/macros.asm
@@ -195,6 +195,10 @@ TX_BCD: MACRO
db \2
ENDM
+TX_ASM: MACRO
+ db $08
+ ENDM
+
; Predef macro.
add_predef: MACRO
\1Predef::
@@ -222,7 +226,7 @@ add_tx_pre: MACRO
ENDM
tx_pre_id: MACRO
- ld a, (\1_id - TextPredefs) / 2
+ ld a, (\1_id - TextPredefs) / 2 + 1
ENDM
tx_pre: MACRO
diff --git a/main.asm b/main.asm
index a3088c40..7372381a 100755
--- a/main.asm
+++ b/main.asm
@@ -588,7 +588,7 @@ INCLUDE "engine/overworld/movement.asm"
INCLUDE "engine/cable_club.asm"
LoadTrainerInfoTextBoxTiles: ; 5ae6 (1:5ae6)
- ld de, TrainerInfoTextBoxTileGraphics ; $7b98
+ ld de, TrainerInfoTextBoxTileGraphics
ld hl, vChars2 + $760
ld bc, (BANK(TrainerInfoTextBoxTileGraphics) << 8) +$09
jp CopyVideoData
@@ -1028,7 +1028,7 @@ DisplayTextIDInit: ; 7096 (1:7096)
bit 4,[hl]
res 4,[hl]
jr nz,.skipMovingSprites
- call UpdateSprites ; move sprites
+ call UpdateSprites
.skipMovingSprites
; loop to copy C1X9 (direction the sprite is facing) to C2X9 for each sprite
; this is done because when you talk to an NPC, they turn to look your way
@@ -1210,7 +1210,7 @@ DisplayTextBoxID_: ; 72ea (1:72ea)
call PlaceString
pop af
ld [wd730],a
- call UpdateSprites ; move sprites
+ call UpdateSprites
ret
; function to search a table terminated with $ff for a byte matching c in increments of de
@@ -1912,16 +1912,16 @@ INCLUDE "engine/battle/moveEffects/drain_hp_effect.asm"
INCLUDE "engine/menu/players_pc.asm"
_RemovePokemon: ; 7b68 (1:7b68)
- ld hl, wPartyCount ; wPartyCount
+ ld hl, wPartyCount
ld a, [wcf95]
and a
jr z, .asm_7b74
- ld hl, W_NUMINBOX ; wda80
+ ld hl, W_NUMINBOX
.asm_7b74
ld a, [hl]
dec a
ld [hli], a
- ld a, [wWhichPokemon] ; wWhichPokemon
+ ld a, [wWhichPokemon]
ld c, a
ld b, $0
add hl, bc
@@ -1934,7 +1934,7 @@ _RemovePokemon: ; 7b68 (1:7b68)
ld [hli], a
inc a
jr nz, .asm_7b81
- ld hl, wPartyMonOT ; wd273
+ ld hl, wPartyMonOT
ld d, $5
ld a, [wcf95]
and a
@@ -1942,9 +1942,9 @@ _RemovePokemon: ; 7b68 (1:7b68)
ld hl, wBoxMonOT
ld d, $13
.asm_7b97
- ld a, [wWhichPokemon] ; wWhichPokemon
+ ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
- ld a, [wWhichPokemon] ; wWhichPokemon
+ ld a, [wWhichPokemon]
cp d
jr nz, .asm_7ba6
ld [hl], $ff
@@ -1954,7 +1954,7 @@ _RemovePokemon: ; 7b68 (1:7b68)
ld e, l
ld bc, $b
add hl, bc
- ld bc, wPartyMonNicks ; wPartyMonNicks
+ ld bc, wPartyMonNicks
ld a, [wcf95]
and a
jr z, .asm_7bb8
@@ -1969,7 +1969,7 @@ _RemovePokemon: ; 7b68 (1:7b68)
ld hl, wBoxMons
ld bc, wBoxMon2 - wBoxMon1
.asm_7bcd
- ld a, [wWhichPokemon] ; wWhichPokemon
+ ld a, [wWhichPokemon]
call AddNTimes
ld d, h
ld e, l
@@ -1983,23 +1983,23 @@ _RemovePokemon: ; 7b68 (1:7b68)
.asm_7be4
ld bc, wPartyMon2 - wPartyMon1
add hl, bc
- ld bc, wPartyMonOT ; wd273
+ ld bc, wPartyMonOT
.asm_7beb
call CopyDataUntil
- ld hl, wPartyMonNicks ; wPartyMonNicks
+ ld hl, wPartyMonNicks
ld a, [wcf95]
and a
jr z, .asm_7bfa
ld hl, wBoxMonNicks
.asm_7bfa
ld bc, $b
- ld a, [wWhichPokemon] ; wWhichPokemon
+ ld a, [wWhichPokemon]
call AddNTimes
ld d, h
ld e, l
ld bc, $b
add hl, bc
- ld bc, wPokedexOwned ; wPokedexOwned
+ ld bc, wPokedexOwned
ld a, [wcf95]
and a
jr z, .asm_7c15
@@ -2007,14 +2007,14 @@ _RemovePokemon: ; 7b68 (1:7b68)
.asm_7c15
jp CopyDataUntil
-Func_7c18: ; 7c18 (1:7c18)
+_DisplayPokedex: ; 7c18 (1:7c18)
ld hl, wd730
set 6, [hl]
predef ShowPokedexData
ld hl, wd730
res 6, [hl]
call ReloadMapData
- ld c, $a
+ ld c, 10
call DelayFrames
predef IndexToPokedex
ld a, [wd11e]
@@ -2043,7 +2043,7 @@ ClearVariablesAfterLoadingMapData: ; c335 (3:4335)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ld [wStepCounter], a
- ld [W_LONEATTACKNO], a ; W_GYMLEADERNO
+ ld [W_LONEATTACKNO], a
ld [hJoyPressed], a
ld [hJoyReleased], a
ld [hJoyHeld], a
@@ -2293,7 +2293,7 @@ IsPlayerStandingOnDoorTileOrWarpTile: ; c49d (3:449d)
INCLUDE "data/warp_tile_ids.asm"
PrintSafariZoneSteps: ; c52f (3:452f)
- ld a, [W_CURMAP] ; W_CURMAP
+ ld a, [W_CURMAP]
cp SAFARI_ZONE_EAST
ret c
cp UNKNOWN_DUNGEON_2
@@ -2303,16 +2303,16 @@ PrintSafariZoneSteps: ; c52f (3:452f)
ld c, $7
call TextBoxBorder
hlCoord 1, 1
- ld de, wSafariSteps ; wd70d
+ ld de, wSafariSteps
ld bc, $203
call PrintNumber
hlCoord 4, 1
- ld de, SafariSteps ; $4579
+ ld de, SafariSteps
call PlaceString
hlCoord 1, 3
ld de, SafariBallText
call PlaceString
- ld a, [W_NUMSAFARIBALLS] ; W_NUMSAFARIBALLS
+ ld a, [W_NUMSAFARIBALLS]
cp $a
jr nc, .asm_c56d
hlCoord 5, 3
@@ -2320,7 +2320,7 @@ PrintSafariZoneSteps: ; c52f (3:452f)
ld [hl], a
.asm_c56d
hlCoord 6, 3
- ld de, W_NUMSAFARIBALLS ; W_NUMSAFARIBALLS
+ ld de, W_NUMSAFARIBALLS
ld bc, $102
jp PrintNumber
@@ -2339,7 +2339,7 @@ _GetTileAndCoordsInFrontOfPlayer: ; c589 (3:4589)
ld a, [W_XCOORD]
ld e, a
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
- and a
+ and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown
; facing down
aCoord 8, 11
@@ -2378,7 +2378,7 @@ GetTileTwoStepsInFrontOfPlayer: ; c5be (3:45be)
ld d, a
ld e, [hl]
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
- and a
+ and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown
; facing down
ld hl, $ffdb
@@ -2726,7 +2726,7 @@ PrintStrengthTxt: ; cd99 (3:4d99)
UsedStrengthText: ; cdaa (3:4daa)
TX_FAR _UsedStrengthText
- db $08 ; asm
+ TX_ASM
ld a, [wcf91]
call PlayCry
call Delay3
@@ -2742,14 +2742,14 @@ CheckForForcedBikeSurf: ; cdc0 (3:4dc0)
ld a, [wd732]
bit 5, a
jr nz, .asm_cdec
- ld a, [W_CURMAP] ; W_CURMAP
+ ld a, [W_CURMAP]
cp SEAFOAM_ISLANDS_5
ret nz
ld a, [wd881]
and $3
cp $3
ret z
- ld hl, CoordsData_cdf7 ; $4df7
+ ld hl, CoordsData_cdf7
call ArePlayerCoordsInArray
ret nc
ld hl, wd728
@@ -3132,7 +3132,7 @@ ReplaceTileBlock: ; ee9e (3:6e9e)
ret c ; return if the replaced tile block is above the map view in memory
RedrawMapView: ; eedc (3:6edc)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
inc a
ret z
ld a, [H_AUTOBGTRANSFERENABLED]
@@ -3255,7 +3255,7 @@ LoadMissableObjects: ; f132 (3:7132)
ld [H_DIVISOR], a
ld b, $2
call Divide ; divide difference by 3, resulting in the global offset (number of missable items before ours)
- ld a, [W_CURMAP] ; W_CURMAP
+ ld a, [W_CURMAP]
ld b, a
ld a, [H_DIVIDEND+3]
ld c, a ; store global offset in c
@@ -3535,11 +3535,11 @@ ResetBoulderPushFlags: ; f2dd (3:72dd)
ret
_AddPartyMon: ; f2e5 (3:72e5)
- ld de, wPartyCount ; wPartyCount
+ ld de, wPartyCount
ld a, [wcc49]
and $f
jr z, .asm_f2f2
- ld de, wEnemyPartyCount ; wEnemyPartyCount
+ ld de, wEnemyPartyCount
.asm_f2f2
ld a, [de]
inc a
@@ -3558,7 +3558,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
inc de
ld a, $ff
ld [de], a
- ld hl, wPartyMonOT ; wd273
+ ld hl, wPartyMonOT
ld a, [wcc49]
and $f
jr z, .asm_f315
@@ -3569,13 +3569,13 @@ _AddPartyMon: ; f2e5 (3:72e5)
call SkipFixedLengthTextEntries
ld d, h
ld e, l
- ld hl, wPlayerName ; wd158
+ ld hl, wPlayerName
ld bc, $b
call CopyData
ld a, [wcc49]
and a
jr nz, .asm_f33f
- ld hl, wPartyMonNicks ; wPartyMonNicks
+ ld hl, wPartyMonNicks
ld a, [$ffe4]
dec a
call SkipFixedLengthTextEntries
@@ -3619,7 +3619,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
dec a
ld c, a
ld b, $2
- ld hl, wPokedexOwned ; wPokedexOwned
+ ld hl, wPokedexOwned
call FlagAction
ld a, c
ld [wd153], a
@@ -3630,11 +3630,11 @@ _AddPartyMon: ; f2e5 (3:72e5)
push bc
call FlagAction
pop bc
- ld hl, wPokedexSeen ; wd30a
+ ld hl, wPokedexSeen
call FlagAction
pop hl
push hl
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
and a
jr nz, .copyEnemyMonData
call Random ; generate random IVs
@@ -3749,13 +3749,13 @@ _AddPartyMon: ; f2e5 (3:72e5)
pop hl
call AddPartyMon_WriteMovePP
inc de
- ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL
+ ld a, [W_CURENEMYLVL]
ld [de], a
inc de
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
dec a
jr nz, .calcFreshStats
- ld hl, wEnemyMonMaxHP ; wEnemyMonMaxHP
+ ld hl, wEnemyMonMaxHP
ld bc, $a
call CopyData ; copy stats of cur enemy mon
pop hl
@@ -3863,7 +3863,7 @@ _AddEnemyMonToPlayerParty: ; f49d (3:749d)
and a
ret ; return success
-Func_f51e: ; f51e (3:751e)
+MoveMon: ; f51e (3:751e)
ld a, [wcf95]
and a
jr z, .checkPartyMonSlots
@@ -3872,13 +3872,13 @@ Func_f51e: ; f51e (3:751e)
cp $3
ld hl, wDayCareMon
jr z, .asm_f575
- ld hl, W_NUMINBOX ; wda80
+ ld hl, W_NUMINBOX
ld a, [hl]
cp MONS_PER_BOX
jr nz, .partyOrBoxNotFull
jr .boxFull
.checkPartyMonSlots
- ld hl, wPartyCount ; wPartyCount
+ ld hl, wPartyCount
ld a, [hl]
cp PARTY_LENGTH
jr nz, .partyOrBoxNotFull
@@ -3903,11 +3903,11 @@ Func_f51e: ; f51e (3:751e)
dec a
ld hl, wPartyMons
ld bc, wPartyMon2 - wPartyMon1 ; $2c
- ld a, [wPartyCount] ; wPartyCount
+ ld a, [wPartyCount]
jr nz, .skipToNewMonEntry
ld hl, wBoxMons
ld bc, wBoxMon2 - wBoxMon1 ; $21
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
.skipToNewMonEntry
dec a
call AddNTimes
@@ -3926,7 +3926,7 @@ Func_f51e: ; f51e (3:751e)
ld hl, wPartyMons
ld bc, wPartyMon2 - wPartyMon1 ; $2c
.asm_f591
- ld a, [wWhichPokemon] ; wWhichPokemon
+ ld a, [wWhichPokemon]
call AddNTimes
.asm_f597
push hl
@@ -3953,11 +3953,11 @@ Func_f51e: ; f51e (3:751e)
ld de, W_DAYCAREMONOT
jr z, .asm_f5d3
dec a
- ld hl, wPartyMonOT ; wd273
- ld a, [wPartyCount] ; wPartyCount
+ ld hl, wPartyMonOT
+ ld a, [wPartyCount]
jr nz, .asm_f5cd
ld hl, wBoxMonOT
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
.asm_f5cd
dec a
call SkipFixedLengthTextEntries
@@ -3971,9 +3971,9 @@ Func_f51e: ; f51e (3:751e)
ld hl, W_DAYCAREMONOT
cp $2
jr z, .asm_f5ec
- ld hl, wPartyMonOT ; wd273
+ ld hl, wPartyMonOT
.asm_f5e6
- ld a, [wWhichPokemon] ; wWhichPokemon
+ ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
.asm_f5ec
ld bc, $b
@@ -3983,11 +3983,11 @@ Func_f51e: ; f51e (3:751e)
ld de, W_DAYCAREMONNAME
jr z, .asm_f611
dec a
- ld hl, wPartyMonNicks ; wPartyMonNicks
- ld a, [wPartyCount] ; wPartyCount
+ ld hl, wPartyMonNicks
+ ld a, [wPartyCount]
jr nz, .asm_f60b
ld hl, wBoxMonNicks
- ld a, [W_NUMINBOX] ; wda80
+ ld a, [W_NUMINBOX]
.asm_f60b
dec a
call SkipFixedLengthTextEntries
@@ -4001,9 +4001,9 @@ Func_f51e: ; f51e (3:751e)
ld hl, W_DAYCAREMONNAME
cp $2
jr z, .asm_f62a
- ld hl, wPartyMonNicks ; wPartyMonNicks
+ ld hl, wPartyMonNicks
.asm_f624
- ld a, [wWhichPokemon] ; wWhichPokemon
+ ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
.asm_f62a
ld bc, $b
@@ -4021,7 +4021,7 @@ Func_f51e: ; f51e (3:751e)
call LoadMonData
callba CalcLevelFromExperience
ld a, d
- ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
+ ld [W_CURENEMYLVL], a
pop hl
ld bc, wBoxMon2 - wBoxMon1
add hl, bc
@@ -4256,7 +4256,7 @@ DivideBCD::
.asm_f75b
push de
push de
- call Func_f800
+ call DivideBCD_f800
pop de
ld a, b
swap a
@@ -4265,8 +4265,8 @@ DivideBCD::
dec d
jr z, .asm_f7bc
push de
- call Func_f7d7
- call Func_f800
+ call DivideBCD_f7d7
+ call DivideBCD_f800
pop de
ld a, [$ffa5]
or b
@@ -4274,8 +4274,8 @@ DivideBCD::
dec d
jr z, .asm_f7bc
push de
- call Func_f7d7
- call Func_f800
+ call DivideBCD_f7d7
+ call DivideBCD_f800
pop de
ld a, b
swap a
@@ -4284,8 +4284,8 @@ DivideBCD::
dec d
jr z, .asm_f7bc
push de
- call Func_f7d7
- call Func_f800
+ call DivideBCD_f7d7
+ call DivideBCD_f800
pop de
ld a, [$ffa6]
or b
@@ -4293,8 +4293,8 @@ DivideBCD::
dec d
jr z, .asm_f7bc
push de
- call Func_f7d7
- call Func_f800
+ call DivideBCD_f7d7
+ call DivideBCD_f800
pop de
ld a, b
swap a
@@ -4303,8 +4303,8 @@ DivideBCD::
dec d
jr z, .asm_f7bc
push de
- call Func_f7d7
- call Func_f800
+ call DivideBCD_f7d7
+ call DivideBCD_f800
pop de
ld a, [$ffa7]
or b
@@ -4323,13 +4323,13 @@ DivideBCD::
ret z
.asm_f7ce
push af
- call Func_f7d7
+ call DivideBCD_f7d7
pop af
dec a
jr nz, .asm_f7ce
ret
-Func_f7d7: ; f7d7 (3:77d7)
+DivideBCD_f7d7: ; f7d7 (3:77d7)
ld a, [$ffa4]
swap a
and $f
@@ -4354,7 +4354,7 @@ Func_f7d7: ; f7d7 (3:77d7)
ld [$ffa2], a
ret
-Func_f800: ; f800 (3:7800)
+DivideBCD_f800: ; f800 (3:7800)
ld bc, $3
.asm_f803
ld de, $ff9f
@@ -4486,7 +4486,7 @@ InitializeEmptyList:
IsItemInBag_: ; f8a5 (3:78a5)
call GetPredefRegisters
- ld hl, wNumBagItems ; wNumBagItems
+ ld hl, wNumBagItems
.asm_f8ab
inc hl
ld a, [hli]
@@ -4697,7 +4697,7 @@ NPCMovementDirectionsToJoypadMasksTable: ; f9d2 (3:79d2)
db NPC_MOVEMENT_RIGHT, D_RIGHT
db $ff
-Func_f9db: ; f9db (3:79db)
+; unreferenced
ret
INCLUDE "engine/hp_bar.asm"
diff --git a/scripts/agatha.asm b/scripts/agatha.asm
index a8f9e137..cc209553 100755
--- a/scripts/agatha.asm
+++ b/scripts/agatha.asm
@@ -40,7 +40,8 @@ AgathaScriptPointers: ; 76469 (1d:6469)
AgathaScript4: ; 76473 (1d:6473)
ret
-asm_76474: ; 76474 (1d:6474)
+
+AgathaScript_76474: ; 76474 (1d:6474)
ld hl, wSimulatedJoypadStatesEnd
ld a, D_UP
ld [hli], a
@@ -66,16 +67,16 @@ AgathaScript0: ; 76490 (1d:6490)
ld [hJoyHeld], a
ld [wSimulatedJoypadStatesEnd], a
ld [wSimulatedJoypadStatesIndex], a
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
cp $3
jr c, .asm_764b4
ld hl, wd865
bit 6, [hl]
set 6, [hl]
- jr z, asm_76474
+ jr z, AgathaScript_76474
.asm_764b4
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
@@ -107,11 +108,11 @@ AgathaScript3: ; 764da (1d:64da)
AgathaScript2: ; 764ed (1d:64ed)
call EndTrainerBattle
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, AgathaScript_76464
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, $1
ld [W_GARYCURSCRIPT], a
@@ -119,22 +120,22 @@ AgathaScript2: ; 764ed (1d:64ed)
AgathaTextPointers: ; 76505 (1d:6505)
dw AgathaText1
- dw AgathaText2
+ dw AgathaDontRunAwayText
AgathaTrainerHeaders: ; 76509 (1d:6509)
AgathaTrainerHeader0: ; 76509 (1d:6509)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd865 ; flag's byte
- dw AgathaBeforeBattleText ; 0x6520 TextBeforeBattle
- dw AgathaAfterBattleText ; 0x652a TextAfterBattle
- dw AgathaEndBattleText ; 0x6525 TextEndBattle
- dw AgathaEndBattleText ; 0x6525 TextEndBattle
+ dw AgathaBeforeBattleText ; TextBeforeBattle
+ dw AgathaAfterBattleText ; TextAfterBattle
+ dw AgathaEndBattleText ; TextEndBattle
+ dw AgathaEndBattleText ; TextEndBattle
db $ff
AgathaText1: ; 76516 (1d:6516)
- db $08 ; asm
+ TX_ASM
ld hl, AgathaTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -151,6 +152,6 @@ AgathaAfterBattleText: ; 7652a (1d:652a)
TX_FAR _AgathaAfterBattleText
db "@"
-AgathaText2: ; 7652f (1d:652f)
- TX_FAR _AgathaText2
+AgathaDontRunAwayText: ; 7652f (1d:652f)
+ TX_FAR _AgathaDontRunAwayText
db "@"
diff --git a/scripts/battlecenterm.asm b/scripts/battlecenterm.asm
index 5ab697a1..dcb20d83 100755
--- a/scripts/battlecenterm.asm
+++ b/scripts/battlecenterm.asm
@@ -3,7 +3,7 @@ BattleCenterMScript: ; 4fd10 (13:7d10)
ld a, [$ffaa]
cp $2
ld a, $8
- jr z, .asm_4fd1d ; 0x4fd19 $2
+ jr z, .asm_4fd1d
ld a, $c
.asm_4fd1d
ld [$ff8d], a
@@ -19,14 +19,14 @@ BattleCenterMScript: ; 4fd10 (13:7d10)
ld [hli], a
ld a, $a
ld [hl], a
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [wSpriteStateData1 + $19], a
ld a, [$ffaa]
cp $2
ret z
ld a, $7
ld [wSpriteStateData2 + $15], a
- ld a, $c
+ ld a, SPRITE_FACING_RIGHT
ld [wSpriteStateData1 + $19], a
ret
diff --git a/scripts/beach_house.asm b/scripts/beach_house.asm
index 67c29f1b..d6112df7 100644
--- a/scripts/beach_house.asm
+++ b/scripts/beach_house.asm
@@ -11,7 +11,7 @@ BeachHouseTextPointers:
dw BeachHouseSign4Text
SurfinDudeText:
- db 8
+ TX_ASM
ld a,[$d471]
bit 6,a
jr nz,.next
@@ -61,7 +61,7 @@ SurfinDudeText:
db "@"
BeachHousePikachuText:
- db 8
+ TX_ASM
ld hl,.BeachHousePikachuText
call PrintText
ld a,PIKACHU
@@ -74,7 +74,7 @@ BeachHousePikachuText:
db "@"
BeachHouseSign1Text:
- db 8
+ TX_ASM
ld hl,.BeachHouseSign1Text2
ld a,[$d471]
bit 6,a
@@ -92,7 +92,7 @@ BeachHouseSign1Text:
db "@"
BeachHouseSign2Text:
- db 8
+ TX_ASM
ld hl,.BeachHouseSign2Text2
ld a,[$d471]
bit 6,a
@@ -110,7 +110,7 @@ BeachHouseSign2Text:
db "@"
BeachHouseSign3Text:
- db 8
+ TX_ASM
ld hl,.BeachHouseSign3Text2
ld a,[$d471]
bit 6,a
@@ -128,7 +128,7 @@ BeachHouseSign3Text:
db "@"
BeachHouseSign4Text:
- db 8
+ TX_ASM
ld a,1
ld [$cc3c],a
ld a,[$d471]
diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm
index 4bd26a7e..4a8183ec 100755
--- a/scripts/bikeshop.asm
+++ b/scripts/bikeshop.asm
@@ -7,24 +7,24 @@ BikeShopTextPointers: ; 1d73f (7:573f)
dw BikeShopText3
BikeShopText1: ; 1d745 (7:5745)
- db $08 ; asm
+ TX_ASM
ld a, [wd75f]
bit 0, a
- jr z, .asm_260d4 ; 0x1d74b
+ jr z, .asm_260d4
ld hl, BikeShopText_1d82f
call PrintText
jp .Done
-.asm_260d4 ; 0x1d756
+.asm_260d4
ld b, BIKE_VOUCHER
call IsItemInBag
- jr z, .asm_41190 ; 0x1d75b
+ jr z, .asm_41190
ld hl, BikeShopText_1d81f
call PrintText
ld bc, (BICYCLE << 8) | 1
call GiveItem
jr nc, .BagFull
ld a, BIKE_VOUCHER
- ldh [$db], a
+ ld [$ffdb], a
callba RemoveItemByID
ld hl, wd75f
set 0, [hl]
@@ -35,7 +35,7 @@ BikeShopText1: ; 1d745 (7:5745)
ld hl, BikeShopText_1d834
call PrintText
jr .Done
-.asm_41190 ; 0x1d78c
+.asm_41190
ld hl, BikeShopText_1d810
call PrintText
xor a
@@ -66,15 +66,15 @@ BikeShopText1: ; 1d745 (7:5745)
call PrintText
call HandleMenuInput
bit 1, a
- jr nz, .asm_b7579 ; 0x1d7dc
+ jr nz, .asm_b7579
ld hl, wd730
res 6, [hl]
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_b7579 ; 0x1d7e7
+ jr nz, .asm_b7579
ld hl, BikeShopText_1d81a
call PrintText
-.asm_b7579 ; 0x1d7ef
+.asm_b7579
ld hl, BikeShopText_1d82a
call PrintText
.Done
@@ -104,7 +104,7 @@ BikeShopText_1d81f: ; 1d81f (7:581f)
db "@"
BikeShopText_1d824: ; 1d824 (7:5824)
- TX_FAR _BikeShopText_1d824 ; 0x98eb2
+ TX_FAR _BikeShopText_1d824
db $11, "@"
BikeShopText_1d82a: ; 1d82a (7:582a)
@@ -120,7 +120,7 @@ BikeShopText_1d834: ; 1d834 (7:5834)
db "@"
BikeShopText2: ; 1d839 (7:5839)
- db $08 ; asm
+ TX_ASM
ld hl, BikeShopText_1d843
call PrintText
jp TextScriptEnd
@@ -130,13 +130,13 @@ BikeShopText_1d843: ; 1d843 (7:5843)
db "@"
BikeShopText3: ; 1d848 (7:5848)
- db $08 ; asm
+ TX_ASM
ld a, [wd75f]
bit 0, a
ld hl, BikeShopText_1d861
- jr nz, .asm_34d2d ; 0x1d851
+ jr nz, .asm_34d2d
ld hl, BikeShopText_1d85c
-.asm_34d2d ; 0x1d856
+.asm_34d2d
call PrintText
jp TextScriptEnd
diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm
index 61a575b9..1db6934a 100755
--- a/scripts/billshouse.asm
+++ b/scripts/billshouse.asm
@@ -17,11 +17,11 @@ BillsHouseScript0: ; 1e782 (7:6782)
BillsHouseScript1: ; 1e783 (7:6783)
ld a, [wSpriteStateData1 + 9]
- and a
+ and a ; cp SPRITE_FACING_DOWN
ld de, MovementData_1e79c
- jr nz, .asm_1e78f ; 0x1e78a $3
+ jr nz, .notDown
ld de, MovementData_1e7a0
-.asm_1e78f
+.notDown
ld a, $1
ld [$ff8c], a
call MoveSprite
@@ -32,6 +32,7 @@ BillsHouseScript1: ; 1e783 (7:6783)
MovementData_1e79c: ; 1e79c (7:679c)
db $40,$40,$40,$FF
+; make Bill walk around the player
MovementData_1e7a0: ; 1e7a0 (7:67a0)
db $C0,$40,$40,$80,$40,$FF
@@ -70,7 +71,7 @@ BillsHouseScript3: ; 1e7c5 (7:67c5)
ld a, HS_BILL_1
ld [wcc4d], a
predef ShowObject
- ld c, $8
+ ld c, 8
call DelayFrames
ld a, $2
ld [$ff8c], a
@@ -115,43 +116,43 @@ BillsHouseText4: ; 1e83c (7:683c)
db $fd
BillsHouseText1: ; 1e83d (7:683d)
- db $8
+ TX_ASM
ld hl, BillsHouseText_1e865
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, asm_6b196 ; 0x1e84b $d
-asm_4d03c: ; 1e84d (7:684d)
+ jr nz, .asm_1e85a
+.asm_1e84d
ld hl, BillsHouseText_1e86a
call PrintText
ld a, $1
ld [W_BILLSHOUSECURSCRIPT], a
- jr asm_fd4e2 ; 0x1e858 $8
-asm_6b196: ; 1e85a (7:685a)
+ jr .asm_1e862
+.asm_1e85a
ld hl, BillsHouseText_1e86f
call PrintText
- jr asm_4d03c ; 0x1e860 $eb
-asm_fd4e2 ; 0x1e862
+ jr .asm_1e84d
+.asm_1e862
jp TextScriptEnd
BillsHouseText_1e865: ; 1e865 (7:6865)
- TX_FAR _BillsHouseText_1e865 ; 0x8d267
+ TX_FAR _BillsHouseText_1e865
db "@"
BillsHouseText_1e86a: ; 1e86a (7:686a)
- TX_FAR _BillsHouseText_1e86a ; 0x8d345
+ TX_FAR _BillsHouseText_1e86a
db "@"
BillsHouseText_1e86f: ; 1e86f (7:686f)
- TX_FAR _BillsHouseText_1e86f ; 0x8d391
+ TX_FAR _BillsHouseText_1e86f
db "@"
BillsHouseText2: ; 1e874 (7:6874)
- db $08 ; asm
+ TX_ASM
ld a, [wd7f2]
bit 4, a
- jr nz, .asm_5491f ; 0x1e87a
+ jr nz, .asm_1e8a9
ld hl, BillThankYouText
call PrintText
ld bc, (S_S__TICKET << 8) | 1
@@ -167,14 +168,14 @@ BillsHouseText2: ; 1e874 (7:6874)
ld a, HS_CERULEAN_GUARD_2
ld [wcc4d], a
predef HideObject
-.asm_5491f ; 0x1e8a9
+.asm_1e8a9
ld hl, BillsHouseText_1e8cb
call PrintText
- jr .asm_bd408 ; 0x1e8af
+ jr .asm_1e8b7
.BagFull
ld hl, SSTicketNoRoomText
call PrintText
-.asm_bd408 ; 0x1e8b7
+.asm_1e8b7
jp TextScriptEnd
BillThankYouText: ; 1e8ba (7:68ba)
@@ -194,7 +195,7 @@ BillsHouseText_1e8cb: ; 1e8cb (7:68cb)
db "@"
BillsHouseText3: ; 1e8d0 (7:68d0)
- db $08 ; asm
+ TX_ASM
ld hl, BillsHouseText_1e8da
call PrintText
jp TextScriptEnd
diff --git a/scripts/blueshouse.asm b/scripts/blueshouse.asm
index ab05e286..5d6f1f83 100755
--- a/scripts/blueshouse.asm
+++ b/scripts/blueshouse.asm
@@ -26,7 +26,7 @@ BluesHouseTextPointers: ; 19b57 (6:5b57)
dw BluesHouseText3
BluesHouseText1: ; 19b5d (6:5b5d)
- db 8
+ TX_ASM
ld a,[wd74a]
bit 0,a
jr nz,.GotMap
diff --git a/scripts/bruno.asm b/scripts/bruno.asm
index ffe05bce..257a830b 100755
--- a/scripts/bruno.asm
+++ b/scripts/bruno.asm
@@ -40,7 +40,8 @@ BrunoScriptPointers: ; 76312 (1d:6312)
BrunoScript4: ; 7631c (1d:631c)
ret
-asm_7631d: ; 7631d (1d:631d)
+
+BrunoScript_7631d: ; 7631d (1d:631d)
ld hl, wSimulatedJoypadStatesEnd
ld a, D_UP
ld [hli], a
@@ -66,16 +67,16 @@ BrunoScript0: ; 76339 (1d:6339)
ld [hJoyHeld], a
ld [wSimulatedJoypadStatesEnd], a
ld [wSimulatedJoypadStatesIndex], a
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
cp $3
jr c, .asm_7635d
ld hl, wd864
bit 6, [hl]
set 6, [hl]
- jr z, asm_7631d
+ jr z, BrunoScript_7631d
.asm_7635d
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
@@ -107,31 +108,31 @@ BrunoScript3: ; 76383 (1d:6383)
BrunoScript2: ; 76396 (1d:6396)
call EndTrainerBattle
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, BrunoScript_7630d
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp DisplayTextID
BrunoTextPointers: ; 763a8 (1d:63a8)
dw BrunoText1
- dw BrunoText2
+ dw BrunoDontRunAwayText
BrunoTrainerHeaders: ; 763ac (1d:63ac)
BrunoTrainerHeader0: ; 763ac (1d:63ac)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd864 ; flag's byte
- dw BrunoBeforeBattleText ; 0x63c3 TextBeforeBattle
- dw BrunoAfterBattleText ; 0x63cd TextAfterBattle
- dw BrunoEndBattleText ; 0x63c8 TextEndBattle
- dw BrunoEndBattleText ; 0x63c8 TextEndBattle
+ dw BrunoBeforeBattleText ; TextBeforeBattle
+ dw BrunoAfterBattleText ; TextAfterBattle
+ dw BrunoEndBattleText ; TextEndBattle
+ dw BrunoEndBattleText ; TextEndBattle
db $ff
BrunoText1: ; 763b9 (1d:63b9)
- db $08 ; asm
+ TX_ASM
ld hl, BrunoTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -148,6 +149,6 @@ BrunoAfterBattleText: ; 763cd (1d:63cd)
TX_FAR _BrunoAfterBattleText
db "@"
-BrunoText2: ; 763d2 (1d:63d2)
- TX_FAR _UnnamedText_763d2
+BrunoDontRunAwayText: ; 763d2 (1d:63d2)
+ TX_FAR _BrunoDontRunAwayText
db "@"
diff --git a/scripts/celadoncity.asm b/scripts/celadoncity.asm
index 004d8773..9107d254 100755
--- a/scripts/celadoncity.asm
+++ b/scripts/celadoncity.asm
@@ -44,10 +44,10 @@ CeladonCityText4: ; 19999 (6:5999)
db "@"
CeladonCityText5: ; 1999e (6:599e)
- db $08 ; asm
+ TX_ASM
ld a, [wd777]
bit 0, a
- jr nz, .asm_7053f ; 0x199a4
+ jr nz, .asm_7053f
ld hl, TM41PreText
call PrintText
ld bc, (TM_41 << 8) | 1
@@ -62,7 +62,7 @@ CeladonCityText5: ; 1999e (6:599e)
ld hl, wd777
set 0, [hl]
jr .Done
-.asm_7053f ; 0x199c9
+.asm_7053f
ld hl, TM41ExplanationText
call PrintText
.Done
@@ -90,7 +90,7 @@ CeladonCityText6: ; 199e7 (6:59e7)
CeladonCityText7: ; 199ec (6:59ec)
TX_FAR _CeladonCityText7
- db $08 ; asm
+ TX_ASM
ld a, POLIWRATH
call PlayCry
jp TextScriptEnd
diff --git a/scripts/celadondiner.asm b/scripts/celadondiner.asm
index 5ae89022..f6db1606 100755
--- a/scripts/celadondiner.asm
+++ b/scripts/celadondiner.asm
@@ -26,10 +26,10 @@ CeladonDinerText4: ; 4916e (12:516e)
db "@"
CeladonDinerText5: ; 49173 (12:5173)
- db $08 ; asm
+ TX_ASM
ld a, [wd783]
bit 0, a
- jr nz, .asm_eb14d ; 0x49179
+ jr nz, .asm_eb14d
ld hl, CeladonDinerText_491a7
call PrintText
ld bc, (COIN_CASE << 8) | 1
@@ -39,15 +39,15 @@ CeladonDinerText5: ; 49173 (12:5173)
set 0, [hl]
ld hl, ReceivedCoinCaseText
call PrintText
- jr .asm_68b61 ; 0x49194
+ jr .asm_68b61
.BagFull
ld hl, CoinCaseNoRoomText
call PrintText
- jr .asm_68b61 ; 0x4919c
-.asm_eb14d ; 0x4919e
+ jr .asm_68b61
+.asm_eb14d
ld hl, CeladonDinerText_491b7
call PrintText
-.asm_68b61 ; 0x491a4
+.asm_68b61
jp TextScriptEnd
CeladonDinerText_491a7: ; 491a7 (12:51a7)
diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm
index 91d6742d..6887c9c4 100755
--- a/scripts/celadongamecorner.asm
+++ b/scripts/celadongamecorner.asm
@@ -124,59 +124,59 @@ CeladonGameCornerText1: ; 48ca4 (12:4ca4)
db "@"
CeladonGameCornerText2: ; 48ca9 (12:4ca9)
- db $08 ; asm
+ TX_ASM
call CeladonGameCornerScript_48f1e
ld hl, CeladonGameCornerText_48d22
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_c650b ; 0x48cba
+ jr nz, .asm_48d0f
ld b,COIN_CASE
call IsItemInBag
- jr z, .asm_ed086 ; 0x48cc1
+ jr z, .asm_48d19
call Has9990Coins
- jr nc, .asm_31338 ; 0x48cc6
+ jr nc, .asm_48d14
xor a
- ldh [$9f], a
- ldh [$a1], a
+ ld [$ff9f], a
+ ld [$ffa1], a
ld a, $10
- ldh [$a0], a
+ ld [$ffa0], a
call HasEnoughMoney
- jr nc, .asm_b6ef0 ; 0x48cd4
- ld hl, CeladonGameCornerText_48d31 ; $4d31
- jr .asm_e2afd ; 0x48cd9
-.asm_b6ef0 ; 0x48cdb
+ jr nc, .asm_48cdb
+ ld hl, CeladonGameCornerText_48d31
+ jr .asm_48d1c
+.asm_48cdb
xor a
- ldh [$9f], a
- ldh [$a1], a
+ ld [$ff9f], a
+ ld [$ffa1], a
ld a, $10
- ldh [$a0], a
+ ld [$ffa0], a
ld hl, $ffa1
ld de, wPlayerMoney + 2
ld c, $3
predef SubBCDPredef
xor a
- ldh [$9f], a
- ldh [$a0], a
+ ld [$ff9f], a
+ ld [$ffa0], a
ld a, $50
- ldh [$a1], a
+ ld [$ffa1], a
ld de, wPlayerCoins + 1
ld hl, $ffa1
ld c, $2
predef AddBCDPredef
call CeladonGameCornerScript_48f1e
ld hl, CeladonGameCornerText_48d27
- jr .asm_e2afd ; 0x48d0d
-.asm_c650b ; 0x48d0f
+ jr .asm_48d1c
+.asm_48d0f
ld hl, CeladonGameCornerText_48d2c
- jr .asm_e2afd ; 0x48d12
-.asm_31338 ; 0x48d14
+ jr .asm_48d1c
+.asm_48d14
ld hl, CeladonGameCornerText_48d36
- jr .asm_e2afd ; 0x48d17
-.asm_ed086 ; 0x48d19
+ jr .asm_48d1c
+.asm_48d19
ld hl, CeladonGameCornerText_48d3b
-.asm_e2afd ; 0x48d1c
+.asm_48d1c
call PrintText
jp TextScriptEnd
@@ -213,22 +213,22 @@ CeladonGameCornerText4: ; 48d45 (12:4d45)
db "@"
CeladonGameCornerText5: ; 48d4a (12:4d4a)
- db $08 ; asm
+ TX_ASM
ld a, [wd77e]
bit 2, a
- jr nz, .asm_d0957 ; 0x48d50
+ jr nz, .asm_48d89
ld hl, CeladonGameCornerText_48d9c
call PrintText
ld b, COIN_CASE
call IsItemInBag
- jr z, .asm_5aef9 ; 0x48d5d
+ jr z, .asm_48d93
call Has9990Coins
- jr nc, .asm_98546 ; 0x48d62
+ jr nc, .asm_48d8e
xor a
- ldh [$9f], a
- ldh [$a0], a
+ ld [$ff9f], a
+ ld [$ffa0], a
ld a, $10
- ldh [$a1], a
+ ld [$ffa1], a
ld de, wPlayerCoins + 1
ld hl, $ffa1
ld c, $2
@@ -238,16 +238,16 @@ CeladonGameCornerText5: ; 48d4a (12:4d4a)
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, Received10CoinsText
- jr .asm_c7d1a ; 0x48d87
-.asm_d0957 ; 0x48d89
+ jr .asm_48d96
+.asm_48d89
ld hl, CeladonGameCornerText_48dac
- jr .asm_c7d1a ; 0x48d8c
-.asm_98546 ; 0x48d8e
+ jr .asm_48d96
+.asm_48d8e
ld hl, CeladonGameCornerText_48da7
- jr .asm_c7d1a ; 0x48d91
-.asm_5aef9 ; 0x48d93
+ jr .asm_48d96
+.asm_48d93
ld hl, CeladonGameCornerText_48f19
-.asm_c7d1a ; 0x48d96
+.asm_48d96
call PrintText
jp TextScriptEnd
@@ -272,13 +272,13 @@ CeladonGameCornerText6: ; 48db1 (12:4db1)
db "@"
CeladonGameCornerText7: ; 48db6 (12:4db6)
- db $08 ; asm
+ TX_ASM
ld a, [wd77c]
bit 1, a
- ld hl, CeladonGameCornerText_48dca ; $4dca
- jr z, .asm_be3fd ; 0x48dbf
- ld hl, CeladonGameCornerText_48dcf ; $4dcf
-.asm_be3fd ; 0x48dc4
+ ld hl, CeladonGameCornerText_48dca
+ jr z, .asm_48dc4
+ ld hl, CeladonGameCornerText_48dcf
+.asm_48dc4
call PrintText
jp TextScriptEnd
@@ -295,22 +295,22 @@ CeladonGameCornerText8: ; 48dd4 (12:4dd4)
db "@"
CeladonGameCornerText9: ; 48dd9 (12:4dd9)
- db $08 ; asm
+ TX_ASM
ld a, [wd77e]
bit 4, a
- jr nz, .asm_ed8bc ; 0x48ddf
+ jr nz, .asm_48e13
ld hl, CeladonGameCornerText_48e26
call PrintText
ld b, COIN_CASE
call IsItemInBag
- jr z, .asm_df794 ; 0x48dec
+ jr z, .asm_48e1d
call Has9990Coins
- jr nc, .asm_f17c3 ; 0x48df1
+ jr nc, .asm_48e18
xor a
- ldh [$9f], a
- ldh [$a0], a
+ ld [$ff9f], a
+ ld [$ffa0], a
ld a, $20
- ldh [$a1], a
+ ld [$ffa1], a
ld de, wPlayerCoins + 1
ld hl, $ffa1
ld c, $2
@@ -318,16 +318,16 @@ CeladonGameCornerText9: ; 48dd9 (12:4dd9)
ld hl, wd77e
set 4, [hl]
ld hl, Received20CoinsText
- jr .asm_0ddc2 ; 0x48e11
-.asm_ed8bc ; 0x48e13
+ jr .asm_48e20
+.asm_48e13
ld hl, CeladonGameCornerText_48e36
- jr .asm_0ddc2 ; 0x48e16
-.asm_f17c3 ; 0x48e18
+ jr .asm_48e20
+.asm_48e18
ld hl, CeladonGameCornerText_48e31
- jr .asm_0ddc2 ; 0x48e1b
-.asm_df794 ; 0x48e1d
+ jr .asm_48e20
+.asm_48e1d
ld hl, CeladonGameCornerText_48f19
-.asm_0ddc2 ; 0x48e20
+.asm_48e20
call PrintText
jp TextScriptEnd
@@ -348,22 +348,22 @@ CeladonGameCornerText_48e36: ; 48e36 (12:4e36)
db "@"
CeladonGameCornerText10: ; 48e3b (12:4e3b)
- db $08 ; asm
+ TX_ASM
ld a, [wd77e]
bit 3, a
- jr nz, .asm_ff080 ; 0x48e41
- ld hl, CeladonGameCornerText_48e88 ; $4e88
+ jr nz, .asm_48e75
+ ld hl, CeladonGameCornerText_48e88
call PrintText
ld b,COIN_CASE
call IsItemInBag
- jr z, .asm_4fb0c ; 0x48e4e
+ jr z, .asm_48e7f
call Has9990Coins
- jr z, .asm_9505a ; 0x48e53
+ jr z, .asm_48e7a
xor a
- ldh [$9f], a
- ldh [$a0], a
+ ld [$ff9f], a
+ ld [$ffa0], a
ld a, $20
- ldh [$a1], a
+ ld [$ffa1], a
ld de, wPlayerCoins + 1
ld hl, $ffa1
ld c, $2
@@ -371,16 +371,16 @@ CeladonGameCornerText10: ; 48e3b (12:4e3b)
ld hl, wd77e
set 3, [hl]
ld hl, CeladonGameCornerText_48e8d
- jr .asm_78d65 ; 0x48e73
-.asm_ff080 ; 0x48e75
+ jr .asm_48e82
+.asm_48e75
ld hl, CeladonGameCornerText_48e98
- jr .asm_78d65 ; 0x48e78
-.asm_9505a ; 0x48e7a
+ jr .asm_48e82
+.asm_48e7a
ld hl, CeladonGameCornerText_48e93
- jr .asm_78d65 ; 0x48e7d
-.asm_4fb0c ; 0x48e7f
+ jr .asm_48e82
+.asm_48e7f
ld hl, CeladonGameCornerText_48f19
-.asm_78d65 ; 0x48e82
+.asm_48e82
call PrintText
jp TextScriptEnd
@@ -389,7 +389,7 @@ CeladonGameCornerText_48e88: ; 48e88 (12:4e88)
db "@"
CeladonGameCornerText_48e8d: ; 48e8d (12:4e8d)
- TX_FAR _CeladonGameCornerText_48e8d ; 0x9dceb
+ TX_FAR _CeladonGameCornerText_48e8d
db $0B, "@"
CeladonGameCornerText_48e93: ; 48e93 (12:4e93)
@@ -401,7 +401,7 @@ CeladonGameCornerText_48e98: ; 48e98 (12:4e98)
db "@"
CeladonGameCornerText11: ; 48e9d (12:4e9d)
- db $08 ; asm
+ TX_ASM
ld hl, CeladonGameCornerText_48ece
call PrintText
ld hl, wd72d
@@ -410,14 +410,14 @@ CeladonGameCornerText11: ; 48e9d (12:4e9d)
ld hl, CeladonGameCornerText_48ed3
ld de, CeladonGameCornerText_48ed3
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
xor a
- ldh [$b4], a
- ldh [$b3], a
- ldh [$b2], a
+ ld [hJoyHeld], a
+ ld [hJoyPressed], a
+ ld [hJoyReleased], a
ld a, $1
ld [W_CELADONGAMECORNERCURSCRIPT], a
jp TextScriptEnd
@@ -435,7 +435,7 @@ CeladonGameCornerText13: ; 48ed8 (12:4ed8)
db "@"
CeladonGameCornerText12: ; 48edd (12:4edd)
- db $08 ; asm
+ TX_ASM
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CeladonGameCornerText_48f09
@@ -453,8 +453,8 @@ CeladonGameCornerText12: ; 48edd (12:4edd)
jp TextScriptEnd
CeladonGameCornerText_48f09: ; 48f09 (12:4f09)
- TX_FAR _CeladonGameCornerText_48f09 ; 0x9ddb0
- db $8
+ TX_FAR _CeladonGameCornerText_48f09
+ TX_ASM
ld a, (SFX_02_49 - SFX_Headers_02) / 3
call PlaySound
call WaitForSoundToFinish
diff --git a/scripts/celadongym.asm b/scripts/celadongym.asm
index b1b1060c..4793bf14 100755
--- a/scripts/celadongym.asm
+++ b/scripts/celadongym.asm
@@ -12,8 +12,8 @@ CeladonGymScript: ; 4890a (12:490a)
ret
CeladonGymScript_48927: ; 48927 (12:4927)
- ld hl, Gym4CityName ; $4930
- ld de, Gym4LeaderName ; $493d
+ ld hl, Gym4CityName
+ ld de, Gym4LeaderName
jp LoadGymLeaderAndCityName
Gym4CityName: ; 48930 (12:4930)
@@ -36,7 +36,7 @@ CeladonGymScriptPointers: ; 4894e (12:494e)
dw CeladonGymScript3
CeladonGymScript3: ; 48956 (12:4956)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, CeladonGymText_48943
ld a, $f0
@@ -44,7 +44,7 @@ CeladonGymScript3: ; 48956 (12:4956)
CeladonGymText_48963: ; 48963 (12:4963)
ld a, $9
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd77c
set 1, [hl]
@@ -52,14 +52,14 @@ CeladonGymText_48963: ; 48963 (12:4963)
call GiveItem
jr nc, .BagFull
ld a, $a
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd77c
set 0, [hl]
jr .asm_4898c
.BagFull
ld a, $b
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
.asm_4898c
ld hl, W_OBTAINEDBADGES
@@ -94,82 +94,82 @@ CeladonGymTrainerHeader0: ; 489bc (12:49bc)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd77c ; flag's byte
- dw CeladonGymBattleText2 ; 0x4a8b TextBeforeBattle
- dw CeladonGymAfterBattleText2 ; 0x4a95 TextAfterBattle
- dw CeladonGymEndBattleText2 ; 0x4a90 TextEndBattle
- dw CeladonGymEndBattleText2 ; 0x4a90 TextEndBattle
+ dw CeladonGymBattleText2 ; TextBeforeBattle
+ dw CeladonGymAfterBattleText2 ; TextAfterBattle
+ dw CeladonGymEndBattleText2 ; TextEndBattle
+ dw CeladonGymEndBattleText2 ; TextEndBattle
CeladonGymTrainerHeader2: ; 489c8 (12:49c8)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd77c ; flag's byte
- dw CeladonGymBattleText3 ; 0x4aa4 TextBeforeBattle
- dw CeladonGymAfterBattleText3 ; 0x4aae TextAfterBattle
- dw CeladonGymEndBattleText3 ; 0x4aa9 TextEndBattle
- dw CeladonGymEndBattleText3 ; 0x4aa9 TextEndBattle
+ dw CeladonGymBattleText3 ; TextBeforeBattle
+ dw CeladonGymAfterBattleText3 ; TextAfterBattle
+ dw CeladonGymEndBattleText3 ; TextEndBattle
+ dw CeladonGymEndBattleText3 ; TextEndBattle
CeladonGymTrainerHeader3: ; 489d4 (12:49d4)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd77c ; flag's byte
- dw CeladonGymBattleText4 ; 0x4abd TextBeforeBattle
- dw CeladonGymAfterBattleText4 ; 0x4ac7 TextAfterBattle
- dw CeladonGymEndBattleText4 ; 0x4ac2 TextEndBattle
- dw CeladonGymEndBattleText4 ; 0x4ac2 TextEndBattle
+ dw CeladonGymBattleText4 ; TextBeforeBattle
+ dw CeladonGymAfterBattleText4 ; TextAfterBattle
+ dw CeladonGymEndBattleText4 ; TextEndBattle
+ dw CeladonGymEndBattleText4 ; TextEndBattle
CeladonGymTrainerHeader4: ; 489e0 (12:49e0)
db $5 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd77c ; flag's byte
- dw CeladonGymBattleText5 ; 0x4ad6 TextBeforeBattle
- dw CeladonGymAfterBattleText5 ; 0x4ae0 TextAfterBattle
- dw CeladonGymEndBattleText5 ; 0x4adb TextEndBattle
- dw CeladonGymEndBattleText5 ; 0x4adb TextEndBattle
+ dw CeladonGymBattleText5 ; TextBeforeBattle
+ dw CeladonGymAfterBattleText5 ; TextAfterBattle
+ dw CeladonGymEndBattleText5 ; TextEndBattle
+ dw CeladonGymEndBattleText5 ; TextEndBattle
CeladonGymTrainerHeader5: ; 489ec (12:49ec)
db $6 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd77c ; flag's byte
- dw CeladonGymBattleText6 ; 0x4aef TextBeforeBattle
- dw CeladonGymAfterBattleText6 ; 0x4af9 TextAfterBattle
- dw CeladonGymEndBattleText6 ; 0x4af4 TextEndBattle
- dw CeladonGymEndBattleText6 ; 0x4af4 TextEndBattle
+ dw CeladonGymBattleText6 ; TextBeforeBattle
+ dw CeladonGymAfterBattleText6 ; TextAfterBattle
+ dw CeladonGymEndBattleText6 ; TextEndBattle
+ dw CeladonGymEndBattleText6 ; TextEndBattle
CeladonGymTrainerHeader6: ; 489f8 (12:49f8)
db $7 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd77c ; flag's byte
- dw CeladonGymBattleText7 ; 0x4b08 TextBeforeBattle
- dw CeladonGymAfterBattleText7 ; 0x4b12 TextAfterBattle
- dw CeladonGymEndBattleText7 ; 0x4b0d TextEndBattle
- dw CeladonGymEndBattleText7 ; 0x4b0d TextEndBattle
+ dw CeladonGymBattleText7 ; TextBeforeBattle
+ dw CeladonGymAfterBattleText7 ; TextAfterBattle
+ dw CeladonGymEndBattleText7 ; TextEndBattle
+ dw CeladonGymEndBattleText7 ; TextEndBattle
CeladonGymTrainerHeader7: ; 48a04 (12:4a04)
db $8 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd77c ; flag's byte
- dw CeladonGymBattleText8 ; 0x4b21 TextBeforeBattle
- dw CeladonGymAfterBattleText8 ; 0x4b2b TextAfterBattle
- dw CeladonGymEndBattleText8 ; 0x4b26 TextEndBattle
- dw CeladonGymEndBattleText8 ; 0x4b26 TextEndBattle
+ dw CeladonGymBattleText8 ; TextBeforeBattle
+ dw CeladonGymAfterBattleText8 ; TextAfterBattle
+ dw CeladonGymEndBattleText8 ; TextEndBattle
+ dw CeladonGymEndBattleText8 ; TextEndBattle
db $ff
CeladonGymText1: ; 48a11 (12:4a11)
- db $08 ; asm
+ TX_ASM
ld a, [wd77c]
bit 1, a
- jr z, .asm_16064 ; 0x48a17
+ jr z, .asm_48a2d
bit 0, a
- jr nz, .asm_3b22c ; 0x48a1b
+ jr nz, .asm_48a25
call z, CeladonGymText_48963
call DisableWaitingAfterTextDisplay
- jr .asm_96252 ; 0x48a23
-.asm_3b22c ; 0x48a25
+ jr .asm_48a5b
+.asm_48a25
ld hl, CeladonGymText_48a68
call PrintText
- jr .asm_96252 ; 0x48a2b
-.asm_16064 ; 0x48a2d
+ jr .asm_48a5b
+.asm_48a2d
ld hl, CeladonGymText_48a5e
call PrintText
ld hl, wd72d
@@ -178,7 +178,7 @@ CeladonGymText1: ; 48a11 (12:4a11)
ld hl, CeladonGymText_48a63
ld de, CeladonGymText_48a63
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -187,7 +187,7 @@ CeladonGymText1: ; 48a11 (12:4a11)
ld a, $3
ld [W_CELADONGYMCURSCRIPT], a
ld [W_CURMAPSCRIPT], a
-.asm_96252 ; 0x48a5b
+.asm_48a5b
jp TextScriptEnd
CeladonGymText_48a5e: ; 48a5e (12:4a5e)
@@ -217,7 +217,7 @@ TM21NoRoomText: ; 48a7c (12:4a7c)
db "@"
CeladonGymText2: ; 48a81 (12:4a81)
- db $08 ; asm
+ TX_ASM
ld hl, CeladonGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -235,7 +235,7 @@ CeladonGymAfterBattleText2: ; 48a95 (12:4a95)
db "@"
CeladonGymText3: ; 48a9a (12:4a9a)
- db $08 ; asm
+ TX_ASM
ld hl, CeladonGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -253,7 +253,7 @@ CeladonGymAfterBattleText3: ; 48aae (12:4aae)
db "@"
CeladonGymText4: ; 48ab3 (12:4ab3)
- db $08 ; asm
+ TX_ASM
ld hl, CeladonGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -271,7 +271,7 @@ CeladonGymAfterBattleText4: ; 48ac7 (12:4ac7)
db "@"
CeladonGymText5: ; 48acc (12:4acc)
- db $08 ; asm
+ TX_ASM
ld hl, CeladonGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -289,7 +289,7 @@ CeladonGymAfterBattleText5: ; 48ae0 (12:4ae0)
db "@"
CeladonGymText6: ; 48ae5 (12:4ae5)
- db $08 ; asm
+ TX_ASM
ld hl, CeladonGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -307,7 +307,7 @@ CeladonGymAfterBattleText6: ; 48af9 (12:4af9)
db "@"
CeladonGymText7: ; 48afe (12:4afe)
- db $08 ; asm
+ TX_ASM
ld hl, CeladonGymTrainerHeader6
call TalkToTrainer
jp TextScriptEnd
@@ -325,7 +325,7 @@ CeladonGymAfterBattleText7: ; 48b12 (12:4b12)
db "@"
CeladonGymText8: ; 48b17 (12:4b17)
- db $08 ; asm
+ TX_ASM
ld hl, CeladonGymTrainerHeader7
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/celadonmansion1.asm b/scripts/celadonmansion1.asm
index 14832dbe..857c2e42 100755
--- a/scripts/celadonmansion1.asm
+++ b/scripts/celadonmansion1.asm
@@ -14,7 +14,7 @@ CeladonMansion1_486a1: ; 486a1 (12:46a1)
CeladonMansion1Text1: ; 486a7 (12:46a7)
TX_FAR _CeladonMansion1Text1
- db $08 ; asm
+ TX_ASM
ld a, MEOWTH
jp CeladonMansion1_486a1
@@ -24,13 +24,13 @@ CeladonMansion1Text2: ; 486b1 (12:46b1)
CeladonMansion1Text3: ; 486b6 (12:46b6)
TX_FAR _CeladonMansion1Text3
- db $8
+ TX_ASM
ld a, CLEFAIRY
jp CeladonMansion1_486a1
CeladonMansion1Text4: ; 486c0 (12:46c0)
TX_FAR _CeladonMansion1Text4
- db $8
+ TX_ASM
ld a, NIDORAN_F
jp CeladonMansion1_486a1
diff --git a/scripts/celadonmansion3.asm b/scripts/celadonmansion3.asm
index 47190c92..0dadd20a 100755
--- a/scripts/celadonmansion3.asm
+++ b/scripts/celadonmansion3.asm
@@ -24,7 +24,7 @@ WriterText: ; 487ad (12:47ad)
db "@"
DirectorText: ; 487b2 (12:47b2)
- db $08 ; asm
+ TX_ASM
; check pokédex
ld hl, wPokedexOwned
@@ -48,7 +48,7 @@ DirectorText: ; 487b2 (12:47b2)
.CompletedDexText
TX_FAR _CompletedDexText
db $6
- db $8 ; asm
+ TX_ASM
callab DisplayDiploma
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
diff --git a/scripts/celadonmansion5.asm b/scripts/celadonmansion5.asm
index c18e36c6..f847759b 100755
--- a/scripts/celadonmansion5.asm
+++ b/scripts/celadonmansion5.asm
@@ -10,12 +10,12 @@ CeladonMansion5Text1: ; 1dd41 (7:5d41)
db "@"
CeladonMansion5Text2: ; 1dd46 (7:5d46)
- db $08 ; asm
+ TX_ASM
ld bc,(EEVEE << 8) | 25
call GivePokemon
- jr nc, .asm_24365 ; 0x1dd4d
+ jr nc, .asm_24365
ld a, HS_CELADON_MANSION_5_GIFT
ld [wcc4d], a
predef HideObject
-.asm_24365 ; 0x1dd59
+.asm_24365
jp TextScriptEnd
diff --git a/scripts/celadonmart3.asm b/scripts/celadonmart3.asm
index 8874a743..46e58d8c 100755
--- a/scripts/celadonmart3.asm
+++ b/scripts/celadonmart3.asm
@@ -21,10 +21,10 @@ CeladonMart3TextPointers: ; 48228 (12:4228)
dw CeladonMart3Text17
CeladonMart3Text1: ; 4824a (12:424a)
- db $08 ; asm
+ TX_ASM
ld a, [wd778]
bit 7, a
- jr nz, .asm_a5463 ; 0x48250
+ jr nz, .asm_a5463
ld hl, TM18PreReceiveText
call PrintText
ld bc, (TM_18 << 8) | 1
@@ -33,13 +33,13 @@ CeladonMart3Text1: ; 4824a (12:424a)
ld hl, wd778
set 7, [hl]
ld hl, ReceivedTM18Text
- jr .asm_81359 ; 0x48268
+ jr .asm_81359
.BagFull
ld hl, TM18NoRoomText
- jr .asm_81359 ; 0x4826d
-.asm_a5463 ; 0x4826f
+ jr .asm_81359
+.asm_a5463
ld hl, TM18ExplanationText
-.asm_81359 ; 0x48272
+.asm_81359
call PrintText
jp TextScriptEnd
diff --git a/scripts/celadonmartelevator.asm b/scripts/celadonmartelevator.asm
index ff835765..a0aa576d 100755
--- a/scripts/celadonmartelevator.asm
+++ b/scripts/celadonmartelevator.asm
@@ -32,9 +32,9 @@ CeladonMartElevatorScript_4862a: ; 4862a (12:462a)
ret
CeladonMartElevatorScript_48631: ; 48631 (12:4631)
- ld hl, CeladonMartElavatorFloors ; $4643
+ ld hl, CeladonMartElavatorFloors
call LoadItemList
- ld hl, CeldaonMartElevatorWarpMaps ; $464a
+ ld hl, CeldaonMartElevatorWarpMaps
ld de, wcc5b
ld bc, $000a
jp CopyData
@@ -63,8 +63,8 @@ CeladonMartElevatorTextPointers: ; 4865c (12:465c)
dw CeladonMartElevatorText1
CeladonMartElevatorText1: ; 4865e (12:465e)
- db $08 ; asm
+ TX_ASM
call CeladonMartElevatorScript_48631
- ld hl, CeldaonMartElevatorWarpMaps ; $464a
+ ld hl, CeldaonMartElevatorWarpMaps
predef Func_1c9c6
jp TextScriptEnd
diff --git a/scripts/celadonmartroof.asm b/scripts/celadonmartroof.asm
index d4bb4319..07b26788 100755
--- a/scripts/celadonmartroof.asm
+++ b/scripts/celadonmartroof.asm
@@ -5,7 +5,7 @@ CeladonMartRoofScript_483d8: ; 483d8 (12:43d8)
xor a
ld [wcd37], a
ld de, wcc5b
- ld hl, CeladonMartRoofDrinkList ; $4408
+ ld hl, CeladonMartRoofDrinkList
.asm_483e2
ld a, [hli]
and a
@@ -42,19 +42,19 @@ CeladonMartRoofDrinkList: ; 48408 (12:4408)
CeladonMartRoofScript_4840c: ; 4840c (12:440c)
ld hl, wd730
set 6, [hl]
- ld hl, CeladonMartRoofText_484ee ; $44ee
+ ld hl, CeladonMartRoofText_484ee
call PrintText
xor a
- ld [wCurrentMenuItem], a ; wCurrentMenuItem
+ ld [wCurrentMenuItem], a
ld a, $3
- ld [wMenuWatchedKeys], a ; wMenuWatchedKeys
+ ld [wMenuWatchedKeys], a
ld a, [wcd37]
dec a
- ld [wMaxMenuItem], a ; wMaxMenuItem
+ ld [wMaxMenuItem], a
ld a, $2
- ld [wTopMenuItemY], a ; wTopMenuItemY
+ ld [wTopMenuItemY], a
ld a, $1
- ld [wTopMenuItemX], a ; wTopMenuItemX
+ ld [wTopMenuItemX], a
ld a, [wcd37]
dec a
ld bc, $2
@@ -73,7 +73,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
bit 1, a
ret nz
ld hl, wcc5b
- ld a, [wCurrentMenuItem] ; wCurrentMenuItem
+ ld a, [wCurrentMenuItem]
ld d, $0
ld e, a
add hl, de
@@ -86,7 +86,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
ld a, [wd778]
bit 6, a
jr nz, .asm_484e0
- ld hl, CeladonMartRoofText_48515 ; $4515
+ ld hl, CeladonMartRoofText_48515
call PrintText
call RemoveItemByIDBank12
ld bc, (TM_49 << 8) | 1
@@ -101,13 +101,13 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
ld a, [wd778]
bit 5, a
jr nz, .asm_484e0
- ld hl, CeladonMartRoofText_48504 ; $4504
+ ld hl, CeladonMartRoofText_48504
call PrintText
call RemoveItemByIDBank12
ld bc, (TM_48 << 8) | 1
call GiveItem
jr nc, .BagFull
- ld hl, CeladonMartRoofText_4850a ; $450a
+ ld hl, CeladonMartRoofText_4850a
call PrintText
ld hl, wd778
set 5, [hl]
@@ -116,22 +116,22 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
ld a, [wd778]
bit 4, a
jr nz, .asm_484e0
- ld hl, CeladonMartRoofText_484f3 ; $44f3
+ ld hl, CeladonMartRoofText_484f3
call PrintText
call RemoveItemByIDBank12
ld bc, (TM_13 << 8) | 1
call GiveItem
jr nc, .BagFull
- ld hl, CeladonMartRoofText_484f9 ; $44f9
+ ld hl, CeladonMartRoofText_484f9
call PrintText
ld hl, wd778
set 4, [hl]
ret
.BagFull
- ld hl, CeladonMartRoofText_48526 ; $4526
+ ld hl, CeladonMartRoofText_48526
jp PrintText
.asm_484e0
- ld hl, CeladonMartRoofText_4852c ; $452c
+ ld hl, CeladonMartRoofText_4852c
jp PrintText
RemoveItemByIDBank12: ; 484e6 (12:44e6)
@@ -224,11 +224,11 @@ CeladonMartRoofText1: ; 48567 (12:4567)
db "@"
CeladonMartRoofText2: ; 4856c (12:456c)
- db $08 ; asm
+ TX_ASM
call CeladonMartRoofScript_483d8
ld a, [wcd37]
and a
- jr z, .asm_914b9 ; 0x48574
+ jr z, .asm_4858f
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CeladonMartRoofText4
@@ -236,13 +236,13 @@ CeladonMartRoofText2: ; 4856c (12:456c)
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_05aa4 ; 0x48588
+ jr nz, .asm_48595
call CeladonMartRoofScript_4840c
- jr .asm_05aa4 ; 0x4858d
-.asm_914b9 ; 0x4858f
+ jr .asm_48595
+.asm_4858f
ld hl, CeladonMartRoofText3
call PrintText
-.asm_05aa4 ; 0x48595
+.asm_48595
jp TextScriptEnd
CeladonMartRoofText3: ; 48598 (12:4598)
diff --git a/scripts/ceruleancity.asm b/scripts/ceruleancity.asm
index bbddad79..d5a2166a 100755
--- a/scripts/ceruleancity.asm
+++ b/scripts/ceruleancity.asm
@@ -38,15 +38,15 @@ CeruleanCityScript4: ; 194a7 (6:54a7)
CeruleanCityScript0: ; 194c8 (6:54c8)
ld a, [wd75b]
bit 7, a
- jr nz, .asm_194f7 ; 0x194cd $28
+ jr nz, .asm_194f7
ld hl, CeruleanCityCoords1
call ArePlayerCoordsInArray
- jr nc, .asm_194f7 ; 0x194d5 $20
+ jr nc, .asm_194f7
ld a, [wWhichTrade]
cp $1
ld a, $8
ld b, $0
- jr nz, .asm_194e6 ; 0x194e0 $4
+ jr nz, .asm_194e6
ld a, $4
ld b, $4
.asm_194e6
@@ -66,7 +66,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)
ret nc
ld a, [wWalkBikeSurfState]
and a
- jr z, .asm_19512 ; 0x19508 $8
+ jr z, .asm_19512
ld a, $ff
ld [wc0ee], a
call PlaySound
@@ -80,7 +80,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)
ld [wJoyIgnore], a
ld a, [W_XCOORD]
cp $14
- jr z, .asm_19535 ; 0x19526 $d
+ jr z, .asm_19535
ld a, $1
ld [$ff8c], a
ld a, $5
@@ -140,12 +140,12 @@ CeruleanCityScript1: ; 19567 (6:5567)
; select which team to use during the encounter
ld a, [W_RIVALSTARTER]
cp STARTER2
- jr nz, .NotSquirtle ; 0x19592 $4
+ jr nz, .NotSquirtle
ld a, $7
jr .done
.NotSquirtle
cp STARTER3
- jr nz, .Charmander ; 0x1959a $4
+ jr nz, .Charmander
ld a, $8
jr .done
.Charmander
@@ -181,9 +181,9 @@ CeruleanCityScript2: ; 195b1 (6:55b1)
call SetSpriteMovementBytesToFF
ld a, [W_XCOORD]
cp $14
- jr nz, .asm_195f0 ; 0x195e9 $5
+ jr nz, .asm_195f0
ld de, CeruleanCityMovement4
- jr .asm_195f3 ; 0x195ee $3
+ jr .asm_195f3
.asm_195f0
ld de, CeruleanCityMovement3
.asm_195f3
@@ -234,7 +234,7 @@ CeruleanCityTextPointers: ; 1962d (6:562d)
dw CeruleanCityText17
CeruleanCityText1: ; 1964f (6:564f)
- db $08 ; asm
+ TX_ASM
ld a, [wd75a] ; rival battle flag
bit 0, a
; do pre-battle text
@@ -242,11 +242,11 @@ CeruleanCityText1: ; 1964f (6:564f)
; or talk about bill
ld hl, CeruleanCityText_19677
call PrintText
- jr .end ; 0x1965d
-.PreBattleText ; 0x1965f
+ jr .end
+.PreBattleText
ld hl, CeruleanCityText_19668
call PrintText
-.end ; 0x19665
+.end
jp TextScriptEnd
CeruleanCityText_19668: ; 19668 (6:5668)
@@ -266,10 +266,10 @@ CeruleanCityText_19677: ; 19677 (6:5677)
db "@"
CeruleanCityText2: ; 1967c (6:567c)
- db $8
+ TX_ASM
ld a, [wd75b]
bit 7, a
- jr nz, .asm_4ca20 ; 0x19682 $29
+ jr nz, .asm_4ca20
ld hl, CeruleanCityText_196d9
call PrintText
ld hl, wd72d
@@ -285,7 +285,7 @@ CeruleanCityText2: ; 1967c (6:567c)
ld a, $4
ld [W_CERULEANCITYCURSCRIPT], a
jp TextScriptEnd
-.asm_4ca20 ; 0x196ad
+.asm_4ca20
ld hl, CeruleanCityText_196f3
call PrintText
ld bc, (TM_28 << 8) + 1
@@ -299,7 +299,7 @@ CeruleanCityText2: ; 1967c (6:567c)
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, ReceivedTM28Text
call PrintText
- callba Func_74872
+ callba CeruleanHideRocket
.Done
jp TextScriptEnd
@@ -343,23 +343,23 @@ CeruleanCityText6: ; 19707 (6:5707)
db "@"
CeruleanCityText7: ; 1970c (6:570c)
- db $08 ; asm
- ldh a, [$d3]
+ TX_ASM
+ ld a, [hRandomAdd]
cp $b4
- jr c, .asm_e9fc9 ; 0x19711
+ jr c, .asm_e9fc9
ld hl, CeruleanCityText_19730
call PrintText
- jr .asm_d486e ; 0x19719
-.asm_e9fc9 ; 0x1971b
+ jr .asm_d486e
+.asm_e9fc9
cp $64
- jr c, .asm_df99b ; 0x1971d
+ jr c, .asm_df99b
ld hl, CeruleanCityText_19735
call PrintText
- jr .asm_d486e ; 0x19725
-.asm_df99b ; 0x19727
+ jr .asm_d486e
+.asm_df99b
ld hl, CeruleanCityText_1973a
call PrintText
-.asm_d486e ; 0x1972d
+.asm_d486e
jp TextScriptEnd
CeruleanCityText_19730: ; 19730 (6:5730)
@@ -375,29 +375,29 @@ CeruleanCityText_1973a: ; 1973a (6:573a)
db "@"
CeruleanCityText8: ; 1973f (6:573f)
- db $08 ; asm
- ldh a, [$d3]
+ TX_ASM
+ ld a, [hRandomAdd]
cp $b4
- jr c, .asm_e28da ; 0x19744
+ jr c, .asm_e28da
ld hl, CeruleanCityText_1976f
call PrintText
- jr .asm_f2f38 ; 0x1974c
-.asm_e28da ; 0x1974e
+ jr .asm_f2f38
+.asm_e28da
cp $78
- jr c, .asm_15d08 ; 0x19750
+ jr c, .asm_15d08
ld hl, CeruleanCityText_19774
call PrintText
- jr .asm_f2f38 ; 0x19758
-.asm_15d08 ; 0x1975a
+ jr .asm_f2f38
+.asm_15d08
cp $3c
- jr c, .asm_d7fea ; 0x1975c
+ jr c, .asm_d7fea
ld hl, CeruleanCityText_19779
call PrintText
- jr .asm_f2f38 ; 0x19764
-.asm_d7fea ; 0x19766
+ jr .asm_f2f38
+.asm_d7fea
ld hl, CeruleanCityText_1977e
call PrintText
-.asm_f2f38 ; 0x1976c
+.asm_f2f38
jp TextScriptEnd
CeruleanCityText_1976f: ; 1976f (6:576f)
diff --git a/scripts/ceruleancity2.asm b/scripts/ceruleancity2.asm
index 72ee4a86..2232b0f4 100755
--- a/scripts/ceruleancity2.asm
+++ b/scripts/ceruleancity2.asm
@@ -1,4 +1,4 @@
-Func_74872: ; 74872 (1d:4872)
+CeruleanHideRocket: ; 74872 (1d:4872)
; code similar to this appears in a lot of banks; this particular
; one is called after you beat the Rocket that gives you TM28 DIG.
; the screen then fades out, he disappears, and fades back in
diff --git a/scripts/ceruleangym.asm b/scripts/ceruleangym.asm
index 079844f3..a6cb4c64 100755
--- a/scripts/ceruleangym.asm
+++ b/scripts/ceruleangym.asm
@@ -12,8 +12,8 @@ CeruleanGymScript: ; 5c6b3 (17:46b3)
ret
CeruleanGymScript_5c6d0: ; 5c6d0 (17:46d0)
- ld hl, Gym2CityName ; $46d9
- ld de, Gym2LeaderName ; $46e7
+ ld hl, Gym2CityName
+ ld de, Gym2LeaderName
jp LoadGymLeaderAndCityName
Gym2CityName: ; 5c6d9 (17:46d9)
@@ -36,7 +36,7 @@ CeruleanGymScriptPointers: ; 5c6f8 (17:46f8)
dw CeruleanGymScript3
CeruleanGymScript3: ; 5c700 (17:4700)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, CeruleanGymScript_5c6ed
ld a, $f0
@@ -44,7 +44,7 @@ CeruleanGymScript3: ; 5c700 (17:4700)
CeruleanGymScript_5c70d: ; 5c70d (17:470d)
ld a, $5
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd75e
set 7, [hl]
@@ -52,14 +52,14 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d)
call GiveItem
jr nc, .BagFull
ld a, $6
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd75e
set 6, [hl]
jr .asm_5c736
.BagFull
ld a, $7
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
.asm_5c736
ld hl, W_OBTAINEDBADGES
@@ -88,37 +88,37 @@ CeruleanGymTrainerHeader0: ; 5c758 (17:4758)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd75e ; flag's byte
- dw CeruleanGymBattleText1 ; 0x47e9 TextBeforeBattle
- dw CeruleanGymAfterBattleText1 ; 0x47f3 TextAfterBattle
- dw CeruleanGymEndBattleText1 ; 0x47ee TextEndBattle
- dw CeruleanGymEndBattleText1 ; 0x47ee TextEndBattle
+ dw CeruleanGymBattleText1 ; TextBeforeBattle
+ dw CeruleanGymAfterBattleText1 ; TextAfterBattle
+ dw CeruleanGymEndBattleText1 ; TextEndBattle
+ dw CeruleanGymEndBattleText1 ; TextEndBattle
CeruleanGymTrainerHeader1: ; 5c764 (17:4764)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd75e ; flag's byte
- dw CeruleanGymBattleText2 ; 0x4802 TextBeforeBattle
- dw CeruleanGymAfterBattleText2 ; 0x480c TextAfterBattle
- dw CeruleanGymEndBattleText2 ; 0x4807 TextEndBattle
- dw CeruleanGymEndBattleText2 ; 0x4807 TextEndBattle
+ dw CeruleanGymBattleText2 ; TextBeforeBattle
+ dw CeruleanGymAfterBattleText2 ; TextAfterBattle
+ dw CeruleanGymEndBattleText2 ; TextEndBattle
+ dw CeruleanGymEndBattleText2 ; TextEndBattle
db $ff
CeruleanGymText1: ; 5c771 (17:4771)
- db $08 ; asm
+ TX_ASM
ld a, [wd75e]
bit 7, a
- jr z, .asm_10854 ; 0x5c777
+ jr z, .asm_5c78d
bit 6, a
- jr nz, .asm_37a1b ; 0x5c77b
+ jr nz, .asm_5c785
call z, CeruleanGymScript_5c70d
call DisableWaitingAfterTextDisplay
- jr .asm_95b04 ; 0x5c783
-.asm_37a1b ; 0x5c785
+ jr .asm_5c7bb
+.asm_5c785
ld hl, CeruleanGymText_5c7c3
call PrintText
- jr .asm_95b04 ; 0x5c78b
-.asm_10854 ; 0x5c78d
+ jr .asm_5c7bb
+.asm_5c78d
ld hl, CeruleanGymText_5c7be
call PrintText
ld hl, wd72d
@@ -127,17 +127,17 @@ CeruleanGymText1: ; 5c771 (17:4771)
ld hl, CeruleanGymText_5c7d8
ld de, CeruleanGymText_5c7d8
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $2
ld [W_GYMLEADERNO], a
xor a
- ldh [$b4], a
+ ld [hJoyHeld], a
ld a, $3
ld [W_CERULEANGYMCURSCRIPT], a
-.asm_95b04 ; 0x5c7bb
+.asm_5c7bb
jp TextScriptEnd
CeruleanGymText_5c7be: ; 5c7be (17:47be)
@@ -166,7 +166,7 @@ CeruleanGymText_5c7d8: ; 5c7d8 (17:47d8)
db $11, $6, "@"
CeruleanGymText2: ; 5c7df (17:47df)
- db $08 ; asm
+ TX_ASM
ld hl, CeruleanGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -184,7 +184,7 @@ CeruleanGymAfterBattleText1: ; 5c7f3 (17:47f3)
db "@"
CeruleanGymText3: ; 5c7f8 (17:47f8)
- db $08 ; asm
+ TX_ASM
ld hl, CeruleanGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -202,17 +202,17 @@ CeruleanGymAfterBattleText2: ; 5c80c (17:480c)
db "@"
CeruleanGymText4: ; 5c811 (17:4811)
- db $08 ; asm
+ TX_ASM
ld a, [wd75e]
bit 7, a
- jr nz, .asm_f80ce ; 0x5c817
+ jr nz, .asm_5c821
ld hl, CeruleanGymText_5c82a
call PrintText
- jr .asm_18a31 ; 0x5c81f
-.asm_f80ce ; 0x5c821
+ jr .asm_5c827
+.asm_5c821
ld hl, CeruleanGymText_5c82f
call PrintText
-.asm_18a31 ; 0x5c827
+.asm_5c827
jp TextScriptEnd
CeruleanGymText_5c82a: ; 5c82a (17:482a)
diff --git a/scripts/ceruleanhouse1.asm b/scripts/ceruleanhouse1.asm
index 4b6a240a..e703d830 100755
--- a/scripts/ceruleanhouse1.asm
+++ b/scripts/ceruleanhouse1.asm
@@ -10,7 +10,7 @@ CeruleanHouse1Text1: ; 1d6fd (7:56fd)
db "@"
CeruleanHouse1Text2: ; 1d702 (7:5702)
- db $08 ; asm
+ TX_ASM
ld a, $6
ld [wWhichTrade], a
predef DoInGameTradeDialogue
diff --git a/scripts/ceruleanhouse2.asm b/scripts/ceruleanhouse2.asm
index a40d9224..423c0209 100755
--- a/scripts/ceruleanhouse2.asm
+++ b/scripts/ceruleanhouse2.asm
@@ -9,7 +9,7 @@ CeruleanHouse2TextPointers: ; 74e13 (1d:4e13)
dw CeruleanHouse2Text1
CeruleanHouse2Text1: ; 74e15 (1d:4e15)
- db $8
+ TX_ASM
ld hl, CeruleanHouse2Text_74e77
call PrintText
xor a
@@ -31,7 +31,7 @@ CeruleanHouse2Text1: ; 74e15 (1d:4e15)
ld a, SPECIALLISTMENU
ld [wListMenuID], a
call DisplayListMenuID
- jr c, .asm_74e60 ; 0x74e49 $15
+ jr c, .asm_74e60
ld hl, TextPointers_74e86
ld a, [wcf91]
sub $15
@@ -43,7 +43,7 @@ CeruleanHouse2Text1: ; 74e15 (1d:4e15)
ld h, [hl]
ld l, a
call PrintText
- jr .asm_74e23 ; 0x74e5e $c3
+ jr .asm_74e23
.asm_74e60
xor a
ld [wListScrollOffset], a
diff --git a/scripts/ceruleanhousetrashed.asm b/scripts/ceruleanhousetrashed.asm
index ee60cda7..e0a194fe 100755
--- a/scripts/ceruleanhousetrashed.asm
+++ b/scripts/ceruleanhousetrashed.asm
@@ -8,18 +8,18 @@ CeruleanHouseTrashedTextPointers: ; 1d689 (7:5689)
dw CeruleanHouseTrashedText3
CeruleanHouseTrashedText1: ; 1d68f (7:568f)
- db $08 ; asm
+ TX_ASM
ld b, $e4
predef IsItemInBag_
and b
- jr z, .asm_f8734 ; 0x1d698
+ jr z, .asm_f8734
ld hl, CeruleanHouseTrashedText_1d6b0
call PrintText
- jr .asm_8dfe9 ; 0x1d6a0
-.asm_f8734 ; 0x1d6a2
+ jr .asm_8dfe9
+.asm_f8734
ld hl, CeruleanHouseTrashedText_1d6ab
call PrintText
-.asm_8dfe9 ; 0x1d6a8
+.asm_8dfe9
jp TextScriptEnd
CeruleanHouseTrashedText_1d6ab: ; 1d6ab (7:56ab)
diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm
index 48133c52..32043121 100755
--- a/scripts/cinnabargym.asm
+++ b/scripts/cinnabargym.asm
@@ -37,7 +37,7 @@ CinnabarGymScript_75792: ; 75792 (1d:5792)
ret
CinnabarGymScript_757a0: ; 757a0 (1d:57a0)
- ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c
+ ld a, [H_DOWNARROWBLINKCNT2]
ld [wTrainerHeaderFlagBit], a
ret
@@ -53,11 +53,11 @@ CinnabarGymScript0: ; 757ae (1d:57ae)
ret z
ld [$ff8c], a
cp $4
- jr nz, .asm_757c3 ; 0x757b7 $a
+ jr nz, .asm_757c3
ld a, $4
ld [wd528], a
ld de, MovementData_757d7
- jr .asm_757cb ; 0x757c1 $8
+ jr .asm_757cb
.asm_757c3
ld de, MovementData_757da
ld a, $1
@@ -101,7 +101,7 @@ CinnabarGymScript2: ; 757f6 (1d:57f6)
call CinnabarGymScript_757f1
ld a, c
and a
- jr nz, .asm_7581b ; 0x7580e $b
+ jr nz, .asm_7581b
call WaitForSoundToFinish
ld a, (SFX_02_57 - SFX_Headers_02) / 3
call PlaySound
@@ -148,7 +148,7 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
call DisplayTextID
ld hl, wd79a
set 0, [hl]
- jr .asm_75880 ; 0x75877 $7
+ jr .asm_75880
.BagFull
ld a, $c
ld [$ff8c], a
@@ -186,7 +186,7 @@ CinnabarGymTextPointers: ; 7589f (1d:589f)
dw TM38NoRoomText
CinnabarGymScript_758b7: ; 758b7 (1d:58b7)
- ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c
+ ld a, [H_DOWNARROWBLINKCNT2]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -206,20 +206,20 @@ CinnabarGymScript_758b7: ; 758b7 (1d:58b7)
jp TextScriptEnd
CinnabarGymText1: ; 758df (1d:58df)
- db $8
+ TX_ASM
ld a, [wd79a]
bit 1, a
- jr z, .asm_d9332 ; 0x758e5 $16
+ jr z, .asm_d9332
bit 0, a
- jr nz, .asm_3012f ; 0x758e9 $9
+ jr nz, .asm_3012f
call z, CinnabarGymScript3_75857
call DisableWaitingAfterTextDisplay
jp TextScriptEnd
-.asm_3012f ; 0x758f4
+.asm_3012f
ld hl, BlaineFireBlastText
call PrintText
jp TextScriptEnd
-.asm_d9332 ; 0x758fd
+.asm_d9332
ld hl, BlaineBattleText
call PrintText
ld hl, BlaineEndBattleText
@@ -258,18 +258,18 @@ TM38NoRoomText: ; 75934 (1d:5934)
db "@"
CinnabarGymText2: ; 75939 (1d:5939)
- db $08 ; asm
+ TX_ASM
call CinnabarGymScript_757a0
ld a, [wd79a]
bit 2, a
- jr nz, .asm_46bb4 ; 0x75942
+ jr nz, .asm_46bb4
ld hl, CinnabarGymText_7595f
call PrintText
ld hl, CinnabarGymText_75964
- ld de, CinnabarGymText_75964 ; $5964 XXX
+ ld de, CinnabarGymText_75964
call SaveEndBattleTextPointers
jp CinnabarGymScript_758b7
-.asm_46bb4 ; 0x75956
+.asm_46bb4
ld hl, CinnabarGymText_75969
call PrintText
jp TextScriptEnd
@@ -287,18 +287,18 @@ CinnabarGymText_75969: ; 75969 (1d:5969)
db "@"
CinnabarGymText3: ; 7596e (1d:596e)
- db $08 ; asm
+ TX_ASM
call CinnabarGymScript_757a0
ld a, [wd79a]
bit 3, a
- jr nz, .asm_4b406 ; 0x75977
+ jr nz, .asm_4b406
ld hl, CinnabarGymText_75994
call PrintText
ld hl, CinnabarGymText_75999
- ld de, CinnabarGymText_75999 ; $5999 XXX
+ ld de, CinnabarGymText_75999
call SaveEndBattleTextPointers
jp CinnabarGymScript_758b7
-.asm_4b406 ; 0x7598b
+.asm_4b406
ld hl, CinnabarGymText_7599e
call PrintText
jp TextScriptEnd
@@ -316,18 +316,18 @@ CinnabarGymText_7599e: ; 7599e (1d:599e)
db "@"
CinnabarGymText4: ; 759a3 (1d:59a3)
- db $08 ; asm
+ TX_ASM
call CinnabarGymScript_757a0
ld a, [wd79a]
bit 4, a
- jr nz, .asm_c0673 ; 0x759ac
+ jr nz, .asm_c0673
ld hl, CinnabarGymText_759c9
call PrintText
ld hl, CinnabarGymText_759ce
- ld de, CinnabarGymText_759ce ; $59ce XXX
+ ld de, CinnabarGymText_759ce
call SaveEndBattleTextPointers
jp CinnabarGymScript_758b7
-.asm_c0673 ; 0x759c0
+.asm_c0673
ld hl, CinnabarGymText_759d3
call PrintText
jp TextScriptEnd
@@ -345,18 +345,18 @@ CinnabarGymText_759d3: ; 759d3 (1d:59d3)
db "@"
CinnabarGymText5: ; 759d8 (1d:59d8)
- db $08 ; asm
+ TX_ASM
call CinnabarGymScript_757a0
ld a, [wd79a]
bit 5, a
- jr nz, .asm_5cfd7 ; 0x759e1
+ jr nz, .asm_5cfd7
ld hl, CinnabarGymText_759fe
call PrintText
ld hl, CinnabarGymText_75a03
- ld de, CinnabarGymText_75a03 ; $5a03 XXX
+ ld de, CinnabarGymText_75a03
call SaveEndBattleTextPointers
jp CinnabarGymScript_758b7
-.asm_5cfd7 ; 0x759f5
+.asm_5cfd7
ld hl, CinnabarGymText_75a08
call PrintText
jp TextScriptEnd
@@ -374,18 +374,18 @@ CinnabarGymText_75a08: ; 75a08 (1d:5a08)
db "@"
CinnabarGymText6: ; 75a0d (1d:5a0d)
- db $08 ; asm
+ TX_ASM
call CinnabarGymScript_757a0
ld a, [wd79a]
bit 6, a
- jr nz, .asm_776b4 ; 0x75a16
+ jr nz, .asm_776b4
ld hl, CinnabarGymText_75a33
call PrintText
ld hl, CinnabarGymText_75a38
ld de, CinnabarGymText_75a38
call SaveEndBattleTextPointers
jp CinnabarGymScript_758b7
-.asm_776b4 ; 0x75a2a
+.asm_776b4
ld hl, CinnabarGymText_75a3d
call PrintText
jp TextScriptEnd
@@ -403,18 +403,18 @@ CinnabarGymText_75a3d: ; 75a3d (1d:5a3d)
db "@"
CinnabarGymText7: ; 75a42 (1d:5a42)
- db $08 ; asm
+ TX_ASM
call CinnabarGymScript_757a0
ld a, [wd79a]
bit 7, a
- jr nz, .asm_2f755 ; 0x75a4b
+ jr nz, .asm_2f755
ld hl, CinnabarGymText_75a68
call PrintText
ld hl, CinnabarGymText_75a6d
ld de, CinnabarGymText_75a6d
call SaveEndBattleTextPointers
jp CinnabarGymScript_758b7
-.asm_2f755 ; 0x75a5f
+.asm_2f755
ld hl, CinnabarGymText_75a72
call PrintText
jp TextScriptEnd
@@ -432,18 +432,18 @@ CinnabarGymText_75a72: ; 75a72 (1d:5a72)
db "@"
CinnabarGymText8: ; 75a77 (1d:5a77)
- db $08 ; asm
+ TX_ASM
call CinnabarGymScript_757a0
ld a, [wd79b]
bit 0, a
- jr nz, .asm_d87be ; 0x75a80
+ jr nz, .asm_d87be
ld hl, CinnabarGymText_75a9d
call PrintText
ld hl, CinnabarGymText_75aa2
- ld de, CinnabarGymText_75aa2 ; $5aa2 XXX
+ ld de, CinnabarGymText_75aa2
call SaveEndBattleTextPointers
jp CinnabarGymScript_758b7
-.asm_d87be ; 0x75a94
+.asm_d87be
ld hl, CinnabarGymText_75aa7
call PrintText
jp TextScriptEnd
@@ -461,15 +461,15 @@ CinnabarGymText_75aa7: ; 75aa7 (1d:5aa7)
db "@"
CinnabarGymText9: ; 75aac (1d:5aac)
- db $08 ; asm
+ TX_ASM
ld a, [wd79a]
bit 1, a
- jr nz, .asm_627d9 ; 0x75ab2
+ jr nz, .asm_627d9
ld hl, CinnabarGymText_75ac2
- jr .asm_0b11d ; 0x75ab7
-.asm_627d9 ; 0x75ab9
+ jr .asm_0b11d
+.asm_627d9
ld hl, CinnabarGymText_75ac7
-.asm_0b11d ; 0x75abc
+.asm_0b11d
call PrintText
jp TextScriptEnd
diff --git a/scripts/copycatshouse1f.asm b/scripts/copycatshouse1f.asm
index 230a3ca3..bc76da1a 100755
--- a/scripts/copycatshouse1f.asm
+++ b/scripts/copycatshouse1f.asm
@@ -16,7 +16,7 @@ CopycatsHouse1FText2: ; 75ed1 (1d:5ed1)
CopycatsHouse1FText3: ; 75ed6 (1d:5ed6)
TX_FAR _CopycatsHouse1FText3
- db $8
+ TX_ASM
ld a, CHANSEY
call PlayCry
jp TextScriptEnd
diff --git a/scripts/copycatshouse2f.asm b/scripts/copycatshouse2f.asm
index b7a1255c..51a633b1 100755
--- a/scripts/copycatshouse2f.asm
+++ b/scripts/copycatshouse2f.asm
@@ -11,17 +11,17 @@ CopycatsHouse2FTextPointers: ; 5cc74 (17:4c74)
dw CopycatsHouse2FText7
CopycatsHouse2FText1: ; 5cc82 (17:4c82)
- db $08 ; asm
+ TX_ASM
ld a, [wd7af]
bit 0, a
- jr nz, .asm_7ccf3 ; 0x5cc88
+ jr nz, .asm_7ccf3
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CopycatsHouse2FText_5ccd4
call PrintText
ld b, POKE_DOLL
call IsItemInBag
- jr z, .asm_62ecd ; 0x5cc9a
+ jr z, .asm_62ecd
ld hl, TM31PreReceiveText
call PrintText
ld bc, (TM_31 << 8) | 1
@@ -30,19 +30,19 @@ CopycatsHouse2FText1: ; 5cc82 (17:4c82)
ld hl, ReceivedTM31Text
call PrintText
ld a, POKE_DOLL
- ldh [$db], a
+ ld [$ffdb], a
callba RemoveItemByID
ld hl, wd7af
set 0, [hl]
- jr .asm_62ecd ; 0x5ccc1
+ jr .asm_62ecd
.BagFull
ld hl, TM31NoRoomText
call PrintText
- jr .asm_62ecd ; 0x5ccc9
-.asm_7ccf3 ; 0x5cccb
+ jr .asm_62ecd
+.asm_7ccf3
ld hl, TM31ExplanationText2
call PrintText
-.asm_62ecd ; 0x5ccd1
+.asm_62ecd
jp TextScriptEnd
CopycatsHouse2FText_5ccd4: ; 5ccd4 (17:4cd4)
@@ -83,13 +83,13 @@ CopycatsHouse2FText6: ; 5ccfe (17:4cfe)
db "@"
CopycatsHouse2FText7: ; 5cd03 (17:4d03)
- db $08 ; asm
+ TX_ASM
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ld hl, CopycatsHouse2FText_5cd1c
- jr nz, .asm_399a4 ; 0x5cd0c
+ jr nz, .notUp
ld hl, CopycatsHouse2FText_5cd17
-.asm_399a4 ; 0x5cd11
+.notUp
call PrintText
jp TextScriptEnd
diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm
index 1830d2c0..3fa2d3b9 100755
--- a/scripts/daycarem.asm
+++ b/scripts/daycarem.asm
@@ -5,7 +5,7 @@ DayCareMTextPointers: ; 56252 (15:6252)
dw DayCareMText1
DayCareMText1: ; 56254 (15:6254)
- db $8
+ TX_ASM
call SaveScreenTilesToBuffer2
ld a, [W_DAYCARE_IN_USE]
and a
@@ -239,9 +239,9 @@ DayCareMText_56432: ; 56432 (15:6432)
db "@"
DayCareMText_56437: ; 56437 (15:6437)
- TX_FAR _DayCareMText_56437 ; 0x8c000
+ TX_FAR _DayCareMText_56437
DayCareMText_5643b: ; 5643b (15:643b)
- TX_FAR _DayCareMText_5643b ; 0x8c013
+ TX_FAR _DayCareMText_5643b
db "@"
DayCareMText_56440: ; 56440 (15:6440)
diff --git a/scripts/fanclub.asm b/scripts/fanclub.asm
index f9a839fa..79621fce 100755
--- a/scripts/fanclub.asm
+++ b/scripts/fanclub.asm
@@ -24,7 +24,7 @@ FanClubTextPointers: ; 59b84 (16:5b84)
FanClubText1:
; pikachu fan
- db $08 ; asm
+ TX_ASM
ld a, [wd771]
bit 7, a
jr nz, .mineisbetter
@@ -51,7 +51,7 @@ FanClubText1:
FanClubText2:
; seel fan
- db $08 ; asm
+ TX_ASM
ld a, [wd771]
bit 6, a
jr nz, .mineisbetter
@@ -78,7 +78,7 @@ FanClubText2:
FanClubText3:
; pikachu
- db $8
+ TX_ASM
ld hl, .text
call PrintText
ld a, PIKACHU
@@ -92,7 +92,7 @@ FanClubText3:
FanClubText4:
; seel
- db $08 ; asm
+ TX_ASM
ld hl, .text
call PrintText
ld a, SEEL
@@ -106,7 +106,7 @@ FanClubText4:
FanClubText5:
; chair
- db $08 ; asm
+ TX_ASM
call FanClubBikeInBag
jr nz, .nothingleft
diff --git a/scripts/fightingdojo.asm b/scripts/fightingdojo.asm
index e26da1b1..b5332fed 100755
--- a/scripts/fightingdojo.asm
+++ b/scripts/fightingdojo.asm
@@ -99,42 +99,42 @@ FightingDojoTrainerHeader0: ; 5ce13 (17:4e13)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7b1 ; flag's byte
- dw FightingDojoBattleText1 ; 0x4eac TextBeforeBattle
- dw FightingDojoAfterBattleText1 ; 0x4eb6 TextAfterBattle
- dw FightingDojoEndBattleText1 ; 0x4eb1 TextEndBattle
- dw FightingDojoEndBattleText1 ; 0x4eb1 TextEndBattle
+ dw FightingDojoBattleText1 ; TextBeforeBattle
+ dw FightingDojoAfterBattleText1 ; TextAfterBattle
+ dw FightingDojoEndBattleText1 ; TextEndBattle
+ dw FightingDojoEndBattleText1 ; TextEndBattle
FightingDojoTrainerHeader1: ; 5ce1f (17:4e1f)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7b1 ; flag's byte
- dw FightingDojoBattleText2 ; 0x4ec5 TextBeforeBattle
- dw FightingDojoAfterBattleText2 ; 0x4ecf TextAfterBattle
- dw FightingDojoEndBattleText2 ; 0x4eca TextEndBattle
- dw FightingDojoEndBattleText2 ; 0x4eca TextEndBattle
+ dw FightingDojoBattleText2 ; TextBeforeBattle
+ dw FightingDojoAfterBattleText2 ; TextAfterBattle
+ dw FightingDojoEndBattleText2 ; TextEndBattle
+ dw FightingDojoEndBattleText2 ; TextEndBattle
FightingDojoTrainerHeader2: ; 5ce2b (17:4e2b)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7b1 ; flag's byte
- dw FightingDojoBattleText3 ; 0x4ede TextBeforeBattle
- dw FightingDojoAfterBattleText3 ; 0x4ee8 TextAfterBattle
- dw FightingDojoEndBattleText3 ; 0x4ee3 TextEndBattle
- dw FightingDojoEndBattleText3 ; 0x4ee3 TextEndBattle
+ dw FightingDojoBattleText3 ; TextBeforeBattle
+ dw FightingDojoAfterBattleText3 ; TextAfterBattle
+ dw FightingDojoEndBattleText3 ; TextEndBattle
+ dw FightingDojoEndBattleText3 ; TextEndBattle
FightingDojoTrainerHeader3: ; 5ce37 (17:4e37)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7b1 ; flag's byte
- dw FightingDojoBattleText4 ; 0x4ef7 TextBeforeBattle
- dw FightingDojoAfterBattleText4 ; 0x4f01 TextAfterBattle
- dw FightingDojoEndBattleText4 ; 0x4efc TextEndBattle
- dw FightingDojoEndBattleText4 ; 0x4efc TextEndBattle
+ dw FightingDojoBattleText4 ; TextBeforeBattle
+ dw FightingDojoAfterBattleText4 ; TextAfterBattle
+ dw FightingDojoEndBattleText4 ; TextEndBattle
+ dw FightingDojoEndBattleText4 ; TextEndBattle
db $ff
FightingDojoText1: ; 5ce44 (17:4e44)
- db $08 ; asm
+ TX_ASM
ld a, [wd7b1]
bit 0, a
jp nz, .continue1
@@ -148,22 +148,22 @@ FightingDojoText1: ; 5ce44 (17:4e44)
ld hl, FightingDojoText_5ce93
ld de, FightingDojoText_5ce93
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $3
ld [W_FIGHTINGDOJOCURSCRIPT], a
ld [W_CURMAPSCRIPT], a
- jr .asm_9dba4 ; 0x5ce7b
-.continue1 ; 0x5ce7d
+ jr .asm_9dba4
+.continue1
ld hl, FightingDojoText_5ce9d
call PrintText
- jr .asm_9dba4 ; 0x5ce83
-.continue2 ; 0x5ce85f
+ jr .asm_9dba4
+.continue2
ld hl, FightingDojoText8
call PrintText
-.asm_9dba4 ; 0x5ce8b
+.asm_9dba4
jp TextScriptEnd
FightingDojoText_5ce8e: ; 5ce8e (17:4e8e)
@@ -183,7 +183,7 @@ FightingDojoText_5ce9d: ; 5ce9d (17:4e9d)
db "@"
FightingDojoText2: ; 5cea2 (17:4ea2)
- db $08 ; asm
+ TX_ASM
ld hl, FightingDojoTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -201,7 +201,7 @@ FightingDojoAfterBattleText1: ; 5ceb6 (17:4eb6)
db "@"
FightingDojoText3: ; 5cebb (17:4ebb)
- db $08 ; asm
+ TX_ASM
ld hl, FightingDojoTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -219,7 +219,7 @@ FightingDojoAfterBattleText2: ; 5cecf (17:4ecf)
db "@"
FightingDojoText4: ; 5ced4 (17:4ed4)
- db $08 ; asm
+ TX_ASM
ld hl, FightingDojoTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -237,7 +237,7 @@ FightingDojoAfterBattleText3: ; 5cee8 (17:4ee8)
db "@"
FightingDojoText5: ; 5ceed (17:4eed)
- db $08 ; asm
+ TX_ASM
ld hl, FightingDojoTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -256,7 +256,7 @@ FightingDojoAfterBattleText4: ; 5cf01 (17:4f01)
FightingDojoText6: ; 5cf06 (17:4f06)
; Hitmonlee Poké Ball
- db $08 ; asm
+ TX_ASM
ld a, [wd7b1]
and %11000000
jr z, .GetMon
@@ -294,7 +294,7 @@ WantHitmonleeText: ; 5cf49 (17:4f49)
FightingDojoText7: ; 5cf4e (17:4f4e)
; Hitmonchan Poké Ball
- db $08 ; asm
+ TX_ASM
ld a, [wd7b1]
and %11000000
jr z, .GetMon
diff --git a/scripts/fuchsiacity.asm b/scripts/fuchsiacity.asm
index 6b7e067b..462e6084 100755
--- a/scripts/fuchsiacity.asm
+++ b/scripts/fuchsiacity.asm
@@ -74,7 +74,7 @@ FuchsiaCityText18: ; 19a8b (6:5a8b)
db "@"
FuchsiaCityText19: ; 19a90 (6:5a90)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaCityChanseyText
call PrintText
ld a, CHANSEY
@@ -86,7 +86,7 @@ FuchsiaCityChanseyText: ; 19a9f (6:5a9f)
db "@"
FuchsiaCityText20: ; 19aa4 (6:5aa4)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaCityVoltorbText
call PrintText
ld a, VOLTORB
@@ -98,7 +98,7 @@ FuchsiaCityVoltorbText: ; 19ab3 (6:5ab3)
db "@"
FuchsiaCityText21: ; 19ab8 (6:5ab8)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaCityKangaskhanText
call PrintText
ld a, KANGASKHAN
@@ -110,7 +110,7 @@ FuchsiaCityKangaskhanText: ; 19ac7 (6:5ac7)
db "@"
FuchsiaCityText22: ; 19acc (6:5acc)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaCitySlowpokeText
call PrintText
ld a, SLOWPOKE
@@ -122,7 +122,7 @@ FuchsiaCitySlowpokeText: ; 19adb (6:5adb)
db "@"
FuchsiaCityText23: ; 19ae0 (6:5ae0)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaCityLaprasText
call PrintText
ld a, LAPRAS
@@ -134,27 +134,27 @@ FuchsiaCityLaprasText: ; 19aef (6:5aef)
db "@"
FuchsiaCityText24: ; 19af4 (6:5af4)
- db $08 ; asm
+ TX_ASM
ld a, [wd7f6]
bit 6, a
- jr nz, .asm_3b4e8 ; 0x19afa
+ jr nz, .asm_3b4e8
bit 7, a
- jr nz, .asm_667d5 ; 0x19afe
+ jr nz, .asm_667d5
ld hl, FuchsiaCityText_19b2a
call PrintText
- jr .asm_4343f ; 0x19b06
-.asm_3b4e8 ; 0x19b08
+ jr .asm_4343f
+.asm_3b4e8
ld hl, FuchsiaCityOmanyteText
call PrintText
ld a, OMANYTE
- jr .asm_81556 ; 0x19b10
-.asm_667d5 ; 0x19b12
+ jr .asm_81556
+.asm_667d5
ld hl, FuchsiaCityKabutoText
call PrintText
ld a, KABUTO
-.asm_81556 ; 0x19b1a
+.asm_81556
call DisplayPokedex
-.asm_4343f ; 0x19b1d
+.asm_4343f
jp TextScriptEnd
FuchsiaCityOmanyteText: ; 19b20 (6:5b20)
diff --git a/scripts/fuchsiagym.asm b/scripts/fuchsiagym.asm
index 43d977d7..f88f0055 100755
--- a/scripts/fuchsiagym.asm
+++ b/scripts/fuchsiagym.asm
@@ -37,14 +37,14 @@ FuchsiaGymScriptPointers: ; 75482 (1d:5482)
dw FuchsiaGymScript3
FuchsiaGymScript3: ; 7548a (1d:548a)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, FuchsiaGymScript_75477
ld a, $f0
ld [wJoyIgnore], a
FuchsiaGymScript3_75497: ; 75497 (1d:5497)
ld a, $9
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd792
set 1, [hl]
@@ -52,14 +52,14 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497)
call GiveItem
jr nc, .BagFull
ld a, $a
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd792
set 0, [hl]
jr .asm_754c0
.BagFull
ld a, $b
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
.asm_754c0
ld hl, W_OBTAINEDBADGES
@@ -92,108 +92,108 @@ FuchsiaGymTrainerHeader0: ; 754eb (1d:54eb)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte
- dw FuchsiaGymBattleText1 ; 0x55ae TextBeforeBattle
- dw FuchsiaGymAfterBattleText1 ; 0x55b8 TextAfterBattle
- dw FuchsiaGymEndBattleText1 ; 0x55b3 TextEndBattle
- dw FuchsiaGymEndBattleText1 ; 0x55b3 TextEndBattle
+ dw FuchsiaGymBattleText1 ; TextBeforeBattle
+ dw FuchsiaGymAfterBattleText1 ; TextAfterBattle
+ dw FuchsiaGymEndBattleText1 ; TextEndBattle
+ dw FuchsiaGymEndBattleText1 ; TextEndBattle
FuchsiaGymTrainerHeader2: ; 754f7 (1d:54f7)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte
- dw FuchsiaGymBattleText2 ; 0x55c7 TextBeforeBattle
- dw FuchsiaGymAfterBattleText2 ; 0x55d1 TextAfterBattle
- dw FuchsiaGymEndBattleText2 ; 0x55cc TextEndBattle
- dw FuchsiaGymEndBattleText2 ; 0x55cc TextEndBattle
+ dw FuchsiaGymBattleText2 ; TextBeforeBattle
+ dw FuchsiaGymAfterBattleText2 ; TextAfterBattle
+ dw FuchsiaGymEndBattleText2 ; TextEndBattle
+ dw FuchsiaGymEndBattleText2 ; TextEndBattle
FuchsiaGymTrainerHeader3: ; 75503 (1d:5503)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd792 ; flag's byte
- dw FuchsiaGymBattleText3 ; 0x55e0 TextBeforeBattle
- dw FuchsiaGymAfterBattleText3 ; 0x55ea TextAfterBattle
- dw FuchsiaGymEndBattleText3 ; 0x55e5 TextEndBattle
- dw FuchsiaGymEndBattleText3 ; 0x55e5 TextEndBattle
+ dw FuchsiaGymBattleText3 ; TextBeforeBattle
+ dw FuchsiaGymAfterBattleText3 ; TextAfterBattle
+ dw FuchsiaGymEndBattleText3 ; TextEndBattle
+ dw FuchsiaGymEndBattleText3 ; TextEndBattle
FuchsiaGymTrainerHeader4: ; 7550f (1d:550f)
db $5 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte
- dw FuchsiaGymBattleText4 ; 0x55f9 TextBeforeBattle
- dw FuchsiaGymAfterBattleText4 ; 0x5603 TextAfterBattle
- dw FuchsiaGymEndBattleText4 ; 0x55fe TextEndBattle
- dw FuchsiaGymEndBattleText4 ; 0x55fe TextEndBattle
+ dw FuchsiaGymBattleText4 ; TextBeforeBattle
+ dw FuchsiaGymAfterBattleText4 ; TextAfterBattle
+ dw FuchsiaGymEndBattleText4 ; TextEndBattle
+ dw FuchsiaGymEndBattleText4 ; TextEndBattle
FuchsiaGymTrainerHeader5: ; 7551b (1d:551b)
db $6 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte
- dw FuchsiaGymBattleText5 ; 0x5612 TextBeforeBattle
- dw FuchsiaGymAfterBattleText5 ; 0x561c TextAfterBattle
- dw FuchsiaGymEndBattleText5 ; 0x5617 TextEndBattle
- dw FuchsiaGymEndBattleText5 ; 0x5617 TextEndBattle
+ dw FuchsiaGymBattleText5 ; TextBeforeBattle
+ dw FuchsiaGymAfterBattleText5 ; TextAfterBattle
+ dw FuchsiaGymEndBattleText5 ; TextEndBattle
+ dw FuchsiaGymEndBattleText5 ; TextEndBattle
FuchsiaGymTrainerHeader6: ; 75527 (1d:5527)
db $7 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd792 ; flag's byte
- dw FuchsiaGymBattleText6 ; 0x562b TextBeforeBattle
- dw FuchsiaGymAfterBattleText6 ; 0x5635 TextAfterBattle
- dw FuchsiaGymEndBattleText6 ; 0x5630 TextEndBattle
- dw FuchsiaGymEndBattleText6 ; 0x5630 TextEndBattle
+ dw FuchsiaGymBattleText6 ; TextBeforeBattle
+ dw FuchsiaGymAfterBattleText6 ; TextAfterBattle
+ dw FuchsiaGymEndBattleText6 ; TextEndBattle
+ dw FuchsiaGymEndBattleText6 ; TextEndBattle
db $ff
FuchsiaGymText1: ; 75534 (1d:5534)
- db $08 ; asm
+ TX_ASM
ld a, [wd792]
bit 1, a
- jr z, .asm_181b6 ; 0x7553a
+ jr z, .asm_181b6
bit 0, a
- jr nz, .asm_adc3b ; 0x7553e
+ jr nz, .asm_adc3b
call z, FuchsiaGymScript3_75497
call DisableWaitingAfterTextDisplay
- jr .asm_e84c6 ; 0x75546
-.asm_adc3b ; 0x75548
- ld hl, UnnamedText_7558b
+ jr .asm_e84c6
+.asm_adc3b
+ ld hl, KogaExplainToxicText
call PrintText
- jr .asm_e84c6 ; 0x7554e
-.asm_181b6 ; 0x75550
- ld hl, UnnamedText_75581
+ jr .asm_e84c6
+.asm_181b6
+ ld hl, KogaBeforeBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, UnnamedText_75586
- ld de, UnnamedText_75586
+ ld hl, KogaAfterBattleText
+ ld de, KogaAfterBattleText
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $5
ld [W_GYMLEADERNO], a
xor a
- ldh [$b4], a
+ ld [hJoyHeld], a
ld a, $3
ld [W_FUCHSIAGYMCURSCRIPT], a
-.asm_e84c6 ; 0x7557e
+.asm_e84c6
jp TextScriptEnd
-UnnamedText_75581: ; 75581 (1d:5581)
- TX_FAR _UnnamedText_75581
+KogaBeforeBattleText: ; 75581 (1d:5581)
+ TX_FAR _KogaBeforeBattleText
db "@"
-UnnamedText_75586: ; 75586 (1d:5586)
- TX_FAR _UnnamedText_75586
+KogaAfterBattleText: ; 75586 (1d:5586)
+ TX_FAR _KogaAfterBattleText
db "@"
-UnnamedText_7558b: ; 7558b (1d:558b)
- TX_FAR _UnnamedText_7558b
+KogaExplainToxicText: ; 7558b (1d:558b)
+ TX_FAR _KogaExplainToxicText
db "@"
FuchsiaGymText9: ; 75590 (1d:5590)
- TX_FAR _UnnamedText_75590
+ TX_FAR _FuchsiaGymText9
db "@"
FuchsiaGymText10: ; 75595 (1d:5595)
@@ -209,7 +209,7 @@ FuchsiaGymText11: ; 7559f (1d:559f)
db "@"
FuchsiaGymText2: ; 755a4 (1d:55a4)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -227,7 +227,7 @@ FuchsiaGymAfterBattleText1: ; 755b8 (1d:55b8)
db "@"
FuchsiaGymText3: ; 755bd (1d:55bd)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -245,7 +245,7 @@ FuchsiaGymAfterBattleText2: ; 755d1 (1d:55d1)
db "@"
FuchsiaGymText4: ; 755d6 (1d:55d6)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -263,7 +263,7 @@ FuchsiaGymAfterBattleText3: ; 755ea (1d:55ea)
db "@"
FuchsiaGymText5: ; 755ef (1d:55ef)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -281,7 +281,7 @@ FuchsiaGymAfterBattleText4: ; 75603 (1d:5603)
db "@"
FuchsiaGymText6: ; 75608 (1d:5608)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -299,7 +299,7 @@ FuchsiaGymAfterBattleText5: ; 7561c (1d:561c)
db "@"
FuchsiaGymText7: ; 75621 (1d:5621)
- db $08 ; asm
+ TX_ASM
ld hl, FuchsiaGymTrainerHeader6
call TalkToTrainer
jp TextScriptEnd
@@ -317,20 +317,20 @@ FuchsiaGymAfterBattleText6: ; 75635 (1d:5635)
db "@"
FuchsiaGymText8: ; 7563a (1d:563a)
- db $08 ; asm
+ TX_ASM
ld a, [wd792]
bit 1, a
- ld hl, UnnamedText_75653
- jr nz, .asm_50671 ; 0x75643
- ld hl, UnnamedText_7564e
-.asm_50671 ; 0x75648
+ ld hl, FuchsiaGymText_75653
+ jr nz, .asm_50671
+ ld hl, FuchsiaGymText_7564e
+.asm_50671
call PrintText
jp TextScriptEnd
-UnnamedText_7564e: ; 7564e (1d:564e)
- TX_FAR _UnnamedText_7564e
+FuchsiaGymText_7564e: ; 7564e (1d:564e)
+ TX_FAR _FuchsiaGymText_7564e
db "@"
-UnnamedText_75653: ; 75653 (1d:5653)
- TX_FAR _UnnamedText_75653
+FuchsiaGymText_75653: ; 75653 (1d:5653)
+ TX_FAR _FuchsiaGymText_75653
db "@"
diff --git a/scripts/fuchsiahouse2.asm b/scripts/fuchsiahouse2.asm
index 33bae7e4..12b49297 100755
--- a/scripts/fuchsiahouse2.asm
+++ b/scripts/fuchsiahouse2.asm
@@ -9,36 +9,36 @@ FuchsiaHouse2TextPointers: ; 750b8 (1d:50b8)
dw FuchsiaHouse2Text5
FuchsiaHouse2Text1: ; 750c2 (1d:50c2)
- db $08 ; asm
+ TX_ASM
ld a, [wd78e]
bit 0, a
- jr nz, .subtract ; 0x750c8
+ jr nz, .subtract
ld b,GOLD_TEETH
call IsItemInBag
- jr nz, .asm_3f30f ; 0x750cf
+ jr nz, .asm_3f30f
ld a, [wd78e]
bit 1, a
- jr nz, .asm_60cba ; 0x750d6
+ jr nz, .asm_60cba
ld hl, WardenGibberishText1
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
ld hl, WardenGibberishText3
- jr nz, .asm_61238 ; 0x750e8
+ jr nz, .asm_61238
ld hl, WardenGibberishText2
-.asm_61238 ; 0x750ed
+.asm_61238
call PrintText
- jr .asm_52039 ; 0x750f0
-.asm_3f30f ; 0x750f2
+ jr .asm_52039
+.asm_3f30f
ld hl, WardenTeethText1
call PrintText
ld a, GOLD_TEETH
- ldh [$db], a
+ ld [$ffdb], a
callba RemoveItemByID
ld hl, wd78e
set 1, [hl]
-.asm_60cba ; 0x75109
+.asm_60cba
ld hl, WardenThankYouText
call PrintText
ld bc,(HM_04 << 8) | 1
@@ -48,15 +48,15 @@ FuchsiaHouse2Text1: ; 750c2 (1d:50c2)
call PrintText
ld hl, wd78e
set 0, [hl]
- jr .asm_52039 ; 0x75122
-.subtract ; 0x75124
+ jr .asm_52039
+.subtract
ld hl, HM04ExplanationText
call PrintText
- jr .asm_52039 ; 0x7512a
+ jr .asm_52039
.BagFull
ld hl, HM04NoRoomText
call PrintText
-.asm_52039 ; 0x75132
+.asm_52039
jp TextScriptEnd
WardenGibberishText1: ; 75135 (1d:5135)
@@ -97,13 +97,13 @@ HM04NoRoomText: ; 7515e (1d:515e)
FuchsiaHouse2Text5: ; 75163 (1d:5163)
FuchsiaHouse2Text4: ; 75163 (1d:5163)
- db $08 ; asm
- ldh a, [$8c]
+ TX_ASM
+ ld a, [H_SPRITEINDEX]
cp $4
ld hl, FuchsiaHouse2Text_7517b
- jr nz, .asm_4c9a2 ; 0x7516b
+ jr nz, .asm_4c9a2
ld hl, FuchsiaHouse2Text_75176
-.asm_4c9a2 ; 0x75170
+.asm_4c9a2
call PrintText
jp TextScriptEnd
diff --git a/scripts/fuchsiahouse3.asm b/scripts/fuchsiahouse3.asm
index 372df6a6..8c83b779 100755
--- a/scripts/fuchsiahouse3.asm
+++ b/scripts/fuchsiahouse3.asm
@@ -5,7 +5,7 @@ FuchsiaHouse3TextPointers: ; 5617f (15:617f)
dw FuchsiaHouse3Text1
FuchsiaHouse3Text1: ; 56181 (15:6181)
- db $08 ; asm
+ TX_ASM
ld a, [wd728]
bit 4, a
jr nz, .after
@@ -48,11 +48,11 @@ FuchsiaHouse3Text_561bd: ; 561bd (15:61bd)
db "@"
FuchsiaHouse3Text_561c2: ; 561c2 (15:61c2)
- TX_FAR _FuchsiaHouse3Text_561c2 ; 0xa06e8
+ TX_FAR _FuchsiaHouse3Text_561c2
db $0B
db "@"
-UnnamedText_561c8: ; 561c8
+UnusedText_561c8: ; 561c8
para "つり こそ"
line "おとこの ロマン だ!"
diff --git a/scripts/gary.asm b/scripts/gary.asm
index c0785cab..c7766d5d 100755
--- a/scripts/gary.asm
+++ b/scripts/gary.asm
@@ -70,12 +70,12 @@ GaryScript2: ; 75f6a (1d:5f6a)
; select which team to use during the encounter
ld a, [W_RIVALSTARTER]
cp STARTER2
- jr nz, .NotSquirtle ; 0x75f9f $4
+ jr nz, .NotSquirtle
ld a, $1
jr .done
.NotSquirtle
cp STARTER3
- jr nz, .Charmander ; 0x75fa7 $4
+ jr nz, .Charmander
ld a, $2
jr .done
.Charmander
@@ -93,7 +93,7 @@ GaryScript3: ; 75fbb (1d:5fbb)
ld a, [W_ISINBATTLE]
cp $ff
jp z, GaryScript_75f29
- call UpdateSprites ; move sprites
+ call UpdateSprites
ld hl, wd867
set 1, [hl]
ld a, $f0
@@ -210,7 +210,7 @@ GaryScript9: ; 76099 (1d:6099)
ld [W_GARYCURSCRIPT], a
ret
-RLEMovement760b4 ; 760b4 (1d:60b4)
+RLEMovement760b4: ; 760b4 (1d:60b4)
db $40,4
db $20,1
db $ff
@@ -225,7 +225,7 @@ GaryScript10: ; 760b9 (1d:60b9)
ld [W_GARYCURSCRIPT], a
ret
-GaryScript_760c8 ; 760c8 (1d:60c8)
+GaryScript_760c8: ; 760c8 (1d:60c8)
ld a, $f0
ld [wJoyIgnore], a
call DisplayTextID
@@ -241,13 +241,13 @@ GaryTextPointers: ; 760d6 (1d:60d6)
dw GaryText5
GaryText1: ; 760e0 (1d:60e0)
- db $08 ; asm
+ TX_ASM
ld a, [wd867]
bit 1, a
ld hl, GaryText_760f4
- jr z, .asm_17e9f ; 0x760e9
+ jr z, .asm_17e9f
ld hl, GaryText_76103
-.asm_17e9f ; 0x760ee
+.asm_17e9f
call PrintText
jp TextScriptEnd
@@ -272,7 +272,7 @@ GaryText2: ; 76108 (1d:6108)
db "@"
GaryText3: ; 7610d (1d:610d)
- db $8
+ TX_ASM
ld a, [W_PLAYERSTARTER]
ld [wd11e], a
call GetMonName
diff --git a/scripts/halloffameroom.asm b/scripts/halloffameroom.asm
index c44622c7..1d522e60 100755
--- a/scripts/halloffameroom.asm
+++ b/scripts/halloffameroom.asm
@@ -55,7 +55,7 @@ HallofFameRoomScript2: ; 5a4bb (16:64bb)
ld c, 600 / 5
call DelayFrames
dec b
- jr nz, .asm_5a4ff ; 0x5a505 $f8
+ jr nz, .asm_5a4ff
call WaitForTextScrollButtonPress
jp Init
diff --git a/scripts/lab2.asm b/scripts/lab2.asm
index 9839a563..4c3ab344 100755
--- a/scripts/lab2.asm
+++ b/scripts/lab2.asm
@@ -11,15 +11,15 @@ Lab2Text1: ; 75c2a (1d:5c2a)
db "@"
Lab2Text2: ; 75c2f (1d:5c2f)
- db $8
+ TX_ASM
ld a, $7
ld [wWhichTrade], a
- jr asm_78552 ; 0x75c35 $6
+ jr Lab2DoTrade
Lab2Text3: ; 75c37 (1d:5c37)
- db $8
+ TX_ASM
ld a, $8
ld [wWhichTrade], a
-asm_78552: ; 75c3d (1d:5c3d)
+Lab2DoTrade: ; 75c3d (1d:5c3d)
predef DoInGameTradeDialogue
jp TextScriptEnd
diff --git a/scripts/lab3.asm b/scripts/lab3.asm
index 66839b17..e91d36f3 100755
--- a/scripts/lab3.asm
+++ b/scripts/lab3.asm
@@ -9,10 +9,10 @@ Lab3TextPointers: ; 75c8a (1d:5c8a)
dw Lab3Text5
Lab3Text1: ; 75c94 (1d:5c94)
- db $08 ; asm
+ TX_ASM
ld a, [wd7a1]
bit 7, a
- jr nz, .asm_e551a ; 0x75c9a
+ jr nz, .asm_e551a
ld hl, TM35PreReceiveText
call PrintText
ld bc, (TM_35 << 8) | 1
@@ -22,15 +22,15 @@ Lab3Text1: ; 75c94 (1d:5c94)
call PrintText
ld hl, wd7a1
set 7, [hl]
- jr .asm_eb896 ; 0x75cb5
+ jr .asm_eb896
.BagFull
ld hl, TM35NoRoomText
call PrintText
- jr .asm_eb896 ; 0x75cbd
-.asm_e551a ; 0x75cbf
+ jr .asm_eb896
+.asm_e551a
ld hl, TM35ExplanationText
call PrintText
-.asm_eb896 ; 0x75cc5
+.asm_eb896
jp TextScriptEnd
TM35PreReceiveText: ; 75cc8 (1d:5cc8)
diff --git a/scripts/lab4.asm b/scripts/lab4.asm
index 1e818676..6d4bd923 100755
--- a/scripts/lab4.asm
+++ b/scripts/lab4.asm
@@ -48,18 +48,18 @@ FossilsList: ; 75d68 (1d:5d68)
db $00
Lab4Text1: ; 75d6c (1d:5d6c)
- db $8
+ TX_ASM
ld a, [wd7a3]
bit 0, a
- jr nz, .asm_75d96 ; 0x75d72 $22
+ jr nz, .asm_75d96
ld hl, Lab4Text_75dc6
call PrintText
call Lab4Script_75d38
ld a, [wcd37]
and a
- jr z, .asm_75d8d ; 0x75d81 $a
+ jr z, .asm_75d8d
callba GiveFossilToCinnabarLab
- jr .asm_75d93 ; 0x75d8b $6
+ jr .asm_75d93
.asm_75d8d
ld hl, Lab4Text_75dcb
call PrintText
@@ -67,10 +67,10 @@ Lab4Text1: ; 75d6c (1d:5d6c)
jp TextScriptEnd
.asm_75d96
bit 1, a
- jr z, .asm_75da2 ; 0x75d98 $8
+ jr z, .asm_75da2
ld hl, Lab4Text_75dd0
call PrintText
- jr .asm_75d93 ; 0x75da0 $f1
+ jr .asm_75d93
.asm_75da2
call LoadFossilItemAndMonNameBank1D
ld hl, Lab4Text_75dd5
@@ -81,12 +81,12 @@ Lab4Text1: ; 75d6c (1d:5d6c)
ld b, a
ld c, 30
call GivePokemon
- jr nc, .asm_75d93 ; 0x75db9 $d8
+ jr nc, .asm_75d93
ld hl, wd7a3
res 0, [hl]
res 1, [hl]
res 2, [hl]
- jr .asm_75d93 ; 0x75dc4 $cd
+ jr .asm_75d93
Lab4Text_75dc6: ; 75dc6 (1d:5dc6)
TX_FAR _Lab4Text_75dc6
@@ -105,7 +105,7 @@ Lab4Text_75dd5: ; 75dd5 (1d:5dd5)
db "@"
Lab4Text2: ; 75dda (1d:5dda)
- db $08 ; asm
+ TX_ASM
ld a, $3
ld [wWhichTrade], a
predef DoInGameTradeDialogue
diff --git a/scripts/lance.asm b/scripts/lance.asm
index f2523098..8d1c790d 100755
--- a/scripts/lance.asm
+++ b/scripts/lance.asm
@@ -60,11 +60,11 @@ LanceScript0: ; 5a305 (16:6305)
jp nc, CheckFightingMapTrainers
xor a
ld [hJoyHeld], a
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
cp $3
jr nc, .asm_5a325
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp DisplayTextID
.asm_5a325
cp $5
@@ -89,11 +89,11 @@ CoordsData_5a33e: ; 5a33e (16:633e)
LanceScript2: ; 5a349 (16:6349)
call EndTrainerBattle
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, LanceScript_5a2f5
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp DisplayTextID
LanceScript_5a35b: ; 5a35b (16:635b)
@@ -136,15 +136,15 @@ LanceTrainerHeader0: ; 5a397 (16:6397)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd866 ; flag's byte
- dw LanceBeforeBattleText ; 0x63ae TextBeforeBattle
- dw LanceAfterBattleText ; 0x63b8 TextAfterBattle
- dw LanceEndBattleText ; 0x63b3 TextEndBattle
- dw LanceEndBattleText ; 0x63b3 TextEndBattle
+ dw LanceBeforeBattleText ; TextBeforeBattle
+ dw LanceAfterBattleText ; TextAfterBattle
+ dw LanceEndBattleText ; TextEndBattle
+ dw LanceEndBattleText ; TextEndBattle
db $ff
LanceText1: ; 5a3a4 (16:63a4)
- db $08 ; asm
+ TX_ASM
ld hl, LanceTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -159,7 +159,7 @@ LanceEndBattleText: ; 5a3b3 (16:63b3)
LanceAfterBattleText: ; 5a3b8 (16:63b8)
TX_FAR _LanceAfterBattleText
- db $8
+ TX_ASM
ld hl, wd866
set 6, [hl]
jp TextScriptEnd
diff --git a/scripts/lavenderhouse1.asm b/scripts/lavenderhouse1.asm
index 5fd1dd34..9c812c71 100755
--- a/scripts/lavenderhouse1.asm
+++ b/scripts/lavenderhouse1.asm
@@ -11,17 +11,17 @@ LavenderHouse1TextPointers: ; 1d8ac (7:58ac)
dw LavenderHouse1Text6
LavenderHouse1Text1: ; 1d8b8 (7:58b8)
- db $08 ; asm
+ TX_ASM
ld a, [wd7e0]
bit 7, a
- jr nz, .asm_72e5d ; 0x1d8be
+ jr nz, .asm_72e5d
ld hl, LavenderHouse1Text_1d8d1
call PrintText
- jr .asm_6957f ; 0x1d8c6
-.asm_72e5d ; 0x1d8c8
+ jr .asm_6957f
+.asm_72e5d
ld hl, LavenderHouse1Text_1d8d6
call PrintText
-.asm_6957f ; 0x1d8ce
+.asm_6957f
jp TextScriptEnd
LavenderHouse1Text_1d8d1: ; 1d8d1 (7:58d1)
@@ -33,17 +33,17 @@ LavenderHouse1Text_1d8d6: ; 1d8d6 (7:58d6)
db "@"
LavenderHouse1Text2: ; 1d8db (7:58db)
- db $08 ; asm
+ TX_ASM
ld a, [wd7e0]
bit 7, a
- jr nz, .asm_06470 ; 0x1d8e1
+ jr nz, .asm_06470
ld hl, LavenderHouse1Text_1d8f4
call PrintText
- jr .asm_3d208 ; 0x1d8e9
-.asm_06470 ; 0x1d8eb
+ jr .asm_3d208
+.asm_06470
ld hl, LavenderHouse1Text_1d8f9
call PrintText
-.asm_3d208 ; 0x1d8f1
+.asm_3d208
jp TextScriptEnd
LavenderHouse1Text_1d8f4: ; 1d8f4 (7:58f4)
@@ -56,23 +56,23 @@ LavenderHouse1Text_1d8f9: ; 1d8f9 (7:58f9)
LavenderHouse1Text3: ; 1d8fe (7:58fe)
TX_FAR _LavenderHouse1Text3
- db $8
+ TX_ASM
ld a, PSYDUCK
call PlayCry
jp TextScriptEnd
LavenderHouse1Text4: ; 1d90b (7:590b)
TX_FAR _LavenderHouse1Text4
- db $8
+ TX_ASM
ld a, NIDORINO
call PlayCry
jp TextScriptEnd
LavenderHouse1Text5: ; 1d918 (7:5918)
- db $08 ; asm
+ TX_ASM
ld a, [wd76c]
bit 0, a
- jr nz, .asm_15ac2 ; 0x1d91e
+ jr nz, .asm_15ac2
ld hl, LavenderHouse1Text_1d94c
call PrintText
ld bc, (POKE_FLUTE << 8) | 1
@@ -82,15 +82,15 @@ LavenderHouse1Text5: ; 1d918 (7:5918)
call PrintText
ld hl, wd76c
set 0, [hl]
- jr .asm_da749 ; 0x1d939
+ jr .asm_da749
.BagFull
ld hl, FluteNoRoomText
call PrintText
- jr .asm_da749 ; 0x1d941
-.asm_15ac2 ; 0x1d943
+ jr .asm_da749
+.asm_15ac2
ld hl, MrFujiAfterFluteText
call PrintText
-.asm_da749 ; 0x1d949
+.asm_da749
jp TextScriptEnd
LavenderHouse1Text_1d94c: ; 1d94c (7:594c)
diff --git a/scripts/lavenderhouse2.asm b/scripts/lavenderhouse2.asm
index c2120058..4dc5c7b7 100755
--- a/scripts/lavenderhouse2.asm
+++ b/scripts/lavenderhouse2.asm
@@ -8,23 +8,23 @@ LavenderHouse2TextPointers: ; 1d9b2 (7:59b2)
LavenderHouse2Text1: ; 1d9b6 (7:59b6)
TX_FAR _LavenderHouse2Text1
- db $8
+ TX_ASM
ld a, CUBONE
call PlayCry
jp TextScriptEnd
LavenderHouse2Text2: ; 1d9c3 (7:59c3)
- db $08 ; asm
+ TX_ASM
ld a, [wd7e0]
bit 7, a
- jr nz, .asm_65711 ; 0x1d9c9
+ jr nz, .asm_65711
ld hl, LavenderHouse2Text_1d9dc
call PrintText
- jr .asm_64be1 ; 0x1d9d1
-.asm_65711 ; 0x1d9d3
+ jr .asm_64be1
+.asm_65711
ld hl, LavenderHouse2Text_1d9e1
call PrintText
-.asm_64be1 ; 0x1d9d9
+.asm_64be1
jp TextScriptEnd
LavenderHouse2Text_1d9dc: ; 1d9dc (7:59dc)
diff --git a/scripts/lavendermart.asm b/scripts/lavendermart.asm
index 3852a235..53967cf2 100755
--- a/scripts/lavendermart.asm
+++ b/scripts/lavendermart.asm
@@ -11,17 +11,17 @@ LavenderMartText2: ; 5c935 (17:4935)
db "@"
LavenderMartText3: ; 5c93a (17:493a)
- db $08 ; asm
+ TX_ASM
ld a, [wd7e0]
bit 7, a
- jr nz, .asm_c88d4 ; 0x5c940
+ jr nz, .asm_c88d4
ld hl, LavenderMart_5c953
call PrintText
- jr .asm_6d225 ; 0x5c948
-.asm_c88d4 ; 0x5c94a
+ jr .asm_6d225
+.asm_c88d4
ld hl, LavenderMart_5c958
call PrintText
-.asm_6d225 ; 0x5c950
+.asm_6d225
jp TextScriptEnd
LavenderMart_5c953: ; 5c953 (17:4953)
diff --git a/scripts/lavendertown.asm b/scripts/lavendertown.asm
index a4f1f200..30c6d4e5 100755
--- a/scripts/lavendertown.asm
+++ b/scripts/lavendertown.asm
@@ -13,16 +13,16 @@ LavenderTownTextPointers: ; 4410e (11:410e)
dw LavenderTownText9
LavenderTownText1: ; 44120 (11:4120)
- db $08 ; asm
+ TX_ASM
ld hl, LavenderTownText_4413c
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
ld hl, LavenderTownText_44146
- jr nz, .asm_40831 ; 0x44131
+ jr nz, .asm_40831
ld hl, LavenderTownText_44141
-.asm_40831 ; 0x44136
+.asm_40831
call PrintText
jp TextScriptEnd
diff --git a/scripts/lorelei.asm b/scripts/lorelei.asm
index ab769d94..7e800467 100755
--- a/scripts/lorelei.asm
+++ b/scripts/lorelei.asm
@@ -41,7 +41,8 @@ LoreleiScriptPointers: ; 761bb (1d:61bb)
LoreleiScript4: ; 761c5 (1d:61c5)
ret
-asm_761c6: ; 761c6 (1d:61c6)
+
+LoreleiScript_761c6: ; 761c6 (1d:61c6)
ld hl, wSimulatedJoypadStatesEnd
ld a, D_UP
ld [hli], a
@@ -57,6 +58,7 @@ asm_761c6: ; 761c6 (1d:61c6)
ld [W_LORELEICURSCRIPT], a
ld [W_CURMAPSCRIPT], a
ret
+
LoreleiScript0: ; 761e2 (1d:61e2)
ld hl, CoordsData_76223
call ArePlayerCoordsInArray
@@ -66,16 +68,16 @@ LoreleiScript0: ; 761e2 (1d:61e2)
ld [hJoyHeld], a
ld [wSimulatedJoypadStatesEnd], a
ld [wSimulatedJoypadStatesIndex], a
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
cp $3
jr c, .asm_76206
ld hl, wd863
bit 6, [hl]
set 6, [hl]
- jr z, asm_761c6
+ jr z, LoreleiScript_761c6
.asm_76206
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
@@ -106,31 +108,31 @@ LoreleiScript3: ; 7622c (1d:622c)
ret
LoreleiScript2: ; 7623f (1d:623f)
call EndTrainerBattle
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, LoreleiScript_761b6
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp DisplayTextID
LoreleiTextPointers: ; 76251 (1d:6251)
dw LoreleiText1
- dw LoreleiText2
+ dw LoreleiDontRunAwayText
LoreleiTrainerHeaders: ; 76255 (1d:6255)
LoreleiTrainerHeader0: ; 76255 (1d:6255)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd863 ; flag's byte
- dw LoreleiBeforeBattleText ; 0x626c TextBeforeBattle
- dw LoreleiAfterBattleText ; 0x6276 TextAfterBattle
- dw LoreleiEndBattleText ; 0x6271 TextEndBattle
- dw LoreleiEndBattleText ; 0x6271 TextEndBattle
+ dw LoreleiBeforeBattleText ; TextBeforeBattle
+ dw LoreleiAfterBattleText ; TextAfterBattle
+ dw LoreleiEndBattleText ; TextEndBattle
+ dw LoreleiEndBattleText ; TextEndBattle
db $ff
LoreleiText1: ; 76262 (1d:6262)
- db $08 ; asm
+ TX_ASM
ld hl, LoreleiTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -147,6 +149,6 @@ LoreleiAfterBattleText: ; 76276 (1d:6276)
TX_FAR _LoreleiAfterBattleText
db "@"
-LoreleiText2: ; 7627b (1d:627b)
- TX_FAR _LoreleiText2
+LoreleiDontRunAwayText: ; 7627b (1d:627b)
+ TX_FAR _LoreleiDontRunAwayText
db "@"
diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm
index 3e067a98..d658b425 100755
--- a/scripts/mansion1.asm
+++ b/scripts/mansion1.asm
@@ -15,7 +15,7 @@ Mansion1Subscript1: ; 442c5 (11:42c5)
ret z
ld a, [wd796]
bit 0, a
- jr nz, .asm_442ec ; 0x442d2 $18
+ jr nz, .asm_442ec
ld bc, $060c
call Mansion1Script_4430b
ld bc, $0308
@@ -37,18 +37,18 @@ Mansion1Subscript1: ; 442c5 (11:42c5)
Mansion1Script_44304: ; 44304 (11:4304)
ld a, $2d
ld [wd09f], a
- jr asm_44310
+ jr Mansion1ReplaceBlock
Mansion1Script_4430b: ; 4430b (11:430b)
ld a, $e
ld [wd09f], a
-asm_44310: ; 44310 (11:4310)
+Mansion1ReplaceBlock: ; 44310 (11:4310)
predef ReplaceTileBlock
ret
Mansion1Script_Switches: ; 44316 (11:4316)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
xor a
ld [hJoyHeld], a
@@ -72,15 +72,15 @@ Mansion1TrainerHeader0: ; 44334 (11:4334)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd798 ; flag's byte
- dw Mansion1BattleText2 ; 0x434b TextBeforeBattle
- dw Mansion1AfterBattleText2 ; 0x4355 TextAfterBattle
- dw Mansion1EndBattleText2 ; 0x4350 TextEndBattle
- dw Mansion1EndBattleText2 ; 0x4350 TextEndBattle
+ dw Mansion1BattleText2 ; TextBeforeBattle
+ dw Mansion1AfterBattleText2 ; TextAfterBattle
+ dw Mansion1EndBattleText2 ; TextEndBattle
+ dw Mansion1EndBattleText2 ; TextEndBattle
db $ff
Mansion1Text1: ; 44341 (11:4341)
- db $08 ; asm
+ TX_ASM
ld hl, Mansion1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -98,13 +98,13 @@ Mansion1AfterBattleText2: ; 44355 (11:4355)
db "@"
Mansion1Text4: ; 4435a (11:435a)
- db $8
+ TX_ASM
ld hl, MansionSwitchText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_4438c ; 0x44368 $22
+ jr nz, .asm_4438c
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, wd126
@@ -116,9 +116,9 @@ Mansion1Text4: ; 4435a (11:435a)
ld hl, wd796
bit 0, [hl]
set 0, [hl]
- jr z, .asm_44392 ; 0x44386 $a
+ jr z, .asm_44392
res 0, [hl]
- jr .asm_44392 ; 0x4438a $6
+ jr .asm_44392
.asm_4438c
ld hl, MansionSwitchNotPressedText
call PrintText
diff --git a/scripts/mansion2.asm b/scripts/mansion2.asm
index c643d229..40827be1 100755
--- a/scripts/mansion2.asm
+++ b/scripts/mansion2.asm
@@ -44,7 +44,7 @@ Mansion2Script_5202f: ; 5202f (14:602f)
Mansion2Script_Switches: ; 52037 (14:6037)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
xor a
ld [hJoyHeld], a
@@ -69,15 +69,15 @@ Mansion2TrainerHeader0: ; 52057 (14:6057)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd847 ; flag's byte
- dw Mansion2BattleText1 ; 0x606e TextBeforeBattle
- dw Mansion2AfterBattleText1 ; 0x6078 TextAfterBattle
- dw Mansion2EndBattleText1 ; 0x6073 TextEndBattle
- dw Mansion2EndBattleText1 ; 0x6073 TextEndBattle
+ dw Mansion2BattleText1 ; TextBeforeBattle
+ dw Mansion2AfterBattleText1 ; TextAfterBattle
+ dw Mansion2EndBattleText1 ; TextEndBattle
+ dw Mansion2EndBattleText1 ; TextEndBattle
db $ff
Mansion2Text1: ; 52064 (14:6064)
- db $08 ; asm
+ TX_ASM
ld hl, Mansion2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -104,13 +104,13 @@ Mansion2Text4: ; 52082 (14:6082)
Mansion3Text6: ; 52087 (14:6087)
Mansion2Text5: ; 52087 (14:6087)
- db $8
+ TX_ASM
ld hl, Mansion2Text_520c2
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_520b9 ; 0x52095 $22
+ jr nz, .asm_520b9
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, wd126
@@ -122,9 +122,9 @@ Mansion2Text5: ; 52087 (14:6087)
ld hl, wd796
bit 0, [hl]
set 0, [hl]
- jr z, .asm_520bf ; 0x520b3 $a
+ jr z, .asm_520bf
res 0, [hl]
- jr .asm_520bf ; 0x520b7 $6
+ jr .asm_520bf
.asm_520b9
ld hl, Mansion2Text_520cc
call PrintText
diff --git a/scripts/mansion3.asm b/scripts/mansion3.asm
index 6ad02dd9..dfecde99 100755
--- a/scripts/mansion3.asm
+++ b/scripts/mansion3.asm
@@ -65,7 +65,7 @@ Mansion3Script_5225b: ; 5225b (14:625b)
ret nz
call ArePlayerCoordsInArray
ret nc
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld [wWhichDungeonWarp], a
ld hl, wd72d
set 4, [hl]
@@ -75,12 +75,12 @@ Mansion3Script_5225b: ; 5225b (14:625b)
Mansion3Script_Switches: ; 5227a (14:627a)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
xor a
ld [hJoyHeld], a
ld a, $6
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp DisplayTextID
Mansion3TextPointers: ; 5228a (14:628a)
@@ -96,30 +96,30 @@ Mansion3TrainerHeader0: ; 52296 (14:6296)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd849 ; flag's byte
- dw Mansion3BattleText1 ; 0x62c3 TextBeforeBattle
- dw Mansion3AfterBattleText1 ; 0x62cd TextAfterBattle
- dw Mansion3EndBattleText1 ; 0x62c8 TextEndBattle
- dw Mansion3EndBattleText1 ; 0x62c8 TextEndBattle
+ dw Mansion3BattleText1 ; TextBeforeBattle
+ dw Mansion3AfterBattleText1 ; TextAfterBattle
+ dw Mansion3EndBattleText1 ; TextEndBattle
+ dw Mansion3EndBattleText1 ; TextEndBattle
Mansion3TrainerHeader2: ; 522a2 (14:62a2)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd849 ; flag's byte
- dw Mansion3BattleText2 ; 0x62d2 TextBeforeBattle
- dw Mansion3AfterBattleText2 ; 0x62dc TextAfterBattle
- dw Mansion3EndBattleText2 ; 0x62d7 TextEndBattle
- dw Mansion3EndBattleText2 ; 0x62d7 TextEndBattle
+ dw Mansion3BattleText2 ; TextBeforeBattle
+ dw Mansion3AfterBattleText2 ; TextAfterBattle
+ dw Mansion3EndBattleText2 ; TextEndBattle
+ dw Mansion3EndBattleText2 ; TextEndBattle
db $ff
Mansion3Text1: ; 522af (14:62af)
- db $08 ; asm
+ TX_ASM
ld hl, Mansion3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Mansion3Text2: ; 522b9 (14:62b9)
- db $08 ; asm
+ TX_ASM
ld hl, Mansion3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/mansion4.asm b/scripts/mansion4.asm
index b89af5f2..c23cb2d7 100755
--- a/scripts/mansion4.asm
+++ b/scripts/mansion4.asm
@@ -46,12 +46,12 @@ Mansion4Script_523cf: ; 523cf (14:63cf)
Mansion4Script_Switches: ; 52420 (14:6420)
ld a, [wSpriteStateData1 + 9]
- cp $4
+ cp SPRITE_FACING_UP
ret nz
xor a
ld [hJoyHeld], a
ld a, $9
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp DisplayTextID
Mansion4ScriptPointers: ; 52430 (14:6430)
@@ -75,30 +75,30 @@ Mansion4TrainerHeader0: ; 52448 (14:6448)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd84b ; flag's byte
- dw Mansion4BattleText1 ; 0x6475 TextBeforeBattle
- dw Mansion4AfterBattleText1 ; 0x647f TextAfterBattle
- dw Mansion4EndBattleText1 ; 0x647a TextEndBattle
- dw Mansion4EndBattleText1 ; 0x647a TextEndBattle
+ dw Mansion4BattleText1 ; TextBeforeBattle
+ dw Mansion4AfterBattleText1 ; TextAfterBattle
+ dw Mansion4EndBattleText1 ; TextEndBattle
+ dw Mansion4EndBattleText1 ; TextEndBattle
Mansion4TrainerHeader2: ; 52454 (14:6454)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd84b ; flag's byte
- dw Mansion4BattleText2 ; 0x6484 TextBeforeBattle
- dw Mansion4AfterBattleText2 ; 0x648e TextAfterBattle
- dw Mansion4EndBattleText2 ; 0x6489 TextEndBattle
- dw Mansion4EndBattleText2 ; 0x6489 TextEndBattle
+ dw Mansion4BattleText2 ; TextBeforeBattle
+ dw Mansion4AfterBattleText2 ; TextAfterBattle
+ dw Mansion4EndBattleText2 ; TextEndBattle
+ dw Mansion4EndBattleText2 ; TextEndBattle
db $ff
Mansion4Text1: ; 52461 (14:6461)
- db $08 ; asm
+ TX_ASM
ld hl, Mansion4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Mansion4Text2: ; 5246b (14:646b)
- db $08 ; asm
+ TX_ASM
ld hl, Mansion4TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/mtmoon1.asm b/scripts/mtmoon1.asm
index def597ba..6c9fcd88 100755
--- a/scripts/mtmoon1.asm
+++ b/scripts/mtmoon1.asm
@@ -33,105 +33,105 @@ MtMoon1TrainerHeader0: ; 499fd (12:59fd)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7f5 ; flag's byte
- dw MtMoon1BattleText2 ; 0x5a98 TextBeforeBattle
- dw MtMoon1AfterBattleText2 ; 0x5aa2 TextAfterBattle
- dw MtMoon1EndBattleText2 ; 0x5a9d TextEndBattle
- dw MtMoon1EndBattleText2 ; 0x5a9d TextEndBattle
+ dw MtMoon1BattleText2 ; TextBeforeBattle
+ dw MtMoon1AfterBattleText2 ; TextAfterBattle
+ dw MtMoon1EndBattleText2 ; TextEndBattle
+ dw MtMoon1EndBattleText2 ; TextEndBattle
MtMoon1TrainerHeader2: ; 49a09 (12:5a09)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte
- dw MtMoon1BattleText3 ; 0x5aa7 TextBeforeBattle
- dw MtMoon1AfterBattleText3 ; 0x5ab1 TextAfterBattle
- dw MtMoon1EndBattleText3 ; 0x5aac TextEndBattle
- dw MtMoon1EndBattleText3 ; 0x5aac TextEndBattle
+ dw MtMoon1BattleText3 ; TextBeforeBattle
+ dw MtMoon1AfterBattleText3 ; TextAfterBattle
+ dw MtMoon1EndBattleText3 ; TextEndBattle
+ dw MtMoon1EndBattleText3 ; TextEndBattle
MtMoon1TrainerHeader3: ; 49a15 (12:5a15)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte
- dw MtMoon1BattleText4 ; 0x5ab6 TextBeforeBattle
- dw MtMoon1AfterBattleText4 ; 0x5ac0 TextAfterBattle
- dw MtMoon1EndBattleText4 ; 0x5abb TextEndBattle
- dw MtMoon1EndBattleText4 ; 0x5abb TextEndBattle
+ dw MtMoon1BattleText4 ; TextBeforeBattle
+ dw MtMoon1AfterBattleText4 ; TextAfterBattle
+ dw MtMoon1EndBattleText4 ; TextEndBattle
+ dw MtMoon1EndBattleText4 ; TextEndBattle
MtMoon1TrainerHeader4: ; 49a21 (12:5a21)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte
- dw MtMoon1BattleText5 ; 0x5ac5 TextBeforeBattle
- dw MtMoon1AfterBattleText5 ; 0x5acf TextAfterBattle
- dw MtMoon1EndBattleText5 ; 0x5aca TextEndBattle
- dw MtMoon1EndBattleText5 ; 0x5aca TextEndBattle
+ dw MtMoon1BattleText5 ; TextBeforeBattle
+ dw MtMoon1AfterBattleText5 ; TextAfterBattle
+ dw MtMoon1EndBattleText5 ; TextEndBattle
+ dw MtMoon1EndBattleText5 ; TextEndBattle
MtMoon1TrainerHeader5: ; 49a2d (12:5a2d)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte
- dw MtMoon1BattleText6 ; 0x5ad4 TextBeforeBattle
- dw MtMoon1AfterBattleText6 ; 0x5ade TextAfterBattle
- dw MtMoon1EndBattleText6 ; 0x5ad9 TextEndBattle
- dw MtMoon1EndBattleText6 ; 0x5ad9 TextEndBattle
+ dw MtMoon1BattleText6 ; TextBeforeBattle
+ dw MtMoon1AfterBattleText6 ; TextAfterBattle
+ dw MtMoon1EndBattleText6 ; TextEndBattle
+ dw MtMoon1EndBattleText6 ; TextEndBattle
MtMoon1TrainerHeader6: ; 49a39 (12:5a39)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte
- dw MtMoon1BattleText7 ; 0x5ae3 TextBeforeBattle
- dw MtMoon1AfterBattleText7 ; 0x5aed TextAfterBattle
- dw MtMoon1EndBattleText7 ; 0x5ae8 TextEndBattle
- dw MtMoon1EndBattleText7 ; 0x5ae8 TextEndBattle
+ dw MtMoon1BattleText7 ; TextBeforeBattle
+ dw MtMoon1AfterBattleText7 ; TextAfterBattle
+ dw MtMoon1EndBattleText7 ; TextEndBattle
+ dw MtMoon1EndBattleText7 ; TextEndBattle
MtMoon1TrainerHeader7: ; 49a45 (12:5a45)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7f5 ; flag's byte
- dw MtMoon1BattleText8 ; 0x5af2 TextBeforeBattle
- dw MtMoon1AfterBattleText8 ; 0x5afc TextAfterBattle
- dw MtMoon1EndBattleText8 ; 0x5af7 TextEndBattle
- dw MtMoon1EndBattleText8 ; 0x5af7 TextEndBattle
+ dw MtMoon1BattleText8 ; TextBeforeBattle
+ dw MtMoon1AfterBattleText8 ; TextAfterBattle
+ dw MtMoon1EndBattleText8 ; TextEndBattle
+ dw MtMoon1EndBattleText8 ; TextEndBattle
db $ff
MtMoon1Text1: ; 49a52 (12:5a52)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
MtMoon1Text2: ; 49a5c (12:5a5c)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon1TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
MtMoon1Text3: ; 49a66 (12:5a66)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon1TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
MtMoon1Text4: ; 49a70 (12:5a70)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon1TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
MtMoon1Text5: ; 49a7a (12:5a7a)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon1TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
MtMoon1Text6: ; 49a84 (12:5a84)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon1TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
MtMoon1Text7: ; 49a8e (12:5a8e)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon1TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/mtmoon3.asm b/scripts/mtmoon3.asm
index eb0fc301..8f2be402 100755
--- a/scripts/mtmoon3.asm
+++ b/scripts/mtmoon3.asm
@@ -1,6 +1,6 @@
MtMoon3Script: ; 49d0b (12:5d0b)
call EnableAutoTextBoxDrawing
- ld hl, MtMoon3TrainerHeader0 ; $5e48
+ ld hl, MtMoon3TrainerHeader0
ld de, MtMoon3ScriptPointers
ld a, [W_MTMOON3CURSCRIPT]
call ExecuteCurMapScriptInTable
@@ -10,7 +10,7 @@ MtMoon3Script: ; 49d0b (12:5d0b)
ret z
ld hl, CoordsData_49d37
call ArePlayerCoordsInArray
- jr nc, .asm_49d31 ; 0x49d29 $6
+ jr nc, .asm_49d31
ld hl, wd72e
set 4, [hl]
ret
@@ -57,16 +57,16 @@ MtMoon3Script0: ; 49d6f (12:5d6f)
ld a, [wd7f6]
bit 1, a
jp nz, MtMoon3Script_49d91
- ld a, [W_YCOORD] ; wd361
+ ld a, [W_YCOORD]
cp $8
jp nz, MtMoon3Script_49d91
- ld a, [W_XCOORD] ; wd362
+ ld a, [W_XCOORD]
cp $d
jp nz, MtMoon3Script_49d91
xor a
ld [hJoyHeld], a
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp DisplayTextID
MtMoon3Script_49d91: ; 49d91 (12:5d91)
@@ -76,7 +76,7 @@ MtMoon3Script_49d91: ; 49d91 (12:5d91)
ret
MtMoon3Script3: ; 49d9a (12:5d9a)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, MtMoon3Script_49d58
call UpdateSprites
@@ -92,7 +92,7 @@ MtMoon3Script3: ; 49d9a (12:5d9a)
MtMoon3Script4: ; 49dba (12:5dba)
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call SetSpriteMovementBytesToFF
ld hl, CoordsData_49dea
call ArePlayerCoordsInArray
@@ -106,7 +106,7 @@ MtMoon3Script4: ; 49dba (12:5dba)
ld de, MovementData_49df8
.asm_49dda
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call MoveSprite
ld a, $5
ld [W_MTMOON3CURSCRIPT], a
@@ -140,7 +140,7 @@ MtMoon3Script5: ; 49dfb (12:5dfb)
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld a, $a
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, [wd7f6]
bit 6, a
@@ -176,51 +176,51 @@ MtMoon3TrainerHeader0: ; 49e48 (12:5e48)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7f6 ; flag's byte
- dw MtMoon3BattleText2 ; 0x5f9f TextBeforeBattle
- dw MtMoon3AfterBattleText2 ; 0x5fa9 TextAfterBattle
- dw MtMoon3EndBattleText2 ; 0x5fa4 TextEndBattle
- dw MtMoon3EndBattleText2 ; 0x5fa4 TextEndBattle
+ dw MtMoon3BattleText2 ; TextBeforeBattle
+ dw MtMoon3AfterBattleText2 ; TextAfterBattle
+ dw MtMoon3EndBattleText2 ; TextEndBattle
+ dw MtMoon3EndBattleText2 ; TextEndBattle
MtMoon3TrainerHeader2: ; 49e54 (12:5e54)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7f6 ; flag's byte
- dw MtMoon3BattleText3 ; 0x5fae TextBeforeBattle
- dw MtMoon3AfterBattleText3 ; 0x5fb8 TextAfterBattle
- dw MtMoon3EndBattleText3 ; 0x5fb3 TextEndBattle
- dw MtMoon3EndBattleText3 ; 0x5fb3 TextEndBattle
+ dw MtMoon3BattleText3 ; TextBeforeBattle
+ dw MtMoon3AfterBattleText3 ; TextAfterBattle
+ dw MtMoon3EndBattleText3 ; TextEndBattle
+ dw MtMoon3EndBattleText3 ; TextEndBattle
MtMoon3TrainerHeader3: ; 49e60 (12:5e60)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7f6 ; flag's byte
- dw MtMoon3BattleText4 ; 0x5fbd TextBeforeBattle
- dw MtMoon3AfterBattleText4 ; 0x5fc7 TextAfterBattle
- dw MtMoon3EndBattleText4 ; 0x5fc2 TextEndBattle
- dw MtMoon3EndBattleText4 ; 0x5fc2 TextEndBattle
+ dw MtMoon3BattleText4 ; TextBeforeBattle
+ dw MtMoon3AfterBattleText4 ; TextAfterBattle
+ dw MtMoon3EndBattleText4 ; TextEndBattle
+ dw MtMoon3EndBattleText4 ; TextEndBattle
MtMoon3TrainerHeader4: ; 49e6c (12:5e6c)
db $5 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7f6 ; flag's byte
- dw MtMoon3BattleText5 ; 0x5fcc TextBeforeBattle
- dw MtMoon3AfterBattleText5 ; 0x5fd6 TextAfterBattle
- dw MtMoon3EndBattleText5 ; 0x5fd1 TextEndBattle
- dw MtMoon3EndBattleText5 ; 0x5fd1 TextEndBattle
+ dw MtMoon3BattleText5 ; TextBeforeBattle
+ dw MtMoon3AfterBattleText5 ; TextAfterBattle
+ dw MtMoon3EndBattleText5 ; TextEndBattle
+ dw MtMoon3EndBattleText5 ; TextEndBattle
db $ff
MtMoon3Text1: ; 49e79 (12:5e79)
- db $08 ; asm
+ TX_ASM
ld a, [wd7f6]
bit 1, a
- jr z, .asm_be1e0 ; 0x49e7f
+ jr z, .asm_49e8d
and $c0
- jr nz, .asm_f8cd4 ; 0x49e83
+ jr nz, .asm_49eb8
ld hl, MtMoon3Text_49f8f
call PrintText
- jr .asm_f1fba ; 0x49e8b
-.asm_be1e0 ; 0x49e8d
+ jr .asm_49ebe
+.asm_49e8d
ld hl, MtMoon3Text_49f85
call PrintText
ld hl, wd72d
@@ -229,46 +229,46 @@ MtMoon3Text1: ; 49e79 (12:5e79)
ld hl, MtMoon3Text_49f8a
ld de, MtMoon3Text_49f8a
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $3
ld [W_MTMOON3CURSCRIPT], a
ld [W_CURMAPSCRIPT], a
- jr .asm_f1fba ; 0x49eb6
-.asm_f8cd4 ; 0x49eb8
+ jr .asm_49ebe
+.asm_49eb8
ld hl, MtMoon3Text_49f94
call PrintText
-.asm_f1fba ; 0x49ebe
+.asm_49ebe
jp TextScriptEnd
MtMoon3Text2: ; 49ec1 (12:5ec1)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
MtMoon3Text3: ; 49ecb (12:5ecb)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
MtMoon3Text4: ; 49ed5 (12:5ed5)
- db $08 ; asm
+ TX_ASM
ld hl, MtMoon3TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
MtMoon3Text5: ; 49edf (12:5edf)
- db $08 ; asm
- ld hl, MtMoon3TrainerHeader4 ; $5e6c
+ TX_ASM
+ ld hl, MtMoon3TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
MtMoon3Text6: ; 49ee9 (12:5ee9)
- db $08 ; asm
+ TX_ASM
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, MtMoon3Text_49f24
@@ -276,7 +276,7 @@ MtMoon3Text6: ; 49ee9 (12:5ee9)
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_1fa5e ; 0x49efc
+ jr nz, .asm_49f21
ld bc,(DOME_FOSSIL << 8) | 1
call GiveItem
jp nc, MtMoon3Script_49f76
@@ -289,7 +289,7 @@ MtMoon3Text6: ; 49ee9 (12:5ee9)
ld a, $4
ld [W_MTMOON3CURSCRIPT], a
ld [W_CURMAPSCRIPT], a
-.asm_1fa5e ; 0x49f21
+.asm_49f21
jp TextScriptEnd
MtMoon3Text_49f24: ; 49f24 (12:5f24)
@@ -297,7 +297,7 @@ MtMoon3Text_49f24: ; 49f24 (12:5f24)
db "@"
MtMoon3Text7: ; 49f29 (12:5f29)
- db $08 ; asm
+ TX_ASM
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, MtMoon3Text_49f64
@@ -305,7 +305,7 @@ MtMoon3Text7: ; 49f29 (12:5f29)
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_8e988 ; 0x49f3c
+ jr nz, .asm_49f61
ld bc, (HELIX_FOSSIL << 8) | 1
call GiveItem
jp nc, MtMoon3Script_49f76
@@ -318,7 +318,7 @@ MtMoon3Text7: ; 49f29 (12:5f29)
ld a, $4
ld [W_MTMOON3CURSCRIPT], a
ld [W_CURMAPSCRIPT], a
-.asm_8e988 ; 0x49f61
+.asm_49f61
jp TextScriptEnd
MtMoon3Text_49f64: ; 49f64 (12:5f64)
@@ -330,7 +330,7 @@ MtMoon3Script_49f69: ; 49f69 (12:5f69)
jp PrintText
MtMoon3Text_49f6f: ; 49f6f (12:5f6f)
- TX_FAR _MtMoon3Text_49f6f ; 0x80995
+ TX_FAR _MtMoon3Text_49f6f
db $11, $d, "@"
MtMoon3Script_49f76: ; 49f76 (12:5f76)
@@ -339,7 +339,7 @@ MtMoon3Script_49f76: ; 49f76 (12:5f76)
jp TextScriptEnd
MtMoon3Text_49f7f: ; 49f7f (12:5f7f)
- TX_FAR _MtMoon3Text_49f7f ; 0x809a8
+ TX_FAR _MtMoon3Text_49f7f
db $d, "@"
MtMoon3Text_49f85: ; 49f85 (12:5f85)
diff --git a/scripts/mtmoonpokecenter.asm b/scripts/mtmoonpokecenter.asm
index bfe9add8..b06c4df0 100755
--- a/scripts/mtmoonpokecenter.asm
+++ b/scripts/mtmoonpokecenter.asm
@@ -22,7 +22,7 @@ MtMoonPokecenterText3: ; 492e7 (12:52e7)
db "@"
MtMoonPokecenterText4: ; 492ec (12:52ec)
- db $08 ; asm
+ TX_ASM
ld a, [wd7c6]
add a
jp c, .asm_49353
@@ -35,18 +35,18 @@ MtMoonPokecenterText4: ; 492ec (12:52ec)
ld a, [wCurrentMenuItem]
and a
jp nz, .asm_4934e
- ldh [$9f], a
- ldh [$a1], a
+ ld [$ff9f], a
+ ld [$ffa1], a
ld a, $5
- ldh [$a0], a
+ ld [$ffa0], a
call HasEnoughMoney
- jr nc, .asm_faa09 ; 0x49317
+ jr nc, .asm_faa09
ld hl, MtMoonPokecenterText_49366
- jr .asm_49356 ; 0x4931c
-.asm_faa09 ; 0x4931e
+ jr .asm_49356
+.asm_faa09
ld bc,(MAGIKARP << 8) | 5
call GivePokemon
- jr nc, .asm_49359 ; 0x49324
+ jr nc, .asm_49359
xor a
ld [wWhichTrade], a
ld [wTrainerFacingDirection], a
@@ -61,15 +61,15 @@ MtMoonPokecenterText4: ; 492ec (12:52ec)
call DisplayTextBoxID
ld hl, wd7c6
set 7, [hl]
- jr .asm_49359 ; 0x4934c
-.asm_4934e ; 0x4934e
+ jr .asm_49359
+.asm_4934e
ld hl, MtMoonPokecenterText_49361
- jr .asm_49356 ; 0x49351
-.asm_49353 ; 0x49353
+ jr .asm_49356
+.asm_49353
ld hl, MtMoonPokecenterText_4936b
-.asm_49356 ; 0x49356
+.asm_49356
call PrintText
-.asm_49359 ; 0x49359
+.asm_49359
jp TextScriptEnd
MtMoonPokecenterText_4935c: ; 4935c (12:535c)
diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm
index cd2b3c29..2e5835d0 100755
--- a/scripts/museum1f.asm
+++ b/scripts/museum1f.asm
@@ -17,7 +17,7 @@ Museum1FScript0: ; 5c10d (17:410d)
ret nz
ld a, [W_XCOORD]
cp $9
- jr z, .asm_5c120 ; 0x5c118 $6
+ jr z, .asm_5c120
ld a, [W_XCOORD]
cp $a
ret nz
@@ -39,7 +39,7 @@ Museum1FTextPointers: ; 5c12b (17:412b)
dw Museum1FText5
Museum1FText1: ; 5c135 (17:4135)
- db $8
+ TX_ASM
ld a, [W_YCOORD]
cp $4
jr nz, .asm_8774b
@@ -59,7 +59,7 @@ Museum1FText1: ; 5c135 (17:4135)
jr nz, .asm_31a16
ld hl, Museum1FText_5c23d
call PrintText
- jp asm_d1145
+ jp Museum1FScriptEnd
.asm_b8709
ld a, [wd754]
bit 0, a
@@ -67,7 +67,7 @@ Museum1FText1: ; 5c135 (17:4135)
.asm_31a16
ld hl, Museum1FText_5c242
call PrintText
- jp asm_d1145
+ jp Museum1FScriptEnd
.asm_3ded4
ld a, $13
ld [wTextBoxID], a
@@ -112,7 +112,7 @@ Museum1FText1: ; 5c135 (17:4135)
call WaitForSoundToFinish
jr .asm_0b094
.asm_de133
- ld hl, Museum1FText_5c21a ; $421a
+ ld hl, Museum1FText_5c21a
call PrintText
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -120,11 +120,11 @@ Museum1FText1: ; 5c135 (17:4135)
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
call UpdateSprites
- jr asm_d1145
+ jr Museum1FScriptEnd
.asm_0b094
ld a, $1
ld [W_MUSEUM1FCURSCRIPT], a
- jr asm_d1145
+ jr Museum1FScriptEnd
Museum1FScript_5c1f9: ; 5c1f9 (17:41f9)
ld hl, Museum1FText_5c22e
@@ -135,11 +135,11 @@ Museum1FScript_5c1f9: ; 5c1f9 (17:41f9)
jr nz, .asm_d1144
ld hl, Museum1FText_5c233
call PrintText
- jr asm_d1145
+ jr Museum1FScriptEnd
.asm_d1144
ld hl, Museum1FText_5c238
call PrintText
-asm_d1145: ; 5c217 (17:4217)
+Museum1FScriptEnd: ; 5c217 (17:4217)
jp TextScriptEnd
Museum1FText_5c21a: ; 5c21a (17:421a)
@@ -179,7 +179,7 @@ Museum1FText_5c242: ; 5c242 (17:4242)
db "@"
Museum1FText2: ; 5c247 (17:4247)
- db $08 ; asm
+ TX_ASM
ld hl, Museum1FText_5c251
call PrintText
jp TextScriptEnd
@@ -189,10 +189,10 @@ Museum1FText_5c251: ; 5c251 (17:4251)
db "@"
Museum1FText3: ; 5c256 (17:4256)
- db $08 ; asm
+ TX_ASM
ld a, [wd754]
bit 1, a
- jr nz, .asm_16599 ; 0x5c25c
+ jr nz, .asm_5c285
ld hl, Museum1FText_5c28e
call PrintText
ld bc, (OLD_AMBER << 8) | 1
@@ -204,13 +204,13 @@ Museum1FText3: ; 5c256 (17:4256)
ld [wcc4d], a
predef HideObject
ld hl, ReceivedOldAmberText
- jr .asm_52e0f ; 0x5c27e
+ jr .asm_5c288
.BagFull
ld hl, Museum1FText_5c29e
- jr .asm_52e0f ; 0x5c283
-.asm_16599 ; 0x5c285
+ jr .asm_5c288
+.asm_5c285
ld hl, Museum1FText_5c299
-.asm_52e0f ; 0x5c288
+.asm_5c288
call PrintText
jp TextScriptEnd
@@ -231,7 +231,7 @@ Museum1FText_5c29e: ; 5c29e (17:429e)
db "@"
Museum1FText4: ; 5c2a3 (17:42a3)
- db $08 ; asm
+ TX_ASM
ld hl, Museum1FText_5c2ad
call PrintText
jp TextScriptEnd
@@ -241,7 +241,7 @@ Museum1FText_5c2ad: ; 5c2ad (17:42ad)
db "@"
Museum1FText5: ; 5c2b2 (17:42b2)
- db $08 ; asm
+ TX_ASM
ld hl, Museum1FText_5c2bc
call PrintText
jp TextScriptEnd
diff --git a/scripts/namerater.asm b/scripts/namerater.asm
index c9e3bfb4..010dc0cd 100755
--- a/scripts/namerater.asm
+++ b/scripts/namerater.asm
@@ -16,7 +16,7 @@ NameRaterScript_1da20: ; 1da20 (7:5a20)
ld de, wPlayerName
ld c, $b
call .asm_1da47
- jr c, .asm_1da52 ; 0x1da34 $1c
+ jr c, .asm_1da52
ld hl, wPartyMon1OTID
ld bc, $002c
ld a, [wWhichPokemon]
@@ -26,11 +26,11 @@ NameRaterScript_1da20: ; 1da20 (7:5a20)
.asm_1da47
ld a, [de]
cp [hl]
- jr nz, .asm_1da52 ; 0x1da49 $7
+ jr nz, .asm_1da52
inc hl
inc de
dec c
- jr nz, .asm_1da47 ; 0x1da4e $f7
+ jr nz, .asm_1da47
and a
ret
.asm_1da52
@@ -41,11 +41,11 @@ NameRaterTextPointers: ; 1da54 (7:5a54)
dw NameRaterText1
NameRaterText1: ; 1da56 (7:5a56)
- db $8
+ TX_ASM
call SaveScreenTilesToBuffer2
ld hl, NameRaterText_1dab3
call NameRaterScript_1da15
- jr nz, .asm_1daae ; 0x1da60 $4c
+ jr nz, .asm_1daae
ld hl, NameRaterText_1dab8
call PrintText
xor a
@@ -58,25 +58,25 @@ NameRaterText1: ; 1da56 (7:5a56)
call RestoreScreenTilesAndReloadTilePatterns
call LoadGBPal
pop af
- jr c, .asm_1daae ; 0x1da80 $2c
+ jr c, .asm_1daae
call GetPartyMonName2
call NameRaterScript_1da20
ld hl, NameRaterText_1dad1
- jr c, .asm_1daa8 ; 0x1da8b $1b
+ jr c, .asm_1daa8
ld hl, NameRaterText_1dabd
call NameRaterScript_1da15
- jr nz, .asm_1daae ; 0x1da93 $19
+ jr nz, .asm_1daae
ld hl, NameRaterText_1dac2
call PrintText
callba Func_655c
- jr c, .asm_1daae ; 0x1daa3 $9
+ jr c, .asm_1daae
ld hl, NameRaterText_1dac7
.asm_1daa8
call PrintText
jp TextScriptEnd
.asm_1daae
ld hl, NameRaterText_1dacc
- jr .asm_1daa8 ; 0x1dab1 $f5
+ jr .asm_1daa8
NameRaterText_1dab3: ; 1dab3 (7:5ab3)
TX_FAR _NameRaterText_1dab3
diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm
index 8f23cd3e..7c99d802 100755
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -194,17 +194,17 @@ OaksLabScript7: ; 1cc72 (7:4c72)
OaksLabScript8: ; 1cc80 (7:4c80)
ld a, [W_PLAYERSTARTER]
cp STARTER1
- jr z, .Charmander ; 0x1cc85 $6
+ jr z, .Charmander
cp STARTER2
- jr z, .Squirtle ; 0x1cc89 $1d
- jr .Bulbasaur ; 0x1cc8b $38
+ jr z, .Squirtle
+ jr .Bulbasaur
.Charmander
ld de, .MiddleBallMovement1
ld a, [W_YCOORD]
cp $4 ; is the player standing below the table?
- jr z, .asm_1ccf3 ; 0x1cc95 $5c
+ jr z, .asm_1ccf3
ld de, .MiddleBallMovement2
- jr .asm_1ccf3 ; 0x1cc9a $57
+ jr .asm_1ccf3
.MiddleBallMovement1
db 0,0,$C0,$C0,$C0,$40,$FF
@@ -215,9 +215,9 @@ OaksLabScript8: ; 1cc80 (7:4c80)
ld de, .RightBallMovement1
ld a, [W_YCOORD]
cp $4 ; is the player standing below the table?
- jr z, .asm_1ccf3 ; 0x1ccb0 $41
+ jr z, .asm_1ccf3
ld de, .RightBallMovement2
- jr .asm_1ccf3 ; 0x1ccb5 $3c
+ jr .asm_1ccf3
.RightBallMovement1
db 0,0,$C0,$C0,$C0,$C0,$40,$FF
@@ -228,7 +228,7 @@ OaksLabScript8: ; 1cc80 (7:4c80)
ld de, .LeftBallMovement1
ld a, [W_XCOORD]
cp $9 ; is the player standing to the right of the table?
- jr nz, .asm_1ccf3 ; 0x1cccd $24
+ jr nz, .asm_1ccf3
push hl
ld a, $1
ld [H_SPRITEINDEX], a
@@ -247,7 +247,7 @@ OaksLabScript8: ; 1cc80 (7:4c80)
ld [hl], $9
ld de, .LeftBallMovement2 ; the rival is not currently onscreen, so account for that
pop hl
- jr .asm_1ccf3 ; 0x1cced $4
+ jr .asm_1ccf3
.LeftBallMovement1
db $00,$C0 ; not yet terminated!
@@ -279,14 +279,14 @@ OaksLabScript9: ; 1cd00 (7:4d00)
call DisplayTextID
ld a, [wTrainerEngageDistance]
cp $2
- jr nz, .asm_1cd28 ; 0x1cd22 $4
+ jr nz, .asm_1cd28
ld a, HS_STARTER_BALL_1
- jr .asm_1cd32 ; 0x1cd26 $a
+ jr .asm_1cd32
.asm_1cd28
cp $3
- jr nz, .asm_1cd30 ; 0x1cd2a $4
+ jr nz, .asm_1cd30
ld a, HS_STARTER_BALL_2
- jr .asm_1cd32 ; 0x1cd2e $2
+ jr .asm_1cd32
.asm_1cd30
ld a, HS_STARTER_BALL_3
.asm_1cd32
@@ -328,7 +328,7 @@ OaksLabScript10: ; 1cd6d (7:4d6d)
ld [wd528], a
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
- call PlayMusic ; play music
+ call PlayMusic
ld a, $f
ld [$ff8c], a
call DisplayTextID
@@ -361,14 +361,14 @@ OaksLabScript11: ; 1cdb9 (7:4db9)
ld [W_CUROPPONENT], a
ld a, [W_RIVALSTARTER]
cp STARTER2
- jr nz, .NotSquirtle ; 0x1cdc9 $4
+ jr nz, .NotSquirtle
ld a, $1
- jr .done ; 0x1cdcd $a
+ jr .done
.NotSquirtle
cp STARTER3
- jr nz, .Charmander ; 0x1cdd1 $4
+ jr nz, .Charmander
ld a, $2
- jr .done ; 0x1cdd5 $2
+ jr .done
.Charmander
ld a, $3
.done
@@ -413,7 +413,7 @@ OaksLabScript12: ; 1ce03 (7:4e03)
ret
OaksLabScript13: ; 1ce32 (7:4e32)
- ld c, $14
+ ld c, 20
call DelayFrames
ld a, $10
ld [$ff8c], a
@@ -426,9 +426,9 @@ OaksLabScript13: ; 1ce32 (7:4e32)
ld a, [W_XCOORD]
cp $4
; move left or right depending on where the player is standing
- jr nz, .asm_1ce5b ; 0x1ce55 $4
+ jr nz, .asm_1ce5b
ld a, $c0
- jr .asm_1ce5d ; 0x1ce59 $2
+ jr .asm_1ce5d
.asm_1ce5b
ld a, $80
.asm_1ce5d
@@ -444,7 +444,7 @@ OaksLabScript13: ; 1ce32 (7:4e32)
OaksLabScript14: ; 1ce6d (7:4e6d)
ld a, [wd730]
bit 0, a
- jr nz, .asm_1ce8c ; 0x1ce72 $18
+ jr nz, .asm_1ce8c
ld a, HS_OAKS_LAB_RIVAL
ld [wcc4d], a
predef HideObject
@@ -453,25 +453,26 @@ OaksLabScript14: ; 1ce6d (7:4e6d)
call PlayDefaultMusic ; reset to map music
ld a, $12
ld [W_OAKSLABCURSCRIPT], a
- jr .done ; 0x1ce8a $23
+ jr .done
+; make the player keep facing the rival as he walks away
.asm_1ce8c
ld a, [wcf0f]
cp $5
- jr nz, .asm_1cea8 ; 0x1ce91 $15
+ jr nz, .asm_1cea8
ld a, [W_XCOORD]
cp $4
- jr nz, .asm_1cea1 ; 0x1ce98 $7
- ld a, $c
+ jr nz, .asm_1cea1
+ ld a, SPRITE_FACING_RIGHT
ld [wSpriteStateData1 + 9], a
- jr .done ; 0x1ce9f $e
+ jr .done
.asm_1cea1
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [wSpriteStateData1 + 9], a
- jr .done ; 0x1cea6 $7
+ jr .done
.asm_1cea8
cp $4
ret nz
- xor a
+ xor a ; ld a, SPRITE_FACING_DOWN
ld [wSpriteStateData1 + 9], a
.done
ret
@@ -508,7 +509,7 @@ OaksLabScript15: ; 1ceb0 (7:4eb0)
ld [W_OAKSLABCURSCRIPT], a
ret
-OaksLabScript_1cefd ; 1cefd (7:4efd)
+OaksLabScript_1cefd: ; 1cefd (7:4efd)
ld a, $1
ld [H_SPRITEINDEX], a
ld a, $4
@@ -631,10 +632,10 @@ OaksLabScript_1d00a: ; 1d00a (7:500a)
cp $ff
ret z
cp OAKS_PARCEL
- jr z, .GotParcel ; 0x1d016 $4
+ jr z, .GotParcel
inc hl
inc c
- jr .asm_1d010 ; 0x1d01a $f4
+ jr .asm_1d010
.GotParcel
ld hl, wNumBagItems
ld a, c
@@ -650,29 +651,29 @@ OaksLabScript_1d02b: ; 1d02b (7:502b)
ld [$ffee], a
ld a, [W_YCOORD]
cp $3
- jr nz, .asm_1d045 ; 0x1d038 $b
+ jr nz, .asm_1d045
ld a, $4
ld [wNPCMovementDirections2Index], a
ld a, $30
ld b, $b
- jr .asm_1d068 ; 0x1d043 $23
+ jr .asm_1d068
.asm_1d045
cp $1
- jr nz, .asm_1d054 ; 0x1d047 $b
+ jr nz, .asm_1d054
ld a, $2
ld [wNPCMovementDirections2Index], a
ld a, $30
ld b, $9
- jr .asm_1d068 ; 0x1d052 $14
+ jr .asm_1d068
.asm_1d054
ld a, $3
ld [wNPCMovementDirections2Index], a
ld b, $a
ld a, [W_XCOORD]
cp $4
- jr nz, .asm_1d066 ; 0x1d060 $4
+ jr nz, .asm_1d066
ld a, $40
- jr .asm_1d068 ; 0x1d064 $2
+ jr .asm_1d068
.asm_1d066
ld a, $20
.asm_1d068
@@ -685,7 +686,7 @@ OaksLabScript_1d02b: ; 1d02b (7:502b)
ret
OaksLabScript_1d076: ; 1d076 (7:5076)
- ld hl, OaksLabTextPointers + $36 ; $50b8 ; starts at OaksLabText28
+ ld hl, OaksLabTextPointers + $36 ; starts at OaksLabText28
ld a, l
ld [W_MAPTEXTPTR], a
ld a, h
@@ -734,23 +735,23 @@ OaksLabTextPointers: ; 1d082 (7:5082)
OaksLabText28: ; 1d0ce (7:50ce)
OaksLabText1: ; 1d0ce (7:50ce)
- db $08 ; asm
+ TX_ASM
ld a, [wd74b]
bit 0, a
- jr nz, .asm_1d0de ; 0x1d0d4
+ jr nz, .asm_1d0de
ld hl, OaksLabGaryText1
call PrintText
- jr .asm_1d0f0 ; 0x1d0dc
-.asm_1d0de ; 0x1d0de
+ jr .asm_1d0f0
+.asm_1d0de
bit 2, a
- jr nz, .asm_1d0ea ; 0x1d0e0
+ jr nz, .asm_1d0ea
ld hl, OaksLabText40
call PrintText
- jr .asm_1d0f0 ; 0x1d0e8
-.asm_1d0ea ; 0x1d0ea
+ jr .asm_1d0f0
+.asm_1d0ea
ld hl, OaksLabText41
call PrintText
-.asm_1d0f0 ; 0x1d0f0
+.asm_1d0f0
jp TextScriptEnd
OaksLabGaryText1: ; 1d0f3 (7:50f3)
@@ -767,29 +768,29 @@ OaksLabText41: ; 1d0fd (7:50fd)
OaksLabText29: ; 1d102 (7:5102)
OaksLabText2: ; 1d102 (7:5102)
- db $8
+ TX_ASM
ld a, STARTER2
ld [wWhichTrade], a
ld a, $3
ld [wTrainerEngageDistance], a
ld a, STARTER1
ld b, $2
- jr OaksLabScript_1d133 ; 0x1d111 $20
+ jr OaksLabScript_1d133
OaksLabText30: ; 1d113 (7:5113)
OaksLabText3: ; 1d113 (7:5113)
- db $8
+ TX_ASM
ld a, STARTER3
ld [wWhichTrade], a
ld a, $4
ld [wTrainerEngageDistance], a
ld a, STARTER2
ld b, $3
- jr OaksLabScript_1d133 ; 0x1d122 $f
+ jr OaksLabScript_1d133
OaksLabText31: ; 1d124 (7:5124)
OaksLabText4: ; 1d124 (7:5124)
- db $8
+ TX_ASM
ld a, STARTER1
ld [wWhichTrade], a
ld a, $2
@@ -806,7 +807,7 @@ OaksLabScript_1d133: ; 1d133 (7:5133)
bit 2, a
jp nz, OaksLabScript_1d22d
bit 1, a
- jr nz, OaksLabScript_1d157 ; 0x1d147 $e
+ jr nz, OaksLabScript_1d157
ld hl, OaksLabText39
call PrintText
jp TextScriptEnd
@@ -822,7 +823,6 @@ OaksLabScript_1d157: ; 1d157 (7:5157)
ld [$ff8b], a
call GetPointerWithinSpriteStateData1
ld [hl], $0
- ; manually fixed some disassembler issues around here
ld a, $1
ld [H_SPRITEINDEX], a
ld a, $9
@@ -835,7 +835,7 @@ OaksLabScript_1d157: ; 1d157 (7:5157)
ld hl, wd730
res 6, [hl]
call ReloadMapData
- ld c, $a
+ ld c, 10
call DelayFrames
ld a, [wSpriteIndex]
cp $2
@@ -844,7 +844,7 @@ OaksLabScript_1d157: ; 1d157 (7:5157)
jr z, OaksLabLookAtSquirtle
jr OaksLabLookAtBulbasaur
-OaksLabLookAtCharmander ; 0x1d195
+OaksLabLookAtCharmander: ; 1d195 (7:5195)
ld hl, OaksLabCharmanderText
jr OaksLabMonChoiceMenu
OaksLabCharmanderText: ; 1d19a (7:519a)
@@ -879,17 +879,17 @@ OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3)
call GetMonName
ld a, [wSpriteIndex]
cp $2
- jr nz, asm_1d1db ; 0x1d1d5 $4
+ jr nz, .asm_1d1db
ld a, HS_STARTER_BALL_1
- jr asm_1d1e5 ; 0x1d1d9 $a
-asm_1d1db: ; 1d1db (7:51db)
+ jr .asm_1d1e5
+.asm_1d1db
cp $3
- jr nz, asm_1d1e3 ; 0x1d1dd $4
+ jr nz, .asm_1d1e3
ld a, HS_STARTER_BALL_2
- jr asm_1d1e5 ; 0x1d1e1 $2
-asm_1d1e3: ; 1d1e3 (7:51e3)
+ jr .asm_1d1e5
+.asm_1d1e3
ld a, HS_STARTER_BALL_3
-asm_1d1e5: ; 1d1e5 (7:51e5)
+.asm_1d1e5
ld [wcc4d], a
predef HideObject
ld a, $1
@@ -939,80 +939,80 @@ OaksLabLastMonText: ; 1d243 (7:5243)
OaksLabText32: ; 1d248 (7:5248)
OaksLabText5: ; 1d248 (7:5248)
- db $08 ; asm
+ TX_ASM
ld a, [wd747]
bit 6, a
- jr nz, .asm_50e81 ; 0x1d24e
+ jr nz, .asm_1d266
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld a, [wd11e]
cp $2
- jr c, .asm_b28b0 ; 0x1d25d
+ jr c, .asm_1d279
ld a, [wd74b]
bit 5, a
- jr z, .asm_b28b0 ; 0x1d264
-.asm_50e81 ; 0x1d266
+ jr z, .asm_1d279
+.asm_1d266
ld hl, OaksLabText_1d31d
call PrintText
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
predef DisplayDexRating
- jp .asm_0f042
-.asm_b28b0 ; 0x1d279
+ jp .asm_1d2ed
+.asm_1d279
ld b,POKE_BALL
call IsItemInBag
- jr nz, .asm_17c30 ; 0x1d27e
+ jr nz, .asm_1d2e7
ld a, [wd7eb]
bit 5, a
- jr nz, .asm_f1adc ; 0x1d285
+ jr nz, .asm_1d2d0
ld a, [wd74b]
bit 5, a
- jr nz, .asm_333a2 ; 0x1d28c
+ jr nz, .asm_1d2c8
bit 3, a
- jr nz, .asm_76269 ; 0x1d290
+ jr nz, .asm_1d2a9
ld a, [wd72e]
bit 3, a
- jr nz, .asm_4a5e0 ; 0x1d297
+ jr nz, .asm_1d2a1
ld hl, OaksLabText_1d2f0
call PrintText
- jr .asm_0f042 ; 0x1d29f
-.asm_4a5e0 ; 0x1d2a1
+ jr .asm_1d2ed
+.asm_1d2a1
ld hl, OaksLabText_1d2f5
call PrintText
- jr .asm_0f042 ; 0x1d2a7
-.asm_76269 ; 0x1d2a9
+ jr .asm_1d2ed
+.asm_1d2a9
ld b, OAKS_PARCEL
call IsItemInBag
- jr nz, .asm_a8fcf ; 0x1d2ae
+ jr nz, .asm_1d2b8
ld hl, OaksLabText_1d2fa
call PrintText
- jr .asm_0f042 ; 0x1d2b6
-.asm_a8fcf ; 0x1d2b8
+ jr .asm_1d2ed
+.asm_1d2b8
ld hl, OaksLabDeliverParcelText
call PrintText
call OaksLabScript_1d00a
ld a, $f
ld [W_OAKSLABCURSCRIPT], a
- jr .asm_0f042 ; 0x1d2c6
-.asm_333a2 ; 0x1d2c8
+ jr .asm_1d2ed
+.asm_1d2c8
ld hl, OaksLabAroundWorldText
call PrintText
- jr .asm_0f042 ; 0x1d2ce
-.asm_f1adc ; 0x1d2d0
+ jr .asm_1d2ed
+.asm_1d2d0
ld hl, wd74b
bit 4, [hl]
set 4, [hl]
- jr nz, .asm_17c30 ; 0x1d2d7
+ jr nz, .asm_1d2e7
ld bc, (POKE_BALL << 8) | 5
call GiveItem
ld hl, OaksLabGivePokeballsText
call PrintText
- jr .asm_0f042 ; 0x1d2e5
-.asm_17c30 ; 0x1d2e7
+ jr .asm_1d2ed
+.asm_1d2e7
ld hl, OaksLabPleaseVisitText
call PrintText
-.asm_0f042 ; 0x1d2ed
+.asm_1d2ed
jp TextScriptEnd
OaksLabText_1d2f0: ; 1d2f0 (7:52f0)
@@ -1055,7 +1055,7 @@ OaksLabText34: ; 1d322 (7:5322)
OaksLabText33: ; 1d322 (7:5322)
OaksLabText7: ; 1d322 (7:5322)
OaksLabText6: ; 1d322 (7:5322)
- db $08 ; asm
+ TX_ASM
ld hl, OaksLabText_1d32c
call PrintText
jp TextScriptEnd
@@ -1071,7 +1071,7 @@ OaksLabText8: ; 1d331 (7:5331)
OaksLabText36: ; 1d336 (7:5336)
OaksLabText9: ; 1d336 (7:5336)
- db $08 ; asm
+ TX_ASM
ld hl, OaksLabText_1d340
call PrintText
jp TextScriptEnd
@@ -1081,7 +1081,7 @@ OaksLabText_1d340: ; 1d340 (7:5340)
db "@"
OaksLabText17: ; 1d345 (7:5345)
- db $8
+ TX_ASM
ld hl, OaksLabRivalWaitingText
call PrintText
jp TextScriptEnd
@@ -1091,7 +1091,7 @@ OaksLabRivalWaitingText: ; 1d34f (7:534f)
db "@"
OaksLabText18: ; 1d354 (7:5354)
- db $8
+ TX_ASM
ld hl, OaksLabChooseMonText
call PrintText
jp TextScriptEnd
@@ -1101,7 +1101,7 @@ OaksLabChooseMonText: ; 1d35e (7:535e)
db "@"
OaksLabText19: ; 1d363 (7:5363)
- db $8
+ TX_ASM
ld hl, OaksLabRivalInterjectionText
call PrintText
jp TextScriptEnd
@@ -1111,7 +1111,7 @@ OaksLabRivalInterjectionText: ; 1d36d (7:536d)
db "@"
OaksLabText20: ; 1d372 (7:5372)
- db $8
+ TX_ASM
ld hl, OaksLabBePatientText
call PrintText
jp TextScriptEnd
@@ -1121,7 +1121,7 @@ OaksLabBePatientText: ; 1d37c (7:537c)
db "@"
OaksLabText12: ; 1d381 (7:5381)
- db $8
+ TX_ASM
ld hl, OaksLabLeavingText
call PrintText
jp TextScriptEnd
@@ -1131,7 +1131,7 @@ OaksLabLeavingText: ; 1d38b (7:538b)
db "@"
OaksLabText13: ; 1d390 (7:5390)
- db $8
+ TX_ASM
ld hl, OaksLabRivalPickingMonText
call PrintText
jp TextScriptEnd
@@ -1141,7 +1141,7 @@ OaksLabRivalPickingMonText: ; 1d39a (7:539a)
db "@"
OaksLabText14: ; 1d39f (7:539f)
- db $8
+ TX_ASM
ld hl, OaksLabRivalReceivedMonText
call PrintText
jp TextScriptEnd
@@ -1151,7 +1151,7 @@ OaksLabRivalReceivedMonText: ; 1d3a9 (7:53a9)
db $11, "@"
OaksLabText15: ; 1d3af (7:53af)
- db $8
+ TX_ASM
ld hl, OaksLabRivalChallengeText
call PrintText
jp TextScriptEnd
@@ -1169,7 +1169,7 @@ OaksLabText_1d3c3: ; 1d3c3 (7:53c3)
db "@"
OaksLabText16: ; 1d3c8 (7:53c8)
- db $8
+ TX_ASM
ld hl, OaksLabRivalToughenUpText
call PrintText
jp TextScriptEnd
@@ -1210,7 +1210,7 @@ OaksLabText38: ; 1d3fb (7:53fb)
OaksLabText37: ; 1d3fb (7:53fb)
OaksLabText11: ; 1d3fb (7:53fb)
OaksLabText10: ; 1d3fb (7:53fb)
- db $08 ; asm
+ TX_ASM
ld hl, OaksLabText_1d405
call PrintText
jp TextScriptEnd
diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm
index c43b9682..d625a7be 100755
--- a/scripts/pallettown.asm
+++ b/scripts/pallettown.asm
@@ -35,7 +35,7 @@ PalletTownScript0: ; 18e81 (6:4e81)
ld a, BANK(Music_MeetProfOak)
ld c,a ; song bank
ld a, MUSIC_MEET_PROF_OAK ; “oak appears” music
- call PlayMusic ; plays music
+ call PlayMusic
ld a,$FC
ld [wJoyIgnore],a
ld hl,wd74b
@@ -97,7 +97,7 @@ PalletTownScript3: ; 18f12 (6:4f12)
ld a,[wd730]
bit 0,a
ret nz
- xor a
+ xor a ; ld a, SPRITE_FACING_DOWN
ld [wSpriteStateData1 + 9],a
ld a,1
ld [wcf0d],a
@@ -166,7 +166,7 @@ PalletTownTextPointers: ; 18f88 (6:4f88)
dw PalletTownText7
PalletTownText1: ; 18f96 (6:4f96)
- db 8
+ TX_ASM
ld a,[wcf0d]
and a
jr nz,.next
@@ -182,7 +182,7 @@ PalletTownText1: ; 18f96 (6:4f96)
OakAppearsText: ; 18fb0 (6:4fb0)
TX_FAR _OakAppearsText
- db 8
+ TX_ASM
ld c,10
call DelayFrames
xor a
diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm
index 55369df9..469cdfe7 100755
--- a/scripts/pewtercity.asm
+++ b/scripts/pewtercity.asm
@@ -72,7 +72,7 @@ PewterCityScript1: ; 19280 (6:5280)
call SetSpritePosition1
ld a, $3
ld [$ff8c], a
- ld de, MovementData_PewterMuseumGuyExit ; $52ce
+ ld de, MovementData_PewterMuseumGuyExit
call MoveSprite
ld a, $2
ld [W_PEWTERCITYCURSCRIPT], a
@@ -194,33 +194,33 @@ PewterCityText2: ; 193ac (6:53ac)
db "@"
PewterCityText3: ; 193b1 (6:53b1)
- db $08 ; asm
+ TX_ASM
ld hl, PewterCityText_193f1
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_f46a9 ; 0x193bf
+ jr nz, .asm_193c9
ld hl, PewterCityText_193f6
call PrintText
- jr .asm_ac429 ; 0x193c7
-.asm_f46a9 ; 0x193c9
+ jr .asm_193ee
+.asm_193c9
ld hl, PewterCityText_193fb
call PrintText
xor a
- ldh [$b3], a
- ldh [$b4], a
+ ld [hJoyPressed], a
+ ld [hJoyHeld], a
ld [wNPCMovementScriptFunctionNum], a
ld a, $2
ld [wNPCMovementScriptPointerTableNum], a
- ldh a, [$b8]
+ ld a, [H_LOADEDROMBANK]
ld [wNPCMovementScriptBank], a
ld a, $3
ld [wSpriteIndex], a
call GetSpritePosition2
ld a, $1
ld [W_PEWTERCITYCURSCRIPT], a
-.asm_ac429 ; 0x193ee
+.asm_193ee
jp TextScriptEnd
PewterCityText_193f1: ; 193f1 (6:53f1)
@@ -240,20 +240,20 @@ PewterCityText13: ; 19400 (6:5400)
db "@"
PewterCityText4: ; 19405 (6:5405)
- db $8
+ TX_ASM
ld hl, PewterCityText_19427
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
cp $0
- jr nz, .asm_e4603
+ jr nz, .asm_1941e
ld hl, PewterCityText_1942c
call PrintText
- jr .asm_e4604 ; 0x1941c $6
-.asm_e4603
+ jr .asm_19424
+.asm_1941e
ld hl, PewterCityText_19431
call PrintText
-.asm_e4604 ; 0x19424
+.asm_19424
jp TextScriptEnd
PewterCityText_19427: ; 19427 (6:5427)
@@ -269,15 +269,15 @@ PewterCityText_19431: ; 19431 (6:5431)
db "@"
PewterCityText5: ; 19436 (6:5436)
- db $08 ; asm
+ TX_ASM
ld hl, PewterCityText_1945d
call PrintText
xor a
- ldh [$b4], a
+ ld [hJoyHeld], a
ld [wNPCMovementScriptFunctionNum], a
ld a, $3
ld [wNPCMovementScriptPointerTableNum], a
- ldh a, [$b8]
+ ld a, [H_LOADEDROMBANK]
ld [wNPCMovementScriptBank], a
ld a, $5
ld [wSpriteIndex], a
diff --git a/scripts/pewtergym.asm b/scripts/pewtergym.asm
index 9f9c7c3b..f4b2ad28 100755
--- a/scripts/pewtergym.asm
+++ b/scripts/pewtergym.asm
@@ -12,8 +12,8 @@ PewterGymScript: ; 5c387 (17:4387)
ret
PewterGymScript_5c3a4: ; 5c3a4 (17:43a4)
- ld hl, Gym1CityName ; $43ad
- ld de, Gym1LeaderName ; $43b9
+ ld hl, Gym1CityName
+ ld de, Gym1LeaderName
jp LoadGymLeaderAndCityName
Gym1CityName: ; 5c3ad (17:43ad)
@@ -36,7 +36,7 @@ PewterGymScriptPointers: ; 5c3ca (17:43ca)
dw PewterGymScript3
PewterGymScript3: ; 5c3d2 (17:43d2)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, PewterGymScript_5c3bf
ld a, $f0
@@ -44,7 +44,7 @@ PewterGymScript3: ; 5c3d2 (17:43d2)
PewterGymScript_5c3df: ; 5c3df (17:43df)
ld a, $4
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd755
set 7, [hl]
@@ -52,14 +52,14 @@ PewterGymScript_5c3df: ; 5c3df (17:43df)
call GiveItem
jr nc, .BagFull
ld a, $5
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd755
set 6, [hl]
jr .asm_5c408
.BagFull
ld a, $6
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
.asm_5c408
ld hl, W_OBTAINEDBADGES
@@ -97,28 +97,28 @@ PewterGymTrainerHeader0: ; 5c441 (17:4441)
db $2 ; flag's bit
db ($5 << 4) ; trainer's view range
dw wd755 ; flag's byte
- dw PewterGymBattleText1 ; 0x44d0 TextBeforeBattle
- dw PewterGymAfterBattleText1 ; 0x44da TextAfterBattle
- dw PewterGymEndBattleText1 ; 0x44d5 TextEndBattle
- dw PewterGymEndBattleText1 ; 0x44d5 TextEndBattle
+ dw PewterGymBattleText1 ; TextBeforeBattle
+ dw PewterGymAfterBattleText1 ; TextAfterBattle
+ dw PewterGymEndBattleText1 ; TextEndBattle
+ dw PewterGymEndBattleText1 ; TextEndBattle
db $ff
PewterGymText1: ; 5c44e (17:444e)
- db $08 ; asm
+ TX_ASM
ld a, [wd755]
bit 7, a
- jr z, .asm_4a735 ; 0x5c454
+ jr z, .asm_5c46a
bit 6, a
- jr nz, .asm_ff7d0 ; 0x5c458
+ jr nz, .asm_5c462
call z, PewterGymScript_5c3df
call DisableWaitingAfterTextDisplay
- jr .asm_e0ffb ; 0x5c460
-.asm_ff7d0 ; 0x5c462
+ jr .asm_5c49b
+.asm_5c462
ld hl, PewterGymText_5c4a3
call PrintText
- jr .asm_e0ffb ; 0x5c468
-.asm_4a735 ; 0x5c46a
+ jr .asm_5c49b
+.asm_5c46a
ld hl, PewterGymText_5c49e
call PrintText
ld hl, wd72d
@@ -127,18 +127,18 @@ PewterGymText1: ; 5c44e (17:444e)
ld hl, PewterGymText_5c4bc
ld de, PewterGymText_5c4bc
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $1
ld [W_GYMLEADERNO], a
xor a
- ldh [$b4], a
+ ld [hJoyHeld], a
ld a, $3
ld [W_PEWTERGYMCURSCRIPT], a
ld [W_CURMAPSCRIPT], a
-.asm_e0ffb ; 0x5c49b
+.asm_5c49b
jp TextScriptEnd
PewterGymText_5c49e: ; 5c49e (17:449e)
@@ -170,7 +170,7 @@ PewterGymText_5c4bc: ; 5c4bc (17:44bc)
db "@"
PewterGymText2: ; 5c4c6 (17:44c6)
- db $08 ; asm
+ TX_ASM
ld hl, PewterGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -188,30 +188,30 @@ PewterGymAfterBattleText1: ; 5c4da (17:44da)
db "@"
PewterGymText3: ; 5c4df (17:44df)
- db $08 ; asm
+ TX_ASM
ld a, [wd72a]
bit 0, a
- jr nz, .asm_71369 ; 0x5c4e5
+ jr nz, .asm_5c50c
ld hl, PewterGymText_5c515
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_6123a ; 0x5c4f4
+ jr nz, .asm_5c4fe
ld hl, PewterGymText_5c51a
call PrintText
- jr .asm_d1578 ; 0x5c4fc
-.asm_6123a ; 0x5c4fe
+ jr .asm_5c504
+.asm_5c4fe
ld hl, PewterGymText_5c524
call PrintText
-.asm_d1578 ; 0x5c504
+.asm_5c504
ld hl, PewterGymText_5c51f
call PrintText
- jr .asm_07013 ; 0x5c50a
-.asm_71369 ; 0x5c50c
+ jr .asm_5c512
+.asm_5c50c
ld hl, PewterGymText_5c529
call PrintText
-.asm_07013 ; 0x5c512
+.asm_5c512
jp TextScriptEnd
PewterGymText_5c515: ; 5c515 (17:4515)
diff --git a/scripts/pewterhouse1.asm b/scripts/pewterhouse1.asm
index 05d27a14..a670f23c 100755
--- a/scripts/pewterhouse1.asm
+++ b/scripts/pewterhouse1.asm
@@ -8,7 +8,7 @@ PewterHouse1TextPointers: ; 1d5f6 (7:55f6)
PewterHouse1Text1: ; 1d5fc (7:55fc)
TX_FAR _PewterHouse1Text1
- db $08 ; asm
+ TX_ASM
ld a, NIDORAN_M
call PlayCry
call WaitForSoundToFinish
diff --git a/scripts/pewtermart.asm b/scripts/pewtermart.asm
index 8fe99d94..62831d1b 100755
--- a/scripts/pewtermart.asm
+++ b/scripts/pewtermart.asm
@@ -10,7 +10,7 @@ PewterMartTextPointers: ; 74cb6 (1d:4cb6)
dw PewterMartText3
PewterMartText2: ; 74cbc (1d:4cbc)
- db $08 ; asm
+ TX_ASM
ld hl, PewterMartText_74cc6
call PrintText
jp TextScriptEnd
@@ -20,7 +20,7 @@ PewterMartText_74cc6: ; 74cc6 (1d:4cc6)
db "@"
PewterMartText3: ; 74ccb (1d:4ccb)
- db $08 ; asm
+ TX_ASM
ld hl, PewterMartText_74cd5
call PrintText
jp TextScriptEnd
diff --git a/scripts/pewterpokecenter.asm b/scripts/pewterpokecenter.asm
index 1f3cabe0..42bc3086 100755
--- a/scripts/pewterpokecenter.asm
+++ b/scripts/pewterpokecenter.asm
@@ -16,16 +16,16 @@ PewterPokecenterText2: ; 5c596 (17:4596)
db "@"
PewterPokecenterText3: ; 5c59b (17:459b)
- db $8
+ TX_ASM
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, PewterPokecenterText5
call PrintText
ld a, $ff
call PlaySound
- ld c, $20
+ ld c, 32
call DelayFrames
- ld hl, Unknown_5c608 ; $4608
+ ld hl, JigglypuffFacingDirections
ld de, wTrainerFacingDirection
ld bc, $0004
call CopyData
@@ -34,7 +34,7 @@ PewterPokecenterText3: ; 5c59b (17:459b)
.asm_5c5c3
cp [hl]
inc hl
- jr nz, .asm_5c5c3 ; 0x5c5c5 $fc
+ jr nz, .asm_5c5c3
dec hl
push hl
ld c, BANK(Music_JigglypuffSong)
@@ -52,14 +52,14 @@ PewterPokecenterText3: ; 5c59b (17:459b)
ld a, [wTrainerEngageDistance]
ld [wcd42], a
pop hl
- ld c, $18
+ ld c, 24
call DelayFrames
ld a, [wc026]
ld b, a
ld a, [wc027]
or b
- jr nz, .asm_5c5d1 ; 0x5c5f6 $d9
- ld c, $30
+ jr nz, .asm_5c5d1
+ ld c, 48
call DelayFrames
call PlayDefaultMusic
jp TextScriptEnd
@@ -68,8 +68,11 @@ PewterPokecenterText5: ; 5c603 (17:4603)
TX_FAR _PewterPokecenterText5
db "@"
-Unknown_5c608: ; 5c608 (17:4608)
- db $30, $38, $34, $3c
+JigglypuffFacingDirections: ; 5c608 (17:4608)
+ db $30 | SPRITE_FACING_DOWN
+ db $30 | SPRITE_FACING_LEFT
+ db $30 | SPRITE_FACING_UP
+ db $30 | SPRITE_FACING_RIGHT
PewterPokecenterText4: ; 5c60c (17:460c)
db $f6
diff --git a/scripts/pokemontower2.asm b/scripts/pokemontower2.asm
index dc9275f2..cd86a494 100755
--- a/scripts/pokemontower2.asm
+++ b/scripts/pokemontower2.asm
@@ -20,7 +20,7 @@ PokemonTower2Script0: ; 6050f (18:450f)
ld a, [wd764]
bit 7, a
ret nz
- ld hl, CoordsData_6055e ; $455e
+ ld hl, CoordsData_6055e
call ArePlayerCoordsInArray
ret nc
ld a, $ff
@@ -35,7 +35,7 @@ PokemonTower2Script0: ; 6050f (18:450f)
cp $1
ld a, $8
ld b, $0
- jr nz, .asm_60544 ; 0x60539 $9
+ jr nz, .asm_60544
ld hl, wd764
set 6, [hl]
ld a, $2
@@ -74,7 +74,7 @@ PokemonTower2Script1: ; 60563 (18:4563)
ld de, MovementData_605b2
ld a, [wd764]
bit 6, a
- jr nz, .asm_60589 ; 0x60584 $3
+ jr nz, .asm_60589
ld de, MovementData_605a9
.asm_60589
ld a, $1
@@ -115,21 +115,21 @@ PokemonTower2TextPointers: ; 605db (18:45db)
dw PokemonTower2Text2
PokemonTower2Text1: ; 605df (18:45df)
- db $08 ; asm
+ TX_ASM
ld a, [wd764]
bit 7, a
- jr z, .asm_16f24 ; 0x605e5
+ jr z, .asm_16f24
ld hl, PokemonTower2Text_6063c
call PrintText
- jr .asm_41852 ; 0x605ed
-.asm_16f24 ; 0x605ef
+ jr .asm_41852
+.asm_16f24
ld hl, PokemonTower2Text_6062d
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
ld hl, PokemonTower2Text_60632
- ld de, PokemonTower2Text_60637 ; XXX $4637
+ ld de, PokemonTower2Text_60637
call SaveEndBattleTextPointers
ld a, SONY2 + $c8
ld [W_CUROPPONENT], a
@@ -137,15 +137,15 @@ PokemonTower2Text1: ; 605df (18:45df)
; select which team to use during the encounter
ld a, [W_RIVALSTARTER]
cp STARTER2
- jr nz, .NotSquirtle ; 0x6060f
+ jr nz, .NotSquirtle
ld a, $4
jr .done
-.NotSquirtle ; 0x60615
+.NotSquirtle
cp STARTER3
- jr nz, .Charmander ; 0x60617
+ jr nz, .Charmander
ld a, $5
jr .done
-.Charmander ; 0x6061d
+.Charmander
ld a, $6
.done
ld [W_TRAINERNO], a
@@ -153,7 +153,7 @@ PokemonTower2Text1: ; 605df (18:45df)
ld a, $1
ld [W_POKEMONTOWER2CURSCRIPT], a
ld [W_CURMAPSCRIPT], a
-.asm_41852 ; 0x6062a
+.asm_41852
jp TextScriptEnd
PokemonTower2Text_6062d: ; 6062d (18:462d)
diff --git a/scripts/pokemontower3.asm b/scripts/pokemontower3.asm
index 8df5bfc5..2cf58381 100755
--- a/scripts/pokemontower3.asm
+++ b/scripts/pokemontower3.asm
@@ -23,44 +23,44 @@ PokemonTower3TrainerHeader0: ; 606ed (18:46ed)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd765 ; flag's byte
- dw PokemonTower3BattleText1 ; 0x4730 TextBeforeBattle
- dw PokemonTower3AfterBattleText1 ; 0x473a TextAfterBattle
- dw PokemonTower3EndBattleText1 ; 0x4735 TextEndBattle
- dw PokemonTower3EndBattleText1 ; 0x4735 TextEndBattle
+ dw PokemonTower3BattleText1 ; TextBeforeBattle
+ dw PokemonTower3AfterBattleText1 ; TextAfterBattle
+ dw PokemonTower3EndBattleText1 ; TextEndBattle
+ dw PokemonTower3EndBattleText1 ; TextEndBattle
PokemonTower3TrainerHeader1: ; 606f9 (18:46f9)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd765 ; flag's byte
- dw PokemonTower3BattleText2 ; 0x473f TextBeforeBattle
- dw PokemonTower3AfterBattleText2 ; 0x4749 TextAfterBattle
- dw PokemonTower3EndBattleText2 ; 0x4744 TextEndBattle
- dw PokemonTower3EndBattleText2 ; 0x4744 TextEndBattle
+ dw PokemonTower3BattleText2 ; TextBeforeBattle
+ dw PokemonTower3AfterBattleText2 ; TextAfterBattle
+ dw PokemonTower3EndBattleText2 ; TextEndBattle
+ dw PokemonTower3EndBattleText2 ; TextEndBattle
PokemonTower3TrainerHeader2: ; 60705 (18:4705)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd765 ; flag's byte
- dw PokemonTower3BattleText3 ; 0x474e TextBeforeBattle
- dw PokemonTower3AfterBattleText3 ; 0x4758 TextAfterBattle
- dw PokemonTower3EndBattleText3 ; 0x4753 TextEndBattle
- dw PokemonTower3EndBattleText3 ; 0x4753 TextEndBattle
+ dw PokemonTower3BattleText3 ; TextBeforeBattle
+ dw PokemonTower3AfterBattleText3 ; TextAfterBattle
+ dw PokemonTower3EndBattleText3 ; TextEndBattle
+ dw PokemonTower3EndBattleText3 ; TextEndBattle
db $ff
PokemonTower3Text1: ; 60712 (18:4712)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PokemonTower3Text2: ; 6071c (18:471c)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
PokemonTower3Text3: ; 60726 (18:4726)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/pokemontower4.asm b/scripts/pokemontower4.asm
index 760bb604..4f375657 100755
--- a/scripts/pokemontower4.asm
+++ b/scripts/pokemontower4.asm
@@ -25,45 +25,45 @@ PokemonTower4TrainerHeader0: ; 6081b (18:481b)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd766 ; flag's byte
- dw PokemonTower4BattleText1 ; 0x485e TextBeforeBattle
- dw PokemonTower4AfterBattleText1 ; 0x4868 TextAfterBattle
- dw PokemonTower4EndBattleText1 ; 0x4863 TextEndBattle
- dw PokemonTower4EndBattleText1 ; 0x4863 TextEndBattle
+ dw PokemonTower4BattleText1 ; TextBeforeBattle
+ dw PokemonTower4AfterBattleText1 ; TextAfterBattle
+ dw PokemonTower4EndBattleText1 ; TextEndBattle
+ dw PokemonTower4EndBattleText1 ; TextEndBattle
PokemonTower4TrainerHeader1: ; 60827 (18:4827)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd766 ; flag's byte
- dw PokemonTower4BattleText2 ; 0x486d TextBeforeBattle
- dw PokemonTower4AfterBattleText2 ; 0x4877 TextAfterBattle
- dw PokemonTower4EndBattleText2 ; 0x4872 TextEndBattle
- dw PokemonTower4EndBattleText2 ; 0x4872 TextEndBattle
+ dw PokemonTower4BattleText2 ; TextBeforeBattle
+ dw PokemonTower4AfterBattleText2 ; TextAfterBattle
+ dw PokemonTower4EndBattleText2 ; TextEndBattle
+ dw PokemonTower4EndBattleText2 ; TextEndBattle
PokemonTower4TrainerHeader2: ; 60833 (18:4833)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd766 ; flag's byte
- dw PokemonTower4BattleText3 ; 0x487c TextBeforeBattle
- dw PokemonTower4AfterBattleText3 ; 0x4886 TextAfterBattle
- dw PokemonTower4EndBattleText3 ; 0x4881 TextEndBattle
- dw PokemonTower4EndBattleText3 ; 0x4881 TextEndBattle
+ dw PokemonTower4BattleText3 ; TextBeforeBattle
+ dw PokemonTower4AfterBattleText3 ; TextAfterBattle
+ dw PokemonTower4EndBattleText3 ; TextEndBattle
+ dw PokemonTower4EndBattleText3 ; TextEndBattle
db $ff
PokemonTower4Text1: ; 60840 (18:4840)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PokemonTower4Text2: ; 6084a (18:484a)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower4TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
PokemonTower4Text3: ; 60854 (18:4854)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower4TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/pokemontower5.asm b/scripts/pokemontower5.asm
index b70f9e28..34dd3204 100755
--- a/scripts/pokemontower5.asm
+++ b/scripts/pokemontower5.asm
@@ -13,7 +13,7 @@ PokemonTower5ScriptPointers: ; 60945 (18:4945)
dw EndTrainerBattle
PokemonTower5Script0: ; 6094b (18:494b)
- ld hl, CoordsData_60992 ; $4992
+ ld hl, CoordsData_60992
call ArePlayerCoordsInArray
jr c, .asm_60960
ld hl, wd72e
@@ -38,7 +38,7 @@ PokemonTower5Script0: ; 6094b (18:494b)
call Delay3
call GBFadeInFromWhite
ld a, $7
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -65,37 +65,37 @@ PokemonTower5TrainerHeader0: ; 609a9 (18:49a9)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd767 ; flag's byte
- dw PokemonTower5BattleText1 ; 0x49e9 TextBeforeBattle
- dw PokemonTower5AfterBattleText1 ; 0x49f3 TextAfterBattle
- dw PokemonTower5EndBattleText1 ; 0x49ee TextEndBattle
- dw PokemonTower5EndBattleText1 ; 0x49ee TextEndBattle
+ dw PokemonTower5BattleText1 ; TextBeforeBattle
+ dw PokemonTower5AfterBattleText1 ; TextAfterBattle
+ dw PokemonTower5EndBattleText1 ; TextEndBattle
+ dw PokemonTower5EndBattleText1 ; TextEndBattle
PokemonTower5TrainerHeader1: ; 609b5 (18:49b5)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd767 ; flag's byte
- dw PokemonTower5BattleText2 ; 0x4a02 TextBeforeBattle
- dw PokemonTower5AfterBattleText2 ; 0x4a0c TextAfterBattle
- dw PokemonTower5EndBattleText2 ; 0x4a07 TextEndBattle
- dw PokemonTower5EndBattleText2 ; 0x4a07 TextEndBattle
+ dw PokemonTower5BattleText2 ; TextBeforeBattle
+ dw PokemonTower5AfterBattleText2 ; TextAfterBattle
+ dw PokemonTower5EndBattleText2 ; TextEndBattle
+ dw PokemonTower5EndBattleText2 ; TextEndBattle
PokemonTower5TrainerHeader2: ; 609c1 (18:49c1)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd767 ; flag's byte
- dw PokemonTower5BattleText3 ; 0x4a1b TextBeforeBattle
- dw PokemonTower5AfterBattleText3 ; 0x4a25 TextAfterBattle
- dw PokemonTower5EndBattleText3 ; 0x4a20 TextEndBattle
- dw PokemonTower5EndBattleText3 ; 0x4a20 TextEndBattle
+ dw PokemonTower5BattleText3 ; TextBeforeBattle
+ dw PokemonTower5AfterBattleText3 ; TextAfterBattle
+ dw PokemonTower5EndBattleText3 ; TextEndBattle
+ dw PokemonTower5EndBattleText3 ; TextEndBattle
PokemonTower5TrainerHeader3: ; 609cd (18:49cd)
db $5 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd767 ; flag's byte
- dw PokemonTower5BattleText4 ; 0x4a34 TextBeforeBattle
- dw PokemonTower5AfterBattleText4 ; 0x4a3e TextAfterBattle
- dw PokemonTower5EndBattleText4 ; 0x4a39 TextEndBattle
- dw PokemonTower5EndBattleText4 ; 0x4a39 TextEndBattle
+ dw PokemonTower5BattleText4 ; TextBeforeBattle
+ dw PokemonTower5AfterBattleText4 ; TextAfterBattle
+ dw PokemonTower5EndBattleText4 ; TextEndBattle
+ dw PokemonTower5EndBattleText4 ; TextEndBattle
db $ff
@@ -104,7 +104,7 @@ PokemonTower5Text1: ; 609da (18:49da)
db "@"
PokemonTower5Text2: ; 609df (18:49df)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -122,7 +122,7 @@ PokemonTower5AfterBattleText1: ; 609f3 (18:49f3)
db "@"
PokemonTower5Text3: ; 609f8 (18:49f8)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower5TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -140,7 +140,7 @@ PokemonTower5AfterBattleText2: ; 60a0c (18:4a0c)
db "@"
PokemonTower5Text4: ; 60a11 (18:4a11)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower5TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -158,8 +158,8 @@ PokemonTower5AfterBattleText3: ; 60a25 (18:4a25)
db "@"
PokemonTower5Text5: ; 60a2a (18:4a2a)
- db $08 ; asm
- ld hl, PokemonTower5TrainerHeader3 ; $49cd
+ TX_ASM
+ ld hl, PokemonTower5TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/pokemontower6.asm b/scripts/pokemontower6.asm
index 58968d17..e0e75cb1 100755
--- a/scripts/pokemontower6.asm
+++ b/scripts/pokemontower6.asm
@@ -25,18 +25,18 @@ PokemonTower6Script0: ; 60b17 (18:4b17)
ld a, [wd768]
bit 7, a
jp nz, CheckFightingMapTrainers
- ld hl, CoordsData_60b45 ; $4b45
+ ld hl, CoordsData_60b45
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
ld [hJoyHeld], a
ld a, $6
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, MAROWAK
- ld [W_CUROPPONENT], a ; wd059
+ ld [W_CUROPPONENT], a
ld a, 30
- ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
+ ld [W_CURENEMYLVL], a
ld a, $4
ld [W_POKEMONTOWER6CURSCRIPT], a
ld [W_CURMAPSCRIPT], a
@@ -46,7 +46,7 @@ CoordsData_60b45: ; 60b45 (18:4b45)
db $10,$0A,$FF
PokemonTower6Script4: ; 60b48 (18:4b48)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, PokemonTower6Script_60b02
ld a, $ff
@@ -63,7 +63,7 @@ PokemonTower6Script4: ; 60b48 (18:4b48)
ld hl, wd768
set 7, [hl]
ld a, $7
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -110,57 +110,57 @@ PokemonTower6TrainerHeader0: ; 60bbf (18:4bbf)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd768 ; flag's byte
- dw PokemonTower6BattleText1 ; 0x4c29 TextBeforeBattle
- dw PokemonTower6AfterBattleText1 ; 0x4c33 TextAfterBattle
- dw PokemonTower6EndBattleText1 ; 0x4c2e TextEndBattle
- dw PokemonTower6EndBattleText1 ; 0x4c2e TextEndBattle
+ dw PokemonTower6BattleText1 ; TextBeforeBattle
+ dw PokemonTower6AfterBattleText1 ; TextAfterBattle
+ dw PokemonTower6EndBattleText1 ; TextEndBattle
+ dw PokemonTower6EndBattleText1 ; TextEndBattle
PokemonTower6TrainerHeader1: ; 60bcb (18:4bcb)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd768 ; flag's byte
- dw PokemonTower6BattleText2 ; 0x4c38 TextBeforeBattle
- dw PokemonTower6AfterBattleText2 ; 0x4c42 TextAfterBattle
- dw PokemonTower6EndBattleText2 ; 0x4c3d TextEndBattle
- dw PokemonTower6EndBattleText2 ; 0x4c3d TextEndBattle
+ dw PokemonTower6BattleText2 ; TextBeforeBattle
+ dw PokemonTower6AfterBattleText2 ; TextAfterBattle
+ dw PokemonTower6EndBattleText2 ; TextEndBattle
+ dw PokemonTower6EndBattleText2 ; TextEndBattle
PokemonTower6TrainerHeader2: ; 60bd7 (18:4bd7)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd768 ; flag's byte
- dw PokemonTower6BattleText3 ; 0x4c47 TextBeforeBattle
- dw PokemonTower6AfterBattleText3 ; 0x4c51 TextAfterBattle
- dw PokemonTower6EndBattleText3 ; 0x4c4c TextEndBattle
- dw PokemonTower6EndBattleText3 ; 0x4c4c TextEndBattle
+ dw PokemonTower6BattleText3 ; TextBeforeBattle
+ dw PokemonTower6AfterBattleText3 ; TextAfterBattle
+ dw PokemonTower6EndBattleText3 ; TextEndBattle
+ dw PokemonTower6EndBattleText3 ; TextEndBattle
db $ff
PokemonTower6Text1: ; 60be4 (18:4be4)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PokemonTower6Text2: ; 60bee (18:4bee)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower6TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
PokemonTower6Text3: ; 60bf8 (18:4bf8)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
PokemonTower6Text7: ; 60c02 (18:4c02)
- db $8
+ TX_ASM
ld hl, PokemonTower2Text_60c1f
call PrintText
ld a, MAROWAK
call PlayCry
call WaitForSoundToFinish
- ld c, $1e
+ ld c, 30
call DelayFrames
ld hl, PokemonTower2Text_60c24
call PrintText
diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm
index ab42121d..ab96fd9b 100755
--- a/scripts/pokemontower7.asm
+++ b/scripts/pokemontower7.asm
@@ -24,14 +24,14 @@ PokemonTower7ScriptPointers:
PokemonTower7Script2: ; 60d23 (18:4d23)
ld hl, wFlags_0xcd60
res 0, [hl]
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, PokemonTower7Script_60d18
call EndTrainerBattle
ld a, $f0
ld [wJoyIgnore], a
ld a, [wSpriteIndex]
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
call PokemonTower7Script_60db6
ld a, $3
@@ -69,10 +69,10 @@ PokemonTower7Script4: ; 60d86 (18:4d86)
ld a, HS_POKEMONTOWER_7_MR_FUJI
ld [wcc4d], a
predef HideObject
- ld a, $4
+ ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 9], a
ld a, LAVENDER_HOUSE_1
- ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
+ ld [H_DOWNARROWBLINKCNT1], a
ld a, $1
ld [wDestinationWarpID], a
ld a, LAVENDER_TOWN
@@ -85,16 +85,16 @@ PokemonTower7Script4: ; 60d86 (18:4d86)
ret
PokemonTower7Script_60db6: ; 60db6 (18:4db6)
- ld hl, CoordsData_60de3 ; $4de3
+ ld hl, CoordsData_60de3
ld a, [wSpriteIndex]
dec a
swap a
ld d, $0
ld e, a
add hl, de
- ld a, [W_YCOORD] ; wd361
+ ld a, [W_YCOORD]
ld b, a
- ld a, [W_XCOORD] ; wd362
+ ld a, [W_XCOORD]
ld c, a
.asm_60dcb
ld a, [hli]
@@ -107,7 +107,7 @@ PokemonTower7Script_60db6: ; 60db6 (18:4db6)
ld d, [hl]
ld e, a
ld a, [wSpriteIndex]
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp MoveSprite
.asm_60dde
inc hl
@@ -171,51 +171,51 @@ PokemonTower7TrainerHeader0: ; 60e47 (18:4e47)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd769 ; flag's byte
- dw PokemonTower7BattleText1 ; 0x4ec9 TextBeforeBattle
- dw PokemonTower7AfterBattleText1 ; 0x4ed3 TextAfterBattle
- dw PokemonTower7EndBattleText1 ; 0x4ece TextEndBattle
- dw PokemonTower7EndBattleText1 ; 0x4ece TextEndBattle
+ dw PokemonTower7BattleText1 ; TextBeforeBattle
+ dw PokemonTower7AfterBattleText1 ; TextAfterBattle
+ dw PokemonTower7EndBattleText1 ; TextEndBattle
+ dw PokemonTower7EndBattleText1 ; TextEndBattle
PokemonTower7TrainerHeader1: ; 60e53 (18:4e53)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd769 ; flag's byte
- dw PokemonTower7BattleText2 ; 0x4ed8 TextBeforeBattle
- dw PokemonTower7AfterBattleText2 ; 0x4ee2 TextAfterBattle
- dw PokemonTower7EndBattleText2 ; 0x4edd TextEndBattle
- dw PokemonTower7EndBattleText2 ; 0x4edd TextEndBattle
+ dw PokemonTower7BattleText2 ; TextBeforeBattle
+ dw PokemonTower7AfterBattleText2 ; TextAfterBattle
+ dw PokemonTower7EndBattleText2 ; TextEndBattle
+ dw PokemonTower7EndBattleText2 ; TextEndBattle
PokemonTower7TrainerHeader2: ; 60e5f (18:4e5f)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd769 ; flag's byte
- dw PokemonTower7BattleText3 ; 0x4ee7 TextBeforeBattle
- dw PokemonTower7AfterBattleText3 ; 0x4ef1 TextAfterBattle
- dw PokemonTower7EndBattleText3 ; 0x4eec TextEndBattle
- dw PokemonTower7EndBattleText3 ; 0x4eec TextEndBattle
+ dw PokemonTower7BattleText3 ; TextBeforeBattle
+ dw PokemonTower7AfterBattleText3 ; TextAfterBattle
+ dw PokemonTower7EndBattleText3 ; TextEndBattle
+ dw PokemonTower7EndBattleText3 ; TextEndBattle
db $ff
PokemonTower7Text1: ; 60e6c (18:4e6c)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower7TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
PokemonTower7Text2: ; 60e76 (18:4e76)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower7TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
PokemonTower7Text3: ; 60e80 (18:4e80)
- db $08 ; asm
+ TX_ASM
ld hl, PokemonTower7TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
PokemonTower7FujiText:
- db 8 ; asm
+ TX_ASM
ld hl, TowerRescueFujiText
call PrintText
ld hl, wd7e0
diff --git a/scripts/powerplant.asm b/scripts/powerplant.asm
index ec4f89b3..25597654 100755
--- a/scripts/powerplant.asm
+++ b/scripts/powerplant.asm
@@ -112,56 +112,56 @@ PowerPlantTrainerHeader8: ; 1e35b (7:635b)
db $ff
-asm_234cc: ; 1e368 (7:6368)
+InitVoltorbBattle: ; 1e368 (7:6368)
call TalkToTrainer
ld a, [W_CURMAPSCRIPT]
ld [W_POWERPLANTCURSCRIPT], a
jp TextScriptEnd
PowerPlantText1: ; 1e374 (7:6374)
- db $8 ; asm
- ld hl, PowerPlantTrainerHeader0 ; $62fb
- jr asm_234cc ; 0x1e378 $ee
+ TX_ASM
+ ld hl, PowerPlantTrainerHeader0
+ jr InitVoltorbBattle
PowerPlantText2: ; 1e37a (7:637a)
- db $8 ; asm
- ld hl, PowerPlantTrainerHeader1 ; $6307
- jr asm_234cc ; 0x1e37e $e8
+ TX_ASM
+ ld hl, PowerPlantTrainerHeader1
+ jr InitVoltorbBattle
PowerPlantText3: ; 1e380 (7:6380)
- db $8 ; asm
- ld hl, PowerPlantTrainerHeader2 ; $6313
- jr asm_234cc ; 0x1e384 $e2
+ TX_ASM
+ ld hl, PowerPlantTrainerHeader2
+ jr InitVoltorbBattle
PowerPlantText4: ; 1e386 (7:6386)
- db $8 ; asm
- ld hl, PowerPlantTrainerHeader3 ; $631f
- jr asm_234cc ; 0x1e38a $dc
+ TX_ASM
+ ld hl, PowerPlantTrainerHeader3
+ jr InitVoltorbBattle
PowerPlantText5: ; 1e38c (7:638c)
- db $8 ; asm
- ld hl, PowerPlantTrainerHeader4 ; $632b
- jr asm_234cc ; 0x1e390 $d6
+ TX_ASM
+ ld hl, PowerPlantTrainerHeader4
+ jr InitVoltorbBattle
PowerPlantText6: ; 1e392 (7:6392)
- db $8 ; asm
- ld hl, PowerPlantTrainerHeader5 ; $6337
- jr asm_234cc ; 0x1e396 $d0
+ TX_ASM
+ ld hl, PowerPlantTrainerHeader5
+ jr InitVoltorbBattle
PowerPlantText7: ; 1e398 (7:6398)
- db $8 ; asm
- ld hl, PowerPlantTrainerHeader6 ; $6343
- jr asm_234cc ; 0x1e39c $ca
+ TX_ASM
+ ld hl, PowerPlantTrainerHeader6
+ jr InitVoltorbBattle
PowerPlantText8: ; 1e39e (7:639e)
- db $8 ; asm
- ld hl, PowerPlantTrainerHeader7 ; $634f
- jr asm_234cc ; 0x1e3a2 $c4
+ TX_ASM
+ ld hl, PowerPlantTrainerHeader7
+ jr InitVoltorbBattle
PowerPlantText9: ; 1e3a4 (7:63a4)
- db $8 ; asm
- ld hl, PowerPlantTrainerHeader8 ; $635b
- jr asm_234cc ; 0x1e3a8 $be
+ TX_ASM
+ ld hl, PowerPlantTrainerHeader8
+ jr InitVoltorbBattle
VoltorbBattleText: ; 1e3aa (7:63aa)
TX_FAR _VoltorbBattleText
@@ -169,7 +169,7 @@ VoltorbBattleText: ; 1e3aa (7:63aa)
ZapdosBattleText: ; 1e3af (7:63af)
TX_FAR _ZapdosBattleText
- db $8
+ TX_ASM
ld a, ZAPDOS
call PlayCry
call WaitForSoundToFinish
diff --git a/scripts/redshouse1f.asm b/scripts/redshouse1f.asm
index 7b3f1f87..0f5251b8 100755
--- a/scripts/redshouse1f.asm
+++ b/scripts/redshouse1f.asm
@@ -6,7 +6,7 @@ RedsHouse1FTextPointers: ; 4816b (12:416b)
dw RedsHouse1FText2
RedsHouse1FText1: ; 4816f (12:416f) ; 416F Mom
- db 8
+ TX_ASM
ld a, [wd72e]
bit 3, a
jr nz, .heal ; if player has received a Pokémon from Oak, heal team
@@ -30,7 +30,7 @@ MomHealPokemon: ; 4818a (12:418a)
predef HealParty
ld a, MUSIC_PKMN_HEALED
ld [wc0ee], a
- call PlaySound ; play sound?
+ call PlaySound
.next
ld a, [wc026]
cp MUSIC_PKMN_HEALED
@@ -50,13 +50,13 @@ MomHealText2: ; 481c1 (12:41c1)
db "@"
RedsHouse1FText2: ; 0x481c6 TV
- db 8
+ TX_ASM
ld a,[wSpriteStateData1 + 9]
- cp 4
+ cp SPRITE_FACING_UP
ld hl,TVWrongSideText
- jr nz,.done ; if player is not facing up
+ jr nz,.notUp
ld hl,StandByMeText
-.done
+.notUp
call PrintText
jp TextScriptEnd
diff --git a/scripts/rockethideout1.asm b/scripts/rockethideout1.asm
index 499f77ef..fe5a47e6 100755
--- a/scripts/rockethideout1.asm
+++ b/scripts/rockethideout1.asm
@@ -51,82 +51,82 @@ RocketHideout1TrainerHeader0: ; 44c22 (11:4c22)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd815 ; flag's byte
- dw RocketHideout1BattleText2 ; 0x4ca1 TextBeforeBattle
- dw RocketHideout1AfterBattleTxt2 ; 0x4cab TextAfterBattle
- dw RocketHideout1EndBattleText2 ; 0x4ca6 TextEndBattle
- dw RocketHideout1EndBattleText2 ; 0x4ca6 TextEndBattle
+ dw RocketHideout1BattleText2 ; TextBeforeBattle
+ dw RocketHideout1AfterBattleTxt2 ; TextAfterBattle
+ dw RocketHideout1EndBattleText2 ; TextEndBattle
+ dw RocketHideout1EndBattleText2 ; TextEndBattle
RocketHideout1TrainerHeader2: ; 44c2e (11:4c2e)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd815 ; flag's byte
- dw RocketHideout1BattleText3 ; 0x4cb0 TextBeforeBattle
- dw RocketHideout1AfterBattleTxt3 ; 0x4cba TextAfterBattle
- dw RocketHideout1EndBattleText3 ; 0x4cb5 TextEndBattle
- dw RocketHideout1EndBattleText3 ; 0x4cb5 TextEndBattle
+ dw RocketHideout1BattleText3 ; TextBeforeBattle
+ dw RocketHideout1AfterBattleTxt3 ; TextAfterBattle
+ dw RocketHideout1EndBattleText3 ; TextEndBattle
+ dw RocketHideout1EndBattleText3 ; TextEndBattle
RocketHideout1TrainerHeader3: ; 44c3a (11:4c3a)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd815 ; flag's byte
- dw RocketHideout1BattleText4 ; 0x4cbf TextBeforeBattle
- dw RocketHideout1AfterBattleTxt4 ; 0x4cc9 TextAfterBattle
- dw RocketHideout1EndBattleText4 ; 0x4cc4 TextEndBattle
- dw RocketHideout1EndBattleText4 ; 0x4cc4 TextEndBattle
+ dw RocketHideout1BattleText4 ; TextBeforeBattle
+ dw RocketHideout1AfterBattleTxt4 ; TextAfterBattle
+ dw RocketHideout1EndBattleText4 ; TextEndBattle
+ dw RocketHideout1EndBattleText4 ; TextEndBattle
RocketHideout1TrainerHeader4: ; 44c46 (11:4c46)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd815 ; flag's byte
- dw RocketHideout1BattleText5 ; 0x4cce TextBeforeBattle
- dw RocketHideout1AfterBattleTxt5 ; 0x4cd8 TextAfterBattle
- dw RocketHideout1EndBattleText5 ; 0x4cd3 TextEndBattle
- dw RocketHideout1EndBattleText5 ; 0x4cd3 TextEndBattle
+ dw RocketHideout1BattleText5 ; TextBeforeBattle
+ dw RocketHideout1AfterBattleTxt5 ; TextAfterBattle
+ dw RocketHideout1EndBattleText5 ; TextEndBattle
+ dw RocketHideout1EndBattleText5 ; TextEndBattle
RocketHideout1TrainerHeader5: ; 44c52 (11:4c52)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd815 ; flag's byte
- dw RocketHideout1BattleText6 ; 0x4cdd TextBeforeBattle
- dw RocketHideout1AfterBattleTxt6 ; 0x4ce2 TextAfterBattle
- dw RocketHideout1EndBattleText6 ; 0x4c91 TextEndBattle
- dw RocketHideout1EndBattleText6 ; 0x4c91 TextEndBattle
+ dw RocketHideout1BattleText6 ; TextBeforeBattle
+ dw RocketHideout1AfterBattleTxt6 ; TextAfterBattle
+ dw RocketHideout1EndBattleText6 ; TextEndBattle
+ dw RocketHideout1EndBattleText6 ; TextEndBattle
db $ff
RocketHideout1Text1: ; 44c5f (11:4c5f)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text2: ; 44c69 (11:4c69)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout1TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text3: ; 44c73 (11:4c73)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout1TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text4: ; 44c7d (11:4c7d)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout1TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text5: ; 44c87 (11:4c87)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout1TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
RocketHideout1EndBattleText6: ; 44c91 (11:4c91)
TX_FAR _RocketHideout1EndBattleText6
- db $8
+ TX_ASM
ld hl, wd815
set 5, [hl]
ld hl, RocketHideout1Text_44c9f
diff --git a/scripts/rockethideout2.asm b/scripts/rockethideout2.asm
index 99754658..04e2c5d3 100755
--- a/scripts/rockethideout2.asm
+++ b/scripts/rockethideout2.asm
@@ -321,17 +321,17 @@ LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7)
ld a, [wSpriteStateData1 + 2]
srl a
srl a
- ld hl, SpinnerPlayerFacingDirections ; $5083
+ ld hl, SpinnerPlayerFacingDirections
ld c, a
ld b, $0
add hl, bc
ld a, [hl]
ld [wSpriteStateData1 + 2], a
- ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET
+ ld a, [W_CURMAPTILESET]
cp FACILITY
- ld hl, FacilitySpinnerArrows ; $5023
+ ld hl, FacilitySpinnerArrows
jr z, .asm_44ff6
- ld hl, GymSpinnerArrows ; $5053
+ ld hl, GymSpinnerArrows
.asm_44ff6
ld a, [wSimulatedJoypadStatesIndex]
bit 0, a
@@ -429,15 +429,15 @@ RocketHideout2TrainerHeader0: ; 450d1 (11:50d1)
db $1 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd817 ; flag's byte
- dw RocketHideout2BattleText2 ; 0x50e8 TextBeforeBattle
- dw RocketHideout2AfterBattleTxt2 ; 0x50f2 TextAfterBattle
- dw RocketHideout2EndBattleText2 ; 0x50ed TextEndBattle
- dw RocketHideout2EndBattleText2 ; 0x50ed TextEndBattle
+ dw RocketHideout2BattleText2 ; TextBeforeBattle
+ dw RocketHideout2AfterBattleTxt2 ; TextAfterBattle
+ dw RocketHideout2EndBattleText2 ; TextEndBattle
+ dw RocketHideout2EndBattleText2 ; TextEndBattle
db $ff
RocketHideout2Text1: ; 450de (11:50de)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/rockethideout3.asm b/scripts/rockethideout3.asm
index 6dc467ab..e7a7b63b 100755
--- a/scripts/rockethideout3.asm
+++ b/scripts/rockethideout3.asm
@@ -135,7 +135,7 @@ RocketHideout3ArrowMovement12: ; 452e1 (11:52e1)
db $40,$01
db $FF
-RocketHideout3Script3 ; 452e4 (11:452e4)
+RocketHideout3Script3: ; 452e4 (11:452e4)
ld a, [wSimulatedJoypadStatesIndex]
and a
jp nz, LoadSpinnerArrowTiles
@@ -158,24 +158,24 @@ RocketHideout3TrainerHeader0: ; 45302 (11:5302)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd819 ; flag's byte
- dw RocketHideout3BattleText2 ; 0x5325 TextBeforeBattle
- dw RocketHideout3AfterBattleTxt2 ; 0x532f TextAfterBattle
- dw RocketHideout3EndBattleText2 ; 0x532a TextEndBattle
- dw RocketHideout3EndBattleText2 ; 0x532a TextEndBattle
+ dw RocketHideout3BattleText2 ; TextBeforeBattle
+ dw RocketHideout3AfterBattleTxt2 ; TextAfterBattle
+ dw RocketHideout3EndBattleText2 ; TextEndBattle
+ dw RocketHideout3EndBattleText2 ; TextEndBattle
RocketHideout3TrainerHeader2: ; 4530e (11:530e)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd819 ; flag's byte
- dw RocketHideout3BattleTxt ; 0x533e TextBeforeBattle
- dw RocketHideout3AfterBattleText3 ; 0x5348 TextAfterBattle
- dw RocketHideout3EndBattleText3 ; 0x5343 TextEndBattle
- dw RocketHideout3EndBattleText3 ; 0x5343 TextEndBattle
+ dw RocketHideout3BattleTxt ; TextBeforeBattle
+ dw RocketHideout3AfterBattleText3 ; TextAfterBattle
+ dw RocketHideout3EndBattleText3 ; TextEndBattle
+ dw RocketHideout3EndBattleText3 ; TextEndBattle
db $ff
RocketHideout3Text1: ; 4531b (11:531b)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -193,7 +193,7 @@ RocketHideout3AfterBattleTxt2: ; 4532f (11:532f)
db "@"
RocketHideout3Text2: ; 45334 (11:5334)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm
index f1b46653..613e2476 100755
--- a/scripts/rockethideout4.asm
+++ b/scripts/rockethideout4.asm
@@ -93,33 +93,33 @@ RocketHideout4TrainerHeader0: ; 45515 (11:5515)
db $2 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd81b ; flag's byte
- dw RocketHideout4BattleText2 ; 0x5593 TextBeforeBattle
- dw RocketHideout4AfterBattleText2 ; 0x559d TextAfterBattle
- dw RocketHideout4EndBattleText2 ; 0x5598 TextEndBattle
- dw RocketHideout4EndBattleText2 ; 0x5598 TextEndBattle
+ dw RocketHideout4BattleText2 ; TextBeforeBattle
+ dw RocketHideout4AfterBattleText2 ; TextAfterBattle
+ dw RocketHideout4EndBattleText2 ; TextEndBattle
+ dw RocketHideout4EndBattleText2 ; TextEndBattle
RocketHideout4TrainerHeader2: ; 45521 (11:5521)
db $3 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd81b ; flag's byte
- dw RocketHideout4BattleText3 ; 0x55ac TextBeforeBattle
- dw RocketHideout4AfterBattleText3 ; 0x55b6 TextAfterBattle
- dw RocketHideout4EndBattleText3 ; 0x55b1 TextEndBattle
- dw RocketHideout4EndBattleText3 ; 0x55b1 TextEndBattle
+ dw RocketHideout4BattleText3 ; TextBeforeBattle
+ dw RocketHideout4AfterBattleText3 ; TextAfterBattle
+ dw RocketHideout4EndBattleText3 ; TextEndBattle
+ dw RocketHideout4EndBattleText3 ; TextEndBattle
RocketHideout4TrainerHeader3: ; 4552d (11:552d)
db $4 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd81b ; flag's byte
- dw RocketHideout4BattleText4 ; 0x55c5 TextBeforeBattle
- dw RocketHideout4AfterBattleText4 ; 0x55cf TextAfterBattle
- dw RocketHideout4EndBattleText4 ; 0x55ca TextEndBattle
- dw RocketHideout4EndBattleText4 ; 0x55ca TextEndBattle
+ dw RocketHideout4BattleText4 ; TextBeforeBattle
+ dw RocketHideout4AfterBattleText4 ; TextAfterBattle
+ dw RocketHideout4EndBattleText4 ; TextEndBattle
+ dw RocketHideout4EndBattleText4 ; TextEndBattle
db $ff
RocketHideout4Text1: ; 4553a (11:553a)
- db $08 ; asm
+ TX_ASM
ld a, [wd81b]
bit 7, a
jp nz, .asm_545571
@@ -131,20 +131,20 @@ RocketHideout4Text1: ; 4553a (11:553a)
ld hl, RocketHideout4Text_4557f
ld de, RocketHideout4Text_4557f
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
xor a
- ldh [$b4], a
+ ld [hJoyHeld], a
ld a, $3
ld [W_ROCKETHIDEOUT4CURSCRIPT], a
ld [W_CURMAPSCRIPT], a
- jr .asm_209f0 ; 0x4556f
+ jr .asm_209f0
.asm_545571
ld hl, RocketHideout4Text10
call PrintText
-.asm_209f0 ; 0x45577
+.asm_209f0
jp TextScriptEnd
RocketHideout4Text_4557a: ; 4557a (11:557a)
@@ -160,7 +160,7 @@ RocketHideout4Text10: ; 45584 (11:5584)
db "@"
RocketHideout4Text2: ; 45589 (11:5589)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -178,7 +178,7 @@ RocketHideout4AfterBattleText2: ; 4559d (11:559d)
db "@"
RocketHideout4Text3: ; 455a2 (11:55a2)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout4TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -196,7 +196,7 @@ RocketHideout4AfterBattleText3: ; 455b6 (11:55b6)
db "@"
RocketHideout4Text4: ; 455bb (11:55bb)
- db $08 ; asm
+ TX_ASM
ld hl, RocketHideout4TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -210,13 +210,13 @@ RocketHideout4EndBattleText4: ; 455ca (11:55ca)
db "@"
RocketHideout4AfterBattleText4: ; 455cf (11:55cf)
- db $8
- ld hl, RocketHideout4Text_455ec ; $55ec
+ TX_ASM
+ ld hl, RocketHideout4Text_455ec
call PrintText
ld hl, wd81b
bit 6, [hl]
set 6, [hl]
- jr nz, .asm_455e9 ; 0x455dd $a
+ jr nz, .asm_455e9
ld a, HS_ROCKET_HIDEOUT_4_ITEM_5
ld [wcc4d], a
predef ShowObject
diff --git a/scripts/rockethideoutelevator.asm b/scripts/rockethideoutelevator.asm
index e7bc24f3..169b536b 100755
--- a/scripts/rockethideoutelevator.asm
+++ b/scripts/rockethideoutelevator.asm
@@ -32,9 +32,9 @@ RocketHideoutElevatorScript_4573a: ; 4573a (11:573a)
ret
RocketHideoutElevatorScript_45741: ; 45741 (11:5741)
- ld hl, RocketHideoutElavatorFloors ; $5754
+ ld hl, RocketHideoutElavatorFloors
call LoadItemList
- ld hl, RocketHideoutElevatorWarpMaps ; $5759
+ ld hl, RocketHideoutElevatorWarpMaps
ld de, wcc5b
ld bc, $0006
call CopyData
@@ -62,20 +62,20 @@ RocketHideoutElevatorTextPointers: ; 4576b (11:576b)
dw RocketHideoutElevatorText1
RocketHideoutElevatorText1: ; 4576d (11:576d)
- db $08 ; asm
+ TX_ASM
ld b, LIFT_KEY
call IsItemInBag
- jr z, .asm_8d8f0 ; 0x45773
+ jr z, .asm_45782
call RocketHideoutElevatorScript_45741
- ld hl, RocketHideoutElevatorWarpMaps ; $5759
+ ld hl, RocketHideoutElevatorWarpMaps
predef Func_1c9c6
- jr .asm_46c43 ; 0x45780
-.asm_8d8f0 ; 0x45782
+ jr .asm_45788
+.asm_45782
ld hl, RocketHideoutElevatorText_4578b
call PrintText
-.asm_46c43 ; 0x45788
+.asm_45788
jp TextScriptEnd
RocketHideoutElevatorText_4578b: ; 4578b (11:578b)
- TX_FAR _RocketElevatorText_4578b ; 0x82438
+ TX_FAR _RocketElevatorText_4578b
db $d, "@"
diff --git a/scripts/rocktunnel1.asm b/scripts/rocktunnel1.asm
index 1d514a05..72881e65 100755
--- a/scripts/rocktunnel1.asm
+++ b/scripts/rocktunnel1.asm
@@ -27,101 +27,101 @@ RockTunnel1TrainerHeader1: ; 44505 (11:4505)
db $1 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte
- dw RockTunnel1BattleText1 ; 0x4588 TextBeforeBattle
- dw RockTunnel1AfterBattleText1 ; 0x4592 TextAfterBattle
- dw RockTunnel1EndBattleText1 ; 0x458d TextEndBattle
- dw RockTunnel1EndBattleText1 ; 0x458d TextEndBattle
+ dw RockTunnel1BattleText1 ; TextBeforeBattle
+ dw RockTunnel1AfterBattleText1 ; TextAfterBattle
+ dw RockTunnel1EndBattleText1 ; TextEndBattle
+ dw RockTunnel1EndBattleText1 ; TextEndBattle
RockTunnel1TrainerHeader2: ; 44511 (11:4511)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte
- dw RockTunnel1BattleText2 ; 0x4597 TextBeforeBattle
- dw RockTunnel1AfterBattleText2 ; 0x45a1 TextAfterBattle
- dw RockTunnel1EndBattleText2 ; 0x459c TextEndBattle
- dw RockTunnel1EndBattleText2 ; 0x459c TextEndBattle
+ dw RockTunnel1BattleText2 ; TextBeforeBattle
+ dw RockTunnel1AfterBattleText2 ; TextAfterBattle
+ dw RockTunnel1EndBattleText2 ; TextEndBattle
+ dw RockTunnel1EndBattleText2 ; TextEndBattle
RockTunnel1TrainerHeader3: ; 4451d (11:451d)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d2 ; flag's byte
- dw RockTunnel1BattleText3 ; 0x45a6 TextBeforeBattle
- dw RockTunnel1AfterBattleText3 ; 0x45b0 TextAfterBattle
- dw RockTunnel1EndBattleText3 ; 0x45ab TextEndBattle
- dw RockTunnel1EndBattleText3 ; 0x45ab TextEndBattle
+ dw RockTunnel1BattleText3 ; TextBeforeBattle
+ dw RockTunnel1AfterBattleText3 ; TextAfterBattle
+ dw RockTunnel1EndBattleText3 ; TextEndBattle
+ dw RockTunnel1EndBattleText3 ; TextEndBattle
RockTunnel1TrainerHeader4: ; 44529 (11:4529)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d2 ; flag's byte
- dw RockTunnel1BattleText4 ; 0x45b5 TextBeforeBattle
- dw RockTunnel1AfterBattleText4 ; 0x45bf TextAfterBattle
- dw RockTunnel1EndBattleText4 ; 0x45ba TextEndBattle
- dw RockTunnel1EndBattleText4 ; 0x45ba TextEndBattle
+ dw RockTunnel1BattleText4 ; TextBeforeBattle
+ dw RockTunnel1AfterBattleText4 ; TextAfterBattle
+ dw RockTunnel1EndBattleText4 ; TextEndBattle
+ dw RockTunnel1EndBattleText4 ; TextEndBattle
RockTunnel1TrainerHeader5: ; 44535 (11:4535)
db $5 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte
- dw RockTunnel1BattleText5 ; 0x45c4 TextBeforeBattle
- dw RockTunnel1AfterBattleText5 ; 0x45ce TextAfterBattle
- dw RockTunnel1EndBattleText5 ; 0x45c9 TextEndBattle
- dw RockTunnel1EndBattleText5 ; 0x45c9 TextEndBattle
+ dw RockTunnel1BattleText5 ; TextBeforeBattle
+ dw RockTunnel1AfterBattleText5 ; TextAfterBattle
+ dw RockTunnel1EndBattleText5 ; TextEndBattle
+ dw RockTunnel1EndBattleText5 ; TextEndBattle
RockTunnel1TrainerHeader6: ; 44541 (11:4541)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte
- dw RockTunnel1BattleText6 ; 0x45d3 TextBeforeBattle
- dw RockTunnel1AfterBattleText6 ; 0x45dd TextAfterBattle
- dw RockTunnel1EndBattleText6 ; 0x45d8 TextEndBattle
- dw RockTunnel1EndBattleText6 ; 0x45d8 TextEndBattle
+ dw RockTunnel1BattleText6 ; TextBeforeBattle
+ dw RockTunnel1AfterBattleText6 ; TextAfterBattle
+ dw RockTunnel1EndBattleText6 ; TextEndBattle
+ dw RockTunnel1EndBattleText6 ; TextEndBattle
RockTunnel1TrainerHeader7: ; 4454d (11:454d)
db $7 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d2 ; flag's byte
- dw RockTunnel1BattleText7 ; 0x45e2 TextBeforeBattle
- dw RockTunnel1AfterBattleText7 ; 0x45ec TextAfterBattle
- dw RockTunnel1EndBattleText7 ; 0x45e7 TextEndBattle
- dw RockTunnel1EndBattleText7 ; 0x45e7 TextEndBattle
+ dw RockTunnel1BattleText7 ; TextBeforeBattle
+ dw RockTunnel1AfterBattleText7 ; TextAfterBattle
+ dw RockTunnel1EndBattleText7 ; TextEndBattle
+ dw RockTunnel1EndBattleText7 ; TextEndBattle
db $ff
RockTunnel1Text1: ; 4455a (11:455a)
- db $8
- ld hl, RockTunnel1TrainerHeader1 ; $4505
- jr asm_0c916 ; 0x4455e $22
+ TX_ASM
+ ld hl, RockTunnel1TrainerHeader1
+ jr RockTunnel1TalkToTrainer
RockTunnel1Text2: ; 44560 (11:4560)
- db $8
- ld hl, RockTunnel1TrainerHeader2 ; $4511
- jr asm_0c916 ; 0x44564 $1c
+ TX_ASM
+ ld hl, RockTunnel1TrainerHeader2
+ jr RockTunnel1TalkToTrainer
RockTunnel1Text3: ; 44566 (11:4566)
- db $8
- ld hl, RockTunnel1TrainerHeader3 ; $451d
- jr asm_0c916 ; 0x4456a $16
+ TX_ASM
+ ld hl, RockTunnel1TrainerHeader3
+ jr RockTunnel1TalkToTrainer
RockTunnel1Text4: ; 4456c (11:456c)
- db $8
- ld hl, RockTunnel1TrainerHeader4 ; $4529
- jr asm_0c916 ; 0x44570 $10
+ TX_ASM
+ ld hl, RockTunnel1TrainerHeader4
+ jr RockTunnel1TalkToTrainer
RockTunnel1Text5: ; 44572 (11:4572)
- db $8
- ld hl, RockTunnel1TrainerHeader5 ; $4535
- jr asm_0c916 ; 0x44576 $a
+ TX_ASM
+ ld hl, RockTunnel1TrainerHeader5
+ jr RockTunnel1TalkToTrainer
RockTunnel1Text6: ; 44578 (11:4578)
- db $8
- ld hl, RockTunnel1TrainerHeader6 ; $4541
- jr asm_0c916 ; 0x4457c $4
+ TX_ASM
+ ld hl, RockTunnel1TrainerHeader6
+ jr RockTunnel1TalkToTrainer
RockTunnel1Text7: ; 4457e (11:457e)
- db $8
- ld hl, RockTunnel1TrainerHeader7 ; $454d
-asm_0c916: ; 44582 (11:4582)
+ TX_ASM
+ ld hl, RockTunnel1TrainerHeader7
+RockTunnel1TalkToTrainer: ; 44582 (11:4582)
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/rocktunnel2.asm b/scripts/rocktunnel2.asm
index 98b804a7..832a244f 100755
--- a/scripts/rocktunnel2.asm
+++ b/scripts/rocktunnel2.asm
@@ -27,120 +27,120 @@ RockTunnel2TrainerHeader0: ; 46014 (11:6014)
db $1 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd87d ; flag's byte
- dw RockTunnel2BattleText2 ; 0x60c5 TextBeforeBattle
- dw RockTunnel2AfterBattleText2 ; 0x60cf TextAfterBattle
- dw RockTunnel2EndBattleText2 ; 0x60ca TextEndBattle
- dw RockTunnel2EndBattleText2 ; 0x60ca TextEndBattle
+ dw RockTunnel2BattleText2 ; TextBeforeBattle
+ dw RockTunnel2AfterBattleText2 ; TextAfterBattle
+ dw RockTunnel2EndBattleText2 ; TextEndBattle
+ dw RockTunnel2EndBattleText2 ; TextEndBattle
RockTunnel2TrainerHeader2: ; 46020 (11:6020)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte
- dw RockTunnel2BattleText3 ; 0x60d4 TextBeforeBattle
- dw RockTunnel2AfterBattleText3 ; 0x60de TextAfterBattle
- dw RockTunnel2EndBattleText3 ; 0x60d9 TextEndBattle
- dw RockTunnel2EndBattleText3 ; 0x60d9 TextEndBattle
+ dw RockTunnel2BattleText3 ; TextBeforeBattle
+ dw RockTunnel2AfterBattleText3 ; TextAfterBattle
+ dw RockTunnel2EndBattleText3 ; TextEndBattle
+ dw RockTunnel2EndBattleText3 ; TextEndBattle
RockTunnel2TrainerHeader3: ; 4602c (11:602c)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte
- dw RockTunnel2BattleText4 ; 0x60e3 TextBeforeBattle
- dw RockTunnel2AfterBattleText4 ; 0x60ed TextAfterBattle
- dw RockTunnel2EndBattleText4 ; 0x60e8 TextEndBattle
- dw RockTunnel2EndBattleText4 ; 0x60e8 TextEndBattle
+ dw RockTunnel2BattleText4 ; TextBeforeBattle
+ dw RockTunnel2AfterBattleText4 ; TextAfterBattle
+ dw RockTunnel2EndBattleText4 ; TextEndBattle
+ dw RockTunnel2EndBattleText4 ; TextEndBattle
RockTunnel2TrainerHeader4: ; 46038 (11:6038)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd87d ; flag's byte
- dw RockTunnel2BattleText5 ; 0x60f2 TextBeforeBattle
- dw RockTunnel2AfterBattleText5 ; 0x60fc TextAfterBattle
- dw RockTunnel2EndBattleText5 ; 0x60f7 TextEndBattle
- dw RockTunnel2EndBattleText5 ; 0x60f7 TextEndBattle
+ dw RockTunnel2BattleText5 ; TextBeforeBattle
+ dw RockTunnel2AfterBattleText5 ; TextAfterBattle
+ dw RockTunnel2EndBattleText5 ; TextEndBattle
+ dw RockTunnel2EndBattleText5 ; TextEndBattle
RockTunnel2TrainerHeader5: ; 46044 (11:6044)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte
- dw RockTunnel2BattleText6 ; 0x6101 TextBeforeBattle
- dw RockTunnel2AfterBattleText6 ; 0x610b TextAfterBattle
- dw RockTunnel2EndBattleText6 ; 0x6106 TextEndBattle
- dw RockTunnel2EndBattleText6 ; 0x6106 TextEndBattle
+ dw RockTunnel2BattleText6 ; TextBeforeBattle
+ dw RockTunnel2AfterBattleText6 ; TextAfterBattle
+ dw RockTunnel2EndBattleText6 ; TextEndBattle
+ dw RockTunnel2EndBattleText6 ; TextEndBattle
RockTunnel2TrainerHeader6: ; 46050 (11:6050)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd87d ; flag's byte
- dw RockTunnel2BattleText7 ; 0x6110 TextBeforeBattle
- dw RockTunnel2AfterBattleText7 ; 0x611a TextAfterBattle
- dw RockTunnel2EndBattleText7 ; 0x6115 TextEndBattle
- dw RockTunnel2EndBattleText7 ; 0x6115 TextEndBattle
+ dw RockTunnel2BattleText7 ; TextBeforeBattle
+ dw RockTunnel2AfterBattleText7 ; TextAfterBattle
+ dw RockTunnel2EndBattleText7 ; TextEndBattle
+ dw RockTunnel2EndBattleText7 ; TextEndBattle
RockTunnel2TrainerHeader7: ; 4605c (11:605c)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte
- dw RockTunnel2BattleText8 ; 0x611f TextBeforeBattle
- dw RockTunnel2AfterBattleText8 ; 0x6129 TextAfterBattle
- dw RockTunnel2EndBattleText8 ; 0x6124 TextEndBattle
- dw RockTunnel2EndBattleText8 ; 0x6124 TextEndBattle
+ dw RockTunnel2BattleText8 ; TextBeforeBattle
+ dw RockTunnel2AfterBattleText8 ; TextAfterBattle
+ dw RockTunnel2EndBattleText8 ; TextEndBattle
+ dw RockTunnel2EndBattleText8 ; TextEndBattle
RockTunnel2TrainerHeader8: ; 46068 (11:6068)
db $8 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd87d ; flag's byte
- dw RockTunnel2BattleText9 ; 0x612e TextBeforeBattle
- dw RockTunnel2AfterBattleText9 ; 0x6138 TextAfterBattle
- dw RockTunnel2EndBattleText9 ; 0x6133 TextEndBattle
- dw RockTunnel2EndBattleText9 ; 0x6133 TextEndBattle
+ dw RockTunnel2BattleText9 ; TextBeforeBattle
+ dw RockTunnel2AfterBattleText9 ; TextAfterBattle
+ dw RockTunnel2EndBattleText9 ; TextEndBattle
+ dw RockTunnel2EndBattleText9 ; TextEndBattle
db $ff
RockTunnel2Text1: ; 46075 (11:6075)
- db $08 ; asm
+ TX_ASM
ld hl, RockTunnel2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text2: ; 4607f (11:607f)
- db $08 ; asm
+ TX_ASM
ld hl, RockTunnel2TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text3: ; 46089 (11:6089)
- db $08 ; asm
+ TX_ASM
ld hl, RockTunnel2TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text4: ; 46093 (11:6093)
- db $08 ; asm
+ TX_ASM
ld hl, RockTunnel2TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text5: ; 4609d (11:609d)
- db $08 ; asm
+ TX_ASM
ld hl, RockTunnel2TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text6: ; 460a7 (11:60a7)
- db $08 ; asm
+ TX_ASM
ld hl, RockTunnel2TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text7: ; 460b1 (11:60b1)
- db $08 ; asm
+ TX_ASM
ld hl, RockTunnel2TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
RockTunnel2Text8: ; 460bb (11:60bb)
- db $08 ; asm
+ TX_ASM
ld hl, RockTunnel2TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route1.asm b/scripts/route1.asm
index 189b987b..74ac9605 100755
--- a/scripts/route1.asm
+++ b/scripts/route1.asm
@@ -7,24 +7,24 @@ Route1TextPointers: ; 1cab2 (7:4ab2)
dw Route1Text3
Route1Text1: ; 1cab8 (7:4ab8)
- db $08 ; asm
+ TX_ASM
ld hl, wd7bf
bit 0, [hl]
set 0, [hl]
- jr nz, .asm_02840 ; 0x1cac0
+ jr nz, .asm_1cada
ld hl, Route1ViridianMartSampleText
call PrintText
ld bc, (POTION << 8) | 1
call GiveItem
jr nc, .BagFull
- ld hl, Route1Text_1cae8 ; $4ae8
- jr .asm_46d43 ; 0x1cad3
+ ld hl, Route1Text_1cae8
+ jr .asm_1cadd
.BagFull
- ld hl, Route1Text_1caf3 ; $4af3
- jr .asm_46d43 ; 0x1cad8
-.asm_02840 ; 0x1cada
- ld hl, Route1Text_1caee ; $4aee
-.asm_46d43 ; 0x1cadd
+ ld hl, Route1Text_1caf3
+ jr .asm_1cadd
+.asm_1cada
+ ld hl, Route1Text_1caee
+.asm_1cadd
call PrintText
jp TextScriptEnd
diff --git a/scripts/route10.asm b/scripts/route10.asm
index c587b1df..fbc3b01a 100755
--- a/scripts/route10.asm
+++ b/scripts/route10.asm
@@ -29,60 +29,60 @@ Route10TrainerHeader0: ; 59363 (16:5363)
db $1 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d1 ; flag's byte
- dw Route10BattleText1 ; 0x53b6 TextBeforeBattle
- dw Route10AfterBattleText1 ; 0x53c0 TextAfterBattle
- dw Route10EndBattleText1 ; 0x53bb TextEndBattle
- dw Route10EndBattleText1 ; 0x53bb TextEndBattle
+ dw Route10BattleText1 ; TextBeforeBattle
+ dw Route10AfterBattleText1 ; TextAfterBattle
+ dw Route10EndBattleText1 ; TextEndBattle
+ dw Route10EndBattleText1 ; TextEndBattle
Route10TrainerHeader1: ; 5936f (16:536f)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d1 ; flag's byte
- dw Route10BattleText2 ; 0x53cf TextBeforeBattle
- dw Route10AfterBattleText2 ; 0x53d9 TextAfterBattle
- dw Route10EndBattleText2 ; 0x53d4 TextEndBattle
- dw Route10EndBattleText2 ; 0x53d4 TextEndBattle
+ dw Route10BattleText2 ; TextBeforeBattle
+ dw Route10AfterBattleText2 ; TextAfterBattle
+ dw Route10EndBattleText2 ; TextEndBattle
+ dw Route10EndBattleText2 ; TextEndBattle
Route10TrainerHeader2: ; 5937b (16:537b)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d1 ; flag's byte
- dw Route10BattleText3 ; 0x53e8 TextBeforeBattle
- dw Route10AfterBattleText3 ; 0x53f2 TextAfterBattle
- dw Route10EndBattleText3 ; 0x53ed TextEndBattle
- dw Route10EndBattleText3 ; 0x53ed TextEndBattle
+ dw Route10BattleText3 ; TextBeforeBattle
+ dw Route10AfterBattleText3 ; TextAfterBattle
+ dw Route10EndBattleText3 ; TextEndBattle
+ dw Route10EndBattleText3 ; TextEndBattle
Route10TrainerHeader3: ; 59387 (16:5387)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d1 ; flag's byte
- dw Route10BattleText4 ; 0x5401 TextBeforeBattle
- dw Route10AfterBattleText4 ; 0x540b TextAfterBattle
- dw Route10EndBattleText4 ; 0x5406 TextEndBattle
- dw Route10EndBattleText4 ; 0x5406 TextEndBattle
+ dw Route10BattleText4 ; TextBeforeBattle
+ dw Route10AfterBattleText4 ; TextAfterBattle
+ dw Route10EndBattleText4 ; TextEndBattle
+ dw Route10EndBattleText4 ; TextEndBattle
Route10TrainerHeader4: ; 59393 (16:5393)
db $5 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d1 ; flag's byte
- dw Route10BattleText5 ; 0x541a TextBeforeBattle
- dw Route10AfterBattleText5 ; 0x5424 TextAfterBattle
- dw Route10EndBattleText5 ; 0x541f TextEndBattle
- dw Route10EndBattleText5 ; 0x541f TextEndBattle
+ dw Route10BattleText5 ; TextBeforeBattle
+ dw Route10AfterBattleText5 ; TextAfterBattle
+ dw Route10EndBattleText5 ; TextEndBattle
+ dw Route10EndBattleText5 ; TextEndBattle
Route10TrainerHeader5: ; 5939f (16:539f)
db $6 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d1 ; flag's byte
- dw Route10BattleText6 ; 0x5433 TextBeforeBattle
- dw Route10AfterBattleText6 ; 0x543d TextAfterBattle
- dw Route10EndBattleText6 ; 0x5438 TextEndBattle
- dw Route10EndBattleText6 ; 0x5438 TextEndBattle
+ dw Route10BattleText6 ; TextBeforeBattle
+ dw Route10AfterBattleText6 ; TextAfterBattle
+ dw Route10EndBattleText6 ; TextEndBattle
+ dw Route10EndBattleText6 ; TextEndBattle
db $ff
Route10Text1: ; 593ac (16:53ac)
- db $08 ; asm
+ TX_ASM
ld hl, Route10TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -100,7 +100,7 @@ Route10AfterBattleText1: ; 593c0 (16:53c0)
db "@"
Route10Text2: ; 593c5 (16:53c5)
- db $08 ; asm
+ TX_ASM
ld hl, Route10TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -118,7 +118,7 @@ Route10AfterBattleText2: ; 593d9 (16:53d9)
db "@"
Route10Text3: ; 593de (16:53de)
- db $08 ; asm
+ TX_ASM
ld hl, Route10TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -136,7 +136,7 @@ Route10AfterBattleText3: ; 593f2 (16:53f2)
db "@"
Route10Text4: ; 593f7 (16:53f7)
- db $08 ; asm
+ TX_ASM
ld hl, Route10TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -154,7 +154,7 @@ Route10AfterBattleText4: ; 5940b (16:540b)
db "@"
Route10Text5: ; 59410 (16:5410)
- db $08 ; asm
+ TX_ASM
ld hl, Route10TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -172,7 +172,7 @@ Route10AfterBattleText5: ; 59424 (16:5424)
db "@"
Route10Text6: ; 59429 (16:5429)
- db $08 ; asm
+ TX_ASM
ld hl, Route10TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route11.asm b/scripts/route11.asm
index 629a6efd..7a31232b 100755
--- a/scripts/route11.asm
+++ b/scripts/route11.asm
@@ -30,96 +30,96 @@ Route11TrainerHeader0: ; 5947b (16:547b)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText1 ; 0x54fe TextBeforeBattle
- dw Route11AfterBattleText1 ; 0x5508 TextAfterBattle
- dw Route11EndBattleText1 ; 0x5503 TextEndBattle
- dw Route11EndBattleText1 ; 0x5503 TextEndBattle
+ dw Route11BattleText1 ; TextBeforeBattle
+ dw Route11AfterBattleText1 ; TextAfterBattle
+ dw Route11EndBattleText1 ; TextEndBattle
+ dw Route11EndBattleText1 ; TextEndBattle
Route11TrainerHeader1: ; 59487 (16:5487)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText2 ; 0x5517 TextBeforeBattle
- dw Route11AfterBattleText2 ; 0x5521 TextAfterBattle
- dw Route11EndBattleText2 ; 0x551c TextEndBattle
- dw Route11EndBattleText2 ; 0x551c TextEndBattle
+ dw Route11BattleText2 ; TextBeforeBattle
+ dw Route11AfterBattleText2 ; TextAfterBattle
+ dw Route11EndBattleText2 ; TextEndBattle
+ dw Route11EndBattleText2 ; TextEndBattle
Route11TrainerHeader2: ; 59493 (16:5493)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText3 ; 0x5530 TextBeforeBattle
- dw Route11AfterBattleText3 ; 0x553a TextAfterBattle
- dw Route11EndBattleText3 ; 0x5535 TextEndBattle
- dw Route11EndBattleText3 ; 0x5535 TextEndBattle
+ dw Route11BattleText3 ; TextBeforeBattle
+ dw Route11AfterBattleText3 ; TextAfterBattle
+ dw Route11EndBattleText3 ; TextEndBattle
+ dw Route11EndBattleText3 ; TextEndBattle
Route11TrainerHeader3: ; 5949f (16:549f)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText4 ; 0x5549 TextBeforeBattle
- dw Route11AfterBattleText4 ; 0x5553 TextAfterBattle
- dw Route11EndBattleText4 ; 0x554e TextEndBattle
- dw Route11EndBattleText4 ; 0x554e TextEndBattle
+ dw Route11BattleText4 ; TextBeforeBattle
+ dw Route11AfterBattleText4 ; TextAfterBattle
+ dw Route11EndBattleText4 ; TextEndBattle
+ dw Route11EndBattleText4 ; TextEndBattle
Route11TrainerHeader4: ; 594ab (16:54ab)
db $5 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText5 ; 0x5562 TextBeforeBattle
- dw Route11AfterBattleText5 ; 0x556c TextAfterBattle
- dw Route11EndBattleText5 ; 0x5567 TextEndBattle
- dw Route11EndBattleText5 ; 0x5567 TextEndBattle
+ dw Route11BattleText5 ; TextBeforeBattle
+ dw Route11AfterBattleText5 ; TextAfterBattle
+ dw Route11EndBattleText5 ; TextEndBattle
+ dw Route11EndBattleText5 ; TextEndBattle
Route11TrainerHeader5: ; 594b7 (16:54b7)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText6 ; 0x557b TextBeforeBattle
- dw Route11AfterBattleText6 ; 0x5585 TextAfterBattle
- dw Route11EndBattleText6 ; 0x5580 TextEndBattle
- dw Route11EndBattleText6 ; 0x5580 TextEndBattle
+ dw Route11BattleText6 ; TextBeforeBattle
+ dw Route11AfterBattleText6 ; TextAfterBattle
+ dw Route11EndBattleText6 ; TextEndBattle
+ dw Route11EndBattleText6 ; TextEndBattle
Route11TrainerHeader6: ; 594c3 (16:54c3)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText7 ; 0x5594 TextBeforeBattle
- dw Route11AfterBattleText7 ; 0x559e TextAfterBattle
- dw Route11EndBattleText7 ; 0x5599 TextEndBattle
- dw Route11EndBattleText7 ; 0x5599 TextEndBattle
+ dw Route11BattleText7 ; TextBeforeBattle
+ dw Route11AfterBattleText7 ; TextAfterBattle
+ dw Route11EndBattleText7 ; TextEndBattle
+ dw Route11EndBattleText7 ; TextEndBattle
Route11TrainerHeader7: ; 594cf (16:54cf)
db $8 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText8 ; 0x55ad TextBeforeBattle
- dw Route11AfterBattleText8 ; 0x55b7 TextAfterBattle
- dw Route11EndBattleText8 ; 0x55b2 TextEndBattle
- dw Route11EndBattleText8 ; 0x55b2 TextEndBattle
+ dw Route11BattleText8 ; TextBeforeBattle
+ dw Route11AfterBattleText8 ; TextAfterBattle
+ dw Route11EndBattleText8 ; TextEndBattle
+ dw Route11EndBattleText8 ; TextEndBattle
Route11TrainerHeader8: ; 594db (16:54db)
db $9 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText9 ; 0x55c6 TextBeforeBattle
- dw Route11AfterBattleText9 ; 0x55d0 TextAfterBattle
- dw Route11EndBattleText9 ; 0x55cb TextEndBattle
- dw Route11EndBattleText9 ; 0x55cb TextEndBattle
+ dw Route11BattleText9 ; TextBeforeBattle
+ dw Route11AfterBattleText9 ; TextAfterBattle
+ dw Route11EndBattleText9 ; TextEndBattle
+ dw Route11EndBattleText9 ; TextEndBattle
Route11TrainerHeader9: ; 594e7 (16:54e7)
db $a ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d5 ; flag's byte
- dw Route11BattleText10 ; 0x55df TextBeforeBattle
- dw Route11AfterBattleText10 ; 0x55e9 TextAfterBattle
- dw Route11EndBattleText10 ; 0x55e4 TextEndBattle
- dw Route11EndBattleText10 ; 0x55e4 TextEndBattle
+ dw Route11BattleText10 ; TextBeforeBattle
+ dw Route11AfterBattleText10 ; TextAfterBattle
+ dw Route11EndBattleText10 ; TextEndBattle
+ dw Route11EndBattleText10 ; TextEndBattle
db $ff
Route11Text1: ; 594f4 (16:54f4)
- db $8
+ TX_ASM
ld hl, Route11TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -137,7 +137,7 @@ Route11AfterBattleText1: ; 59508 (16:5508)
db "@"
Route11Text2: ; 5950d (16:550d)
- db $08 ; asm
+ TX_ASM
ld hl, Route11TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -155,7 +155,7 @@ Route11AfterBattleText2: ; 59521 (16:5521)
db "@"
Route11Text3: ; 59526 (16:5526)
- db $08 ; asm
+ TX_ASM
ld hl, Route11TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -173,7 +173,7 @@ Route11AfterBattleText3: ; 5953a (16:553a)
db "@"
Route11Text4: ; 5953f (16:553f)
- db $08 ; asm
+ TX_ASM
ld hl, Route11TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -191,7 +191,7 @@ Route11AfterBattleText4: ; 59553 (16:5553)
db "@"
Route11Text5: ; 59558 (16:5558)
- db $08 ; asm
+ TX_ASM
ld hl, Route11TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -209,7 +209,7 @@ Route11AfterBattleText5: ; 5956c (16:556c)
db "@"
Route11Text6: ; 59571 (16:5571)
- db $08 ; asm
+ TX_ASM
ld hl, Route11TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -227,7 +227,7 @@ Route11AfterBattleText6: ; 59585 (16:5585)
db "@"
Route11Text7: ; 5958a (16:558a)
- db $08 ; asm
+ TX_ASM
ld hl, Route11TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
@@ -245,7 +245,7 @@ Route11AfterBattleText7: ; 5959e (16:559e)
db "@"
Route11Text8: ; 595a3 (16:55a3)
- db $08 ; asm
+ TX_ASM
ld hl, Route11TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
@@ -263,7 +263,7 @@ Route11AfterBattleText8: ; 595b7 (16:55b7)
db "@"
Route11Text9: ; 595bc (16:55bc)
- db $08 ; asm
+ TX_ASM
ld hl, Route11TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
@@ -281,7 +281,7 @@ Route11AfterBattleText9: ; 595d0 (16:55d0)
db "@"
Route11Text10: ; 595d5 (16:55d5)
- db $08 ; asm
+ TX_ASM
ld hl, Route11TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm
index d8740986..eded4165 100755
--- a/scripts/route11gateupstairs.asm
+++ b/scripts/route11gateupstairs.asm
@@ -8,18 +8,18 @@ Route11GateUpstairsTextPointers: ; 49457 (12:5457)
dw Route11GateUpstairsText4
Route11GateUpstairsText1: ; 4945f (12:545f)
- db $08 ; asm
+ TX_ASM
xor a
ld [wWhichTrade], a
predef DoInGameTradeDialogue
-asm_49469: ; 49469 (12:5469)
+Route11GateUpstairsScriptEnd: ; 49469 (12:5469)
jp TextScriptEnd
Route11GateUpstairsText2: ; 4946c (12:546c)
- db $8
+ TX_ASM
ld a, [wd7d6]
add a
- jr c, .asm_4949b ; 0x49471 $28
+ jr c, .asm_4949b
ld a, 30 ; pokemon needed
ld [$ffdb], a
ld a, ITEMFINDER ; oak's aide reward
@@ -34,24 +34,24 @@ Route11GateUpstairsText2: ; 4946c (12:546c)
predef OaksAideScript ; call oak's aide script
ld a, [$ffdb]
dec a
- jr nz, .asm_494a1 ; 0x49494 $b
+ jr nz, .asm_494a1
ld hl, wd7d6
set 7, [hl]
.asm_4949b
ld hl, Route11GateUpstairsText_494a3
call PrintText
.asm_494a1
- jr asm_49469 ; 0x494a1 $c6
+ jr Route11GateUpstairsScriptEnd
Route11GateUpstairsText_494a3: ; 494a3 (12:54a3)
TX_FAR _Route11GateUpstairsText_494a3
db "@"
Route11GateUpstairsText3: ; 494a8 (12:54a8)
- db $08 ; asm
+ TX_ASM
ld a, [wSpriteStateData1 + 9]
- cp $4
- jp nz, Route12GateUpstairsScript_495c9
+ cp SPRITE_FACING_UP
+ jp nz, GateUpstairsScript_PrintIfFacingUp
ld a, [wd7d8]
bit 7, a ; fought snorlax?
ld hl, BinocularsSnorlaxText
@@ -70,9 +70,9 @@ BinocularsNoSnorlaxText:
db "@"
Route11GateUpstairsText4: ; 494ce (12:54ce)
- db $8
- ld hl, Route11GateUpstairsText_494d5 ; $54d5
- jp Route12GateUpstairsScript_495c9
+ TX_ASM
+ ld hl, Route11GateUpstairsText_494d5
+ jp GateUpstairsScript_PrintIfFacingUp
Route11GateUpstairsText_494d5: ; 494d5 (12:54d5)
TX_FAR _Route11GateUpstairsText_494d5
diff --git a/scripts/route12.asm b/scripts/route12.asm
index fdaf2a85..eed676b3 100755
--- a/scripts/route12.asm
+++ b/scripts/route12.asm
@@ -28,12 +28,12 @@ Route12Script0: ; 59619 (16:5619)
res 6, [hl]
jp z, CheckFightingMapTrainers
ld a, $d
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, SNORLAX
- ld [W_CUROPPONENT], a ; wd059
+ ld [W_CUROPPONENT], a
ld a, 30
- ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
+ ld [W_CURENEMYLVL], a
ld a, HS_ROUTE_12_SNORLAX
ld [wcc4d], a
predef HideObject
@@ -43,7 +43,7 @@ Route12Script0: ; 59619 (16:5619)
ret
Route12Script3: ; 5964c (16:564c)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jr z, Route12Script_59606
call UpdateSprites
@@ -51,7 +51,7 @@ Route12Script3: ; 5964c (16:564c)
cp $2
jr z, .asm_59664
ld a, $e
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
.asm_59664
ld hl, wd7d8
@@ -83,64 +83,64 @@ Route12TrainerHeader0: ; 59691 (16:5691)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte
- dw Route12BattleText1 ; 0x56ff TextBeforeBattle
- dw Route12AfterBattleText1 ; 0x5709 TextAfterBattle
- dw Route12EndBattleText1 ; 0x5704 TextEndBattle
- dw Route12EndBattleText1 ; 0x5704 TextEndBattle
+ dw Route12BattleText1 ; TextBeforeBattle
+ dw Route12AfterBattleText1 ; TextAfterBattle
+ dw Route12EndBattleText1 ; TextEndBattle
+ dw Route12EndBattleText1 ; TextEndBattle
Route12TrainerHeader1: ; 5969d (16:569d)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte
- dw Route12BattleText2 ; 0x5718 TextBeforeBattle
- dw Route12AfterBattleText2 ; 0x5722 TextAfterBattle
- dw Route12EndBattleText2 ; 0x571d TextEndBattle
- dw Route12EndBattleText2 ; 0x571d TextEndBattle
+ dw Route12BattleText2 ; TextBeforeBattle
+ dw Route12AfterBattleText2 ; TextAfterBattle
+ dw Route12EndBattleText2 ; TextEndBattle
+ dw Route12EndBattleText2 ; TextEndBattle
Route12TrainerHeader2: ; 596a9 (16:56a9)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte
- dw Route12BattleText3 ; 0x5731 TextBeforeBattle
- dw Route12AfterBattleText3 ; 0x573b TextAfterBattle
- dw Route12EndBattleText3 ; 0x5736 TextEndBattle
- dw Route12EndBattleText3 ; 0x5736 TextEndBattle
+ dw Route12BattleText3 ; TextBeforeBattle
+ dw Route12AfterBattleText3 ; TextAfterBattle
+ dw Route12EndBattleText3 ; TextEndBattle
+ dw Route12EndBattleText3 ; TextEndBattle
Route12TrainerHeader3: ; 596b5 (16:56b5)
db $5 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte
- dw Route12BattleText4 ; 0x574a TextBeforeBattle
- dw Route12AfterBattleText4 ; 0x5754 TextAfterBattle
- dw Route12EndBattleText4 ; 0x574f TextEndBattle
- dw Route12EndBattleText4 ; 0x574f TextEndBattle
+ dw Route12BattleText4 ; TextBeforeBattle
+ dw Route12AfterBattleText4 ; TextAfterBattle
+ dw Route12EndBattleText4 ; TextEndBattle
+ dw Route12EndBattleText4 ; TextEndBattle
Route12TrainerHeader4: ; 596c1 (16:56c1)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte
- dw Route12BattleText5 ; 0x5763 TextBeforeBattle
- dw Route12AfterBattleText5 ; 0x576d TextAfterBattle
- dw Route12EndBattleText5 ; 0x5768 TextEndBattle
- dw Route12EndBattleText5 ; 0x5768 TextEndBattle
+ dw Route12BattleText5 ; TextBeforeBattle
+ dw Route12AfterBattleText5 ; TextAfterBattle
+ dw Route12EndBattleText5 ; TextEndBattle
+ dw Route12EndBattleText5 ; TextEndBattle
Route12TrainerHeader5: ; 596cd (16:56cd)
db $7 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d7 ; flag's byte
- dw Route12BattleText6 ; 0x577c TextBeforeBattle
- dw Route12AfterBattleText6 ; 0x5786 TextAfterBattle
- dw Route12EndBattleText6 ; 0x5781 TextEndBattle
- dw Route12EndBattleText6 ; 0x5781 TextEndBattle
+ dw Route12BattleText6 ; TextBeforeBattle
+ dw Route12AfterBattleText6 ; TextAfterBattle
+ dw Route12EndBattleText6 ; TextEndBattle
+ dw Route12EndBattleText6 ; TextEndBattle
Route12TrainerHeader6: ; 596d9 (16:56d9)
db $8 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd7d7 ; flag's byte
- dw Route12BattleText7 ; 0x5795 TextBeforeBattle
- dw Route12AfterBattleText7 ; 0x579f TextAfterBattle
- dw Route12EndBattleText7 ; 0x579a TextEndBattle
- dw Route12EndBattleText7 ; 0x579a TextEndBattle
+ dw Route12BattleText7 ; TextBeforeBattle
+ dw Route12AfterBattleText7 ; TextAfterBattle
+ dw Route12EndBattleText7 ; TextEndBattle
+ dw Route12EndBattleText7 ; TextEndBattle
db $ff
@@ -157,7 +157,7 @@ Route12Text14: ; 596f0 (16:56f0)
db "@"
Route12Text2: ; 596f5 (16:56f5)
- db $08 ; asm
+ TX_ASM
ld hl, Route12TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -175,7 +175,7 @@ Route12AfterBattleText1: ; 59709 (16:5709)
db "@"
Route12Text3: ; 5970e (16:570e)
- db $08 ; asm
+ TX_ASM
ld hl, Route12TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -193,7 +193,7 @@ Route12AfterBattleText2: ; 59722 (16:5722)
db "@"
Route12Text4: ; 59727 (16:5727)
- db $08 ; asm
+ TX_ASM
ld hl, Route12TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -211,7 +211,7 @@ Route12AfterBattleText3: ; 5973b (16:573b)
db "@"
Route12Text5: ; 59740 (16:5740)
- db $08 ; asm
+ TX_ASM
ld hl, Route12TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -229,7 +229,7 @@ Route12AfterBattleText4: ; 59754 (16:5754)
db "@"
Route12Text6: ; 59759 (16:5759)
- db $08 ; asm
+ TX_ASM
ld hl, Route12TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -247,7 +247,7 @@ Route12AfterBattleText5: ; 5976d (16:576d)
db "@"
Route12Text7: ; 59772 (16:5772)
- db $08 ; asm
+ TX_ASM
ld hl, Route12TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -265,7 +265,7 @@ Route12AfterBattleText6: ; 59786 (16:5786)
db "@"
Route12Text8: ; 5978b (16:578b)
- db $08 ; asm
+ TX_ASM
ld hl, Route12TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route12gateupstairs.asm b/scripts/route12gateupstairs.asm
index c4c05cd6..d4e8e983 100755
--- a/scripts/route12gateupstairs.asm
+++ b/scripts/route12gateupstairs.asm
@@ -7,10 +7,10 @@ Route12GateUpstairsTextPointers: ; 49563 (12:5563)
dw Route12GateUpstairsText3
Route12GateUpstairsText1: ; 49569 (12:5569)
- db $08 ; asm
+ TX_ASM
ld a, [wd7d7]
rrca
- jr c, .asm_0ad3c ; 0x4956e
+ jr c, .asm_0ad3c
ld hl, TM39PreReceiveText
call PrintText
ld bc, (TM_39 << 8) | 1
@@ -20,15 +20,15 @@ Route12GateUpstairsText1: ; 49569 (12:5569)
call PrintText
ld hl, wd7d7
set 0, [hl]
- jr .asm_4ba56 ; 0x49589
+ jr .asm_4ba56
.BagFull
ld hl, TM39NoRoomText
call PrintText
- jr .asm_4ba56 ; 0x49591
-.asm_0ad3c ; 0x49593
+ jr .asm_4ba56
+.asm_0ad3c
ld hl, TM39ExplanationText
call PrintText
-.asm_4ba56 ; 0x49599
+.asm_4ba56
jp TextScriptEnd
TM39PreReceiveText: ; 4959c (12:559c)
@@ -48,32 +48,32 @@ TM39NoRoomText: ; 495ac (12:55ac)
db "@"
Route12GateUpstairsText2: ; 495b1 (12:55b1)
- db $08 ; asm
+ TX_ASM
ld hl, Route12GateUpstairsText_495b8
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route12GateUpstairsText_495b8: ; 495b8 (12:55b8)
TX_FAR _Route12GateUpstairsText_495b8
db "@"
Route12GateUpstairsText3: ; 495bd (12:55bd)
- db $8
+ TX_ASM
ld hl, Route12GateUpstairsText_495c4
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route12GateUpstairsText_495c4: ; 495c4 (12:55c4)
TX_FAR _Route12GateUpstairsText_495c4
db "@"
-Route12GateUpstairsScript_495c9: ; 495c9 (12:55c9)
+GateUpstairsScript_PrintIfFacingUp: ; 495c9 (12:55c9)
ld a, [wSpriteStateData1 + 9]
- cp $4
- jr z, .asm_495d4 ; 0x495ce $4
+ cp SPRITE_FACING_UP
+ jr z, .up
ld a, $1
- jr .asm_495d8 ; 0x495d2 $4
-.asm_495d4
+ jr .done
+.up
call PrintText
xor a
-.asm_495d8
+.done
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd
diff --git a/scripts/route12house.asm b/scripts/route12house.asm
index 44667b24..6b3e17fc 100755
--- a/scripts/route12house.asm
+++ b/scripts/route12house.asm
@@ -5,7 +5,7 @@ Route12HouseTextPointers: ; 56482 (15:6482)
dw Route12HouseText1
Route12HouseText1: ; 56484 (15:6484)
- db $08 ; asm
+ TX_ASM
ld a, [wd728]
bit 5, a
jr nz, .asm_b4cad
@@ -27,7 +27,7 @@ Route12HouseText1: ; 56484 (15:6484)
jr .asm_df984
.asm_a2d76
ld hl, Route12HouseText_564cf
- jr .asm_df984 ; 0x564b5
+ jr .asm_df984
.asm_b4cad
ld hl, Route12HouseText_564d4
.asm_df984
@@ -39,9 +39,9 @@ Route12HouseText_564c0: ; 564c0 (15:64c0)
db "@"
Route12HouseText_564c5: ; 564c5 (15:64c5)
- TX_FAR _Route12HouseText_564c5 ; 0x8ca00
+ TX_FAR _Route12HouseText_564c5
db $0B
- TX_FAR _Route12HouseText_564ca ; 0x8ca4f
+ TX_FAR _Route12HouseText_564ca
db "@"
Route12HouseText_564cf: ; 564cf (15:64cf)
diff --git a/scripts/route13.asm b/scripts/route13.asm
index 21862dfc..aed4745c 100755
--- a/scripts/route13.asm
+++ b/scripts/route13.asm
@@ -32,96 +32,96 @@ Route13TrainerHeader0: ; 55851 (15:5851)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText2 ; 0x58d4 TextBeforeBattle
- dw Route13AfterBattleText2 ; 0x58de TextAfterBattle
- dw Route13EndBattleText2 ; 0x58d9 TextEndBattle
- dw Route13EndBattleText2 ; 0x58d9 TextEndBattle
+ dw Route13BattleText2 ; TextBeforeBattle
+ dw Route13AfterBattleText2 ; TextAfterBattle
+ dw Route13EndBattleText2 ; TextEndBattle
+ dw Route13EndBattleText2 ; TextEndBattle
Route13TrainerHeader2: ; 5585d (15:585d)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText3 ; 0x58ed TextBeforeBattle
- dw Route13AfterBattleText3 ; 0x58f7 TextAfterBattle
- dw Route13EndBattleText3 ; 0x58f2 TextEndBattle
- dw Route13EndBattleText3 ; 0x58f2 TextEndBattle
+ dw Route13BattleText3 ; TextBeforeBattle
+ dw Route13AfterBattleText3 ; TextAfterBattle
+ dw Route13EndBattleText3 ; TextEndBattle
+ dw Route13EndBattleText3 ; TextEndBattle
Route13TrainerHeader3: ; 55869 (15:5869)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText4 ; 0x5906 TextBeforeBattle
- dw Route13AfterBattleText4 ; 0x5910 TextAfterBattle
- dw Route13EndBattleText4 ; 0x590b TextEndBattle
- dw Route13EndBattleText4 ; 0x590b TextEndBattle
+ dw Route13BattleText4 ; TextBeforeBattle
+ dw Route13AfterBattleText4 ; TextAfterBattle
+ dw Route13EndBattleText4 ; TextEndBattle
+ dw Route13EndBattleText4 ; TextEndBattle
Route13TrainerHeader4: ; 55875 (15:5875)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText5 ; 0x591f TextBeforeBattle
- dw Route13AfterBattleText5 ; 0x5929 TextAfterBattle
- dw Route13EndBattleText5 ; 0x5924 TextEndBattle
- dw Route13EndBattleText5 ; 0x5924 TextEndBattle
+ dw Route13BattleText5 ; TextBeforeBattle
+ dw Route13AfterBattleText5 ; TextAfterBattle
+ dw Route13EndBattleText5 ; TextEndBattle
+ dw Route13EndBattleText5 ; TextEndBattle
Route13TrainerHeader5: ; 55881 (15:5881)
db $5 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText6 ; 0x5938 TextBeforeBattle
- dw Route13AfterBattleText6 ; 0x5942 TextAfterBattle
- dw Route13EndBattleText6 ; 0x593d TextEndBattle
- dw Route13EndBattleText6 ; 0x593d TextEndBattle
+ dw Route13BattleText6 ; TextBeforeBattle
+ dw Route13AfterBattleText6 ; TextAfterBattle
+ dw Route13EndBattleText6 ; TextEndBattle
+ dw Route13EndBattleText6 ; TextEndBattle
Route13TrainerHeader6: ; 5588d (15:588d)
db $6 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText7 ; 0x5951 TextBeforeBattle
- dw Route13AfterBattleText7 ; 0x595b TextAfterBattle
- dw Route13EndBattleText7 ; 0x5956 TextEndBattle
- dw Route13EndBattleText7 ; 0x5956 TextEndBattle
+ dw Route13BattleText7 ; TextBeforeBattle
+ dw Route13AfterBattleText7 ; TextAfterBattle
+ dw Route13EndBattleText7 ; TextEndBattle
+ dw Route13EndBattleText7 ; TextEndBattle
Route13TrainerHeader7: ; 55899 (15:5899)
db $7 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText8 ; 0x596a TextBeforeBattle
- dw Route13AfterBattleText8 ; 0x5974 TextAfterBattle
- dw Route13EndBattleText8 ; 0x596f TextEndBattle
- dw Route13EndBattleText8 ; 0x596f TextEndBattle
+ dw Route13BattleText8 ; TextBeforeBattle
+ dw Route13AfterBattleText8 ; TextAfterBattle
+ dw Route13EndBattleText8 ; TextEndBattle
+ dw Route13EndBattleText8 ; TextEndBattle
Route13TrainerHeader8: ; 558a5 (15:58a5)
db $8 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText9 ; 0x5983 TextBeforeBattle
- dw Route13AfterBattleText9 ; 0x598d TextAfterBattle
- dw Route13EndBattleText9 ; 0x5988 TextEndBattle
- dw Route13EndBattleText9 ; 0x5988 TextEndBattle
+ dw Route13BattleText9 ; TextBeforeBattle
+ dw Route13AfterBattleText9 ; TextAfterBattle
+ dw Route13EndBattleText9 ; TextEndBattle
+ dw Route13EndBattleText9 ; TextEndBattle
Route13TrainerHeader9: ; 558b1 (15:58b1)
db $9 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText10 ; 0x599c TextBeforeBattle
- dw Route13AfterBattleText10 ; 0x59a6 TextAfterBattle
- dw Route13EndBattleText10 ; 0x59a1 TextEndBattle
- dw Route13EndBattleText10 ; 0x59a1 TextEndBattle
+ dw Route13BattleText10 ; TextBeforeBattle
+ dw Route13AfterBattleText10 ; TextAfterBattle
+ dw Route13EndBattleText10 ; TextEndBattle
+ dw Route13EndBattleText10 ; TextEndBattle
Route13TrainerHeader10: ; 558bd (15:58bd)
db $a ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7d9 ; flag's byte
- dw Route13BattleText11 ; 0x59b5 TextBeforeBattle
- dw Route13AfterBattleText11 ; 0x59bf TextAfterBattle
- dw Route13EndBattleText11 ; 0x59ba TextEndBattle
- dw Route13EndBattleText11 ; 0x59ba TextEndBattle
+ dw Route13BattleText11 ; TextBeforeBattle
+ dw Route13AfterBattleText11 ; TextAfterBattle
+ dw Route13EndBattleText11 ; TextEndBattle
+ dw Route13EndBattleText11 ; TextEndBattle
db $ff
Route13Text1: ; 558ca (15:58ca)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -139,7 +139,7 @@ Route13AfterBattleText2: ; 558de (15:58de)
db "@"
Route13Text2: ; 558e3 (15:58e3)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -157,7 +157,7 @@ Route13AfterBattleText3: ; 558f7 (15:58f7)
db "@"
Route13Text3: ; 558fc (15:58fc)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -175,7 +175,7 @@ Route13AfterBattleText4: ; 55910 (15:5910)
db "@"
Route13Text4: ; 55915 (15:5915)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -193,7 +193,7 @@ Route13AfterBattleText5: ; 55929 (15:5929)
db "@"
Route13Text5: ; 5592e (15:592e)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -211,7 +211,7 @@ Route13AfterBattleText6: ; 55942 (15:5942)
db "@"
Route13Text6: ; 55947 (15:5947)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
@@ -229,7 +229,7 @@ Route13AfterBattleText7: ; 5595b (15:595b)
db "@"
Route13Text7: ; 55960 (15:5960)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
@@ -247,7 +247,7 @@ Route13AfterBattleText8: ; 55974 (15:5974)
db "@"
Route13Text8: ; 55979 (15:5979)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
@@ -265,7 +265,7 @@ Route13AfterBattleText9: ; 5598d (15:598d)
db "@"
Route13Text9: ; 55992 (15:5992)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
@@ -283,7 +283,7 @@ Route13AfterBattleText10: ; 559a6 (15:59a6)
db "@"
Route13Text10: ; 559ab (15:59ab)
- db $08 ; asm
+ TX_ASM
ld hl, Route13TrainerHeader10
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route14.asm b/scripts/route14.asm
index d430f858..25a2cd85 100755
--- a/scripts/route14.asm
+++ b/scripts/route14.asm
@@ -30,96 +30,96 @@ Route14TrainerHeader0: ; 55a02 (15:5a02)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText1 ; 0x5a85 TextBeforeBattle
- dw Route14AfterBattleText1 ; 0x5a8f TextAfterBattle
- dw Route14EndBattleText1 ; 0x5a8a TextEndBattle
- dw Route14EndBattleText1 ; 0x5a8a TextEndBattle
+ dw Route14BattleText1 ; TextBeforeBattle
+ dw Route14AfterBattleText1 ; TextAfterBattle
+ dw Route14EndBattleText1 ; TextEndBattle
+ dw Route14EndBattleText1 ; TextEndBattle
Route14TrainerHeader1: ; 55a0e (15:5a0e)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText2 ; 0x5a9e TextBeforeBattle
- dw Route14AfterBattleText2 ; 0x5aa8 TextAfterBattle
- dw Route14EndBattleText2 ; 0x5aa3 TextEndBattle
- dw Route14EndBattleText2 ; 0x5aa3 TextEndBattle
+ dw Route14BattleText2 ; TextBeforeBattle
+ dw Route14AfterBattleText2 ; TextAfterBattle
+ dw Route14EndBattleText2 ; TextEndBattle
+ dw Route14EndBattleText2 ; TextEndBattle
Route14TrainerHeader2: ; 55a1a (15:5a1a)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText3 ; 0x5ab7 TextBeforeBattle
- dw Route14AfterBattleText3 ; 0x5ac1 TextAfterBattle
- dw Route14EndBattleText3 ; 0x5abc TextEndBattle
- dw Route14EndBattleText3 ; 0x5abc TextEndBattle
+ dw Route14BattleText3 ; TextBeforeBattle
+ dw Route14AfterBattleText3 ; TextAfterBattle
+ dw Route14EndBattleText3 ; TextEndBattle
+ dw Route14EndBattleText3 ; TextEndBattle
Route14TrainerHeader3: ; 55a26 (15:5a26)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText4 ; 0x5ad0 TextBeforeBattle
- dw Route14AfterBattleText4 ; 0x5ada TextAfterBattle
- dw Route14EndBattleText4 ; 0x5ad5 TextEndBattle
- dw Route14EndBattleText4 ; 0x5ad5 TextEndBattle
+ dw Route14BattleText4 ; TextBeforeBattle
+ dw Route14AfterBattleText4 ; TextAfterBattle
+ dw Route14EndBattleText4 ; TextEndBattle
+ dw Route14EndBattleText4 ; TextEndBattle
Route14TrainerHeader4: ; 55a32 (15:5a32)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText5 ; 0x5ae9 TextBeforeBattle
- dw Route14AfterBattleText5 ; 0x5af3 TextAfterBattle
- dw Route14EndBattleText5 ; 0x5aee TextEndBattle
- dw Route14EndBattleText5 ; 0x5aee TextEndBattle
+ dw Route14BattleText5 ; TextBeforeBattle
+ dw Route14AfterBattleText5 ; TextAfterBattle
+ dw Route14EndBattleText5 ; TextEndBattle
+ dw Route14EndBattleText5 ; TextEndBattle
Route14TrainerHeader5: ; 55a3e (15:5a3e)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText6 ; 0x5b02 TextBeforeBattle
- dw Route14AfterBattleText6 ; 0x5b0c TextAfterBattle
- dw Route14EndBattleText6 ; 0x5b07 TextEndBattle
- dw Route14EndBattleText6 ; 0x5b07 TextEndBattle
+ dw Route14BattleText6 ; TextBeforeBattle
+ dw Route14AfterBattleText6 ; TextAfterBattle
+ dw Route14EndBattleText6 ; TextEndBattle
+ dw Route14EndBattleText6 ; TextEndBattle
Route14TrainerHeader6: ; 55a4a (15:5a4a)
db $7 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText7 ; 0x5b1b TextBeforeBattle
- dw Route14AfterBattleText7 ; 0x5b25 TextAfterBattle
- dw Route14EndBattleText7 ; 0x5b20 TextEndBattle
- dw Route14EndBattleText7 ; 0x5b20 TextEndBattle
+ dw Route14BattleText7 ; TextBeforeBattle
+ dw Route14AfterBattleText7 ; TextAfterBattle
+ dw Route14EndBattleText7 ; TextEndBattle
+ dw Route14EndBattleText7 ; TextEndBattle
Route14TrainerHeader7: ; 55a56 (15:5a56)
db $8 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText8 ; 0x5b34 TextBeforeBattle
- dw Route14AfterBattleText8 ; 0x5b3e TextAfterBattle
- dw Route14EndBattleText8 ; 0x5b39 TextEndBattle
- dw Route14EndBattleText8 ; 0x5b39 TextEndBattle
+ dw Route14BattleText8 ; TextBeforeBattle
+ dw Route14AfterBattleText8 ; TextAfterBattle
+ dw Route14EndBattleText8 ; TextEndBattle
+ dw Route14EndBattleText8 ; TextEndBattle
Route14TrainerHeader8: ; 55a62 (15:5a62)
db $9 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText9 ; 0x5b4d TextBeforeBattle
- dw Route14AfterBattleText9 ; 0x5b57 TextAfterBattle
- dw Route14EndBattleText9 ; 0x5b52 TextEndBattle
- dw Route14EndBattleText9 ; 0x5b52 TextEndBattle
+ dw Route14BattleText9 ; TextBeforeBattle
+ dw Route14AfterBattleText9 ; TextAfterBattle
+ dw Route14EndBattleText9 ; TextEndBattle
+ dw Route14EndBattleText9 ; TextEndBattle
Route14TrainerHeader9: ; 55a6e (15:5a6e)
db $a ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7db ; flag's byte
- dw Route14BattleText10 ; 0x5b66 TextBeforeBattle
- dw Route14AfterBattleText10 ; 0x5b70 TextAfterBattle
- dw Route14EndBattleText10 ; 0x5b6b TextEndBattle
- dw Route14EndBattleText10 ; 0x5b6b TextEndBattle
+ dw Route14BattleText10 ; TextBeforeBattle
+ dw Route14AfterBattleText10 ; TextAfterBattle
+ dw Route14EndBattleText10 ; TextEndBattle
+ dw Route14EndBattleText10 ; TextEndBattle
db $ff
Route14Text1: ; 55a7b (15:5a7b)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -137,7 +137,7 @@ Route14AfterBattleText1: ; 55a8f (15:5a8f)
db "@"
Route14Text2: ; 55a94 (15:5a94)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -155,7 +155,7 @@ Route14AfterBattleText2: ; 55aa8 (15:5aa8)
db "@"
Route14Text3: ; 55aad (15:5aad)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -173,7 +173,7 @@ Route14AfterBattleText3: ; 55ac1 (15:5ac1)
db "@"
Route14Text4: ; 55ac6 (15:5ac6)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -191,7 +191,7 @@ Route14AfterBattleText4: ; 55ada (15:5ada)
db "@"
Route14Text5: ; 55adf (15:5adf)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -209,7 +209,7 @@ Route14AfterBattleText5: ; 55af3 (15:5af3)
db "@"
Route14Text6: ; 55af8 (15:5af8)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -227,7 +227,7 @@ Route14AfterBattleText6: ; 55b0c (15:5b0c)
db "@"
Route14Text7: ; 55b11 (15:5b11)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
@@ -245,7 +245,7 @@ Route14AfterBattleText7: ; 55b25 (15:5b25)
db "@"
Route14Text8: ; 55b2a (15:5b2a)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
@@ -263,7 +263,7 @@ Route14AfterBattleText8: ; 55b3e (15:5b3e)
db "@"
Route14Text9: ; 55b43 (15:5b43)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
@@ -281,7 +281,7 @@ Route14AfterBattleText9: ; 55b57 (15:5b57)
db "@"
Route14Text10: ; 55b5c (15:5b5c)
- db $08 ; asm
+ TX_ASM
ld hl, Route14TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route15.asm b/scripts/route15.asm
index 733d4a1c..3aa23bbb 100755
--- a/scripts/route15.asm
+++ b/scripts/route15.asm
@@ -31,143 +31,143 @@ Route15TrainerHeader0: ; 597df (16:57df)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText1 ; 0x5898 TextBeforeBattle
- dw Route15AfterBattleText1 ; 0x58a2 TextAfterBattle
- dw Route15EndBattleText1 ; 0x589d TextEndBattle
- dw Route15EndBattleText1 ; 0x589d TextEndBattle
+ dw Route15BattleText1 ; TextBeforeBattle
+ dw Route15AfterBattleText1 ; TextAfterBattle
+ dw Route15EndBattleText1 ; TextEndBattle
+ dw Route15EndBattleText1 ; TextEndBattle
Route15TrainerHeader1: ; 597eb (16:57eb)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText2 ; 0x58a7 TextBeforeBattle
- dw Route15AfterBattleText2 ; 0x58b1 TextAfterBattle
- dw Route15EndBattleText2 ; 0x58ac TextEndBattle
- dw Route15EndBattleText2 ; 0x58ac TextEndBattle
+ dw Route15BattleText2 ; TextBeforeBattle
+ dw Route15AfterBattleText2 ; TextAfterBattle
+ dw Route15EndBattleText2 ; TextEndBattle
+ dw Route15EndBattleText2 ; TextEndBattle
Route15TrainerHeader2: ; 597f7 (16:57f7)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText3 ; 0x58b6 TextBeforeBattle
- dw Route15AfterBattleText3 ; 0x58c0 TextAfterBattle
- dw Route15EndBattleText3 ; 0x58bb TextEndBattle
- dw Route15EndBattleText3 ; 0x58bb TextEndBattle
+ dw Route15BattleText3 ; TextBeforeBattle
+ dw Route15AfterBattleText3 ; TextAfterBattle
+ dw Route15EndBattleText3 ; TextEndBattle
+ dw Route15EndBattleText3 ; TextEndBattle
Route15TrainerHeader3: ; 59803 (16:5803)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText4 ; 0x58c5 TextBeforeBattle
- dw Route15AfterBattleText4 ; 0x58cf TextAfterBattle
- dw Route15EndBattleText4 ; 0x58ca TextEndBattle
- dw Route15EndBattleText4 ; 0x58ca TextEndBattle
+ dw Route15BattleText4 ; TextBeforeBattle
+ dw Route15AfterBattleText4 ; TextAfterBattle
+ dw Route15EndBattleText4 ; TextEndBattle
+ dw Route15EndBattleText4 ; TextEndBattle
Route15TrainerHeader4: ; 5980f (16:580f)
db $5 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText5 ; 0x58d4 TextBeforeBattle
- dw Route15AfterBattleText5 ; 0x58de TextAfterBattle
- dw Route15EndBattleText5 ; 0x58d9 TextEndBattle
- dw Route15EndBattleText5 ; 0x58d9 TextEndBattle
+ dw Route15BattleText5 ; TextBeforeBattle
+ dw Route15AfterBattleText5 ; TextAfterBattle
+ dw Route15EndBattleText5 ; TextEndBattle
+ dw Route15EndBattleText5 ; TextEndBattle
Route15TrainerHeader5: ; 5981b (16:581b)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText6 ; 0x58e3 TextBeforeBattle
- dw Route15AfterBattleText6 ; 0x58ed TextAfterBattle
- dw Route15EndBattleText6 ; 0x58e8 TextEndBattle
- dw Route15EndBattleText6 ; 0x58e8 TextEndBattle
+ dw Route15BattleText6 ; TextBeforeBattle
+ dw Route15AfterBattleText6 ; TextAfterBattle
+ dw Route15EndBattleText6 ; TextEndBattle
+ dw Route15EndBattleText6 ; TextEndBattle
Route15TrainerHeader6: ; 59827 (16:5827)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText7 ; 0x58f2 TextBeforeBattle
- dw Route15AfterBattleText7 ; 0x58fc TextAfterBattle
- dw Route15EndBattleText7 ; 0x58f7 TextEndBattle
- dw Route15EndBattleText7 ; 0x58f7 TextEndBattle
+ dw Route15BattleText7 ; TextBeforeBattle
+ dw Route15AfterBattleText7 ; TextAfterBattle
+ dw Route15EndBattleText7 ; TextEndBattle
+ dw Route15EndBattleText7 ; TextEndBattle
Route15TrainerHeader7: ; 59833 (16:5833)
db $8 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText8 ; 0x5901 TextBeforeBattle
- dw Route15AfterBattleText8 ; 0x590b TextAfterBattle
- dw Route15EndBattleText8 ; 0x5906 TextEndBattle
- dw Route15EndBattleText8 ; 0x5906 TextEndBattle
+ dw Route15BattleText8 ; TextBeforeBattle
+ dw Route15AfterBattleText8 ; TextAfterBattle
+ dw Route15EndBattleText8 ; TextEndBattle
+ dw Route15EndBattleText8 ; TextEndBattle
Route15TrainerHeader8: ; 5983f (16:583f)
db $9 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText9 ; 0x5910 TextBeforeBattle
- dw Route15AfterBattleText9 ; 0x591a TextAfterBattle
- dw Route15EndBattleText9 ; 0x5915 TextEndBattle
- dw Route15EndBattleText9 ; 0x5915 TextEndBattle
+ dw Route15BattleText9 ; TextBeforeBattle
+ dw Route15AfterBattleText9 ; TextAfterBattle
+ dw Route15EndBattleText9 ; TextEndBattle
+ dw Route15EndBattleText9 ; TextEndBattle
Route15TrainerHeader9: ; 5984b (16:584b)
db $a ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7dd ; flag's byte
- dw Route15BattleText10 ; 0x591f TextBeforeBattle
- dw Route15AfterBattleText10 ; 0x5929 TextAfterBattle
- dw Route15EndBattleText10 ; 0x5924 TextEndBattle
- dw Route15EndBattleText10 ; 0x5924 TextEndBattle
+ dw Route15BattleText10 ; TextBeforeBattle
+ dw Route15AfterBattleText10 ; TextAfterBattle
+ dw Route15EndBattleText10 ; TextEndBattle
+ dw Route15EndBattleText10 ; TextEndBattle
db $ff
Route15Text1: ; 59858 (16:5858)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader0
- jr asm_33cb7 ; 0x5985c $34
+ jr Route15TalkToTrainer
Route15Text2: ; 5985e (16:585e)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader1
- jr asm_33cb7 ; 0x59862 $2e
+ jr Route15TalkToTrainer
Route15Text3: ; 59864 (16:5864)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader2
- jr asm_33cb7 ; 0x59868 $28
+ jr Route15TalkToTrainer
Route15Text4: ; 5986a (16:586a)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader3
- jr asm_33cb7 ; 0x5986e $22
+ jr Route15TalkToTrainer
Route15Text5: ; 59870 (16:5870)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader4
- jr asm_33cb7 ; 0x59874 $1c
+ jr Route15TalkToTrainer
Route15Text6: ; 59876 (16:5876)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader5
- jr asm_33cb7 ; 0x5987a $16
+ jr Route15TalkToTrainer
Route15Text7: ; 5987c (16:587c)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader6
- jr asm_33cb7 ; 0x59880 $10
+ jr Route15TalkToTrainer
Route15Text8: ; 59882 (16:5882)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader7
- jr asm_33cb7 ; 0x59886 $a
+ jr Route15TalkToTrainer
Route15Text9: ; 59888 (16:5888)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader8
- jr asm_33cb7 ; 0x5988c $4
+ jr Route15TalkToTrainer
Route15Text10: ; 5988e (16:588e)
- db $8 ; asm
+ TX_ASM
ld hl, Route15TrainerHeader9
-asm_33cb7: ; 59892 (16:5892)
+Route15TalkToTrainer: ; 59892 (16:5892)
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route15gateupstairs.asm b/scripts/route15gateupstairs.asm
index 2d328122..8969fd74 100755
--- a/scripts/route15gateupstairs.asm
+++ b/scripts/route15gateupstairs.asm
@@ -6,10 +6,10 @@ Route15GateUpstairsTextPointers: ; 4964d (12:564d)
dw Route15GateUpstairsText2
Route15GateUpstairsText1: ; 49651 (12:5651)
- db $8
+ TX_ASM
ld a, [wd7dd]
bit 0, a
- jr nz, .asm_49683 ; 0x49657 $2a
+ jr nz, .asm_49683
ld a, 50 ; pokemon needed
ld [$ffdb], a
ld a, EXP__ALL ; oak's aide reward
@@ -23,7 +23,7 @@ Route15GateUpstairsText1: ; 49651 (12:5651)
predef OaksAideScript ; call oak's aide script
ld a, [$ffdb]
cp $1
- jr nz, .asm_49689 ; 0x4967c $b
+ jr nz, .asm_49689
ld hl, wd7dd
set 0, [hl]
.asm_49683
@@ -37,9 +37,9 @@ Route15GateUpstairsText_4968c: ; 4968c (12:568c)
db "@"
Route15GateUpstairsText2: ; 49691 (12:5691)
- db $8
+ TX_ASM
ld hl, Route15GateUpstairsText_49698
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route15GateUpstairsText_49698: ; 49698 (12:5698)
TX_FAR _Route15GateUpstairsText_49698
diff --git a/scripts/route16.asm b/scripts/route16.asm
index ef5b5859..b6c49a96 100755
--- a/scripts/route16.asm
+++ b/scripts/route16.asm
@@ -28,12 +28,12 @@ Route16Script0: ; 59959 (16:5959)
res 0, [hl]
jp z, CheckFightingMapTrainers
ld a, $a
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, SNORLAX
- ld [W_CUROPPONENT], a ; wd059
+ ld [W_CUROPPONENT], a
ld a, 30
- ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
+ ld [W_CURENEMYLVL], a
ld a, HS_ROUTE_16_SNORLAX
ld [wcc4d], a
predef HideObject
@@ -44,7 +44,7 @@ Route16Script0: ; 59959 (16:5959)
ret
Route16Script3: ; 5998f (16:598f)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, Route16Script_59946
call UpdateSprites
@@ -52,7 +52,7 @@ Route16Script3: ; 5998f (16:598f)
cp $2
jr z, .asm_599a8
ld a, $b
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
.asm_599a8
ld hl, wd7e0
@@ -81,60 +81,60 @@ Route16TrainerHeader0: ; 599cf (16:59cf)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7df ; flag's byte
- dw Route16BattleText1 ; 0x5a22 TextBeforeBattle
- dw Route16AfterBattleText1 ; 0x5a2c TextAfterBattle
- dw Route16EndBattleText1 ; 0x5a27 TextEndBattle
- dw Route16EndBattleText1 ; 0x5a27 TextEndBattle
+ dw Route16BattleText1 ; TextBeforeBattle
+ dw Route16AfterBattleText1 ; TextAfterBattle
+ dw Route16EndBattleText1 ; TextEndBattle
+ dw Route16EndBattleText1 ; TextEndBattle
Route16TrainerHeader1: ; 599db (16:59db)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7df ; flag's byte
- dw Route16BattleText2 ; 0x5a3b TextBeforeBattle
- dw Route16AfterBattleText2 ; 0x5a45 TextAfterBattle
- dw Route16EndBattleText2 ; 0x5a40 TextEndBattle
- dw Route16EndBattleText2 ; 0x5a40 TextEndBattle
+ dw Route16BattleText2 ; TextBeforeBattle
+ dw Route16AfterBattleText2 ; TextAfterBattle
+ dw Route16EndBattleText2 ; TextEndBattle
+ dw Route16EndBattleText2 ; TextEndBattle
Route16TrainerHeader2: ; 599e7 (16:59e7)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7df ; flag's byte
- dw Route16BattleText3 ; 0x5a54 TextBeforeBattle
- dw Route16AfterBattleText3 ; 0x5a5e TextAfterBattle
- dw Route16EndBattleText3 ; 0x5a59 TextEndBattle
- dw Route16EndBattleText3 ; 0x5a59 TextEndBattle
+ dw Route16BattleText3 ; TextBeforeBattle
+ dw Route16AfterBattleText3 ; TextAfterBattle
+ dw Route16EndBattleText3 ; TextEndBattle
+ dw Route16EndBattleText3 ; TextEndBattle
Route16TrainerHeader3: ; 599f3 (16:59f3)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7df ; flag's byte
- dw Route16BattleText4 ; 0x5a6d TextBeforeBattle
- dw Route16AfterBattleText4 ; 0x5a77 TextAfterBattle
- dw Route16EndBattleText4 ; 0x5a72 TextEndBattle
- dw Route16EndBattleText4 ; 0x5a72 TextEndBattle
+ dw Route16BattleText4 ; TextBeforeBattle
+ dw Route16AfterBattleText4 ; TextAfterBattle
+ dw Route16EndBattleText4 ; TextEndBattle
+ dw Route16EndBattleText4 ; TextEndBattle
Route16TrainerHeader4: ; 599ff (16:59ff)
db $5 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7df ; flag's byte
- dw Route16BattleText5 ; 0x5a86 TextBeforeBattle
- dw Route16AfterBattleText5 ; 0x5a90 TextAfterBattle
- dw Route16EndBattleText5 ; 0x5a8b TextEndBattle
- dw Route16EndBattleText5 ; 0x5a8b TextEndBattle
+ dw Route16BattleText5 ; TextBeforeBattle
+ dw Route16AfterBattleText5 ; TextAfterBattle
+ dw Route16EndBattleText5 ; TextEndBattle
+ dw Route16EndBattleText5 ; TextEndBattle
Route16TrainerHeader5: ; 59a0b (16:5a0b)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7df ; flag's byte
- dw Route16BattleText6 ; 0x5a9f TextBeforeBattle
- dw Route16AfterBattleText6 ; 0x5aa9 TextAfterBattle
- dw Route16EndBattleText6 ; 0x5aa4 TextEndBattle
- dw Route16EndBattleText6 ; 0x5aa4 TextEndBattle
+ dw Route16BattleText6 ; TextBeforeBattle
+ dw Route16AfterBattleText6 ; TextAfterBattle
+ dw Route16EndBattleText6 ; TextEndBattle
+ dw Route16EndBattleText6 ; TextEndBattle
db $ff
Route16Text1: ; 59a18 (16:5a18)
- db $08 ; asm
+ TX_ASM
ld hl, Route16TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -152,7 +152,7 @@ Route16AfterBattleText1: ; 59a2c (16:5a2c)
db "@"
Route16Text2: ; 59a31 (16:5a31)
- db $08 ; asm
+ TX_ASM
ld hl, Route16TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -170,7 +170,7 @@ Route16AfterBattleText2: ; 59a45 (16:5a45)
db "@"
Route16Text3: ; 59a4a (16:5a4a)
- db $08 ; asm
+ TX_ASM
ld hl, Route16TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -188,7 +188,7 @@ Route16AfterBattleText3: ; 59a5e (16:5a5e)
db "@"
Route16Text4: ; 59a63 (16:5a63)
- db $08 ; asm
+ TX_ASM
ld hl, Route16TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -206,7 +206,7 @@ Route16AfterBattleText4: ; 59a77 (16:5a77)
db "@"
Route16Text5: ; 59a7c (16:5a7c)
- db $08 ; asm
+ TX_ASM
ld hl, Route16TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -224,7 +224,7 @@ Route16AfterBattleText5: ; 59a90 (16:5a90)
db "@"
Route16Text6: ; 59a95 (16:5a95)
- db $08 ; asm
+ TX_ASM
ld hl, Route16TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route16gate.asm b/scripts/route16gate.asm
index 54bca413..d245e249 100755
--- a/scripts/route16gate.asm
+++ b/scripts/route16gate.asm
@@ -25,7 +25,7 @@ Route16GateScript0: ; 496d7 (12:56d7)
ld [hJoyHeld], a
ld a, [wWhichTrade]
cp $1
- jr z, .asm_4970e ; 0x496f1 $1b
+ jr z, .asm_4970e
ld a, [wWhichTrade]
dec a
ld [wSimulatedJoypadStatesIndex], a
@@ -92,16 +92,16 @@ Route16GateTextPointers: ; 4975a (12:575a)
dw Route16GateText3
Route16GateText1: ; 49760 (12:5760)
- db $08 ; asm
+ TX_ASM
call Route16GateScript_49755
- jr z, .asm_0bdf3 ; 0x49764
+ jr z, .asm_0bdf3
ld hl, Route16GateText_4977c
call PrintText
- jr .asm_56c9d ; 0x4976c
-.asm_0bdf3 ; 0x4976e
+ jr .asm_56c9d
+.asm_0bdf3
ld hl, Route16GateText_49777
call PrintText
-.asm_56c9d ; 0x49774
+.asm_56c9d
jp TextScriptEnd
Route16GateText_49777: ; 49777 (12:5777)
diff --git a/scripts/route16gateupstairs.asm b/scripts/route16gateupstairs.asm
index c9996dcd..64b43e10 100755
--- a/scripts/route16gateupstairs.asm
+++ b/scripts/route16gateupstairs.asm
@@ -8,7 +8,7 @@ Route16GateUpstairsTextPointers: ; 4980e (12:580e)
dw Route16GateUpstairsText4
Route16GateUpstairsText1: ; 49816 (12:5816)
- db $08 ; asm
+ TX_ASM
ld hl, Route16GateUpstairsText_49820
call PrintText
jp TextScriptEnd
@@ -18,7 +18,7 @@ Route16GateUpstairsText_49820: ; 49820 (12:5820)
db "@"
Route16GateUpstairsText2: ; 49825 (12:5825)
- db $08 ; asm
+ TX_ASM
ld hl, Route16GateUpstairsText_4982f
call PrintText
jp TextScriptEnd
@@ -28,18 +28,18 @@ Route16GateUpstairsText_4982f: ; 4982f (12:582f)
db "@"
Route16GateUpstairsText3: ; 49834 (12:5834)
- db $8
+ TX_ASM
ld hl, Route16GateUpstairsText_4983b
- jp Route12GateUpstairsScript_495c9
+ jp GateUpstairsScript_PrintIfFacingUp
Route16GateUpstairsText_4983b: ; 4983b (12:583b)
TX_FAR _Route16GateUpstairsText_4983b
db "@"
Route16GateUpstairsText4: ; 49840 (12:5840)
- db $8
- ld hl, Route16GateUpstairsText_49847 ; $5847
- jp Route12GateUpstairsScript_495c9
+ TX_ASM
+ ld hl, Route16GateUpstairsText_49847
+ jp GateUpstairsScript_PrintIfFacingUp
Route16GateUpstairsText_49847: ; 49847 (12:5847)
TX_FAR _Route16GateUpstairsText_49847
diff --git a/scripts/route16house.asm b/scripts/route16house.asm
index 9a189757..5035b190 100755
--- a/scripts/route16house.asm
+++ b/scripts/route16house.asm
@@ -6,11 +6,11 @@ Route16HouseTextPointers: ; 1e5fb (7:65fb)
dw Route16HouseText2
Route16HouseText1: ; 1e5ff (7:65ff)
- db $08 ; asm
+ TX_ASM
ld a, [wd7e0]
bit 6, a
ld hl, HM02ExplanationText
- jr nz, .asm_13616 ; 0x1e608
+ jr nz, .asm_13616
ld hl, Route16HouseText3
call PrintText
ld bc, (HM_02 << 8) | 1
@@ -19,10 +19,10 @@ Route16HouseText1: ; 1e5ff (7:65ff)
ld hl, wd7e0
set 6, [hl]
ld hl, ReceivedHM02Text
- jr .asm_13616 ; 0x1e620
+ jr .asm_13616
.BagFull
ld hl, HM02NoRoomText
-.asm_13616 ; 0x1e625
+.asm_13616
call PrintText
jp TextScriptEnd
@@ -43,7 +43,7 @@ HM02NoRoomText: ; 1e63b (7:663b)
db "@"
Route16HouseText2: ; 1e640 (7:6640)
- db $08 ; asm
+ TX_ASM
ld hl, Route16HouseText_1e652
call PrintText
ld a, FEAROW
diff --git a/scripts/route17.asm b/scripts/route17.asm
index ffd00634..8de70c3b 100755
--- a/scripts/route17.asm
+++ b/scripts/route17.asm
@@ -35,96 +35,96 @@ Route17TrainerHeader0: ; 55bb3 (15:5bb3)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText1 ; 0x5c36 TextBeforeBattle
- dw Route17AfterBattleText1 ; 0x5c40 TextAfterBattle
- dw Route17EndBattleText1 ; 0x5c3b TextEndBattle
- dw Route17EndBattleText1 ; 0x5c3b TextEndBattle
+ dw Route17BattleText1 ; TextBeforeBattle
+ dw Route17AfterBattleText1 ; TextAfterBattle
+ dw Route17EndBattleText1 ; TextEndBattle
+ dw Route17EndBattleText1 ; TextEndBattle
Route17TrainerHeader1: ; 55bbf (15:5bbf)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText2 ; 0x5c4f TextBeforeBattle
- dw Route17AfterBattleText2 ; 0x5c59 TextAfterBattle
- dw Route17EndBattleText2 ; 0x5c54 TextEndBattle
- dw Route17EndBattleText2 ; 0x5c54 TextEndBattle
+ dw Route17BattleText2 ; TextBeforeBattle
+ dw Route17AfterBattleText2 ; TextAfterBattle
+ dw Route17EndBattleText2 ; TextEndBattle
+ dw Route17EndBattleText2 ; TextEndBattle
Route17TrainerHeader2: ; 55bcb (15:5bcb)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText3 ; 0x5c68 TextBeforeBattle
- dw Route17AfterBattleText3 ; 0x5c72 TextAfterBattle
- dw Route17EndBattleText3 ; 0x5c6d TextEndBattle
- dw Route17EndBattleText3 ; 0x5c6d TextEndBattle
+ dw Route17BattleText3 ; TextBeforeBattle
+ dw Route17AfterBattleText3 ; TextAfterBattle
+ dw Route17EndBattleText3 ; TextEndBattle
+ dw Route17EndBattleText3 ; TextEndBattle
Route17TrainerHeader3: ; 55bd7 (15:5bd7)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText4 ; 0x5c81 TextBeforeBattle
- dw Route17AfterBattleText4 ; 0x5c8b TextAfterBattle
- dw Route17EndBattleText4 ; 0x5c86 TextEndBattle
- dw Route17EndBattleText4 ; 0x5c86 TextEndBattle
+ dw Route17BattleText4 ; TextBeforeBattle
+ dw Route17AfterBattleText4 ; TextAfterBattle
+ dw Route17EndBattleText4 ; TextEndBattle
+ dw Route17EndBattleText4 ; TextEndBattle
Route17TrainerHeader4: ; 55be3 (15:5be3)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText5 ; 0x5c9a TextBeforeBattle
- dw Route17AfterBattleText5 ; 0x5ca4 TextAfterBattle
- dw Route17EndBattleText5 ; 0x5c9f TextEndBattle
- dw Route17EndBattleText5 ; 0x5c9f TextEndBattle
+ dw Route17BattleText5 ; TextBeforeBattle
+ dw Route17AfterBattleText5 ; TextAfterBattle
+ dw Route17EndBattleText5 ; TextEndBattle
+ dw Route17EndBattleText5 ; TextEndBattle
Route17TrainerHeader5: ; 55bef (15:5bef)
db $6 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText6 ; 0x5cb3 TextBeforeBattle
- dw Route17AfterBattleText6 ; 0x5cbd TextAfterBattle
- dw Route17EndBattleText6 ; 0x5cb8 TextEndBattle
- dw Route17EndBattleText6 ; 0x5cb8 TextEndBattle
+ dw Route17BattleText6 ; TextBeforeBattle
+ dw Route17AfterBattleText6 ; TextAfterBattle
+ dw Route17EndBattleText6 ; TextEndBattle
+ dw Route17EndBattleText6 ; TextEndBattle
Route17TrainerHeader6: ; 55bfb (15:5bfb)
db $7 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText7 ; 0x5ccc TextBeforeBattle
- dw Route17AfterBattleText7 ; 0x5cd6 TextAfterBattle
- dw Route17EndBattleText7 ; 0x5cd1 TextEndBattle
- dw Route17EndBattleText7 ; 0x5cd1 TextEndBattle
+ dw Route17BattleText7 ; TextBeforeBattle
+ dw Route17AfterBattleText7 ; TextAfterBattle
+ dw Route17EndBattleText7 ; TextEndBattle
+ dw Route17EndBattleText7 ; TextEndBattle
Route17TrainerHeader7: ; 55c07 (15:5c07)
db $8 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText8 ; 0x5ce5 TextBeforeBattle
- dw Route17AfterBattleText8 ; 0x5cef TextAfterBattle
- dw Route17EndBattleText8 ; 0x5cea TextEndBattle
- dw Route17EndBattleText8 ; 0x5cea TextEndBattle
+ dw Route17BattleText8 ; TextBeforeBattle
+ dw Route17AfterBattleText8 ; TextAfterBattle
+ dw Route17EndBattleText8 ; TextEndBattle
+ dw Route17EndBattleText8 ; TextEndBattle
Route17TrainerHeader8: ; 55c13 (15:5c13)
db $9 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText9 ; 0x5cfe TextBeforeBattle
- dw Route17AfterBattleText9 ; 0x5d08 TextAfterBattle
- dw Route17EndBattleText9 ; 0x5d03 TextEndBattle
- dw Route17EndBattleText9 ; 0x5d03 TextEndBattle
+ dw Route17BattleText9 ; TextBeforeBattle
+ dw Route17AfterBattleText9 ; TextAfterBattle
+ dw Route17EndBattleText9 ; TextEndBattle
+ dw Route17EndBattleText9 ; TextEndBattle
Route17TrainerHeader9: ; 55c1f (15:5c1f)
db $a ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e1 ; flag's byte
- dw Route17BattleText10 ; 0x5d17 TextBeforeBattle
- dw Route17AfterBattleText10 ; 0x5d21 TextAfterBattle
- dw Route17EndBattleText10 ; 0x5d1c TextEndBattle
- dw Route17EndBattleText10 ; 0x5d1c TextEndBattle
+ dw Route17BattleText10 ; TextBeforeBattle
+ dw Route17AfterBattleText10 ; TextAfterBattle
+ dw Route17EndBattleText10 ; TextEndBattle
+ dw Route17EndBattleText10 ; TextEndBattle
db $ff
Route17Text1: ; 55c2c (15:5c2c)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -142,7 +142,7 @@ Route17AfterBattleText1: ; 55c40 (15:5c40)
db "@"
Route17Text2: ; 55c45 (15:5c45)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -160,7 +160,7 @@ Route17AfterBattleText2: ; 55c59 (15:5c59)
db "@"
Route17Text3: ; 55c5e (15:5c5e)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -178,7 +178,7 @@ Route17AfterBattleText3: ; 55c72 (15:5c72)
db "@"
Route17Text4: ; 55c77 (15:5c77)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -196,7 +196,7 @@ Route17AfterBattleText4: ; 55c8b (15:5c8b)
db "@"
Route17Text5: ; 55c90 (15:5c90)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -214,7 +214,7 @@ Route17AfterBattleText5: ; 55ca4 (15:5ca4)
db "@"
Route17Text6: ; 55ca9 (15:5ca9)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -232,7 +232,7 @@ Route17AfterBattleText6: ; 55cbd (15:5cbd)
db "@"
Route17Text7: ; 55cc2 (15:5cc2)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
@@ -250,7 +250,7 @@ Route17AfterBattleText7: ; 55cd6 (15:5cd6)
db "@"
Route17Text8: ; 55cdb (15:5cdb)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
@@ -268,7 +268,7 @@ Route17AfterBattleText8: ; 55cef (15:5cef)
db "@"
Route17Text9: ; 55cf4 (15:5cf4)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
@@ -286,7 +286,7 @@ Route17AfterBattleText9: ; 55d08 (15:5d08)
db "@"
Route17Text10: ; 55d0d (15:5d0d)
- db $08 ; asm
+ TX_ASM
ld hl, Route17TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route18.asm b/scripts/route18.asm
index de2fe19a..80242169 100755
--- a/scripts/route18.asm
+++ b/scripts/route18.asm
@@ -24,33 +24,33 @@ Route18TrainerHeader0: ; 59aea (16:5aea)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e3 ; flag's byte
- dw Route18BattleText1 ; 0x5b19 TextBeforeBattle
- dw Route18AfterBattleText1 ; 0x5b23 TextAfterBattle
- dw Route18EndBattleText1 ; 0x5b1e TextEndBattle
- dw Route18EndBattleText1 ; 0x5b1e TextEndBattle
+ dw Route18BattleText1 ; TextBeforeBattle
+ dw Route18AfterBattleText1 ; TextAfterBattle
+ dw Route18EndBattleText1 ; TextEndBattle
+ dw Route18EndBattleText1 ; TextEndBattle
Route18TrainerHeader1: ; 59af6 (16:5af6)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e3 ; flag's byte
- dw Route18BattleText2 ; 0x5b32 TextBeforeBattle
- dw Route18AfterBattleText2 ; 0x5b3c TextAfterBattle
- dw Route18EndBattleText2 ; 0x5b37 TextEndBattle
- dw Route18EndBattleText2 ; 0x5b37 TextEndBattle
+ dw Route18BattleText2 ; TextBeforeBattle
+ dw Route18AfterBattleText2 ; TextAfterBattle
+ dw Route18EndBattleText2 ; TextEndBattle
+ dw Route18EndBattleText2 ; TextEndBattle
Route18TrainerHeader2: ; 59b02 (16:5b02)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e3 ; flag's byte
- dw Route18BattleText3 ; 0x5b4b TextBeforeBattle
- dw Route18AfterBattleText3 ; 0x5b55 TextAfterBattle
- dw Route18EndBattleText3 ; 0x5b50 TextEndBattle
- dw Route18EndBattleText3 ; 0x5b50 TextEndBattle
+ dw Route18BattleText3 ; TextBeforeBattle
+ dw Route18AfterBattleText3 ; TextAfterBattle
+ dw Route18EndBattleText3 ; TextEndBattle
+ dw Route18EndBattleText3 ; TextEndBattle
db $ff
Route18Text1: ; 59b0f (16:5b0f)
- db $08 ; asm
+ TX_ASM
ld hl, Route18TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -68,7 +68,7 @@ Route18AfterBattleText1: ; 59b23 (16:5b23)
db "@"
Route18Text2: ; 59b28 (16:5b28)
- db $08 ; asm
+ TX_ASM
ld hl, Route18TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -86,7 +86,7 @@ Route18AfterBattleText2: ; 59b3c (16:5b3c)
db "@"
Route18Text3: ; 59b41 (16:5b41)
- db $08 ; asm
+ TX_ASM
ld hl, Route18TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route18gate.asm b/scripts/route18gate.asm
index 1500f578..02f7b68c 100755
--- a/scripts/route18gate.asm
+++ b/scripts/route18gate.asm
@@ -25,7 +25,7 @@ Route18GateScript0: ; 4988f (12:588f)
ld [hJoyHeld], a
ld a, [wWhichTrade]
cp $1
- jr z, .asm_498c6 ; 0x498a9 $1b
+ jr z, .asm_498c6
ld a, [wWhichTrade]
dec a
ld [wSimulatedJoypadStatesIndex], a
@@ -87,16 +87,16 @@ Route18GateTextPointers: ; 4990d (12:590d)
dw Route18GateText2
Route18GateText1: ; 49911 (12:5911)
- db $08 ; asm
+ TX_ASM
call Route16GateScript_49755
- jr z, .asm_3c84d ; 0x49915
+ jr z, .asm_3c84d
ld hl, Route18GateText_4992d
call PrintText
- jr .asm_a8410 ; 0x4991d
-.asm_3c84d ; 0x4991f
+ jr .asm_a8410
+.asm_3c84d
ld hl, Route18GateText_49928
call PrintText
-.asm_a8410 ; 0x49925
+.asm_a8410
jp TextScriptEnd
Route18GateText_49928: ; 49928 (12:5928)
diff --git a/scripts/route18gateupstairs.asm b/scripts/route18gateupstairs.asm
index aaa1b34e..4e1014e0 100755
--- a/scripts/route18gateupstairs.asm
+++ b/scripts/route18gateupstairs.asm
@@ -7,25 +7,25 @@ Route18GateUpstairsTextPointers: ; 49978 (12:5978)
dw Route18GateUpstairsText3
Route18GateUpstairsText1: ; 4997e (12:597e)
- db $08 ; asm
+ TX_ASM
ld a, $5
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
Route18GateUpstairsText2: ; 4998c (12:598c)
- db $8
- ld hl, Route18GateUpstairsText_49993 ; $5993
- jp Route12GateUpstairsScript_495c9
+ TX_ASM
+ ld hl, Route18GateUpstairsText_49993
+ jp GateUpstairsScript_PrintIfFacingUp
Route18GateUpstairsText_49993: ; 49993 (12:5993)
TX_FAR _Route18GateUpstairsText_49993
db "@"
Route18GateUpstairsText3: ; 49998 (12:5998)
- db $8
- ld hl, Route18GateUpstairsText_4999f ; $599f
- jp Route12GateUpstairsScript_495c9
+ TX_ASM
+ ld hl, Route18GateUpstairsText_4999f
+ jp GateUpstairsScript_PrintIfFacingUp
Route18GateUpstairsText_4999f: ; 4999f (12:599f)
TX_FAR _Route18GateUpstairsText_4999f
diff --git a/scripts/route19.asm b/scripts/route19.asm
index 40c7aeb3..0265d2a3 100755
--- a/scripts/route19.asm
+++ b/scripts/route19.asm
@@ -30,150 +30,150 @@ Route19TrainerHeader0: ; 55d73 (15:5d73)
db $1 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText1 ; 0x5e50 TextBeforeBattle
- dw Route19AfterBattleText1 ; 0x5e5a TextAfterBattle
- dw Route19EndBattleText1 ; 0x5e55 TextEndBattle
- dw Route19EndBattleText1 ; 0x5e55 TextEndBattle
+ dw Route19BattleText1 ; TextBeforeBattle
+ dw Route19AfterBattleText1 ; TextAfterBattle
+ dw Route19EndBattleText1 ; TextEndBattle
+ dw Route19EndBattleText1 ; TextEndBattle
Route19TrainerHeader1: ; 55d7f (15:5d7f)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText2 ; 0x5e5f TextBeforeBattle
- dw Route19AfterBattleText2 ; 0x5e69 TextAfterBattle
- dw Route19EndBattleText2 ; 0x5e64 TextEndBattle
- dw Route19EndBattleText2 ; 0x5e64 TextEndBattle
+ dw Route19BattleText2 ; TextBeforeBattle
+ dw Route19AfterBattleText2 ; TextAfterBattle
+ dw Route19EndBattleText2 ; TextEndBattle
+ dw Route19EndBattleText2 ; TextEndBattle
Route19TrainerHeader2: ; 55d8b (15:5d8b)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText3 ; 0x5e6e TextBeforeBattle
- dw Route19AfterBattleText3 ; 0x5e78 TextAfterBattle
- dw Route19EndBattleText3 ; 0x5e73 TextEndBattle
- dw Route19EndBattleText3 ; 0x5e73 TextEndBattle
+ dw Route19BattleText3 ; TextBeforeBattle
+ dw Route19AfterBattleText3 ; TextAfterBattle
+ dw Route19EndBattleText3 ; TextEndBattle
+ dw Route19EndBattleText3 ; TextEndBattle
Route19TrainerHeader3: ; 55d97 (15:5d97)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText4 ; 0x5e7d TextBeforeBattle
- dw Route19AfterBattleText4 ; 0x5e87 TextAfterBattle
- dw Route19EndBattleText4 ; 0x5e82 TextEndBattle
- dw Route19EndBattleText4 ; 0x5e82 TextEndBattle
+ dw Route19BattleText4 ; TextBeforeBattle
+ dw Route19AfterBattleText4 ; TextAfterBattle
+ dw Route19EndBattleText4 ; TextEndBattle
+ dw Route19EndBattleText4 ; TextEndBattle
Route19TrainerHeader4: ; 55da3 (15:5da3)
db $5 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText5 ; 0x5e8c TextBeforeBattle
- dw Route19AfterBattleText5 ; 0x5e96 TextAfterBattle
- dw Route19EndBattleText5 ; 0x5e91 TextEndBattle
- dw Route19EndBattleText5 ; 0x5e91 TextEndBattle
+ dw Route19BattleText5 ; TextBeforeBattle
+ dw Route19AfterBattleText5 ; TextAfterBattle
+ dw Route19EndBattleText5 ; TextEndBattle
+ dw Route19EndBattleText5 ; TextEndBattle
Route19TrainerHeader5: ; 55daf (15:5daf)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText6 ; 0x5e9b TextBeforeBattle
- dw Route19AfterBattleText6 ; 0x5ea5 TextAfterBattle
- dw Route19EndBattleText6 ; 0x5ea0 TextEndBattle
- dw Route19EndBattleText6 ; 0x5ea0 TextEndBattle
+ dw Route19BattleText6 ; TextBeforeBattle
+ dw Route19AfterBattleText6 ; TextAfterBattle
+ dw Route19EndBattleText6 ; TextEndBattle
+ dw Route19EndBattleText6 ; TextEndBattle
Route19TrainerHeader6: ; 55dbb (15:5dbb)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText7 ; 0x5eaa TextBeforeBattle
- dw Route19AfterBattleText7 ; 0x5eb4 TextAfterBattle
- dw Route19EndBattleText7 ; 0x5eaf TextEndBattle
- dw Route19EndBattleText7 ; 0x5eaf TextEndBattle
+ dw Route19BattleText7 ; TextBeforeBattle
+ dw Route19AfterBattleText7 ; TextAfterBattle
+ dw Route19EndBattleText7 ; TextEndBattle
+ dw Route19EndBattleText7 ; TextEndBattle
Route19TrainerHeader7: ; 55dc7 (15:5dc7)
db $8 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText8 ; 0x5eb9 TextBeforeBattle
- dw Route19AfterBattleText8 ; 0x5ec3 TextAfterBattle
- dw Route19EndBattleText8 ; 0x5ebe TextEndBattle
- dw Route19EndBattleText8 ; 0x5ebe TextEndBattle
+ dw Route19BattleText8 ; TextBeforeBattle
+ dw Route19AfterBattleText8 ; TextAfterBattle
+ dw Route19EndBattleText8 ; TextEndBattle
+ dw Route19EndBattleText8 ; TextEndBattle
Route19TrainerHeader8: ; 55dd3 (15:5dd3)
db $9 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText9 ; 0x5ec8 TextBeforeBattle
- dw Route19AfterBattleText9 ; 0x5ed2 TextAfterBattle
- dw Route19EndBattleText9 ; 0x5ecd TextEndBattle
- dw Route19EndBattleText9 ; 0x5ecd TextEndBattle
+ dw Route19BattleText9 ; TextBeforeBattle
+ dw Route19AfterBattleText9 ; TextAfterBattle
+ dw Route19EndBattleText9 ; TextEndBattle
+ dw Route19EndBattleText9 ; TextEndBattle
Route19TrainerHeader9: ; 55ddf (15:5ddf)
db $a ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e5 ; flag's byte
- dw Route19BattleText10 ; 0x5ed7 TextBeforeBattle
- dw Route19AfterBattleText10 ; 0x5ee1 TextAfterBattle
- dw Route19EndBattleText10 ; 0x5edc TextEndBattle
- dw Route19EndBattleText10 ; 0x5edc TextEndBattle
+ dw Route19BattleText10 ; TextBeforeBattle
+ dw Route19AfterBattleText10 ; TextAfterBattle
+ dw Route19EndBattleText10 ; TextEndBattle
+ dw Route19EndBattleText10 ; TextEndBattle
db $ff
Route19Text1: ; 55dec (15:5dec)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route19Text2: ; 55df6 (15:5df6)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route19Text3: ; 55e00 (15:5e00)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route19Text4: ; 55e0a (15:5e0a)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route19Text5: ; 55e14 (15:5e14)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route19Text6: ; 55e1e (15:5e1e)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route19Text7: ; 55e28 (15:5e28)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route19Text8: ; 55e32 (15:5e32)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route19Text9: ; 55e3c (15:5e3c)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route19Text10: ; 55e46 (15:5e46)
- db $08 ; asm
+ TX_ASM
ld hl, Route19TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route20.asm b/scripts/route20.asm
index 4ef57e23..085a6c18 100755
--- a/scripts/route20.asm
+++ b/scripts/route20.asm
@@ -4,7 +4,7 @@ Route20Script: ; 50ca9 (14:4ca9)
res 0, [hl]
call nz, Route20Script_50cc6
call EnableAutoTextBoxDrawing
- ld hl, Route20TrainerHeader0 ; $4d3a
+ ld hl, Route20TrainerHeader0
ld de, Route20ScriptPointers
ld a, [W_ROUTE20CURSCRIPT]
call ExecuteCurMapScriptInTable
@@ -16,11 +16,11 @@ Route20Script_50cc6: ; 50cc6 (14:4cc6)
and $3
cp $3
jr z, .asm_50cef
- ld a, $d7
+ ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1
call Route20Script_50d0c
- ld a, $d8
+ ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2
call Route20Script_50d0c
- ld hl, .MissableObjectIDs ; $4ce8
+ ld hl, .MissableObjectIDs
.asm_50cdc
ld a, [hli]
cp $ff
@@ -86,150 +86,150 @@ Route20TrainerHeader0: ; 50d3a (14:4d3a)
db $1 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText1 ; 0x4e17 TextBeforeBattle
- dw Route20AfterBattleText1 ; 0x4e21 TextAfterBattle
- dw Route20EndBattleText1 ; 0x4e1c TextEndBattle
- dw Route20EndBattleText1 ; 0x4e1c TextEndBattle
+ dw Route20BattleText1 ; TextBeforeBattle
+ dw Route20AfterBattleText1 ; TextAfterBattle
+ dw Route20EndBattleText1 ; TextEndBattle
+ dw Route20EndBattleText1 ; TextEndBattle
Route20TrainerHeader2: ; 50d46 (14:4d46)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText2 ; 0x4e26 TextBeforeBattle
- dw Route20AfterBattleText2 ; 0x4e30 TextAfterBattle
- dw Route20EndBattleText2 ; 0x4e2b TextEndBattle
- dw Route20EndBattleText2 ; 0x4e2b TextEndBattle
+ dw Route20BattleText2 ; TextBeforeBattle
+ dw Route20AfterBattleText2 ; TextAfterBattle
+ dw Route20EndBattleText2 ; TextEndBattle
+ dw Route20EndBattleText2 ; TextEndBattle
Route20TrainerHeader3: ; 50d52 (14:4d52)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText3 ; 0x4e35 TextBeforeBattle
- dw Route20AfterBattleText3 ; 0x4e3f TextAfterBattle
- dw Route20EndBattleText3 ; 0x4e3a TextEndBattle
- dw Route20EndBattleText3 ; 0x4e3a TextEndBattle
+ dw Route20BattleText3 ; TextBeforeBattle
+ dw Route20AfterBattleText3 ; TextAfterBattle
+ dw Route20EndBattleText3 ; TextEndBattle
+ dw Route20EndBattleText3 ; TextEndBattle
Route20TrainerHeader4: ; 50d5e (14:4d5e)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText4 ; 0x4e44 TextBeforeBattle
- dw Route20AfterBattleText4 ; 0x4e4e TextAfterBattle
- dw Route20EndBattleText4 ; 0x4e49 TextEndBattle
- dw Route20EndBattleText4 ; 0x4e49 TextEndBattle
+ dw Route20BattleText4 ; TextBeforeBattle
+ dw Route20AfterBattleText4 ; TextAfterBattle
+ dw Route20EndBattleText4 ; TextEndBattle
+ dw Route20EndBattleText4 ; TextEndBattle
Route20TrainerHeader5: ; 50d6a (14:4d6a)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText5 ; 0x4e53 TextBeforeBattle
- dw Route20AfterBattleText5 ; 0x4e5d TextAfterBattle
- dw Route20EndBattleText5 ; 0x4e58 TextEndBattle
- dw Route20EndBattleText5 ; 0x4e58 TextEndBattle
+ dw Route20BattleText5 ; TextBeforeBattle
+ dw Route20AfterBattleText5 ; TextAfterBattle
+ dw Route20EndBattleText5 ; TextEndBattle
+ dw Route20EndBattleText5 ; TextEndBattle
Route20TrainerHeader6: ; 50d76 (14:4d76)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText6 ; 0x4e62 TextBeforeBattle
- dw Route20AfterBattleText6 ; 0x4e6c TextAfterBattle
- dw Route20EndBattleText6 ; 0x4e67 TextEndBattle
- dw Route20EndBattleText6 ; 0x4e67 TextEndBattle
+ dw Route20BattleText6 ; TextBeforeBattle
+ dw Route20AfterBattleText6 ; TextAfterBattle
+ dw Route20EndBattleText6 ; TextEndBattle
+ dw Route20EndBattleText6 ; TextEndBattle
Route20TrainerHeader7: ; 50d82 (14:4d82)
db $7 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText7 ; 0x4e71 TextBeforeBattle
- dw Route20AfterBattleText7 ; 0x4e7b TextAfterBattle
- dw Route20EndBattleText7 ; 0x4e76 TextEndBattle
- dw Route20EndBattleText7 ; 0x4e76 TextEndBattle
+ dw Route20BattleText7 ; TextBeforeBattle
+ dw Route20AfterBattleText7 ; TextAfterBattle
+ dw Route20EndBattleText7 ; TextEndBattle
+ dw Route20EndBattleText7 ; TextEndBattle
Route20TrainerHeader8: ; 50d8e (14:4d8e)
db $8 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText8 ; 0x4e80 TextBeforeBattle
- dw Route20AfterBattleText8 ; 0x4e8a TextAfterBattle
- dw Route20EndBattleText8 ; 0x4e85 TextEndBattle
- dw Route20EndBattleText8 ; 0x4e85 TextEndBattle
+ dw Route20BattleText8 ; TextBeforeBattle
+ dw Route20AfterBattleText8 ; TextAfterBattle
+ dw Route20EndBattleText8 ; TextEndBattle
+ dw Route20EndBattleText8 ; TextEndBattle
Route20TrainerHeader9: ; 50d9a (14:4d9a)
db $9 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText9 ; 0x4e8f TextBeforeBattle
- dw Route20AfterBattleText9 ; 0x4e99 TextAfterBattle
- dw Route20EndBattleText9 ; 0x4e94 TextEndBattle
- dw Route20EndBattleText9 ; 0x4e94 TextEndBattle
+ dw Route20BattleText9 ; TextBeforeBattle
+ dw Route20AfterBattleText9 ; TextAfterBattle
+ dw Route20EndBattleText9 ; TextEndBattle
+ dw Route20EndBattleText9 ; TextEndBattle
Route20TrainerHeader10: ; 50da6 (14:4da6)
db $a ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e7 ; flag's byte
- dw Route20BattleText10 ; 0x4e9e TextBeforeBattle
- dw Route20AfterBattleText10 ; 0x4ea8 TextAfterBattle
- dw Route20EndBattleText10 ; 0x4ea3 TextEndBattle
- dw Route20EndBattleText10 ; 0x4ea3 TextEndBattle
+ dw Route20BattleText10 ; TextBeforeBattle
+ dw Route20AfterBattleText10 ; TextAfterBattle
+ dw Route20EndBattleText10 ; TextEndBattle
+ dw Route20EndBattleText10 ; TextEndBattle
db $ff
Route20Text1: ; 50db3 (14:4db3)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route20Text2: ; 50dbd (14:4dbd)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route20Text3: ; 50dc7 (14:4dc7)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route20Text4: ; 50dd1 (14:4dd1)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route20Text5: ; 50ddb (14:4ddb)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route20Text6: ; 50de5 (14:4de5)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route20Text7: ; 50def (14:4def)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route20Text8: ; 50df9 (14:4df9)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route20Text9: ; 50e03 (14:4e03)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
Route20Text10: ; 50e0d (14:4e0d)
- db $08 ; asm
+ TX_ASM
ld hl, Route20TrainerHeader10
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route21.asm b/scripts/route21.asm
index de2046dc..cbb5ea7b 100755
--- a/scripts/route21.asm
+++ b/scripts/route21.asm
@@ -28,135 +28,135 @@ Route21TrainerHeader0: ; 55f16 (15:5f16)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd7e9 ; flag's byte
- dw Route21BattleText1 ; 0x5fdd TextBeforeBattle
- dw Route21AfterBattleText1 ; 0x5fe7 TextAfterBattle
- dw Route21EndBattleText1 ; 0x5fe2 TextEndBattle
- dw Route21EndBattleText1 ; 0x5fe2 TextEndBattle
+ dw Route21BattleText1 ; TextBeforeBattle
+ dw Route21AfterBattleText1 ; TextAfterBattle
+ dw Route21EndBattleText1 ; TextEndBattle
+ dw Route21EndBattleText1 ; TextEndBattle
Route21TrainerHeader1: ; 55f22 (15:5f22)
db $2 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd7e9 ; flag's byte
- dw Route21BattleText2 ; 0x5fec TextBeforeBattle
- dw Route21AfterBattleText2 ; 0x5ff6 TextAfterBattle
- dw Route21EndBattleText2 ; 0x5ff1 TextEndBattle
- dw Route21EndBattleText2 ; 0x5ff1 TextEndBattle
+ dw Route21BattleText2 ; TextBeforeBattle
+ dw Route21AfterBattleText2 ; TextAfterBattle
+ dw Route21EndBattleText2 ; TextEndBattle
+ dw Route21EndBattleText2 ; TextEndBattle
Route21TrainerHeader2: ; 55f2e (15:5f2e)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e9 ; flag's byte
- dw Route21BattleText3 ; 0x5ffb TextBeforeBattle
- dw Route21AfterBattleText3 ; 0x6005 TextAfterBattle
- dw Route21EndBattleText3 ; 0x6000 TextEndBattle
- dw Route21EndBattleText3 ; 0x6000 TextEndBattle
+ dw Route21BattleText3 ; TextBeforeBattle
+ dw Route21AfterBattleText3 ; TextAfterBattle
+ dw Route21EndBattleText3 ; TextEndBattle
+ dw Route21EndBattleText3 ; TextEndBattle
Route21TrainerHeader3: ; 55f3a (15:5f3a)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e9 ; flag's byte
- dw Route21BattleText4 ; 0x600a TextBeforeBattle
- dw Route21AfterBattleText4 ; 0x6014 TextAfterBattle
- dw Route21EndBattleText4 ; 0x600f TextEndBattle
- dw Route21EndBattleText4 ; 0x600f TextEndBattle
+ dw Route21BattleText4 ; TextBeforeBattle
+ dw Route21AfterBattleText4 ; TextAfterBattle
+ dw Route21EndBattleText4 ; TextEndBattle
+ dw Route21EndBattleText4 ; TextEndBattle
Route21TrainerHeader4: ; 55f46 (15:5f46)
db $5 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e9 ; flag's byte
- dw Route21BattleText5 ; 0x6019 TextBeforeBattle
- dw Route21AfterBattleText5 ; 0x6023 TextAfterBattle
- dw Route21EndBattleText5 ; 0x601e TextEndBattle
- dw Route21EndBattleText5 ; 0x601e TextEndBattle
+ dw Route21BattleText5 ; TextBeforeBattle
+ dw Route21AfterBattleText5 ; TextAfterBattle
+ dw Route21EndBattleText5 ; TextEndBattle
+ dw Route21EndBattleText5 ; TextEndBattle
Route21TrainerHeader5: ; 55f52 (15:5f52)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7e9 ; flag's byte
- dw Route21BattleText6 ; 0x6028 TextBeforeBattle
- dw Route21AfterBattleText6 ; 0x6032 TextAfterBattle
- dw Route21EndBattleText6 ; 0x602d TextEndBattle
- dw Route21EndBattleText6 ; 0x602d TextEndBattle
+ dw Route21BattleText6 ; TextBeforeBattle
+ dw Route21AfterBattleText6 ; TextAfterBattle
+ dw Route21EndBattleText6 ; TextEndBattle
+ dw Route21EndBattleText6 ; TextEndBattle
Route21TrainerHeader6: ; 55f5e (15:5f5e)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7e9 ; flag's byte
- dw Route21BattleText7 ; 0x6037 TextBeforeBattle
- dw Route21AfterBattleText7 ; 0x6041 TextAfterBattle
- dw Route21EndBattleText7 ; 0x603c TextEndBattle
- dw Route21EndBattleText7 ; 0x603c TextEndBattle
+ dw Route21BattleText7 ; TextBeforeBattle
+ dw Route21AfterBattleText7 ; TextAfterBattle
+ dw Route21EndBattleText7 ; TextEndBattle
+ dw Route21EndBattleText7 ; TextEndBattle
Route21TrainerHeader7: ; 55f6a (15:5f6a)
db $8 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd7e9 ; flag's byte
- dw Route21BattleText8 ; 0x6046 TextBeforeBattle
- dw Route21AfterBattleText8 ; 0x6050 TextAfterBattle
- dw Route21EndBattleText8 ; 0x604b TextEndBattle
- dw Route21EndBattleText8 ; 0x604b TextEndBattle
+ dw Route21BattleText8 ; TextBeforeBattle
+ dw Route21AfterBattleText8 ; TextAfterBattle
+ dw Route21EndBattleText8 ; TextEndBattle
+ dw Route21EndBattleText8 ; TextEndBattle
Route21TrainerHeader8: ; 55f76 (15:5f76)
db $9 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd7e9 ; flag's byte
- dw Route21BattleText9 ; 0x6055 TextBeforeBattle
- dw Route21AfterBattleText9 ; 0x605f TextAfterBattle
- dw Route21EndBattleText9 ; 0x605a TextEndBattle
- dw Route21EndBattleText9 ; 0x605a TextEndBattle
+ dw Route21BattleText9 ; TextBeforeBattle
+ dw Route21AfterBattleText9 ; TextAfterBattle
+ dw Route21EndBattleText9 ; TextEndBattle
+ dw Route21EndBattleText9 ; TextEndBattle
db $ff
Route21Text1: ; 55f83 (15:5f83)
- db $08 ; asm
+ TX_ASM
ld hl, Route21TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route21Text2: ; 55f8d (15:5f8d)
- db $08 ; asm
+ TX_ASM
ld hl, Route21TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
Route21Text3: ; 55f97 (15:5f97)
- db $08 ; asm
+ TX_ASM
ld hl, Route21TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route21Text4: ; 55fa1 (15:5fa1)
- db $08 ; asm
+ TX_ASM
ld hl, Route21TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route21Text5: ; 55fab (15:5fab)
- db $08 ; asm
+ TX_ASM
ld hl, Route21TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route21Text6: ; 55fb5 (15:5fb5)
- db $08 ; asm
+ TX_ASM
ld hl, Route21TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route21Text7: ; 55fbf (15:5fbf)
- db $08 ; asm
+ TX_ASM
ld hl, Route21TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route21Text8: ; 55fc9 (15:5fc9)
- db $08 ; asm
+ TX_ASM
ld hl, Route21TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route21Text9: ; 55fd3 (15:5fd3)
- db $08 ; asm
+ TX_ASM
ld hl, Route21TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route22.asm b/scripts/route22.asm
index 9181380a..7d70924b 100755
--- a/scripts/route22.asm
+++ b/scripts/route22.asm
@@ -22,7 +22,7 @@ Route22Script7: ; 50ed5 (14:4ed5)
ret
Route22Script_50ed6: ; 50ed6 (14:4ed6)
- ld a, [W_RIVALSTARTER] ; wd715
+ ld a, [W_RIVALSTARTER]
ld b, a
.asm_50eda
ld a, [hli]
@@ -32,11 +32,11 @@ Route22Script_50ed6: ; 50ed6 (14:4ed6)
jr .asm_50eda
.asm_50ee1
ld a, [hl]
- ld [W_TRAINERNO], a ; wd05d
+ ld [W_TRAINERNO], a
ret
Route22MoveRivalSprite: ; 50ee6 (14:4ee6)
- ld de, Route22RivalMovementData ; $4efb
+ ld de, Route22RivalMovementData
ld a, [wcf0d]
cp $1
jr z, .asm_50ef1
@@ -54,7 +54,7 @@ Route22Script0: ; 50f00 (14:4f00)
ld a, [wd7eb]
bit 7, a
ret z
- ld hl, .Route22RivalBattleCoords ; $4f2d
+ ld hl, .Route22RivalBattleCoords
call ArePlayerCoordsInArray
ret nc
ld a, [wWhichTrade]
@@ -67,7 +67,7 @@ Route22Script0: ; 50f00 (14:4f00)
ld [wd528], a
ld a, [wd7eb]
bit 0, a ; is this the rival battle at the beginning of the game?
- jr nz, .firstRivalBattle ; 0x50f25 $b
+ jr nz, .firstRivalBattle
bit 1, a ; is this the rival at the end of the game?
jp nz, Route22Script_5104e
ret
@@ -85,7 +85,7 @@ Route22Script0: ; 50f00 (14:4f00)
predef EmotionBubble
ld a, [wWalkBikeSurfState]
and a
- jr z, .asm_50f4e ; 0x50f44 $8
+ jr z, .asm_50f4e
ld a, $ff
ld [wc0ee], a
call PlaySound
@@ -106,11 +106,11 @@ Route22Script1: ; 50f62 (14:4f62)
ret nz
ld a, [wcf0d]
cp $1
- jr nz, .asm_50f78 ; 0x50f6d $9
+ jr nz, .asm_50f78
ld a, $4
ld [wd528], a
ld a, $4
- jr .asm_50f7a ; 0x50f76 $2
+ jr .asm_50f7a
.asm_50f78
ld a, $c
.asm_50f7a
@@ -131,7 +131,7 @@ Route22Script1: ; 50f62 (14:4f62)
call SaveEndBattleTextPointers
ld a, SONY1 + $c8
ld [W_CUROPPONENT], a
- ld hl, StarterMons_50faf ; $4faf
+ ld hl, StarterMons_50faf
call Route22Script_50ed6
ld a, $2
ld [W_ROUTE22CURSCRIPT], a
@@ -148,13 +148,13 @@ Route22Script2: ; 50fb5 (14:4fb5)
cp $ff
jp z, Route22Script_50ece
ld a, [wSpriteStateData1 + 9]
- and a
- jr nz, .asm_50fc7 ; 0x50fc1 $4
- ld a, $4
- jr .asm_50fc9 ; 0x50fc5 $2
-.asm_50fc7
- ld a, $c
-.asm_50fc9
+ and a ; cp SPRITE_FACING_DOWN
+ jr nz, .notDown
+ ld a, SPRITE_FACING_UP
+ jr .done
+.notDown
+ ld a, SPRITE_FACING_RIGHT
+.done
ld [$ff8d], a
ld a, $1
ld [$ff8c], a
@@ -172,9 +172,9 @@ Route22Script2: ; 50fb5 (14:4fb5)
callba Music_RivalAlternateStart
ld a, [wcf0d]
cp $1
- jr nz, .asm_50fff ; 0x50ff8 $5
+ jr nz, .asm_50fff
call Route22Script_51008
- jr .asm_51002 ; 0x50ffd $3
+ jr .asm_51002
.asm_50fff
call Route22Script_5100d
.asm_51002
@@ -183,12 +183,12 @@ Route22Script2: ; 50fb5 (14:4fb5)
ret
Route22Script_51008: ; 51008 (14:5008)
- ld de, Route22RivalExitMovementData1 ; $5017
- jr asm_51010
+ ld de, Route22RivalExitMovementData1
+ jr Route22MoveRival1
Route22Script_5100d: ; 5100d (14:500d)
- ld de, Route22RivalExitMovementData2 ; $501f
-asm_51010
+ ld de, Route22RivalExitMovementData2
+Route22MoveRival1: ; 51010 (14:5010)
ld a, $1
ld [H_SPRITEHEIGHT], a
jp MoveSprite
@@ -234,7 +234,7 @@ Route22Script_5104e: ; 5104e (14:504e)
call PlaySound
callba Music_RivalAlternateTempo
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call Route22MoveRivalSprite
ld a, $4
ld [W_ROUTE22CURSCRIPT], a
@@ -245,7 +245,7 @@ Route22Script4: ; 51087 (14:5087)
bit 0, a
ret nz
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
ld a, [wcf0d]
cp $1
jr nz, .asm_510a1
@@ -263,17 +263,17 @@ Route22Script4: ; 51087 (14:5087)
xor a
ld [wJoyIgnore], a
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, Route22RivalDefeatedText2 ; $51cb
- ld de, Route22Text_511d0 ; $51d0
+ ld hl, Route22RivalDefeatedText2
+ ld de, Route22Text_511d0
call SaveEndBattleTextPointers
ld a, SONY2 + $c8
- ld [W_CUROPPONENT], a ; wd059
- ld hl, StarterMons_510d9 ; $50d9
+ ld [W_CUROPPONENT], a
+ ld hl, StarterMons_510d9
call Route22Script_50ed6
ld a, $5
ld [W_ROUTE22CURSCRIPT], a
@@ -285,11 +285,11 @@ StarterMons_510d9: ; 510d9 (14:50d9)
db STARTER1,$0c
Route22Script5: ; 510df (14:50df)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, Route22Script_50ece
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
ld a, [wcf0d]
cp $1
jr nz, .asm_510fb
@@ -309,7 +309,7 @@ Route22Script5: ; 510df (14:50df)
ld hl, wd7eb
set 6, [hl]
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, $ff
ld [wc0ee], a
@@ -328,14 +328,14 @@ Route22Script5: ; 510df (14:50df)
ret
Route22Script_5113d: ; 5113d (14:513d)
- ld de, MovementData_5114c ; $514c
- jr asm_51145
+ ld de, MovementData_5114c
+ jr Route22MoveRival2
Route22Script_51142: ; 51142 (14:5142)
- ld de, MovementData_5114d ; $514d
-asm_51145: ; 51145 (14:5145)
+ ld de, MovementData_5114d
+Route22MoveRival2: ; 51145 (14:5145)
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp MoveSprite
MovementData_5114c: ; 5114c (14:514c)
@@ -367,31 +367,31 @@ Route22TextPointers: ; 51175 (14:5175)
dw Route22FrontGateText
Route22Text1: ; 5117b (14:517b)
- db $08 ; asm
+ TX_ASM
ld a, [wd7eb]
bit 5, a
- jr z, .asm_a88cf ; 0x51181
+ jr z, .asm_5118b
ld hl, Route22RivalAfterBattleText1
call PrintText
- jr .asm_48088 ; 0x51189
-.asm_a88cf ; 0x5118b
+ jr .asm_51191
+.asm_5118b
ld hl, Route22RivalBeforeBattleText1
call PrintText
-.asm_48088 ; 0x51191
+.asm_51191
jp TextScriptEnd
Route22Text2: ; 51194 (14:5194)
- db $08 ; asm
+ TX_ASM
ld a, [wd7eb]
bit 6, a
- jr z, .asm_58c0a ; 0x5119a
+ jr z, .asm_511a4
ld hl, Route22RivalAfterBattleText2
call PrintText
- jr .asm_673ee ; 0x511a2
-.asm_58c0a ; 0x511a4
+ jr .asm_511aa
+.asm_511a4
ld hl, Route22RivalBeforeBattleText2
call PrintText
-.asm_673ee ; 0x511aa
+.asm_511aa
jp TextScriptEnd
Route22RivalBeforeBattleText1: ; 511ad (14:51ad)
diff --git a/scripts/route22gate.asm b/scripts/route22gate.asm
index 6618d6a2..4b099bb2 100755
--- a/scripts/route22gate.asm
+++ b/scripts/route22gate.asm
@@ -6,7 +6,7 @@ Route22GateScript: ; 1e683 (7:6683)
ld a, [W_YCOORD]
cp $4
ld a, ROUTE_23
- jr c, .asm_1e69a ; 0x1e696 $2
+ jr c, .asm_1e69a
ld a, ROUTE_22
.asm_1e69a
ld [wLastMap], a
@@ -57,30 +57,30 @@ Route22GateTextPointers: ; 1e6df (7:66df)
dw Route22GateText1
Route22GateText1: ; 1e6e1 (7:66e1)
- db $8
+ TX_ASM
ld a, [W_OBTAINEDBADGES]
bit 0, a
- jr nz, .asm_8a809 ; 0x1e6e7 $d
+ jr nz, .asm_1e6f6
ld hl, Route22GateText_1e704
call PrintText
call Route22GateScript_1e6ba
ld a, $1
- jr .asm_20f7e ; 0x1e6f4 $8
-.asm_8a809 ; 0x1e6f6
+ jr .asm_1e6fe
+.asm_1e6f6
ld hl, Route22GateText_1e71a
call PrintText
ld a, $2
-.asm_20f7e ; 0x1e6fe
+.asm_1e6fe
ld [W_ROUTE22GATECURSCRIPT], a
jp TextScriptEnd
Route22GateText_1e704: ; 1e704 (7:6704)
- TX_FAR _Route22GateText_1e704 ; 0x8cfbb
- db $8
+ TX_FAR _Route22GateText_1e704
+ TX_ASM
ld a, (SFX_02_51 - SFX_Headers_02) / 3
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
- ld hl, Route22GateText_1e715 ; $6715
+ ld hl, Route22GateText_1e715
ret
Route22GateText_1e715: ; 1e715 (7:6715)
@@ -88,5 +88,5 @@ Route22GateText_1e715: ; 1e715 (7:6715)
db "@"
Route22GateText_1e71a: ; 1e71a (7:671a)
- TX_FAR _Route22GateText_1e71a ; 0x8d03e
+ TX_FAR _Route22GateText_1e71a
db $0B, "@"
diff --git a/scripts/route23.asm b/scripts/route23.asm
index 6d3849f4..aaa85822 100755
--- a/scripts/route23.asm
+++ b/scripts/route23.asm
@@ -29,7 +29,7 @@ Route23ScriptPointers: ; 51213 (14:5213)
dw Route23Script2
Route23Script0: ; 51219 (14:5219)
- ld hl, YCoordsData_51255 ; $5255
+ ld hl, YCoordsData_51255
ld a, [W_YCOORD]
ld b, a
ld e, $0
@@ -41,9 +41,9 @@ Route23Script0: ; 51219 (14:5219)
inc e
dec c
cp b
- jr nz, .asm_51224 ; 0x5122b $f7
+ jr nz, .asm_51224
cp $23
- jr nz, .asm_51237 ; 0x5122f $6
+ jr nz, .asm_51237
ld a, [W_XCOORD]
cp $e
ret nc
@@ -68,8 +68,8 @@ YCoordsData_51255: ; 51255 (14:5255)
db $23,$38,$55,$60,$69,$77,$88,$FF
Route23Script_5125d: ; 5125d (14:525d)
- ld hl, BadgeTextPointers ; $5276
- ld a, [wWhichTrade] ; wWhichTrade
+ ld hl, BadgeTextPointers
+ ld a, [wWhichTrade]
ld c, a
ld b, $0
add hl, bc
@@ -146,51 +146,51 @@ Route23TextPointers: ; 512f7 (14:52f7)
dw Route23Text8
Route23Text1: ; 51307 (14:5307)
- db $08 ; asm
+ TX_ASM
ld a, $6
call Route23Script_51346
jp TextScriptEnd
Route23Text2: ; 51310 (14:5310)
- db $08 ; asm
+ TX_ASM
ld a, $5
call Route23Script_51346
jp TextScriptEnd
Route23Text3: ; 51319 (14:5319)
- db $08 ; asm
+ TX_ASM
ld a, $4
call Route23Script_51346
jp TextScriptEnd
Route23Text4: ; 51322 (14:5322)
- db $08 ; asm
+ TX_ASM
ld a, $3
call Route23Script_51346
jp TextScriptEnd
Route23Text5: ; 5132b (14:532b)
- db $08 ; asm
+ TX_ASM
ld a, $2
call Route23Script_51346
jp TextScriptEnd
Route23Text6: ; 51334 (14:5334)
- db $08 ; asm
+ TX_ASM
ld a, $1
call Route23Script_51346
jp TextScriptEnd
Route23Text7: ; 5133d (14:533d)
- db $8
+ TX_ASM
ld a, $0
call Route23Script_51346
jp TextScriptEnd
Route23Script_51346: ; 51346 (14:5346)
- ld [wWhichTrade], a ; wWhichTrade
+ ld [wWhichTrade], a
call Route23Script_5125d
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
inc a
ld c, a
ld b, $2
@@ -208,7 +208,7 @@ Route23Script_51346: ; 51346 (14:5346)
.asm_5136e
ld hl, VictoryRoadGuardText2
call PrintText
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld c, a
ld b, $1
ld hl, wd7ed
@@ -223,7 +223,7 @@ Route23Script_51388: ; 51388 (14:5388)
VictoryRoadGuardText1: ; 5138e (14:538e)
TX_FAR _VictoryRoadGuardText1
- db $08 ; asm
+ TX_ASM
ld a, (SFX_02_51 - SFX_Headers_02) / 3
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
diff --git a/scripts/route24.asm b/scripts/route24.asm
index 6916cbe7..24866ed7 100755
--- a/scripts/route24.asm
+++ b/scripts/route24.asm
@@ -25,13 +25,13 @@ Route24Script0: ; 513d5 (14:53d5)
ld a, [wd7ef]
bit 0, a
jp nz, CheckFightingMapTrainers
- ld hl, CoordsData_5140e ; $540e
+ ld hl, CoordsData_5140e
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
ld [hJoyHeld], a
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd7f0
bit 1, [hl]
@@ -61,7 +61,7 @@ Route24Script4: ; 51411 (14:5411)
ret
Route24Script3: ; 51422 (14:5422)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, Route24Script_513c0
call UpdateSprites
@@ -70,7 +70,7 @@ Route24Script3: ; 51422 (14:5422)
ld hl, wd7ef
set 1, [hl]
ld a, $1
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
@@ -94,65 +94,65 @@ Route24TrainerHeader0: ; 5145b (14:545b)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7ef ; flag's byte
- dw Route24BattleText1 ; 0x5571 TextBeforeBattle
- dw Route24AfterBattleText1 ; 0x557b TextAfterBattle
- dw Route24EndBattleText1 ; 0x5576 TextEndBattle
- dw Route24EndBattleText1 ; 0x5576 TextEndBattle
+ dw Route24BattleText1 ; TextBeforeBattle
+ dw Route24AfterBattleText1 ; TextAfterBattle
+ dw Route24EndBattleText1 ; TextEndBattle
+ dw Route24EndBattleText1 ; TextEndBattle
Route24TrainerHeader2: ; 51467 (14:5467)
db $3 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte
- dw Route24BattleText2 ; 0x5580 TextBeforeBattle
- dw Route24AfterBattleText2 ; 0x558a TextAfterBattle
- dw Route24EndBattleText2 ; 0x5585 TextEndBattle
- dw Route24EndBattleText2 ; 0x5585 TextEndBattle
+ dw Route24BattleText2 ; TextBeforeBattle
+ dw Route24AfterBattleText2 ; TextAfterBattle
+ dw Route24EndBattleText2 ; TextEndBattle
+ dw Route24EndBattleText2 ; TextEndBattle
Route24TrainerHeader3: ; 51473 (14:5473)
db $4 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte
- dw Route24BattleText3 ; 0x558f TextBeforeBattle
- dw Route24AfterBattleText3 ; 0x5599 TextAfterBattle
- dw Route24EndBattleText3 ; 0x5594 TextEndBattle
- dw Route24EndBattleText3 ; 0x5594 TextEndBattle
+ dw Route24BattleText3 ; TextBeforeBattle
+ dw Route24AfterBattleText3 ; TextAfterBattle
+ dw Route24EndBattleText3 ; TextEndBattle
+ dw Route24EndBattleText3 ; TextEndBattle
Route24TrainerHeader4: ; 5147f (14:547f)
db $5 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte
- dw Route24BattleText4 ; 0x559e TextBeforeBattle
- dw Route24AfterBattleText4 ; 0x55a8 TextAfterBattle
- dw Route24EndBattleText4 ; 0x55a3 TextEndBattle
- dw Route24EndBattleText4 ; 0x55a3 TextEndBattle
+ dw Route24BattleText4 ; TextBeforeBattle
+ dw Route24AfterBattleText4 ; TextAfterBattle
+ dw Route24EndBattleText4 ; TextEndBattle
+ dw Route24EndBattleText4 ; TextEndBattle
Route24TrainerHeader5: ; 5148b (14:548b)
db $6 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte
- dw Route24BattleText5 ; 0x55ad TextBeforeBattle
- dw Route24AfterBattleText5 ; 0x55b7 TextAfterBattle
- dw Route24EndBattleText5 ; 0x55b2 TextEndBattle
- dw Route24EndBattleText5 ; 0x55b2 TextEndBattle
+ dw Route24BattleText5 ; TextBeforeBattle
+ dw Route24AfterBattleText5 ; TextAfterBattle
+ dw Route24EndBattleText5 ; TextEndBattle
+ dw Route24EndBattleText5 ; TextEndBattle
Route24TrainerHeader6: ; 51497 (14:5497)
db $7 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd7ef ; flag's byte
- dw Route24BattleText6 ; 0x55bc TextBeforeBattle
- dw Route24AfterBattleText6 ; 0x55c6 TextAfterBattle
- dw Route24EndBattleText6 ; 0x55c1 TextEndBattle
- dw Route24EndBattleText6 ; 0x55c1 TextEndBattle
+ dw Route24BattleText6 ; TextBeforeBattle
+ dw Route24AfterBattleText6 ; TextAfterBattle
+ dw Route24EndBattleText6 ; TextEndBattle
+ dw Route24EndBattleText6 ; TextEndBattle
db $ff
Route24Text1: ; 514a4 (14:54a4)
- db $8
+ TX_ASM
ld hl, wd7f0
res 1, [hl]
ld a, [wd7ef]
bit 0, a
- jr nz, .asm_a03f5 ; 0x514af $48
+ jr nz, .asm_514f9
ld hl, Route24Text_51510
call PrintText
ld bc, (NUGGET << 8) | 1
@@ -180,7 +180,7 @@ Route24Text1: ; 514a4 (14:54a4)
ld [W_ROUTE24CURSCRIPT], a
ld [W_CURMAPSCRIPT], a
jp TextScriptEnd
-.asm_a03f5 ; 0x514f9
+.asm_514f9
ld hl, Route24Text_51530
call PrintText
jp TextScriptEnd
@@ -192,13 +192,13 @@ Route24Text1: ; 514a4 (14:54a4)
jp TextScriptEnd
Route24Text_51510: ; 51510 (14:5510)
- TX_FAR _Route24Text_51510 ; 0x92721
+ TX_FAR _Route24Text_51510
db $0B
- TX_FAR _Route24Text_51515 ; 0x92755
+ TX_FAR _Route24Text_51515
db "@"
Route24Text_5151a: ; 5151a (14:551a)
- TX_FAR _Route24Text_5151a ; 0x92779
+ TX_FAR _Route24Text_5151a
db $0B, $6, "@"
Route24Text_51521: ; 51521 (14:5521)
@@ -218,37 +218,37 @@ Route24Text_51530: ; 51530 (14:5530)
db "@"
Route24Text2: ; 51535 (14:5535)
- db $08 ; asm
+ TX_ASM
ld hl, Route24TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route24Text3: ; 5153f (14:553f)
- db $08 ; asm
+ TX_ASM
ld hl, Route24TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route24Text4: ; 51549 (14:5549)
- db $08 ; asm
+ TX_ASM
ld hl, Route24TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route24Text5: ; 51553 (14:5553)
- db $08 ; asm
+ TX_ASM
ld hl, Route24TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route24Text6: ; 5155d (14:555d)
- db $08 ; asm
+ TX_ASM
ld hl, Route24TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route24Text7: ; 51567 (14:5567)
- db $08 ; asm
+ TX_ASM
ld hl, Route24TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route25.asm b/scripts/route25.asm
index b915bdee..383652c8 100755
--- a/scripts/route25.asm
+++ b/scripts/route25.asm
@@ -59,135 +59,135 @@ Route25TrainerHeader0: ; 5163e (14:563e)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7f1 ; flag's byte
- dw Route25BattleText1 ; 0x5705 TextBeforeBattle
- dw Route25AfterBattleText1 ; 0x570f TextAfterBattle
- dw Route25EndBattleText1 ; 0x570a TextEndBattle
- dw Route25EndBattleText1 ; 0x570a TextEndBattle
+ dw Route25BattleText1 ; TextBeforeBattle
+ dw Route25AfterBattleText1 ; TextAfterBattle
+ dw Route25EndBattleText1 ; TextEndBattle
+ dw Route25EndBattleText1 ; TextEndBattle
Route25TrainerHeader2: ; 5164a (14:564a)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7f1 ; flag's byte
- dw Route25BattleText2 ; 0x5714 TextBeforeBattle
- dw Route25AfterBattleText2 ; 0x571e TextAfterBattle
- dw Route25EndBattleText2 ; 0x5719 TextEndBattle
- dw Route25EndBattleText2 ; 0x5719 TextEndBattle
+ dw Route25BattleText2 ; TextBeforeBattle
+ dw Route25AfterBattleText2 ; TextAfterBattle
+ dw Route25EndBattleText2 ; TextEndBattle
+ dw Route25EndBattleText2 ; TextEndBattle
Route25TrainerHeader3: ; 51656 (14:5656)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7f1 ; flag's byte
- dw Route25BattleText3 ; 0x5723 TextBeforeBattle
- dw Route25AfterBattleText3 ; 0x572d TextAfterBattle
- dw Route25EndBattleText3 ; 0x5728 TextEndBattle
- dw Route25EndBattleText3 ; 0x5728 TextEndBattle
+ dw Route25BattleText3 ; TextBeforeBattle
+ dw Route25AfterBattleText3 ; TextAfterBattle
+ dw Route25EndBattleText3 ; TextEndBattle
+ dw Route25EndBattleText3 ; TextEndBattle
Route25TrainerHeader4: ; 51662 (14:5662)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7f1 ; flag's byte
- dw Route25BattleText4 ; 0x5732 TextBeforeBattle
- dw Route25AfterBattleText4 ; 0x573c TextAfterBattle
- dw Route25EndBattleText4 ; 0x5737 TextEndBattle
- dw Route25EndBattleText4 ; 0x5737 TextEndBattle
+ dw Route25BattleText4 ; TextBeforeBattle
+ dw Route25AfterBattleText4 ; TextAfterBattle
+ dw Route25EndBattleText4 ; TextEndBattle
+ dw Route25EndBattleText4 ; TextEndBattle
Route25TrainerHeader5: ; 5166e (14:566e)
db $5 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7f1 ; flag's byte
- dw Route25BattleText5 ; 0x5741 TextBeforeBattle
- dw Route25AfterBattleText5 ; 0x574b TextAfterBattle
- dw Route25EndBattleText5 ; 0x5746 TextEndBattle
- dw Route25EndBattleText5 ; 0x5746 TextEndBattle
+ dw Route25BattleText5 ; TextBeforeBattle
+ dw Route25AfterBattleText5 ; TextAfterBattle
+ dw Route25EndBattleText5 ; TextEndBattle
+ dw Route25EndBattleText5 ; TextEndBattle
Route25TrainerHeader6: ; 5167a (14:567a)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7f1 ; flag's byte
- dw Route25BattleText6 ; 0x5750 TextBeforeBattle
- dw Route25AfterBattleText6 ; 0x575a TextAfterBattle
- dw Route25EndBattleText6 ; 0x5755 TextEndBattle
- dw Route25EndBattleText6 ; 0x5755 TextEndBattle
+ dw Route25BattleText6 ; TextBeforeBattle
+ dw Route25AfterBattleText6 ; TextAfterBattle
+ dw Route25EndBattleText6 ; TextEndBattle
+ dw Route25EndBattleText6 ; TextEndBattle
Route25TrainerHeader7: ; 51686 (14:5686)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7f1 ; flag's byte
- dw Route25BattleText7 ; 0x575f TextBeforeBattle
- dw Route25AfterBattleText7 ; 0x5769 TextAfterBattle
- dw Route25EndBattleText7 ; 0x5764 TextEndBattle
- dw Route25EndBattleText7 ; 0x5764 TextEndBattle
+ dw Route25BattleText7 ; TextBeforeBattle
+ dw Route25AfterBattleText7 ; TextAfterBattle
+ dw Route25EndBattleText7 ; TextEndBattle
+ dw Route25EndBattleText7 ; TextEndBattle
Route25TrainerHeader8: ; 51692 (14:5692)
db $8 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7f1 ; flag's byte
- dw Route25BattleText8 ; 0x576e TextBeforeBattle
- dw Route25AfterBattleText8 ; 0x5778 TextAfterBattle
- dw Route25EndBattleText8 ; 0x5773 TextEndBattle
- dw Route25EndBattleText8 ; 0x5773 TextEndBattle
+ dw Route25BattleText8 ; TextBeforeBattle
+ dw Route25AfterBattleText8 ; TextAfterBattle
+ dw Route25EndBattleText8 ; TextEndBattle
+ dw Route25EndBattleText8 ; TextEndBattle
Route25TrainerHeader9: ; 5169e (14:569e)
db $9 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7f1 ; flag's byte
- dw Route25BattleText9 ; 0x577d TextBeforeBattle
- dw Route25AfterBattleText9 ; 0x5787 TextAfterBattle
- dw Route25EndBattleText9 ; 0x5782 TextEndBattle
- dw Route25EndBattleText9 ; 0x5782 TextEndBattle
+ dw Route25BattleText9 ; TextBeforeBattle
+ dw Route25AfterBattleText9 ; TextAfterBattle
+ dw Route25EndBattleText9 ; TextEndBattle
+ dw Route25EndBattleText9 ; TextEndBattle
db $ff
Route25Text1: ; 516ab (14:56ab)
- db $08 ; asm
+ TX_ASM
ld hl, Route25TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
Route25Text2: ; 516b5 (14:56b5)
- db $08 ; asm
+ TX_ASM
ld hl, Route25TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
Route25Text3: ; 516bf (14:56bf)
- db $08 ; asm
+ TX_ASM
ld hl, Route25TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
Route25Text4: ; 516c9 (14:56c9)
- db $08 ; asm
+ TX_ASM
ld hl, Route25TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
Route25Text5: ; 516d3 (14:56d3)
- db $08 ; asm
+ TX_ASM
ld hl, Route25TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
Route25Text6: ; 516dd (14:56dd)
- db $08 ; asm
+ TX_ASM
ld hl, Route25TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
Route25Text7: ; 516e7 (14:56e7)
- db $08 ; asm
+ TX_ASM
ld hl, Route25TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
Route25Text8: ; 516f1 (14:56f1)
- db $08 ; asm
+ TX_ASM
ld hl, Route25TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
Route25Text9: ; 516fb (14:56fb)
- db $08 ; asm
+ TX_ASM
ld hl, Route25TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route2gate.asm b/scripts/route2gate.asm
index 8ee087c8..e8d02321 100755
--- a/scripts/route2gate.asm
+++ b/scripts/route2gate.asm
@@ -6,30 +6,30 @@ Route2GateTextPointers: ; 5d5d7 (17:55d7)
dw Route2GateText2
Route2GateText1: ; 5d5db (17:55db)
- db $08 ; asm
+ TX_ASM
ld a, [wd7c2]
bit 0, a
- jr nz, .asm_6592c ; 0x5d5e1
+ jr nz, .asm_5d60d
ld a, 10 ; pokemon needed
- ldh [$db], a
+ ld [$ffdb], a
ld a, HM_05 ; oak's aide reward
- ldh [$dc], a
+ ld [$ffdc], a
ld [wd11e], a
- call GetItemName ; $2fcf
+ call GetItemName
ld hl, wcd6d
ld de, wcc5b
ld bc, $000d
call CopyData
predef OaksAideScript ; call oak's aide script
- ldh a, [$db]
+ ld a, [$ffdb]
cp $1
- jr nz, .asm_ad646 ; 0x5d606
+ jr nz, .asm_5d613
ld hl, wd7c2
set 0, [hl]
-.asm_6592c ; 0x5d60d
+.asm_5d60d
ld hl, Route2GateText_5d616
call PrintText
-.asm_ad646 ; 0x5d613
+.asm_5d613
jp TextScriptEnd
Route2GateText_5d616: ; 5d616 (17:5616)
diff --git a/scripts/route2house.asm b/scripts/route2house.asm
index ba13605b..d1312c91 100755
--- a/scripts/route2house.asm
+++ b/scripts/route2house.asm
@@ -10,7 +10,7 @@ Route2HouseText1: ; 1def4 (7:5ef4)
db "@"
Route2HouseText2: ; 1def9 (7:5ef9)
- db $08 ; asm
+ TX_ASM
ld a, $1
ld [wWhichTrade], a
predef DoInGameTradeDialogue
diff --git a/scripts/route3.asm b/scripts/route3.asm
index acb2afce..c39a5435 100755
--- a/scripts/route3.asm
+++ b/scripts/route3.asm
@@ -29,73 +29,73 @@ Route3TrainerHeader0: ; 55525 (15:5525)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7c3 ; flag's byte
- dw Route3BattleText1 ; 0x5595 TextBeforeBattle
- dw Route3AfterBattleText1 ; 0x559f TextAfterBattle
- dw Route3EndBattleText1 ; 0x559a TextEndBattle
- dw Route3EndBattleText1 ; 0x559a TextEndBattle
+ dw Route3BattleText1 ; TextBeforeBattle
+ dw Route3AfterBattleText1 ; TextAfterBattle
+ dw Route3EndBattleText1 ; TextEndBattle
+ dw Route3EndBattleText1 ; TextEndBattle
Route3TrainerHeader2: ; 55531 (15:5531)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7c3 ; flag's byte
- dw Route3BattleText2 ; 0x55ae TextBeforeBattle
- dw Route3AfterBattleText2 ; 0x55b8 TextAfterBattle
- dw Route3EndBattleText2 ; 0x55b3 TextEndBattle
- dw Route3EndBattleText2 ; 0x55b3 TextEndBattle
+ dw Route3BattleText2 ; TextBeforeBattle
+ dw Route3AfterBattleText2 ; TextAfterBattle
+ dw Route3EndBattleText2 ; TextEndBattle
+ dw Route3EndBattleText2 ; TextEndBattle
Route3TrainerHeader3: ; 5553d (15:553d)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7c3 ; flag's byte
- dw Route3BattleText3 ; 0x55c7 TextBeforeBattle
- dw Route3AfterBattleText3 ; 0x55d1 TextAfterBattle
- dw Route3EndBattleText3 ; 0x55cc TextEndBattle
- dw Route3EndBattleText3 ; 0x55cc TextEndBattle
+ dw Route3BattleText3 ; TextBeforeBattle
+ dw Route3AfterBattleText3 ; TextAfterBattle
+ dw Route3EndBattleText3 ; TextEndBattle
+ dw Route3EndBattleText3 ; TextEndBattle
Route3TrainerHeader4: ; 55549 (15:5549)
db $5 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd7c3 ; flag's byte
- dw Route3BattleText4 ; 0x55e0 TextBeforeBattle
- dw Route3AfterBattleText4 ; 0x55ea TextAfterBattle
- dw Route3EndBattleText4 ; 0x55e5 TextEndBattle
- dw Route3EndBattleText4 ; 0x55e5 TextEndBattle
+ dw Route3BattleText4 ; TextBeforeBattle
+ dw Route3AfterBattleText4 ; TextAfterBattle
+ dw Route3EndBattleText4 ; TextEndBattle
+ dw Route3EndBattleText4 ; TextEndBattle
Route3TrainerHeader5: ; 55555 (15:5555)
db $6 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7c3 ; flag's byte
- dw Route3BattleText5 ; 0x55f9 TextBeforeBattle
- dw Route3AfterBattleText5 ; 0x5603 TextAfterBattle
- dw Route3EndBattleText5 ; 0x55fe TextEndBattle
- dw Route3EndBattleText5 ; 0x55fe TextEndBattle
+ dw Route3BattleText5 ; TextBeforeBattle
+ dw Route3AfterBattleText5 ; TextAfterBattle
+ dw Route3EndBattleText5 ; TextEndBattle
+ dw Route3EndBattleText5 ; TextEndBattle
Route3TrainerHeader6: ; 55561 (15:5561)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7c3 ; flag's byte
- dw Route3BattleText6 ; 0x5612 TextBeforeBattle
- dw Route3AfterBattleText6 ; 0x561c TextAfterBattle
- dw Route3EndBattleText6 ; 0x5617 TextEndBattle
- dw Route3EndBattleText6 ; 0x5617 TextEndBattle
+ dw Route3BattleText6 ; TextBeforeBattle
+ dw Route3AfterBattleText6 ; TextAfterBattle
+ dw Route3EndBattleText6 ; TextEndBattle
+ dw Route3EndBattleText6 ; TextEndBattle
Route3TrainerHeader7: ; 5556d (15:556d)
db $8 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7c3 ; flag's byte
- dw Route3BattleText7 ; 0x562b TextBeforeBattle
- dw Route3AfterBattleText7 ; 0x5635 TextAfterBattle
- dw Route3EndBattleText7 ; 0x5630 TextEndBattle
- dw Route3EndBattleText7 ; 0x5630 TextEndBattle
+ dw Route3BattleText7 ; TextBeforeBattle
+ dw Route3AfterBattleText7 ; TextAfterBattle
+ dw Route3EndBattleText7 ; TextEndBattle
+ dw Route3EndBattleText7 ; TextEndBattle
Route3TrainerHeader8: ; 55579 (15:5579)
db $9 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7c3 ; flag's byte
- dw Route3BattleText8 ; 0x5644 TextBeforeBattle
- dw Route3AfterBattleText8 ; 0x564e TextAfterBattle
- dw Route3EndBattleText8 ; 0x5649 TextEndBattle
- dw Route3EndBattleText8 ; 0x5649 TextEndBattle
+ dw Route3BattleText8 ; TextBeforeBattle
+ dw Route3AfterBattleText8 ; TextAfterBattle
+ dw Route3EndBattleText8 ; TextEndBattle
+ dw Route3EndBattleText8 ; TextEndBattle
db $ff
@@ -104,7 +104,7 @@ Route3Text1: ; 55586 (15:5586)
db "@"
Route3Text2: ; 5558b (15:558b)
- db $08 ; asm
+ TX_ASM
ld hl, Route3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -122,7 +122,7 @@ Route3AfterBattleText1: ; 5559f (15:559f)
db "@"
Route3Text3: ; 555a4 (15:55a4)
- db $08 ; asm
+ TX_ASM
ld hl, Route3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -140,7 +140,7 @@ Route3AfterBattleText2: ; 555b8 (15:55b8)
db "@"
Route3Text4: ; 555bd (15:55bd)
- db $08 ; asm
+ TX_ASM
ld hl, Route3TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -158,7 +158,7 @@ Route3AfterBattleText3: ; 555d1 (15:55d1)
db "@"
Route3Text5: ; 555d6 (15:55d6)
- db $08 ; asm
+ TX_ASM
ld hl, Route3TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -176,7 +176,7 @@ Route3AfterBattleText4: ; 555ea (15:55ea)
db "@"
Route3Text6: ; 555ef (15:55ef)
- db $08 ; asm
+ TX_ASM
ld hl, Route3TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -194,7 +194,7 @@ Route3AfterBattleText5: ; 55603 (15:5603)
db "@"
Route3Text7: ; 55608 (15:5608)
- db $08 ; asm
+ TX_ASM
ld hl, Route3TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
@@ -212,7 +212,7 @@ Route3AfterBattleText6: ; 5561c (15:561c)
db "@"
Route3Text8: ; 55621 (15:5621)
- db $08 ; asm
+ TX_ASM
ld hl, Route3TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
@@ -230,7 +230,7 @@ Route3AfterBattleText7: ; 55635 (15:5635)
db "@"
Route3Text9: ; 5563a (15:563a)
- db $08 ; asm
+ TX_ASM
ld hl, Route3TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route4.asm b/scripts/route4.asm
index 5eafb4f7..c4a1e956 100755
--- a/scripts/route4.asm
+++ b/scripts/route4.asm
@@ -25,10 +25,10 @@ Route4TrainerHeader0: ; 5567d (15:567d)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7c5 ; flag's byte
- dw Route4BattleText1 ; 0x5699 TextBeforeBattle
- dw Route4AfterBattleText1 ; 0x56a3 TextAfterBattle
- dw Route4EndBattleText1 ; 0x569e TextEndBattle
- dw Route4EndBattleText1 ; 0x569e TextEndBattle
+ dw Route4BattleText1 ; TextBeforeBattle
+ dw Route4AfterBattleText1 ; TextAfterBattle
+ dw Route4EndBattleText1 ; TextEndBattle
+ dw Route4EndBattleText1 ; TextEndBattle
db $ff
@@ -37,7 +37,7 @@ Route4Text1: ; 5568a (15:568a)
db "@"
Route4Text2: ; 5568f (15:568f)
- db $08 ; asm
+ TX_ASM
ld hl, Route4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route5gate.asm b/scripts/route5gate.asm
index bee70e77..72f226e7 100755
--- a/scripts/route5gate.asm
+++ b/scripts/route5gate.asm
@@ -29,7 +29,7 @@ Route5GateScript0: ; 1df50 (7:5f50)
callba RemoveGuardDrink
ld a, [$ffdb]
and a
- jr nz, .asm_1df82 ; 0x1df70 $10
+ jr nz, .asm_1df82
ld a, $2
ld [$ff8c], a
call DisplayTextID
@@ -69,27 +69,27 @@ Route8GateText1: ; 1dfaa (7:5faa)
Route7GateText1: ; 1dfaa (7:5faa)
Route6GateText1: ; 1dfaa (7:5faa)
Route5GateText1: ; 1dfaa (7:5faa)
- db $8
+ TX_ASM
ld a, [wd728]
bit 6, a
- jr nz, .asm_88856 ; 0x1dfb0 $2c
+ jr nz, .asm_88856
callba RemoveGuardDrink
ld a, [$ffdb]
and a
- jr nz, .asm_768a2 ; 0x1dfbd $11
+ jr nz, .asm_768a2
ld hl, Route5GateText2
call PrintText
call Route5GateScript_1df43
ld a, $1
ld [W_ROUTE5GATECURSCRIPT], a
jp TextScriptEnd
-.asm_768a2 ; 0x1dfd0
+.asm_768a2
ld hl, Route5GateText3
call PrintText
ld hl, wd728
set 6, [hl]
jp TextScriptEnd
-.asm_88856 ; 0x1dfde
+.asm_88856
ld hl, SaffronGateText_1dff6
call PrintText
jp TextScriptEnd
@@ -105,9 +105,9 @@ Route8GateText3: ; 1dfec (7:5fec)
Route7GateText3: ; 1dfec (7:5fec)
Route6GateText3: ; 1dfec (7:5fec)
Route5GateText3: ; 1dfec (7:5fec)
- TX_FAR _SaffronGateText_8aaa9 ; 0x8aaa9
+ TX_FAR _SaffronGateText_8aaa9
db $11
- TX_FAR _SaffronGateText_1dff1 ; 0x8aaef
+ TX_FAR _SaffronGateText_1dff1
db "@"
SaffronGateText_1dff6: ; 1dff6 (7:5ff6)
diff --git a/scripts/route6.asm b/scripts/route6.asm
index ee6258cd..51116390 100755
--- a/scripts/route6.asm
+++ b/scripts/route6.asm
@@ -26,60 +26,60 @@ Route6TrainerHeader0: ; 590d7 (16:50d7)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd7c9 ; flag's byte
- dw Route6BattleText1 ; 0x512a TextBeforeBattle
- dw Route6AfterBattleText1 ; 0x5134 TextAfterBattle
- dw Route6EndBattleText1 ; 0x512f TextEndBattle
- dw Route6EndBattleText1 ; 0x512f TextEndBattle
+ dw Route6BattleText1 ; TextBeforeBattle
+ dw Route6AfterBattleText1 ; TextAfterBattle
+ dw Route6EndBattleText1 ; TextEndBattle
+ dw Route6EndBattleText1 ; TextEndBattle
Route6TrainerHeader1: ; 590e3 (16:50e3)
db $2 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd7c9 ; flag's byte
- dw Route6BattleText2 ; 0x5143 TextBeforeBattle
- dw Route6AfterBattleText1 ; 0x5134 TextAfterBattle
- dw Route6EndBattleText2 ; 0x5148 TextEndBattle
- dw Route6EndBattleText2 ; 0x5148 TextEndBattle
+ dw Route6BattleText2 ; TextBeforeBattle
+ dw Route6AfterBattleText1 ; TextAfterBattle
+ dw Route6EndBattleText2 ; TextEndBattle
+ dw Route6EndBattleText2 ; TextEndBattle
Route6TrainerHeader2: ; 590ef (16:50ef)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7c9 ; flag's byte
- dw Route6BattleText3 ; 0x5157 TextBeforeBattle
- dw Route6AfterBattleText3 ; 0x5161 TextAfterBattle
- dw Route6EndBattleText3 ; 0x515c TextEndBattle
- dw Route6EndBattleText3 ; 0x515c TextEndBattle
+ dw Route6BattleText3 ; TextBeforeBattle
+ dw Route6AfterBattleText3 ; TextAfterBattle
+ dw Route6EndBattleText3 ; TextEndBattle
+ dw Route6EndBattleText3 ; TextEndBattle
Route6TrainerHeader3: ; 590fb (16:50fb)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7c9 ; flag's byte
- dw Route6BattleText4 ; 0x5170 TextBeforeBattle
- dw Route6AfterBattleText4 ; 0x517a TextAfterBattle
- dw Route6EndBattleText4 ; 0x5175 TextEndBattle
- dw Route6EndBattleText4 ; 0x5175 TextEndBattle
+ dw Route6BattleText4 ; TextBeforeBattle
+ dw Route6AfterBattleText4 ; TextAfterBattle
+ dw Route6EndBattleText4 ; TextEndBattle
+ dw Route6EndBattleText4 ; TextEndBattle
Route6TrainerHeader4: ; 59107 (16:5107)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7c9 ; flag's byte
- dw Route6BattleText5 ; 0x5189 TextBeforeBattle
- dw Route6AfterBattleText5 ; 0x5193 TextAfterBattle
- dw Route6EndBattleText5 ; 0x518e TextEndBattle
- dw Route6EndBattleText5 ; 0x518e TextEndBattle
+ dw Route6BattleText5 ; TextBeforeBattle
+ dw Route6AfterBattleText5 ; TextAfterBattle
+ dw Route6EndBattleText5 ; TextEndBattle
+ dw Route6EndBattleText5 ; TextEndBattle
Route6TrainerHeader5: ; 59113 (16:5113)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7c9 ; flag's byte
- dw Route6BattleText6 ; 0x51a2 TextBeforeBattle
- dw Route6AfterBattleText6 ; 0x51ac TextAfterBattle
- dw Route6EndBattleText6 ; 0x51a7 TextEndBattle
- dw Route6EndBattleText6 ; 0x51a7 TextEndBattle
+ dw Route6BattleText6 ; TextBeforeBattle
+ dw Route6AfterBattleText6 ; TextAfterBattle
+ dw Route6EndBattleText6 ; TextEndBattle
+ dw Route6EndBattleText6 ; TextEndBattle
db $ff
Route6Text1: ; 59120 (16:5120)
- db $8
+ TX_ASM
ld hl, Route6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -97,7 +97,7 @@ Route6AfterBattleText1: ; 59134 (16:5134)
db "@"
Route6Text2: ; 59139 (16:5139)
- db $08 ; asm
+ TX_ASM
ld hl, Route6TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -111,7 +111,7 @@ Route6EndBattleText2: ; 59148 (16:5148)
db "@"
Route6Text3: ; 5914d (16:514d)
- db $08 ; asm
+ TX_ASM
ld hl, Route6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -129,7 +129,7 @@ Route6AfterBattleText3: ; 59161 (16:5161)
db "@"
Route6Text4: ; 59166 (16:5166)
- db $08 ; asm
+ TX_ASM
ld hl, Route6TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -147,7 +147,7 @@ Route6AfterBattleText4: ; 5917a (16:517a)
db "@"
Route6Text5: ; 5917f (16:517f)
- db $08 ; asm
+ TX_ASM
ld hl, Route6TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -165,7 +165,7 @@ Route6AfterBattleText5: ; 59193 (16:5193)
db "@"
Route6Text6: ; 59198 (16:5198)
- db $08 ; asm
+ TX_ASM
ld hl, Route6TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route6gate.asm b/scripts/route6gate.asm
index 44d03a75..82e2414a 100755
--- a/scripts/route6gate.asm
+++ b/scripts/route6gate.asm
@@ -23,7 +23,7 @@ Route6GateScript0: ; 1e04e (7:604e)
callba RemoveGuardDrink
ld a, [$ffdb]
and a
- jr nz, .asm_1e080 ; 0x1e06e $10
+ jr nz, .asm_1e080
ld a, $2
ld [$ff8c], a
call DisplayTextID
diff --git a/scripts/route7gate.asm b/scripts/route7gate.asm
index beab96bf..4a05acc3 100755
--- a/scripts/route7gate.asm
+++ b/scripts/route7gate.asm
@@ -35,7 +35,7 @@ Route7GateScript0: ; 1e128 (7:6128)
callba RemoveGuardDrink
ld a, [$ffdb]
and a
- jr nz, .asm_1e15a ; 0x1e148 $10
+ jr nz, .asm_1e15a
ld a, $2
ld [$ff8c], a
call DisplayTextID
diff --git a/scripts/route8.asm b/scripts/route8.asm
index eed57c7b..8d589c90 100755
--- a/scripts/route8.asm
+++ b/scripts/route8.asm
@@ -29,87 +29,87 @@ Route8TrainerHeader0: ; 591e3 (16:51e3)
db $1 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7cd ; flag's byte
- dw Route8BattleText1 ; 0x525a TextBeforeBattle
- dw Route8AfterBattleText1 ; 0x5264 TextAfterBattle
- dw Route8EndBattleText1 ; 0x525f TextEndBattle
- dw Route8EndBattleText1 ; 0x525f TextEndBattle
+ dw Route8BattleText1 ; TextBeforeBattle
+ dw Route8AfterBattleText1 ; TextAfterBattle
+ dw Route8EndBattleText1 ; TextEndBattle
+ dw Route8EndBattleText1 ; TextEndBattle
Route8TrainerHeader1: ; 591ef (16:51ef)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7cd ; flag's byte
- dw Route8BattleText2 ; 0x5273 TextBeforeBattle
- dw Route8AfterBattleText2 ; 0x527d TextAfterBattle
- dw Route8EndBattleText2 ; 0x5278 TextEndBattle
- dw Route8EndBattleText2 ; 0x5278 TextEndBattle
+ dw Route8BattleText2 ; TextBeforeBattle
+ dw Route8AfterBattleText2 ; TextAfterBattle
+ dw Route8EndBattleText2 ; TextEndBattle
+ dw Route8EndBattleText2 ; TextEndBattle
Route8TrainerHeader2: ; 591fb (16:51fb)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7cd ; flag's byte
- dw Route8BattleText3 ; 0x528c TextBeforeBattle
- dw Route8AfterBattleText3 ; 0x5296 TextAfterBattle
- dw Route8EndBattleText3 ; 0x5291 TextEndBattle
- dw Route8EndBattleText3 ; 0x5291 TextEndBattle
+ dw Route8BattleText3 ; TextBeforeBattle
+ dw Route8AfterBattleText3 ; TextAfterBattle
+ dw Route8EndBattleText3 ; TextEndBattle
+ dw Route8EndBattleText3 ; TextEndBattle
Route8TrainerHeader3: ; 59207 (16:5207)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7cd ; flag's byte
- dw Route8BattleText4 ; 0x52a5 TextBeforeBattle
- dw Route8AfterBattleText4 ; 0x52af TextAfterBattle
- dw Route8EndBattleText4 ; 0x52aa TextEndBattle
- dw Route8EndBattleText4 ; 0x52aa TextEndBattle
+ dw Route8BattleText4 ; TextBeforeBattle
+ dw Route8AfterBattleText4 ; TextAfterBattle
+ dw Route8EndBattleText4 ; TextEndBattle
+ dw Route8EndBattleText4 ; TextEndBattle
Route8TrainerHeader4: ; 59213 (16:5213)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7cd ; flag's byte
- dw Route8BattleText5 ; 0x52be TextBeforeBattle
- dw Route8AfterBattleText5 ; 0x52c8 TextAfterBattle
- dw Route8EndBattleText5 ; 0x52c3 TextEndBattle
- dw Route8EndBattleText5 ; 0x52c3 TextEndBattle
+ dw Route8BattleText5 ; TextBeforeBattle
+ dw Route8AfterBattleText5 ; TextAfterBattle
+ dw Route8EndBattleText5 ; TextEndBattle
+ dw Route8EndBattleText5 ; TextEndBattle
Route8TrainerHeader5: ; 5921f (16:521f)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7cd ; flag's byte
- dw Route8BattleText6 ; 0x52d7 TextBeforeBattle
- dw Route8AfterBattleText6 ; 0x52e1 TextAfterBattle
- dw Route8EndBattleText6 ; 0x52dc TextEndBattle
- dw Route8EndBattleText6 ; 0x52dc TextEndBattle
+ dw Route8BattleText6 ; TextBeforeBattle
+ dw Route8AfterBattleText6 ; TextAfterBattle
+ dw Route8EndBattleText6 ; TextEndBattle
+ dw Route8EndBattleText6 ; TextEndBattle
Route8TrainerHeader6: ; 5922b (16:522b)
db $7 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7cd ; flag's byte
- dw Route8BattleText7 ; 0x52f0 TextBeforeBattle
- dw Route8AfterBattleText7 ; 0x52fa TextAfterBattle
- dw Route8EndBattleText7 ; 0x52f5 TextEndBattle
- dw Route8EndBattleText7 ; 0x52f5 TextEndBattle
+ dw Route8BattleText7 ; TextBeforeBattle
+ dw Route8AfterBattleText7 ; TextAfterBattle
+ dw Route8EndBattleText7 ; TextEndBattle
+ dw Route8EndBattleText7 ; TextEndBattle
Route8TrainerHeader7: ; 59237 (16:5237)
db $8 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7cd ; flag's byte
- dw Route8BattleText8 ; 0x5309 TextBeforeBattle
- dw Route8AfterBattleText8 ; 0x5313 TextAfterBattle
- dw Route8EndBattleText8 ; 0x530e TextEndBattle
- dw Route8EndBattleText8 ; 0x530e TextEndBattle
+ dw Route8BattleText8 ; TextBeforeBattle
+ dw Route8AfterBattleText8 ; TextAfterBattle
+ dw Route8EndBattleText8 ; TextEndBattle
+ dw Route8EndBattleText8 ; TextEndBattle
Route8TrainerHeader8: ; 59243 (16:5243)
db $9 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7cd ; flag's byte
- dw Route8BattleText9 ; 0x5322 TextBeforeBattle
- dw Route8AfterBattleText9 ; 0x532c TextAfterBattle
- dw Route8EndBattleText9 ; 0x5327 TextEndBattle
- dw Route8EndBattleText9 ; 0x5327 TextEndBattle
+ dw Route8BattleText9 ; TextBeforeBattle
+ dw Route8AfterBattleText9 ; TextAfterBattle
+ dw Route8EndBattleText9 ; TextEndBattle
+ dw Route8EndBattleText9 ; TextEndBattle
db $ff
Route8Text1: ; 59250 (16:5250)
- db $8
+ TX_ASM
ld hl, Route8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -127,7 +127,7 @@ Route8AfterBattleText1: ; 59264 (16:5264)
db "@"
Route8Text2: ; 59269 (16:5269)
- db $08 ; asm
+ TX_ASM
ld hl, Route8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -145,7 +145,7 @@ Route8AfterBattleText2: ; 5927d (16:527d)
db "@"
Route8Text3: ; 59282 (16:5282)
- db $08 ; asm
+ TX_ASM
ld hl, Route8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -163,7 +163,7 @@ Route8AfterBattleText3: ; 59296 (16:5296)
db "@"
Route8Text4: ; 5929b (16:529b)
- db $08 ; asm
+ TX_ASM
ld hl, Route8TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -181,7 +181,7 @@ Route8AfterBattleText4: ; 592af (16:52af)
db "@"
Route8Text5: ; 592b4 (16:52b4)
- db $08 ; asm
+ TX_ASM
ld hl, Route8TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -199,7 +199,7 @@ Route8AfterBattleText5: ; 592c8 (16:52c8)
db "@"
Route8Text6: ; 592cd (16:52cd)
- db $08 ; asm
+ TX_ASM
ld hl, Route8TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -217,7 +217,7 @@ Route8AfterBattleText6: ; 592e1 (16:52e1)
db "@"
Route8Text7: ; 592e6 (16:52e6)
- db $08 ; asm
+ TX_ASM
ld hl, Route8TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
@@ -235,7 +235,7 @@ Route8AfterBattleText7: ; 592fa (16:52fa)
db "@"
Route8Text8: ; 592ff (16:52ff)
- db $08 ; asm
+ TX_ASM
ld hl, Route8TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
@@ -253,7 +253,7 @@ Route8AfterBattleText8: ; 59313 (16:5313)
db "@"
Route8Text9: ; 59318 (16:5318)
- db $08 ; asm
+ TX_ASM
ld hl, Route8TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/route8gate.asm b/scripts/route8gate.asm
index 8ea12f04..de0a856f 100755
--- a/scripts/route8gate.asm
+++ b/scripts/route8gate.asm
@@ -34,7 +34,7 @@ Route8GateScript0: ; 1e1ee (7:61ee)
callba RemoveGuardDrink
ld a, [$ffdb]
and a
- jr nz, .asm_1e220 ; 0x1e20e $10
+ jr nz, .asm_1e220
ld a, $2
ld [$ff8c], a
call DisplayTextID
diff --git a/scripts/route9.asm b/scripts/route9.asm
index 77b216c6..539e1a3f 100755
--- a/scripts/route9.asm
+++ b/scripts/route9.asm
@@ -30,129 +30,129 @@ Route9TrainerHeader0: ; 556eb (15:56eb)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7cf ; flag's byte
- dw Route9BattleText1 ; 0x5792 TextBeforeBattle
- dw Route9AfterBattleText1 ; 0x579c TextAfterBattle
- dw Route9EndBattleText1 ; 0x5797 TextEndBattle
- dw Route9EndBattleText1 ; 0x5797 TextEndBattle
+ dw Route9BattleText1 ; TextBeforeBattle
+ dw Route9AfterBattleText1 ; TextAfterBattle
+ dw Route9EndBattleText1 ; TextEndBattle
+ dw Route9EndBattleText1 ; TextEndBattle
Route9TrainerHeader2: ; 556f7 (15:56f7)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte
- dw Route9BattleText2 ; 0x57a1 TextBeforeBattle
- dw Route9AfterBattleText2 ; 0x57ab TextAfterBattle
- dw Route9EndBattleText2 ; 0x57a6 TextEndBattle
- dw Route9EndBattleText2 ; 0x57a6 TextEndBattle
+ dw Route9BattleText2 ; TextBeforeBattle
+ dw Route9AfterBattleText2 ; TextAfterBattle
+ dw Route9EndBattleText2 ; TextEndBattle
+ dw Route9EndBattleText2 ; TextEndBattle
Route9TrainerHeader3: ; 55703 (15:5703)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7cf ; flag's byte
- dw Route9BattleText3 ; 0x57b0 TextBeforeBattle
- dw Route9AfterBattleText3 ; 0x57ba TextAfterBattle
- dw Route9EndBattleText3 ; 0x57b5 TextEndBattle
- dw Route9EndBattleText3 ; 0x57b5 TextEndBattle
+ dw Route9BattleText3 ; TextBeforeBattle
+ dw Route9AfterBattleText3 ; TextAfterBattle
+ dw Route9EndBattleText3 ; TextEndBattle
+ dw Route9EndBattleText3 ; TextEndBattle
Route9TrainerHeader4: ; 5570f (15:570f)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte
- dw Route9BattleText4 ; 0x57bf TextBeforeBattle
- dw Route9AfterBattleText4 ; 0x57c9 TextAfterBattle
- dw Route9EndBattleText4 ; 0x57c4 TextEndBattle
- dw Route9EndBattleText4 ; 0x57c4 TextEndBattle
+ dw Route9BattleText4 ; TextBeforeBattle
+ dw Route9AfterBattleText4 ; TextAfterBattle
+ dw Route9EndBattleText4 ; TextEndBattle
+ dw Route9EndBattleText4 ; TextEndBattle
Route9TrainerHeader5: ; 5571b (15:571b)
db $5 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte
- dw Route9BattleText5 ; 0x57ce TextBeforeBattle
- dw Route9AfterBattleText5 ; 0x57d8 TextAfterBattle
- dw Route9EndBattleText5 ; 0x57d3 TextEndBattle
- dw Route9EndBattleText5 ; 0x57d3 TextEndBattle
+ dw Route9BattleText5 ; TextBeforeBattle
+ dw Route9AfterBattleText5 ; TextAfterBattle
+ dw Route9EndBattleText5 ; TextEndBattle
+ dw Route9EndBattleText5 ; TextEndBattle
Route9TrainerHeader6: ; 55727 (15:5727)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7cf ; flag's byte
- dw Route9BattleText6 ; 0x57dd TextBeforeBattle
- dw Route9AfterBattleText6 ; 0x57e7 TextAfterBattle
- dw Route9EndBattleText6 ; 0x57e2 TextEndBattle
- dw Route9EndBattleText6 ; 0x57e2 TextEndBattle
+ dw Route9BattleText6 ; TextBeforeBattle
+ dw Route9AfterBattleText6 ; TextAfterBattle
+ dw Route9EndBattleText6 ; TextEndBattle
+ dw Route9EndBattleText6 ; TextEndBattle
Route9TrainerHeader7: ; 55733 (15:5733)
db $7 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7cf ; flag's byte
- dw Route9BattleText7 ; 0x57ec TextBeforeBattle
- dw Route9AfterBattleText7 ; 0x57f6 TextAfterBattle
- dw Route9EndBattleText7 ; 0x57f1 TextEndBattle
- dw Route9EndBattleText7 ; 0x57f1 TextEndBattle
+ dw Route9BattleText7 ; TextBeforeBattle
+ dw Route9AfterBattleText7 ; TextAfterBattle
+ dw Route9EndBattleText7 ; TextEndBattle
+ dw Route9EndBattleText7 ; TextEndBattle
Route9TrainerHeader8: ; 5573f (15:573f)
db $8 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte
- dw Route9BattleText8 ; 0x57fb TextBeforeBattle
- dw Route9AfterBattleText8 ; 0x5805 TextAfterBattle
- dw Route9EndBattleText8 ; 0x5800 TextEndBattle
- dw Route9EndBattleText8 ; 0x5800 TextEndBattle
+ dw Route9BattleText8 ; TextBeforeBattle
+ dw Route9AfterBattleText8 ; TextAfterBattle
+ dw Route9EndBattleText8 ; TextEndBattle
+ dw Route9EndBattleText8 ; TextEndBattle
Route9TrainerHeader9: ; 5574b (15:574b)
db $9 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd7cf ; flag's byte
- dw Route9BattleText9 ; 0x580a TextBeforeBattle
- dw Route9AfterBattleText9 ; 0x5814 TextAfterBattle
- dw Route9EndBattleText9 ; 0x580f TextEndBattle
- dw Route9EndBattleText9 ; 0x580f TextEndBattle
+ dw Route9BattleText9 ; TextBeforeBattle
+ dw Route9AfterBattleText9 ; TextAfterBattle
+ dw Route9EndBattleText9 ; TextEndBattle
+ dw Route9EndBattleText9 ; TextEndBattle
db $ff
Route9Text1: ; 55758 (15:5758)
- db $8 ; asm
+ TX_ASM
ld hl, Route9TrainerHeader0
- jr asm_8be3d ; 0x5575c $2e
+ jr Route9TalkToTrainer
Route9Text2: ; 5575e (15:575e)
- db $8 ; asm
+ TX_ASM
ld hl, Route9TrainerHeader2
- jr asm_8be3d ; 0x55762 $28
+ jr Route9TalkToTrainer
Route9Text3: ; 55764 (15:5764)
- db $8 ; asm
+ TX_ASM
ld hl, Route9TrainerHeader3
- jr asm_8be3d ; 0x55768 $22
+ jr Route9TalkToTrainer
Route9Text4: ; 5576a (15:576a)
- db $8 ; asm
+ TX_ASM
ld hl, Route9TrainerHeader4
- jr asm_8be3d ; 0x5576e $1c
+ jr Route9TalkToTrainer
Route9Text5: ; 55770 (15:5770)
- db $8 ; asm
+ TX_ASM
ld hl, Route9TrainerHeader5
- jr asm_8be3d ; 0x55774 $16
+ jr Route9TalkToTrainer
Route9Text6: ; 55776 (15:5776)
- db $8 ; asm
+ TX_ASM
ld hl, Route9TrainerHeader6
- jr asm_8be3d ; 0x5577a $10
+ jr Route9TalkToTrainer
Route9Text7: ; 5577c (15:577c)
- db $8 ; asm
+ TX_ASM
ld hl, Route9TrainerHeader7
- jr asm_8be3d ; 0x55780 $a
+ jr Route9TalkToTrainer
Route9Text8: ; 55782 (15:5782)
- db $8 ; asm
+ TX_ASM
ld hl, Route9TrainerHeader8
- jr asm_8be3d ; 0x55786 $4
+ jr Route9TalkToTrainer
Route9Text9: ; 55788 (15:5788)
- db $8 ; asm
+ TX_ASM
ld hl, Route9TrainerHeader9
-asm_8be3d: ; 5578c (15:578c)
+Route9TalkToTrainer: ; 5578c (15:578c)
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm
index 294dcf58..b64868e5 100755
--- a/scripts/safarizoneentrance.asm
+++ b/scripts/safarizoneentrance.asm
@@ -24,11 +24,11 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
ld [wJoyIgnore], a
xor a
ld [hJoyHeld], a
- ld a, $c
+ ld a, SPRITE_FACING_RIGHT
ld [wSpriteStateData1 + 9], a
ld a, [wWhichTrade]
cp $1
- jr z, .asm_7520f ; 0x75207 $6
+ jr z, .asm_7520f
ld a, $2
ld [W_SAFARIZONEENTRANCECURSCRIPT], a
ret
@@ -77,7 +77,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
ld hl, wd790
bit 6, [hl]
res 6, [hl]
- jr z, .asm_7527f ; 0x7525a $23
+ jr z, .asm_7527f
res 7, [hl]
call UpdateSprites
ld a, $f0
@@ -92,7 +92,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
call SafariZoneEntranceAutoWalk
ld a, $4
ld [W_SAFARIZONEENTRANCECURSCRIPT], a
- jr .asm_75286 ; 0x7527d $7
+ jr .asm_75286
.asm_7527f
ld a, $5
ld [$ff8c], a
@@ -145,8 +145,8 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
db "@"
.SafariZoneEntranceText4
- TX_FAR SafariZoneEntranceText_9e6e4 ; 0x9e6e4
- db $8
+ TX_FAR SafariZoneEntranceText_9e6e4
+ TX_ASM
ld a, $13
ld [wTextBoxID],a
call DisplayTextBoxID
@@ -225,12 +225,12 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
db "@"
.SafariZoneEntranceText5
- TX_FAR SafariZoneEntranceText_9e814 ; 0x9e814
- db $8
+ TX_FAR SafariZoneEntranceText_9e814
+ TX_ASM
call YesNoChoice
ld a,[wCurrentMenuItem]
and a
- jr nz, .asm_7539c ; 0x7537b $1f
+ jr nz, .asm_7539c
ld hl, .SafariZoneEntranceText_753bb
call PrintText
xor a
@@ -243,11 +243,11 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
res 7, [hl]
ld a, $0
ld [wcf0d], a
- jr .asm_753b3 ; 0x7539a $17
+ jr .asm_753b3
.asm_7539c
ld hl, .SafariZoneEntranceText_753c0
call PrintText
- ld a, $4
+ ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 9], a
ld a, $40
ld c, $1
@@ -272,7 +272,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
db "@"
.SafariZoneEntranceText2
- db $08 ; asm
+ TX_ASM
ld hl,.FirstTimeQuestionText
call PrintText
call YesNoChoice
diff --git a/scripts/safarizonesecrethouse.asm b/scripts/safarizonesecrethouse.asm
index 28aae7c4..b1dd95d3 100755
--- a/scripts/safarizonesecrethouse.asm
+++ b/scripts/safarizonesecrethouse.asm
@@ -5,10 +5,10 @@ SafariZoneSecretHouseTextPointers: ; 4a31a (12:631a)
dw SafariZoneSecretHouseText1
SafariZoneSecretHouseText1: ; 4a31c (12:631c)
- db $08 ; asm
+ TX_ASM
ld a, [wd857]
bit 0, a
- jr nz, .asm_20a9b ; 0x4a322
+ jr nz, .asm_20a9b
ld hl, SafariZoneSecretHouseText_4a350
call PrintText
ld bc, (HM_03 << 8) | 1
@@ -18,15 +18,15 @@ SafariZoneSecretHouseText1: ; 4a31c (12:631c)
call PrintText
ld hl, wd857
set 0, [hl]
- jr .asm_8f1fc ; 0x4a33d
+ jr .asm_8f1fc
.BagFull
ld hl, HM03NoRoomText
call PrintText
- jr .asm_8f1fc ; 0x4a345
-.asm_20a9b ; 0x4a347
+ jr .asm_8f1fc
+.asm_20a9b
ld hl, HM03ExplanationText
call PrintText
-.asm_8f1fc ; 0x4a34d
+.asm_8f1fc
jp TextScriptEnd
SafariZoneSecretHouseText_4a350: ; 4a350 (12:6350)
diff --git a/scripts/saffrongym.asm b/scripts/saffrongym.asm
index 7c2eb559..7e4f4447 100755
--- a/scripts/saffrongym.asm
+++ b/scripts/saffrongym.asm
@@ -12,8 +12,8 @@ SaffronGymScript: ; 5d00d (17:500d)
ret
.extra
- ld hl, Gym6CityName ; $5033
- ld de, Gym6LeaderName ; $5040
+ ld hl, Gym6CityName
+ ld de, Gym6LeaderName
jp LoadGymLeaderAndCityName
Gym6CityName: ; 5d033 (17:5033)
@@ -36,7 +36,7 @@ SaffronGymScriptPointers: ; 5d053 (17:5053)
dw SaffronGymScript3
SaffronGymScript3: ; 5d05b (17:505b)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, SaffronGymText_5d048
ld a, $f0
@@ -44,7 +44,7 @@ SaffronGymScript3: ; 5d05b (17:505b)
SaffronGymText_5d068: ; 5d068 (17:5068)
ld a, $a
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd7b3
set 1, [hl]
@@ -52,14 +52,14 @@ SaffronGymText_5d068: ; 5d068 (17:5068)
call GiveItem
jr nc, .BagFull
ld a, $b
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd7b3
set 0, [hl]
jr .asm_5d091
.BagFull
ld a, $c
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
.asm_5d091
ld hl, W_OBTAINEDBADGES
@@ -95,82 +95,82 @@ SaffronGymTrainerHeader0: ; 5d0c3 (17:50c3)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7b3 ; flag's byte
- dw SaffronGymBattleText1 ; 0x51f0 TextBeforeBattle
- dw SaffronGymAfterBattleText1 ; 0x51fa TextAfterBattle
- dw SaffronGymEndBattleText1 ; 0x51f5 TextEndBattle
- dw SaffronGymEndBattleText1 ; 0x51f5 TextEndBattle
+ dw SaffronGymBattleText1 ; TextBeforeBattle
+ dw SaffronGymAfterBattleText1 ; TextAfterBattle
+ dw SaffronGymEndBattleText1 ; TextEndBattle
+ dw SaffronGymEndBattleText1 ; TextEndBattle
SaffronGymTrainerHeader1: ; 5d0cf (17:50cf)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7b3 ; flag's byte
- dw SaffronGymBattleText2 ; 0x51ff TextBeforeBattle
- dw SaffronGymAfterBattleText2 ; 0x5209 TextAfterBattle
- dw SaffronGymEndBattleText2 ; 0x5204 TextEndBattle
- dw SaffronGymEndBattleText2 ; 0x5204 TextEndBattle
+ dw SaffronGymBattleText2 ; TextBeforeBattle
+ dw SaffronGymAfterBattleText2 ; TextAfterBattle
+ dw SaffronGymEndBattleText2 ; TextEndBattle
+ dw SaffronGymEndBattleText2 ; TextEndBattle
SaffronGymTrainerHeader2: ; 5d0db (17:50db)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7b3 ; flag's byte
- dw SaffronGymBattleText3 ; 0x520e TextBeforeBattle
- dw SaffronGymAfterBattleText3 ; 0x5218 TextAfterBattle
- dw SaffronGymEndBattleText3 ; 0x5213 TextEndBattle
- dw SaffronGymEndBattleText3 ; 0x5213 TextEndBattle
+ dw SaffronGymBattleText3 ; TextBeforeBattle
+ dw SaffronGymAfterBattleText3 ; TextAfterBattle
+ dw SaffronGymEndBattleText3 ; TextEndBattle
+ dw SaffronGymEndBattleText3 ; TextEndBattle
SaffronGymTrainerHeader3: ; 5d0e7 (17:50e7)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7b3 ; flag's byte
- dw SaffronGymBattleText4 ; 0x521d TextBeforeBattle
- dw SaffronGymAfterBattleText4 ; 0x5227 TextAfterBattle
- dw SaffronGymEndBattleText4 ; 0x5222 TextEndBattle
- dw SaffronGymEndBattleText4 ; 0x5222 TextEndBattle
+ dw SaffronGymBattleText4 ; TextBeforeBattle
+ dw SaffronGymAfterBattleText4 ; TextAfterBattle
+ dw SaffronGymEndBattleText4 ; TextEndBattle
+ dw SaffronGymEndBattleText4 ; TextEndBattle
SaffronGymTrainerHeader4: ; 5d0f3 (17:50f3)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7b3 ; flag's byte
- dw SaffronGymBattleText5 ; 0x522c TextBeforeBattle
- dw SaffronGymAfterBattleText5 ; 0x5236 TextAfterBattle
- dw SaffronGymEndBattleText5 ; 0x5231 TextEndBattle
- dw SaffronGymEndBattleText5 ; 0x5231 TextEndBattle
+ dw SaffronGymBattleText5 ; TextBeforeBattle
+ dw SaffronGymAfterBattleText5 ; TextAfterBattle
+ dw SaffronGymEndBattleText5 ; TextEndBattle
+ dw SaffronGymEndBattleText5 ; TextEndBattle
SaffronGymTrainerHeader5: ; 5d0ff (17:50ff)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7b3 ; flag's byte
- dw SaffronGymBattleText6 ; 0x523b TextBeforeBattle
- dw SaffronGymAfterBattleText6 ; 0x5245 TextAfterBattle
- dw SaffronGymEndBattleText6 ; 0x5240 TextEndBattle
- dw SaffronGymEndBattleText6 ; 0x5240 TextEndBattle
+ dw SaffronGymBattleText6 ; TextBeforeBattle
+ dw SaffronGymAfterBattleText6 ; TextAfterBattle
+ dw SaffronGymEndBattleText6 ; TextEndBattle
+ dw SaffronGymEndBattleText6 ; TextEndBattle
SaffronGymTrainerHeader6: ; 5d10b (17:510b)
db $8 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7b3 ; flag's byte
- dw SaffronGymBattleText7 ; 0x524a TextBeforeBattle
- dw SaffronGymAfterBattleText7 ; 0x5254 TextAfterBattle
- dw SaffronGymEndBattleText7 ; 0x524f TextEndBattle
- dw SaffronGymEndBattleText7 ; 0x524f TextEndBattle
+ dw SaffronGymBattleText7 ; TextBeforeBattle
+ dw SaffronGymAfterBattleText7 ; TextAfterBattle
+ dw SaffronGymEndBattleText7 ; TextEndBattle
+ dw SaffronGymEndBattleText7 ; TextEndBattle
db $ff
SaffronGymText1: ; 5d118 (17:5118)
- db $08 ; asm
+ TX_ASM
ld a, [wd7b3]
bit 1, a
- jr z, .asm_e3544 ; 0x5d11e
+ jr z, .asm_5d134
bit 0, a
- jr nz, .asm_8d2f6 ; 0x5d122
+ jr nz, .asm_5d12c
call z, SaffronGymText_5d068
call DisableWaitingAfterTextDisplay
- jr .asm_34c2c ; 0x5d12a
-.asm_8d2f6 ; 0x5d12c
+ jr .asm_5d15f
+.asm_5d12c
ld hl, SaffronGymText_5d16e
call PrintText
- jr .asm_34c2c ; 0x5d132
-.asm_e3544 ; 0x5d134
+ jr .asm_5d15f
+.asm_5d134
ld hl, SaffronGymText_5d162
call PrintText
ld hl, wd72d
@@ -179,7 +179,7 @@ SaffronGymText1: ; 5d118 (17:5118)
ld hl, SaffronGymText_5d167
ld de, SaffronGymText_5d167
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -187,7 +187,7 @@ SaffronGymText1: ; 5d118 (17:5118)
ld [W_GYMLEADERNO], a
ld a, $3
ld [W_SAFFRONGYMCURSCRIPT], a
-.asm_34c2c ; 0x5d15f
+.asm_5d15f
jp TextScriptEnd
SaffronGymText_5d162: ; 5d162 (17:5162)
@@ -195,7 +195,7 @@ SaffronGymText_5d162: ; 5d162 (17:5162)
db "@"
SaffronGymText_5d167: ; 5d167 (17:5167)
- TX_FAR _SaffronGymText_5d167 ; 0xa1c73
+ TX_FAR _SaffronGymText_5d167
db $11 ; play same sound as red giving oak parcel
db $6 ; wait for keypress
db "@"
@@ -219,59 +219,59 @@ SaffronGymText12: ; 5d182 (17:5182)
db "@"
SaffronGymText2: ; 5d187 (17:5187)
- db $08 ; asm
+ TX_ASM
ld hl, SaffronGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SaffronGymText3: ; 5d191 (17:5191)
- db $08 ; asm
+ TX_ASM
ld hl, SaffronGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SaffronGymText4: ; 5d19b (17:519b)
- db $08 ; asm
+ TX_ASM
ld hl, SaffronGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SaffronGymText5: ; 5d1a5 (17:51a5)
- db $08 ; asm
+ TX_ASM
ld hl, SaffronGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SaffronGymText6: ; 5d1af (17:51af)
- db $08 ; asm
+ TX_ASM
ld hl, SaffronGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
SaffronGymText7: ; 5d1b9 (17:51b9)
- db $08 ; asm
+ TX_ASM
ld hl, SaffronGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
SaffronGymText8: ; 5d1c3 (17:51c3)
- db $08 ; asm
+ TX_ASM
ld hl, SaffronGymTrainerHeader6
call TalkToTrainer
jp TextScriptEnd
SaffronGymText9: ; 5d1cd (17:51cd)
- db $08 ; asm
+ TX_ASM
ld a, [wd7b3]
bit 1, a
- jr nz, .asm_13f3c ; 0x5d1d3
+ jr nz, .asm_5d1dd
ld hl, SaffronGymText_5d1e6
call PrintText
- jr .asm_e9907 ; 0x5d1db
-.asm_13f3c ; 0x5d1dd
+ jr .asm_5d1e3
+.asm_5d1dd
ld hl, SaffronGymText_5d1eb
call PrintText
-.asm_e9907 ; 0x5d1e3
+.asm_5d1e3
jp TextScriptEnd
SaffronGymText_5d1e6: ; 5d1e6 (17:51e6)
diff --git a/scripts/saffronhouse1.asm b/scripts/saffronhouse1.asm
index 39a70ebf..3aced3c5 100755
--- a/scripts/saffronhouse1.asm
+++ b/scripts/saffronhouse1.asm
@@ -13,7 +13,7 @@ SaffronHouse1Text1: ; 1dde8 (7:5de8)
SaffronHouse1Text2: ; 1dded (7:5ded)
TX_FAR _SaffronHouse1Text2
- db $8
+ TX_ASM
ld a, PIDGEY
call PlayCry
jp TextScriptEnd
diff --git a/scripts/saffronhouse2.asm b/scripts/saffronhouse2.asm
index 727fd981..b7d8ed26 100755
--- a/scripts/saffronhouse2.asm
+++ b/scripts/saffronhouse2.asm
@@ -5,10 +5,10 @@ SaffronHouse2TextPointers: ; 1de3f (7:5e3f)
dw SaffronHouse2Text1
SaffronHouse2Text1: ; 1de41 (7:5e41)
- db $08 ; asm
+ TX_ASM
ld a, [wd7bd]
bit 0, a
- jr nz, .asm_9e72b ; 0x1de47
+ jr nz, .asm_9e72b
ld hl, TM29PreReceiveText
call PrintText
ld bc,(TM_29 << 8) | 1
@@ -18,15 +18,15 @@ SaffronHouse2Text1: ; 1de41 (7:5e41)
call PrintText
ld hl, wd7bd
set 0, [hl]
- jr .asm_fe4e1 ; 0x1de62
+ jr .asm_fe4e1
.BagFull
ld hl, TM29NoRoomText
call PrintText
- jr .asm_fe4e1 ; 0x1de6a
-.asm_9e72b ; 0x1de6c
+ jr .asm_fe4e1
+.asm_9e72b
ld hl, TM29ExplanationText
call PrintText
-.asm_fe4e1 ; 0x1de72
+.asm_fe4e1
jp TextScriptEnd
TM29PreReceiveText: ; 1de75 (7:5e75)
diff --git a/scripts/seafoamislands1.asm b/scripts/seafoamislands1.asm
index 2e64c9d7..6a8b23ea 100755
--- a/scripts/seafoamislands1.asm
+++ b/scripts/seafoamislands1.asm
@@ -5,20 +5,20 @@ SeafoamIslands1Script: ; 447e9 (11:47e9)
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
- jr z, .asm_4483b ; 0x447f8 $41
+ jr z, .asm_4483b
ld hl, Seafoam1HolesCoords
call CheckBoulderCoords
ret nc
ld hl, wd7e8
ld a, [wWhichTrade]
cp $1
- jr nz, .asm_44819 ; 0x44809 $e
+ jr nz, .asm_44819
set 6, [hl]
ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1
ld [wd079], a
ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1
ld [wd07a], a
- jr .asm_44825 ; 0x44817 $c
+ jr .asm_44825
.asm_44819
set 7, [hl]
ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2
diff --git a/scripts/seafoamislands2.asm b/scripts/seafoamislands2.asm
index 66fe9297..44e92bd0 100755
--- a/scripts/seafoamislands2.asm
+++ b/scripts/seafoamislands2.asm
@@ -3,20 +3,20 @@ SeafoamIslands2Script: ; 46315 (11:6315)
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
- jr z, .asm_46362 ; 0x4631f $41
+ jr z, .asm_46362
ld hl, Seafoam2HolesCoords
call CheckBoulderCoords
ret nc
ld hl, wd87f
ld a, [wWhichTrade]
cp $1
- jr nz, .asm_46340 ; 0x46330 $e
+ jr nz, .asm_46340
set 0, [hl]
ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1
ld [wd079], a
ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1
ld [wd07a], a
- jr .asm_4634c ; 0x4633e $c
+ jr .asm_4634c
.asm_46340
set 1, [hl]
ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2
diff --git a/scripts/seafoamislands3.asm b/scripts/seafoamislands3.asm
index fb7d05ba..882553ab 100755
--- a/scripts/seafoamislands3.asm
+++ b/scripts/seafoamislands3.asm
@@ -3,20 +3,20 @@ SeafoamIslands3Script: ; 46451 (11:6451)
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
- jr z, .asm_4649e ; 0x4645b $41
+ jr z, .asm_4649e
ld hl, Seafoam3HolesCoords
call CheckBoulderCoords
ret nc
ld hl, wd880
ld a, [wWhichTrade]
cp $1
- jr nz, .asm_4647c ; 0x4646c $e
+ jr nz, .asm_4647c
set 0, [hl]
ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1
ld [wd079], a
ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_3
ld [wd07a], a
- jr .asm_46488 ; 0x4647a $c
+ jr .asm_46488
.asm_4647c
set 1, [hl]
ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2
diff --git a/scripts/seafoamislands4.asm b/scripts/seafoamislands4.asm
index 7e519f86..1eda0436 100755
--- a/scripts/seafoamislands4.asm
+++ b/scripts/seafoamislands4.asm
@@ -3,20 +3,20 @@ SeafoamIslands4Script: ; 4658d (11:658d)
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
- jr z, .asm_465dc ; 0x46597 $43
+ jr z, .asm_465dc
ld hl, Seafoam4HolesCoords
call CheckBoulderCoords
ret nc
ld hl, wd881
ld a, [wWhichTrade]
cp $1
- jr nz, .asm_465b8 ; 0x465a8 $e
+ jr nz, .asm_465b8
set 0, [hl]
ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1
ld [wd079], a
ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_1
ld [wd07a], a
- jr .asm_465c4 ; 0x465b6 $c
+ jr .asm_465c4
.asm_465b8
set 1, [hl]
ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_2
@@ -30,7 +30,7 @@ SeafoamIslands4Script: ; 4658d (11:658d)
ld a, [wd07a]
ld [wcc4d], a
predef ShowObject
- jr .asm_465ed ; 0x465da $11
+ jr .asm_465ed
.asm_465dc
ld a, $a2
ld [wDungeonWarpDestinationMap], a
diff --git a/scripts/seafoamislands5.asm b/scripts/seafoamislands5.asm
index b554034b..cbed0276 100755
--- a/scripts/seafoamislands5.asm
+++ b/scripts/seafoamislands5.asm
@@ -146,15 +146,15 @@ SeafoamIslands5TrainerHeader0: ; 46886 (11:6886)
db $2 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd882 ; flag's byte
- dw SeafoamIslands5BattleText2 ; 0x68a2 TextBeforeBattle
- dw SeafoamIslands5BattleText2 ; 0x68a2 TextAfterBattle
- dw SeafoamIslands5BattleText2 ; 0x68a2 TextEndBattle
- dw SeafoamIslands5BattleText2 ; 0x68a2 TextEndBattle
+ dw SeafoamIslands5BattleText2 ; TextBeforeBattle
+ dw SeafoamIslands5BattleText2 ; TextAfterBattle
+ dw SeafoamIslands5BattleText2 ; TextEndBattle
+ dw SeafoamIslands5BattleText2 ; TextEndBattle
db $ff
SeafoamIslands5Text3: ; 46893 (11:6893)
- db $08 ; asm
+ TX_ASM
ld hl, SeafoamIslands5TrainerHeader0
call TalkToTrainer
ld a, $4
@@ -163,7 +163,7 @@ SeafoamIslands5Text3: ; 46893 (11:6893)
SeafoamIslands5BattleText2: ; 468a2 (11:68a2)
TX_FAR _SeafoamIslands5BattleText2
- db $8
+ TX_ASM
ld a, ARTICUNO
call PlayCry
call WaitForSoundToFinish
diff --git a/scripts/silphco10.asm b/scripts/silphco10.asm
index 7d044aca..46630014 100755
--- a/scripts/silphco10.asm
+++ b/scripts/silphco10.asm
@@ -13,7 +13,7 @@ SilphCo10Script_5a14f: ; 5a14f (16:614f)
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, DataTable_5a173 ; $6173
+ ld hl, DataTable_5a173
call SilphCo2Script_59d43
call SilphCo10Text_5a176
ld a, [wd836]
@@ -53,36 +53,36 @@ SilphCo10TrainerHeader0: ; 5a192 (16:6192)
db $1 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd835 ; flag's byte
- dw SilphCo10BattleText1 ; 0x61dd TextBeforeBattle
- dw SilphCo10AfterBattleText1 ; 0x61e7 TextAfterBattle
- dw SilphCo10EndBattleText1 ; 0x61e2 TextEndBattle
- dw SilphCo10EndBattleText1 ; 0x61e2 TextEndBattle
+ dw SilphCo10BattleText1 ; TextBeforeBattle
+ dw SilphCo10AfterBattleText1 ; TextAfterBattle
+ dw SilphCo10EndBattleText1 ; TextEndBattle
+ dw SilphCo10EndBattleText1 ; TextEndBattle
SilphCo10TrainerHeader1: ; 5a19e (16:619e)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd835 ; flag's byte
- dw SilphCo10BattleText2 ; 0x61ec TextBeforeBattle
- dw SilphCo10AfterBattleText2 ; 0x61f6 TextAfterBattle
- dw SilphCo10EndBattleText2 ; 0x61f1 TextEndBattle
- dw SilphCo10EndBattleText2 ; 0x61f1 TextEndBattle
+ dw SilphCo10BattleText2 ; TextBeforeBattle
+ dw SilphCo10AfterBattleText2 ; TextAfterBattle
+ dw SilphCo10EndBattleText2 ; TextEndBattle
+ dw SilphCo10EndBattleText2 ; TextEndBattle
db $ff
SilphCo10Text1: ; 5a1ab (16:61ab)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo10TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo10Text2: ; 5a1b5 (16:61b5)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo10TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo10Text3: ; 5a1bf (16:61bf)
- db $08 ; asm
+ TX_ASM
ld a, [wd838]
bit 7, a
ld hl, SilphCo10Text_5a1d8
diff --git a/scripts/silphco11.asm b/scripts/silphco11.asm
index 7bb6e448..a0d85483 100755
--- a/scripts/silphco11.asm
+++ b/scripts/silphco11.asm
@@ -13,7 +13,7 @@ SilphCo11Script_62110: ; 62110 (18:6110)
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, DataTable_62134 ; $6134
+ ld hl, DataTable_62134
call SilphCo11Script_62137
call SilphCo11Script_62163
ld a, [wd838]
@@ -72,7 +72,7 @@ SilphCo11Script_62163: ; 62163 (18:6163)
ret
SilphCo11Script_6216d: ; 6216d (18:616d)
- ld hl, MissableObjectIDs_6219b ; $619b
+ ld hl, MissableObjectIDs_6219b
.asm_62170
ld a, [hli]
cp $ff
@@ -83,7 +83,7 @@ SilphCo11Script_6216d: ; 6216d (18:616d)
pop hl
jr .asm_62170
.asm_62181
- ld hl, MissableObjectIDs_62194 ; $6194
+ ld hl, MissableObjectIDs_62194
.asm_62184
ld a, [hli]
cp $ff
@@ -167,20 +167,20 @@ SilphCo11Script0: ; 621db (18:61db)
ld a, [wd838]
bit 7, a
ret nz
- ld hl, CoordsData_62211 ; $6211
+ ld hl, CoordsData_62211
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld [wcf0d], a
xor a
ld [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
ld a, $3
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, $3
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call SetSpriteMovementBytesToFF
ld de, MovementData_62216
call MoveSprite
@@ -198,13 +198,13 @@ MovementData_62216: ; 62216 (18:6216)
SilphCo11Script_6221a: ; 6221a (18:621a)
ld [wd528], a
ld a, $3
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
ld a, b
ld [$ff8d], a
jp SetSpriteFacingDirectionAndDelay
SilphCo11Script5: ; 62227 (18:6227)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, SilphCo11Script_621c4
ld a, [wcf0d]
@@ -221,7 +221,7 @@ SilphCo11Script5: ; 62227 (18:6227)
ld a, $f0
ld [wJoyIgnore], a
ld a, $6
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
call GBFadeOutToBlack
call SilphCo11Script_6216d
@@ -239,7 +239,7 @@ SilphCo11Script3: ; 6226a (18:626a)
bit 0, a
ret nz
ld a, $3
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call SetSpriteMovementBytesToFF
ld a, [wcf0d]
cp $1
@@ -260,10 +260,10 @@ SilphCo11Script4: ; 62293 (18:6293)
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, SilphCo10Text_62330 ; $6330
- ld de, SilphCo10Text_62330 ; $6330
+ ld hl, SilphCo10Text_62330
+ ld de, SilphCo10Text_62330
call SaveEndBattleTextPointers
- ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c
+ ld a, [H_DOWNARROWBLINKCNT2]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -285,24 +285,24 @@ SilphCo11TrainerHeader0: ; 622c3 (18:62c3)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd837 ; flag's byte
- dw SilphCo11BattleText1 ; 0x6344 TextBeforeBattle
- dw SilphCo11AfterBattleText1 ; 0x634e TextAfterBattle
- dw SilphCo11EndBattleText1 ; 0x6349 TextEndBattle
- dw SilphCo11EndBattleText1 ; 0x6349 TextEndBattle
+ dw SilphCo11BattleText1 ; TextBeforeBattle
+ dw SilphCo11AfterBattleText1 ; TextAfterBattle
+ dw SilphCo11EndBattleText1 ; TextEndBattle
+ dw SilphCo11EndBattleText1 ; TextEndBattle
SilphCo11TrainerHeader1: ; 622cf (18:62cf)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd837 ; flag's byte
- dw SilphCo11BattleText2 ; 0x635d TextBeforeBattle
- dw SilphCo11AfterBattleText2 ; 0x6367 TextAfterBattle
- dw SilphCo11EndBattleText2 ; 0x6362 TextEndBattle
- dw SilphCo11EndBattleText2 ; 0x6362 TextEndBattle
+ dw SilphCo11BattleText2 ; TextBeforeBattle
+ dw SilphCo11AfterBattleText2 ; TextAfterBattle
+ dw SilphCo11EndBattleText2 ; TextEndBattle
+ dw SilphCo11EndBattleText2 ; TextEndBattle
db $ff
SilphCo11Text1: ; 622dc (18:62dc)
- db $08 ; asm
+ TX_ASM
ld a, [wd838]
bit 5, a
jp nz, .asm_62308
@@ -315,15 +315,15 @@ SilphCo11Text1: ; 622dc (18:62dc)
call PrintText
ld hl, wd838
set 5, [hl]
- jr .asm_fd405 ; 0x622fe
+ jr .asm_6230e
.BagFull
ld hl, SilphCoMasterBallNoRoomText
call PrintText
- jr .asm_fd405 ; 0x62306
-.asm_62308 ; 0x62308
+ jr .asm_6230e
+.asm_62308
ld hl, SilphCo10Text_6231c
call PrintText
-.asm_fd405 ; 0x6230e
+.asm_6230e
jp TextScriptEnd
SilphCoPresidentText: ; 62311 (18:6311)
@@ -359,7 +359,7 @@ SilphCo11Text6: ; 62335 (18:6335)
db "@"
SilphCo11Text4: ; 6233a (18:633a)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo11TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -377,7 +377,7 @@ SilphCo11AfterBattleText1: ; 6234e (18:634e)
db "@"
SilphCo11Text5: ; 62353 (18:6353)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo11TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -395,7 +395,7 @@ SilphCo11AfterBattleText2: ; 62367 (18:6367)
db "@"
SilphCo10Text_6236c: ; 6236c (18:636c)
- db $8
+ TX_ASM
ld hl, SilphCo10Text_6237b
call PrintText
ld a, PORYGON
diff --git a/scripts/silphco2.asm b/scripts/silphco2.asm
index 63803acd..ee0bd150 100755
--- a/scripts/silphco2.asm
+++ b/scripts/silphco2.asm
@@ -102,58 +102,58 @@ SilphCo2TrainerHeader0: ; 59d90 (16:5d90)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd825 ; flag's byte
- dw SilphCo2BattleText1 ; 0x5e2a TextBeforeBattle
- dw SilphCo2AfterBattleText1 ; 0x5e34 TextAfterBattle
- dw SilphCo2EndBattleText1 ; 0x5e2f TextEndBattle
- dw SilphCo2EndBattleText1 ; 0x5e2f TextEndBattle
+ dw SilphCo2BattleText1 ; TextBeforeBattle
+ dw SilphCo2AfterBattleText1 ; TextAfterBattle
+ dw SilphCo2EndBattleText1 ; TextEndBattle
+ dw SilphCo2EndBattleText1 ; TextEndBattle
SilphCo2TrainerHeader1: ; 59d9c (16:5d9c)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd825 ; flag's byte
- dw SilphCo2BattleText2 ; 0x5e39 TextBeforeBattle
- dw SilphCo2AfterBattleText2 ; 0x5e43 TextAfterBattle
- dw SilphCo2EndBattleText2 ; 0x5e3e TextEndBattle
- dw SilphCo2EndBattleText2 ; 0x5e3e TextEndBattle
+ dw SilphCo2BattleText2 ; TextBeforeBattle
+ dw SilphCo2AfterBattleText2 ; TextAfterBattle
+ dw SilphCo2EndBattleText2 ; TextEndBattle
+ dw SilphCo2EndBattleText2 ; TextEndBattle
SilphCo2TrainerHeader2: ; 59da8 (16:5da8)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd825 ; flag's byte
- dw SilphCo2BattleText3 ; 0x5e48 TextBeforeBattle
- dw SilphCo2AfterBattleText3 ; 0x5e52 TextAfterBattle
- dw SilphCo2EndBattleText3 ; 0x5e4d TextEndBattle
- dw SilphCo2EndBattleText3 ; 0x5e4d TextEndBattle
+ dw SilphCo2BattleText3 ; TextBeforeBattle
+ dw SilphCo2AfterBattleText3 ; TextAfterBattle
+ dw SilphCo2EndBattleText3 ; TextEndBattle
+ dw SilphCo2EndBattleText3 ; TextEndBattle
SilphCo2TrainerHeader3: ; 59db4 (16:5db4)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd825 ; flag's byte
- dw SilphCo2BattleText4 ; 0x5e57 TextBeforeBattle
- dw SilphCo2AfterBattleText4 ; 0x5e61 TextAfterBattle
- dw SilphCo2EndBattleText4 ; 0x5e5c TextEndBattle
- dw SilphCo2EndBattleText4 ; 0x5e5c TextEndBattle
+ dw SilphCo2BattleText4 ; TextBeforeBattle
+ dw SilphCo2AfterBattleText4 ; TextAfterBattle
+ dw SilphCo2EndBattleText4 ; TextEndBattle
+ dw SilphCo2EndBattleText4 ; TextEndBattle
db $ff
SilphCo2Text1: ; 59dc1 (16:5dc1)
- db $08 ; asm
+ TX_ASM
ld a, [wd826]
bit 7, a
- jr nz, asm_b8a0d ; 0x59dc7
+ jr nz, .asm_59de4
ld hl, SilphCo2Text_59ded
call PrintText
ld bc, (TM_36 << 8) | 1
call GiveItem
ld hl, TM36NoRoomText
- jr nc, asm_2c1e0 ; 0x59dd8
+ jr nc, .asm_59de7
ld hl, wd826
set 7, [hl]
ld hl, ReceivedTM36Text
- jr asm_2c1e0 ; 0x59de2
-asm_b8a0d ; 0x59de4
+ jr .asm_59de7
+.asm_59de4
ld hl, TM36ExplanationText
-asm_2c1e0 ; 0x59de7
+.asm_59de7
call PrintText
jp TextScriptEnd
@@ -174,25 +174,25 @@ TM36NoRoomText: ; 59dfd (16:5dfd)
db "@"
SilphCo2Text2: ; 59e02 (16:5e02)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo2Text3: ; 59e0c (16:5e0c)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo2TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo2Text4: ; 59e16 (16:5e16)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo2TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SilphCo2Text5: ; 59e20 (16:5e20)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo2TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm
index 7b0c67c1..bc36ed39 100755
--- a/scripts/silphco3.asm
+++ b/scripts/silphco3.asm
@@ -13,7 +13,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71)
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, DataTable_59fa8 ; $5fa8
+ ld hl, DataTable_59fa8
call SilphCo2Script_59d43
call SilphCo3Script_59fad
ld a, [wd828]
@@ -65,30 +65,30 @@ SilphCo3TrainerHeader0: ; 59fcc (16:5fcc)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd827 ; flag's byte
- dw SilphCo3BattleText1 ; 0x600d TextBeforeBattle
- dw SilphCo3AfterBattleText1 ; 0x6017 TextAfterBattle
- dw SilphCo3EndBattleText1 ; 0x6012 TextEndBattle
- dw SilphCo3EndBattleText1 ; 0x6012 TextEndBattle
+ dw SilphCo3BattleText1 ; TextBeforeBattle
+ dw SilphCo3AfterBattleText1 ; TextAfterBattle
+ dw SilphCo3EndBattleText1 ; TextEndBattle
+ dw SilphCo3EndBattleText1 ; TextEndBattle
SilphCo3TrainerHeader1: ; 59fd8 (16:5fd8)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd827 ; flag's byte
- dw SilphCo3BattleText2 ; 0x6026 TextBeforeBattle
- dw SilphCo3AfterBattleText2 ; 0x6030 TextAfterBattle
- dw SilphCo3EndBattleText2 ; 0x602b TextEndBattle
- dw SilphCo3EndBattleText2 ; 0x602b TextEndBattle
+ dw SilphCo3BattleText2 ; TextBeforeBattle
+ dw SilphCo3AfterBattleText2 ; TextAfterBattle
+ dw SilphCo3EndBattleText2 ; TextEndBattle
+ dw SilphCo3EndBattleText2 ; TextEndBattle
db $ff
SilphCo3Text1: ; 59fe5 (16:5fe5)
- db $08 ; asm
+ TX_ASM
ld a, [wd838]
bit 7, a
ld hl, SilphCo3Text_59ffe
- jr nz, asm_8c56f ; 0x59fee
+ jr nz, .asm_59fee
ld hl, SilphCo3Text_59ff9
-asm_8c56f ; 0x59ff3
+.asm_59fee
call PrintText
jp TextScriptEnd
@@ -101,7 +101,7 @@ SilphCo3Text_59ffe: ; 59ffe (16:5ffe)
db "@"
SilphCo3Text2: ; 5a003 (16:6003)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -119,7 +119,7 @@ SilphCo3AfterBattleText1: ; 5a017 (16:6017)
db "@"
SilphCo3Text3: ; 5a01c (16:601c)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm
index 15a46dd3..866afd54 100755
--- a/scripts/silphco4.asm
+++ b/scripts/silphco4.asm
@@ -49,19 +49,19 @@ SilphCo4Script_19d5d: ; 19d5d (6:5d5d)
.asm_19d69
ld a, [hli]
cp $ff
- jr z, .asm_19d85 ; 0x19d6c $17
+ jr z, .asm_19d85
push hl
ld hl, $ffe0
inc [hl]
pop hl
cp b
- jr z, .asm_19d7a ; 0x19d75 $3
+ jr z, .asm_19d7a
inc hl
- jr .asm_19d69 ; 0x19d78 $ef
+ jr .asm_19d69
.asm_19d7a
ld a, [hli]
cp c
- jr nz, .asm_19d69 ; 0x19d7c $eb
+ jr nz, .asm_19d69
ld hl, wCardKeyDoorY
xor a
ld [hli], a
@@ -78,7 +78,7 @@ SilphCo4Script_19d89: ; 19d89 (6:5d89)
and a
ret z
cp $1
- jr nz, .asm_19d97 ; 0x19d92 $3
+ jr nz, .asm_19d97
set 0, [hl]
ret
.asm_19d97
@@ -104,33 +104,33 @@ SilphCo4TrainerHeader0: ; 19dae (6:5dae)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd829 ; flag's byte
- dw SilphCo4BattleText2 ; 0x5df4 TextBeforeBattle
- dw SilphCo4AfterBattleText2 ; 0x5dfe TextAfterBattle
- dw SilphCo4EndBattleText2 ; 0x5df9 TextEndBattle
- dw SilphCo4EndBattleText2 ; 0x5df9 TextEndBattle
+ dw SilphCo4BattleText2 ; TextBeforeBattle
+ dw SilphCo4AfterBattleText2 ; TextAfterBattle
+ dw SilphCo4EndBattleText2 ; TextEndBattle
+ dw SilphCo4EndBattleText2 ; TextEndBattle
SilphCo4TrainerHeader2: ; 19dba (6:5dba)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd829 ; flag's byte
- dw SilphCo4BattleText3 ; 0x5e0d TextBeforeBattle
- dw SilphCo4AfterBattleText3 ; 0x5e17 TextAfterBattle
- dw SilphCo4EndBattleText3 ; 0x5e12 TextEndBattle
- dw SilphCo4EndBattleText3 ; 0x5e12 TextEndBattle
+ dw SilphCo4BattleText3 ; TextBeforeBattle
+ dw SilphCo4AfterBattleText3 ; TextAfterBattle
+ dw SilphCo4EndBattleText3 ; TextEndBattle
+ dw SilphCo4EndBattleText3 ; TextEndBattle
SilphCo4TrainerHeader3: ; 19dc6 (6:5dc6)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd829 ; flag's byte
- dw SilphCo4BattleText4 ; 0x5e26 TextBeforeBattle
- dw SilphCo4AfterBattleText4 ; 0x5e30 TextAfterBattle
- dw SilphCo4EndBattleText4 ; 0x5e2b TextEndBattle
- dw SilphCo4EndBattleText4 ; 0x5e2b TextEndBattle
+ dw SilphCo4BattleText4 ; TextBeforeBattle
+ dw SilphCo4AfterBattleText4 ; TextAfterBattle
+ dw SilphCo4EndBattleText4 ; TextEndBattle
+ dw SilphCo4EndBattleText4 ; TextEndBattle
db $ff
SilphCo4Text1: ; 19dd3 (6:5dd3)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo4Text_19de0
ld de, SilphCo4Text_19de5
call SilphCo6Script_1a22f
@@ -145,7 +145,7 @@ SilphCo4Text_19de5: ; 19de5 (6:5de5)
db "@"
SilphCo4Text2: ; 19dea (6:5dea)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -163,7 +163,7 @@ SilphCo4AfterBattleText2: ; 19dfe (6:5dfe)
db "@"
SilphCo4Text3: ; 19e03 (6:5e03)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo4TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -181,7 +181,7 @@ SilphCo4AfterBattleText3: ; 19e17 (6:5e17)
db "@"
SilphCo4Text4: ; 19e1c (6:5e1c)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo4TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm
index 0b63708b..750072ab 100755
--- a/scripts/silphco5.asm
+++ b/scripts/silphco5.asm
@@ -18,7 +18,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
call SilphCo5Script_19f9e
ld a, [wd82c]
bit 0, a
- jr nz, .asm_19f74 ; 0x19f63 $f
+ jr nz, .asm_19f74
push af
ld a, $5f
ld [wd09f], a
@@ -27,7 +27,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
pop af
.asm_19f74
bit 1, a
- jr nz, .asm_19f87 ; 0x19f76 $f
+ jr nz, .asm_19f87
push af
ld a, $5f
ld [wd09f], a
@@ -42,7 +42,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
ld bc, $0507
predef_jump ReplaceTileBlock
-SilphCo5Coords: ; 19f97 (6:5f97) ; coords?
+SilphCo5Coords: ; 19f97 (6:5f97)
db $02, $03, $06, $03, $05, $07, $ff
SilphCo5Script_19f9e: ; 19f9e (6:5f9e)
@@ -51,12 +51,12 @@ SilphCo5Script_19f9e: ; 19f9e (6:5f9e)
and a
ret z
cp $1
- jr nz, .asm_19fac ; 0x19fa7 $3
+ jr nz, .asm_19fac
set 0, [hl]
ret
.asm_19fac
cp $2
- jr nz, .asm_19fb3 ; 0x19fae $3
+ jr nz, .asm_19fb3
set 1, [hl]
ret
.asm_19fb3
@@ -86,42 +86,42 @@ Silphco5TrainerHeader0: ; 19fd2 (6:5fd2)
db $2 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd82b ; flag's byte
- dw SilphCo5BattleText2 ; 0x6024 TextBeforeBattle
- dw SilphCo5AfterBattleText2 ; 0x602e TextAfterBattle
- dw SilphCo5EndBattleText2 ; 0x6029 TextEndBattle
- dw SilphCo5EndBattleText2 ; 0x6029 TextEndBattle
+ dw SilphCo5BattleText2 ; TextBeforeBattle
+ dw SilphCo5AfterBattleText2 ; TextAfterBattle
+ dw SilphCo5EndBattleText2 ; TextEndBattle
+ dw SilphCo5EndBattleText2 ; TextEndBattle
Silphco5TrainerHeader2: ; 19fde (6:5fde)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd82b ; flag's byte
- dw SilphCo5BattleText3 ; 0x603d TextBeforeBattle
- dw SilphCo5AfterBattleText3 ; 0x6047 TextAfterBattle
- dw SilphCo5EndBattleText3 ; 0x6042 TextEndBattle
- dw SilphCo5EndBattleText3 ; 0x6042 TextEndBattle
+ dw SilphCo5BattleText3 ; TextBeforeBattle
+ dw SilphCo5AfterBattleText3 ; TextAfterBattle
+ dw SilphCo5EndBattleText3 ; TextEndBattle
+ dw SilphCo5EndBattleText3 ; TextEndBattle
Silphco5TrainerHeader3: ; 19fea (6:5fea)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd82b ; flag's byte
- dw SilphCo5BattleText4 ; 0x6056 TextBeforeBattle
- dw SilphCo5AfterBattleText4 ; 0x6060 TextAfterBattle
- dw SilphCo5EndBattleText4 ; 0x605b TextEndBattle
- dw SilphCo5EndBattleText4 ; 0x605b TextEndBattle
+ dw SilphCo5BattleText4 ; TextBeforeBattle
+ dw SilphCo5AfterBattleText4 ; TextAfterBattle
+ dw SilphCo5EndBattleText4 ; TextEndBattle
+ dw SilphCo5EndBattleText4 ; TextEndBattle
Silphco5TrainerHeader4: ; 19ff6 (6:5ff6)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd82b ; flag's byte
- dw SilphCo5BattleText5 ; 0x606f TextBeforeBattle
- dw SilphCo5AfterBattleText5 ; 0x6079 TextAfterBattle
- dw SilphCo5EndBattleText5 ; 0x6074 TextEndBattle
- dw SilphCo5EndBattleText5 ; 0x6074 TextEndBattle
+ dw SilphCo5BattleText5 ; TextBeforeBattle
+ dw SilphCo5AfterBattleText5 ; TextAfterBattle
+ dw SilphCo5EndBattleText5 ; TextEndBattle
+ dw SilphCo5EndBattleText5 ; TextEndBattle
db $ff
SilphCo5Text1: ; 1a003 (6:6003)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo5Text_1a010
ld de, SilphCo5Text_1a015
call SilphCo6Script_1a22f
@@ -136,7 +136,7 @@ SilphCo5Text_1a015: ; 1a015 (6:6015)
db "@"
SilphCo5Text2: ; 1a01a (6:601a)
- db $08 ; asm
+ TX_ASM
ld hl, Silphco5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -154,7 +154,7 @@ SilphCo5AfterBattleText2: ; 1a02e (6:602e)
db "@"
SilphCo5Text3: ; 1a033 (6:6033)
- db $08 ; asm
+ TX_ASM
ld hl, Silphco5TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -172,7 +172,7 @@ SilphCo5AfterBattleText3: ; 1a047 (6:6047)
db "@"
SilphCo5Text4: ; 1a04c (6:604c)
- db $08 ; asm
+ TX_ASM
ld hl, Silphco5TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -190,7 +190,7 @@ SilphCo5AfterBattleText4: ; 1a060 (6:6060)
db "@"
SilphCo5Text5: ; 1a065 (6:6065)
- db $08 ; asm
+ TX_ASM
ld hl, Silphco5TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/silphco6.asm b/scripts/silphco6.asm
index 137e31be..0ff5ee50 100755
--- a/scripts/silphco6.asm
+++ b/scripts/silphco6.asm
@@ -58,36 +58,36 @@ SilphCo6TrainerHeader0: ; 1a20a (6:620a)
db $6 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd82d ; flag's byte
- dw SilphCo6BattleText2 ; 0x62ba TextBeforeBattle
- dw SilphCo6AfterBattleText2 ; 0x62c4 TextAfterBattle
- dw SilphCo6EndBattleText2 ; 0x62bf TextEndBattle
- dw SilphCo6EndBattleText2 ; 0x62bf TextEndBattle
+ dw SilphCo6BattleText2 ; TextBeforeBattle
+ dw SilphCo6AfterBattleText2 ; TextAfterBattle
+ dw SilphCo6EndBattleText2 ; TextEndBattle
+ dw SilphCo6EndBattleText2 ; TextEndBattle
SilphCo6TrainerHeader2: ; 1a216 (6:6216)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd82d ; flag's byte
- dw SilphCo6BattleText3 ; 0x62d3 TextBeforeBattle
- dw SilphCo6AfterBattleText3 ; 0x62dd TextAfterBattle
- dw SilphCo6EndBattleText3 ; 0x62d8 TextEndBattle
- dw SilphCo6EndBattleText3 ; 0x62d8 TextEndBattle
+ dw SilphCo6BattleText3 ; TextBeforeBattle
+ dw SilphCo6AfterBattleText3 ; TextAfterBattle
+ dw SilphCo6EndBattleText3 ; TextEndBattle
+ dw SilphCo6EndBattleText3 ; TextEndBattle
SilphCo6TrainerHeader3: ; 1a222 (6:6222)
db $8 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd82d ; flag's byte
- dw SilphCo6BattleText4 ; 0x62ec TextBeforeBattle
- dw SilphCo6AfterBattleText4 ; 0x62f6 TextAfterBattle
- dw SilphCo6EndBattleText4 ; 0x62f1 TextEndBattle
- dw SilphCo6EndBattleText4 ; 0x62f1 TextEndBattle
+ dw SilphCo6BattleText4 ; TextBeforeBattle
+ dw SilphCo6AfterBattleText4 ; TextAfterBattle
+ dw SilphCo6EndBattleText4 ; TextEndBattle
+ dw SilphCo6EndBattleText4 ; TextEndBattle
db $ff
SilphCo6Script_1a22f: ; 1a22f (6:622f)
ld a, [wd838]
bit 7, a
- jr nz, .asm_1a238 ; 0x1a234 $2
- jr .asm_1a23a ; 0x1a236 $2
+ jr nz, .asm_1a238
+ jr .asm_1a23a
.asm_1a238
ld h, d
ld l, e
@@ -95,7 +95,7 @@ SilphCo6Script_1a22f: ; 1a22f (6:622f)
jp PrintText
SilphCo6Text1: ; 1a23d (6:623d)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo6Text_1a24a
ld de, SilphCo6Text_1a24f
call SilphCo6Script_1a22f
@@ -110,7 +110,7 @@ SilphCo6Text_1a24f: ; 1a24f (6:624f)
db "@"
SilphCo6Text2: ; 1a254 (6:6254)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo6Text_1a261
ld de, SilphCo6Text_1a266
call SilphCo6Script_1a22f
@@ -125,7 +125,7 @@ SilphCo6Text_1a266: ; 1a266 (6:6266)
db "@"
SilphCo6Text3: ; 1a26b (6:626b)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo6Text_1a278
ld de, SilphCo6Text_1a27d
call SilphCo6Script_1a22f
@@ -140,7 +140,7 @@ SilphCo6Text_1a27d: ; 1a27d (6:627d)
db "@"
SilphCo6Text4: ; 1a282 (6:6282)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo6Text_1a28f
ld de, SilphCo6Text_1a294
call SilphCo6Script_1a22f
@@ -155,7 +155,7 @@ SilphCo6Text_1a294: ; 1a294 (6:6294)
db "@"
SilphCo6Text5: ; 1a299 (6:6299)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo6Text_1a2a6
ld de, SilphCo6Text_1a2ab
call SilphCo6Script_1a22f
@@ -170,7 +170,7 @@ SilphCo6Text_1a2ab: ; 1a2ab (6:62ab)
db "@"
SilphCo6Text6: ; 1a2b0 (6:62b0)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -188,7 +188,7 @@ SilphCo6AfterBattleText2: ; 1a2c4 (6:62c4)
db "@"
SilphCo6Text7: ; 1a2c9 (6:62c9)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -206,7 +206,7 @@ SilphCo6AfterBattleText3: ; 1a2dd (6:62dd)
db "@"
SilphCo6Text8: ; 1a2e2 (6:62e2)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo6TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/silphco7.asm b/scripts/silphco7.asm
index 23eb795c..1bb07824 100755
--- a/scripts/silphco7.asm
+++ b/scripts/silphco7.asm
@@ -13,7 +13,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77)
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, DataTable_51bc1 ; $5bc1
+ ld hl, DataTable_51bc1
call SilphCo7Text_51bc8
call SilphCo7Text_51bf4
ld a, [wd830]
@@ -136,20 +136,20 @@ SilphCo7Script0: ; 51c23 (14:5c23)
ld a, MUSIC_MEET_RIVAL
call PlayMusic
ld a, $9
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, $9
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call SetSpriteMovementBytesToFF
ld de, MovementData_51c7d
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
ld [wcf0d], a
cp $1
jr z, .asm_51c6c
inc de
.asm_51c6c
ld a, $9
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call MoveSprite
ld a, $3
jp SilphCo7Text_51c10
@@ -169,18 +169,18 @@ SilphCo7Script3: ; 51c82 (14:5c82)
xor a
ld [wJoyIgnore], a
ld a, $d
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
call Delay3
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, SilphCo7Text14 ; $5ec8
- ld de, SilphCo7Text_51ecd ; $5ecd
+ ld hl, SilphCo7Text14
+ ld de, SilphCo7Text_51ecd
call SaveEndBattleTextPointers
ld a, SONY2 + $c8
- ld [W_CUROPPONENT], a ; wd059
- ld a, [W_RIVALSTARTER] ; wd715
+ ld [W_CUROPPONENT], a
+ ld a, [W_RIVALSTARTER]
cp STARTER2
jr nz, .asm_51cb6
ld a, $7
@@ -193,12 +193,12 @@ SilphCo7Script3: ; 51c82 (14:5c82)
.asm_51cbe
ld a, $9
.asm_51cc0
- ld [W_TRAINERNO], a ; wd05d
+ ld [W_TRAINERNO], a
ld a, $4
jp SilphCo7Text_51c10
SilphCo7Script4: ; 51cc8 (14:5cc8)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, SilphCo7Text_51c0c
ld a, $f0
@@ -208,12 +208,12 @@ SilphCo7Script4: ; 51cc8 (14:5cc8)
ld a, $4
ld [wd528], a
ld a, $9
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
ld a, $4
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
ld a, $f
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld a, $ff
ld [wc0ee], a
@@ -226,7 +226,7 @@ SilphCo7Script4: ; 51cc8 (14:5cc8)
ld de, MovementData_51d1a
.asm_51d0e
ld a, $9
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call MoveSprite
ld a, $5
jp SilphCo7Text_51c10
@@ -271,43 +271,43 @@ SilphCo7TrainerHeader0: ; 51d5d (14:5d5d)
db $5 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd82f ; flag's byte
- dw SilphCo7BattleText1 ; 0x5e5a TextBeforeBattle
- dw SilphCo7AfterBattleText1 ; 0x5e64 TextAfterBattle
- dw SilphCo7EndBattleText1 ; 0x5e5f TextEndBattle
- dw SilphCo7EndBattleText1 ; 0x5e5f TextEndBattle
+ dw SilphCo7BattleText1 ; TextBeforeBattle
+ dw SilphCo7AfterBattleText1 ; TextAfterBattle
+ dw SilphCo7EndBattleText1 ; TextEndBattle
+ dw SilphCo7EndBattleText1 ; TextEndBattle
SilphCo7TrainerHeader2: ; 51d69 (14:5d69)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd82f ; flag's byte
- dw SilphCo7BattleText2 ; 0x5e73 TextBeforeBattle
- dw SilphCo7AfterBattleText2 ; 0x5e7d TextAfterBattle
- dw SilphCo7EndBattleText2 ; 0x5e78 TextEndBattle
- dw SilphCo7EndBattleText2 ; 0x5e78 TextEndBattle
+ dw SilphCo7BattleText2 ; TextBeforeBattle
+ dw SilphCo7AfterBattleText2 ; TextAfterBattle
+ dw SilphCo7EndBattleText2 ; TextEndBattle
+ dw SilphCo7EndBattleText2 ; TextEndBattle
SilphCo7TrainerHeader3: ; 51d75 (14:5d75)
db $7 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd82f ; flag's byte
- dw SilphCo7BattleText3 ; 0x5e8c TextBeforeBattle
- dw SilphCo7AfterBattleText3 ; 0x5e96 TextAfterBattle
- dw SilphCo7EndBattleText3 ; 0x5e91 TextEndBattle
- dw SilphCo7EndBattleText3 ; 0x5e91 TextEndBattle
+ dw SilphCo7BattleText3 ; TextBeforeBattle
+ dw SilphCo7AfterBattleText3 ; TextAfterBattle
+ dw SilphCo7EndBattleText3 ; TextEndBattle
+ dw SilphCo7EndBattleText3 ; TextEndBattle
SilphCo7TrainerHeader4: ; 51d81 (14:5d81)
db $8 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd82f ; flag's byte
- dw SilphCo7BattleText4 ; 0x5ea5 TextBeforeBattle
- dw SilphCo7AfterBattleText4 ; 0x5eaf TextAfterBattle
- dw SilphCo7EndBattleText4 ; 0x5eaa TextEndBattle
- dw SilphCo7EndBattleText4 ; 0x5eaa TextEndBattle
+ dw SilphCo7BattleText4 ; TextBeforeBattle
+ dw SilphCo7AfterBattleText4 ; TextAfterBattle
+ dw SilphCo7EndBattleText4 ; TextEndBattle
+ dw SilphCo7EndBattleText4 ; TextEndBattle
db $ff
SilphCo7Text1:
; lapras guy
- db $08 ; asm
+ TX_ASM
ld a, [wd72e]
bit 0, a ; got lapras?
jr z, .givelapras
@@ -355,7 +355,7 @@ SilphCo7Text1:
db "@"
SilphCo7Text2:
- db $8
+ TX_ASM
ld a, [wd838]
bit 7, a ; saved silph?
jr nz, .savedsilph
@@ -377,7 +377,7 @@ SilphCo7Text2:
db "@"
SilphCo7Text3:
- db $08 ; asm
+ TX_ASM
ld a, [wd838]
bit 7, a ; saved silph?
jr nz, .savedsilph
@@ -399,7 +399,7 @@ SilphCo7Text3:
db "@"
SilphCo7Text4:
- db $08 ; asm
+ TX_ASM
ld a, [wd838]
bit 7, a ; saved silph?
jr nz, .savedsilph
@@ -421,7 +421,7 @@ SilphCo7Text4:
db "@"
SilphCo7Text5: ; 51e50 (14:5e50)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo7TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -439,7 +439,7 @@ SilphCo7AfterBattleText1: ; 51e64 (14:5e64)
db "@"
SilphCo7Text6: ; 51e69 (14:5e69)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo7TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -457,7 +457,7 @@ SilphCo7AfterBattleText2: ; 51e7d (14:5e7d)
db "@"
SilphCo7Text7: ; 51e82 (14:5e82)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo7TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -475,7 +475,7 @@ SilphCo7AfterBattleText3: ; 51e96 (14:5e96)
db "@"
SilphCo7Text8: ; 51e9b (14:5e9b)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo7TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -493,7 +493,7 @@ SilphCo7AfterBattleText4: ; 51eaf (14:5eaf)
db "@"
SilphCo7Text9: ; 51eb4 (14:5eb4)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo7Text_51ebe
call PrintText
jp TextScriptEnd
diff --git a/scripts/silphco8.asm b/scripts/silphco8.asm
index ebca9b95..95a1096d 100755
--- a/scripts/silphco8.asm
+++ b/scripts/silphco8.asm
@@ -13,7 +13,7 @@ SilphCo8Script_5651a: ; 5651a (15:651a)
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, DataTable_5653e ; $653e
+ ld hl, DataTable_5653e
call SilphCo8Script_56541
call SilphCo8Script_5656d
ld a, [wd832]
@@ -87,39 +87,39 @@ SilphCo8TrainerHeader0: ; 56585 (15:6585)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd831 ; flag's byte
- dw SilphCo8BattleText1 ; 0x65e6 TextBeforeBattle
- dw SilphCo8AfterBattleText1 ; 0x65f0 TextAfterBattle
- dw SilphCo8EndBattleText1 ; 0x65eb TextEndBattle
- dw SilphCo8EndBattleText1 ; 0x65eb TextEndBattle
+ dw SilphCo8BattleText1 ; TextBeforeBattle
+ dw SilphCo8AfterBattleText1 ; TextAfterBattle
+ dw SilphCo8EndBattleText1 ; TextEndBattle
+ dw SilphCo8EndBattleText1 ; TextEndBattle
SilphCo8TrainerHeader1: ; 56591 (15:6591)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd831 ; flag's byte
- dw SilphCo8BattleText2 ; 0x65f5 TextBeforeBattle
- dw SilphCo8AfterBattleText2 ; 0x65ff TextAfterBattle
- dw SilphCo8EndBattleText2 ; 0x65fa TextEndBattle
- dw SilphCo8EndBattleText2 ; 0x65fa TextEndBattle
+ dw SilphCo8BattleText2 ; TextBeforeBattle
+ dw SilphCo8AfterBattleText2 ; TextAfterBattle
+ dw SilphCo8EndBattleText2 ; TextEndBattle
+ dw SilphCo8EndBattleText2 ; TextEndBattle
SilphCo8TrainerHeader2: ; 5659d (15:659d)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd831 ; flag's byte
- dw SilphCo8BattleText3 ; 0x6604 TextBeforeBattle
- dw SilphCo8AfterBattleText3 ; 0x660e TextAfterBattle
- dw SilphCo8EndBattleText3 ; 0x6609 TextEndBattle
- dw SilphCo8EndBattleText3 ; 0x6609 TextEndBattle
+ dw SilphCo8BattleText3 ; TextBeforeBattle
+ dw SilphCo8AfterBattleText3 ; TextAfterBattle
+ dw SilphCo8EndBattleText3 ; TextEndBattle
+ dw SilphCo8EndBattleText3 ; TextEndBattle
db $ff
SilphCo8Text1: ; 565aa (15:65aa)
- db $08 ; asm
+ TX_ASM
ld a, [wd838]
bit 7, a
ld hl, SilphCo8Text_565c3
- jr nz, asm_a468f ; 0x565b3
+ jr nz, .asm_565b8
ld hl, SilphCo8Text_565be
-asm_a468f ; 0x565b8
+.asm_565b8
call PrintText
jp TextScriptEnd
@@ -132,19 +132,19 @@ SilphCo8Text_565c3: ; 565c3 (15:65c3)
db "@"
SilphCo8Text2: ; 565c8 (15:65c8)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo8Text3: ; 565d2 (15:65d2)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo8Text4: ; 565dc (15:65dc)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/silphco9.asm b/scripts/silphco9.asm
index e8b16927..b19dbde4 100755
--- a/scripts/silphco9.asm
+++ b/scripts/silphco9.asm
@@ -13,7 +13,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, DataTable_5d82e ; $582e
+ ld hl, DataTable_5d82e
call SilphCo9Script_5d837
call SilphCo9Script_5d863
ld a, [wd834]
@@ -131,36 +131,36 @@ SilphCo9TrainerHeader0: ; 5d893 (17:5893)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd833 ; flag's byte
- dw SilphCo9BattleText1 ; 0x5912 TextBeforeBattle
- dw SilphCo9AfterBattleText1 ; 0x591c TextAfterBattle
- dw SilphCo9EndBattleText1 ; 0x5917 TextEndBattle
- dw SilphCo9EndBattleText1 ; 0x5917 TextEndBattle
+ dw SilphCo9BattleText1 ; TextBeforeBattle
+ dw SilphCo9AfterBattleText1 ; TextAfterBattle
+ dw SilphCo9EndBattleText1 ; TextEndBattle
+ dw SilphCo9EndBattleText1 ; TextEndBattle
SilphCo9TrainerHeader1: ; 5d89f (17:589f)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd833 ; flag's byte
- dw SilphCo9BattleText2 ; 0x5921 TextBeforeBattle
- dw SilphCo9AfterBattleText2 ; 0x592b TextAfterBattle
- dw SilphCo9EndBattleText2 ; 0x5926 TextEndBattle
- dw SilphCo9EndBattleText2 ; 0x5926 TextEndBattle
+ dw SilphCo9BattleText2 ; TextBeforeBattle
+ dw SilphCo9AfterBattleText2 ; TextAfterBattle
+ dw SilphCo9EndBattleText2 ; TextEndBattle
+ dw SilphCo9EndBattleText2 ; TextEndBattle
SilphCo9TrainerHeader2: ; 5d8ab (17:58ab)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd833 ; flag's byte
- dw SilphCo9BattleText3 ; 0x5930 TextBeforeBattle
- dw SilphCo9AfterBattleText3 ; 0x593a TextAfterBattle
- dw SilphCo9EndBattleText3 ; 0x5935 TextEndBattle
- dw SilphCo9EndBattleText3 ; 0x5935 TextEndBattle
+ dw SilphCo9BattleText3 ; TextBeforeBattle
+ dw SilphCo9AfterBattleText3 ; TextAfterBattle
+ dw SilphCo9EndBattleText3 ; TextEndBattle
+ dw SilphCo9EndBattleText3 ; TextEndBattle
db $ff
SilphCo9Text1: ; 5d8b8 (17:58b8)
- db $08 ; asm
+ TX_ASM
ld a, [wd838]
bit 7, a
- jr nz, .asm_a14c3 ; 0x5d8be
+ jr nz, .asm_5d8dc
ld hl, SilphCo9Text_5d8e5
call PrintText
predef HealParty
@@ -169,11 +169,11 @@ SilphCo9Text1: ; 5d8b8 (17:58b8)
call GBFadeInFromWhite
ld hl, SilphCo9Text_5d8ea
call PrintText
- jr .asm_b6e28 ; 0x5d8da
-.asm_a14c3 ; 0x5d8dc
+ jr .asm_5d8e2
+.asm_5d8dc
ld hl, SilphCo9Text_5d8ef
call PrintText
-.asm_b6e28 ; 0x5d8e2
+.asm_5d8e2
jp TextScriptEnd
SilphCo9Text_5d8e5: ; 5d8e5 (17:58e5)
@@ -189,19 +189,19 @@ SilphCo9Text_5d8ef: ; 5d8ef (17:58ef)
db "@"
SilphCo9Text2: ; 5d8f4 (17:58f4)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo9TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo9Text3: ; 5d8fe (17:58fe)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo9TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo9Text4: ; 5d908 (17:5908)
- db $08 ; asm
+ TX_ASM
ld hl, SilphCo9TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/silphcoelevator.asm b/scripts/silphcoelevator.asm
index 48d406cc..161b5ece 100755
--- a/scripts/silphcoelevator.asm
+++ b/scripts/silphcoelevator.asm
@@ -32,9 +32,9 @@ SilphCoElevatorScript_457ea: ; 457ea (11:57ea)
ret
SilphCoElevatorScript_457f1: ; 457f1 (11:57f1)
- ld hl, SilphCoElavatorFloors ; $5804
+ ld hl, SilphCoElavatorFloors
call LoadItemList
- ld hl, SilphCoElevatorWarpMaps ; $5811
+ ld hl, SilphCoElevatorWarpMaps
ld de, wcc5b
ld bc, $16
call CopyData
@@ -70,8 +70,8 @@ SilphCoElevatorTextPointers: ; 45833 (11:5833)
dw SilphCoElevatorText1
SilphCoElevatorText1: ; 45835 (11:5835)
- db $08 ; asm
+ TX_ASM
call SilphCoElevatorScript_457f1
- ld hl, SilphCoElevatorWarpMaps ; $5811
+ ld hl, SilphCoElevatorWarpMaps
predef Func_1c9c6
jp TextScriptEnd
diff --git a/scripts/ssanne10.asm b/scripts/ssanne10.asm
index 8f3ff9a4..4dee3bb7 100755
--- a/scripts/ssanne10.asm
+++ b/scripts/ssanne10.asm
@@ -30,97 +30,97 @@ SSAnne10TrainerHeader0: ; 61d84 (18:5d84)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd809 ; flag's byte
- dw SSAnne10BattleText1 ; 0x5e16 TextBeforeBattle
- dw SSAnne10AfterBattleText1 ; 0x5e20 TextAfterBattle
- dw SSAnne10EndBattleText1 ; 0x5e1b TextEndBattle
- dw SSAnne10EndBattleText1 ; 0x5e1b TextEndBattle
+ dw SSAnne10BattleText1 ; TextBeforeBattle
+ dw SSAnne10AfterBattleText1 ; TextAfterBattle
+ dw SSAnne10EndBattleText1 ; TextEndBattle
+ dw SSAnne10EndBattleText1 ; TextEndBattle
SSAnne10TrainerHeader1: ; 61d90 (18:5d90)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd809 ; flag's byte
- dw SSAnne10BattleText2 ; 0x5e25 TextBeforeBattle
- dw SSAnne10AfterBattleText2 ; 0x5e2f TextAfterBattle
- dw SSAnne10EndBattleText2 ; 0x5e2a TextEndBattle
- dw SSAnne10EndBattleText2 ; 0x5e2a TextEndBattle
+ dw SSAnne10BattleText2 ; TextBeforeBattle
+ dw SSAnne10AfterBattleText2 ; TextAfterBattle
+ dw SSAnne10EndBattleText2 ; TextEndBattle
+ dw SSAnne10EndBattleText2 ; TextEndBattle
SSAnne10TrainerHeader2: ; 61d9c (18:5d9c)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd809 ; flag's byte
- dw SSAnne10BattleText3 ; 0x5e34 TextBeforeBattle
- dw SSAnne10AfterBattleText3 ; 0x5e3e TextAfterBattle
- dw SSAnne10EndBattleText3 ; 0x5e39 TextEndBattle
- dw SSAnne10EndBattleText3 ; 0x5e39 TextEndBattle
+ dw SSAnne10BattleText3 ; TextBeforeBattle
+ dw SSAnne10AfterBattleText3 ; TextAfterBattle
+ dw SSAnne10EndBattleText3 ; TextEndBattle
+ dw SSAnne10EndBattleText3 ; TextEndBattle
SSAnne10TrainerHeader3: ; 61da8 (18:5da8)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd809 ; flag's byte
- dw SSAnne10BattleText4 ; 0x5e43 TextBeforeBattle
- dw SSAnne10AfterBattleText4 ; 0x5e4d TextAfterBattle
- dw SSAnne10EndBattleText4 ; 0x5e48 TextEndBattle
- dw SSAnne10EndBattleText4 ; 0x5e48 TextEndBattle
+ dw SSAnne10BattleText4 ; TextBeforeBattle
+ dw SSAnne10AfterBattleText4 ; TextAfterBattle
+ dw SSAnne10EndBattleText4 ; TextEndBattle
+ dw SSAnne10EndBattleText4 ; TextEndBattle
SSAnne10TrainerHeader4: ; 61db4 (18:5db4)
db $5 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd809 ; flag's byte
- dw SSAnne10BattleText5 ; 0x5e52 TextBeforeBattle
- dw SSAnne10AfterBattleText5 ; 0x5e5c TextAfterBattle
- dw SSAnne10EndBattleText5 ; 0x5e57 TextEndBattle
- dw SSAnne10EndBattleText5 ; 0x5e57 TextEndBattle
+ dw SSAnne10BattleText5 ; TextBeforeBattle
+ dw SSAnne10AfterBattleText5 ; TextAfterBattle
+ dw SSAnne10EndBattleText5 ; TextEndBattle
+ dw SSAnne10EndBattleText5 ; TextEndBattle
SSAnne10TrainerHeader5: ; 61dc0 (18:5dc0)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd809 ; flag's byte
- dw SSAnne10BattleText6 ; 0x5e61 TextBeforeBattle
- dw SSAnne10AfterBattleText6 ; 0x5e6b TextAfterBattle
- dw SSAnne10EndBattleText6 ; 0x5e66 TextEndBattle
- dw SSAnne10EndBattleText6 ; 0x5e66 TextEndBattle
+ dw SSAnne10BattleText6 ; TextBeforeBattle
+ dw SSAnne10AfterBattleText6 ; TextAfterBattle
+ dw SSAnne10EndBattleText6 ; TextEndBattle
+ dw SSAnne10EndBattleText6 ; TextEndBattle
db $ff
SSAnne10Text1: ; 61dcd (18:5dcd)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne10TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text2: ; 61dd7 (18:5dd7)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne10TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text3: ; 61de1 (18:5de1)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne10TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text4: ; 61deb (18:5deb)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne10TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text5: ; 61df5 (18:5df5)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne10TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text6: ; 61dff (18:5dff)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne10TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
SSAnne10Text8: ; 61e09 (18:5e09)
TX_FAR _SSAnne10Text8
- db $8 ; 0x61e0d
+ TX_ASM
ld a, MACHOKE
call PlayCry
jp TextScriptEnd
diff --git a/scripts/ssanne2.asm b/scripts/ssanne2.asm
index 474aaa60..d540f41b 100755
--- a/scripts/ssanne2.asm
+++ b/scripts/ssanne2.asm
@@ -21,7 +21,7 @@ SSAnne2Script4: ; 613bd (18:53bd)
ret
SSAnne2Script0: ; 613be (18:53be)
- ld hl, CoordsData_61411 ; $5411
+ ld hl, CoordsData_61411
call ArePlayerCoordsInArray
ret nc
ld a, $ff
@@ -45,9 +45,9 @@ SSAnne2Script0: ; 613be (18:53be)
ld [wJoyIgnore], a
ld a, [$ffdb]
cp $2
- jr nz, .asm_61400 ; 0x613f9 $5
+ jr nz, .asm_61400
ld de, MovementData_6140c
- jr .asm_61403 ; 0x613fe $3
+ jr .asm_61403
.asm_61400
ld de, MovementData_6140d
.asm_61403
@@ -66,7 +66,7 @@ CoordsData_61411: ; 61411 (18:5411)
db $08,$24,$08,$25,$FF
SSAnne2Script_61416: ; 61416 (18:5416)
- ld a, [W_XCOORD] ; wd362
+ ld a, [W_XCOORD]
cp $25
jr nz, .asm_61426
ld a, $2
@@ -78,7 +78,7 @@ SSAnne2Script_61416: ; 61416 (18:5416)
.asm_61427
ld [$ff8d], a
ld a, $2
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
jp SetSpriteFacingDirectionAndDelay
SSAnne2Script1: ; 61430 (18:5430)
@@ -98,12 +98,12 @@ SSAnne2Script1: ; 61430 (18:5430)
; select which team to use during the encounter
ld a, [W_RIVALSTARTER]
cp STARTER2
- jr nz, .NotSquirtle ; 0x61451 $4
+ jr nz, .NotSquirtle
ld a, $1
jr .done
.NotSquirtle
cp STARTER3
- jr nz, .Charmander ; 0x61459 $4
+ jr nz, .Charmander
ld a, $2
jr .done
.Charmander
@@ -131,9 +131,9 @@ SSAnne2Script2: ; 6146d (18:546d)
call SetSpriteMovementBytesToFF
ld a, [W_XCOORD]
cp $25
- jr nz, .asm_61497 ; 0x61490 $5
+ jr nz, .asm_61497
ld de, MovementData_614b9
- jr .asm_6149a ; 0x61495 $3
+ jr .asm_6149a
.asm_61497
ld de, MovementData_614b7
.asm_6149a
@@ -178,7 +178,7 @@ SSAnne2Text1: ; 614e1 (18:54e1)
db "@"
SSAnne2Text2: ; 614e6 (18:54e6)
- db $8
+ TX_ASM
ld hl, SSAnneRivalBeforeBattleText
call PrintText
ld hl, wd72d
diff --git a/scripts/ssanne5.asm b/scripts/ssanne5.asm
index 96b94c52..063ccbb8 100755
--- a/scripts/ssanne5.asm
+++ b/scripts/ssanne5.asm
@@ -1,6 +1,6 @@
SSAnne5Script: ; 616ae (18:56ae)
call EnableAutoTextBoxDrawing
- ld hl, SSAnne5TrainerHeader0 ; $56d1
+ ld hl, SSAnne5TrainerHeader0
ld de, SSAnne5ScriptPointers
ld a, [W_SSANNE5CURSCRIPT]
call ExecuteCurMapScriptInTable
@@ -24,19 +24,19 @@ SSAnne5TrainerHeader0: ; 616d1 (18:56d1)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7ff ; flag's byte
- dw SSAnne5BattleText1 ; 0x5703 TextBeforeBattle
- dw SSAnne5AfterBattleText1 ; 0x570d TextAfterBattle
- dw SSAnne5EndBattleText1 ; 0x5708 TextEndBattle
- dw SSAnne5EndBattleText1 ; 0x5708 TextEndBattle
+ dw SSAnne5BattleText1 ; TextBeforeBattle
+ dw SSAnne5AfterBattleText1 ; TextAfterBattle
+ dw SSAnne5EndBattleText1 ; TextEndBattle
+ dw SSAnne5EndBattleText1 ; TextEndBattle
SSAnne5TrainerHeader1: ; 616dd (18:56dd)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7ff ; flag's byte
- dw SSAnne5BattleText2 ; 0x571c TextBeforeBattle
- dw SSAnne5AfterBattleText2 ; 0x5726 TextAfterBattle
- dw SSAnne5EndBattleText2 ; 0x5721 TextEndBattle
- dw SSAnne5EndBattleText2 ; 0x5721 TextEndBattle
+ dw SSAnne5BattleText2 ; TextBeforeBattle
+ dw SSAnne5AfterBattleText2 ; TextAfterBattle
+ dw SSAnne5EndBattleText2 ; TextEndBattle
+ dw SSAnne5EndBattleText2 ; TextEndBattle
db $ff
@@ -53,7 +53,7 @@ SSAnne5Text3: ; 616f4 (18:56f4)
db "@"
SSAnne5Text4: ; 616f9 (18:56f9)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -71,7 +71,7 @@ SSAnne5AfterBattleText1: ; 6170d (18:570d)
db "@"
SSAnne5Text5: ; 61712 (18:5712)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne5TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/ssanne6.asm b/scripts/ssanne6.asm
index d3ec191f..fbe8176d 100755
--- a/scripts/ssanne6.asm
+++ b/scripts/ssanne6.asm
@@ -36,22 +36,22 @@ SSAnne6Text6: ; 617de (18:57de)
db "@"
SSAnne6Text7: ; 617e3 (18:57e3)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne6Text_61807
call PrintText
- ldh a, [$d3]
+ ld a, [hRandomAdd]
bit 7, a
- jr z, .asm_93eb1 ; 0x617ee
+ jr z, .asm_93eb1
ld hl, SSAnne6Text_6180c
- jr .asm_63292 ; 0x617f3
-.asm_93eb1 ; 0x617f5
+ jr .asm_63292
+.asm_93eb1
bit 4, a
- jr z, .asm_7436c ; 0x617f7
+ jr z, .asm_7436c
ld hl, SSAnne6Text_61811
- jr .asm_63292 ; 0x617fc
-.asm_7436c ; 0x617fe
+ jr .asm_63292
+.asm_7436c
ld hl, SSAnne6Text_61816
-.asm_63292 ; 0x61801
+.asm_63292
call PrintText
jp TextScriptEnd
diff --git a/scripts/ssanne7.asm b/scripts/ssanne7.asm
index 1ca97ce2..a1fd791a 100755
--- a/scripts/ssanne7.asm
+++ b/scripts/ssanne7.asm
@@ -16,10 +16,10 @@ SSAnne7TextPointers: ; 618a7 (18:58a7)
dw SSAnne7Text3
SSAnne7Text1: ; 618ad (18:58ad)
- db $08 ; asm
+ TX_ASM
ld a, [wd803]
bit 0, a
- jr nz, .asm_797c4 ; 0x618b3
+ jr nz, .asm_797c4
ld hl, SSAnne7RubText
call PrintText
ld hl, ReceivingHM01Text
@@ -31,30 +31,30 @@ SSAnne7Text1: ; 618ad (18:58ad)
call PrintText
ld hl, wd803
set 0, [hl]
- jr .asm_0faf5 ; 0x618d4
+ jr .asm_0faf5
.BagFull
ld hl, HM01NoRoomText
call PrintText
ld hl, wd72d
set 5, [hl]
- jr .asm_0faf5 ; 0x618e1
-.asm_797c4 ; 0x618e3
+ jr .asm_0faf5
+.asm_797c4
ld hl, SSAnne7Text_61932
call PrintText
-.asm_0faf5 ; 0x618e9
+.asm_0faf5
jp TextScriptEnd
SSAnne7RubText: ; 618ec (18:58ec)
TX_FAR _SSAnne7RubText
- db $8
+ TX_ASM
ld a, [wc0ef]
- cp $1f
+ cp BANK(Music1f_UpdateMusic)
ld [wc0f0], a
- jr nz, .asm_61908 ; 0x618f9 $d
+ jr nz, .asm_61908
ld a, $ff
ld [wc0ee], a
call PlaySound
- ld a, Bank(Func_9876)
+ ld a, Bank(Music_PkmnHealed)
ld [wc0ef], a
.asm_61908
ld a, MUSIC_PKMN_HEALED
@@ -63,7 +63,7 @@ SSAnne7RubText: ; 618ec (18:58ec)
.asm_61910
ld a, [wc026]
cp MUSIC_PKMN_HEALED
- jr z, .asm_61910 ; 0x61915 $f9
+ jr z, .asm_61910
call PlayDefaultMusic
ld hl, wd803
set 1, [hl]
diff --git a/scripts/ssanne8.asm b/scripts/ssanne8.asm
index ff7fc57b..27c76a2f 100755
--- a/scripts/ssanne8.asm
+++ b/scripts/ssanne8.asm
@@ -30,67 +30,67 @@ SSAnne8TrainerHeader0: ; 619a5 (18:59a5)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd805 ; flag's byte
- dw SSAnne8BattleText1 ; 0x5a0b TextBeforeBattle
- dw SSAnne8AfterBattleText1 ; 0x5a15 TextAfterBattle
- dw SSAnne8EndBattleText1 ; 0x5a10 TextEndBattle
- dw SSAnne8EndBattleText1 ; 0x5a10 TextEndBattle
+ dw SSAnne8BattleText1 ; TextBeforeBattle
+ dw SSAnne8AfterBattleText1 ; TextAfterBattle
+ dw SSAnne8EndBattleText1 ; TextEndBattle
+ dw SSAnne8EndBattleText1 ; TextEndBattle
SSAnne8TrainerHeader1: ; 619b1 (18:59b1)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd805 ; flag's byte
- dw SSAnne8BattleText2 ; 0x5a1a TextBeforeBattle
- dw SSAnne8AfterBattleText2 ; 0x5a24 TextAfterBattle
- dw SSAnne8EndBattleText2 ; 0x5a1f TextEndBattle
- dw SSAnne8EndBattleText2 ; 0x5a1f TextEndBattle
+ dw SSAnne8BattleText2 ; TextBeforeBattle
+ dw SSAnne8AfterBattleText2 ; TextAfterBattle
+ dw SSAnne8EndBattleText2 ; TextEndBattle
+ dw SSAnne8EndBattleText2 ; TextEndBattle
SSAnne8TrainerHeader2: ; 619bd (18:59bd)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd805 ; flag's byte
- dw SSAnne8BattleText3 ; 0x5a29 TextBeforeBattle
- dw SSAnne8AfterBattleText3 ; 0x5a33 TextAfterBattle
- dw SSAnne8EndBattleText3 ; 0x5a2e TextEndBattle
- dw SSAnne8EndBattleText3 ; 0x5a2e TextEndBattle
+ dw SSAnne8BattleText3 ; TextBeforeBattle
+ dw SSAnne8AfterBattleText3 ; TextAfterBattle
+ dw SSAnne8EndBattleText3 ; TextEndBattle
+ dw SSAnne8EndBattleText3 ; TextEndBattle
SSAnne8TrainerHeader3: ; 619c9 (18:59c9)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd805 ; flag's byte
- dw SSAnne8BattleText4 ; 0x5a38 TextBeforeBattle
- dw SSAnne8AfterBattleText4 ; 0x5a42 TextAfterBattle
- dw SSAnne8EndBattleText4 ; 0x5a3d TextEndBattle
- dw SSAnne8EndBattleText4 ; 0x5a3d TextEndBattle
+ dw SSAnne8BattleText4 ; TextBeforeBattle
+ dw SSAnne8AfterBattleText4 ; TextAfterBattle
+ dw SSAnne8EndBattleText4 ; TextEndBattle
+ dw SSAnne8EndBattleText4 ; TextEndBattle
db $ff
SSAnne8Text1: ; 619d6 (18:59d6)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SSAnne8Text2: ; 619e0 (18:59e0)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SSAnne8Text3: ; 619ea (18:59ea)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SSAnne8Text4: ; 619f4 (18:59f4)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne8TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SSAnne8Text8: ; 619fe (18:59fe)
TX_FAR _SSAnne8Text8
- db $08 ; asm
+ TX_ASM
ld a, WIGGLYTUFF
call PlayCry
jp TextScriptEnd
diff --git a/scripts/ssanne9.asm b/scripts/ssanne9.asm
index db34fcf2..6e8b86c6 100755
--- a/scripts/ssanne9.asm
+++ b/scripts/ssanne9.asm
@@ -35,66 +35,66 @@ SSAnne9TrainerHeader0: ; 61b84 (18:5b84)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd807 ; flag's byte
- dw SSAnne9BattleText1 ; 0x5c51 TextBeforeBattle
- dw SSAnne9AfterBattleText1 ; 0x5c5b TextAfterBattle
- dw SSAnne9EndBattleText1 ; 0x5c56 TextEndBattle
- dw SSAnne9EndBattleText1 ; 0x5c56 TextEndBattle
+ dw SSAnne9BattleText1 ; TextBeforeBattle
+ dw SSAnne9AfterBattleText1 ; TextAfterBattle
+ dw SSAnne9EndBattleText1 ; TextEndBattle
+ dw SSAnne9EndBattleText1 ; TextEndBattle
SSAnne9TrainerHeader1: ; 61b90 (18:5b90)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd807 ; flag's byte
- dw SSAnne9BattleText2 ; 0x5c60 TextBeforeBattle
- dw SSAnne9AfterBattleText2 ; 0x5c6a TextAfterBattle
- dw SSAnne9EndBattleText2 ; 0x5c65 TextEndBattle
- dw SSAnne9EndBattleText2 ; 0x5c65 TextEndBattle
+ dw SSAnne9BattleText2 ; TextBeforeBattle
+ dw SSAnne9AfterBattleText2 ; TextAfterBattle
+ dw SSAnne9EndBattleText2 ; TextEndBattle
+ dw SSAnne9EndBattleText2 ; TextEndBattle
SSAnne9TrainerHeader2: ; 61b9c (18:5b9c)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd807 ; flag's byte
- dw SSAnne9BattleText3 ; 0x5c6f TextBeforeBattle
- dw SSAnne9AfterBattleText3 ; 0x5c79 TextAfterBattle
- dw SSAnne9EndBattleText3 ; 0x5c74 TextEndBattle
- dw SSAnne9EndBattleText3 ; 0x5c74 TextEndBattle
+ dw SSAnne9BattleText3 ; TextBeforeBattle
+ dw SSAnne9AfterBattleText3 ; TextAfterBattle
+ dw SSAnne9EndBattleText3 ; TextEndBattle
+ dw SSAnne9EndBattleText3 ; TextEndBattle
SSAnne9TrainerHeader3: ; 61ba8 (18:5ba8)
db $4 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd807 ; flag's byte
- dw SSAnne9BattleText4 ; 0x5c7e TextBeforeBattle
- dw SSAnne9AfterBattleText4 ; 0x5c88 TextAfterBattle
- dw SSAnne9EndBattleText4 ; 0x5c83 TextEndBattle
- dw SSAnne9EndBattleText4 ; 0x5c83 TextEndBattle
+ dw SSAnne9BattleText4 ; TextBeforeBattle
+ dw SSAnne9AfterBattleText4 ; TextAfterBattle
+ dw SSAnne9EndBattleText4 ; TextEndBattle
+ dw SSAnne9EndBattleText4 ; TextEndBattle
db $ff
SSAnne9Text1: ; 61bb5 (18:5bb5)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SSAnne9Text2: ; 61bbf (18:5bbf)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SSAnne9Text3: ; 61bc9 (18:5bc9)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SSAnne9Text4: ; 61bd3 (18:5bd3)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
SSAnne9Text5: ; 61bdd (18:5bdd)
- db $08 ; asm
+ TX_ASM
call SaveScreenTilesToBuffer1
ld hl, SSAnne9Text_61bf2
call PrintText
@@ -108,7 +108,7 @@ SSAnne9Text_61bf2: ; 61bf2 (18:5bf2)
db "@"
SSAnne9Text7: ; 61bf7 (18:5bf7)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9Text_61c01
call PrintText
jp TextScriptEnd
@@ -118,7 +118,7 @@ SSAnne9Text_61c01: ; 61c01 (18:5c01)
db "@"
SSAnne9Text8: ; 61c06 (18:5c06)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9Text_61c10
call PrintText
jp TextScriptEnd
@@ -128,7 +128,7 @@ SSAnne9Text_61c10: ; 61c10 (18:5c10)
db "@"
SSAnne9Text10: ; 61c15 (18:5c15)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9Text_61c1f
call PrintText
jp TextScriptEnd
@@ -138,7 +138,7 @@ SSAnne9Text_61c1f: ; 61c1f (18:5c1f)
db "@"
SSAnne9Text11: ; 61c24 (18:5c24)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9Text_61c2e
call PrintText
jp TextScriptEnd
@@ -148,7 +148,7 @@ SSAnne9Text_61c2e: ; 61c2e (18:5c2e)
db "@"
SSAnne9Text12: ; 61c33 (18:5c33)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9Text_61c3d
call PrintText
jp TextScriptEnd
@@ -158,7 +158,7 @@ SSAnne9Text_61c3d: ; 61c3d (18:5c3d)
db "@"
SSAnne9Text13: ; 61c42 (18:5c42)
- db $08 ; asm
+ TX_ASM
ld hl, SSAnne9Text_61c4c
call PrintText
jp TextScriptEnd
diff --git a/scripts/undergroundpathentranceroute5.asm b/scripts/undergroundpathentranceroute5.asm
index 03f1c35d..c93ab7b5 100755
--- a/scripts/undergroundpathentranceroute5.asm
+++ b/scripts/undergroundpathentranceroute5.asm
@@ -10,7 +10,7 @@ UndergroundPathEntranceRoute5TextPointers: ; 5d6b0 (17:56b0)
dw UndergroundPathEntranceRoute5Text1
UndergroundPathEntranceRoute5Text1: ; 5d6b2 (17:56b2)
- db $08 ; asm
+ TX_ASM
ld a, $9
ld [wWhichTrade], a
predef DoInGameTradeDialogue
diff --git a/scripts/undergroundpathentranceroute7copy.asm b/scripts/undergroundpathentranceroute7copy.asm
index 2462a254..d94c9f37 100755
--- a/scripts/undergroundpathentranceroute7copy.asm
+++ b/scripts/undergroundpathentranceroute7copy.asm
@@ -4,21 +4,21 @@ UndergroundPathEntranceRoute7CopyScript: ; 5d769 (17:5769)
ret
UndergroundPathEntranceRoute7CopyTextPointers: ; 5d76f (17:576f)
- dw UnnamedText_5d773
- dw UnnamedText_5d77d
+ dw UGPathRoute7EntranceUnusedText_5d773
+ dw UGPathRoute7EntranceUnusedText_5d77d
-UnnamedText_5d773: ; 5d773 (17:5773)
- TX_FAR _UnnamedText_5d773
+UGPathRoute7EntranceUnusedText_5d773: ; 5d773 (17:5773)
+ TX_FAR _UGPathRoute7EntranceUnusedText_5d773
db "@"
-UnnamedText_5d778: ; 5d778 (17:5778)
- TX_FAR _UnnamedText_5d778
+UGPathRoute7EntranceUnusedText_5d778: ; 5d778 (17:5778)
+ TX_FAR _UGPathRoute7EntranceUnusedText_5d778
db "@"
-UnnamedText_5d77d: ; 5d77d (17:577d)
- TX_FAR _UnnamedText_5d77d
+UGPathRoute7EntranceUnusedText_5d77d: ; 5d77d (17:577d)
+ TX_FAR _UGPathRoute7EntranceUnusedText_5d77d
db "@"
-UnnamedText_5d782: ; 5d782 (17:5782)
- TX_FAR _UnnamedText_5d782
+UGPathRoute7EntranceUnusedText_5d782: ; 5d782 (17:5782)
+ TX_FAR _UGPathRoute7EntranceUnusedText_5d782
db "@"
diff --git a/scripts/unknowndungeon3.asm b/scripts/unknowndungeon3.asm
index d2078916..055c9d0f 100755
--- a/scripts/unknowndungeon3.asm
+++ b/scripts/unknowndungeon3.asm
@@ -22,22 +22,22 @@ UnknownDungeon3TrainerHeader0: ; 45f0f (11:5f0f)
db $1 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd85f ; flag's byte
- dw UnknownDungeon3MewtwoText ; 0x5f26 TextBeforeBattle
- dw UnknownDungeon3MewtwoText ; 0x5f26 TextAfterBattle
- dw UnknownDungeon3MewtwoText ; 0x5f26 TextEndBattle
- dw UnknownDungeon3MewtwoText ; 0x5f26 TextEndBattle
+ dw UnknownDungeon3MewtwoText ; TextBeforeBattle
+ dw UnknownDungeon3MewtwoText ; TextAfterBattle
+ dw UnknownDungeon3MewtwoText ; TextEndBattle
+ dw UnknownDungeon3MewtwoText ; TextEndBattle
db $ff
UnknownDungeon3Text1: ; 45f1c (11:5f1c)
- db $08 ; asm
+ TX_ASM
ld hl, UnknownDungeon3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
UnknownDungeon3MewtwoText: ; 45f26 (11:5f26)
TX_FAR _UnknownDungeon3MewtwoText
- db $8
+ TX_ASM
ld a, MEWTWO
call PlayCry
call WaitForSoundToFinish
diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm
index 1214b27c..0f71a4d0 100755
--- a/scripts/vermilioncity.asm
+++ b/scripts/vermilioncity.asm
@@ -40,7 +40,7 @@ VermilionCityScriptPointers: ; 197dc (6:57dc)
VermilionCityScript0: ; 197e6 (6:57e6)
ld a, [wSpriteStateData1 + 9]
- and a
+ and a ; cp SPRITE_FACING_DOWN
ret nz
ld hl, CoordsData_19823
call ArePlayerCoordsInArray
@@ -53,8 +53,8 @@ VermilionCityScript0: ; 197e6 (6:57e6)
call DisplayTextID
ld a, [wd803]
bit 2, a
- jr nz, .asm_19810 ; 0x19804 $a
- ld b, $3f
+ jr nz, .asm_19810
+ ld b, S_S__TICKET
predef IsItemInBag_
ld a, b
and a
@@ -109,7 +109,7 @@ VermilionCityScript1: ; 1985f (6:585f)
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
- ld c, $a
+ ld c, 10
call DelayFrames
ld a, $0
ld [W_VERMILIONCITYCURSCRIPT], a
@@ -135,17 +135,17 @@ VermilionCityText1: ; 19889 (6:5889)
db "@"
VermilionCityText2: ; 1988e (6:588e)
- db $08 ; asm
+ TX_ASM
ld a, [wd803]
bit 2, a
- jr nz, .asm_359bd ; 0x19894
+ jr nz, .asm_1989e
ld hl, VermilionCityText_198a7
call PrintText
- jr .asm_735d9 ; 0x1989c
-.asm_359bd ; 0x1989e
+ jr .asm_198a4
+.asm_1989e
ld hl, VermilionCityText_198ac
call PrintText
-.asm_735d9 ; 0x198a4
+.asm_198a4
jp TextScriptEnd
VermilionCityText_198a7: ; 198a7 (6:58a7)
@@ -157,41 +157,41 @@ VermilionCityText_198ac: ; 198ac (6:58ac)
db "@"
VermilionCityText3: ; 198b1 (6:58b1)
- db $08 ; asm
+ TX_ASM
ld a, [wd803]
bit 2, a
- jr nz, .asm_3e0e9 ; 0x198b7
+ jr nz, .asm_198f6
ld a, [wSpriteStateData1 + 9]
- cp $c
- jr z, .asm_07af3 ; 0x198be
+ cp SPRITE_FACING_RIGHT
+ jr z, .asm_198c8
ld hl, VermilionCityCoords1
call ArePlayerCoordsInArray
- jr nc, .asm_57b73 ; 0x198c6
-.asm_07af3 ; 0x198c8
+ jr nc, .asm_198d0
+.asm_198c8
ld hl, SSAnneWelcomeText4
call PrintText
- jr .asm_79bd1 ; 0x198ce
-.asm_57b73 ; 0x198d0
+ jr .asm_198fc
+.asm_198d0
ld hl, SSAnneWelcomeText9
call PrintText
ld b, S_S__TICKET
predef IsItemInBag_
ld a, b
and a
- jr nz, .asm_0419b ; 0x198df
+ jr nz, .asm_198e9
ld hl, SSAnneNoTicketText
call PrintText
- jr .asm_79bd1 ; 0x198e7
-.asm_0419b ; 0x198e9
+ jr .asm_198fc
+.asm_198e9
ld hl, SSAnneFlashedTicketText
call PrintText
ld a, $4
ld [W_VERMILIONCITYCURSCRIPT], a
- jr .asm_79bd1 ; 0x198f4
-.asm_3e0e9 ; 0x198f6
+ jr .asm_198fc
+.asm_198f6
ld hl, SSAnneNotHereText
call PrintText
-.asm_79bd1 ; 0x198fc
+.asm_198fc
jp TextScriptEnd
VermilionCityCoords1: ; 198ff (6:58ff)
@@ -225,11 +225,11 @@ VermilionCityText4: ; 1991d (6:591d)
VermilionCityText5: ; 19922 (6:5922)
TX_FAR _VermilionCityText5
- db $08 ; asm
+ TX_ASM
ld a, MACHOP
call PlayCry
call WaitForSoundToFinish
- ld hl, VermilionCityText14 ; $5933
+ ld hl, VermilionCityText14
ret
VermilionCityText14: ; 19933 (6:5933)
diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm
index 7b23c41e..f070d377 100755
--- a/scripts/vermiliondock.asm
+++ b/scripts/vermiliondock.asm
@@ -2,7 +2,7 @@ VermilionDockScript: ; 1db52 (7:5b52)
call EnableAutoTextBoxDrawing
ld hl, wd803
bit 4, [hl]
- jr nz, .asm_1db8d ; 0x1db5a $31
+ jr nz, .asm_1db8d
bit 0, [hl]
ret z
ld a, [wDestinationWarpID]
@@ -49,7 +49,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)
callba LoadSmokeTileFourTimes
xor a
ld [wSpriteStateData1 + 2], a
- ld c, $78
+ ld c, 120
call DelayFrames
ld b, $9c
call CopyScreenTileBufferToVRAM
@@ -97,13 +97,13 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)
.asm_1dc16
call VermilionDock_1dc7c
dec c
- jr nz, .asm_1dc16 ; 0x1dc1a $fa
+ jr nz, .asm_1dc16
inc d
dec b
- jr nz, .asm_1dc11 ; 0x1dc1e $f1
+ jr nz, .asm_1dc11
pop bc
dec e
- jr nz, .asm_1dbfa ; 0x1dc22 $d6
+ jr nz, .asm_1dbfa
xor a
ld [$ff4a], a
ld [hWY], a
@@ -135,7 +135,7 @@ VermilionDock_1dc42: ; 1dc42 (7:5c42)
inc [hl]
add hl, de
dec c
- jr nz, .asm_1dc50 ; 0x1dc54 $fa
+ jr nz, .asm_1dc50
pop de
pop bc
ret
@@ -169,13 +169,13 @@ VermilionDock_1dc7c: ; 1dc7c (7:5c7c)
.asm_1dc86
ld a, [$ff44]
cp l
- jr nz, .asm_1dc86 ; 0x1dc89 $fb
+ jr nz, .asm_1dc86
ld a, h
ld [$ff43], a
.asm_1dc8e
ld a, [$ff44]
cp h
- jr z, .asm_1dc8e ; 0x1dc91 $fb
+ jr z, .asm_1dc8e
ret
VermilionDock_1dc94: ; 1dc94 (7:5c94)
@@ -195,7 +195,7 @@ VermilionDock_1dc94: ; 1dc94 (7:5c94)
ld [hl], a
ld a, (SFX_02_54 - SFX_Headers_02) / 3
call PlaySound
- ld c, $78
+ ld c, 120
call DelayFrames
ret
diff --git a/scripts/vermiliongym.asm b/scripts/vermiliongym.asm
index 6178dafb..3515c29c 100755
--- a/scripts/vermiliongym.asm
+++ b/scripts/vermiliongym.asm
@@ -17,8 +17,8 @@ VermilionGymScript: ; 5ca26 (17:4a26)
ret
VermilionGymScript_5ca4c: ; 5ca4c (17:4a4c)
- ld hl, Gym3CityName ; $4a55
- ld de, Gym3LeaderName ; $4a64
+ ld hl, Gym3CityName
+ ld de, Gym3LeaderName
jp LoadGymLeaderAndCityName
Gym3CityName: ; 5ca55 (17:4a55)
@@ -56,7 +56,7 @@ VermilionGymScriptPointers: ; 5ca95 (17:4a95)
dw VermilionGymScript3
VermilionGymScript3: ; 5ca9d (17:4a9d)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, VermilionGymScript_5ca8a
ld a, $f0
@@ -64,7 +64,7 @@ VermilionGymScript3: ; 5ca9d (17:4a9d)
VermilionGymScript_5caaa: ; 5caaa (17:4aaa)
ld a, $6
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd773
set 7, [hl]
@@ -72,14 +72,14 @@ VermilionGymScript_5caaa: ; 5caaa (17:4aaa)
call GiveItem
jr nc, .BagFull
ld a, $7
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd773
set 6, [hl]
jr .asm_5cad3
.BagFull
ld a, $8
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
.asm_5cad3
ld hl, W_OBTAINEDBADGES
@@ -109,46 +109,46 @@ VermilionGymTrainerHeader0: ; 5caf8 (17:4af8)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd773 ; flag's byte
- dw VermilionGymBattleText1 ; 0x4b9a TextBeforeBattle
- dw VermilionGymAfterBattleText1 ; 0x4ba4 TextAfterBattle
- dw VermilionGymEndBattleText1 ; 0x4b9f TextEndBattle
- dw VermilionGymEndBattleText1 ; 0x4b9f TextEndBattle
+ dw VermilionGymBattleText1 ; TextBeforeBattle
+ dw VermilionGymAfterBattleText1 ; TextAfterBattle
+ dw VermilionGymEndBattleText1 ; TextEndBattle
+ dw VermilionGymEndBattleText1 ; TextEndBattle
VermilionGymTrainerHeader1: ; 5cb04 (17:4b04)
db $3 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd773 ; flag's byte
- dw VermilionGymBattleText2 ; 0x4bb3 TextBeforeBattle
- dw VermilionGymAfterBattleText2 ; 0x4bbd TextAfterBattle
- dw VermilionGymEndBattleText2 ; 0x4bb8 TextEndBattle
- dw VermilionGymEndBattleText2 ; 0x4bb8 TextEndBattle
+ dw VermilionGymBattleText2 ; TextBeforeBattle
+ dw VermilionGymAfterBattleText2 ; TextAfterBattle
+ dw VermilionGymEndBattleText2 ; TextEndBattle
+ dw VermilionGymEndBattleText2 ; TextEndBattle
VermilionGymTrainerHeader2: ; 5cb10 (17:4b10)
db $4 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd773 ; flag's byte
- dw VermilionGymBattleText3 ; 0x4bcc TextBeforeBattle
- dw VermilionGymAfterBattleText3 ; 0x4bd6 TextAfterBattle
- dw VermilionGymEndBattleText3 ; 0x4bd1 TextEndBattle
- dw VermilionGymEndBattleText3 ; 0x4bd1 TextEndBattle
+ dw VermilionGymBattleText3 ; TextBeforeBattle
+ dw VermilionGymAfterBattleText3 ; TextAfterBattle
+ dw VermilionGymEndBattleText3 ; TextEndBattle
+ dw VermilionGymEndBattleText3 ; TextEndBattle
db $ff
VermilionGymText1: ; 5cb1d (17:4b1d)
- db $08 ; asm
+ TX_ASM
ld a, [wd773]
bit 7, a
- jr z, .asm_7cc29 ; 0x5cb23
+ jr z, .asm_5cb39
bit 6, a
- jr nz, .asm_41203 ; 0x5cb27
+ jr nz, .asm_5cb31
call z, VermilionGymScript_5caaa
call DisableWaitingAfterTextDisplay
- jr .asm_23621 ; 0x5cb2f
-.asm_41203 ; 0x5cb31
+ jr .asm_5cb6a
+.asm_5cb31
ld hl, VermilionGymText_5cb72
call PrintText
- jr .asm_23621 ; 0x5cb37
-.asm_7cc29 ; 0x5cb39
+ jr .asm_5cb6a
+.asm_5cb39
ld hl, VermilionGymText_5cb6d
call PrintText
ld hl, wd72d
@@ -157,18 +157,18 @@ VermilionGymText1: ; 5cb1d (17:4b1d)
ld hl, ReceivedThunderbadgeText
ld de, ReceivedThunderbadgeText
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $3
ld [W_GYMLEADERNO], a
xor a
- ldh [$b4], a
+ ld [hJoyHeld], a
ld a, $3
ld [W_VERMILIONGYMCURSCRIPT], a
ld [W_CURMAPSCRIPT], a
-.asm_23621 ; 0x5cb6a
+.asm_5cb6a
jp TextScriptEnd
VermilionGymText_5cb6d: ; 5cb6d (17:4b6d)
@@ -198,7 +198,7 @@ ReceivedThunderbadgeText: ; 5cb8b (17:4b8b)
db "@"
VermilionGymText2: ; 5cb90 (17:4b90)
- db $08 ; asm
+ TX_ASM
ld hl, VermilionGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -216,7 +216,7 @@ VermilionGymAfterBattleText1: ; 5cba4 (17:4ba4)
db "@"
VermilionGymText3: ; 5cba9 (17:4ba9)
- db $08 ; asm
+ TX_ASM
ld hl, VermilionGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -234,7 +234,7 @@ VermilionGymAfterBattleText2: ; 5cbbd (17:4bbd)
db "@"
VermilionGymText4: ; 5cbc2 (17:4bc2)
- db $08 ; asm
+ TX_ASM
ld hl, VermilionGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -252,17 +252,17 @@ VermilionGymAfterBattleText3: ; 5cbd6 (17:4bd6)
db "@"
VermilionGymText5: ; 5cbdb (17:4bdb)
- db $08 ; asm
+ TX_ASM
ld a, [wd72a]
bit 2, a
- jr nz, .asm_13b67 ; 0x5cbe1
+ jr nz, .asm_5cbeb
ld hl, VermilionGymText_5cbf4
call PrintText
- jr .asm_c2b38 ; 0x5cbe9
-.asm_13b67 ; 0x5cbeb
+ jr .asm_5cbf1
+.asm_5cbeb
ld hl, VermilionGymText_5cbf9
call PrintText
-.asm_c2b38 ; 0x5cbf1
+.asm_5cbf1
jp TextScriptEnd
VermilionGymText_5cbf4: ; 5cbf4 (17:4bf4)
diff --git a/scripts/vermilionhouse1.asm b/scripts/vermilionhouse1.asm
index 4ead1af7..bfb3da5f 100755
--- a/scripts/vermilionhouse1.asm
+++ b/scripts/vermilionhouse1.asm
@@ -13,7 +13,7 @@ VermilionHouse1Text1: ; 1db06 (7:5b06)
VermilionHouse1Text2: ; 1db0b (7:5b0b)
TX_FAR _VermilionHouse1Text2
- db $08 ; asm
+ TX_ASM
ld a, PIDGEY
call PlayCry
call WaitForSoundToFinish
diff --git a/scripts/vermilionhouse2.asm b/scripts/vermilionhouse2.asm
index 7c06c6e9..775c32bb 100755
--- a/scripts/vermilionhouse2.asm
+++ b/scripts/vermilionhouse2.asm
@@ -5,7 +5,7 @@ VermilionHouse2TextPointers: ; 56073 (15:6073)
dw VermilionHouse2Text1
VermilionHouse2Text1: ; 56075 (15:6075)
- db $08 ; asm
+ TX_ASM
ld a, [wd728]
bit 3, a
jr nz, .asm_03ef5
@@ -39,9 +39,9 @@ VermilionHouse2Text_560b1: ; 560b1 (15:60b1)
db "@"
VermilionHouse2Text_560b6: ; 560b6 (15:60b6)
- TX_FAR _VermilionHouse2Text_560b6 ; 0x9c554
+ TX_FAR _VermilionHouse2Text_560b6
db $0B
- TX_FAR _VermilionHouse2Text_560bb ; 0x9c5a4
+ TX_FAR _VermilionHouse2Text_560bb
db "@"
VermilionHouse2Text_560c0: ; 560c0 (15:60c0)
diff --git a/scripts/vermilionhouse3.asm b/scripts/vermilionhouse3.asm
index 08e2e395..478979da 100755
--- a/scripts/vermilionhouse3.asm
+++ b/scripts/vermilionhouse3.asm
@@ -5,7 +5,7 @@ VermilionHouse3TextPointers: ; 19c15 (6:5c15)
dw VermilionHouse3Text1
VermilionHouse3Text1: ; 19c17 (6:5c17)
- db $08 ; asm
+ TX_ASM
ld a, $4
ld [wWhichTrade], a
predef DoInGameTradeDialogue
diff --git a/scripts/victoryroad1.asm b/scripts/victoryroad1.asm
index b6d2bf3e..68a3502f 100755
--- a/scripts/victoryroad1.asm
+++ b/scripts/victoryroad1.asm
@@ -28,7 +28,7 @@ VictoryRoad1Script0: ; 5da40 (17:5a40)
ld a, [wd869]
bit 7, a
jp nz, CheckFightingMapTrainers
- ld hl, CoordsData_5da5c ; $5a5c
+ ld hl, CoordsData_5da5c
call CheckBoulderCoords
jp nc, CheckFightingMapTrainers
ld hl, wd126
@@ -54,30 +54,30 @@ VictoryRoad1TrainerHeader0: ; 5da6d (17:5a6d)
db $1 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd869 ; flag's byte
- dw VictoryRoad1BattleText1 ; 0x5a9a TextBeforeBattle
- dw VictoryRoad1AfterBattleText1 ; 0x5aa4 TextAfterBattle
- dw VictoryRoad1EndBattleText1 ; 0x5a9f TextEndBattle
- dw VictoryRoad1EndBattleText1 ; 0x5a9f TextEndBattle
+ dw VictoryRoad1BattleText1 ; TextBeforeBattle
+ dw VictoryRoad1AfterBattleText1 ; TextAfterBattle
+ dw VictoryRoad1EndBattleText1 ; TextEndBattle
+ dw VictoryRoad1EndBattleText1 ; TextEndBattle
VictoryRoad1TrainerHeader1: ; 5da79 (17:5a79)
db $2 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd869 ; flag's byte
- dw VictoryRoad1BattleText2 ; 0x5aa9 TextBeforeBattle
- dw VictoryRoad1AfterBattleText2 ; 0x5ab3 TextAfterBattle
- dw VictoryRoad1EndBattleText2 ; 0x5aae TextEndBattle
- dw VictoryRoad1EndBattleText2 ; 0x5aae TextEndBattle
+ dw VictoryRoad1BattleText2 ; TextBeforeBattle
+ dw VictoryRoad1AfterBattleText2 ; TextAfterBattle
+ dw VictoryRoad1EndBattleText2 ; TextEndBattle
+ dw VictoryRoad1EndBattleText2 ; TextEndBattle
db $ff
VictoryRoad1Text1: ; 5da86 (17:5a86)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VictoryRoad1Text2: ; 5da90 (17:5a90)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad1TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/victoryroad2.asm b/scripts/victoryroad2.asm
index 4aab61ca..1fc2af7e 100755
--- a/scripts/victoryroad2.asm
+++ b/scripts/victoryroad2.asm
@@ -45,11 +45,11 @@ VictoryRoad2ScriptPointers: ; 517eb (14:57eb)
dw EndTrainerBattle
VictoryRoad2Script0: ; 517f1 (14:57f1)
- ld hl, CoordsData_51816 ; $5816
+ ld hl, CoordsData_51816
call CheckBoulderCoords
jp nc, CheckFightingMapTrainers
ld hl, wd7ee
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
cp $2
jr z, .asm_5180b
bit 0, [hl]
@@ -90,97 +90,97 @@ VictoryRoad2TrainerHeader0: ; 51835 (14:5835)
db $1 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7ee ; flag's byte
- dw VictoryRoad2BattleText1 ; 0x58ca TextBeforeBattle
- dw VictoryRoad2AfterBattleText1 ; 0x58d4 TextAfterBattle
- dw VictoryRoad2EndBattleText1 ; 0x58cf TextEndBattle
- dw VictoryRoad2EndBattleText1 ; 0x58cf TextEndBattle
+ dw VictoryRoad2BattleText1 ; TextBeforeBattle
+ dw VictoryRoad2AfterBattleText1 ; TextAfterBattle
+ dw VictoryRoad2EndBattleText1 ; TextEndBattle
+ dw VictoryRoad2EndBattleText1 ; TextEndBattle
VictoryRoad2TrainerHeader2: ; 51841 (14:5841)
db $2 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7ee ; flag's byte
- dw VictoryRoad2BattleText2 ; 0x58d9 TextBeforeBattle
- dw VictoryRoad2AfterBattleText2 ; 0x58e3 TextAfterBattle
- dw VictoryRoad2EndBattleText2 ; 0x58de TextEndBattle
- dw VictoryRoad2EndBattleText2 ; 0x58de TextEndBattle
+ dw VictoryRoad2BattleText2 ; TextBeforeBattle
+ dw VictoryRoad2AfterBattleText2 ; TextAfterBattle
+ dw VictoryRoad2EndBattleText2 ; TextEndBattle
+ dw VictoryRoad2EndBattleText2 ; TextEndBattle
VictoryRoad2TrainerHeader3: ; 5184d (14:584d)
db $3 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7ee ; flag's byte
- dw VictoryRoad2BattleText3 ; 0x58e8 TextBeforeBattle
- dw VictoryRoad2AfterBattleText3 ; 0x58f2 TextAfterBattle
- dw VictoryRoad2EndBattleText3 ; 0x58ed TextEndBattle
- dw VictoryRoad2EndBattleText3 ; 0x58ed TextEndBattle
+ dw VictoryRoad2BattleText3 ; TextBeforeBattle
+ dw VictoryRoad2AfterBattleText3 ; TextAfterBattle
+ dw VictoryRoad2EndBattleText3 ; TextEndBattle
+ dw VictoryRoad2EndBattleText3 ; TextEndBattle
VictoryRoad2TrainerHeader4: ; 51859 (14:5859)
db $4 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd7ee ; flag's byte
- dw VictoryRoad2BattleText4 ; 0x58f7 TextBeforeBattle
- dw VictoryRoad2AfterBattleText4 ; 0x5901 TextAfterBattle
- dw VictoryRoad2EndBattleText4 ; 0x58fc TextEndBattle
- dw VictoryRoad2EndBattleText4 ; 0x58fc TextEndBattle
+ dw VictoryRoad2BattleText4 ; TextBeforeBattle
+ dw VictoryRoad2AfterBattleText4 ; TextAfterBattle
+ dw VictoryRoad2EndBattleText4 ; TextEndBattle
+ dw VictoryRoad2EndBattleText4 ; TextEndBattle
VictoryRoad2TrainerHeader5: ; 51865 (14:5865)
db $5 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd7ee ; flag's byte
- dw VictoryRoad2BattleText5 ; 0x5906 TextBeforeBattle
- dw VictoryRoad2AfterBattleText5 ; 0x5910 TextAfterBattle
- dw VictoryRoad2EndBattleText5 ; 0x590b TextEndBattle
- dw VictoryRoad2EndBattleText5 ; 0x590b TextEndBattle
+ dw VictoryRoad2BattleText5 ; TextBeforeBattle
+ dw VictoryRoad2AfterBattleText5 ; TextAfterBattle
+ dw VictoryRoad2EndBattleText5 ; TextEndBattle
+ dw VictoryRoad2EndBattleText5 ; TextEndBattle
VictoryRoad2TrainerHeader6: ; 51871 (14:5871)
db $6 ; flag's bit
db ($0 << 4) ; trainer's view range
dw wd7ee ; flag's byte
- dw VictoryRoad2BattleText6 ; 0x58ba TextBeforeBattle
- dw VictoryRoad2BattleText6 ; 0x58ba TextAfterBattle
- dw VictoryRoad2BattleText6 ; 0x58ba TextEndBattle
- dw VictoryRoad2BattleText6 ; 0x58ba TextEndBattle
+ dw VictoryRoad2BattleText6 ; TextBeforeBattle
+ dw VictoryRoad2BattleText6 ; TextAfterBattle
+ dw VictoryRoad2BattleText6 ; TextEndBattle
+ dw VictoryRoad2BattleText6 ; TextEndBattle
db $ff
VictoryRoad2Text1: ; 5187e (14:587e)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2Text2: ; 51888 (14:5888)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad2TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2Text3: ; 51892 (14:5892)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad2TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2Text4: ; 5189c (14:589c)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad2TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2Text5: ; 518a6 (14:58a6)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad2TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2Text6: ; 518b0 (14:58b0)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad2TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
VictoryRoad2BattleText6: ; 518ba (14:58ba)
TX_FAR _VictoryRoad2BattleText6
- db $8
+ TX_ASM
ld a, MOLTRES
call PlayCry
call WaitForSoundToFinish
diff --git a/scripts/victoryroad3.asm b/scripts/victoryroad3.asm
index 01269a3f..20b3df85 100755
--- a/scripts/victoryroad3.asm
+++ b/scripts/victoryroad3.asm
@@ -31,10 +31,10 @@ VictoryRoad3Script0: ; 449b7 (11:49b7)
bit 7, [hl]
res 7, [hl]
jp z, .asm_449fe
- ld hl, .coordsData_449f9 ; $49f9
+ ld hl, .coordsData_449f9
call CheckBoulderCoords
jp nc, .asm_449fe
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
cp $1
jr nz, .asm_449dc
ld hl, wd126
@@ -62,9 +62,9 @@ VictoryRoad3Script0: ; 449b7 (11:49b7)
.asm_449fe
ld a, $c2
ld [wDungeonWarpDestinationMap], a
- ld hl, .coordsData_449f9 ; $49f9
+ ld hl, .coordsData_449f9
call Func_46981
- ld a, [wWhichTrade] ; wWhichTrade
+ ld a, [wWhichTrade]
cp $1
jr nz, .asm_44a1b
ld hl, wd72d
@@ -95,60 +95,60 @@ VictoryRoad3TrainerHeader0: ; 44a38 (11:4a38)
db $1 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd813 ; flag's byte
- dw VictoryRoad3BattleText2 ; 0x4a91 TextBeforeBattle
- dw VictoryRoad3AfterBattleText2 ; 0x4a9b TextAfterBattle
- dw VictoryRoad3EndBattleText2 ; 0x4a96 TextEndBattle
- dw VictoryRoad3EndBattleText2 ; 0x4a96 TextEndBattle
+ dw VictoryRoad3BattleText2 ; TextBeforeBattle
+ dw VictoryRoad3AfterBattleText2 ; TextAfterBattle
+ dw VictoryRoad3EndBattleText2 ; TextEndBattle
+ dw VictoryRoad3EndBattleText2 ; TextEndBattle
VictoryRoad3TrainerHeader2: ; 44a44 (11:4a44)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd813 ; flag's byte
- dw VictoryRoad3BattleText3 ; 0x4aa0 TextBeforeBattle
- dw VictoryRoad3AfterBattleText3 ; 0x4aaa TextAfterBattle
- dw VictoryRoad3EndBattleText3 ; 0x4aa5 TextEndBattle
- dw VictoryRoad3EndBattleText3 ; 0x4aa5 TextEndBattle
+ dw VictoryRoad3BattleText3 ; TextBeforeBattle
+ dw VictoryRoad3AfterBattleText3 ; TextAfterBattle
+ dw VictoryRoad3EndBattleText3 ; TextEndBattle
+ dw VictoryRoad3EndBattleText3 ; TextEndBattle
VictoryRoad3TrainerHeader3: ; 44a50 (11:4a50)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd813 ; flag's byte
- dw VictoryRoad3BattleText4 ; 0x4aaf TextBeforeBattle
- dw VictoryRoad3AfterBattleText4 ; 0x4ab9 TextAfterBattle
- dw VictoryRoad3EndBattleText4 ; 0x4ab4 TextEndBattle
- dw VictoryRoad3EndBattleText4 ; 0x4ab4 TextEndBattle
+ dw VictoryRoad3BattleText4 ; TextBeforeBattle
+ dw VictoryRoad3AfterBattleText4 ; TextAfterBattle
+ dw VictoryRoad3EndBattleText4 ; TextEndBattle
+ dw VictoryRoad3EndBattleText4 ; TextEndBattle
VictoryRoad3TrainerHeader4: ; 44a5c (11:4a5c)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd813 ; flag's byte
- dw VictoryRoad3BattleText5 ; 0x4abe TextBeforeBattle
- dw VictoryRoad3AfterBattleText5 ; 0x4ac8 TextAfterBattle
- dw VictoryRoad3EndBattleText5 ; 0x4ac3 TextEndBattle
- dw VictoryRoad3EndBattleText5 ; 0x4ac3 TextEndBattle
+ dw VictoryRoad3BattleText5 ; TextBeforeBattle
+ dw VictoryRoad3AfterBattleText5 ; TextAfterBattle
+ dw VictoryRoad3EndBattleText5 ; TextEndBattle
+ dw VictoryRoad3EndBattleText5 ; TextEndBattle
db $ff
VictoryRoad3Text1: ; 44a69 (11:4a69)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text2: ; 44a73 (11:4a73)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text3: ; 44a7d (11:4a7d)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad3TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text4: ; 44a87 (11:4a87)
- db $08 ; asm
+ TX_ASM
ld hl, VictoryRoad3TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/viridiancity.asm b/scripts/viridiancity.asm
index d0b2b4ae..ac7afb7c 100755
--- a/scripts/viridiancity.asm
+++ b/scripts/viridiancity.asm
@@ -20,7 +20,7 @@ ViridianCityScript_1900b: ; 1900b (6:500b)
ret nz
ld a, [W_OBTAINEDBADGES]
cp %01111111
- jr nz, .asm_1901e ; 0x19016 $6
+ jr nz, .asm_1901e
ld hl, wd74c
set 0, [hl]
ret
@@ -149,16 +149,16 @@ ViridianCityText1: ; 19102 (6:5102)
db "@"
ViridianCityText2: ; 19107 (6:5107)
- db $08 ; asm
+ TX_ASM
ld a, [W_OBTAINEDBADGES]
cp %01111111
ld hl, ViridianCityText_19127
- jr z, .asm_ae9fe ; 0x19110
+ jr z, .asm_ae9fe
ld a, [wd751]
bit 1, a
- jr nz, .asm_ae9fe ; 0x19117
+ jr nz, .asm_ae9fe
ld hl, ViridianCityText_19122
-.asm_ae9fe ; 0x1911c
+.asm_ae9fe
call PrintText
jp TextScriptEnd
@@ -171,20 +171,20 @@ ViridianCityText_19127: ; 19127 (6:5127)
db "@"
ViridianCityText3: ; 1912c (6:512c)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianCityText_1914d
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_6dfea ; 0x1913a
+ jr nz, .asm_6dfea
ld hl, ViridianCityText_19157
call PrintText
- jr .asm_d611f ; 0x19142
-.asm_6dfea ; 0x19144
+ jr .asm_d611f
+.asm_6dfea
ld hl, ViridianCityText_19152
call PrintText
-.asm_d611f ; 0x1914a
+.asm_d611f
jp TextScriptEnd
ViridianCityText_1914d: ; 1914d (6:514d)
@@ -200,17 +200,17 @@ ViridianCityText_19157: ; 19157 (6:5157)
db "@"
ViridianCityText4: ; 1915c (6:515c)
- db $08 ; asm
+ TX_ASM
ld a, [wd74b]
bit 5, a
- jr nz, .asm_83894 ; 0x19162
+ jr nz, .asm_83894
ld hl, ViridianCityText_19175
call PrintText
- jr .asm_700a6 ; 0x1916a
-.asm_83894 ; 0x1916c
+ jr .asm_700a6
+.asm_83894
ld hl, ViridianCityText_1917a
call PrintText
-.asm_700a6 ; 0x19172
+.asm_700a6
jp TextScriptEnd
ViridianCityText_19175: ; 19175 (6:5175)
@@ -222,7 +222,7 @@ ViridianCityText_1917a: ; 1917a (6:517a)
db "@"
ViridianCityText5: ; 1917f (6:517f)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianCityText_19191
call PrintText
call ViridianCityScript_190cf
@@ -235,10 +235,10 @@ ViridianCityText_19191: ; 19191 (6:5191)
db "@"
ViridianCityText6: ; 19196 (6:5196)
- db $08 ; asm
+ TX_ASM
ld a, [wd74c]
bit 1, a
- jr nz, .asm_4e5a0 ; 0x1919c
+ jr nz, .asm_4e5a0
ld hl, ViridianCityText_191ca
call PrintText
ld bc, (TM_42 << 8) | 1
@@ -248,15 +248,15 @@ ViridianCityText6: ; 19196 (6:5196)
call PrintText
ld hl, wd74c
set 1, [hl]
- jr .asm_3c73c ; 0x191b7
+ jr .asm_3c73c
.BagFull
ld hl, TM42NoRoomText
call PrintText
- jr .asm_3c73c ; 0x191bf
-.asm_4e5a0 ; 0x191c1
+ jr .asm_3c73c
+.asm_4e5a0
ld hl, TM42Explanation
call PrintText
-.asm_3c73c ; 0x191c7
+.asm_3c73c
jp TextScriptEnd
ViridianCityText_191ca: ; 191ca (6:51ca)
@@ -276,24 +276,24 @@ TM42NoRoomText: ; 191da (6:51da)
db "@"
ViridianCityText7: ; 191df (6:51df)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianCityText_1920a
call PrintText
- ld c, $2
+ ld c, 2
call DelayFrames
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr z, .asm_42f68 ; 0x191f2
+ jr z, .asm_42f68
ld hl, ViridianCityText_1920f
call PrintText
ld a, $1
ld [W_VIRIDIANCITYCURSCRIPT], a
- jr .asm_2413a ; 0x191ff
-.asm_42f68 ; 0x19201
+ jr .asm_2413a
+.asm_42f68
ld hl, ViridianCityText_19214
call PrintText
-.asm_2413a ; 0x19207
+.asm_2413a
jp TextScriptEnd
ViridianCityText_1920a: ; 1920a (6:520a)
diff --git a/scripts/viridianforest.asm b/scripts/viridianforest.asm
index 4ec1c0aa..124d3184 100755
--- a/scripts/viridianforest.asm
+++ b/scripts/viridianforest.asm
@@ -33,28 +33,28 @@ ViridianForestTrainerHeader0: ; 61142 (18:5142)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7f3 ; flag's byte
- dw ViridianForestBattleText1 ; 0x518a TextBeforeBattle
- dw ViridianForestAfterBattleText1 ; 0x5194 TextAfterBattle
- dw ViridianForestEndBattleText1 ; 0x518f TextEndBattle
- dw ViridianForestEndBattleText1 ; 0x518f TextEndBattle
+ dw ViridianForestBattleText1 ; TextBeforeBattle
+ dw ViridianForestAfterBattleText1 ; TextAfterBattle
+ dw ViridianForestEndBattleText1 ; TextEndBattle
+ dw ViridianForestEndBattleText1 ; TextEndBattle
ViridianForestTrainerHeader1: ; 6114e (18:514e)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd7f3 ; flag's byte
- dw ViridianForestBattleText2 ; 0x5199 TextBeforeBattle
- dw ViridianForestAfterBattleText2 ; 0x51a3 TextAfterBattle
- dw ViridianForestEndBattleText2 ; 0x519e TextEndBattle
- dw ViridianForestEndBattleText2 ; 0x519e TextEndBattle
+ dw ViridianForestBattleText2 ; TextBeforeBattle
+ dw ViridianForestAfterBattleText2 ; TextAfterBattle
+ dw ViridianForestEndBattleText2 ; TextEndBattle
+ dw ViridianForestEndBattleText2 ; TextEndBattle
ViridianForestTrainerHeader2: ; 6115a (18:515a)
db $4 ; flag's bit
db ($1 << 4) ; trainer's view range
dw wd7f3 ; flag's byte
- dw ViridianForestBattleText3 ; 0x51a8 TextBeforeBattle
- dw ViridianForestAfterBattleText3 ; 0x51b2 TextAfterBattle
- dw ViridianForestEndBattleText3 ; 0x51ad TextEndBattle
- dw ViridianForestEndBattleText3 ; 0x51ad TextEndBattle
+ dw ViridianForestBattleText3 ; TextBeforeBattle
+ dw ViridianForestAfterBattleText3 ; TextAfterBattle
+ dw ViridianForestEndBattleText3 ; TextEndBattle
+ dw ViridianForestEndBattleText3 ; TextEndBattle
db $ff
@@ -63,19 +63,19 @@ ViridianForestText1: ; 61167 (18:5167)
db "@"
ViridianForestText2: ; 6116c (18:516c)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianForestTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
ViridianForestText3: ; 61176 (18:5176)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianForestTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
ViridianForestText4: ; 61180 (18:5180)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianForestTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
diff --git a/scripts/viridiangym.asm b/scripts/viridiangym.asm
index 6ced7d82..eb2ab7f5 100755
--- a/scripts/viridiangym.asm
+++ b/scripts/viridiangym.asm
@@ -30,9 +30,9 @@ ViridianGymScriptPointers: ; 748e1 (1d:48e1)
dw ViridianGymScript4
ViridianGymScript0: ; 748eb (1d:48eb)
- ld a, [W_YCOORD] ; wd361
+ ld a, [W_YCOORD]
ld b, a
- ld a, [W_XCOORD] ; wd362
+ ld a, [W_XCOORD]
ld c, a
ld hl, ViridianGymArrowTilePlayerMovement
call DecodeArrowMovementRLE
@@ -137,14 +137,14 @@ ViridianGymScript4: ; 7496b (1d:496b)
jp Bankswitch
ViridianGymScript3: ; 74988 (1d:4988)
- ld a, [W_ISINBATTLE] ; W_ISINBATTLE
+ ld a, [W_ISINBATTLE]
cp $ff
jp z, ViridianGymScript_748d6
ld a, $f0
ld [wJoyIgnore], a
ViridianGymScript3_74995: ; 74995 (1d:4995)
ld a, $c
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd751
set 1, [hl]
@@ -152,14 +152,14 @@ ViridianGymScript3_74995: ; 74995 (1d:4995)
call GiveItem
jr nc, .BagFull
ld a, $d
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
ld hl, wd751
set 0, [hl]
jr .asm_749be
.BagFull
ld a, $e
- ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
+ ld [H_DOWNARROWBLINKCNT2], a
call DisplayTextID
.asm_749be
ld hl, W_OBTAINEDBADGES
@@ -204,87 +204,87 @@ ViridianGymTrainerHeader0: ; 74a08 (1d:4a08)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd751 ; flag's byte
- dw ViridianGymBattleText1 ; 0x4afd TextBeforeBattle
- dw ViridianGymAfterBattleText1 ; 0x4b07 TextAfterBattle
- dw ViridianGymEndBattleText1 ; 0x4b02 TextEndBattle
- dw ViridianGymEndBattleText1 ; 0x4b02 TextEndBattle
+ dw ViridianGymBattleText1 ; TextBeforeBattle
+ dw ViridianGymAfterBattleText1 ; TextAfterBattle
+ dw ViridianGymEndBattleText1 ; TextEndBattle
+ dw ViridianGymEndBattleText1 ; TextEndBattle
ViridianGymTrainerHeader1: ; 74a14 (1d:4a14)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd751 ; flag's byte
- dw ViridianGymBattleText2 ; 0x4b16 TextBeforeBattle
- dw ViridianGymAfterBattleText2 ; 0x4b20 TextAfterBattle
- dw ViridianGymEndBattleText2 ; 0x4b1b TextEndBattle
- dw ViridianGymEndBattleText2 ; 0x4b1b TextEndBattle
+ dw ViridianGymBattleText2 ; TextBeforeBattle
+ dw ViridianGymAfterBattleText2 ; TextAfterBattle
+ dw ViridianGymEndBattleText2 ; TextEndBattle
+ dw ViridianGymEndBattleText2 ; TextEndBattle
ViridianGymTrainerHeader2: ; 74a20 (1d:4a20)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd751 ; flag's byte
- dw ViridianGymBattleText3 ; 0x4b2f TextBeforeBattle
- dw ViridianGymAfterBattleText3 ; 0x4b39 TextAfterBattle
- dw ViridianGymEndBattleText3 ; 0x4b34 TextEndBattle
- dw ViridianGymEndBattleText3 ; 0x4b34 TextEndBattle
+ dw ViridianGymBattleText3 ; TextBeforeBattle
+ dw ViridianGymAfterBattleText3 ; TextAfterBattle
+ dw ViridianGymEndBattleText3 ; TextEndBattle
+ dw ViridianGymEndBattleText3 ; TextEndBattle
ViridianGymTrainerHeader3: ; 74a2c (1d:4a2c)
db $5 ; flag's bit
db ($2 << 4) ; trainer's view range
dw wd751 ; flag's byte
- dw ViridianGymBattleText4 ; 0x4b48 TextBeforeBattle
- dw ViridianGymAfterBattleText4 ; 0x4b52 TextAfterBattle
- dw ViridianGymEndBattleText4 ; 0x4b4d TextEndBattle
- dw ViridianGymEndBattleText4 ; 0x4b4d TextEndBattle
+ dw ViridianGymBattleText4 ; TextBeforeBattle
+ dw ViridianGymAfterBattleText4 ; TextAfterBattle
+ dw ViridianGymEndBattleText4 ; TextEndBattle
+ dw ViridianGymEndBattleText4 ; TextEndBattle
ViridianGymTrainerHeader4: ; 74a38 (1d:4a38)
db $6 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd751 ; flag's byte
- dw ViridianGymBattleText5 ; 0x4b61 TextBeforeBattle
- dw ViridianGymAfterBattleText5 ; 0x4b6b TextAfterBattle
- dw ViridianGymEndBattleText5 ; 0x4b66 TextEndBattle
- dw ViridianGymEndBattleText5 ; 0x4b66 TextEndBattle
+ dw ViridianGymBattleText5 ; TextBeforeBattle
+ dw ViridianGymAfterBattleText5 ; TextAfterBattle
+ dw ViridianGymEndBattleText5 ; TextEndBattle
+ dw ViridianGymEndBattleText5 ; TextEndBattle
ViridianGymTrainerHeader5: ; 74a44 (1d:4a44)
db $7 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd751 ; flag's byte
- dw ViridianGymBattleText6 ; 0x4b7a TextBeforeBattle
- dw ViridianGymAfterBattleText6 ; 0x4b84 TextAfterBattle
- dw ViridianGymEndBattleText6 ; 0x4b7f TextEndBattle
- dw ViridianGymEndBattleText6 ; 0x4b7f TextEndBattle
+ dw ViridianGymBattleText6 ; TextBeforeBattle
+ dw ViridianGymAfterBattleText6 ; TextAfterBattle
+ dw ViridianGymEndBattleText6 ; TextEndBattle
+ dw ViridianGymEndBattleText6 ; TextEndBattle
ViridianGymTrainerHeader6: ; 74a50 (1d:4a50)
db $8 ; flag's bit
db ($3 << 4) ; trainer's view range
dw wd751 ; flag's byte
- dw ViridianGymBattleText7 ; 0x4b93 TextBeforeBattle
- dw ViridianGymAfterBattleText7 ; 0x4b9d TextAfterBattle
- dw ViridianGymEndBattleText7 ; 0x4b98 TextEndBattle
- dw ViridianGymEndBattleText7 ; 0x4b98 TextEndBattle
+ dw ViridianGymBattleText7 ; TextBeforeBattle
+ dw ViridianGymAfterBattleText7 ; TextAfterBattle
+ dw ViridianGymEndBattleText7 ; TextEndBattle
+ dw ViridianGymEndBattleText7 ; TextEndBattle
ViridianGymTrainerHeader7: ; 74a5c (1d:4a5c)
db $9 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd751 ; flag's byte
- dw ViridianGymBattleText8 ; 0x4bac TextBeforeBattle
- dw ViridianGymAfterBattleText8 ; 0x4bb6 TextAfterBattle
- dw ViridianGymEndBattleText8 ; 0x4bb1 TextEndBattle
- dw ViridianGymEndBattleText8 ; 0x4bb1 TextEndBattle
+ dw ViridianGymBattleText8 ; TextBeforeBattle
+ dw ViridianGymAfterBattleText8 ; TextAfterBattle
+ dw ViridianGymEndBattleText8 ; TextEndBattle
+ dw ViridianGymEndBattleText8 ; TextEndBattle
db $ff
ViridianGymText1: ; 74a69 (1d:4a69)
- db $08 ; asm
+ TX_ASM
ld a, [wd751]
bit 1, a
- jr z, .asm_6de66 ; 0x74a6f
+ jr z, .asm_6de66
bit 0, a
- jr nz, .asm_9fc95 ; 0x74a73
+ jr nz, .asm_9fc95
call z, ViridianGymScript3_74995
call DisableWaitingAfterTextDisplay
- jr .asm_6dff7 ; 0x74a7b
-.asm_9fc95 ; 0x74a7d
+ jr .asm_6dff7
+.asm_9fc95
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, ViridianGymText_74ad9
@@ -296,8 +296,8 @@ ViridianGymText1: ; 74a69 (1d:4a69)
call UpdateSprites
call Delay3
call GBFadeInFromBlack
- jr .asm_6dff7 ; 0x74a9e
-.asm_6de66 ; 0x74aa0
+ jr .asm_6dff7
+.asm_6de66
ld hl, ViridianGymText_74ace
call PrintText
ld hl, wd72d
@@ -306,7 +306,7 @@ ViridianGymText1: ; 74a69 (1d:4a69)
ld hl, ViridianGymText_74ad3
ld de, ViridianGymText_74ad3
call SaveEndBattleTextPointers
- ldh a, [$8c]
+ ld a, [H_SPRITEINDEX]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
@@ -314,7 +314,7 @@ ViridianGymText1: ; 74a69 (1d:4a69)
ld [W_GYMLEADERNO], a
ld a, $3
ld [W_VIRIDIANGYMCURSCRIPT], a
-.asm_6dff7 ; 0x74acb
+.asm_6dff7
jp TextScriptEnd
ViridianGymText_74ace: ; 74ace (1d:4ace)
@@ -346,7 +346,7 @@ ViridianGymText14: ; 74aee (1d:4aee)
db "@"
ViridianGymText2: ; 74af3 (1d:4af3)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
@@ -364,7 +364,7 @@ ViridianGymAfterBattleText1: ; 74b07 (1d:4b07)
db "@"
ViridianGymText3: ; 74b0c (1d:4b0c)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
@@ -382,7 +382,7 @@ ViridianGymAfterBattleText2: ; 74b20 (1d:4b20)
db "@"
ViridianGymText4: ; 74b25 (1d:4b25)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
@@ -400,7 +400,7 @@ ViridianGymAfterBattleText3: ; 74b39 (1d:4b39)
db "@"
ViridianGymText5: ; 74b3e (1d:4b3e)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
@@ -418,7 +418,7 @@ ViridianGymAfterBattleText4: ; 74b52 (1d:4b52)
db "@"
ViridianGymText6: ; 74b57 (1d:4b57)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
@@ -436,7 +436,7 @@ ViridianGymAfterBattleText5: ; 74b6b (1d:4b6b)
db "@"
ViridianGymText7: ; 74b70 (1d:4b70)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
@@ -454,7 +454,7 @@ ViridianGymAfterBattleText6: ; 74b84 (1d:4b84)
db "@"
ViridianGymText8: ; 74b89 (1d:4b89)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianGymTrainerHeader6
call TalkToTrainer
jp TextScriptEnd
@@ -472,7 +472,7 @@ ViridianGymAfterBattleText7: ; 74b9d (1d:4b9d)
db "@"
ViridianGymText9: ; 74ba2 (1d:4ba2)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianGymTrainerHeader7
call TalkToTrainer
jp TextScriptEnd
@@ -490,17 +490,17 @@ ViridianGymAfterBattleText8: ; 74bb6 (1d:4bb6)
db "@"
ViridianGymText10: ; 74bbb (1d:4bbb)
- db $08 ; asm
+ TX_ASM
ld a, [wd751]
bit 1, a
- jr nz, .asm_1abd1 ; 0x74bc1
+ jr nz, .asm_1abd1
ld hl, ViridianGymText_74bd4
call PrintText
- jr .asm_6064d ; 0x74bc9
-.asm_1abd1 ; 0x74bcb
+ jr .asm_6064d
+.asm_1abd1
ld hl, ViridianGymText_74bd9
call PrintText
-.asm_6064d ; 0x74bd1
+.asm_6064d
jp TextScriptEnd
ViridianGymText_74bd4: ; 74bd4 (1d:4bd4)
diff --git a/scripts/viridianhouse.asm b/scripts/viridianhouse.asm
index ab8b6786..61920489 100755
--- a/scripts/viridianhouse.asm
+++ b/scripts/viridianhouse.asm
@@ -16,7 +16,7 @@ ViridianHouseText2: ; 1d59a (7:559a)
db "@"
ViridianHouseText3: ; 1d59f (7:559f)
- db $08 ; asm
+ TX_ASM
ld hl, ViridianHouseText_1d5b1
call PrintText
ld a, SPEAROW
diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm
index d33dfe81..e6e120fe 100755
--- a/scripts/viridianmart.asm
+++ b/scripts/viridianmart.asm
@@ -8,11 +8,11 @@ ViridianMartScript: ; 1d46e (7:546e)
ViridianMartScript_1d47d: ; 1d47d (7:547d)
ld a, [wd74e]
bit 0, a
- jr nz, .asm_1d489 ; 0x1d482 $5
- ld hl, ViridianMartTextPointers ; $54e0
- jr .asm_1d48c ; 0x1d487 $3
+ jr nz, .asm_1d489
+ ld hl, ViridianMartTextPointers
+ jr .asm_1d48c
.asm_1d489
- ld hl, ViridianMartTextPointers + $a ; $54ea ; starts at ViridianMartText6
+ ld hl, ViridianMartTextPointers + $a ; starts at ViridianMartText6
.asm_1d48c
ld a, l
ld [W_MAPTEXTPTR], a
diff --git a/sram.asm b/sram.asm
index 26255d6b..0528d80f 100644
--- a/sram.asm
+++ b/sram.asm
@@ -8,26 +8,38 @@ S_SPRITEBUFFER2:: ds SPRITEBUFFERSIZE ; a310
sHallOfFame:: ds HOF_TEAM * NUM_HOF_TEAMS ; a598
+
SECTION "Save Data", SRAM, BANK[1]
+ ds $598
-SECTION "Save Data Start", SRAM1[$a598]
S_SAVEDPLAYERNAME:: ds 11 ; a598
S_SAVEDMAINDATA:: ds W_NUMINBOX - wPokedexOwned ; a5a3
-S_SAVEDSPRITEDATA:: ds wOAMBuffer - wSpriteStateData1 ; ad2c
+S_SAVEDSPRITEDATA:: ds $200 ; wOAMBuffer - wSpriteStateData1 ; ad2c
S_SAVEDPARTYDATA:: ds wPokedexOwned - wPartyCount ; af2c
S_SAVEDCURBOXDATA:: ds wBoxMonNicksEnd - W_NUMINBOX ; b0c0
S_SAVEDhTilesetType:: ds 1 ; b522
S_SAVEDMAINDATACHECKSUM:: ds 1 ; b523
-SECTION "Saved Boxes", SRAM, BANK[2] ; pointers used for bank 3 too
-S_BOXLENGTH EQU $462
+SECTION "Saved Boxes 1", SRAM, BANK[2]
+
+S_SAVEDBOX1:: ds wBoxMonNicksEnd - W_NUMINBOX ; a000
+S_SAVEDBOX2:: ds wBoxMonNicksEnd - W_NUMINBOX ; a462
+S_SAVEDBOX3:: ds wBoxMonNicksEnd - W_NUMINBOX ; a8c4
+S_SAVEDBOX4:: ds wBoxMonNicksEnd - W_NUMINBOX ; ad26
+S_SAVEDBOX5:: ds wBoxMonNicksEnd - W_NUMINBOX ; b188
+S_SAVEDBOX6:: ds wBoxMonNicksEnd - W_NUMINBOX ; b5ea
+S_SAVEDBOXES1CHECKSUM:: ds 1 ; ba4c
+S_SAVEDBOXES1CHECKSUM2:: ds 6 ; ba4d
+
+
+SECTION "Saved Boxes 2", SRAM, BANK[3]
-S_SAVEDBOX1:: ds S_BOXLENGTH ; a000
-S_SAVEDBOX2:: ds S_BOXLENGTH ; a462
-S_SAVEDBOX3:: ds S_BOXLENGTH ; a8c4
-S_SAVEDBOX4:: ds S_BOXLENGTH ; ad26
-S_SAVEDBOX5:: ds S_BOXLENGTH ; b188
-S_SAVEDBOX6:: ds S_BOXLENGTH ; b5ea
-S_SAVEDBOXESCHECKSUM:: ds 1 ; ba4c
-S_SAVEDBOXESCHECKSUM2:: ds 6 ; ba4d
+S_SAVEDBOX7:: ds wBoxMonNicksEnd - W_NUMINBOX ; a000
+S_SAVEDBOX8:: ds wBoxMonNicksEnd - W_NUMINBOX ; a462
+S_SAVEDBOX9:: ds wBoxMonNicksEnd - W_NUMINBOX ; a8c4
+S_SAVEDBOX10:: ds wBoxMonNicksEnd - W_NUMINBOX ; ad26
+S_SAVEDBOX11:: ds wBoxMonNicksEnd - W_NUMINBOX ; b188
+S_SAVEDBOX12:: ds wBoxMonNicksEnd - W_NUMINBOX ; b5ea
+S_SAVEDBOXES2CHECKSUM:: ds 1 ; ba4c
+S_SAVEDBOXES2CHECKSUM2:: ds 6 ; ba4d
diff --git a/text.asm b/text.asm
index 7dfe797a..17067e57 100644
--- a/text.asm
+++ b/text.asm
@@ -1122,7 +1122,7 @@ _MoneyForWinningText:: ; 896dd (22:56dd)
_TrainerDefeatedText:: ; 896f9 (22:56f9)
text $52, " defeated"
line "@"
- TX_RAM W_TRAINERNAME ; 0x89706
+ TX_RAM W_TRAINERNAME
text "!"
prompt
@@ -1152,7 +1152,7 @@ _PlayerBlackedOutText2:: ; 89748 (22:5748)
_LinkBattleLostText:: ; 89772 (22:5772)
text $52, " lost to"
line "@"
- TX_RAM W_TRAINERNAME ; 0x8977e
+ TX_RAM W_TRAINERNAME
text "!"
prompt
diff --git a/text/maps/agatha.asm b/text/maps/agatha.asm
index 9e20b7aa..e78aeeab 100644
--- a/text/maps/agatha.asm
+++ b/text/maps/agatha.asm
@@ -42,7 +42,7 @@ _AgathaAfterBattleText:: ; 86998 (21:6998)
cont "along now, child!"
done
-_AgathaText2:: ; 869fd (21:69fd)
+_AgathaDontRunAwayText:: ; 869fd (21:69fd)
text "Someone's voice:"
line "Don't run away!"
done
diff --git a/text/maps/bruno.asm b/text/maps/bruno.asm
index f704a4a6..70421db2 100644
--- a/text/maps/bruno.asm
+++ b/text/maps/bruno.asm
@@ -31,7 +31,7 @@ _BrunoAfterBattleText:: ; 8681d (21:681d)
cont "challenge!"
done
-_UnnamedText_763d2:: ; 8684b (21:684b)
+_BrunoDontRunAwayText:: ; 8684b (21:684b)
text "Someone's voice:"
line "Don't run away!"
done
diff --git a/text/maps/fuchsia_gym_1.asm b/text/maps/fuchsia_gym_1.asm
index ded9b911..a877c0a1 100644
--- a/text/maps/fuchsia_gym_1.asm
+++ b/text/maps/fuchsia_gym_1.asm
@@ -1,4 +1,4 @@
-_UnnamedText_75581:: ; 9e9b1 (27:69b1)
+_KogaBeforeBattleText:: ; 9e9b1 (27:69b1)
text "KOGA: Fwahahaha!"
para "A mere child like"
@@ -16,7 +16,7 @@ _UnnamedText_75581:: ; 9e9b1 (27:69b1)
cont "techniques!"
done
-_UnnamedText_75586:: ; 9ea66 (27:6a66)
+_KogaAfterBattleText:: ; 9ea66 (27:6a66)
text "Humph!"
line "You have proven"
cont "your worth!"
diff --git a/text/maps/fuchsia_gym_2.asm b/text/maps/fuchsia_gym_2.asm
index e0cb6807..73c9d31e 100644
--- a/text/maps/fuchsia_gym_2.asm
+++ b/text/maps/fuchsia_gym_2.asm
@@ -1,4 +1,4 @@
-_UnnamedText_7558b:: ; a0000 (28:4000)
+_KogaExplainToxicText:: ; a0000 (28:4000)
text "When afflicted by"
line "TOXIC, #MON"
cont "suffer more and"
@@ -9,7 +9,7 @@ _UnnamedText_7558b:: ; a0000 (28:4000)
line "terrorize foes!"
done
-_UnnamedText_75590:: ; a0069 (28:4069)
+_FuchsiaGymText9:: ; a0069 (28:4069)
text "Now that you have"
line "the SOULBADGE,"
cont "the DEFENSE of"
@@ -169,7 +169,7 @@ _FuchsiaGymAfterBattleText6:: ; a0483 (28:4483)
cont "choose?"
done
-_UnnamedText_7564e:: ; a04d2 (28:44d2)
+_FuchsiaGymText_7564e:: ; a04d2 (28:44d2)
text "Yo! Champ in"
line "making!"
@@ -186,7 +186,7 @@ _UnnamedText_7564e:: ; a04d2 (28:44d2)
cont "to reach him!"
done
-_UnnamedText_75653:: ; a0574 (28:4574)
+_FuchsiaGymText_75653:: ; a0574 (28:4574)
text "It's amazing how"
line "ninja can terrify"
cont "even now!"
diff --git a/text/maps/lorelei.asm b/text/maps/lorelei.asm
index a75b50d9..2ec3c74d 100644
--- a/text/maps/lorelei.asm
+++ b/text/maps/lorelei.asm
@@ -36,7 +36,7 @@ _LoreleiAfterBattleText:: ; 866d3 (21:66d3)
cont "LEAGUE power!"
done
-_LoreleiText2:: ; 86729 (21:6729)
+_LoreleiDontRunAwayText:: ; 86729 (21:6729)
text "Someone's voice:"
line "Don't run away!"
done
diff --git a/text/maps/underground_path_route_7_entrance_unused.asm b/text/maps/underground_path_route_7_entrance_unused.asm
index 27016b35..0c24f9f7 100644
--- a/text/maps/underground_path_route_7_entrance_unused.asm
+++ b/text/maps/underground_path_route_7_entrance_unused.asm
@@ -1,4 +1,4 @@
-_UnnamedText_5d773:: ; 8c132 (23:4132)
+_UGPathRoute7EntranceUnusedText_5d773:: ; 8c132 (23:4132)
text "I want to shop at"
line "the dept. store"
cont "in CELADON but..."
@@ -8,13 +8,13 @@ _UnnamedText_5d773:: ; 8c132 (23:4132)
cont "people there."
done
-_UnnamedText_5d778:: ; 8c195 (23:4195)
+_UGPathRoute7EntranceUnusedText_5d778:: ; 8c195 (23:4195)
text "TEAM ROCKET had a"
line "secret hideout in"
cont "CELADON CITY?"
done
-_UnnamedText_5d77d:: ; 8c1c8 (23:41c8)
+_UGPathRoute7EntranceUnusedText_5d77d:: ; 8c1c8 (23:41c8)
text "You're here to"
line "shop in CELADON?"
@@ -22,7 +22,7 @@ _UnnamedText_5d77d:: ; 8c1c8 (23:41c8)
line "and head west!"
done
-_UnnamedText_5d782:: ; 8c209 (23:4209)
+_UGPathRoute7EntranceUnusedText_5d782:: ; 8c209 (23:4209)
text "The UNDERGROUND"
line "PATH goes beneath"
cont "SAFFRON and leads"
diff --git a/wram.asm b/wram.asm
index 818fed54..6d201fc8 100755
--- a/wram.asm
+++ b/wram.asm
@@ -236,9 +236,10 @@ wLastMenuItem:: ; cc2a
; id of previously selected menu item
ds 1
-wcc2b:: ds 1
-wcc2c:: ds 1
-wcc2d:: ds 1
+; group these 3 addresses together because of an ld a,[hli]
+wcc2b:: ds 1 ; used in party menu
+wcc2c:: ds 1 ; used in item related menus (inventory, pc)
+wcc2d:: ds 1 ; also used in inventory, supposed to save an item id
wPlayerMoveListIndex:: ; cc2e
ds 1
@@ -265,14 +266,15 @@ wListScrollOffset:: ; cc36
; keeps track of what section of the list is on screen
ds 1
-wcc37:: ds 1
+wcc37:: ds 1 ; menu related thing, used in pokedex and dialog boxes
wTradeCenterPointerTableIndex:: ; cc38
ds 1
ds 1
-wcc3a:: ds 1
+; group these two together
+wcc3a:: ds 1 ; both used in home/text.asm
wcc3b:: ds 1
wDoNotWaitForButtonPressAfterDisplayingText:: ; cc3c
@@ -289,7 +291,7 @@ wLinkMenuSelectionReceiveBuffer:: ; cc3d
; two byte buffer
; the received menu selection is stored twice
-wcc3d:: ds 1
+wcc3d:: ds 1 ; not used for anything other than mentioned above (haha link function)
wSerialExchangeNybbleReceiveData:: ; cc3e
; the final received nybble is stored here by Serial_ExchangeNybble
@@ -312,22 +314,22 @@ wLinkTimeoutCounter:: ; cc47
wUnknownSerialCounter:: ; cc47
; 2 bytes
-wcc47:: ds 1
-wcc48:: ds 1
+wcc47:: ds 1 ; used in text id stuff
+wcc48:: ds 1 ; part of wUnknownSerialCounter
wWhichTradeMonSelectionMenu:: ; cc49
; $00 = player mons
; $01 = enemy mons
-wcc49:: ds 1
+wcc49:: ds 1 ; used in some pokemon related stuff (some kind of species storage byte)
wMenuWrappingEnabled:: ; cc4a
; set to 1 if you can go from the bottom to the top or top to bottom of a menu
; set to 0 if you can't go past the top or bottom of the menu
ds 1
-wcc4b:: ds 2
-wcc4d:: ds 1
+wcc4b:: ds 2 ; used as a joypad storage value
+wcc4d:: ds 1 ; used in sprite hiding/showing related operations
wPredefID:: ; cc4e
ds 1
@@ -355,13 +357,13 @@ wBoostExpByExpAll:: ; cc5b
wAnimationType:: ; cc5b
; values between 0-6. Shake screen horizontally, shake screen vertically, blink Pokemon...
-wcc5b:: ds 1
-wcc5c:: ds 1
-wcc5d:: ds 1
-wcc5e:: ds 13
+wcc5b:: ds 1 ; these upcoming values below are miscellaneous storage values
+wcc5c:: ds 1 ; used in pokedex evaluation as well
+wcc5d:: ds 1 ; used in pokedex evaluation
+wcc5e:: ds 13 ; as well as used as miscellaneous storage value, this is also used for the game corner slots
-wcc6b:: ds 14
-wcc79:: ds 30
+wcc6b:: ds 14 ; doesn't seem to be used for anything, probably just more storage
+wcc79:: ds 30 ; used in battle animations
wNPCMovementDirections2:: ; cc97
@@ -369,7 +371,7 @@ wSwitchPartyMonTempBuffer:: ; cc97
; temporary buffer when swapping party mon data
ds 10
-wcca1:: ds 49
+wcca1:: ds 49 ; used in overworld npc movement
wRLEByteCount:: ; ccd2
ds 1
@@ -379,8 +381,8 @@ wSimulatedJoypadStatesEnd:: ; ccd3
; the list starts above this address and extends downwards in memory until here
; overloaded with below labels
-wccd3:: ds 1
-wccd4:: ds 1
+wccd3:: ds 1 ; used in battle, pokemon, PC and game corner stuff
+wccd4:: ds 1 ; used in evolving pokemon and has a direct reference for simulated joypad stuff in vermillion and seafoam
; if [ccd5] != 1, the second AI layer is not applied
wAILayer2Encouragement:: ; ccd5
@@ -393,7 +395,7 @@ wPlayerSubstituteHP:: ; ccd7
wEnemySubstituteHP:: ; ccd8
ds 1
-wccd9:: ds 2
+wccd9:: ds 2 ; used in InitBattleVariablesLoop (written to after the loop is finished)
wMoveMenuType:: ; ccdb
; 0=regular, 1=mimic, 2=above message box (relearn, heal pp..)
@@ -416,8 +418,8 @@ wAICount:: ; ccdf
wEnemyMoveListIndex:: ; cce2
ds 1
-wcce3:: ds 1
-wcce4:: ds 1
+wcce3:: ds 1 ; used in battle-related text functions
+wcce4:: ds 1 ; used in battle-related text functions
wTotalPayDayMoney:: ; cce5
; total amount of money made using Pay Day during the current battle
@@ -430,20 +432,20 @@ wSafariBaitFactor:: ; cce9
ds 1
-wcceb:: ds 1
-wccec:: ds 1
+wcceb:: ds 1 ; used to save the dvs of a mon when it uses transform
+wccec:: ds 1 ; also used with above case
wMonIsDisobedient:: ds 1 ; cced
-wPlayerDisabledMoveNumber:: ds 1 ; ccee
+wPlayerDisabledMoveNumber:: ds 1 ; ccee
wEnemyDisabledMoveNumber:: ds 1 ; ccef
-wccf0:: ds 1
+wccf0:: ds 1 ; used as a check if a mon fainted
wPlayerUsedMove:: ds 1 ; ccf1
wEnemyUsedMove:: ds 1 ; ccf2
-wccf3:: ds 1
+wccf3:: ds 1 ; used with the move minimize
wMoveDidntMiss:: ds 1 ; ccf4
@@ -451,8 +453,8 @@ wPartyFoughtCurrentEnemyFlags:: ; ccf5
; flags that indicate which party members have fought the current enemy mon
flag_array 6
-wccf6:: ds 1
-wccf7:: ds 14
+wccf6:: ds 1 ; used in some hp bar thing
+wccf7:: ds 14 ; used with substitute move sliding thing? (not sure)
wUnknownSlotVar:: ; cd05
@@ -466,7 +468,7 @@ ds 10
wInGameTradeGiveMonSpecies:: ; cd0f
-wPlayerMonUnmodifiedLevel:: ; cd0f
+wPlayerMonUnmodifiedLevel:: ; cd0f
ds 1
wInGameTradeTextPointerTablePointer:: ; cd10
@@ -557,7 +559,7 @@ wInGameTradeReceiveMonSpecies::
wNPCMovementDirections2Index:: ; cd37
-wcd37:: ds 1
+wcd37:: ds 1 ; used in list menus, like the fossil lab menu or drink girl menu. Also used in link menu.
wSimulatedJoypadStatesIndex:: ; cd38
; the next simulated joypad state is at wSimulatedJoypadStatesEnd plus this value minus 1
@@ -628,7 +630,7 @@ wPlayerSpinWhileMovingUpOrDownAnimFrameDelay:: ; cd3f
wHiddenObjectIndex:: ; cd3f
wTrainerFacingDirection:: ; cd3f
-wcd3f::
+wcd3f:: ; used with daycare text for money amount
ds 1
wPlayerSpinInPlaceAnimSoundID:: ; cd40
@@ -644,34 +646,35 @@ wHiddenObjectX:: ; cd41
wTrainerScreenX:: ; cd41
ds 1
+; a lot of the uses for these values use more than the said address
-wcd42:: ds 1
-wcd43:: ds 1
-wcd44:: ds 1
-wcd45:: ds 1
-wcd46:: ds 1
-wcd47:: ds 1
-wcd48:: ds 1
-wcd49:: ds 1
-wcd4a:: ds 1
-wcd4b:: ds 1
+wcd42:: ds 1 ; used in pewter center script, printing field mon moves, slot machines and HoF PC
+wcd43:: ds 1 ; slot machine stuff and GetMonFieldMoves
+wcd44:: ds 1 ; just slot machine
+wcd45:: ds 1 ; slot machine...
+wcd46:: ds 1 ; slot machine...
+wcd47:: ds 1 ; used in slot machine and spinning player sprite
+wcd48:: ds 1 ; same as above
+wcd49:: ds 1 ; used in slot machine, displaying the gym leaders/badges on the trainer card, and displaying the town map
+wcd4a:: ds 1 ; probably used in one of the above mentioned functions
+wcd4b:: ds 1 ; same as above
wTradedPlayerMonOTID:: ; cd4c
-wcd4c:: ds 1
-wcd4d:: ds 1
+wcd4c:: ds 1 ; slot machine and probably other above stuff
+wcd4d:: ds 1 ; used with cut and slot machine
wTradedEnemyMonOT:: ; cd4e
-wcd4e:: ds 1
-wcd4f:: ds 1
-wcd50:: ds 9
+wcd4e:: ds 1 ; used with in-game trades and slot machine
+wcd4f:: ds 1 ; used with in-game trades, emotion bubbles, and player animations
+wcd50:: ds 9 ; used with in-game trades, emotion bubbles, and player and miscellaneous sprite animations
wTradedEnemyMonOTID:: ; cd59
ds 2
-wcd5b:: ds 1
-wcd5c:: ds 1
+wcd5b:: ds 1 ; used in some sprite stuff, town map and surge gym trash cans
+wcd5c:: ds 1 ; used in town map
wMonPartySpriteSpecies:: ; cd5d
ds 1
@@ -693,18 +696,19 @@ wFlags_0xcd60:: ; cd60
ds 9
-wcd6a:: ds 1
+wcd6a:: ds 1 ; used as the output of the outcome of an item (successful, unsuccessful, can't be used now, etc.)
wJoyIgnore:: ; cd6b
; Set buttons are ignored.
ds 1
-wcd6c:: ds 1
-wcd6d:: ds 4
-wcd71:: ds 1
-wcd72:: ds 5
-wcd77:: ds 1
-wcd78:: ds 9
+; as well as the said function, these values are used as a buffer for PlaceString
+wcd6c:: ds 1 ; used in pokemon status screen and battle stuff
+wcd6d:: ds 4 ; used solely for PlaceString
+wcd71:: ds 1 ; used with pokemon status screen
+wcd72:: ds 5 ; used with restoring PP
+wcd77:: ds 1 ; used as an end terminator for GetMonName: (@ is written to this location)
+wcd78:: ds 9 ; also used with restoring PP
wSerialOtherGameboyRandomNumberListBlock:: ; cd81
; buffer for transferring the random number list generated by the other gameboy
@@ -724,23 +728,23 @@ wHPBarNewHP:: ; ceed
wHPBarDelta:: ; ceef
ds 1
-wcef0:: ds 1
-wcef1:: ds 12
+wcef0:: ds 1 ; used with HP bar stuff, probably used with wBuffer too.
+wcef1:: ds 12 ; same case as above
wHPBarHPDifference:: ; cefd
ds 1
ds 7
-wcf05:: ds 1
-wcf06:: ds 1
+wcf05:: ds 1 ; used with enemy using healing moves
+wcf06:: ds 1 ; used with healing items as a storage value to store wWhichPokemon
wAnimSoundID:: ; cf07
; sound ID during battle animations
ds 1
-wcf08:: ds 1
-wcf09:: ds 1
-wcf0a:: ds 1
+wcf08:: ds 1 ; used as a storage value for the bank to return to after a BankswitchHome (bankswitch in homebank)
+wcf09:: ds 1 ; used as a temp storage value for the bank to switch to
+wcf0a:: ds 1 ; used as flags for Poke Mart
wBattleResult:: ; cf0b
; $00 - win
; $01 - lose
@@ -751,16 +755,16 @@ wAutoTextBoxDrawingControl:: ; cf0c
; bit 0: if set, DisplayTextID automatically draws a text box
ds 1
-wcf0d:: ds 1
-wcf0e:: ds 1
-wcf0f:: ds 1
+wcf0d:: ds 1 ; used with some overworld scripts (not exactly sure what it's used for)
+wcf0e:: ds 1 ; used with some overworld collison check
+wcf0f:: ds 1 ; used with moving overworld sprites
wNPCMovementScriptFunctionNum:: ; cf10
; which script function within the pointer table indicated by
; wNPCMovementScriptPointerTableNum
ds 1
-wcf11:: ds 1
+wcf11:: ds 1 ; used as a flag if the game needs to switch to the bank which the map is in when displaying a text id (flag is set during predefs)
wPredefParentBank:: ; cf12
ds 1
@@ -777,7 +781,7 @@ wNPCMovementScriptSpriteOffset:: ; cf17
; sprite offset of sprite being controlled by NPC movement script
ds 1
-wcf18:: ds 2
+wcf18:: ds 2 ; used with overworld movement
wGBC:: ; cf1a
ds 1
@@ -786,17 +790,17 @@ wOnSGB:: ; cf1b
; if running on SGB, it's 1, else it's 0
ds 1
-wcf1c:: ds 1
-wcf1d:: ds 1
-wcf1e:: ds 1
-wcf1f:: ds 6
-wcf25:: ds 8
-wcf2d:: ds 1
-wcf2e:: ds 2
-wcf30:: ds 7
-wcf37:: ds 20
-wcf4b:: ds 1
-wcf4c:: ds 1
+wcf1c:: ds 1 ; used with sgb palettes
+wcf1d:: ds 1 ; used when displaying palettes for Pokemon
+wcf1e:: ds 1 ; used to display palettes for HP bar
+wcf1f:: ds 6 ; used to display HP bars in Pokemon Menu (probably palettes)
+wcf25:: ds 8 ; used to display HP bar for Pokemon Status Screen (probably palettes too)
+wcf2d:: ds 1 ; also used to display HP bar for Pokemon Menu (something about HP colour)
+wcf2e:: ds 2 ; more HP bar palette stuff.
+wcf30:: ds 7 ; used with palettes (apparently for Pokedex)
+wcf37:: ds 20 ; used with palletes too (used for Party Menu)
+wcf4b:: ds 1 ; storage buffer for various strings
+wcf4c:: ds 1 ; used with displaying EXP value, probably also overflowed with wcf4b
wGainBoostedExp:: ; cf4d
ds 1
ds 17
@@ -813,19 +817,19 @@ wStringBuffer3:: ; cf81
wList:: ; cf8b
ds 2
-wcf8d:: ds 1
-wcf8e:: ds 1
+wcf8d:: ds 1 ; used in GetMonName
+wcf8e:: ds 1 ; also used in GetMonName (probably as a pointer)
wItemPrices:: ; cf8f
ds 2
-wcf91:: ds 1
+wcf91:: ds 1 ; used with a lot of things (too much to list here)
wWhichPokemon:: ; cf92
; which pokemon you selected
ds 1
-wcf93:: ds 1
+wcf93:: ds 1 ; used with lists
wHPBarType:: ; cf94
; type of HP bar
@@ -837,9 +841,9 @@ wListMenuID:: ; cf94
; ID used by DisplayListMenuID
ds 1
-wcf95:: ds 1
-wcf96:: ds 1
-wcf97:: ds 1
+wcf95:: ds 1 ; used with RemovePokemon (BoxMons, Daycare, Trades, etc.)
+wcf96:: ds 1 ; used with removing items
+wcf97:: ds 1 ; used with printing item quantities?
; LoadMonData copies mon data here
wLoadedMon:: party_struct wLoadedMon ; cf98
@@ -863,9 +867,9 @@ wMusicHeaderPointer:: ; cfc7
; (the current music channel address - $4000) / 3
ds 1
-wcfc8:: ds 1
-wcfc9:: ds 1
-wcfca:: ds 1
+wcfc8:: ds 1 ; used with audio
+wcfc9:: ds 1 ; also used with audio
+wcfca:: ds 1 ; also used with audio too
wUpdateSpritesEnabled:: ; cfcb
; $01 enables UpdateSprites; anything else disables it
@@ -949,13 +953,13 @@ W_TRAINERCLASS:: ; d031
ds 1
-wTrainerPicPointer:: ; wd033
+wTrainerPicPointer:: ; d033
ds 2
ds 1
-wd036:: ds 16
-wd046:: ds 1
-wd047:: ds 1
-wd048:: ds 2
+wd036:: ds 16 ; used as a temporary buffer to print "XXX learned YYY"
+wd046:: ds 1 ; used with trainer pointer stuff (not exactly sure, but the label is incremented and loaded with a value, so wd047 is accessed)
+wd047:: ds 1 ; used with unloading trainer data?
+wd048:: ds 2 ; used as a pointer for missable object loop
W_TRAINERNAME:: ; d04a
; 13 bytes for the letters of the opposing trainer
@@ -991,7 +995,7 @@ wDamageMultipliers:: ; d05b
; $a = neutral
; $14 = super-effective
; bit 7: STAB
- ds 1
+ ds 1
W_LONEATTACKNO:: ; d05c
; which entry in LoneAttacks to use
@@ -1067,7 +1071,7 @@ wPlayerNumAttacksLeft::
; when the player is attacking multiple times, the number of attacks left
ds 1
-W_PLAYERCONFUSEDCOUNTER:: ; wd06b
+W_PLAYERCONFUSEDCOUNTER:: ; d06b
ds 1
W_PLAYERTOXICCOUNTER:: ; d06c
@@ -1083,7 +1087,7 @@ wEnemyNumAttacksLeft:: ; d06f
; when the enemy is attacking multiple times, the number of attacks left
ds 1
-W_ENEMYCONFUSEDCOUNTER:: ; wd070
+W_ENEMYCONFUSEDCOUNTER:: ; d070
ds 1
W_ENEMYTOXICCOUNTER:: ; d071
@@ -1110,17 +1114,17 @@ wEscapedFromBattle::
; non-zero when an item or move that allows escape from battle was used
ds 1
-wd079::
-wAmountMoneyWon:: ds 1 ; wd079 - wd07b
-wd07a:: ds 1
- ds 1
+wAmountMoneyWon:: ; wd079 - wd07b
+wd079:: ds 1 ; used as a value to print the money won from a battle, as well as a misc. value in seafoam
+wd07a:: ds 1 ; same case as above
+wd07b:: ds 1 ; used as a buffer to convert the money won from a battle into BCD
W_ANIMATIONID:: ; d07c
; ID number of the current battle animation
ds 1
-wd07d:: ds 1
-wd07e:: ds 3
+wd07d:: ds 1 ; used with naming functions and party display type
+wd07e:: ds 3 ; used with mart and inventory
; base coordinates of frame block
W_BASECOORDX:: ; d081
@@ -1136,7 +1140,7 @@ W_FBTILECOUNTER:: ; d084
; counts how many tiles of the current frame block have been drawn
ds 1
-wd085:: ds 1
+wd085:: ds 1 ; used with animating water/flowers
W_SUBANIMFRAMEDELAY:: ; d086
; duration of each frame of the current subanimation in terms of screen refreshes
@@ -1145,7 +1149,7 @@ W_SUBANIMCOUNTER:: ; d087
; counts the number of subentries left in the current subanimation
ds 1
-wd088:: ds 1
+wd088:: ds 1 ; savefile checksum (if file is corrupted)
W_NUMFBTILES:: ; d089
; number of tiles in current battle animation frame block
@@ -1154,7 +1158,7 @@ W_NUMFBTILES:: ; d089
wTradedMonMovingRight:: ; d08a
; $01 if mon is moving from left gameboy to right gameboy; $00 if vice versa
-wd08a:: ds 1
+wd08a:: ds 1 ; used with sprites and displaying the option menu on the main menu screen?
wTownMapSpriteBlinkingCounter:: ; d08b
@@ -1190,13 +1194,13 @@ W_SUBANIMSUBENTRYADDR:: ; d096
ds 2
-wd09a:: ds 1
+wd09a:: ds 1 ; used with the battle transition screen when entering a battle (screen slowly draws into black)
wTownMapSpriteBlinkingEnabled:: ; d09b
; non-zero when enabled. causes nest locations to blink on and off.
; the town selection cursor will blink regardless of what this value is
-wd09b:: ds 1
+wd09b:: ds 1 ; also used with battle transition screen and move animations
W_FBDESTADDR:: ; d09c
; current destination address in OAM for frame blocks (big endian)
@@ -1216,8 +1220,8 @@ W_FBMODE:: ; d09e
wNewTileBlockID:: ; d09f
-wd09f:: ds 1
-wd0a0:: ds 1
+wd09f:: ds 1 ; used with predef ReplaceTileBlock
+wd0a0:: ds 1 ; used in VBlank and ChangeBGPalColor0_4Frames
W_SPRITECURPOSX:: ; d0a1
ds 1
@@ -1266,7 +1270,7 @@ W_SPRITEDECODETABLE1PTR:: ; d0b3
; pointer to differential decoding table (assuming initial value 1)
ds 2
-wd0b5:: ds 1
+wd0b5:: ds 1 ; used as a temp storage area for Pokemon Species, and other Pokemon/Battle related things
wNameListType:: ; d0b6
ds 1
@@ -1318,7 +1322,7 @@ W_MONHLEARNSET:: ; d0cc
flag_array 50 + 5
ds 1
-wd0d4:: ds 3
+wd0d4:: ds 3 ; temp storage for hTilesetType
W_MONHPADDING:: ; d0d7
@@ -1328,10 +1332,10 @@ W_DAMAGE:: ; d0d7
ds 2
-wRepelRemainingSteps:: ; wd0db
+wRepelRemainingSteps:: ; d0db
ds 1
-wMoves:: ; wd0dc
+wMoves:: ; d0dc
; list of moves for FormatMovesString
ds 4
@@ -1341,50 +1345,50 @@ wMoveNum:: ; d0e0
wMovesString:: ; d0e1
ds 56
-wd119:: ds 1
+wd119:: ds 1 ; written to from W_CURMAPTILESET but never read
wWalkBikeSurfStateCopy:: ; d11a
; wWalkBikeSurfState is sometimes copied here, but it doesn't seem to be used for anything
ds 1
-wd11b:: ds 1
-wd11c:: ds 1
-wd11d:: ds 1
-wd11e:: ds 1
-wd11f:: ds 1
+wd11b:: ds 1 ; used with mart text box and cable club
+wd11c:: ds 1 ; temp storage value for catching pokemon
+wd11d:: ds 1 ; used with battle switchout and testing if the enemy mon fainted
+wd11e:: ds 1 ; used as a Pokemon and Item storage value. Also used as an output value for CountSetBits
+wd11f:: ds 1 ; used when running from battle and PartyMenuInit
wNumRunAttempts::
; number of times the player has tried to run from battle
ds 1
-wd121:: ds 1
-wd122:: ds 2
-wd124:: ds 1
+wd121:: ds 1 ; used with evolving pokemon
+wd122:: ds 2 ; saved ROM bank number for vblank
+wd124:: ds 1 ; used as an output value when determining if an item is a key item
wTextBoxID:: ; d125
ds 1
-wd126:: ds 1
+wd126:: ds 1 ; not exactly sure what this is used for, but it seems to be used as a multipurpose temp flag value
W_CURENEMYLVL:: ; d127
ds 1
-wd128:: ds 1
-wd129:: ds 1
-wd12a:: ds 1
+wd128:: ds 1 ; used as a pointer to displaying Poke Mart inventory, also used to store the pointer of LoadItemList (pointer to item list initially in hl)
+wd129:: ds 1 ; second half of above mentioned pointer
+wd12a:: ds 1 ; Number of list entries for displaying a list
wLinkState:: ; d12b
ds 1
wTwoOptionMenuID:: ds 1
-wd12d:: ds 1
-wd12e:: ds 1
-wd12f:: ds 1
-wd130:: ds 1
-wd131:: ds 1
-wd132:: ds 1
-wd133:: ds 6
-wd139:: ds 1
+wd12d:: ds 1 ; used with item menus and pokemart menu, also used with testing if all Pokemon Fainted?
+wd12e:: ds 1 ; used as an output value to determine if A or B was pressed in a yes/no box
+wd12f:: ds 1 ; used in some coordinatestuff, npc pathstuff, and game corner prize stuff
+wd130:: ds 1 ; saved value of screen Y coord of trainer sprite
+wd131:: ds 1 ; saved value of screen X coord of trainer sprite
+wd132:: ds 1 ; saved value of map Y coordinate of trainer sprite (not sure for purpose)
+wd133:: ds 6 ; saved value of map X coordinate of trainer sprite
+wd139:: ds 1 ; backup of selected menu entry for game corner prizes
wIgnoreInputCounter:: ; d13a
; counts downward each frame
@@ -1411,9 +1415,9 @@ W_PRIZE3:: ; d13f
wSerialRandomNumberListBlock:: ; d141
; the first 7 bytes are the preamble
-wd141:: ds 2
-wd143:: ds 2
-wd145:: ds 3
+wd141:: ds 2 ; prices for prizes
+wd143:: ds 2 ; prices for prizes
+wd145:: ds 3 ; prices for prizes
wLinkBattleRandomNumberList:: ; d148
; shared list of 9 random numbers, indexed by wLinkBattleRandomNumberListIndex
@@ -1422,10 +1426,10 @@ wLinkBattleRandomNumberList:: ; d148
wSerialPlayerDataBlock:: ; d152
; the first 6 bytes are the preamble
-wd152:: ds 1
-wd153:: ds 3
-wd156:: ds 1
-wd157:: ds 1
+wd152:: ds 1 ; used as a temporary storage for the item used
+wd153:: ds 3 ; written to during pokedex flag action but doesn't seem to be read from
+wd156:: ds 1 ; evolution stone ID used
+wd157:: ds 1 ; used with oak's lab script (related to npc movement directions), possibly indirectly accessed with values below
wPlayerName:: ; d158
@@ -1487,13 +1491,13 @@ W_OBTAINEDBADGES:: ; d356
ds 1
-wd358:: ds 1
+wd358:: ds 1 ; bit 0 set = no delay when printing text (W_OPTIONS is still checked though)
wPlayerID:: ; d359
ds 2
-wd35b:: ds 1
-wd35c:: ds 1
+wd35b:: ds 1 ; used with audio stuff
+wd35c:: ds 1 ; storage for audio bank for current map?
wMapPalOffset:: ; d35d
; offset subtracted from FadePal4 to get the background and object palettes for the current map
@@ -1524,7 +1528,7 @@ W_XBLOCKCOORD:: ; d364
wLastMap:: ; d365
ds 1
-wd366:: ds 1
+wd366:: ds 1 ; W_CURMAPWIDTH of the last outdoor map visited when entering an inside map
W_CURMAPTILESET:: ; d367
ds 1
@@ -1553,7 +1557,7 @@ W_MAPCONNECTIONS:: ; d370
W_MAPCONN1PTR:: ; d371
ds 1
-wd372:: ds 1
+wd372:: ds 1 ; some connection stuff, too bothered to label it
wd373:: ds 1
wd374:: ds 1
wd375:: ds 1
@@ -1614,9 +1618,9 @@ W_SPRITESETID:: ; d3a8
; sprite set ID for the current map
ds 1
-wd3a9:: ds 1
-wd3aa:: ds 3
-wd3ad:: ds 1
+wd3a9:: ds 1 ; used when getting the object data pointer
+wd3aa:: ds 3 ; second part of the pointer
+wd3ad:: ds 1 ; used as the beginning value for copying warp data
wNumberOfWarps:: ; d3ae
; number of warps in current map
@@ -1632,9 +1636,9 @@ wDestinationWarpID:: ; d42f
ds 128
-wd4b0:: ds 1
-wd4b1:: ds 32
-wd4d1:: ds 16
+wd4b0:: ds 1 ; number of signs on the map
+wd4b1:: ds 32 ; starting address for sign coords
+wd4d1:: ds 16 ; starting address for sign text IDs
W_NUMSPRITES:: ; d4e1
; number of sprites on the current map
@@ -1655,16 +1659,16 @@ W_MAPSPRITEEXTRADATA:: ; d504
; two bytes per sprite (trainer class/item ID, trainer set ID)
ds 32
-wd524:: ds 1
-wd525:: ds 1
+wd524:: ds 1 ; map height in 2x2 metatiles, also used with checking connections
+wd525:: ds 1 ; map width in 2x2 metatiles, also used with checking connections
wMapViewVRAMPointer:: ; d526
; the address of the upper left corner of the visible portion of the BG tile map in VRAM
ds 2
-wd528:: ds 1
-wd529:: ds 1
-wd52a:: ds 1
+wd528:: ds 1 ; additional storage for directions
+wd529:: ds 1 ; same case as above, but used differently
+wd52a:: ds 1 ; same case as above
W_TILESETBANK:: ; d52b
ds 1
@@ -1695,9 +1699,9 @@ wBoxItems:: ; d53b
ds 50 * 2
ds 1 ; end
-wd5a0:: ds 2
-wd5a2:: ds 1
-wd5a3:: ds 1
+wd5a0:: ds 2 ; current box number
+wd5a2:: ds 1 ; number of HOF teams
+wd5a3:: ds 1 ; unused? (written to when loading map data)
wPlayerCoins:: ; d5a4
ds 2 ; BCD
@@ -1706,7 +1710,7 @@ W_MISSABLEOBJECTFLAGS:: ; d5a6
; bit array of missable objects. set = removed
ds 39
-wd5cd:: ds 1
+wd5cd:: ds 1 ; temp copy of c1x2 (sprite facing/anim)
W_MISSABLEOBJECTLIST:: ; d5ce
; each entry consists of 2 bytes
@@ -1931,8 +1935,8 @@ W_ROUTE18GATECURSCRIPT:: ; d669
ds 134
-wd6f0:: ds 14
-wd6fe:: ds 2
+wd6f0:: ds 14 ; flags for hidden items?
+wd6fe:: ds 2 ; flags for hidden coins?
wWalkBikeSurfState:: ; d700
; $00 = walking
@@ -1985,7 +1989,7 @@ wDestinationMap:: ; d71a
; destination map (for certain types of special warps, not ordinary walking)
ds 1
-wd71b:: ds 1
+wd71b:: ds 1 ; written to but doesn't seem to be read
wTileInFrontOfBoulderAndBoulderCollisionResult:: ; d71c
; used to store the tile in front of the boulder when trying to push a boulder
@@ -2000,7 +2004,7 @@ wWhichDungeonWarp:: ; d71e
; which dungeon warp within the source map was used
ds 1
-wd71f:: ds 9
+wd71f:: ds 9 ; used with card key
wd728::
; bit 0: using Strength outside of battle
@@ -2008,14 +2012,15 @@ wd728::
ds 1
-wd72a:: ds 2
+wd72a:: ds 2 ; flags for if a gym is beaten, also used to determine whether to display your name on the gym statues
wd72c:: ; d72c
; bit 0: if not set, the 3 minimum steps between random battles have passed
ds 1
-wd72d:: ds 1
-wd72e:: ds 2
+wd72d:: ds 1 ; misc temp flags? (in some scripts, bit 6 and 7 set after a special battle (e.g. gym leaders) has been won)
+ ; also used as a start menu flag
+wd72e:: ds 2 ; more temp misc flags, used with npc movement, main menu and other stuff
wd730::
; bit 0: NPC sprite being moved by script
@@ -2045,7 +2050,7 @@ W_FLAGS_D733:: ; d733
; bit 7: used fly out of battle
ds 1
-wd734:: ds 2
+wd734:: ds 2 ; flag for indigo plateau and lorelei (not sure what it's for)
wd736:: ; d736
; bit 0: check if the player is standing on a door and make him walk down a step if so
@@ -2059,8 +2064,8 @@ wCompletedInGameTradeFlags:: ; d737
ds 2
-wd73b:: ds 1
-wd73c:: ds 3
+wd73b:: ds 1 ; used with elevator warps
+wd73c:: ds 3 ; also used with elevator warps
wCardKeyDoorY:: ; d73f
ds 1
@@ -2070,9 +2075,9 @@ wCardKeyDoorX:: ; d740
ds 2
-wd743:: ds 1
-wd744:: ds 3
-wd747:: ds 3
+wd743:: ds 1 ; used with surge gym trash cans
+wd744:: ds 3 ; also used with surge gym trash cans
+wd747:: ds 3 ; and we're getting to flags, which I'm not going to bother commenting
wd74a:: ds 1
wd74b:: ; d74b
@@ -2218,7 +2223,6 @@ W_GRASSRATE:: ; d887
W_GRASSMONS:: ; d888
ds 20
-
wEnemyPartyCount:: ds 1 ; d89c
wEnemyPartyMons:: ds PARTY_LENGTH + 1 ; d89d
@@ -2239,7 +2243,7 @@ W_TRAINERHEADERPTR:: ; da30
ds 6
-wda38:: ds 1
+wda38:: ds 1 ; used with cinnabar gym questions and pokemon tower 7F?
W_CURMAPSCRIPT:: ; da39
; index of current map script, mostly used as index for function pointer array