diff options
1811 files changed, 47475 insertions, 48068 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..bc973be0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,18 @@ +# Auto detect text files and perform LF normalization +* text eol=lf + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. +*.asm text + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.2bpp binary +*.1bpp binary +*.rle binary +*.tilecoll binary +*.bst binary +*.map binary +*.wav binary +*.blk binary +*.pic binary @@ -1,14 +1,13 @@ # Linux - sudo apt-get install make gcc bison git python python-setuptools - sudo easy_install pypng + sudo apt-get install make gcc bison git python - git clone git://github.com/bentley/rgbds.git + git clone https://github.com/bentley/rgbds cd rgbds sudo make install cd .. - git clone --recursive git://github.com/iimarckus/pokered.git + git clone --recursive https://github.com/pret/pokered cd pokered To build **pokered.gbc** and **pokeblue.gbc**: @@ -23,17 +22,16 @@ To build them individually: # Mac -In the shell, run: +In **Terminal**, run: xcode-select --install - sudo easy_install pypng - git clone git://github.com/bentley/rgbds.git + git clone https://github.com/bentley/rgbds cd rgbds sudo make install cd .. - git clone --recursive git://github.com/iimarckus/pokered.git + git clone --recursive https://github.com/pret/pokered cd pokered make @@ -41,17 +39,16 @@ In the shell, run: # Windows -To build on Windows, use [**Cygwin**](http://cygwin.com/install.html) (32-bit). +To build on Windows, use [**Cygwin**](http://cygwin.com/install.html). Use the default settings. -In the installer, select the following packages: `make` `git` `gettext` `python` `python-setuptools` +In the installer, select the following packages: `make` `git` `python` `gettext` Then get the most recent version of [**rgbds**](https://github.com/bentley/rgbds/releases/). -Put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`. +Extract the archive and put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`. In the **Cygwin terminal**: - easy_install pypng - git clone --recursive git://github.com/iimarckus/pokered.git + git clone --recursive https://github.com/pret/pokered cd pokered make @@ -1,97 +1,53 @@ -# Build Red/Blue. Yellow is WIP. -roms := pokered.gbc pokeblue.gbc - - -.PHONY: all clean red blue yellow compare - -all: $(roms) -red: pokered.gbc -blue: pokeblue.gbc -yellow: pokeyellow.gbc - -versions := red blue yellow - - -# Header options for rgbfix. -dmg_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -cgb_opt = -cjsv -k 01 -l 0x33 -m 0x1b -p 0 -r 03 - -red_opt = $(dmg_opt) -t "POKEMON RED" -blue_opt = $(dmg_opt) -t "POKEMON BLUE" -yellow_opt = $(cgb_opt) -t "POKEMON YELLOW" - - - -# If your default python is 3, you may want to change this to python27. PYTHON := python - -# md5sum -c is used to compare rom hashes. The options may vary across platforms. MD5 := md5sum -c --quiet +2bpp := $(PYTHON) extras/pokemontools/gfx.py 2bpp +1bpp := $(PYTHON) extras/pokemontools/gfx.py 1bpp +pic := $(PYTHON) extras/pokemontools/pic.py compress +includes := $(PYTHON) extras/pokemontools/scan_includes.py -# The compare target is a shortcut to check that the build matches the original roms exactly. -# This is for contributors to make sure a change didn't affect the contents of the rom. -# More thorough comparison can be made by diffing the output of hexdump -C against both roms. -compare: red blue - @$(MD5) roms.md5 - +pokered_obj := audio_red.o main_red.o text_red.o wram_red.o +pokeblue_obj := audio_blue.o main_blue.o text_blue.o wram_blue.o -# Clear the default suffixes. .SUFFIXES: .SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .pic - -# Secondary expansion is required for dependency variables in object rules. .SECONDEXPANSION: - # Suppress annoying intermediate file deletion messages. .PRECIOUS: %.2bpp +.PHONY: all clean red blue compare -# Filepath shortcuts to avoid overly long recipes. -poketools := extras/pokemontools -gfx := $(PYTHON) $(poketools)/gfx.py -pic := $(PYTHON) $(poketools)/pic.py -includes := $(PYTHON) $(poketools)/scan_includes.py - - +roms := pokered.gbc pokeblue.gbc -# Collect file dependencies for objects in red/, blue/ and yellow/. -# These aren't provided by rgbds by default, so we have to look for file includes ourselves. -$(foreach ver, $(versions), \ - $(eval $(ver)_asm := $(shell find $(ver) -iname '*.asm')) \ - $(eval $(ver)_obj := $($(ver)_asm:.asm=.o)) \ - $(eval all_obj += $($(ver)_obj)) \ -) -$(foreach obj, $(all_obj), \ - $(eval $(obj:.o=)_dep := $(shell $(includes) $(obj:.o=.asm))) \ -) +all: $(roms) +red: pokered.gbc +blue: pokeblue.gbc +# For contributors to make sure a change didn't affect the contents of the rom. +compare: red blue + @$(MD5) roms.md5 -# Image files are added to a queue to reduce build time. They're converted when building parent objects. -%.png: ; -%.2bpp: %.png ; $(eval 2bppq += $<) @rm -f $@ -%.1bpp: %.png ; $(eval 1bppq += $<) @rm -f $@ -%.pic: %.2bpp ; $(eval picq += $<) @rm -f $@ +clean: + rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.sym) + find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} + -# Assemble source files into objects. -# Queue payloads are here. These are made silent since there may be hundreds of targets. -# Use rgbasm -h to use halts without nops. -$(all_obj): $$*.asm $$($$*_dep) - @$(gfx) 2bpp $(2bppq); $(eval 2bppq :=) - @$(gfx) 1bpp $(1bppq); $(eval 1bppq :=) - @$(pic) compress $(picq); $(eval picq :=) - rgbasm -h -o $@ $*.asm +%.asm: ; +%_red.o: dep = $(shell $(includes) $(@D)/$*.asm) +$(pokered_obj): %_red.o: %.asm $$(dep) + rgbasm -D _RED -h -o $@ $*.asm -# Link objects together to build a rom. +%_blue.o: dep = $(shell $(includes) $(@D)/$*.asm) +$(pokeblue_obj): %_blue.o: %.asm $$(dep) + rgbasm -D _BLUE -h -o $@ $*.asm -# Make a symfile for debugging. -link = rgblink -n poke$*.sym +pokered_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON RED" +pokeblue_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON BLUE" -poke%.gbc: $$(%_obj) - $(link) -o $@ $^ +%.gbc: $$(%_obj) + rgblink -n $*.sym -o $@ $^ rgbfix $($*_opt) $@ - -clean: - rm -f $(roms) $(all_obj) poke*.sym - find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} + +%.png: ; +%.2bpp: %.png ; @$(2bpp) $< +%.1bpp: %.png ; @$(1bpp) $< +%.pic: %.2bpp ; @$(pic) $< @@ -6,383 +6,383 @@ AUDIO_3 EQU $1f INCLUDE "constants.asm" -SECTION "Sound Effect Headers 1", ROMX, BANK[AUDIO_1] -INCLUDE "audio/headers/sfxheaders02.asm" - -SECTION "Sound Effect Headers 2", ROMX, BANK[AUDIO_2] -INCLUDE "audio/headers/sfxheaders08.asm" - -SECTION "Sound Effect Headers 3", ROMX, BANK[AUDIO_3] -INCLUDE "audio/headers/sfxheaders1f.asm" - - - -SECTION "Music Headers 1", ROMX, BANK[AUDIO_1] -INCLUDE "audio/headers/musicheaders02.asm" - -SECTION "Music Headers 2", ROMX, BANK[AUDIO_2] -INCLUDE "audio/headers/musicheaders08.asm" - -SECTION "Music Headers 3", ROMX, BANK[AUDIO_3] -INCLUDE "audio/headers/musicheaders1f.asm" - - - -SECTION "Sound Effects 1", ROMX, BANK[AUDIO_1] - -INCLUDE "audio/sfx/sfx_02_01.asm" -INCLUDE "audio/sfx/sfx_02_02.asm" -INCLUDE "audio/sfx/sfx_02_03.asm" -INCLUDE "audio/sfx/sfx_02_04.asm" -INCLUDE "audio/sfx/sfx_02_05.asm" -INCLUDE "audio/sfx/sfx_02_06.asm" -INCLUDE "audio/sfx/sfx_02_07.asm" -INCLUDE "audio/sfx/sfx_02_08.asm" -INCLUDE "audio/sfx/sfx_02_09.asm" -INCLUDE "audio/sfx/sfx_02_0a.asm" -INCLUDE "audio/sfx/sfx_02_0b.asm" -INCLUDE "audio/sfx/sfx_02_0c.asm" -INCLUDE "audio/sfx/sfx_02_0d.asm" -INCLUDE "audio/sfx/sfx_02_0e.asm" -INCLUDE "audio/sfx/sfx_02_0f.asm" -INCLUDE "audio/sfx/sfx_02_10.asm" -INCLUDE "audio/sfx/sfx_02_11.asm" -INCLUDE "audio/sfx/sfx_02_12.asm" -INCLUDE "audio/sfx/sfx_02_13.asm" - -Music2_WavePointers: INCLUDE "audio/wave_instruments.asm" - -INCLUDE "audio/sfx/sfx_02_3f.asm" -INCLUDE "audio/sfx/sfx_02_5e.asm" -INCLUDE "audio/sfx/sfx_02_56.asm" -INCLUDE "audio/sfx/sfx_02_57.asm" -INCLUDE "audio/sfx/sfx_02_58.asm" -INCLUDE "audio/sfx/sfx_02_3c.asm" -INCLUDE "audio/sfx/sfx_02_59.asm" -INCLUDE "audio/sfx/sfx_02_5a.asm" -INCLUDE "audio/sfx/sfx_02_5b.asm" -INCLUDE "audio/sfx/sfx_02_5c.asm" -INCLUDE "audio/sfx/sfx_02_40.asm" -INCLUDE "audio/sfx/sfx_02_5d.asm" -INCLUDE "audio/sfx/sfx_02_3d.asm" -INCLUDE "audio/sfx/sfx_02_43.asm" -INCLUDE "audio/sfx/sfx_02_3e.asm" -INCLUDE "audio/sfx/sfx_02_44.asm" -INCLUDE "audio/sfx/sfx_02_45.asm" -INCLUDE "audio/sfx/sfx_02_46.asm" -INCLUDE "audio/sfx/sfx_02_47.asm" -INCLUDE "audio/sfx/sfx_02_48.asm" -INCLUDE "audio/sfx/sfx_02_49.asm" -INCLUDE "audio/sfx/sfx_02_4a.asm" -INCLUDE "audio/sfx/sfx_02_4b.asm" -INCLUDE "audio/sfx/sfx_02_4c.asm" -INCLUDE "audio/sfx/sfx_02_4d.asm" -INCLUDE "audio/sfx/sfx_02_4e.asm" -INCLUDE "audio/sfx/sfx_02_4f.asm" -INCLUDE "audio/sfx/sfx_02_50.asm" -INCLUDE "audio/sfx/sfx_02_51.asm" -INCLUDE "audio/sfx/sfx_02_52.asm" -INCLUDE "audio/sfx/sfx_02_53.asm" -INCLUDE "audio/sfx/sfx_02_54.asm" -INCLUDE "audio/sfx/sfx_02_55.asm" -INCLUDE "audio/sfx/sfx_02_5f.asm" -INCLUDE "audio/sfx/sfx_02_unused.asm" -INCLUDE "audio/sfx/sfx_02_1d.asm" -INCLUDE "audio/sfx/sfx_02_37.asm" -INCLUDE "audio/sfx/sfx_02_38.asm" -INCLUDE "audio/sfx/sfx_02_25.asm" -INCLUDE "audio/sfx/sfx_02_39.asm" -INCLUDE "audio/sfx/sfx_02_17.asm" -INCLUDE "audio/sfx/sfx_02_23.asm" -INCLUDE "audio/sfx/sfx_02_24.asm" -INCLUDE "audio/sfx/sfx_02_14.asm" -INCLUDE "audio/sfx/sfx_02_22.asm" -INCLUDE "audio/sfx/sfx_02_1a.asm" -INCLUDE "audio/sfx/sfx_02_1b.asm" -INCLUDE "audio/sfx/sfx_02_19.asm" -INCLUDE "audio/sfx/sfx_02_1f.asm" -INCLUDE "audio/sfx/sfx_02_20.asm" -INCLUDE "audio/sfx/sfx_02_16.asm" -INCLUDE "audio/sfx/sfx_02_21.asm" -INCLUDE "audio/sfx/sfx_02_15.asm" -INCLUDE "audio/sfx/sfx_02_1e.asm" -INCLUDE "audio/sfx/sfx_02_1c.asm" -INCLUDE "audio/sfx/sfx_02_18.asm" -INCLUDE "audio/sfx/sfx_02_2d.asm" -INCLUDE "audio/sfx/sfx_02_2a.asm" -INCLUDE "audio/sfx/sfx_02_2f.asm" -INCLUDE "audio/sfx/sfx_02_26.asm" -INCLUDE "audio/sfx/sfx_02_27.asm" -INCLUDE "audio/sfx/sfx_02_28.asm" -INCLUDE "audio/sfx/sfx_02_32.asm" -INCLUDE "audio/sfx/sfx_02_29.asm" -INCLUDE "audio/sfx/sfx_02_2b.asm" -INCLUDE "audio/sfx/sfx_02_30.asm" -INCLUDE "audio/sfx/sfx_02_2e.asm" -INCLUDE "audio/sfx/sfx_02_31.asm" -INCLUDE "audio/sfx/sfx_02_2c.asm" -INCLUDE "audio/sfx/sfx_02_33.asm" -INCLUDE "audio/sfx/sfx_02_34.asm" -INCLUDE "audio/sfx/sfx_02_35.asm" -INCLUDE "audio/sfx/sfx_02_36.asm" - - -SECTION "Sound Effects 2", ROMX, BANK[AUDIO_2] - -INCLUDE "audio/sfx/sfx_08_01.asm" -INCLUDE "audio/sfx/sfx_08_02.asm" -INCLUDE "audio/sfx/sfx_08_03.asm" -INCLUDE "audio/sfx/sfx_08_04.asm" -INCLUDE "audio/sfx/sfx_08_05.asm" -INCLUDE "audio/sfx/sfx_08_06.asm" -INCLUDE "audio/sfx/sfx_08_07.asm" -INCLUDE "audio/sfx/sfx_08_08.asm" -INCLUDE "audio/sfx/sfx_08_09.asm" -INCLUDE "audio/sfx/sfx_08_0a.asm" -INCLUDE "audio/sfx/sfx_08_0b.asm" -INCLUDE "audio/sfx/sfx_08_0c.asm" -INCLUDE "audio/sfx/sfx_08_0d.asm" -INCLUDE "audio/sfx/sfx_08_0e.asm" -INCLUDE "audio/sfx/sfx_08_0f.asm" -INCLUDE "audio/sfx/sfx_08_10.asm" -INCLUDE "audio/sfx/sfx_08_11.asm" -INCLUDE "audio/sfx/sfx_08_12.asm" -INCLUDE "audio/sfx/sfx_08_13.asm" - -Music8_WavePointers: INCLUDE "audio/wave_instruments.asm" - -INCLUDE "audio/sfx/sfx_08_40.asm" -INCLUDE "audio/sfx/sfx_08_3f.asm" -INCLUDE "audio/sfx/sfx_08_3c.asm" -INCLUDE "audio/sfx/sfx_08_3d.asm" -INCLUDE "audio/sfx/sfx_08_3e.asm" -INCLUDE "audio/sfx/sfx_08_77.asm" -INCLUDE "audio/sfx/sfx_08_41.asm" -INCLUDE "audio/sfx/sfx_08_42.asm" -INCLUDE "audio/sfx/sfx_08_43.asm" -INCLUDE "audio/sfx/sfx_08_44.asm" -INCLUDE "audio/sfx/sfx_08_45.asm" -INCLUDE "audio/sfx/sfx_08_pokeflute_ch3.asm" -INCLUDE "audio/sfx/sfx_08_47.asm" -INCLUDE "audio/sfx/sfx_08_48.asm" -INCLUDE "audio/sfx/sfx_08_49.asm" -INCLUDE "audio/sfx/sfx_08_4a.asm" -INCLUDE "audio/sfx/sfx_08_4b.asm" -INCLUDE "audio/sfx/sfx_08_4c.asm" -INCLUDE "audio/sfx/sfx_08_4d.asm" -INCLUDE "audio/sfx/sfx_08_4e.asm" -INCLUDE "audio/sfx/sfx_08_4f.asm" -INCLUDE "audio/sfx/sfx_08_50.asm" -INCLUDE "audio/sfx/sfx_08_51.asm" -INCLUDE "audio/sfx/sfx_08_52.asm" -INCLUDE "audio/sfx/sfx_08_53.asm" -INCLUDE "audio/sfx/sfx_08_54.asm" -INCLUDE "audio/sfx/sfx_08_55.asm" -INCLUDE "audio/sfx/sfx_08_56.asm" -INCLUDE "audio/sfx/sfx_08_57.asm" -INCLUDE "audio/sfx/sfx_08_58.asm" -INCLUDE "audio/sfx/sfx_08_59.asm" -INCLUDE "audio/sfx/sfx_08_5a.asm" -INCLUDE "audio/sfx/sfx_08_5b.asm" -INCLUDE "audio/sfx/sfx_08_5c.asm" -INCLUDE "audio/sfx/sfx_08_5d.asm" -INCLUDE "audio/sfx/sfx_08_5e.asm" -INCLUDE "audio/sfx/sfx_08_5f.asm" -INCLUDE "audio/sfx/sfx_08_60.asm" -INCLUDE "audio/sfx/sfx_08_61.asm" -INCLUDE "audio/sfx/sfx_08_62.asm" -INCLUDE "audio/sfx/sfx_08_63.asm" -INCLUDE "audio/sfx/sfx_08_64.asm" -INCLUDE "audio/sfx/sfx_08_65.asm" -INCLUDE "audio/sfx/sfx_08_66.asm" -INCLUDE "audio/sfx/sfx_08_67.asm" -INCLUDE "audio/sfx/sfx_08_68.asm" -INCLUDE "audio/sfx/sfx_08_69.asm" -INCLUDE "audio/sfx/sfx_08_6a.asm" -INCLUDE "audio/sfx/sfx_08_6b.asm" -INCLUDE "audio/sfx/sfx_08_6c.asm" -INCLUDE "audio/sfx/sfx_08_6d.asm" -INCLUDE "audio/sfx/sfx_08_6e.asm" -INCLUDE "audio/sfx/sfx_08_6f.asm" -INCLUDE "audio/sfx/sfx_08_70.asm" -INCLUDE "audio/sfx/sfx_08_71.asm" -INCLUDE "audio/sfx/sfx_08_72.asm" -INCLUDE "audio/sfx/sfx_08_73.asm" -INCLUDE "audio/sfx/sfx_08_74.asm" -INCLUDE "audio/sfx/sfx_08_75.asm" -INCLUDE "audio/sfx/sfx_08_76.asm" -INCLUDE "audio/sfx/sfx_08_unused.asm" -INCLUDE "audio/sfx/sfx_08_1d.asm" -INCLUDE "audio/sfx/sfx_08_37.asm" -INCLUDE "audio/sfx/sfx_08_38.asm" -INCLUDE "audio/sfx/sfx_08_25.asm" -INCLUDE "audio/sfx/sfx_08_39.asm" -INCLUDE "audio/sfx/sfx_08_17.asm" -INCLUDE "audio/sfx/sfx_08_23.asm" -INCLUDE "audio/sfx/sfx_08_24.asm" -INCLUDE "audio/sfx/sfx_08_14.asm" -INCLUDE "audio/sfx/sfx_08_22.asm" -INCLUDE "audio/sfx/sfx_08_1a.asm" -INCLUDE "audio/sfx/sfx_08_1b.asm" -INCLUDE "audio/sfx/sfx_08_19.asm" -INCLUDE "audio/sfx/sfx_08_1f.asm" -INCLUDE "audio/sfx/sfx_08_20.asm" -INCLUDE "audio/sfx/sfx_08_16.asm" -INCLUDE "audio/sfx/sfx_08_21.asm" -INCLUDE "audio/sfx/sfx_08_15.asm" -INCLUDE "audio/sfx/sfx_08_1e.asm" -INCLUDE "audio/sfx/sfx_08_1c.asm" -INCLUDE "audio/sfx/sfx_08_18.asm" -INCLUDE "audio/sfx/sfx_08_2d.asm" -INCLUDE "audio/sfx/sfx_08_2a.asm" -INCLUDE "audio/sfx/sfx_08_2f.asm" -INCLUDE "audio/sfx/sfx_08_26.asm" -INCLUDE "audio/sfx/sfx_08_27.asm" -INCLUDE "audio/sfx/sfx_08_28.asm" -INCLUDE "audio/sfx/sfx_08_32.asm" -INCLUDE "audio/sfx/sfx_08_29.asm" -INCLUDE "audio/sfx/sfx_08_2b.asm" -INCLUDE "audio/sfx/sfx_08_30.asm" -INCLUDE "audio/sfx/sfx_08_2e.asm" -INCLUDE "audio/sfx/sfx_08_31.asm" -INCLUDE "audio/sfx/sfx_08_2c.asm" -INCLUDE "audio/sfx/sfx_08_33.asm" -INCLUDE "audio/sfx/sfx_08_34.asm" -INCLUDE "audio/sfx/sfx_08_35.asm" -INCLUDE "audio/sfx/sfx_08_36.asm" - - -SECTION "Sound Effects 3", ROMX, BANK[AUDIO_3] - -INCLUDE "audio/sfx/sfx_1f_01.asm" -INCLUDE "audio/sfx/sfx_1f_02.asm" -INCLUDE "audio/sfx/sfx_1f_03.asm" -INCLUDE "audio/sfx/sfx_1f_04.asm" -INCLUDE "audio/sfx/sfx_1f_05.asm" -INCLUDE "audio/sfx/sfx_1f_06.asm" -INCLUDE "audio/sfx/sfx_1f_07.asm" -INCLUDE "audio/sfx/sfx_1f_08.asm" -INCLUDE "audio/sfx/sfx_1f_09.asm" -INCLUDE "audio/sfx/sfx_1f_0a.asm" -INCLUDE "audio/sfx/sfx_1f_0b.asm" -INCLUDE "audio/sfx/sfx_1f_0c.asm" -INCLUDE "audio/sfx/sfx_1f_0d.asm" -INCLUDE "audio/sfx/sfx_1f_0e.asm" -INCLUDE "audio/sfx/sfx_1f_0f.asm" -INCLUDE "audio/sfx/sfx_1f_10.asm" -INCLUDE "audio/sfx/sfx_1f_11.asm" -INCLUDE "audio/sfx/sfx_1f_12.asm" -INCLUDE "audio/sfx/sfx_1f_13.asm" - -Music1f_WavePointers: INCLUDE "audio/wave_instruments.asm" - -INCLUDE "audio/sfx/sfx_1f_3f.asm" -INCLUDE "audio/sfx/sfx_1f_56.asm" -INCLUDE "audio/sfx/sfx_1f_57.asm" -INCLUDE "audio/sfx/sfx_1f_58.asm" -INCLUDE "audio/sfx/sfx_1f_3c.asm" -INCLUDE "audio/sfx/sfx_1f_59.asm" -INCLUDE "audio/sfx/sfx_1f_5a.asm" -INCLUDE "audio/sfx/sfx_1f_5b.asm" -INCLUDE "audio/sfx/sfx_1f_5c.asm" -INCLUDE "audio/sfx/sfx_1f_40.asm" -INCLUDE "audio/sfx/sfx_1f_5d.asm" -INCLUDE "audio/sfx/sfx_1f_3d.asm" -INCLUDE "audio/sfx/sfx_1f_43.asm" -INCLUDE "audio/sfx/sfx_1f_3e.asm" -INCLUDE "audio/sfx/sfx_1f_44.asm" -INCLUDE "audio/sfx/sfx_1f_45.asm" -INCLUDE "audio/sfx/sfx_1f_46.asm" -INCLUDE "audio/sfx/sfx_1f_47.asm" -INCLUDE "audio/sfx/sfx_1f_48.asm" -INCLUDE "audio/sfx/sfx_1f_49.asm" -INCLUDE "audio/sfx/sfx_1f_4a.asm" -INCLUDE "audio/sfx/sfx_1f_4b.asm" -INCLUDE "audio/sfx/sfx_1f_4c.asm" -INCLUDE "audio/sfx/sfx_1f_4d.asm" -INCLUDE "audio/sfx/sfx_1f_4e.asm" -INCLUDE "audio/sfx/sfx_1f_4f.asm" -INCLUDE "audio/sfx/sfx_1f_50.asm" -INCLUDE "audio/sfx/sfx_1f_51.asm" -INCLUDE "audio/sfx/sfx_1f_52.asm" -INCLUDE "audio/sfx/sfx_1f_53.asm" -INCLUDE "audio/sfx/sfx_1f_54.asm" -INCLUDE "audio/sfx/sfx_1f_55.asm" -INCLUDE "audio/sfx/sfx_1f_5e.asm" -INCLUDE "audio/sfx/sfx_1f_5f.asm" -INCLUDE "audio/sfx/sfx_1f_60.asm" -INCLUDE "audio/sfx/sfx_1f_61.asm" -INCLUDE "audio/sfx/sfx_1f_62.asm" -INCLUDE "audio/sfx/sfx_1f_63.asm" -INCLUDE "audio/sfx/sfx_1f_64.asm" -INCLUDE "audio/sfx/sfx_1f_65.asm" -INCLUDE "audio/sfx/sfx_1f_66.asm" -INCLUDE "audio/sfx/sfx_1f_67.asm" -INCLUDE "audio/sfx/sfx_1f_unused.asm" -INCLUDE "audio/sfx/sfx_1f_1d.asm" -INCLUDE "audio/sfx/sfx_1f_37.asm" -INCLUDE "audio/sfx/sfx_1f_38.asm" -INCLUDE "audio/sfx/sfx_1f_25.asm" -INCLUDE "audio/sfx/sfx_1f_39.asm" -INCLUDE "audio/sfx/sfx_1f_17.asm" -INCLUDE "audio/sfx/sfx_1f_23.asm" -INCLUDE "audio/sfx/sfx_1f_24.asm" -INCLUDE "audio/sfx/sfx_1f_14.asm" -INCLUDE "audio/sfx/sfx_1f_22.asm" -INCLUDE "audio/sfx/sfx_1f_1a.asm" -INCLUDE "audio/sfx/sfx_1f_1b.asm" -INCLUDE "audio/sfx/sfx_1f_19.asm" -INCLUDE "audio/sfx/sfx_1f_1f.asm" -INCLUDE "audio/sfx/sfx_1f_20.asm" -INCLUDE "audio/sfx/sfx_1f_16.asm" -INCLUDE "audio/sfx/sfx_1f_21.asm" -INCLUDE "audio/sfx/sfx_1f_15.asm" -INCLUDE "audio/sfx/sfx_1f_1e.asm" -INCLUDE "audio/sfx/sfx_1f_1c.asm" -INCLUDE "audio/sfx/sfx_1f_18.asm" -INCLUDE "audio/sfx/sfx_1f_2d.asm" -INCLUDE "audio/sfx/sfx_1f_2a.asm" -INCLUDE "audio/sfx/sfx_1f_2f.asm" -INCLUDE "audio/sfx/sfx_1f_26.asm" -INCLUDE "audio/sfx/sfx_1f_27.asm" -INCLUDE "audio/sfx/sfx_1f_28.asm" -INCLUDE "audio/sfx/sfx_1f_32.asm" -INCLUDE "audio/sfx/sfx_1f_29.asm" -INCLUDE "audio/sfx/sfx_1f_2b.asm" -INCLUDE "audio/sfx/sfx_1f_30.asm" -INCLUDE "audio/sfx/sfx_1f_2e.asm" -INCLUDE "audio/sfx/sfx_1f_31.asm" -INCLUDE "audio/sfx/sfx_1f_2c.asm" -INCLUDE "audio/sfx/sfx_1f_33.asm" -INCLUDE "audio/sfx/sfx_1f_34.asm" -INCLUDE "audio/sfx/sfx_1f_35.asm" -INCLUDE "audio/sfx/sfx_1f_36.asm" - - - -SECTION "Audio Engine 1", ROMX, BANK[AUDIO_1] - -PlayBattleMusic:: ; 0x90c6 +SECTION "Sound Effect Headers 1", ROMX[$4000], BANK[AUDIO_1] +INCLUDE "audio/headers/sfxheaders1.asm" + +SECTION "Sound Effect Headers 2", ROMX[$4000], BANK[AUDIO_2] +INCLUDE "audio/headers/sfxheaders2.asm" + +SECTION "Sound Effect Headers 3", ROMX[$4000], BANK[AUDIO_3] +INCLUDE "audio/headers/sfxheaders3.asm" + + + +SECTION "Music Headers 1", ROMX[$422E], BANK[AUDIO_1] +INCLUDE "audio/headers/musicheaders1.asm" + +SECTION "Music Headers 2", ROMX[$42BE], BANK[AUDIO_2] +INCLUDE "audio/headers/musicheaders2.asm" + +SECTION "Music Headers 3", ROMX[$4249], BANK[AUDIO_3] +INCLUDE "audio/headers/musicheaders3.asm" + + + +SECTION "Sound Effects 1", ROMX[$42FD], BANK[AUDIO_1] + +INCLUDE "audio/sfx/snare1_1.asm" +INCLUDE "audio/sfx/snare2_1.asm" +INCLUDE "audio/sfx/snare3_1.asm" +INCLUDE "audio/sfx/snare4_1.asm" +INCLUDE "audio/sfx/snare5_1.asm" +INCLUDE "audio/sfx/triangle1_1.asm" +INCLUDE "audio/sfx/triangle2_1.asm" +INCLUDE "audio/sfx/snare6_1.asm" +INCLUDE "audio/sfx/snare7_1.asm" +INCLUDE "audio/sfx/snare8_1.asm" +INCLUDE "audio/sfx/snare9_1.asm" +INCLUDE "audio/sfx/cymbal1_1.asm" +INCLUDE "audio/sfx/cymbal2_1.asm" +INCLUDE "audio/sfx/cymbal3_1.asm" +INCLUDE "audio/sfx/muted_snare1_1.asm" +INCLUDE "audio/sfx/triangle3_1.asm" +INCLUDE "audio/sfx/muted_snare2_1.asm" +INCLUDE "audio/sfx/muted_snare3_1.asm" +INCLUDE "audio/sfx/muted_snare4_1.asm" + +Audio1_WavePointers: INCLUDE "audio/wave_instruments.asm" + +INCLUDE "audio/sfx/start_menu_1.asm" +INCLUDE "audio/sfx/pokeflute.asm" +INCLUDE "audio/sfx/cut_1.asm" +INCLUDE "audio/sfx/go_inside_1.asm" +INCLUDE "audio/sfx/swap_1.asm" +INCLUDE "audio/sfx/tink_1.asm" +INCLUDE "audio/sfx/59_1.asm" +INCLUDE "audio/sfx/purchase_1.asm" +INCLUDE "audio/sfx/collision_1.asm" +INCLUDE "audio/sfx/go_outside_1.asm" +INCLUDE "audio/sfx/press_ab_1.asm" +INCLUDE "audio/sfx/save_1.asm" +INCLUDE "audio/sfx/heal_hp_1.asm" +INCLUDE "audio/sfx/poisoned_1.asm" +INCLUDE "audio/sfx/heal_ailment_1.asm" +INCLUDE "audio/sfx/trade_machine_1.asm" +INCLUDE "audio/sfx/turn_on_pc_1.asm" +INCLUDE "audio/sfx/turn_off_pc_1.asm" +INCLUDE "audio/sfx/enter_pc_1.asm" +INCLUDE "audio/sfx/shrink_1.asm" +INCLUDE "audio/sfx/switch_1.asm" +INCLUDE "audio/sfx/healing_machine_1.asm" +INCLUDE "audio/sfx/teleport_exit1_1.asm" +INCLUDE "audio/sfx/teleport_enter1_1.asm" +INCLUDE "audio/sfx/teleport_exit2_1.asm" +INCLUDE "audio/sfx/ledge_1.asm" +INCLUDE "audio/sfx/teleport_enter2_1.asm" +INCLUDE "audio/sfx/fly_1.asm" +INCLUDE "audio/sfx/denied_1.asm" +INCLUDE "audio/sfx/arrow_tiles_1.asm" +INCLUDE "audio/sfx/push_boulder_1.asm" +INCLUDE "audio/sfx/ss_anne_horn_1.asm" +INCLUDE "audio/sfx/withdraw_deposit_1.asm" +INCLUDE "audio/sfx/safari_zone_pa.asm" +INCLUDE "audio/sfx/unused_1.asm" +INCLUDE "audio/sfx/cry09_1.asm" +INCLUDE "audio/sfx/cry23_1.asm" +INCLUDE "audio/sfx/cry24_1.asm" +INCLUDE "audio/sfx/cry11_1.asm" +INCLUDE "audio/sfx/cry25_1.asm" +INCLUDE "audio/sfx/cry03_1.asm" +INCLUDE "audio/sfx/cry0f_1.asm" +INCLUDE "audio/sfx/cry10_1.asm" +INCLUDE "audio/sfx/cry00_1.asm" +INCLUDE "audio/sfx/cry0e_1.asm" +INCLUDE "audio/sfx/cry06_1.asm" +INCLUDE "audio/sfx/cry07_1.asm" +INCLUDE "audio/sfx/cry05_1.asm" +INCLUDE "audio/sfx/cry0b_1.asm" +INCLUDE "audio/sfx/cry0c_1.asm" +INCLUDE "audio/sfx/cry02_1.asm" +INCLUDE "audio/sfx/cry0d_1.asm" +INCLUDE "audio/sfx/cry01_1.asm" +INCLUDE "audio/sfx/cry0a_1.asm" +INCLUDE "audio/sfx/cry08_1.asm" +INCLUDE "audio/sfx/cry04_1.asm" +INCLUDE "audio/sfx/cry19_1.asm" +INCLUDE "audio/sfx/cry16_1.asm" +INCLUDE "audio/sfx/cry1b_1.asm" +INCLUDE "audio/sfx/cry12_1.asm" +INCLUDE "audio/sfx/cry13_1.asm" +INCLUDE "audio/sfx/cry14_1.asm" +INCLUDE "audio/sfx/cry1e_1.asm" +INCLUDE "audio/sfx/cry15_1.asm" +INCLUDE "audio/sfx/cry17_1.asm" +INCLUDE "audio/sfx/cry1c_1.asm" +INCLUDE "audio/sfx/cry1a_1.asm" +INCLUDE "audio/sfx/cry1d_1.asm" +INCLUDE "audio/sfx/cry18_1.asm" +INCLUDE "audio/sfx/cry1f_1.asm" +INCLUDE "audio/sfx/cry20_1.asm" +INCLUDE "audio/sfx/cry21_1.asm" +INCLUDE "audio/sfx/cry22_1.asm" + + +SECTION "Sound Effects 2", ROMX[$42FD], BANK[AUDIO_2] + +INCLUDE "audio/sfx/snare1_2.asm" +INCLUDE "audio/sfx/snare2_2.asm" +INCLUDE "audio/sfx/snare3_2.asm" +INCLUDE "audio/sfx/snare4_2.asm" +INCLUDE "audio/sfx/snare5_2.asm" +INCLUDE "audio/sfx/triangle1_2.asm" +INCLUDE "audio/sfx/triangle2_2.asm" +INCLUDE "audio/sfx/snare6_2.asm" +INCLUDE "audio/sfx/snare7_2.asm" +INCLUDE "audio/sfx/snare8_2.asm" +INCLUDE "audio/sfx/snare9_2.asm" +INCLUDE "audio/sfx/cymbal1_2.asm" +INCLUDE "audio/sfx/cymbal2_2.asm" +INCLUDE "audio/sfx/cymbal3_2.asm" +INCLUDE "audio/sfx/muted_snare1_2.asm" +INCLUDE "audio/sfx/triangle3_2.asm" +INCLUDE "audio/sfx/muted_snare2_2.asm" +INCLUDE "audio/sfx/muted_snare3_2.asm" +INCLUDE "audio/sfx/muted_snare4_2.asm" + +Audio2_WavePointers: INCLUDE "audio/wave_instruments.asm" + +INCLUDE "audio/sfx/press_ab_2.asm" +INCLUDE "audio/sfx/start_menu_2.asm" +INCLUDE "audio/sfx/tink_2.asm" +INCLUDE "audio/sfx/heal_hp_2.asm" +INCLUDE "audio/sfx/heal_ailment_2.asm" +INCLUDE "audio/sfx/silph_scope.asm" +INCLUDE "audio/sfx/ball_toss.asm" +INCLUDE "audio/sfx/ball_poof.asm" +INCLUDE "audio/sfx/faint_thud.asm" +INCLUDE "audio/sfx/run.asm" +INCLUDE "audio/sfx/dex_page_added.asm" +INCLUDE "audio/sfx/pokeflute_ch6.asm" +INCLUDE "audio/sfx/peck.asm" +INCLUDE "audio/sfx/faint_fall.asm" +INCLUDE "audio/sfx/battle_09.asm" +INCLUDE "audio/sfx/pound.asm" +INCLUDE "audio/sfx/battle_0b.asm" +INCLUDE "audio/sfx/battle_0c.asm" +INCLUDE "audio/sfx/battle_0d.asm" +INCLUDE "audio/sfx/battle_0e.asm" +INCLUDE "audio/sfx/battle_0f.asm" +INCLUDE "audio/sfx/damage.asm" +INCLUDE "audio/sfx/not_very_effective.asm" +INCLUDE "audio/sfx/battle_12.asm" +INCLUDE "audio/sfx/battle_13.asm" +INCLUDE "audio/sfx/battle_14.asm" +INCLUDE "audio/sfx/vine_whip.asm" +INCLUDE "audio/sfx/battle_16.asm" +INCLUDE "audio/sfx/battle_17.asm" +INCLUDE "audio/sfx/battle_18.asm" +INCLUDE "audio/sfx/battle_19.asm" +INCLUDE "audio/sfx/super_effective.asm" +INCLUDE "audio/sfx/battle_1b.asm" +INCLUDE "audio/sfx/battle_1c.asm" +INCLUDE "audio/sfx/doubleslap.asm" +INCLUDE "audio/sfx/battle_1e.asm" +INCLUDE "audio/sfx/horn_drill.asm" +INCLUDE "audio/sfx/battle_20.asm" +INCLUDE "audio/sfx/battle_21.asm" +INCLUDE "audio/sfx/battle_22.asm" +INCLUDE "audio/sfx/battle_23.asm" +INCLUDE "audio/sfx/battle_24.asm" +INCLUDE "audio/sfx/battle_25.asm" +INCLUDE "audio/sfx/battle_26.asm" +INCLUDE "audio/sfx/battle_27.asm" +INCLUDE "audio/sfx/battle_28.asm" +INCLUDE "audio/sfx/battle_29.asm" +INCLUDE "audio/sfx/battle_2a.asm" +INCLUDE "audio/sfx/battle_2b.asm" +INCLUDE "audio/sfx/battle_2c.asm" +INCLUDE "audio/sfx/psybeam.asm" +INCLUDE "audio/sfx/battle_2e.asm" +INCLUDE "audio/sfx/battle_2f.asm" +INCLUDE "audio/sfx/psychic_m.asm" +INCLUDE "audio/sfx/battle_31.asm" +INCLUDE "audio/sfx/battle_32.asm" +INCLUDE "audio/sfx/battle_33.asm" +INCLUDE "audio/sfx/battle_34.asm" +INCLUDE "audio/sfx/battle_35.asm" +INCLUDE "audio/sfx/battle_36.asm" +INCLUDE "audio/sfx/unused_2.asm" +INCLUDE "audio/sfx/cry09_2.asm" +INCLUDE "audio/sfx/cry23_2.asm" +INCLUDE "audio/sfx/cry24_2.asm" +INCLUDE "audio/sfx/cry11_2.asm" +INCLUDE "audio/sfx/cry25_2.asm" +INCLUDE "audio/sfx/cry03_2.asm" +INCLUDE "audio/sfx/cry0f_2.asm" +INCLUDE "audio/sfx/cry10_2.asm" +INCLUDE "audio/sfx/cry00_2.asm" +INCLUDE "audio/sfx/cry0e_2.asm" +INCLUDE "audio/sfx/cry06_2.asm" +INCLUDE "audio/sfx/cry07_2.asm" +INCLUDE "audio/sfx/cry05_2.asm" +INCLUDE "audio/sfx/cry0b_2.asm" +INCLUDE "audio/sfx/cry0c_2.asm" +INCLUDE "audio/sfx/cry02_2.asm" +INCLUDE "audio/sfx/cry0d_2.asm" +INCLUDE "audio/sfx/cry01_2.asm" +INCLUDE "audio/sfx/cry0a_2.asm" +INCLUDE "audio/sfx/cry08_2.asm" +INCLUDE "audio/sfx/cry04_2.asm" +INCLUDE "audio/sfx/cry19_2.asm" +INCLUDE "audio/sfx/cry16_2.asm" +INCLUDE "audio/sfx/cry1b_2.asm" +INCLUDE "audio/sfx/cry12_2.asm" +INCLUDE "audio/sfx/cry13_2.asm" +INCLUDE "audio/sfx/cry14_2.asm" +INCLUDE "audio/sfx/cry1e_2.asm" +INCLUDE "audio/sfx/cry15_2.asm" +INCLUDE "audio/sfx/cry17_2.asm" +INCLUDE "audio/sfx/cry1c_2.asm" +INCLUDE "audio/sfx/cry1a_2.asm" +INCLUDE "audio/sfx/cry1d_2.asm" +INCLUDE "audio/sfx/cry18_2.asm" +INCLUDE "audio/sfx/cry1f_2.asm" +INCLUDE "audio/sfx/cry20_2.asm" +INCLUDE "audio/sfx/cry21_2.asm" +INCLUDE "audio/sfx/cry22_2.asm" + + +SECTION "Sound Effects 3", ROMX[$42FD], BANK[AUDIO_3] + +INCLUDE "audio/sfx/snare1_3.asm" +INCLUDE "audio/sfx/snare2_3.asm" +INCLUDE "audio/sfx/snare3_3.asm" +INCLUDE "audio/sfx/snare4_3.asm" +INCLUDE "audio/sfx/snare5_3.asm" +INCLUDE "audio/sfx/triangle1_3.asm" +INCLUDE "audio/sfx/triangle2_3.asm" +INCLUDE "audio/sfx/snare6_3.asm" +INCLUDE "audio/sfx/snare7_3.asm" +INCLUDE "audio/sfx/snare8_3.asm" +INCLUDE "audio/sfx/snare9_3.asm" +INCLUDE "audio/sfx/cymbal1_3.asm" +INCLUDE "audio/sfx/cymbal2_3.asm" +INCLUDE "audio/sfx/cymbal3_3.asm" +INCLUDE "audio/sfx/muted_snare1_3.asm" +INCLUDE "audio/sfx/triangle3_3.asm" +INCLUDE "audio/sfx/muted_snare2_3.asm" +INCLUDE "audio/sfx/muted_snare3_3.asm" +INCLUDE "audio/sfx/muted_snare4_3.asm" + +Audio3_WavePointers: INCLUDE "audio/wave_instruments.asm" + +INCLUDE "audio/sfx/start_menu_3.asm" +INCLUDE "audio/sfx/cut_3.asm" +INCLUDE "audio/sfx/go_inside_3.asm" +INCLUDE "audio/sfx/swap_3.asm" +INCLUDE "audio/sfx/tink_3.asm" +INCLUDE "audio/sfx/59_3.asm" +INCLUDE "audio/sfx/purchase_3.asm" +INCLUDE "audio/sfx/collision_3.asm" +INCLUDE "audio/sfx/go_outside_3.asm" +INCLUDE "audio/sfx/press_ab_3.asm" +INCLUDE "audio/sfx/save_3.asm" +INCLUDE "audio/sfx/heal_hp_3.asm" +INCLUDE "audio/sfx/poisoned_3.asm" +INCLUDE "audio/sfx/heal_ailment_3.asm" +INCLUDE "audio/sfx/trade_machine_3.asm" +INCLUDE "audio/sfx/turn_on_pc_3.asm" +INCLUDE "audio/sfx/turn_off_pc_3.asm" +INCLUDE "audio/sfx/enter_pc_3.asm" +INCLUDE "audio/sfx/shrink_3.asm" +INCLUDE "audio/sfx/switch_3.asm" +INCLUDE "audio/sfx/healing_machine_3.asm" +INCLUDE "audio/sfx/teleport_exit1_3.asm" +INCLUDE "audio/sfx/teleport_enter1_3.asm" +INCLUDE "audio/sfx/teleport_exit2_3.asm" +INCLUDE "audio/sfx/ledge_3.asm" +INCLUDE "audio/sfx/teleport_enter2_3.asm" +INCLUDE "audio/sfx/fly_3.asm" +INCLUDE "audio/sfx/denied_3.asm" +INCLUDE "audio/sfx/arrow_tiles_3.asm" +INCLUDE "audio/sfx/push_boulder_3.asm" +INCLUDE "audio/sfx/ss_anne_horn_3.asm" +INCLUDE "audio/sfx/withdraw_deposit_3.asm" +INCLUDE "audio/sfx/intro_lunge.asm" +INCLUDE "audio/sfx/intro_hip.asm" +INCLUDE "audio/sfx/intro_hop.asm" +INCLUDE "audio/sfx/intro_raise.asm" +INCLUDE "audio/sfx/intro_crash.asm" +INCLUDE "audio/sfx/intro_whoosh.asm" +INCLUDE "audio/sfx/slots_stop_wheel.asm" +INCLUDE "audio/sfx/slots_reward.asm" +INCLUDE "audio/sfx/slots_new_spin.asm" +INCLUDE "audio/sfx/shooting_star.asm" +INCLUDE "audio/sfx/unused_3.asm" +INCLUDE "audio/sfx/cry09_3.asm" +INCLUDE "audio/sfx/cry23_3.asm" +INCLUDE "audio/sfx/cry24_3.asm" +INCLUDE "audio/sfx/cry11_3.asm" +INCLUDE "audio/sfx/cry25_3.asm" +INCLUDE "audio/sfx/cry03_3.asm" +INCLUDE "audio/sfx/cry0f_3.asm" +INCLUDE "audio/sfx/cry10_3.asm" +INCLUDE "audio/sfx/cry00_3.asm" +INCLUDE "audio/sfx/cry0e_3.asm" +INCLUDE "audio/sfx/cry06_3.asm" +INCLUDE "audio/sfx/cry07_3.asm" +INCLUDE "audio/sfx/cry05_3.asm" +INCLUDE "audio/sfx/cry0b_3.asm" +INCLUDE "audio/sfx/cry0c_3.asm" +INCLUDE "audio/sfx/cry02_3.asm" +INCLUDE "audio/sfx/cry0d_3.asm" +INCLUDE "audio/sfx/cry01_3.asm" +INCLUDE "audio/sfx/cry0a_3.asm" +INCLUDE "audio/sfx/cry08_3.asm" +INCLUDE "audio/sfx/cry04_3.asm" +INCLUDE "audio/sfx/cry19_3.asm" +INCLUDE "audio/sfx/cry16_3.asm" +INCLUDE "audio/sfx/cry1b_3.asm" +INCLUDE "audio/sfx/cry12_3.asm" +INCLUDE "audio/sfx/cry13_3.asm" +INCLUDE "audio/sfx/cry14_3.asm" +INCLUDE "audio/sfx/cry1e_3.asm" +INCLUDE "audio/sfx/cry15_3.asm" +INCLUDE "audio/sfx/cry17_3.asm" +INCLUDE "audio/sfx/cry1c_3.asm" +INCLUDE "audio/sfx/cry1a_3.asm" +INCLUDE "audio/sfx/cry1d_3.asm" +INCLUDE "audio/sfx/cry18_3.asm" +INCLUDE "audio/sfx/cry1f_3.asm" +INCLUDE "audio/sfx/cry20_3.asm" +INCLUDE "audio/sfx/cry21_3.asm" +INCLUDE "audio/sfx/cry22_3.asm" + + + +SECTION "Audio Engine 1", ROMX[$50C6], BANK[AUDIO_1] + +PlayBattleMusic:: xor a - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a ld [wLowHealthAlarm], a dec a - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ; stop music call DelayFrame ld c, BANK(Music_GymLeaderBattle) - ld a, [W_GYMLEADERNO] + ld a, [wGymLeaderNo] and a jr z, .notGymLeaderBattle ld a, MUSIC_GYM_LEADER_BATTLE jr .playSong .notGymLeaderBattle - ld a, [W_CUROPPONENT] - cp $c8 + ld a, [wCurOpponent] + cp 200 jr c, .wildBattle - cp SONY3 + $c8 + cp OPP_SONY3 jr z, .finalBattle - cp LANCE + $c8 + cp OPP_LANCE jr nz, .normalTrainerBattle ld a, MUSIC_GYM_LEADER_BATTLE ; lance also plays gym leader theme jr .playSong @@ -402,18 +402,18 @@ INCLUDE "audio/engine_1.asm" ; an alternate start for MeetRival which has a different first measure -Music_RivalAlternateStart:: ; 0x9b47 +Music_RivalAlternateStart:: ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic - ld hl, wc006 + ld hl, wChannelCommandPointers ld de, Music_MeetRival_branch_b1a2 - call Music2_OverwriteChannelPointer + call Audio1_OverwriteChannelPointer ld de, Music_MeetRival_branch_b21d - call Music2_OverwriteChannelPointer + call Audio1_OverwriteChannelPointer ld de, Music_MeetRival_branch_b2b5 -Music2_OverwriteChannelPointer: ; 0x9b60 +Audio1_OverwriteChannelPointer: ld a, e ld [hli], a ld a, d @@ -421,41 +421,41 @@ Music2_OverwriteChannelPointer: ; 0x9b60 ret ; an alternate tempo for MeetRival which is slightly slower -Music_RivalAlternateTempo:: ; 0x9b65 +Music_RivalAlternateTempo:: ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic - ld hl, wc006 + ld hl, wChannelCommandPointers ld de, Music_MeetRival_branch_b119 - jp Music2_OverwriteChannelPointer + jp Audio1_OverwriteChannelPointer ; applies both the alternate start and alternate tempo -Music_RivalAlternateStartAndTempo:: ; 0x9b75 +Music_RivalAlternateStartAndTempo:: call Music_RivalAlternateStart - ld hl, wc006 + ld hl, wChannelCommandPointers ld de, Music_MeetRival_branch_b19b - jp Music2_OverwriteChannelPointer + jp Audio1_OverwriteChannelPointer ; an alternate tempo for Cities1 which is used for the Hall of Fame room -Music_Cities1AlternateTempo:: ; 0x9b81 - ld a, $a - ld [wcfc8], a - ld [wcfc9], a - ld a, $ff - ld [wMusicHeaderPointer], a - ld c, $64 - call DelayFrames +Music_Cities1AlternateTempo:: + ld a, 10 + ld [wAudioFadeOutCounterReloadValue], a + ld [wAudioFadeOutCounter], a + ld a, $ff ; stop playing music after the fade-out is finished + ld [wAudioFadeOutControl], a + ld c, 100 + call DelayFrames ; wait for the fade-out to finish ld c, BANK(Music_Cities1) ld a, MUSIC_CITIES1 call PlayMusic - ld hl, wc006 + ld hl, wChannelCommandPointers ld de, Music_Cities1_branch_aa6f - jp Music2_OverwriteChannelPointer + jp Audio1_OverwriteChannelPointer -SECTION "Audio Engine 2", ROMX, BANK[AUDIO_2] +SECTION "Audio Engine 2", ROMX[$536E], BANK[AUDIO_2] -Music_DoLowHealthAlarm:: ; 2136e (8:536e) +Music_DoLowHealthAlarm:: ld a, [wLowHealthAlarm] cp $ff jr z, .disableAlarm @@ -477,7 +477,7 @@ Music_DoLowHealthAlarm:: ; 2136e (8:536e) .asm_2138a ld a, $86 - ld [wc02a], a ;disable sound channel? + ld [wChannelSoundIDs + Ch4], a ;disable sound channel? ld a, [wLowHealthAlarm] and $7f ;decrement alarm timer. dec a @@ -491,7 +491,7 @@ Music_DoLowHealthAlarm:: ; 2136e (8:536e) .disableAlarm xor a ld [wLowHealthAlarm], a ;disable alarm - ld [wc02a], a ;re-enable sound channel? + ld [wChannelSoundIDs + Ch4], a ;re-enable sound channel? ld de, .toneDataSilence jr .playTone @@ -537,17 +537,19 @@ INCLUDE "engine/menu/bills_pc.asm" INCLUDE "audio/engine_2.asm" -Music_PokeFluteInBattle:: ; 22306 (8:6306) - ld a, (SFX_08_46 - SFX_Headers_08) / 3 ; PokeFlute outside of battle +Music_PokeFluteInBattle:: + ; begin playing the "caught mon" sound effect + ld a, SFX_CAUGHT_MON call PlaySoundWaitForCurrent - ld hl, wc00e - ld de, SFX_08_PokeFlute_Ch1 - call Music8_OverwriteChannelPointer - ld de, SFX_08_PokeFlute_Ch2 - call Music8_OverwriteChannelPointer - ld de, SFX_08_PokeFlute_Ch3 - -Music8_OverwriteChannelPointer: ; 2231d (8:631d) + ; then immediately overwrtie the channel pointers + ld hl, wChannelCommandPointers + Ch4 * 2 + ld de, SFX_08_PokeFlute_Ch4 + call Audio2_OverwriteChannelPointer + ld de, SFX_08_PokeFlute_Ch5 + call Audio2_OverwriteChannelPointer + ld de, SFX_08_PokeFlute_Ch6 + +Audio2_OverwriteChannelPointer: ld a, e ld [hli], a ld a, d @@ -555,9 +557,9 @@ Music8_OverwriteChannelPointer: ; 2231d (8:631d) ret -SECTION "Audio Engine 3", ROMX, BANK[AUDIO_3] +SECTION "Audio Engine 3", ROMX[$513B], BANK[AUDIO_3] -Func_7d13b:: ; 7d13b (1f:513b) +PlayPokedexRatingSfx:: ld a, [$ffdc] ld c, $0 ld hl, OwnedMonValues @@ -570,7 +572,7 @@ Func_7d13b:: ; 7d13b (1f:513b) .gotSfxPointer push bc ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySoundWaitForCurrent pop bc ld b, $0 @@ -582,16 +584,16 @@ Func_7d13b:: ; 7d13b (1f:513b) call PlayMusic jp PlayDefaultMusic -PokedexRatingSfxPointers: ; 7d162 (1f:5162) - db (SFX_1f_51 - SFX_Headers_1f) / 3, BANK(SFX_1f_51) - db (SFX_02_41 - SFX_Headers_02) / 3, BANK(SFX_02_41) - db (SFX_02_3a - SFX_Headers_02) / 3, BANK(SFX_02_3a) - db (SFX_08_46 - SFX_Headers_08) / 3, BANK(SFX_08_46) - db (SFX_08_3a - SFX_Headers_08) / 3, BANK(SFX_08_3a) - db (SFX_02_42 - SFX_Headers_02) / 3, BANK(SFX_02_42) - db (SFX_02_3b - SFX_Headers_02) / 3, BANK(SFX_02_3b) +PokedexRatingSfxPointers: + db SFX_DENIED, BANK(SFX_Denied_3) + db SFX_POKEDEX_RATING, BANK(SFX_Pokedex_Rating_1) + db SFX_GET_ITEM_1, BANK(SFX_Get_Item1_1) + db SFX_CAUGHT_MON, BANK(SFX_Caught_Mon) + db SFX_LEVEL_UP, BANK(SFX_Level_Up) + db SFX_GET_KEY_ITEM, BANK(SFX_Get_Key_Item_1) + db SFX_GET_ITEM_2, BANK(SFX_Get_Item2_1) -OwnedMonValues: ; 7d170 (1f:5170) +OwnedMonValues: db 10, 40, 60, 90, 120, 150, $ff @@ -599,7 +601,7 @@ INCLUDE "audio/engine_3.asm" -SECTION "Music 1", ROMX, BANK[AUDIO_1] +SECTION "Music 1", ROMX[$5BA3], BANK[AUDIO_1] INCLUDE "audio/music/pkmnhealed.asm" INCLUDE "audio/music/routes1.asm" @@ -610,13 +612,13 @@ INCLUDE "audio/music/indigoplateau.asm" INCLUDE "audio/music/pallettown.asm" INCLUDE "audio/music/unusedsong.asm" INCLUDE "audio/music/cities1.asm" -INCLUDE "audio/sfx/sfx_02_3a.asm" +INCLUDE "audio/sfx/get_item1_1.asm" INCLUDE "audio/music/museumguy.asm" INCLUDE "audio/music/meetprofoak.asm" INCLUDE "audio/music/meetrival.asm" -INCLUDE "audio/sfx/sfx_02_41.asm" -INCLUDE "audio/sfx/sfx_02_3b.asm" -INCLUDE "audio/sfx/sfx_02_42.asm" +INCLUDE "audio/sfx/pokedex_rating_1.asm" +INCLUDE "audio/sfx/get_item2_1.asm" +INCLUDE "audio/sfx/get_key_item_1.asm" INCLUDE "audio/music/ssanne.asm" INCLUDE "audio/music/cities2.asm" INCLUDE "audio/music/celadon.asm" @@ -628,35 +630,35 @@ INCLUDE "audio/music/gym.asm" INCLUDE "audio/music/pokecenter.asm" -SECTION "Music 2", ROMX, BANK[AUDIO_2] +SECTION "Music 2", ROMX[$6322], BANK[AUDIO_2] -INCLUDE "audio/sfx/sfx_08_pokeflute.asm" -INCLUDE "audio/sfx/sfx_08_unused2.asm" +INCLUDE "audio/sfx/pokeflute_ch4_ch5.asm" +INCLUDE "audio/sfx/unused2_2.asm" INCLUDE "audio/music/gymleaderbattle.asm" INCLUDE "audio/music/trainerbattle.asm" INCLUDE "audio/music/wildbattle.asm" INCLUDE "audio/music/finalbattle.asm" -INCLUDE "audio/sfx/sfx_08_3a.asm" -INCLUDE "audio/sfx/sfx_08_3b.asm" -INCLUDE "audio/sfx/sfx_08_46.asm" +INCLUDE "audio/sfx/level_up.asm" +INCLUDE "audio/sfx/get_item2_2.asm" +INCLUDE "audio/sfx/caught_mon.asm" INCLUDE "audio/music/defeatedtrainer.asm" INCLUDE "audio/music/defeatedwildmon.asm" INCLUDE "audio/music/defeatedgymleader.asm" -SECTION "Music 3", ROMX, BANK[AUDIO_3] +SECTION "Music 3", ROMX[$5BBB], BANK[AUDIO_3] INCLUDE "audio/music/bikeriding.asm" INCLUDE "audio/music/dungeon1.asm" INCLUDE "audio/music/gamecorner.asm" INCLUDE "audio/music/titlescreen.asm" -INCLUDE "audio/sfx/sfx_1f_3a.asm" +INCLUDE "audio/sfx/get_item1_3.asm" INCLUDE "audio/music/dungeon2.asm" INCLUDE "audio/music/dungeon3.asm" INCLUDE "audio/music/cinnabarmansion.asm" -INCLUDE "audio/sfx/sfx_1f_41.asm" -INCLUDE "audio/sfx/sfx_1f_3b.asm" -INCLUDE "audio/sfx/sfx_1f_42.asm" +INCLUDE "audio/sfx/pokedex_rating_3.asm" +INCLUDE "audio/sfx/get_item2_3.asm" +INCLUDE "audio/sfx/get_key_item_3.asm" INCLUDE "audio/music/oakslab.asm" INCLUDE "audio/music/pokemontower.asm" INCLUDE "audio/music/silphco.asm" diff --git a/audio/engine_1.asm b/audio/engine_1.asm index 8343074a..f762da29 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -1,98 +1,92 @@ ; The first of three duplicated sound engines. -Music2_UpdateMusic:: ; 0x9103 - ld c, CH0 +Audio1_UpdateMusic:: + ld c, Ch0 .loop - ld b, $0 - ld hl, wc026 + ld b, 0 + ld hl, wChannelSoundIDs add hl, bc ld a, [hl] and a jr z, .nextChannel ld a, c - cp CH4 - jr nc, .asm_912e ; if sfx channel - ld a, [wc002] + cp Ch4 + jr nc, .applyAffects ; if sfx channel + ld a, [wMuteAudioAndPauseMusic] and a - jr z, .asm_912e + jr z, .applyAffects bit 7, a jr nz, .nextChannel set 7, a - ld [wc002], a - xor a - ld [$ff25], a - ld [$ff1a], a + ld [wMuteAudioAndPauseMusic], a + xor a ; disable all channels' output + ld [rNR51], a + ld [rNR30], a ld a, $80 - ld [$ff1a], a + ld [rNR30], a jr .nextChannel -.asm_912e - call Music2_ApplyMusicAffects +.applyAffects + call Audio1_ApplyMusicAffects .nextChannel ld a, c inc c ; inc channel number - cp CH7 + cp Ch7 jr nz, .loop ret ; this routine checks flags for music effects currently applied ; to the channel and calls certain functions based on flags. -; known flags for wc02e: -; 0: toggleperfectpitch has been used -; 1: call has been used -; 3: a toggle used only by this routine for vibrato -; 4: pitchbend flag -; 6: dutycycle flag -Music2_ApplyMusicAffects: ; 0x9138 +Audio1_ApplyMusicAffects: ld b, $0 - ld hl, wc0b6 ; delay until next note + ld hl, wChannelNoteDelayCounters ; delay until next note add hl, bc ld a, [hl] cp $1 ; if the delay is 1, play next note - jp z, Music2_PlayNextNote + jp z, Audio1_PlayNextNote dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp CH4 + cp Ch4 jr nc, .startChecks ; if a sfx channel - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 add hl, bc ld a, [hl] and a jr z, .startChecks ret .startChecks - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc - bit 6, [hl] ; dutycycle + bit BIT_ROTATE_DUTY, [hl] jr z, .checkForExecuteMusic - call Music2_ApplyDutyCycle + call Audio1_ApplyDutyCycle .checkForExecuteMusic - ld b, $0 - ld hl, wc036 + ld b, 0 + ld hl, wChannelFlags2 add hl, bc - bit 0, [hl] + bit BIT_EXECUTE_MUSIC, [hl] jr nz, .checkForPitchBend - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc - bit 2, [hl] - jr nz, .disablePitchBendVibrato + bit BIT_NOISE_OR_SFX, [hl] + jr nz, .skipPitchBendVibrato .checkForPitchBend - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc - bit 4, [hl] ; pitchbend + bit BIT_PITCH_BEND_ON, [hl] jr z, .checkVibratoDelay - jp Music2_ApplyPitchBend + jp Audio1_ApplyPitchBend .checkVibratoDelay - ld hl, wc04e ; vibrato delay + ld hl, wChannelVibratoDelayCounters add hl, bc ld a, [hl] and a ; check if delay is over jr z, .checkForVibrato dec [hl] ; otherwise, dec delay -.disablePitchBendVibrato +.skipPitchBendVibrato ret .checkForVibrato - ld hl, wc056 ; vibrato rate + ld hl, wChannelVibratoExtents add hl, bc ld a, [hl] and a @@ -100,38 +94,40 @@ Music2_ApplyMusicAffects: ; 0x9138 ret ; no vibrato .vibrato ld d, a - ld hl, wc05e + ld hl, wChannelVibratoRates add hl, bc ld a, [hl] and $f and a - jr z, .vibratoAlreadyDone - dec [hl] ; apply vibrato pitch change + jr z, .applyVibrato + dec [hl] ; decrement counter ret -.vibratoAlreadyDone +.applyVibrato ld a, [hl] swap [hl] or [hl] - ld [hl], a ; reset the vibrato value and start again - ld hl, wc066 + ld [hl], a ; reload the counter + ld hl, wChannelFrequencyLowBytes add hl, bc ld e, [hl] ; get note pitch - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc - bit 3, [hl] ; this is the only code that sets/resets bit three so - jr z, .unset ; it continuously alternates which path it takes - res 3, [hl] +; This is the only code that sets/resets the vibrato direction bit, so it +; continuously alternates which path it takes. + bit BIT_VIBRATO_DIRECTION, [hl] + jr z, .unset + res BIT_VIBRATO_DIRECTION, [hl] ld a, d and $f ld d, a ld a, e sub d jr nc, .noCarry - ld a, $0 + ld a, 0 .noCarry jr .done .unset - set 3, [hl] + set BIT_VIBRATO_DIRECTION, [hl] ld a, d and $f0 swap a @@ -140,61 +136,64 @@ Music2_ApplyMusicAffects: ; 0x9138 ld a, $ff .done ld d, a - ld b, $3 - call Func_9838 + ld b, REG_FREQUENCY_LO + call Audio1_GetRegisterPointer 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 - ld hl, wc06e +Audio1_PlayNextNote: +; reload the vibrato delay counter + ld hl, wChannelVibratoDelayCounterReloadValues add hl, bc ld a, [hl] - ld hl, wc04e + ld hl, wChannelVibratoDelayCounters add hl, bc ld [hl], a - ld hl, wc02e + + ld hl, wChannelFlags1 add hl, bc - res 4, [hl] - res 5, [hl] - call Music2_endchannel + res BIT_PITCH_BEND_ON, [hl] + res BIT_PITCH_BEND_DECREASING, [hl] + call Audio1_endchannel ret -Music2_endchannel: ; 0x91e6 - call Music2_GetNextMusicByte +Audio1_endchannel: + call Audio1_GetNextMusicByte ld d, a cp $ff ; is this command an endchannel? - jp nz, Music2_callchannel ; no - ld b, $0 ; yes - ld hl, wc02e + jp nz, Audio1_callchannel ; no + ld b, 0 + ld hl, wChannelFlags1 add hl, bc - bit 1, [hl] + bit BIT_CHANNEL_CALL, [hl] jr nz, .returnFromCall ld a, c - cp CH3 + cp Ch3 jr nc, .noiseOrSfxChannel - jr .asm_923f + jr .disableChannelOutput .noiseOrSfxChannel - res 2, [hl] - ld hl, wc036 + res BIT_NOISE_OR_SFX, [hl] + ld hl, wChannelFlags2 add hl, bc - res 0, [hl] - cp CH6 - jr nz, .notSfxChannel3 + res BIT_EXECUTE_MUSIC, [hl] + cp Ch6 + jr nz, .skipSfxChannel3 +; restart hardware channel 3 (wave channel) output ld a, $0 - ld [$ff1a], a + ld [rNR30], a ld a, $80 - ld [$ff1a], a -.notSfxChannel3 + ld [rNR30], a +.skipSfxChannel3 jr nz, .asm_9222 - ld a, [wc003] + ld a, [wDisableChannelOutputWhenSfxEnds] and a jr z, .asm_9222 xor a - ld [wc003], a - jr .asm_923f + ld [wDisableChannelOutputWhenSfxEnds], a + jr .disableChannelOutput .asm_9222 jr .asm_9248 .returnFromCall @@ -203,10 +202,10 @@ Music2_endchannel: ; 0x91e6 ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de push hl ; store current channel address - ld hl, wc016 + ld hl, wChannelReturnAddresses add hl, de ld e, l ld d, h @@ -216,47 +215,47 @@ Music2_endchannel: ; 0x91e6 inc de ld a, [de] ld [hl], a ; loads channel address to return to - jp Music2_endchannel -.asm_923f - ld hl, Unknown_9b1f + jp Audio1_endchannel +.disableChannelOutput + ld hl, Audio1_HWChannelDisableMasks add hl, bc - ld a, [$ff25] + ld a, [rNR51] and [hl] - ld [$ff25], a + ld [rNR51], a .asm_9248 - ld a, [wc02a] - cp $14 + ld a, [wChannelSoundIDs + Ch4] + cp CRY_SFX_START jr nc, .asm_9251 - jr .asm_926e + jr .skipCry .asm_9251 - ld a, [wc02a] - cp $86 - jr z, .asm_926e - jr c, .asm_925c - jr .asm_926e -.asm_925c + ld a, [wChannelSoundIDs + Ch4] + cp CRY_SFX_END + jr z, .skipCry + jr c, .cry + jr .skipCry +.cry ld a, c - cp CH4 + cp Ch4 jr z, .asm_9265 - call Func_96c7 + call Audio1_GoBackOneCommandIfCry ret c .asm_9265 - ld a, [wc005] - ld [$ff24], a + ld a, [wSavedVolume] + ld [rNR50], a xor a - ld [wc005], a -.asm_926e - ld hl, wc026 + ld [wSavedVolume], a +.skipCry + ld hl, wChannelSoundIDs add hl, bc ld [hl], b ret -Music2_callchannel: ; 0x9274 +Audio1_callchannel: cp $fd ; is this command a callchannel? - jp nz, Music2_loopchannel ; no - call Music2_GetNextMusicByte ; yes + jp nz, Audio1_loopchannel ; no + call Audio1_GetNextMusicByte push af - call Music2_GetNextMusicByte + call Audio1_GetNextMusicByte ld d, a pop af ld e, a @@ -265,10 +264,10 @@ Music2_callchannel: ; 0x9274 ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de push hl - ld hl, wc016 + ld hl, wChannelReturnAddresses add hl, de ld e, l ld d, h @@ -283,77 +282,77 @@ Music2_callchannel: ; 0x9274 inc hl ld [hl], d ; overwrite current address with pointer ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc - set 1, [hl] ; set the call flag - jp Music2_endchannel + set BIT_CHANNEL_CALL, [hl] ; set the call flag + jp Audio1_endchannel -Music2_loopchannel: ; 0x92a9 +Audio1_loopchannel: cp $fe ; is this command a loopchannel? - jp nz, Music2_notetype ; no - call Music2_GetNextMusicByte ; yes + jp nz, Audio1_notetype ; no + call Audio1_GetNextMusicByte ld e, a and a jr z, .infiniteLoop - ld b, $0 - ld hl, wc0be + ld b, 0 + ld hl, wChannelLoopCounters add hl, bc ld a, [hl] cp e jr nz, .loopAgain ld a, $1 ; if no more loops to make, ld [hl], a - call Music2_GetNextMusicByte ; skip pointer - call Music2_GetNextMusicByte - jp Music2_endchannel + call Audio1_GetNextMusicByte ; skip pointer + call Audio1_GetNextMusicByte + jp Audio1_endchannel .loopAgain ; inc loop count inc a ld [hl], a ; fall through .infiniteLoop ; overwrite current address with pointer - call Music2_GetNextMusicByte + call Audio1_GetNextMusicByte push af - call Music2_GetNextMusicByte + call Audio1_GetNextMusicByte ld b, a ld d, $0 ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de pop af ld [hli], a ld [hl], b - jp Music2_endchannel + jp Audio1_endchannel -Music2_notetype: ; 0x92e4 +Audio1_notetype: and $f0 cp $d0 ; is this command a notetype? - jp nz, Music2_toggleperfectpitch ; no - ld a, d ; yes + jp nz, Audio1_toggleperfectpitch ; no + ld a, d and $f ld b, $0 - ld hl, wc0c6 + ld hl, wChannelNoteSpeeds add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp CH3 + cp Ch3 jr z, .noiseChannel ; noise channel has 0 params - call Music2_GetNextMusicByte + call Audio1_GetNextMusicByte ld d, a ld a, c - cp CH2 + cp Ch2 jr z, .musicChannel3 - cp CH6 - jr nz, .notChannel3 - ld hl, wc0e7 - jr .sfxChannel3 + cp Ch6 + jr nz, .skipChannel3 + ld hl, wSfxWaveInstrument + jr .channel3 .musicChannel3 - ld hl, wc0e6 -.sfxChannel3 + ld hl, wMusicWaveInstrument +.channel3 ld a, d and $f - ld [hl], a ; store low nibble of param as duty + ld [hl], a ; store low nibble of param as wave instrument ld a, d and $30 sla a @@ -362,273 +361,294 @@ Music2_notetype: ; 0x92e4 ; if channel 3, store high nibble as volume ; else, store volume (high nibble) and fade (low nibble) -.notChannel3 - ld b, $0 - ld hl, wc0de +.skipChannel3 + ld b, 0 + ld hl, wChannelVolumes add hl, bc ld [hl], d .noiseChannel - jp Music2_endchannel + jp Audio1_endchannel -Music2_toggleperfectpitch: ; 0x9323 +Audio1_toggleperfectpitch: ld a, d cp $e8 ; is this command a toggleperfectpitch? - jr nz, Music2_vibrato ; no - ld b, $0 ; yes - ld hl, wc02e + jr nz, Audio1_vibrato ; no + ld b, 0 + ld hl, wChannelFlags1 add hl, bc ld a, [hl] xor $1 - ld [hl], a ; flip bit 0 of wc02e - jp Music2_endchannel + ld [hl], a ; flip bit 0 of wChannelFlags1 + jp Audio1_endchannel -Music2_vibrato: ; 0x9335 +Audio1_vibrato: cp $ea ; is this command a vibrato? - jr nz, Music2_pitchbend ; no - call Music2_GetNextMusicByte ; yes - ld b, $0 - ld hl, wc04e + jr nz, Audio1_pitchbend ; no + call Audio1_GetNextMusicByte + ld b, 0 + ld hl, wChannelVibratoDelayCounters add hl, bc ld [hl], a ; store delay - ld hl, wc06e + ld hl, wChannelVibratoDelayCounterReloadValues add hl, bc ld [hl], a ; store delay - call Music2_GetNextMusicByte + call Audio1_GetNextMusicByte ld d, a + +; The high nybble of the command byte is the extent of the vibrato. +; Let n be the extent. +; The upper nybble of the channel's byte in the wChannelVibratoExtents +; array will store the extent above the note: (n / 2) + (n % 2). +; The lower nybble will store the extent below the note: (n / 2). +; These two values add to the total extent, n. and $f0 swap a - ld b, $0 - ld hl, wc056 + ld b, 0 + ld hl, wChannelVibratoExtents add hl, bc srl a ld e, a adc b swap a or e - ld [hl], a ; store rate as both high and low nibbles + ld [hl], a + +; The low nybble of the command byte is the rate of the vibrato. +; The high and low nybbles of the channel's byte in the wChannelVibratoRates +; array are both initialised to this value because the high nybble is the +; counter reload value and the low nybble is the counter itself, which should +; start at its value upon reload. ld a, d and $f ld d, a - ld hl, wc05e + ld hl, wChannelVibratoRates add hl, bc swap a or d - ld [hl], a ; store depth as both high and low nibbles - jp Music2_endchannel + ld [hl], a + + jp Audio1_endchannel -Music2_pitchbend: ; 0x936d +Audio1_pitchbend: cp $eb ; is this command a pitchbend? - jr nz, Music2_duty ; no - call Music2_GetNextMusicByte ; yes - ld b, $0 - ld hl, wc076 + jr nz, Audio1_duty ; no + call Audio1_GetNextMusicByte + ld b, 0 + ld hl, wChannelPitchBendLengthModifiers add hl, bc - ld [hl], a ; store first param - call Music2_GetNextMusicByte + ld [hl], a + call Audio1_GetNextMusicByte ld d, a and $f0 swap a ld b, a ld a, d and $f - call Func_9858 - ld b, $0 - ld hl, wc0a6 + call Audio1_CalculateFrequency + ld b, 0 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc - ld [hl], d ; store unknown part of second param - ld hl, wc0ae + ld [hl], d + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc - ld [hl], e ; store unknown part of second param - ld b, $0 - ld hl, wc02e + ld [hl], e + ld b, 0 + ld hl, wChannelFlags1 add hl, bc - set 4, [hl] ; set pitchbend flag - call Music2_GetNextMusicByte + set BIT_PITCH_BEND_ON, [hl] + call Audio1_GetNextMusicByte ld d, a - jp Music2_notelength + jp Audio1_notelength -Music2_duty: ; 0x93a5 +Audio1_duty: cp $ec ; is this command a duty? - jr nz, Music2_tempo ; no - call Music2_GetNextMusicByte ; yes + jr nz, Audio1_tempo ; no + call Audio1_GetNextMusicByte rrca rrca and $c0 - ld b, $0 - ld hl, wc03e + ld b, 0 + ld hl, wChannelDuties add hl, bc ld [hl], a ; store duty - jp Music2_endchannel + jp Audio1_endchannel -Music2_tempo: ; 0x93ba +Audio1_tempo: cp $ed ; is this command a tempo? - jr nz, Music2_stereopanning ; no - ld a, c ; yes - cp CH4 + jr nz, Audio1_stereopanning ; no + ld a, c + cp Ch4 jr nc, .sfxChannel - call Music2_GetNextMusicByte - ld [wc0e8], a ; store first param - call Music2_GetNextMusicByte - ld [wc0e9], a ; store second param + call Audio1_GetNextMusicByte + ld [wMusicTempo], a ; store first param + call Audio1_GetNextMusicByte + ld [wMusicTempo + 1], a ; store second param xor a - ld [wc0ce], a ; clear RAM - ld [wc0cf], a - ld [wc0d0], a - ld [wc0d1], a + ld [wChannelNoteDelayCountersFractionalPart], a ; clear RAM + ld [wChannelNoteDelayCountersFractionalPart + 1], a + ld [wChannelNoteDelayCountersFractionalPart + 2], a + ld [wChannelNoteDelayCountersFractionalPart + 3], a jr .musicChannelDone .sfxChannel - call Music2_GetNextMusicByte - ld [wc0ea], a ; store first param - call Music2_GetNextMusicByte - ld [wc0eb], a ; store second param + call Audio1_GetNextMusicByte + ld [wSfxTempo], a ; store first param + call Audio1_GetNextMusicByte + ld [wSfxTempo + 1], a ; store second param xor a - ld [wc0d2], a ; clear RAM - ld [wc0d3], a - ld [wc0d4], a - ld [wc0d5], a + ld [wChannelNoteDelayCountersFractionalPart + 4], a ; clear RAM + ld [wChannelNoteDelayCountersFractionalPart + 5], a + ld [wChannelNoteDelayCountersFractionalPart + 6], a + ld [wChannelNoteDelayCountersFractionalPart + 7], a .musicChannelDone - jp Music2_endchannel + jp Audio1_endchannel -Music2_stereopanning: ; 0x93fa +Audio1_stereopanning: cp $ee ; is this command a stereopanning? - jr nz, Music2_unknownmusic0xef ; no - call Music2_GetNextMusicByte ; yes - ld [wc004], a ; store panning - jp Music2_endchannel + jr nz, Audio1_unknownmusic0xef ; no + call Audio1_GetNextMusicByte + ld [wStereoPanning], a ; store panning + jp Audio1_endchannel ; this appears to never be used -Music2_unknownmusic0xef ; 0x9407 +Audio1_unknownmusic0xef: cp $ef ; is this command an unknownmusic0xef? - jr nz, Music2_dutycycle ; no - call Music2_GetNextMusicByte ; yes + jr nz, Audio1_dutycycle ; no + call Audio1_GetNextMusicByte push bc - call Func_9876 + call Audio1_PlaySound pop bc - ld a, [wc003] + ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wc02d] - ld [wc003], a + ld a, [wChannelSoundIDs + Ch7] + ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wc02d], a + ld [wChannelSoundIDs + Ch7], a .skip - jp Music2_endchannel + jp Audio1_endchannel -Music2_dutycycle: ; 0x9426 +Audio1_dutycycle: cp $fc ; is this command a dutycycle? - jr nz, Music2_volume ; no - call Music2_GetNextMusicByte ; yes - ld b, $0 - ld hl, wc046 + jr nz, Audio1_volume ; no + call Audio1_GetNextMusicByte + ld b, 0 + ld hl, wChannelDutyCycles add hl, bc ld [hl], a ; store full cycle and $c0 - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld [hl], a ; store first duty - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc - set 6, [hl] ; set dutycycle flag - jp Music2_endchannel + set BIT_ROTATE_DUTY, [hl] + jp Audio1_endchannel -Music2_volume: ; 0x9444 +Audio1_volume: cp $f0 ; is this command a volume? - jr nz, Music2_executemusic ; no - call Music2_GetNextMusicByte ; yes - ld [$ff24], a ; store volume - jp Music2_endchannel + jr nz, Audio1_executemusic ; no + call Audio1_GetNextMusicByte + ld [rNR50], a ; store volume + jp Audio1_endchannel -Music2_executemusic: ; 0x9450 +Audio1_executemusic: cp $f8 ; is this command an executemusic? - jr nz, Music2_octave ; no - ld b, $0 ; yes - ld hl, wc036 + jr nz, Audio1_octave ; no + ld b, $0 + ld hl, wChannelFlags2 add hl, bc - set 0, [hl] - jp Music2_endchannel + set BIT_EXECUTE_MUSIC, [hl] + jp Audio1_endchannel -Music2_octave: ; 0x945f +Audio1_octave: and $f0 cp $e0 ; is this command an octave? - jr nz, Music2_unknownsfx0x20 ; no - ld hl, wc0d6 ; yes - ld b, $0 + jr nz, Audio1_unknownsfx0x20 ; no + ld hl, wChannelOctaves + ld b, 0 add hl, bc ld a, d and $f ld [hl], a ; store low nibble as octave - jp Music2_endchannel + jp Audio1_endchannel -Music2_unknownsfx0x20: ; 0x9472 +Audio1_unknownsfx0x20: cp $20 ; is this command an unknownsfx0x20? - jr nz, Music2_unknownsfx0x10 ; no + jr nz, Audio1_unknownsfx0x10 ld a, c - cp CH3 ; is this a noise or sfx channel? - jr c, Music2_unknownsfx0x10 ; no - ld b, $0 - ld hl, wc036 - add hl, bc - bit 0, [hl] - jr nz, Music2_unknownsfx0x10 ; no - call Music2_notelength ; yes + cp Ch3 ; is this a noise or sfx channel? + jr c, Audio1_unknownsfx0x10 ; no + ld b, 0 + ld hl, wChannelFlags2 + add hl, bc + bit BIT_EXECUTE_MUSIC, [hl] ; is executemusic being used? + jr nz, Audio1_unknownsfx0x10 ; yes + call Audio1_notelength + +; This code seems to do the same thing as what Audio1_ApplyDutyAndSoundLength +; does below. ld d, a - ld b, $0 - ld hl, wc03e + ld b, 0 + ld hl, wChannelDuties add hl, bc ld a, [hl] or d ld d, a - ld b, $1 - call Func_9838 + ld b, REG_DUTY_SOUND_LEN + call Audio1_GetRegisterPointer ld [hl], d - call Music2_GetNextMusicByte + + call Audio1_GetNextMusicByte ld d, a - ld b, $2 - call Func_9838 + ld b, REG_VOLUME_ENVELOPE + call Audio1_GetRegisterPointer ld [hl], d - call Music2_GetNextMusicByte + call Audio1_GetNextMusicByte ld e, a ld a, c - cp CH7 - ld a, $0 - jr z, .sfxNoiseChannel ; only two params for noise channel + cp Ch7 + ld a, 0 + jr z, .skip +; Channels 1 through 3 have 2 registers that control frequency, but the noise +; channel a single register (the polynomial counter) that controls frequency, +; so this command has one less byte on the noise channel. push de - call Music2_GetNextMusicByte + call Audio1_GetNextMusicByte pop de -.sfxNoiseChannel +.skip ld d, a push de - call Func_9629 - call Func_95f8 + call Audio1_ApplyDutyAndSoundLength + call Audio1_EnableChannelOutput pop de - call Func_964b + call Audio1_ApplyWavePatternAndFrequency ret -Music2_unknownsfx0x10: +Audio1_unknownsfx0x10: ld a, c - cp CH4 - jr c, Music2_note ; if not a sfx + cp Ch4 + jr c, Audio1_note ; if not a sfx ld a, d cp $10 ; is this command a unknownsfx0x10? - jr nz, Music2_note ; no + jr nz, Audio1_note ; no ld b, $0 - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc - bit 0, [hl] - jr nz, Music2_note ; no - call Music2_GetNextMusicByte ; yes - ld [$ff10], a - jp Music2_endchannel + bit BIT_EXECUTE_MUSIC, [hl] + jr nz, Audio1_note ; no + call Audio1_GetNextMusicByte + ld [rNR10], a + jp Audio1_endchannel -Music2_note: +Audio1_note: ld a, c - cp CH3 - jr nz, Music2_notelength ; if not noise channel + cp Ch3 + jr nz, Audio1_notelength ; if not noise channel ld a, d and $f0 cp $b0 ; is this command a dnote? - jr z, Music2_dnote ; yes - jr nc, Music2_notelength ; no + jr z, Audio1_dnote + jr nc, Audio1_notelength ; no swap a ld b, a ld a, d @@ -639,259 +659,265 @@ Music2_note: push bc jr asm_94fd -Music2_dnote: +Audio1_dnote: ld a, d and $f push af push bc - call Music2_GetNextMusicByte ; get dnote instrument + call Audio1_GetNextMusicByte ; get dnote instrument asm_94fd ld d, a - ld a, [wc003] + ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .asm_9508 ld a, d - call Func_9876 + call Audio1_PlaySound .asm_9508 pop bc pop de -Music2_notelength: ; 0x950a +Audio1_notelength: ld a, d push af and $f inc a - ld b, $0 + ld b, 0 ld e, a ; store note length (in 16ths) ld d, b - ld hl, wc0c6 + ld hl, wChannelNoteSpeeds add hl, bc ld a, [hl] ld l, b - call Func_9847 + call Audio1_MultiplyAdd ld a, c - cp CH4 + cp Ch4 jr nc, .sfxChannel - ld a, [wc0e8] + ld a, [wMusicTempo] ld d, a - ld a, [wc0e9] + ld a, [wMusicTempo + 1] ld e, a jr .skip .sfxChannel ld d, $1 ld e, $0 - cp CH7 + cp Ch7 jr z, .skip ; if noise channel - call Func_9693 - ld a, [wc0ea] + call Audio1_SetSfxTempo + ld a, [wSfxTempo] ld d, a - ld a, [wc0eb] + ld a, [wSfxTempo + 1] ld e, a .skip - ld a, l - ld b, $0 - ld hl, wc0ce + ld a, l ; a = note_length * note_speed + ld b, 0 + ld hl, wChannelNoteDelayCountersFractionalPart add hl, bc ld l, [hl] - call Func_9847 + call Audio1_MultiplyAdd ld e, l - ld d, h - ld hl, wc0ce + ld d, h ; de = note_delay_frac_part + (note_length * note_speed * tempo) + ld hl, wChannelNoteDelayCountersFractionalPart add hl, bc ld [hl], e ld a, d - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, bc ld [hl], a - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc - bit 0, [hl] - jr nz, Music2_notepitch - ld hl, wc02e + bit BIT_EXECUTE_MUSIC, [hl] + jr nz, Audio1_notepitch + ld hl, wChannelFlags1 add hl, bc - bit 2, [hl] - jr z, Music2_notepitch + bit BIT_NOISE_OR_SFX, [hl] + jr z, Audio1_notepitch pop hl ret -Music2_notepitch: ; 0x9568 +Audio1_notepitch: pop af and $f0 cp $c0 ; compare to rest jr nz, .notRest ld a, c - cp CH4 - jr nc, .sfxChannel - ld hl, wc02a + cp Ch4 + jr nc, .next +; If this isn't an SFX channel, try the corresponding SFX channel. + ld hl, wChannelSoundIDs + Ch4 add hl, bc ld a, [hl] and a jr nz, .done ; fall through -.sfxChannel +.next ld a, c - cp CH2 - jr z, .musicChannel3 - cp CH6 - jr nz, .notSfxChannel3 -.musicChannel3 - ld b, $0 - ld hl, Unknown_9b1f + cp Ch2 + jr z, .channel3 + cp Ch6 + jr nz, .notChannel3 +.channel3 + ld b, 0 + ld hl, Audio1_HWChannelDisableMasks add hl, bc - ld a, [$ff25] + ld a, [rNR51] and [hl] - ld [$ff25], a + ld [rNR51], a ; disable hardware channel 3's output jr .done -.notSfxChannel3 - ld b, $2 - call Func_9838 - ld a, $8 +.notChannel3 + ld b, REG_VOLUME_ENVELOPE + call Audio1_GetRegisterPointer + ld a, $8 ; fade in sound ld [hli], a inc hl - ld a, $80 + ld a, $80 ; restart sound ld [hl], a .done ret .notRest swap a - ld b, $0 - ld hl, wc0d6 + ld b, 0 + ld hl, wChannelOctaves add hl, bc ld b, [hl] - call Func_9858 - ld b, $0 - ld hl, wc02e - add hl, bc - bit 4, [hl] - jr z, .asm_95b8 - call Func_978f -.asm_95b8 + call Audio1_CalculateFrequency + ld b, 0 + ld hl, wChannelFlags1 + add hl, bc + bit BIT_PITCH_BEND_ON, [hl] + jr z, .skipPitchBend + call Audio1_InitPitchBendVars +.skipPitchBend push de ld a, c - cp CH4 - jr nc, .skip ; if sfx channel - ld hl, wc02a - ld d, $0 + cp Ch4 + jr nc, .sfxChannel ; if sfx channel +; If this isn't an SFX channel, try the corresponding SFX channel. + ld hl, wChannelSoundIDs + Ch4 + ld d, 0 ld e, a add hl, de ld a, [hl] and a - jr nz, .asm_95cb - jr .skip -.asm_95cb + jr nz, .noSfx + jr .sfxChannel +.noSfx pop de ret -.skip - ld b, $0 - ld hl, wc0de +.sfxChannel + ld b, 0 + ld hl, wChannelVolumes add hl, bc ld d, [hl] - ld b, $2 - call Func_9838 + ld b, REG_VOLUME_ENVELOPE + call Audio1_GetRegisterPointer ld [hl], d - call Func_9629 - call Func_95f8 + call Audio1_ApplyDutyAndSoundLength + call Audio1_EnableChannelOutput pop de ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc - bit 0, [hl] ; has toggleperfectpitch been used? - jr z, .skip2 - inc e ; if yes, increment the pitch by 1 - jr nc, .skip2 + bit BIT_PERFECT_PITCH, [hl] ; has toggleperfectpitch been used? + jr z, .skipFrequencyInc + inc e ; if yes, increment the frequency by 1 + jr nc, .skipFrequencyInc inc d -.skip2 - ld hl, wc066 +.skipFrequencyInc + ld hl, wChannelFrequencyLowBytes add hl, bc ld [hl], e - call Func_964b + call Audio1_ApplyWavePatternAndFrequency ret -Func_95f8: ; 0x95f8 - ld b, $0 - ld hl, Unknown_9b27 +Audio1_EnableChannelOutput: + ld b, 0 + ld hl, Audio1_HWChannelEnableMasks add hl, bc - ld a, [$ff25] - or [hl] + ld a, [rNR51] + or [hl] ; set this channel's bits ld d, a ld a, c - cp CH7 - jr z, .sfxNoiseChannel - cp CH4 + cp Ch7 + jr z, .noiseChannelOrNoSfx + cp Ch4 jr nc, .skip ; if sfx channel - ld hl, wc02a +; If this isn't an SFX channel, try the corresponding SFX channel. + ld hl, wChannelSoundIDs + Ch4 add hl, bc ld a, [hl] and a jr nz, .skip -.sfxNoiseChannel - ld a, [wc004] - ld hl, Unknown_9b27 +.noiseChannelOrNoSfx +; If this is the SFX noise channel or a music channel whose corresponding +; SFX channel is off, apply stereo panning. + ld a, [wStereoPanning] + ld hl, Audio1_HWChannelEnableMasks add hl, bc and [hl] ld d, a - ld a, [$ff25] - ld hl, Unknown_9b1f + ld a, [rNR51] + ld hl, Audio1_HWChannelDisableMasks add hl, bc - and [hl] - or d + and [hl] ; reset this channel's output bits + or d ; set this channel's output bits that enabled in [wStereoPanning] ld d, a .skip ld a, d - ld [$ff25], a + ld [rNR51], a ret -Func_9629: ; 0x9629 - ld b, $0 - ld hl, wc0b6 +Audio1_ApplyDutyAndSoundLength: + ld b, 0 + ld hl, wChannelNoteDelayCounters ; use the note delay as sound length add hl, bc ld d, [hl] ld a, c - cp CH2 - jr z, .channel3 ; if music channel 3 - cp CH6 - jr z, .channel3 ; if sfx channel 3 + cp Ch2 + jr z, .skipDuty ; if music channel 3 + cp Ch6 + jr z, .skipDuty ; if sfx channel 3 +; include duty (except on channel 3 which doesn't have it) ld a, d and $3f ld d, a - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld a, [hl] or d ld d, a -.channel3 - ld b, $1 - call Func_9838 +.skipDuty + ld b, REG_DUTY_SOUND_LEN + call Audio1_GetRegisterPointer ld [hl], d ret -Func_964b: ; 0x964b +Audio1_ApplyWavePatternAndFrequency: ld a, c - cp CH2 + cp Ch2 jr z, .channel3 - cp CH6 - jr nz, .notSfxChannel3 + cp Ch6 + jr nz, .notChannel3 ; fall through .channel3 push de - ld de, wc0e6 - cp CH2 - jr z, .musicChannel3 - ld de, wc0e7 -.musicChannel3 + ld de, wMusicWaveInstrument + cp Ch2 + jr z, .next + ld de, wSfxWaveInstrument +.next ld a, [de] add a - ld d, $0 + ld d, 0 ld e, a - ld hl, Music2_WavePointers + ld hl, Audio1_WavePointers add hl, de ld e, [hl] inc hl ld d, [hl] - ld hl, $ff30 + ld hl, $ff30 ; wave pattern RAM ld b, $f - ld a, $0 - ld [$ff1a], a + ld a, $0 ; stop hardware channel 3 + ld [rNR30], a .loop ld a, [de] inc de @@ -900,152 +926,155 @@ Func_964b: ; 0x964b dec b and a jr nz, .loop - ld a, $80 - ld [$ff1a], a + ld a, $80 ; start hardware channel 3 + ld [rNR30], a pop de -.notSfxChannel3 +.notChannel3 ld a, d - or $80 - and $c7 + or $80 ; use counter mode (i.e. disable output when the counter reaches 0) + and $c7 ; zero the unused bits in the register ld d, a - ld b, $3 - call Func_9838 - ld [hl], e + ld b, REG_FREQUENCY_LO + call Audio1_GetRegisterPointer + ld [hl], e ; store frequency low byte inc hl - ld [hl], d - call Func_96b5 + ld [hl], d ; store frequency high byte + call Audio1_ApplyFrequencyModifier ret -Func_9693: ; 0x9693 - call Func_96e5 - jr nc, .asm_96ab - ld d, $0 - ld a, [wc0f2] +Audio1_SetSfxTempo: + call Audio1_IsCry + jr nc, .notCry + ld d, 0 + ld a, [wTempoModifier] add $80 - jr nc, .asm_96a2 + jr nc, .next inc d -.asm_96a2 - ld [wc0eb], a +.next + ld [wSfxTempo + 1], a ld a, d - ld [wc0ea], a - jr .asm_96b4 -.asm_96ab + ld [wSfxTempo], a + jr .done +.notCry xor a - ld [wc0eb], a + ld [wSfxTempo + 1], a ld a, $1 - ld [wc0ea], a -.asm_96b4 + ld [wSfxTempo], a +.done ret -Func_96b5: ; 0x96b5 - call Func_96e5 - jr nc, .asm_96c6 - ld a, [wc0f1] +Audio1_ApplyFrequencyModifier: + call Audio1_IsCry + jr nc, .done +; if playing a cry, add the cry's frequency modifier + ld a, [wFrequencyModifier] add e - jr nc, .asm_96c1 + jr nc, .noCarry inc d -.asm_96c1 +.noCarry dec hl ld e, a ld [hl], e inc hl ld [hl], d -.asm_96c6 +.done ret -Func_96c7: ; 0x96c7 - call Func_96e5 - jr nc, .asm_96e2 - ld hl, wc006 +Audio1_GoBackOneCommandIfCry: + call Audio1_IsCry + jr nc, .done + ld hl, wChannelCommandPointers ld e, c - ld d, $0 + ld d, 0 sla e rl d add hl, de ld a, [hl] - sub $1 + sub 1 ld [hl], a inc hl ld a, [hl] - sbc $0 + sbc 0 ld [hl], a scf ret -.asm_96e2 +.done scf ccf ret -Func_96e5: ; 0x96e5 - ld a, [wc02a] - cp $14 - jr nc, .asm_96ee - jr .asm_96f4 -.asm_96ee - cp $86 - jr z, .asm_96f4 - jr c, .asm_96f7 -.asm_96f4 +Audio1_IsCry: +; Returns whether the currently playing audio is a cry in carry. + ld a, [wChannelSoundIDs + Ch4] + cp CRY_SFX_START + jr nc, .next + jr .no +.next + cp CRY_SFX_END + jr z, .no + jr c, .yes +.no scf ccf ret -.asm_96f7 +.yes scf ret -Music2_ApplyPitchBend: ; 0x96f9 - ld hl, wc02e +Audio1_ApplyPitchBend: + ld hl, wChannelFlags1 add hl, bc - bit 5, [hl] - jp nz, .asm_9740 - ld hl, wc09e + bit BIT_PITCH_BEND_DECREASING, [hl] + jp nz, .frequencyDecreasing +; frequency increasing + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld e, [hl] - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld d, [hl] - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, bc ld l, [hl] ld h, b add hl, de ld d, h ld e, l - ld hl, wc08e + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart add hl, bc push hl - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, bc ld a, [hl] pop hl add [hl] ld [hl], a - ld a, $0 + ld a, 0 adc e ld e, a - ld a, $0 + ld a, 0 adc d ld d, a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld a, [hl] cp d - jp c, .asm_9786 - jr nz, .asm_9773 - ld hl, wc0ae + jp c, .reachedTargetFrequency + jr nz, .applyUpdatedFrequency + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, [hl] cp e - jp c, .asm_9786 - jr .asm_9773 -.asm_9740 - ld hl, wc09e + jp c, .reachedTargetFrequency + jr .applyUpdatedFrequency +.frequencyDecreasing + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld a, [hl] - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld d, [hl] - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, bc ld e, [hl] sub e @@ -1053,7 +1082,7 @@ Music2_ApplyPitchBend: ; 0x96f9 ld a, d sbc b ld d, a - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, bc ld a, [hl] add a @@ -1064,129 +1093,140 @@ Music2_ApplyPitchBend: ; 0x96f9 ld a, d sbc b ld d, a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld a, d cp [hl] - jr c, .asm_9786 - jr nz, .asm_9773 - ld hl, wc0ae + jr c, .reachedTargetFrequency + jr nz, .applyUpdatedFrequency + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, e cp [hl] - jr c, .asm_9786 -.asm_9773 - ld hl, wc09e + jr c, .reachedTargetFrequency +.applyUpdatedFrequency + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld [hl], e - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld [hl], d - ld b, $3 - call Func_9838 + ld b, REG_FREQUENCY_LO + call Audio1_GetRegisterPointer ld a, e ld [hli], a ld [hl], d ret -.asm_9786 - ld hl, wc02e +.reachedTargetFrequency +; Turn off pitch bend when the target frequency has been reached. + ld hl, wChannelFlags1 add hl, bc - res 4, [hl] - res 5, [hl] + res BIT_PITCH_BEND_ON, [hl] + res BIT_PITCH_BEND_DECREASING, [hl] ret -Func_978f: ; 0x978f - ld hl, wc096 +Audio1_InitPitchBendVars: + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld [hl], d - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld [hl], e - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, bc ld a, [hl] - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, bc sub [hl] - jr nc, .asm_97a7 - ld a, $1 -.asm_97a7 + jr nc, .next + ld a, 1 +.next ld [hl], a - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, e sub [hl] ld e, a ld a, d sbc b - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc sub [hl] - jr c, .asm_97c3 + jr c, .targetFrequencyGreater ld d, a - ld b, $0 - ld hl, wc02e + ld b, 0 + ld hl, wChannelFlags1 add hl, bc - set 5, [hl] - jr .asm_97e6 -.asm_97c3 - ld hl, wc096 + set BIT_PITCH_BEND_DECREASING, [hl] + jr .next2 +.targetFrequencyGreater +; If the target frequency is greater, subtract the current frequency from +; the target frequency to get the absolute difference. + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld d, [hl] - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld e, [hl] - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, [hl] sub e ld e, a + +; Bug. Instead of borrowing from the high byte of the target frequency as it +; should, it borrows from the high byte of the current frequency instead. +; This means that the result will be 0x200 greater than it should be if the +; low byte of the current frequency is greater than the low byte of the +; target frequency. ld a, d sbc b ld d, a - ld hl, wc0a6 + + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld a, [hl] sub d ld d, a - ld b, $0 - ld hl, wc02e + ld b, 0 + ld hl, wChannelFlags1 add hl, bc - res 5, [hl] -.asm_97e6 - ld hl, wc076 + res BIT_PITCH_BEND_DECREASING, [hl] + +.next2 + ld hl, wChannelPitchBendLengthModifiers add hl, bc -.asm_97ea +.divideLoop inc b ld a, e sub [hl] ld e, a - jr nc, .asm_97ea + jr nc, .divideLoop ld a, d and a - jr z, .asm_97f8 + jr z, .doneDividing dec a ld d, a - jr .asm_97ea -.asm_97f8 - ld a, e + jr .divideLoop +.doneDividing + ld a, e ; a = remainder - dividend add [hl] - ld d, b - ld b, $0 - ld hl, wc07e + ld d, b ; d = quotient + 1 + ld b, 0 + ld hl, wChannelPitchBendFrequencySteps add hl, bc - ld [hl], d - ld hl, wc086 + ld [hl], d ; store quotient + 1 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, bc - ld [hl], a - ld hl, wc08e + ld [hl], a ; store remainder - dividend + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart add hl, bc - ld [hl], a + ld [hl], a ; store remainder - dividend ret -Music2_ApplyDutyCycle: ; 0x980d - ld b, $0 - ld hl, wc046 +Audio1_ApplyDutyCycle: + ld b, 0 + ld hl, wChannelDutyCycles add hl, bc ld a, [hl] rlca @@ -1194,20 +1234,20 @@ Music2_ApplyDutyCycle: ; 0x980d ld [hl], a and $c0 ld d, a - ld b, $1 - call Func_9838 + ld b, REG_DUTY_SOUND_LEN + call Audio1_GetRegisterPointer ld a, [hl] and $3f or d ld [hl], a ret -Music2_GetNextMusicByte: ; 0x9825 - ld d, $0 +Audio1_GetNextMusicByte: + ld d, 0 ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de ld a, [hli] ld e, a @@ -1220,9 +1260,10 @@ Music2_GetNextMusicByte: ; 0x9825 ld [hl], d ret -Func_9838: ; 0x9838 +Audio1_GetRegisterPointer: +; hl = address of hardware sound register b for software channel c ld a, c - ld hl, Unknown_9b17 + ld hl, Audio1_HWChannelBaseAddresses add l jr nc, .noCarry inc h @@ -1234,13 +1275,14 @@ Func_9838: ; 0x9838 ld h, $ff ret -Func_9847: ; 0x9847 - ld h, $0 +Audio1_MultiplyAdd: +; hl = l + (a * de) + ld h, 0 .loop srl a - jr nc, .noCarry + jr nc, .skipAdd add hl, de -.noCarry +.skipAdd sla e rl d and a @@ -1249,150 +1291,152 @@ Func_9847: ; 0x9847 .done ret -Func_9858: ; 0x9858 - ld h, $0 +Audio1_CalculateFrequency: +; return the frequency for note a, octave b in de + ld h, 0 ld l, a add hl, hl ld d, h ld e, l - ld hl, Music2_Pitches + ld hl, Audio1_Pitches add hl, de ld e, [hl] inc hl ld d, [hl] ld a, b .loop - cp $7 + cp 7 jr z, .done sra d rr e inc a jr .loop .done - ld a, $8 + ld a, 8 add d ld d, a ret -Func_9876:: ; 0x9876 - ld [wc001], a +Audio1_PlaySound:: + ld [wSoundID], a cp $ff - jp z, Func_9a34 - cp $b9 - jp z, Func_994e - jp c, Func_994e + jp z, .stopAllAudio + cp MAX_SFX_ID + jp z, .playSfx + jp c, .playSfx cp $fe - jr z, .asm_988d - jp nc, Func_994e -.asm_988d + jr z, .playMusic + jp nc, .playSfx + +.playMusic xor a - ld [wc000], a - ld [wc003], a - ld [wc0e9], a - ld [wc0e6], a - ld [wc0e7], a + ld [wUnusedC000], a + ld [wDisableChannelOutputWhenSfxEnds], a + ld [wMusicTempo + 1], a + ld [wMusicWaveInstrument], a + ld [wSfxWaveInstrument], a ld d, $8 - ld hl, wc016 - call FillMusicRAM2 - ld hl, wc006 - call FillMusicRAM2 + ld hl, wChannelReturnAddresses + call .FillMem + ld hl, wChannelCommandPointers + call .FillMem ld d, $4 - ld hl, wc026 - call FillMusicRAM2 - ld hl, wc02e - call FillMusicRAM2 - ld hl, wc03e - call FillMusicRAM2 - ld hl, wc046 - call FillMusicRAM2 - ld hl, wc04e - call FillMusicRAM2 - ld hl, wc056 - call FillMusicRAM2 - ld hl, wc05e - call FillMusicRAM2 - ld hl, wc066 - call FillMusicRAM2 - ld hl, wc06e - call FillMusicRAM2 - ld hl, wc036 - call FillMusicRAM2 - ld hl, wc076 - call FillMusicRAM2 - ld hl, wc07e - call FillMusicRAM2 - ld hl, wc086 - call FillMusicRAM2 - ld hl, wc08e - call FillMusicRAM2 - ld hl, wc096 - call FillMusicRAM2 - ld hl, wc09e - call FillMusicRAM2 - ld hl, wc0a6 - call FillMusicRAM2 - ld hl, wc0ae - call FillMusicRAM2 + ld hl, wChannelSoundIDs + call .FillMem + ld hl, wChannelFlags1 + call .FillMem + ld hl, wChannelDuties + call .FillMem + ld hl, wChannelDutyCycles + call .FillMem + ld hl, wChannelVibratoDelayCounters + call .FillMem + ld hl, wChannelVibratoExtents + call .FillMem + ld hl, wChannelVibratoRates + call .FillMem + ld hl, wChannelFrequencyLowBytes + call .FillMem + ld hl, wChannelVibratoDelayCounterReloadValues + call .FillMem + ld hl, wChannelFlags2 + call .FillMem + ld hl, wChannelPitchBendLengthModifiers + call .FillMem + ld hl, wChannelPitchBendFrequencySteps + call .FillMem + ld hl, wChannelPitchBendFrequencyStepsFractionalPart + call .FillMem + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart + call .FillMem + ld hl, wChannelPitchBendCurrentFrequencyHighBytes + call .FillMem + ld hl, wChannelPitchBendCurrentFrequencyLowBytes + call .FillMem + ld hl, wChannelPitchBendTargetFrequencyHighBytes + call .FillMem + ld hl, wChannelPitchBendTargetFrequencyLowBytes + call .FillMem ld a, $1 - ld hl, wc0be - call FillMusicRAM2 - ld hl, wc0b6 - call FillMusicRAM2 - ld hl, wc0c6 - call FillMusicRAM2 - ld [wc0e8], a + ld hl, wChannelLoopCounters + call .FillMem + ld hl, wChannelNoteDelayCounters + call .FillMem + ld hl, wChannelNoteSpeeds + call .FillMem + ld [wMusicTempo], a ld a, $ff - ld [wc004], a + ld [wStereoPanning], a xor a - ld [$ff24], a + ld [rNR50], a ld a, $8 - ld [$ff10], a - ld a, $0 - ld [$ff25], a + ld [rNR10], a + ld a, 0 + ld [rNR51], a xor a - ld [$ff1a], a + ld [rNR30], a ld a, $80 - ld [$ff1a], a + ld [rNR30], a ld a, $77 - ld [$ff24], a - jp Func_9a8f + ld [rNR50], a + jp .playSoundCommon -Func_994e: ; 0x994e +.playSfx ld l, a ld e, a - ld h, $0 + ld h, 0 ld d, h add hl, hl add hl, de - ld de, SFX_Headers_02 + ld de, SFX_Headers_1 add hl, de ld a, h - ld [wc0ec], a + ld [wSfxHeaderPointer], a ld a, l - ld [wc0ed], a + ld [wSfxHeaderPointer + 1], a ld a, [hl] and $c0 rlca rlca ld c, a -.asm_9967 +.sfxChannelLoop ld d, c ld a, c add a add c ld c, a - ld b, $0 - ld a, [wc0ec] + ld b, 0 + ld a, [wSfxHeaderPointer] ld h, a - ld a, [wc0ed] + ld a, [wSfxHeaderPointer + 1] ld l, a add hl, bc ld c, d ld a, [hl] and $f - ld e, a - ld d, $0 - ld hl, wc026 + ld e, a ; software channel ID + ld d, 0 + ld hl, wChannelSoundIDs add hl, de ld a, [hl] and a @@ -1400,7 +1444,7 @@ Func_994e: ; 0x994e ld a, e cp $7 jr nz, .asm_999a - ld a, [wc001] + ld a, [wSoundID] cp $14 jr nc, .asm_9993 ret @@ -1410,7 +1454,7 @@ Func_994e: ; 0x994e jr z, .asm_99a3 jr c, .asm_99a3 .asm_999a - ld a, [wc001] + ld a, [wSoundID] cp [hl] jr z, .asm_99a3 jr c, .asm_99a3 @@ -1423,132 +1467,132 @@ Func_994e: ; 0x994e add hl, hl ld d, h ld e, l - ld hl, wc016 + ld hl, wChannelReturnAddresses add hl, de ld [hli], a ld [hl], a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de ld [hli], a ld [hl], a pop de - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, de ld [hl], a - ld hl, wc02e + ld hl, wChannelFlags1 add hl, de ld [hl], a - ld hl, wc03e + ld hl, wChannelDuties add hl, de ld [hl], a - ld hl, wc046 + ld hl, wChannelDutyCycles add hl, de ld [hl], a - ld hl, wc04e + ld hl, wChannelVibratoDelayCounters add hl, de ld [hl], a - ld hl, wc056 + ld hl, wChannelVibratoExtents add hl, de ld [hl], a - ld hl, wc05e + ld hl, wChannelVibratoRates add hl, de ld [hl], a - ld hl, wc066 + ld hl, wChannelFrequencyLowBytes add hl, de ld [hl], a - ld hl, wc06e + ld hl, wChannelVibratoDelayCounterReloadValues add hl, de ld [hl], a - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, de ld [hl], a - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, de ld [hl], a - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, de ld [hl], a - ld hl, wc08e + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart add hl, de ld [hl], a - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, de ld [hl], a - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, de ld [hl], a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, de ld [hl], a - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, de ld [hl], a - ld hl, wc036 + ld hl, wChannelFlags2 add hl, de ld [hl], a ld a, $1 - ld hl, wc0be + ld hl, wChannelLoopCounters add hl, de ld [hl], a - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, de ld [hl], a - ld hl, wc0c6 + ld hl, wChannelNoteSpeeds add hl, de ld [hl], a ld a, e - cp $4 + cp Ch4 jr nz, .asm_9a2b ld a, $8 - ld [$ff10], a + ld [rNR10], a ; sweep off .asm_9a2b ld a, c and a - jp z, Func_9a8f + jp z, .playSoundCommon dec c - jp .asm_9967 + jp .sfxChannelLoop -Func_9a34: ; 0x9a34 +.stopAllAudio ld a, $80 - ld [$ff26], a - ld [$ff1a], a + ld [rNR52], a ; sound hardware on + ld [rNR30], a ; wave playback on xor a - ld [$ff25], a - ld [$ff1c], a + ld [rNR51], a ; no sound output + ld [rNR32], a ; mute channel 3 (wave channel) ld a, $8 - ld [$ff10], a - ld [$ff12], a - ld [$ff17], a - ld [$ff21], a + ld [rNR10], a ; sweep off + ld [rNR12], a ; mute channel 1 (pulse channel 1) + ld [rNR22], a ; mute channel 2 (pulse channel 2) + ld [rNR42], a ; mute channel 4 (noise channel) ld a, $40 - ld [$ff14], a - ld [$ff19], a - ld [$ff23], a + ld [rNR14], a ; counter mode + ld [rNR24], a + ld [rNR44], a ld a, $77 - ld [$ff24], a + ld [rNR50], a ; full volume xor a - ld [wc000], a - ld [wc003], a - ld [wc002], a - ld [wc0e9], a - ld [wc0eb], a - ld [wc0e6], a - ld [wc0e7], a + ld [wUnusedC000], a + ld [wDisableChannelOutputWhenSfxEnds], a + ld [wMuteAudioAndPauseMusic], a + ld [wMusicTempo + 1], a + ld [wSfxTempo + 1], a + ld [wMusicWaveInstrument], a + ld [wSfxWaveInstrument], a ld d, $a0 - ld hl, wc006 - call FillMusicRAM2 + ld hl, wChannelCommandPointers + call .FillMem ld a, $1 ld d, $18 - ld hl, wc0b6 - call FillMusicRAM2 - ld [wc0e8], a - ld [wc0ea], a + ld hl, wChannelNoteDelayCounters + call .FillMem + ld [wMusicTempo], a + ld [wSfxTempo], a ld a, $ff - ld [wc004], a + ld [wStereoPanning], a ret ; fills d bytes at hl with a -FillMusicRAM2: ; 0x9a89 +.FillMem ld b, d .loop ld [hli], a @@ -1556,19 +1600,19 @@ FillMusicRAM2: ; 0x9a89 jr nz, .loop ret -Func_9a8f: ; 0x9a8f - ld a, [wc001] +.playSoundCommon + ld a, [wSoundID] ld l, a ld e, a - ld h, $0 + ld h, 0 ld d, h add hl, hl add hl, de - ld de, SFX_Headers_02 + ld de, SFX_Headers_1 add hl, de ld e, l ld d, h - ld hl, wc006 + ld hl, wChannelCommandPointers ld a, [de] ; get channel number ld b, a rlca @@ -1580,31 +1624,31 @@ Func_9a8f: ; 0x9a8f ld b, c inc b inc de - ld c, $0 -.asm_9ab1 + ld c, 0 +.commandPointerLoop cp c - jr z, .asm_9ab9 + jr z, .next inc c inc hl inc hl - jr .asm_9ab1 -.asm_9ab9 + jr .commandPointerLoop +.next push hl push bc push af - ld b, $0 + ld b, 0 ld c, a - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, bc - ld a, [wc001] + ld a, [wSoundID] ld [hl], a pop af - cp $3 - jr c, .asm_9ad2 - ld hl, wc02e + cp Ch3 + jr c, .skipSettingFlag + ld hl, wChannelFlags1 add hl, bc - set 2, [hl] -.asm_9ad2 + set BIT_NOISE_OR_SFX, [hl] +.skipSettingFlag pop bc pop hl ld a, [de] ; get channel pointer @@ -1619,54 +1663,55 @@ Func_9a8f: ; 0x9a8f and a ld a, [de] inc de - jr nz, .asm_9ab1 - ld a, [wc001] - cp $14 + jr nz, .commandPointerLoop + ld a, [wSoundID] + cp CRY_SFX_START jr nc, .asm_9aeb - jr .asm_9b15 + jr .done .asm_9aeb - ld a, [wc001] - cp $86 - jr z, .asm_9b15 - jr c, .asm_9af6 - jr .asm_9b15 -.asm_9af6 - ld hl, wc02a + ld a, [wSoundID] + cp CRY_SFX_END + jr z, .done + jr c, .cry + jr .done +.cry + ld hl, wChannelSoundIDs + Ch4 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wc012 ; sfx noise channel pointer - ld de, Noise2_endchannel + ld hl, wChannelCommandPointers + Ch6 * 2 ; sfx wave channel pointer + ld de, Audio1_CryEndchannel ld [hl], e inc hl ld [hl], d ; overwrite pointer to point to endchannel - ld a, [wc005] + ld a, [wSavedVolume] and a - jr nz, .asm_9b15 - ld a, [$ff24] - ld [wc005], a + jr nz, .done + ld a, [rNR50] + ld [wSavedVolume], a ld a, $77 - ld [$ff24], a -.asm_9b15 + ld [rNR50], a ; full volume +.done ret -Noise2_endchannel: ; 0x9b16 +Audio1_CryEndchannel: endchannel -Unknown_9b17: ; 0x9b17 - db $10, $15, $1A, $1F ; channels 0-3 - db $10, $15, $1A, $1F ; channels 4-7 +Audio1_HWChannelBaseAddresses: +; the low bytes of each HW channel's base address + db HW_CH1_BASE, HW_CH2_BASE, HW_CH3_BASE, HW_CH4_BASE ; channels 0-3 + db HW_CH1_BASE, HW_CH2_BASE, HW_CH3_BASE, HW_CH4_BASE ; channels 4-7 -Unknown_9b1f: ; 0x9b1f - db $EE, $DD, $BB, $77 ; channels 0-3 - db $EE, $DD, $BB, $77 ; channels 4-7 +Audio1_HWChannelDisableMasks: + db HW_CH1_DISABLE_MASK, HW_CH2_DISABLE_MASK, HW_CH3_DISABLE_MASK, HW_CH4_DISABLE_MASK ; channels 0-3 + db HW_CH1_DISABLE_MASK, HW_CH2_DISABLE_MASK, HW_CH3_DISABLE_MASK, HW_CH4_DISABLE_MASK ; channels 4-7 -Unknown_9b27: ; 0x9b27 - db $11, $22, $44, $88 ; channels 0-3 - db $11, $22, $44, $88 ; channels 4-7 +Audio1_HWChannelEnableMasks: + db HW_CH1_ENABLE_MASK, HW_CH2_ENABLE_MASK, HW_CH3_ENABLE_MASK, HW_CH4_ENABLE_MASK ; channels 0-3 + db HW_CH1_ENABLE_MASK, HW_CH2_ENABLE_MASK, HW_CH3_ENABLE_MASK, HW_CH4_ENABLE_MASK ; channels 4-7 -Music2_Pitches: ; 0x9b2f +Audio1_Pitches: dw $F82C ; C_ dw $F89D ; C# dw $F907 ; D_ diff --git a/audio/engine_2.asm b/audio/engine_2.asm index 067ecc0c..4eb9b96b 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -1,89 +1,89 @@ ; The second of three duplicated sound engines. -Music8_UpdateMusic:: ; 21879 (8:5879) - ld c, CH0 +Audio2_UpdateMusic:: + ld c, Ch0 .loop ld b, $0 - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, bc ld a, [hl] and a jr z, .nextChannel ld a, c - cp CH4 + cp Ch4 jr nc, .applyAffects ; if sfx channel - ld a, [wc002] + ld a, [wMuteAudioAndPauseMusic] and a jr z, .applyAffects bit 7, a jr nz, .nextChannel set 7, a - ld [wc002], a + ld [wMuteAudioAndPauseMusic], a xor a - ld [$ff25], a - ld [$ff1a], a + ld [rNR51], a + ld [rNR30], a ld a, $80 - ld [$ff1a], a + ld [rNR30], a jr .nextChannel .applyAffects - call Music8_ApplyMusicAffects + call Audio2_ApplyMusicAffects .nextChannel ld a, c inc c - cp CH7 + cp Ch7 jr nz, .loop ret ; this routine checks flags for music effects currently applied ; to the channel and calls certain functions based on flags. -; known flags for wc02e: -; 0: toggleperfectpitch has been used -; 1: call has been used -; 3: a toggle used only by this routine for vibrato -; 4: pitchbend flag -; 6: dutycycle flag -Music8_ApplyMusicAffects: ; 218ae (8:58ae) +; known flags for wChannelFlags1: +; 0: toggleperfectpitch has been used +; 1: call has been used +; 3: a toggle used only by this routine for vibrato +; 4: pitchbend flag +; 6: dutycycle flag +Audio2_ApplyMusicAffects: ld b, $0 - ld hl, wc0b6 ; delay until next note + ld hl, wChannelNoteDelayCounters ; delay until next note add hl, bc ld a, [hl] cp $1 ; if the delay is 1, play next note - jp z, Music8_PlayNextNote + jp z, Audio2_PlayNextNote dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp CH4 + cp Ch4 jr nc, .startChecks ; if a sfx channel - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 add hl, bc ld a, [hl] and a jr z, .startChecks ret .startChecks - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 6, [hl] ; dutycycle jr z, .checkForExecuteMusic - call Music8_ApplyDutyCycle + call Audio2_ApplyDutyCycle .checkForExecuteMusic ld b, $0 - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc bit 0, [hl] jr nz, .checkForPitchBend - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 2, [hl] jr nz, .disablePitchBendVibrato .checkForPitchBend - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 4, [hl] ; pitchbend jr z, .checkVibratoDelay - jp Music8_ApplyPitchBend + jp Audio2_ApplyPitchBend .checkVibratoDelay - ld hl, wc04e ; vibrato delay + ld hl, wChannelVibratoDelayCounters ; vibrato delay add hl, bc ld a, [hl] and a ; check if delay is over @@ -92,7 +92,7 @@ Music8_ApplyMusicAffects: ; 218ae (8:58ae) .disablePitchBendVibrato ret .checkForVibrato - ld hl, wc056 ; vibrato rate + ld hl, wChannelVibratoExtents ; vibrato rate add hl, bc ld a, [hl] and a @@ -100,7 +100,7 @@ Music8_ApplyMusicAffects: ; 218ae (8:58ae) ret ; no vibrato .vibrato ld d, a - ld hl, wc05e + ld hl, wChannelVibratoRates add hl, bc ld a, [hl] and $f @@ -113,10 +113,10 @@ Music8_ApplyMusicAffects: ; 218ae (8:58ae) swap [hl] or [hl] ld [hl], a ; reset the vibrato value and start again - ld hl, wc066 + ld hl, wChannelFrequencyLowBytes add hl, bc ld e, [hl] ; get note pitch - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 3, [hl] ; this is the only code that sets/resets bit three so jr z, .unset ; it continuously alternates which path it takes @@ -141,66 +141,66 @@ Music8_ApplyMusicAffects: ; 218ae (8:58ae) .done ld d, a ld b, $3 - call Func_21ff7 + call Audio2_21ff7 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 -Music8_PlayNextNote: ; 21946 (8:5946) - ld hl, wc06e +Audio2_PlayNextNote: + ld hl, wChannelVibratoDelayCounterReloadValues add hl, bc ld a, [hl] - ld hl, wc04e + ld hl, wChannelVibratoDelayCounters add hl, bc ld [hl], a - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc res 4, [hl] res 5, [hl] ld a, c - cp CH4 + cp Ch4 jr nz, .beginChecks ld a, [wLowHealthAlarm] ;low health alarm enabled? bit 7, a ret nz .beginChecks - call Music8_endchannel + call Audio2_endchannel ret -Music8_endchannel: ; 21967 (8:5967) - call Music8_GetNextMusicByte +Audio2_endchannel: + call Audio2_GetNextMusicByte ld d, a cp $ff ; is this command an endchannel? - jp nz, Music8_callchannel ; no + jp nz, Audio2_callchannel ; no ld b, $0 ; yes - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 1, [hl] jr nz, .returnFromCall ld a, c - cp CH3 + cp Ch3 jr nc, .noiseOrSfxChannel jr .asm_219c0 .noiseOrSfxChannel res 2, [hl] - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc res 0, [hl] - cp CH6 + cp Ch6 jr nz, .notSfxChannel3 ld a, $0 - ld [$ff1a], a + ld [rNR30], a ld a, $80 - ld [$ff1a], a + ld [rNR30], a .notSfxChannel3 jr nz, .asm_219a3 - ld a, [wc003] + ld a, [wDisableChannelOutputWhenSfxEnds] and a jr z, .asm_219a3 xor a - ld [wc003], a + ld [wDisableChannelOutputWhenSfxEnds], a jr .asm_219c0 .asm_219a3 jr .asm_219c9 @@ -210,10 +210,10 @@ Music8_endchannel: ; 21967 (8:5967) ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de push hl ; store current channel address - ld hl, wc016 + ld hl, wChannelReturnAddresses add hl, de ld e, l ld d, h @@ -223,47 +223,47 @@ Music8_endchannel: ; 21967 (8:5967) inc de ld a, [de] ld [hl], a ; loads channel address to return to - jp Music8_endchannel + jp Audio2_endchannel .asm_219c0 ld hl, Unknown_222de add hl, bc - ld a, [$ff25] + ld a, [rNR51] and [hl] - ld [$ff25], a + ld [rNR51], a .asm_219c9 - ld a, [wc02a] + ld a, [wChannelSoundIDs + Ch4] cp $14 jr nc, .asm_219d2 jr .asm_219ef .asm_219d2 - ld a, [wc02a] + ld a, [wChannelSoundIDs + Ch4] cp $86 jr z, .asm_219ef jr c, .asm_219dd jr .asm_219ef .asm_219dd ld a, c - cp CH4 + cp Ch4 jr z, .asm_219e6 - call Func_21e6d + call Audio2_21e6d ret c .asm_219e6 - ld a, [wc005] - ld [$ff24], a + ld a, [wSavedVolume] + ld [rNR50], a xor a - ld [wc005], a + ld [wSavedVolume], a .asm_219ef - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, bc ld [hl], b ret -Music8_callchannel: ; 219f5 (8:59f5) +Audio2_callchannel: cp $fd ; is this command a callchannel? - jp nz, Music8_loopchannel ; no - call Music8_GetNextMusicByte ; yes + jp nz, Audio2_loopchannel ; no + call Audio2_GetNextMusicByte ; yes push af - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte ld d, a pop af ld e, a @@ -272,10 +272,10 @@ Music8_callchannel: ; 219f5 (8:59f5) ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de push hl - ld hl, wc016 + ld hl, wChannelReturnAddresses add hl, de ld e, l ld d, h @@ -290,73 +290,73 @@ Music8_callchannel: ; 219f5 (8:59f5) inc hl ld [hl], d ; overwrite current address with pointer ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 1, [hl] ; set the call flag - jp Music8_endchannel + jp Audio2_endchannel -Music8_loopchannel: ; 21a2a (8:5a2a) +Audio2_loopchannel: cp $fe ; is this command a loopchannel? - jp nz, Music8_notetype ; no - call Music8_GetNextMusicByte ; yes + jp nz, Audio2_notetype ; no + call Audio2_GetNextMusicByte ; yes ld e, a and a jr z, .infiniteLoop ld b, $0 - ld hl, wc0be + ld hl, wChannelLoopCounters add hl, bc ld a, [hl] cp e jr nz, .loopAgain ld a, $1 ; if no more loops to make, ld [hl], a - call Music8_GetNextMusicByte ; skip pointer - call Music8_GetNextMusicByte - jp Music8_endchannel + call Audio2_GetNextMusicByte ; skip pointer + call Audio2_GetNextMusicByte + jp Audio2_endchannel .loopAgain ; inc loop count inc a ld [hl], a ; fall through .infiniteLoop ; overwrite current address with pointer - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte push af - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte ld b, a ld d, $0 ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de pop af ld [hli], a ld [hl], b - jp Music8_endchannel + jp Audio2_endchannel -Music8_notetype: ; 21a65 (8:5a65) +Audio2_notetype: and $f0 cp $d0 ; is this command a notetype? - jp nz, Music8_toggleperfectpitch ; no + jp nz, Audio2_toggleperfectpitch ; no ld a, d ; yes and $f ld b, $0 - ld hl, wc0c6 + ld hl, wChannelNoteSpeeds add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp CH3 + cp Ch3 jr z, .noiseChannel ; noise channel has 0 params - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte ld d, a ld a, c - cp CH2 + cp Ch2 jr z, .musicChannel3 - cp CH6 + cp Ch6 jr nz, .notChannel3 - ld hl, wc0e7 + ld hl, wSfxWaveInstrument jr .sfxChannel3 .musicChannel3 - ld hl, wc0e6 + ld hl, wMusicWaveInstrument .sfxChannel3 ld a, d and $f @@ -371,41 +371,41 @@ Music8_notetype: ; 21a65 (8:5a65) ; else, store volume (high nibble) and fade (low nibble) .notChannel3 ld b, $0 - ld hl, wc0de + ld hl, wChannelVolumes add hl, bc ld [hl], d .noiseChannel - jp Music8_endchannel + jp Audio2_endchannel -Music8_toggleperfectpitch: ; 21aa4 (8:5aa4) +Audio2_toggleperfectpitch: ld a, d cp $e8 ; is this command a toggleperfectpitch? - jr nz, Music8_vibrato ; no + jr nz, Audio2_vibrato ; no ld b, $0 ; yes - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc ld a, [hl] xor $1 - ld [hl], a ; flip bit 0 of wc02e - jp Music8_endchannel + ld [hl], a ; flip bit 0 of wChannelFlags1 + jp Audio2_endchannel -Music8_vibrato: ; 21ab6 (8:5ab6) +Audio2_vibrato: cp $ea ; is this command a vibrato? - jr nz, Music8_pitchbend ; no - call Music8_GetNextMusicByte ; yes + jr nz, Audio2_pitchbend ; no + call Audio2_GetNextMusicByte ; yes ld b, $0 - ld hl, wc04e + ld hl, wChannelVibratoDelayCounters add hl, bc ld [hl], a ; store delay - ld hl, wc06e + ld hl, wChannelVibratoDelayCounterReloadValues add hl, bc ld [hl], a ; store delay - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte ld d, a and $f0 swap a ld b, $0 - ld hl, wc056 + ld hl, wChannelVibratoExtents add hl, bc srl a ld e, a @@ -416,226 +416,226 @@ Music8_vibrato: ; 21ab6 (8:5ab6) ld a, d and $f ld d, a - ld hl, wc05e + ld hl, wChannelVibratoRates add hl, bc swap a or d ld [hl], a ; store depth as both high and low nibbles - jp Music8_endchannel + jp Audio2_endchannel -Music8_pitchbend: ; 21aee (8:5aee) +Audio2_pitchbend: cp $eb ; is this command a pitchbend? - jr nz, Music8_duty ; no - call Music8_GetNextMusicByte ; yes + jr nz, Audio2_duty ; no + call Audio2_GetNextMusicByte ; yes ld b, $0 - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, bc ld [hl], a ; store first param - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte ld d, a and $f0 swap a ld b, a ld a, d and $f - call Func_22017 + call Audio2_22017 ld b, $0 - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld [hl], d ; store unknown part of second param - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld [hl], e ; store unknown part of second param ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 4, [hl] ; set pitchbend flag - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte ld d, a - jp Music8_notelength + jp Audio2_notelength -Music8_duty: ; 21b26 (8:5b26) +Audio2_duty: cp $ec ; is this command a duty? - jr nz, Music8_tempo ; no - call Music8_GetNextMusicByte ; yes + jr nz, Audio2_tempo ; no + call Audio2_GetNextMusicByte ; yes rrca rrca and $c0 ld b, $0 - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld [hl], a ; store duty - jp Music8_endchannel + jp Audio2_endchannel -Music8_tempo: ; 21b3b (8:5b3b) +Audio2_tempo: cp $ed ; is this command a tempo? - jr nz, Music8_stereopanning ; no + jr nz, Audio2_stereopanning ; no ld a, c ; yes - cp CH4 + cp Ch4 jr nc, .sfxChannel - call Music8_GetNextMusicByte - ld [wc0e8], a ; store first param - call Music8_GetNextMusicByte - ld [wc0e9], a ; store second param + call Audio2_GetNextMusicByte + ld [wMusicTempo], a ; store first param + call Audio2_GetNextMusicByte + ld [wMusicTempo + 1], a ; store second param xor a - ld [wc0ce], a ; clear RAM - ld [wc0cf], a - ld [wc0d0], a - ld [wc0d1], a + ld [wChannelNoteDelayCountersFractionalPart], a ; clear RAM + ld [wChannelNoteDelayCountersFractionalPart + 1], a + ld [wChannelNoteDelayCountersFractionalPart + 2], a + ld [wChannelNoteDelayCountersFractionalPart + 3], a jr .musicChannelDone .sfxChannel - call Music8_GetNextMusicByte - ld [wc0ea], a ; store first param - call Music8_GetNextMusicByte - ld [wc0eb], a ; store second param + call Audio2_GetNextMusicByte + ld [wSfxTempo], a ; store first param + call Audio2_GetNextMusicByte + ld [wSfxTempo + 1], a ; store second param xor a - ld [wc0d2], a ; clear RAM - ld [wc0d3], a - ld [wc0d4], a - ld [wc0d5], a + ld [wChannelNoteDelayCountersFractionalPart + 4], a ; clear RAM + ld [wChannelNoteDelayCountersFractionalPart + 5], a + ld [wChannelNoteDelayCountersFractionalPart + 6], a + ld [wChannelNoteDelayCountersFractionalPart + 7], a .musicChannelDone - jp Music8_endchannel + jp Audio2_endchannel -Music8_stereopanning: ; 21b7b (8:5b7b) +Audio2_stereopanning: cp $ee ; is this command a stereopanning? - jr nz, Music8_unknownmusic0xef ; no - call Music8_GetNextMusicByte ; yes - ld [wc004], a ; store panning - jp Music8_endchannel + jr nz, Audio2_unknownmusic0xef ; no + call Audio2_GetNextMusicByte ; yes + ld [wStereoPanning], a ; store panning + jp Audio2_endchannel ; this appears to never be used -Music8_unknownmusic0xef: ; 21b88 (8:5b88) +Audio2_unknownmusic0xef: cp $ef ; is this command an unknownmusic0xef? - jr nz, Music8_dutycycle ; no - call Music8_GetNextMusicByte ; yes + jr nz, Audio2_dutycycle ; no + call Audio2_GetNextMusicByte ; yes push bc - call Func_22035 + call Audio2_PlaySound pop bc - ld a, [wc003] + ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wc02d] - ld [wc003], a + ld a, [wChannelSoundIDs + Ch7] + ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wc02d], a + ld [wChannelSoundIDs + Ch7], a .skip - jp Music8_endchannel + jp Audio2_endchannel -Music8_dutycycle: ; 21ba7 (8:5ba7) +Audio2_dutycycle: cp $fc ; is this command a dutycycle? - jr nz, Music8_volume ; no - call Music8_GetNextMusicByte ; yes + jr nz, Audio2_volume ; no + call Audio2_GetNextMusicByte ; yes ld b, $0 - ld hl, wc046 + ld hl, wChannelDutyCycles add hl, bc ld [hl], a ; store full cycle and $c0 - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld [hl], a ; store first duty - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 6, [hl] ; set dutycycle flag - jp Music8_endchannel + jp Audio2_endchannel -Music8_volume: ; 21bc5 (8:5bc5) +Audio2_volume: cp $f0 ; is this command a volume? - jr nz, Music8_executemusic ; no - call Music8_GetNextMusicByte ; yes - ld [$ff24], a ; store volume - jp Music8_endchannel + jr nz, Audio2_executemusic ; no + call Audio2_GetNextMusicByte ; yes + ld [rNR50], a ; store volume + jp Audio2_endchannel -Music8_executemusic: ; 21bd1 (8:5bd1) +Audio2_executemusic: cp $f8 ; is this command an executemusic? - jr nz, Music8_octave ; no + jr nz, Audio2_octave ; no ld b, $0 ; yes - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc set 0, [hl] - jp Music8_endchannel + jp Audio2_endchannel -Music8_octave: ; 21be0 (8:5be0) +Audio2_octave: and $f0 cp $e0 ; is this command an octave? - jr nz, Music8_unknownsfx0x20 ; no - ld hl, wc0d6 ; yes + jr nz, Audio2_unknownsfx0x20 ; no + ld hl, wChannelOctaves ; yes ld b, $0 add hl, bc ld a, d and $f ld [hl], a ; store low nibble as octave - jp Music8_endchannel + jp Audio2_endchannel -Music8_unknownsfx0x20: ; 21bf3 +Audio2_unknownsfx0x20: cp $20 ; is this command an unknownsfx0x20? - jr nz, Music8_unknownsfx0x10 ; no + jr nz, Audio2_unknownsfx0x10 ; no ld a, c - cp CH3 ; is this a noise or sfx channel? - jr c, Music8_unknownsfx0x10 ; no + cp Ch3 ; is this a noise or sfx channel? + jr c, Audio2_unknownsfx0x10 ; no ld b, $0 - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc bit 0, [hl] - jr nz, Music8_unknownsfx0x10 ; no - call Music8_notelength + jr nz, Audio2_unknownsfx0x10 ; no + call Audio2_notelength ld d, a ld b, $0 - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld a, [hl] or d ld d, a ld b, $1 - call Func_21ff7 + call Audio2_21ff7 ld [hl], d - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte ld d, a ld b, $2 - call Func_21ff7 + call Audio2_21ff7 ld [hl], d - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte ld e, a ld a, c - cp CH7 + cp Ch7 ld a, $0 jr z, .sfxNoiseChannel ; only two params for noise channel push de - call Music8_GetNextMusicByte + call Audio2_GetNextMusicByte pop de .sfxNoiseChannel ld d, a push de - call Func_21daa - call Func_21d79 + call Audio2_21daa + call Audio2_21d79 pop de - call Func_21dcc + call Audio2_21dcc ret -Music8_unknownsfx0x10: ; 21c40 (8:5c40) +Audio2_unknownsfx0x10: ld a, c - cp CH4 - jr c, Music8_note ; if not a sfx + cp Ch4 + jr c, Audio2_note ; if not a sfx ld a, d cp $10 ; is this command a unknownsfx0x10? - jr nz, Music8_note ; no + jr nz, Audio2_note ; no ld b, $0 - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc bit 0, [hl] - jr nz, Music8_note ; no - call Music8_GetNextMusicByte ; yes - ld [$ff10], a - jp Music8_endchannel + jr nz, Audio2_note ; no + call Audio2_GetNextMusicByte ; yes + ld [rNR10], a + jp Audio2_endchannel -Music8_note: ; 21c5c (8:5c5c) +Audio2_note: ld a, c - cp CH3 - jr nz, Music8_notelength ; if not noise channel + cp Ch3 + jr nz, Audio2_notelength ; if not noise channel ld a, d and $f0 cp $b0 ; is this command a dnote? - jr z, Music8_dnote ; yes - jr nc, Music8_notelength ; no + jr z, Audio2_dnote ; yes + jr nc, Audio2_notelength ; no swap a ld b, a ld a, d @@ -646,24 +646,24 @@ Music8_note: ; 21c5c (8:5c5c) push bc jr asm_21c7e -Music8_dnote: ; 21c76 (8:5c76) +Audio2_dnote: ld a, d and $f push af push bc - call Music8_GetNextMusicByte ; get dnote instrument + call Audio2_GetNextMusicByte ; get dnote instrument asm_21c7e ld d, a - ld a, [wc003] + ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .asm_21c89 ld a, d - call Func_22035 + call Audio2_PlaySound .asm_21c89 pop bc pop de -Music8_notelength: ; 21c8b (8:5c8b) +Audio2_notelength: ld a, d push af and $f @@ -671,65 +671,65 @@ Music8_notelength: ; 21c8b (8:5c8b) ld b, $0 ld e, a ; store note length (in 16ths) ld d, b - ld hl, wc0c6 + ld hl, wChannelNoteSpeeds add hl, bc ld a, [hl] ld l, b - call Func_22006 + call Audio2_22006 ld a, c - cp CH4 + cp Ch4 jr nc, .sfxChannel - ld a, [wc0e8] + ld a, [wMusicTempo] ld d, a - ld a, [wc0e9] + ld a, [wMusicTempo + 1] ld e, a jr .skip .sfxChannel ld d, $1 ld e, $0 - cp CH7 + cp Ch7 jr z, .skip ; if noise channel - call Func_21e2f - ld a, [wc0ea] + call Audio2_21e2f + ld a, [wSfxTempo] ld d, a - ld a, [wc0eb] + ld a, [wSfxTempo + 1] ld e, a .skip ld a, l ld b, $0 - ld hl, wc0ce + ld hl, wChannelNoteDelayCountersFractionalPart add hl, bc ld l, [hl] - call Func_22006 + call Audio2_22006 ld e, l ld d, h - ld hl, wc0ce + ld hl, wChannelNoteDelayCountersFractionalPart add hl, bc ld [hl], e ld a, d - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, bc ld [hl], a - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc bit 0, [hl] - jr nz, Music8_notepitch - ld hl, wc02e + jr nz, Audio2_notepitch + ld hl, wChannelFlags1 add hl, bc bit 2, [hl] - jr z, Music8_notepitch + jr z, Audio2_notepitch pop hl ret -Music8_notepitch: ; 21ce9 (8:5ce9) +Audio2_notepitch: pop af and $f0 cp $c0 ; compare to rest jr nz, .notRest ld a, c - cp CH4 + cp Ch4 jr nc, .sfxChannel - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 add hl, bc ld a, [hl] and a @@ -737,21 +737,21 @@ Music8_notepitch: ; 21ce9 (8:5ce9) ; fall through .sfxChannel ld a, c - cp CH2 + cp Ch2 jr z, .musicChannel3 - cp CH6 + cp Ch6 jr nz, .notSfxChannel3 .musicChannel3 ld b, $0 ld hl, Unknown_222de add hl, bc - ld a, [$ff25] + ld a, [rNR51] and [hl] - ld [$ff25], a + ld [rNR51], a jr .done .notSfxChannel3 ld b, $2 - call Func_21ff7 + call Audio2_21ff7 ld a, $8 ld [hli], a inc hl @@ -762,22 +762,22 @@ Music8_notepitch: ; 21ce9 (8:5ce9) .notRest swap a ld b, $0 - ld hl, wc0d6 + ld hl, wChannelOctaves add hl, bc ld b, [hl] - call Func_22017 + call Audio2_22017 ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 4, [hl] jr z, .asm_21d39 - call Func_21f4e + call Audio2_21f4e .asm_21d39 push de ld a, c - cp CH4 + cp Ch4 jr nc, .skip ; if sfx channel - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 ld d, $0 ld e, a add hl, de @@ -790,17 +790,17 @@ Music8_notepitch: ; 21ce9 (8:5ce9) ret .skip ld b, $0 - ld hl, wc0de + ld hl, wChannelVolumes add hl, bc ld d, [hl] ld b, $2 - call Func_21ff7 + call Audio2_21ff7 ld [hl], d - call Func_21daa - call Func_21d79 + call Audio2_21daa + call Audio2_21d79 pop de ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 0, [hl] ; has toggleperfectpitch been used? jr z, .skip2 @@ -808,36 +808,36 @@ Music8_notepitch: ; 21ce9 (8:5ce9) jr nc, .skip2 inc d .skip2 - ld hl, wc066 + ld hl, wChannelFrequencyLowBytes add hl, bc ld [hl], e - call Func_21dcc + call Audio2_21dcc ret -Func_21d79: ; 21d79 (8:5d79) +Audio2_21d79: ld b, $0 ld hl, Unknown_222e6 add hl, bc - ld a, [$ff25] + ld a, [rNR51] or [hl] ld d, a ld a, c - cp CH7 + cp Ch7 jr z, .sfxNoiseChannel - cp CH4 + cp Ch4 jr nc, .skip ; if sfx channel - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 add hl, bc ld a, [hl] and a jr nz, .skip .sfxNoiseChannel - ld a, [wc004] + ld a, [wStereoPanning] ld hl, Unknown_222e6 add hl, bc and [hl] ld d, a - ld a, [$ff25] + ld a, [rNR51] ld hl, Unknown_222de add hl, bc and [hl] @@ -845,52 +845,52 @@ Func_21d79: ; 21d79 (8:5d79) ld d, a .skip ld a, d - ld [$ff25], a + ld [rNR51], a ret -Func_21daa: ; 21daa (8:5daa) +Audio2_21daa: ld b, $0 - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, bc ld d, [hl] ld a, c - cp CH2 + cp Ch2 jr z, .channel3 ; if music channel 3 - cp CH6 + cp Ch6 jr z, .channel3 ; if sfx channel 3 ld a, d and $3f ld d, a - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld a, [hl] or d ld d, a .channel3 ld b, $1 - call Func_21ff7 + call Audio2_21ff7 ld [hl], d ret -Func_21dcc: ; 21dcc (8:5dcc) +Audio2_21dcc: ld a, c - cp CH2 + cp Ch2 jr z, .channel3 - cp CH6 + cp Ch6 jr nz, .notSfxChannel3 ; fall through .channel3 push de - ld de, wc0e6 - cp CH2 + ld de, wMusicWaveInstrument + cp Ch2 jr z, .musicChannel3 - ld de, wc0e7 + ld de, wSfxWaveInstrument .musicChannel3 ld a, [de] add a ld d, $0 ld e, a - ld hl, Music8_WavePointers + ld hl, Audio2_WavePointers add hl, de ld e, [hl] inc hl @@ -898,7 +898,7 @@ Func_21dcc: ; 21dcc (8:5dcc) ld hl, $ff30 ld b, $f ld a, $0 - ld [$ff1a], a + ld [rNR30], a .loop ld a, [de] inc de @@ -908,7 +908,7 @@ Func_21dcc: ; 21dcc (8:5dcc) and a jr nz, .loop ld a, $80 - ld [$ff1a], a + ld [rNR30], a pop de .notSfxChannel3 ld a, d @@ -916,62 +916,62 @@ Func_21dcc: ; 21dcc (8:5dcc) and $c7 ld d, a ld b, $3 - call Func_21ff7 + call Audio2_21ff7 ld [hl], e inc hl ld [hl], d ld a, c - cp CH4 + cp Ch4 jr c, .musicChannel - call Func_21e56 + call Audio2_21e56 .musicChannel ret -Func_21e19: ; 21e19 (8:5e19) +Audio2_21e19: ld a, c - cp CH4 + cp Ch4 jr nz, .asm_21e2e ld a, [wLowHealthAlarm] bit 7, a jr z, .asm_21e2e xor a - ld [wc0f1], a + ld [wFrequencyModifier], a ld a, $80 - ld [wc0f2], a + ld [wTempoModifier], a .asm_21e2e ret -Func_21e2f: ; 21e2f (8:5e2f) - call Func_21e8b +Audio2_21e2f: + call Audio2_21e8b jr c, .asm_21e39 - call Func_21e9f + call Audio2_21e9f jr nc, .asm_21e4c .asm_21e39 ld d, $0 - ld a, [wc0f2] + ld a, [wTempoModifier] add $80 jr nc, .asm_21e43 inc d .asm_21e43 - ld [wc0eb], a + ld [wSfxTempo + 1], a ld a, d - ld [wc0ea], a + ld [wSfxTempo], a jr .asm_21e55 .asm_21e4c xor a - ld [wc0eb], a + ld [wSfxTempo + 1], a ld a, $1 - ld [wc0ea], a + ld [wSfxTempo], a .asm_21e55 ret -Func_21e56: ; 21e56 (8:5e56) - call Func_21e8b +Audio2_21e56: + call Audio2_21e8b jr c, .asm_21e60 - call Func_21e9f + call Audio2_21e9f jr nc, .asm_21e6c .asm_21e60 - ld a, [wc0f1] + ld a, [wFrequencyModifier] add e jr nc, .asm_21e67 inc d @@ -984,10 +984,10 @@ Func_21e56: ; 21e56 (8:5e56) .asm_21e6c ret -Func_21e6d: ; 21e6d (8:5e6d) - call Func_21e8b +Audio2_21e6d: + call Audio2_21e8b jr nc, .asm_21e88 - ld hl, wc006 + ld hl, wChannelCommandPointers ld e, c ld d, $0 sla e @@ -1007,8 +1007,8 @@ Func_21e6d: ; 21e6d (8:5e6d) ccf ret -Func_21e8b: ; 21e8b (8:5e8b) - ld a, [wc02a] +Audio2_21e8b: + ld a, [wChannelSoundIDs + Ch4] cp $14 jr nc, .asm_21e94 jr .asm_21e9a @@ -1024,10 +1024,10 @@ Func_21e8b: ; 21e8b (8:5e8b) scf ret -Func_21e9f: ; 21e9f (8:5e9f) - ld a, [wc02d] +Audio2_21e9f: + ld a, [wChannelSoundIDs + Ch7] ld b, a - ld a, [wc02a] + ld a, [wChannelSoundIDs + Ch4] or b cp $9d jr nc, .asm_21ead @@ -1044,28 +1044,28 @@ Func_21e9f: ; 21e9f (8:5e9f) scf ret -Music8_ApplyPitchBend: ; 21eb8 (8:5eb8) - ld hl, wc02e +Audio2_ApplyPitchBend: + ld hl, wChannelFlags1 add hl, bc bit 5, [hl] jp nz, .asm_21eff - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld e, [hl] - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld d, [hl] - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, bc ld l, [hl] ld h, b add hl, de ld d, h ld e, l - ld hl, wc08e + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart add hl, bc push hl - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, bc ld a, [hl] pop hl @@ -1077,26 +1077,26 @@ Music8_ApplyPitchBend: ; 21eb8 (8:5eb8) ld a, $0 adc d ld d, a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld a, [hl] cp d jp c, .asm_21f45 jr nz, .asm_21f32 - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, [hl] cp e jp c, .asm_21f45 jr .asm_21f32 .asm_21eff - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld a, [hl] - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld d, [hl] - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, bc ld e, [hl] sub e @@ -1104,7 +1104,7 @@ Music8_ApplyPitchBend: ; 21eb8 (8:5eb8) ld a, d sbc b ld d, a - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, bc ld a, [hl] add a @@ -1115,79 +1115,79 @@ Music8_ApplyPitchBend: ; 21eb8 (8:5eb8) ld a, d sbc b ld d, a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld a, d cp [hl] jr c, .asm_21f45 jr nz, .asm_21f32 - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, e cp [hl] jr c, .asm_21f45 .asm_21f32 - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld [hl], e - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld [hl], d ld b, $3 - call Func_21ff7 + call Audio2_21ff7 ld a, e ld [hli], a ld [hl], d ret .asm_21f45 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc res 4, [hl] res 5, [hl] ret -Func_21f4e: ; 21f4e (8:5f4e) - ld hl, wc096 +Audio2_21f4e: + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld [hl], d - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld [hl], e - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, bc ld a, [hl] - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, bc sub [hl] jr nc, .asm_21f66 ld a, $1 .asm_21f66 ld [hl], a - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, e sub [hl] ld e, a ld a, d sbc b - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc sub [hl] jr c, .asm_21f82 ld d, a ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 5, [hl] jr .asm_21fa5 .asm_21f82 - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld d, [hl] - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld e, [hl] - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, [hl] sub e @@ -1195,17 +1195,17 @@ Func_21f4e: ; 21f4e (8:5f4e) ld a, d sbc b ld d, a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld a, [hl] sub d ld d, a ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc res 5, [hl] .asm_21fa5 - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, bc .asm_21fa9 inc b @@ -1224,20 +1224,20 @@ Func_21f4e: ; 21f4e (8:5f4e) add [hl] ld d, b ld b, $0 - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, bc ld [hl], d - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, bc ld [hl], a - ld hl, wc08e + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart add hl, bc ld [hl], a ret -Music8_ApplyDutyCycle: ; 21fcc (8:5fcc) +Audio2_ApplyDutyCycle: ld b, $0 - ld hl, wc046 + ld hl, wChannelDutyCycles add hl, bc ld a, [hl] rlca @@ -1246,19 +1246,19 @@ Music8_ApplyDutyCycle: ; 21fcc (8:5fcc) and $c0 ld d, a ld b, $1 - call Func_21ff7 + call Audio2_21ff7 ld a, [hl] and $3f or d ld [hl], a ret -Music8_GetNextMusicByte: ; 21fe4 (8:5fe4) +Audio2_GetNextMusicByte: ld d, $0 ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de ld a, [hli] ld e, a @@ -1271,7 +1271,7 @@ Music8_GetNextMusicByte: ; 21fe4 (8:5fe4) ld [hl], d ret -Func_21ff7: ; 21ff7 (8:5ff7) +Audio2_21ff7: 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) +Audio2_22006: ld h, $0 .loop srl a @@ -1300,20 +1300,20 @@ Func_22006: ; 22006 (8:6006) .done ret -Func_22017: ; 22017 (8:6017) +Audio2_22017: ld h, $0 ld l, a add hl, hl ld d, h ld e, l - ld hl, Music8_Pitches + ld hl, Audio2_Pitches add hl, de ld e, [hl] inc hl ld d, [hl] ld a, b .loop - cp CH7 + cp Ch7 jr z, .done sra d rr e @@ -1325,102 +1325,102 @@ Func_22017: ; 22017 (8:6017) ld d, a ret -Func_22035:: ; 22035 (8:6035) - ld [wc001], a +Audio2_PlaySound:: + ld [wSoundID], a cp $ff - jp z, Func_221f3 + jp z, Audio2_221f3 cp $e9 - jp z, Func_2210d - jp c, Func_2210d + jp z, Audio2_2210d + jp c, Audio2_2210d cp $fe jr z, .asm_2204c - jp nc, Func_2210d + jp nc, Audio2_2210d .asm_2204c xor a - ld [wc000], a - ld [wc003], a - ld [wc0e9], a - ld [wc0e6], a - ld [wc0e7], a + ld [wUnusedC000], a + ld [wDisableChannelOutputWhenSfxEnds], a + ld [wMusicTempo + 1], a + ld [wMusicWaveInstrument], a + ld [wSfxWaveInstrument], a ld d, $8 - ld hl, wc016 - call FillMusicRAM8 - ld hl, wc006 - call FillMusicRAM8 + ld hl, wChannelReturnAddresses + call FillAudioRAM2 + ld hl, wChannelCommandPointers + call FillAudioRAM2 ld d, $4 - ld hl, wc026 - call FillMusicRAM8 - ld hl, wc02e - call FillMusicRAM8 - ld hl, wc03e - call FillMusicRAM8 - ld hl, wc046 - call FillMusicRAM8 - ld hl, wc04e - call FillMusicRAM8 - ld hl, wc056 - call FillMusicRAM8 - ld hl, wc05e - call FillMusicRAM8 - ld hl, wc066 - call FillMusicRAM8 - ld hl, wc06e - call FillMusicRAM8 - ld hl, wc036 - call FillMusicRAM8 - ld hl, wc076 - call FillMusicRAM8 - ld hl, wc07e - call FillMusicRAM8 - ld hl, wc086 - call FillMusicRAM8 - ld hl, wc08e - call FillMusicRAM8 - ld hl, wc096 - call FillMusicRAM8 - ld hl, wc09e - call FillMusicRAM8 - ld hl, wc0a6 - call FillMusicRAM8 - ld hl, wc0ae - call FillMusicRAM8 + ld hl, wChannelSoundIDs + call FillAudioRAM2 + ld hl, wChannelFlags1 + call FillAudioRAM2 + ld hl, wChannelDuties + call FillAudioRAM2 + ld hl, wChannelDutyCycles + call FillAudioRAM2 + ld hl, wChannelVibratoDelayCounters + call FillAudioRAM2 + ld hl, wChannelVibratoExtents + call FillAudioRAM2 + ld hl, wChannelVibratoRates + call FillAudioRAM2 + ld hl, wChannelFrequencyLowBytes + call FillAudioRAM2 + ld hl, wChannelVibratoDelayCounterReloadValues + call FillAudioRAM2 + ld hl, wChannelFlags2 + call FillAudioRAM2 + ld hl, wChannelPitchBendLengthModifiers + call FillAudioRAM2 + ld hl, wChannelPitchBendFrequencySteps + call FillAudioRAM2 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart + call FillAudioRAM2 + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart + call FillAudioRAM2 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes + call FillAudioRAM2 + ld hl, wChannelPitchBendCurrentFrequencyLowBytes + call FillAudioRAM2 + ld hl, wChannelPitchBendTargetFrequencyHighBytes + call FillAudioRAM2 + ld hl, wChannelPitchBendTargetFrequencyLowBytes + call FillAudioRAM2 ld a, $1 - ld hl, wc0be - call FillMusicRAM8 - ld hl, wc0b6 - call FillMusicRAM8 - ld hl, wc0c6 - call FillMusicRAM8 - ld [wc0e8], a + ld hl, wChannelLoopCounters + call FillAudioRAM2 + ld hl, wChannelNoteDelayCounters + call FillAudioRAM2 + ld hl, wChannelNoteSpeeds + call FillAudioRAM2 + ld [wMusicTempo], a ld a, $ff - ld [wc004], a + ld [wStereoPanning], a xor a - ld [$ff24], a + ld [rNR50], a ld a, $8 - ld [$ff10], a + ld [rNR10], a ld a, $0 - ld [$ff25], a + ld [rNR51], a xor a - ld [$ff1a], a + ld [rNR30], a ld a, $80 - ld [$ff1a], a + ld [rNR30], a ld a, $77 - ld [$ff24], a - jp Func_2224e + ld [rNR50], a + jp Audio2_2224e -Func_2210d: ; 2210d (8:610d) +Audio2_2210d: ld l, a ld e, a ld h, $0 ld d, h add hl, hl add hl, de - ld de, SFX_Headers_08 + ld de, SFX_Headers_2 add hl, de ld a, h - ld [wc0ec], a + ld [wSfxHeaderPointer], a ld a, l - ld [wc0ed], a + ld [wSfxHeaderPointer + 1], a ld a, [hl] and $c0 rlca @@ -1433,9 +1433,9 @@ Func_2210d: ; 2210d (8:610d) add c ld c, a ld b, $0 - ld a, [wc0ec] + ld a, [wSfxHeaderPointer] ld h, a - ld a, [wc0ed] + ld a, [wSfxHeaderPointer + 1] ld l, a add hl, bc ld c, d @@ -1443,7 +1443,7 @@ Func_2210d: ; 2210d (8:610d) and $f ld e, a ld d, $0 - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, de ld a, [hl] and a @@ -1451,7 +1451,7 @@ Func_2210d: ; 2210d (8:610d) ld a, e cp $7 jr nz, .asm_22159 - ld a, [wc001] + ld a, [wSoundID] cp $14 jr nc, .asm_22152 ret @@ -1461,7 +1461,7 @@ Func_2210d: ; 2210d (8:610d) jr z, .asm_22162 jr c, .asm_22162 .asm_22159 - ld a, [wc001] + ld a, [wSoundID] cp [hl] jr z, .asm_22162 jr c, .asm_22162 @@ -1474,132 +1474,132 @@ Func_2210d: ; 2210d (8:610d) add hl, hl ld d, h ld e, l - ld hl, wc016 + ld hl, wChannelReturnAddresses add hl, de ld [hli], a ld [hl], a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de ld [hli], a ld [hl], a pop de - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, de ld [hl], a - ld hl, wc02e + ld hl, wChannelFlags1 add hl, de ld [hl], a - ld hl, wc03e + ld hl, wChannelDuties add hl, de ld [hl], a - ld hl, wc046 + ld hl, wChannelDutyCycles add hl, de ld [hl], a - ld hl, wc04e + ld hl, wChannelVibratoDelayCounters add hl, de ld [hl], a - ld hl, wc056 + ld hl, wChannelVibratoExtents add hl, de ld [hl], a - ld hl, wc05e + ld hl, wChannelVibratoRates add hl, de ld [hl], a - ld hl, wc066 + ld hl, wChannelFrequencyLowBytes add hl, de ld [hl], a - ld hl, wc06e + ld hl, wChannelVibratoDelayCounterReloadValues add hl, de ld [hl], a - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, de ld [hl], a - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, de ld [hl], a - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, de ld [hl], a - ld hl, wc08e + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart add hl, de ld [hl], a - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, de ld [hl], a - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, de ld [hl], a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, de ld [hl], a - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, de ld [hl], a - ld hl, wc036 + ld hl, wChannelFlags2 add hl, de ld [hl], a ld a, $1 - ld hl, wc0be + ld hl, wChannelLoopCounters add hl, de ld [hl], a - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, de ld [hl], a - ld hl, wc0c6 + ld hl, wChannelNoteSpeeds add hl, de ld [hl], a ld a, e cp $4 jr nz, .asm_221ea ld a, $8 - ld [$ff10], a + ld [rNR10], a .asm_221ea ld a, c and a - jp z, Func_2224e + jp z, Audio2_2224e dec c jp .asm_22126 -Func_221f3: ; 221f3 (8:61f3) +Audio2_221f3: ld a, $80 - ld [$ff26], a - ld [$ff1a], a + ld [rNR52], a + ld [rNR30], a xor a - ld [$ff25], a - ld [$ff1c], a + ld [rNR51], a + ld [rNR32], a ld a, $8 - ld [$ff10], a - ld [$ff12], a - ld [$ff17], a - ld [$ff21], a + ld [rNR10], a + ld [rNR12], a + ld [rNR22], a + ld [rNR42], a ld a, $40 - ld [$ff14], a - ld [$ff19], a - ld [$ff23], a + ld [rNR14], a + ld [rNR24], a + ld [rNR44], a ld a, $77 - ld [$ff24], a + ld [rNR50], a xor a - ld [wc000], a - ld [wc003], a - ld [wc002], a - ld [wc0e9], a - ld [wc0eb], a - ld [wc0e6], a - ld [wc0e7], a + ld [wUnusedC000], a + ld [wDisableChannelOutputWhenSfxEnds], a + ld [wMuteAudioAndPauseMusic], a + ld [wMusicTempo + 1], a + ld [wSfxTempo + 1], a + ld [wMusicWaveInstrument], a + ld [wSfxWaveInstrument], a ld d, $a0 - ld hl, wc006 - call FillMusicRAM8 + ld hl, wChannelCommandPointers + call FillAudioRAM2 ld a, $1 ld d, $18 - ld hl, wc0b6 - call FillMusicRAM8 - ld [wc0e8], a - ld [wc0ea], a + ld hl, wChannelNoteDelayCounters + call FillAudioRAM2 + ld [wMusicTempo], a + ld [wSfxTempo], a ld a, $ff - ld [wc004], a + ld [wStereoPanning], a ret ; fills d bytes at hl with a -FillMusicRAM8: ; 22248 (8:6248) +FillAudioRAM2: ld b, d .loop ld [hli], a @@ -1607,19 +1607,19 @@ FillMusicRAM8: ; 22248 (8:6248) jr nz, .loop ret -Func_2224e: ; 2224e (8:624e) - ld a, [wc001] +Audio2_2224e: + ld a, [wSoundID] ld l, a ld e, a ld h, $0 ld d, h add hl, hl add hl, de - ld de, SFX_Headers_08 + ld de, SFX_Headers_2 add hl, de ld e, l ld d, h - ld hl, wc006 + ld hl, wChannelCommandPointers ld a, [de] ; get channel number ld b, a rlca @@ -1645,14 +1645,14 @@ Func_2224e: ; 2224e (8:624e) push af ld b, $0 ld c, a - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, bc - ld a, [wc001] + ld a, [wSoundID] ld [hl], a pop af cp $3 jr c, .asm_22291 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 2, [hl] .asm_22291 @@ -1671,53 +1671,53 @@ Func_2224e: ; 2224e (8:624e) ld a, [de] inc de jr nz, .asm_22270 - ld a, [wc001] + ld a, [wSoundID] cp $14 jr nc, .asm_222aa jr .asm_222d4 .asm_222aa - ld a, [wc001] + ld a, [wSoundID] cp $86 jr z, .asm_222d4 jr c, .asm_222b5 jr .asm_222d4 .asm_222b5 - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wc012 ; sfx noise channel pointer - ld de, Noise8_endchannel + ld hl, wChannelCommandPointers + Ch6 * 2 ; sfx noise channel pointer + ld de, Noise2_endchannel ld [hl], e inc hl ld [hl], d ; overwrite pointer to point to endchannel - ld a, [wc005] + ld a, [wSavedVolume] and a jr nz, .asm_222d4 - ld a, [$ff24] - ld [wc005], a + ld a, [rNR50] + ld [wSavedVolume], a ld a, $77 - ld [$ff24], a + ld [rNR50], a .asm_222d4 ret -Noise8_endchannel: ; 222d5 (8:62d5) +Noise2_endchannel: endchannel -Unknown_222d6: ; 222d6 (8:62d6) +Unknown_222d6: db $10, $15, $1A, $1F ; channels 0-3 db $10, $15, $1A, $1F ; channels 4-7 -Unknown_222de: ; 222de (8:62de) +Unknown_222de: db $EE, $DD, $BB, $77 ; channels 0-3 db $EE, $DD, $BB, $77 ; channels 4-7 -Unknown_222e6: ; 222e6 (8:62e6) +Unknown_222e6: db $11, $22, $44, $88 ; channels 0-3 db $11, $22, $44, $88 ; channels 4-7 -Music8_Pitches: ; 222ee (8:62ee) +Audio2_Pitches: dw $F82C ; C_ dw $F89D ; C# dw $F907 ; D_ diff --git a/audio/engine_3.asm b/audio/engine_3.asm index fabdecef..bd784023 100644 --- a/audio/engine_3.asm +++ b/audio/engine_3.asm @@ -1,89 +1,89 @@ ; The third of three duplicated sound engines. -Music1f_UpdateMusic:: ; 7d177 (1f:5177) - ld c, CH0 +Audio3_UpdateMusic:: + ld c, Ch0 .loop ld b, $0 - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, bc ld a, [hl] and a jr z, .nextChannel ld a, c - cp CH4 + cp Ch4 jr nc, .applyAffects ; if sfx channel - ld a, [wc002] + ld a, [wMuteAudioAndPauseMusic] and a jr z, .applyAffects bit 7, a jr nz, .nextChannel set 7, a - ld [wc002], a + ld [wMuteAudioAndPauseMusic], a xor a - ld [$ff25], a - ld [$ff1a], a + ld [rNR51], a + ld [rNR30], a ld a, $80 - ld [$ff1a], a + ld [rNR30], a jr .nextChannel .applyAffects - call Music1f_ApplyMusicAffects + call Audio3_ApplyMusicAffects .nextChannel ld a, c inc c ; inc channel number - cp CH7 + cp Ch7 jr nz, .loop ret ; this routine checks flags for music effects currently applied ; to the channel and calls certain functions based on flags. -; known flags for wc02e: -; 0: toggleperfectpitch has been used -; 1: call has been used -; 3: a toggle used only by this routine for vibrato -; 4: pitchbend flag -; 6: dutycycle flag -Music1f_ApplyMusicAffects: ; 7d1ac (1f:51ac) +; known flags for wChannelFlags1: +; 0: toggleperfectpitch has been used +; 1: call has been used +; 3: a toggle used only by this routine for vibrato +; 4: pitchbend flag +; 6: dutycycle flag +Audio3_ApplyMusicAffects: ld b, $0 - ld hl, wc0b6 ; delay until next note + ld hl, wChannelNoteDelayCounters ; delay until next note add hl, bc ld a, [hl] cp $1 ; if delay is 1, play next note - jp z, Music1f_PlayNextNote + jp z, Audio3_PlayNextNote dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c - cp CH4 + cp Ch4 jr nc, .startChecks ; if a sfx channel - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 add hl, bc ld a, [hl] and a jr z, .startChecks ret .startChecks - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 6, [hl] ; dutycycle jr z, .checkForExecuteMusic - call Music1f_ApplyDutyCycle + call Audio3_ApplyDutyCycle .checkForExecuteMusic ld b, $0 - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc bit 0, [hl] jr nz, .checkForPitchBend - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 2, [hl] jr nz, .disablePitchBendVibrato .checkForPitchBend - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 4, [hl] ; pitchbend jr z, .checkVibratoDelay - jp Music1f_ApplyPitchBend + jp Audio3_ApplyPitchBend .checkVibratoDelay - ld hl, wc04e ; vibrato delay + ld hl, wChannelVibratoDelayCounters ; vibrato delay add hl, bc ld a, [hl] and a ; check if delay is over @@ -92,7 +92,7 @@ Music1f_ApplyMusicAffects: ; 7d1ac (1f:51ac) .disablePitchBendVibrato ret .checkForVibrato - ld hl, wc056 ; vibrato rate + ld hl, wChannelVibratoExtents ; vibrato rate add hl, bc ld a, [hl] and a @@ -100,7 +100,7 @@ Music1f_ApplyMusicAffects: ; 7d1ac (1f:51ac) ret ; no vibrato .vibrato ld d, a - ld hl, wc05e + ld hl, wChannelVibratoRates add hl, bc ld a, [hl] and $f @@ -113,10 +113,10 @@ Music1f_ApplyMusicAffects: ; 7d1ac (1f:51ac) swap [hl] or [hl] ld [hl], a ; reset the vibrato value and start again - ld hl, wc066 + ld hl, wChannelFrequencyLowBytes add hl, bc ld e, [hl] ; get note pitch - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 3, [hl] ; this is the only code that sets/resets bit three so jr z, .unset ; it continuously alternates which path it takes @@ -141,59 +141,59 @@ Music1f_ApplyMusicAffects: ; 7d1ac (1f:51ac) .done ld d, a ld b, $3 - call Func_7d8ac + call Audio3_7d8ac 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 -Music1f_PlayNextNote: ; 7d244 (1f:5244) - ld hl, wc06e +Audio3_PlayNextNote: + ld hl, wChannelVibratoDelayCounterReloadValues add hl, bc ld a, [hl] - ld hl, wc04e + ld hl, wChannelVibratoDelayCounters add hl, bc ld [hl], a - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc res 4, [hl] res 5, [hl] - call Music1f_endchannel + call Audio3_endchannel ret -Music1f_endchannel: ; 7d25a (1f:525a) - call Music1f_GetNextMusicByte +Audio3_endchannel: + call Audio3_GetNextMusicByte ld d, a cp $ff ; is this command an endchannel? - jp nz, Music1f_callchannel ; no + jp nz, Audio3_callchannel ; no ld b, $0 ; yes - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 1, [hl] jr nz, .returnFromCall ld a, c - cp CH3 + cp Ch3 jr nc, .noiseOrSfxChannel jr .asm_7d2b3 .noiseOrSfxChannel res 2, [hl] - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc res 0, [hl] - cp CH6 + cp Ch6 jr nz, .notSfxChannel3 ld a, $0 - ld [$ff1a], a + ld [rNR30], a ld a, $80 - ld [$ff1a], a + ld [rNR30], a .notSfxChannel3 jr nz, .asm_7d296 - ld a, [wc003] + ld a, [wDisableChannelOutputWhenSfxEnds] and a jr z, .asm_7d296 xor a - ld [wc003], a + ld [wDisableChannelOutputWhenSfxEnds], a jr .asm_7d2b3 .asm_7d296 jr .asm_7d2bc @@ -203,10 +203,10 @@ Music1f_endchannel: ; 7d25a (1f:525a) ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de push hl ; store current channel address - ld hl, wc016 + ld hl, wChannelReturnAddresses add hl, de ld e, l ld d, h @@ -216,47 +216,47 @@ Music1f_endchannel: ; 7d25a (1f:525a) inc de ld a, [de] ld [hl], a ; loads channel address to return to - jp Music1f_endchannel + jp Audio3_endchannel .asm_7d2b3 ld hl, Unknown_7db93 add hl, bc - ld a, [$ff25] + ld a, [rNR51] and [hl] - ld [$ff25], a + ld [rNR51], a .asm_7d2bc - ld a, [wc02a] + ld a, [wChannelSoundIDs + Ch4] cp $14 jr nc, .asm_7d2c5 jr .asm_7d2e2 .asm_7d2c5 - ld a, [wc02a] + ld a, [wChannelSoundIDs + Ch4] cp $86 jr z, .asm_7d2e2 jr c, .asm_7d2d0 jr .asm_7d2e2 .asm_7d2d0 ld a, c - cp CH4 + cp Ch4 jr z, .asm_7d2d9 - call Func_7d73b + call Audio3_7d73b ret c .asm_7d2d9 - ld a, [wc005] - ld [$ff24], a + ld a, [wSavedVolume] + ld [rNR50], a xor a - ld [wc005], a + ld [wSavedVolume], a .asm_7d2e2 - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, bc ld [hl], b ret -Music1f_callchannel: ; 7d2e8 (1f:52e8) +Audio3_callchannel: cp $fd ; is this command a callchannel? - jp nz, Music1f_loopchannel ; no - call Music1f_GetNextMusicByte ; yes + jp nz, Audio3_loopchannel ; no + call Audio3_GetNextMusicByte ; yes push af - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte ld d, a pop af ld e, a @@ -265,10 +265,10 @@ Music1f_callchannel: ; 7d2e8 (1f:52e8) ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de push hl - ld hl, wc016 + ld hl, wChannelReturnAddresses add hl, de ld e, l ld d, h @@ -283,73 +283,73 @@ Music1f_callchannel: ; 7d2e8 (1f:52e8) inc hl ld [hl], d ; overwrite current address with pointer ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 1, [hl] ; set the call flag - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_loopchannel: ; 7d31d (1f:531d) +Audio3_loopchannel: cp $fe ; is this command a loopchannel? - jp nz, Music1f_notetype ; no - call Music1f_GetNextMusicByte ; yes + jp nz, Audio3_notetype ; no + call Audio3_GetNextMusicByte ; yes ld e, a and a jr z, .infiniteLoop ld b, $0 - ld hl, wc0be + ld hl, wChannelLoopCounters add hl, bc ld a, [hl] cp e jr nz, .loopAgain ld a, $1 ; if no more loops to make ld [hl], a - call Music1f_GetNextMusicByte ; skip pointer - call Music1f_GetNextMusicByte - jp Music1f_endchannel + call Audio3_GetNextMusicByte ; skip pointer + call Audio3_GetNextMusicByte + jp Audio3_endchannel .loopAgain ; inc loop count inc a ld [hl], a ; fall through .infiniteLoop ; overwrite current address with pointer - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte push af - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte ld b, a ld d, $0 ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de pop af ld [hli], a ld [hl], b - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_notetype: ; 7d358 (1f:5358) +Audio3_notetype: and $f0 cp $d0 ; is this command a notetype? - jp nz, Music1f_toggleperfectpitch ; no + jp nz, Audio3_toggleperfectpitch ; no ld a, d ; yes and $f ld b, $0 - ld hl, wc0c6 + ld hl, wChannelNoteSpeeds add hl, bc ld [hl], a ; store low nibble as speed ld a, c - cp CH3 + cp Ch3 jr z, .noiseChannel ; noise channel has 0 params - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte ld d, a ld a, c - cp CH2 + cp Ch2 jr z, .musicChannel3 - cp CH6 + cp Ch6 jr nz, .notChannel3 - ld hl, wc0e7 + ld hl, wSfxWaveInstrument jr .sfxChannel3 .musicChannel3 - ld hl, wc0e6 + ld hl, wMusicWaveInstrument .sfxChannel3 ld a, d and $f @@ -364,41 +364,41 @@ Music1f_notetype: ; 7d358 (1f:5358) ; else, store volume (high nibble) and fade (low nibble) .notChannel3 ld b, $0 - ld hl, wc0de + ld hl, wChannelVolumes add hl, bc ld [hl], d .noiseChannel - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_toggleperfectpitch: ; 7d397 (1f:5397) +Audio3_toggleperfectpitch: ld a, d cp $e8 ; is this command a toggleperfectpitch? - jr nz, Music1f_vibrato ; no + jr nz, Audio3_vibrato ; no ld b, $0 ; yes - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc ld a, [hl] xor $1 - ld [hl], a ; flip bit 0 of wc02e - jp Music1f_endchannel + ld [hl], a ; flip bit 0 of wChannelFlags1 + jp Audio3_endchannel -Music1f_vibrato: ; 7d3a9 (1f:53a9) +Audio3_vibrato: cp $ea ; is this command a vibrato? - jr nz, Music1f_pitchbend ; no - call Music1f_GetNextMusicByte ; yes + jr nz, Audio3_pitchbend ; no + call Audio3_GetNextMusicByte ; yes ld b, $0 - ld hl, wc04e + ld hl, wChannelVibratoDelayCounters add hl, bc ld [hl], a ; store delay - ld hl, wc06e + ld hl, wChannelVibratoDelayCounterReloadValues add hl, bc ld [hl], a ; store delay - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte ld d, a and $f0 swap a ld b, $0 - ld hl, wc056 + ld hl, wChannelVibratoExtents add hl, bc srl a ld e, a @@ -409,226 +409,226 @@ Music1f_vibrato: ; 7d3a9 (1f:53a9) ld a, d and $f ld d, a - ld hl, wc05e + ld hl, wChannelVibratoRates add hl, bc swap a or d ld [hl], a ; store depth as both high and low nibbles - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_pitchbend: ; 7d3e1 (1f:53e1) +Audio3_pitchbend: cp $eb ; is this command a pitchbend? - jr nz, Music1f_duty ; no - call Music1f_GetNextMusicByte ; yes + jr nz, Audio3_duty ; no + call Audio3_GetNextMusicByte ; yes ld b, $0 - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, bc ld [hl], a ; store first param - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte ld d, a and $f0 swap a ld b, a ld a, d and $f - call Func_7d8cc + call Audio3_7d8cc ld b, $0 - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld [hl], d ; store unknown part of second param - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld [hl], e ; store unknown part of second param ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 4, [hl] ; set pitchbend flag - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte ld d, a - jp Music1f_notelength + jp Audio3_notelength -Music1f_duty: ; 7d419 (1f:5419) +Audio3_duty: cp $ec ; is this command a duty? - jr nz, Music1f_tempo ; no - call Music1f_GetNextMusicByte ; yes + jr nz, Audio3_tempo ; no + call Audio3_GetNextMusicByte ; yes rrca rrca and $c0 ld b, $0 - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld [hl], a ; store duty - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_tempo: ; 7d42e (1f:542e) +Audio3_tempo: cp $ed ; is this command a tempo? - jr nz, Music1f_stereopanning ; no + jr nz, Audio3_stereopanning ; no ld a, c ; yes - cp CH4 + cp Ch4 jr nc, .sfxChannel - call Music1f_GetNextMusicByte - ld [wc0e8], a ; store first param - call Music1f_GetNextMusicByte - ld [wc0e9], a ; store second param + call Audio3_GetNextMusicByte + ld [wMusicTempo], a ; store first param + call Audio3_GetNextMusicByte + ld [wMusicTempo + 1], a ; store second param xor a - ld [wc0ce], a ; clear RAM - ld [wc0cf], a - ld [wc0d0], a - ld [wc0d1], a + ld [wChannelNoteDelayCountersFractionalPart], a ; clear RAM + ld [wChannelNoteDelayCountersFractionalPart + 1], a + ld [wChannelNoteDelayCountersFractionalPart + 2], a + ld [wChannelNoteDelayCountersFractionalPart + 3], a jr .musicChannelDone .sfxChannel - call Music1f_GetNextMusicByte - ld [wc0ea], a ; store first param - call Music1f_GetNextMusicByte - ld [wc0eb], a ; store second param + call Audio3_GetNextMusicByte + ld [wSfxTempo], a ; store first param + call Audio3_GetNextMusicByte + ld [wSfxTempo + 1], a ; store second param xor a - ld [wc0d2], a ; clear RAM - ld [wc0d3], a - ld [wc0d4], a - ld [wc0d5], a + ld [wChannelNoteDelayCountersFractionalPart + 4], a ; clear RAM + ld [wChannelNoteDelayCountersFractionalPart + 5], a + ld [wChannelNoteDelayCountersFractionalPart + 6], a + ld [wChannelNoteDelayCountersFractionalPart + 7], a .musicChannelDone - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_stereopanning: ; 7d46e (1f:546e) +Audio3_stereopanning: cp $ee ; is this command a stereopanning? - jr nz, Music1f_unknownmusic0xef ; no - call Music1f_GetNextMusicByte ; yes - ld [wc004], a ; store panning - jp Music1f_endchannel + jr nz, Audio3_unknownmusic0xef ; no + call Audio3_GetNextMusicByte ; yes + ld [wStereoPanning], a ; store panning + jp Audio3_endchannel ; this appears to never be used -Music1f_unknownmusic0xef: ; 7d47b (1f:547b) +Audio3_unknownmusic0xef: cp $ef ; is this command an unknownmusic0xef? - jr nz, Music1f_dutycycle ; no - call Music1f_GetNextMusicByte ; yes + jr nz, Audio3_dutycycle ; no + call Audio3_GetNextMusicByte ; yes push bc - call Func_7d8ea + call Audio3_PlaySound pop bc - ld a, [wc003] + ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .skip - ld a, [wc02d] - ld [wc003], a + ld a, [wChannelSoundIDs + Ch7] + ld [wDisableChannelOutputWhenSfxEnds], a xor a - ld [wc02d], a + ld [wChannelSoundIDs + Ch7], a .skip - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_dutycycle: ; 7d49a (1f:549a) +Audio3_dutycycle: cp $fc ; is this command a dutycycle? - jr nz, Music1f_volume ; no - call Music1f_GetNextMusicByte ; yes + jr nz, Audio3_volume ; no + call Audio3_GetNextMusicByte ; yes ld b, $0 - ld hl, wc046 + ld hl, wChannelDutyCycles add hl, bc ld [hl], a ; store full cycle and $c0 - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld [hl], a ; store first duty - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 6, [hl] ; set duty flag - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_volume: ; 7d4b8 (1f:54b8) +Audio3_volume: cp $f0 ; is this command a volume? - jr nz, Music1f_executemusic ; no - call Music1f_GetNextMusicByte ; yes - ld [$ff24], a ; store volume - jp Music1f_endchannel + jr nz, Audio3_executemusic ; no + call Audio3_GetNextMusicByte ; yes + ld [rNR50], a ; store volume + jp Audio3_endchannel -Music1f_executemusic: ; 7d4c4 (1f:54c4) +Audio3_executemusic: cp $f8 ; is this command an executemusic? - jr nz, Music1f_octave ; no + jr nz, Audio3_octave ; no ld b, $0 ; yes - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc set 0, [hl] - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_octave: ; 7d4d3 (1f:54d3) +Audio3_octave: and $f0 cp $e0 ; is this command an octave? - jr nz, Music1f_unknownsfx0x20 ; no - ld hl, wc0d6 ; yes + jr nz, Audio3_unknownsfx0x20 ; no + ld hl, wChannelOctaves ; yes ld b, $0 add hl, bc ld a, d and $f ld [hl], a ; store low nibble as octave - jp Music1f_endchannel + jp Audio3_endchannel -Music1f_unknownsfx0x20: ; 7d4e6 (1f:54e6) +Audio3_unknownsfx0x20: cp $20 ; is this command an unknownsfx0x20? - jr nz, Music1f_unknownsfx0x10 ; no + jr nz, Audio3_unknownsfx0x10 ; no ld a, c - cp CH3 ; is this a noise or sfx channel? - jr c, Music1f_unknownsfx0x10 ; no + cp Ch3 ; is this a noise or sfx channel? + jr c, Audio3_unknownsfx0x10 ; no ld b, $0 - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc bit 0, [hl] - jr nz, Music1f_unknownsfx0x10 ; no - call Music1f_notelength ; yes + jr nz, Audio3_unknownsfx0x10 ; no + call Audio3_notelength ; yes ld d, a ld b, $0 - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld a, [hl] or d ld d, a ld b, $1 - call Func_7d8ac + call Audio3_7d8ac ld [hl], d - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte ld d, a ld b, $2 - call Func_7d8ac + call Audio3_7d8ac ld [hl], d - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte ld e, a ld a, c - cp CH7 + cp Ch7 ld a, $0 jr z, .sfxNoiseChannel ; only two params for noise channel push de - call Music1f_GetNextMusicByte + call Audio3_GetNextMusicByte pop de .sfxNoiseChannel ld d, a push de - call Func_7d69d - call Func_7d66c + call Audio3_7d69d + call Audio3_7d66c pop de - call Func_7d6bf + call Audio3_7d6bf ret -Music1f_unknownsfx0x10 ; 7d533 (1f:5533) +Audio3_unknownsfx0x10: ld a, c - cp CH4 - jr c, Music1f_note ; if not a sfx + cp Ch4 + jr c, Audio3_note ; if not a sfx ld a, d cp $10 ; is this command an unknownsfx0x10? - jr nz, Music1f_note ; no + jr nz, Audio3_note ; no ld b, $0 - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc bit 0, [hl] - jr nz, Music1f_note ; no - call Music1f_GetNextMusicByte ; yes - ld [$ff10], a - jp Music1f_endchannel + jr nz, Audio3_note ; no + call Audio3_GetNextMusicByte ; yes + ld [rNR10], a + jp Audio3_endchannel -Music1f_note: ; 7d54f (1f:554f) +Audio3_note: ld a, c - cp CH3 - jr nz, Music1f_notelength ; if not noise channel + cp Ch3 + jr nz, Audio3_notelength ; if not noise channel ld a, d and $f0 cp $b0 ; is this command a dnote? - jr z, Music1f_dnote ; yes - jr nc, Music1f_notelength ; no + jr z, Audio3_dnote ; yes + jr nc, Audio3_notelength ; no swap a ld b, a ld a, d @@ -639,24 +639,24 @@ Music1f_note: ; 7d54f (1f:554f) push bc jr asm_7d571 -Music1f_dnote: ; 7d569 (1f:5569) +Audio3_dnote: ld a, d and $f push af push bc - call Music1f_GetNextMusicByte ; get dnote instrument + call Audio3_GetNextMusicByte ; get dnote instrument asm_7d571 ld d, a - ld a, [wc003] + ld a, [wDisableChannelOutputWhenSfxEnds] and a jr nz, .asm_7d57c ld a, d - call Func_7d8ea + call Audio3_PlaySound .asm_7d57c pop bc pop de -Music1f_notelength: ; 7d57e (1f:557e) +Audio3_notelength: ld a, d push af and $f @@ -664,65 +664,65 @@ Music1f_notelength: ; 7d57e (1f:557e) ld b, $0 ld e, a ; store note length (in 16ths) ld d, b - ld hl, wc0c6 + ld hl, wChannelNoteSpeeds add hl, bc ld a, [hl] ld l, b - call Func_7d8bb + call Audio3_7d8bb ld a, c - cp CH4 + cp Ch4 jr nc, .sfxChannel - ld a, [wc0e8] + ld a, [wMusicTempo] ld d, a - ld a, [wc0e9] + ld a, [wMusicTempo + 1] ld e, a jr .skip .sfxChannel ld d, $1 ld e, $0 - cp CH7 + cp Ch7 jr z, .skip ; if noise channel - call Func_7d707 - ld a, [wc0ea] + call Audio3_7d707 + ld a, [wSfxTempo] ld d, a - ld a, [wc0eb] + ld a, [wSfxTempo + 1] ld e, a .skip ld a, l ld b, $0 - ld hl, wc0ce + ld hl, wChannelNoteDelayCountersFractionalPart add hl, bc ld l, [hl] - call Func_7d8bb + call Audio3_7d8bb ld e, l ld d, h - ld hl, wc0ce + ld hl, wChannelNoteDelayCountersFractionalPart add hl, bc ld [hl], e ld a, d - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, bc ld [hl], a - ld hl, wc036 + ld hl, wChannelFlags2 add hl, bc bit 0, [hl] - jr nz, Music1f_notepitch - ld hl, wc02e + jr nz, Audio3_notepitch + ld hl, wChannelFlags1 add hl, bc bit 2, [hl] - jr z, Music1f_notepitch + jr z, Audio3_notepitch pop hl ret -Music1f_notepitch: ; 7d5dc (1f:55dc) +Audio3_notepitch: pop af and $f0 cp $c0 ; compare to rest jr nz, .notRest ld a, c - cp CH4 + cp Ch4 jr nc, .sfxChannel - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 add hl, bc ld a, [hl] and a @@ -730,21 +730,21 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) ; fall through .sfxChannel ld a, c - cp CH2 + cp Ch2 jr z, .musicChannel3 - cp CH6 + cp Ch6 jr nz, .notSfxChannel3 .musicChannel3 ld b, $0 ld hl, Unknown_7db93 add hl, bc - ld a, [$ff25] + ld a, [rNR51] and [hl] - ld [$ff25], a + ld [rNR51], a jr .quit .notSfxChannel3 ld b, $2 - call Func_7d8ac + call Audio3_7d8ac ld a, $8 ld [hli], a inc hl @@ -755,22 +755,22 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) .notRest swap a ld b, $0 - ld hl, wc0d6 + ld hl, wChannelOctaves add hl, bc ld b, [hl] - call Func_7d8cc + call Audio3_7d8cc ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 4, [hl] jr z, .asm_7d62c - call Func_7d803 + call Audio3_7d803 .asm_7d62c push de ld a, c - cp CH4 + cp Ch4 jr nc, .skip ; if sfx Channel - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 ld d, $0 ld e, a add hl, de @@ -783,17 +783,17 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) ret .skip ld b, $0 - ld hl, wc0de + ld hl, wChannelVolumes add hl, bc ld d, [hl] ld b, $2 - call Func_7d8ac + call Audio3_7d8ac ld [hl], d - call Func_7d69d - call Func_7d66c + call Audio3_7d69d + call Audio3_7d66c pop de ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc bit 0, [hl] ; has toggleperfectpitch been used? jr z, .skip2 @@ -801,36 +801,36 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) jr nc, .skip2 inc d .skip2 - ld hl, wc066 + ld hl, wChannelFrequencyLowBytes add hl, bc ld [hl], e - call Func_7d6bf + call Audio3_7d6bf ret -Func_7d66c: ; 7d66c (1f:566c) +Audio3_7d66c: ld b, $0 ld hl, Unknown_7db9b add hl, bc - ld a, [$ff25] + ld a, [rNR51] or [hl] ld d, a ld a, c - cp CH7 + cp Ch7 jr z, .sfxNoiseChannel - cp CH4 + cp Ch4 jr nc, .skip ; if sfx channel - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 add hl, bc ld a, [hl] and a jr nz, .skip .sfxNoiseChannel - ld a, [wc004] + ld a, [wStereoPanning] ld hl, Unknown_7db9b add hl, bc and [hl] ld d, a - ld a, [$ff25] + ld a, [rNR51] ld hl, Unknown_7db93 add hl, bc and [hl] @@ -838,52 +838,52 @@ Func_7d66c: ; 7d66c (1f:566c) ld d, a .skip ld a, d - ld [$ff25], a + ld [rNR51], a ret -Func_7d69d: ; 7d69d (1f:569d) +Audio3_7d69d: ld b, $0 - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, bc ld d, [hl] ld a, c - cp CH2 + cp Ch2 jr z, .channel3 ; if music channel 3 - cp CH6 + cp Ch6 jr z, .channel3 ; if sfx channel 3 ld a, d and $3f ld d, a - ld hl, wc03e + ld hl, wChannelDuties add hl, bc ld a, [hl] or d ld d, a .channel3 ld b, $1 - call Func_7d8ac + call Audio3_7d8ac ld [hl], d ret -Func_7d6bf: ; 7d6bf (1f:56bf) +Audio3_7d6bf: ld a, c - cp CH2 + cp Ch2 jr z, .channel3 - cp CH6 + cp Ch6 jr nz, .notSfxChannel3 ; fall through .channel3 push de - ld de, wc0e6 - cp CH2 + ld de, wMusicWaveInstrument + cp Ch2 jr z, .musicChannel3 - ld de, wc0e7 + ld de, wSfxWaveInstrument .musicChannel3 ld a, [de] add a ld d, $0 ld e, a - ld hl, Music1f_WavePointers + ld hl, Audio3_WavePointers add hl, de ld e, [hl] inc hl @@ -891,7 +891,7 @@ Func_7d6bf: ; 7d6bf (1f:56bf) ld hl, $ff30 ld b, $f ld a, $0 - ld [$ff1a], a + ld [rNR30], a .loop ld a, [de] inc de @@ -901,7 +901,7 @@ Func_7d6bf: ; 7d6bf (1f:56bf) and a jr nz, .loop ld a, $80 - ld [$ff1a], a + ld [rNR30], a pop de .notSfxChannel3 ld a, d @@ -909,38 +909,38 @@ Func_7d6bf: ; 7d6bf (1f:56bf) and $c7 ld d, a ld b, $3 - call Func_7d8ac + call Audio3_7d8ac ld [hl], e inc hl ld [hl], d - call Func_7d729 + call Audio3_7d729 ret -Func_7d707: ; 7d707 (1f:5707) - call Func_7d759 +Audio3_7d707: + call Audio3_7d759 jr nc, .asm_7d71f ld d, $0 - ld a, [wc0f2] + ld a, [wTempoModifier] add $80 jr nc, .asm_7d716 inc d .asm_7d716 - ld [wc0eb], a + ld [wSfxTempo + 1], a ld a, d - ld [wc0ea], a + ld [wSfxTempo], a jr .asm_7d728 .asm_7d71f xor a - ld [wc0eb], a + ld [wSfxTempo + 1], a ld a, $1 - ld [wc0ea], a + ld [wSfxTempo], a .asm_7d728 ret -Func_7d729: ; 7d729 (1f:5729) - call Func_7d759 +Audio3_7d729: + call Audio3_7d759 jr nc, .asm_7d73a - ld a, [wc0f1] + ld a, [wFrequencyModifier] add e jr nc, .asm_7d735 inc d @@ -953,10 +953,10 @@ Func_7d729: ; 7d729 (1f:5729) .asm_7d73a ret -Func_7d73b: ; 7d73b (1f:573b) - call Func_7d759 +Audio3_7d73b: + call Audio3_7d759 jr nc, .asm_7d756 - ld hl, wc006 + ld hl, wChannelCommandPointers ld e, c ld d, $0 sla e @@ -976,8 +976,8 @@ Func_7d73b: ; 7d73b (1f:573b) ccf ret -Func_7d759: ; 7d759 (1f:5759) - ld a, [wc02a] +Audio3_7d759: + ld a, [wChannelSoundIDs + Ch4] cp $14 jr nc, .asm_7d762 jr .asm_7d768 @@ -993,28 +993,28 @@ Func_7d759: ; 7d759 (1f:5759) scf ret -Music1f_ApplyPitchBend: ; 7d76d (1f:576d) - ld hl, wc02e +Audio3_ApplyPitchBend: + ld hl, wChannelFlags1 add hl, bc bit 5, [hl] jp nz, .asm_7d7b4 - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld e, [hl] - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld d, [hl] - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, bc ld l, [hl] ld h, b add hl, de ld d, h ld e, l - ld hl, wc08e + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart add hl, bc push hl - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, bc ld a, [hl] pop hl @@ -1026,26 +1026,26 @@ Music1f_ApplyPitchBend: ; 7d76d (1f:576d) ld a, $0 adc d ld d, a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld a, [hl] cp d jp c, .asm_7d7fa jr nz, .asm_7d7e7 - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, [hl] cp e jp c, .asm_7d7fa jr .asm_7d7e7 .asm_7d7b4 - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld a, [hl] - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld d, [hl] - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, bc ld e, [hl] sub e @@ -1053,7 +1053,7 @@ Music1f_ApplyPitchBend: ; 7d76d (1f:576d) ld a, d sbc b ld d, a - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, bc ld a, [hl] add a @@ -1064,79 +1064,79 @@ Music1f_ApplyPitchBend: ; 7d76d (1f:576d) ld a, d sbc b ld d, a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld a, d cp [hl] jr c, .asm_7d7fa jr nz, .asm_7d7e7 - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, e cp [hl] jr c, .asm_7d7fa .asm_7d7e7 - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld [hl], e - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld [hl], d ld b, $3 - call Func_7d8ac + call Audio3_7d8ac ld a, e ld [hli], a ld [hl], d ret .asm_7d7fa - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc res 4, [hl] res 5, [hl] ret -Func_7d803: ; 7d803 (1f:5803) - ld hl, wc096 +Audio3_7d803: + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld [hl], d - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld [hl], e - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, bc ld a, [hl] - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, bc sub [hl] jr nc, .asm_7d81b ld a, $1 .asm_7d81b ld [hl], a - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, e sub [hl] ld e, a ld a, d sbc b - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc sub [hl] jr c, .asm_7d837 ld d, a ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 5, [hl] jr .asm_7d85a .asm_7d837 - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, bc ld d, [hl] - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, bc ld e, [hl] - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, bc ld a, [hl] sub e @@ -1144,17 +1144,17 @@ Func_7d803: ; 7d803 (1f:5803) ld a, d sbc b ld d, a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, bc ld a, [hl] sub d ld d, a ld b, $0 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc res 5, [hl] .asm_7d85a - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, bc .asm_7d85e inc b @@ -1173,20 +1173,20 @@ Func_7d803: ; 7d803 (1f:5803) add [hl] ld d, b ld b, $0 - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, bc ld [hl], d - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, bc ld [hl], a - ld hl, wc08e + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart add hl, bc ld [hl], a ret -Music1f_ApplyDutyCycle: ; 7d881 (1f:5881) +Audio3_ApplyDutyCycle: ld b, $0 - ld hl, wc046 + ld hl, wChannelDutyCycles add hl, bc ld a, [hl] rlca @@ -1195,19 +1195,19 @@ Music1f_ApplyDutyCycle: ; 7d881 (1f:5881) and $c0 ld d, a ld b, $1 - call Func_7d8ac + call Audio3_7d8ac ld a, [hl] and $3f or d ld [hl], a ret -Music1f_GetNextMusicByte: ; 7d899 (1f:5899) +Audio3_GetNextMusicByte: ld d, $0 ld a, c add a ld e, a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de ld a, [hli] ld e, a @@ -1220,7 +1220,7 @@ Music1f_GetNextMusicByte: ; 7d899 (1f:5899) ld [hl], d ret -Func_7d8ac: ; 7d8ac (1f:58ac) +Audio3_7d8ac: 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) +Audio3_7d8bb: ld h, $0 .loop srl a @@ -1249,13 +1249,13 @@ Func_7d8bb: ; 7d8bb (1f:58bb) .done ret -Func_7d8cc: ; 7d8cc (1f:58cc) +Audio3_7d8cc: ld h, $0 ld l, a add hl, hl ld d, h ld e, l - ld hl, Music1f_Pitches + ld hl, Audio3_Pitches add hl, de ld e, [hl] inc hl @@ -1274,102 +1274,102 @@ Func_7d8cc: ; 7d8cc (1f:58cc) ld d, a ret -Func_7d8ea:: ; 7d8ea (1f:58ea) - ld [wc001], a +Audio3_PlaySound:: + ld [wSoundID], a cp $ff - jp z, Func_7daa8 + jp z, Audio3_7daa8 cp $c2 - jp z, Func_7d9c2 - jp c, Func_7d9c2 + jp z, Audio3_7d9c2 + jp c, Audio3_7d9c2 cp $fe jr z, .asm_7d901 - jp nc, Func_7d9c2 + jp nc, Audio3_7d9c2 .asm_7d901 xor a - ld [wc000], a - ld [wc003], a - ld [wc0e9], a - ld [wc0e6], a - ld [wc0e7], a + ld [wUnusedC000], a + ld [wDisableChannelOutputWhenSfxEnds], a + ld [wMusicTempo + 1], a + ld [wMusicWaveInstrument], a + ld [wSfxWaveInstrument], a ld d, $8 - ld hl, wc016 - call FillMusicRAM1f - ld hl, wc006 - call FillMusicRAM1f + ld hl, wChannelReturnAddresses + call FillAudioRAM3 + ld hl, wChannelCommandPointers + call FillAudioRAM3 ld d, $4 - ld hl, wc026 - call FillMusicRAM1f - ld hl, wc02e - call FillMusicRAM1f - ld hl, wc03e - call FillMusicRAM1f - ld hl, wc046 - call FillMusicRAM1f - ld hl, wc04e - call FillMusicRAM1f - ld hl, wc056 - call FillMusicRAM1f - ld hl, wc05e - call FillMusicRAM1f - ld hl, wc066 - call FillMusicRAM1f - ld hl, wc06e - call FillMusicRAM1f - ld hl, wc036 - call FillMusicRAM1f - ld hl, wc076 - call FillMusicRAM1f - ld hl, wc07e - call FillMusicRAM1f - ld hl, wc086 - call FillMusicRAM1f - ld hl, wc08e - call FillMusicRAM1f - ld hl, wc096 - call FillMusicRAM1f - ld hl, wc09e - call FillMusicRAM1f - ld hl, wc0a6 - call FillMusicRAM1f - ld hl, wc0ae - call FillMusicRAM1f + ld hl, wChannelSoundIDs + call FillAudioRAM3 + ld hl, wChannelFlags1 + call FillAudioRAM3 + ld hl, wChannelDuties + call FillAudioRAM3 + ld hl, wChannelDutyCycles + call FillAudioRAM3 + ld hl, wChannelVibratoDelayCounters + call FillAudioRAM3 + ld hl, wChannelVibratoExtents + call FillAudioRAM3 + ld hl, wChannelVibratoRates + call FillAudioRAM3 + ld hl, wChannelFrequencyLowBytes + call FillAudioRAM3 + ld hl, wChannelVibratoDelayCounterReloadValues + call FillAudioRAM3 + ld hl, wChannelFlags2 + call FillAudioRAM3 + ld hl, wChannelPitchBendLengthModifiers + call FillAudioRAM3 + ld hl, wChannelPitchBendFrequencySteps + call FillAudioRAM3 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart + call FillAudioRAM3 + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart + call FillAudioRAM3 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes + call FillAudioRAM3 + ld hl, wChannelPitchBendCurrentFrequencyLowBytes + call FillAudioRAM3 + ld hl, wChannelPitchBendTargetFrequencyHighBytes + call FillAudioRAM3 + ld hl, wChannelPitchBendTargetFrequencyLowBytes + call FillAudioRAM3 ld a, $1 - ld hl, wc0be - call FillMusicRAM1f - ld hl, wc0b6 - call FillMusicRAM1f - ld hl, wc0c6 - call FillMusicRAM1f - ld [wc0e8], a + ld hl, wChannelLoopCounters + call FillAudioRAM3 + ld hl, wChannelNoteDelayCounters + call FillAudioRAM3 + ld hl, wChannelNoteSpeeds + call FillAudioRAM3 + ld [wMusicTempo], a ld a, $ff - ld [wc004], a + ld [wStereoPanning], a xor a - ld [$ff24], a + ld [rNR50], a ld a, $8 - ld [$ff10], a + ld [rNR10], a ld a, $0 - ld [$ff25], a + ld [rNR51], a xor a - ld [$ff1a], a + ld [rNR30], a ld a, $80 - ld [$ff1a], a + ld [rNR30], a ld a, $77 - ld [$ff24], a - jp Func_7db03 + ld [rNR50], a + jp Audio3_7db03 -Func_7d9c2: ; 7d9c2 (1f:59c2) +Audio3_7d9c2: ld l, a ld e, a ld h, $0 ld d, h add hl, hl add hl, de - ld de, SFX_Headers_1f + ld de, SFX_Headers_3 add hl, de ld a, h - ld [wc0ec], a + ld [wSfxHeaderPointer], a ld a, l - ld [wc0ed], a + ld [wSfxHeaderPointer + 1], a ld a, [hl] and $c0 rlca @@ -1382,9 +1382,9 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) add c ld c, a ld b, $0 - ld a, [wc0ec] + ld a, [wSfxHeaderPointer] ld h, a - ld a, [wc0ed] + ld a, [wSfxHeaderPointer + 1] ld l, a add hl, bc ld c, d @@ -1392,7 +1392,7 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) and $f ld e, a ld d, $0 - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, de ld a, [hl] and a @@ -1400,7 +1400,7 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) ld a, e cp $7 jr nz, .asm_7da0e - ld a, [wc001] + ld a, [wSoundID] cp $14 jr nc, .asm_7da07 ret @@ -1410,7 +1410,7 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) jr z, .asm_7da17 jr c, .asm_7da17 .asm_7da0e - ld a, [wc001] + ld a, [wSoundID] cp [hl] jr z, .asm_7da17 jr c, .asm_7da17 @@ -1423,132 +1423,132 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) add hl, hl ld d, h ld e, l - ld hl, wc016 + ld hl, wChannelReturnAddresses add hl, de ld [hli], a ld [hl], a - ld hl, wc006 + ld hl, wChannelCommandPointers add hl, de ld [hli], a ld [hl], a pop de - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, de ld [hl], a - ld hl, wc02e + ld hl, wChannelFlags1 add hl, de ld [hl], a - ld hl, wc03e + ld hl, wChannelDuties add hl, de ld [hl], a - ld hl, wc046 + ld hl, wChannelDutyCycles add hl, de ld [hl], a - ld hl, wc04e + ld hl, wChannelVibratoDelayCounters add hl, de ld [hl], a - ld hl, wc056 + ld hl, wChannelVibratoExtents add hl, de ld [hl], a - ld hl, wc05e + ld hl, wChannelVibratoRates add hl, de ld [hl], a - ld hl, wc066 + ld hl, wChannelFrequencyLowBytes add hl, de ld [hl], a - ld hl, wc06e + ld hl, wChannelVibratoDelayCounterReloadValues add hl, de ld [hl], a - ld hl, wc076 + ld hl, wChannelPitchBendLengthModifiers add hl, de ld [hl], a - ld hl, wc07e + ld hl, wChannelPitchBendFrequencySteps add hl, de ld [hl], a - ld hl, wc086 + ld hl, wChannelPitchBendFrequencyStepsFractionalPart add hl, de ld [hl], a - ld hl, wc08e + ld hl, wChannelPitchBendCurrentFrequencyFractionalPart add hl, de ld [hl], a - ld hl, wc096 + ld hl, wChannelPitchBendCurrentFrequencyHighBytes add hl, de ld [hl], a - ld hl, wc09e + ld hl, wChannelPitchBendCurrentFrequencyLowBytes add hl, de ld [hl], a - ld hl, wc0a6 + ld hl, wChannelPitchBendTargetFrequencyHighBytes add hl, de ld [hl], a - ld hl, wc0ae + ld hl, wChannelPitchBendTargetFrequencyLowBytes add hl, de ld [hl], a - ld hl, wc036 + ld hl, wChannelFlags2 add hl, de ld [hl], a ld a, $1 - ld hl, wc0be + ld hl, wChannelLoopCounters add hl, de ld [hl], a - ld hl, wc0b6 + ld hl, wChannelNoteDelayCounters add hl, de ld [hl], a - ld hl, wc0c6 + ld hl, wChannelNoteSpeeds add hl, de ld [hl], a ld a, e cp $4 jr nz, .asm_7da9f ld a, $8 - ld [$ff10], a + ld [rNR10], a .asm_7da9f ld a, c and a - jp z, Func_7db03 + jp z, Audio3_7db03 dec c jp .asm_7d9db -Func_7daa8: ; 7daa8 (1f:5aa8) +Audio3_7daa8: ld a, $80 - ld [$ff26], a - ld [$ff1a], a + ld [rNR52], a + ld [rNR30], a xor a - ld [$ff25], a - ld [$ff1c], a + ld [rNR51], a + ld [rNR32], a ld a, $8 - ld [$ff10], a - ld [$ff12], a - ld [$ff17], a - ld [$ff21], a + ld [rNR10], a + ld [rNR12], a + ld [rNR22], a + ld [rNR42], a ld a, $40 - ld [$ff14], a - ld [$ff19], a - ld [$ff23], a + ld [rNR14], a + ld [rNR24], a + ld [rNR44], a ld a, $77 - ld [$ff24], a + ld [rNR50], a xor a - ld [wc000], a - ld [wc003], a - ld [wc002], a - ld [wc0e9], a - ld [wc0eb], a - ld [wc0e6], a - ld [wc0e7], a + ld [wUnusedC000], a + ld [wDisableChannelOutputWhenSfxEnds], a + ld [wMuteAudioAndPauseMusic], a + ld [wMusicTempo + 1], a + ld [wSfxTempo + 1], a + ld [wMusicWaveInstrument], a + ld [wSfxWaveInstrument], a ld d, $a0 - ld hl, wc006 - call FillMusicRAM1f + ld hl, wChannelCommandPointers + call FillAudioRAM3 ld a, $1 ld d, $18 - ld hl, wc0b6 - call FillMusicRAM1f - ld [wc0e8], a - ld [wc0ea], a + ld hl, wChannelNoteDelayCounters + call FillAudioRAM3 + ld [wMusicTempo], a + ld [wSfxTempo], a ld a, $ff - ld [wc004], a + ld [wStereoPanning], a ret ; fills d bytes at hl with a -FillMusicRAM1f: ; 7dafd (1f:5afd) +FillAudioRAM3: ld b, d .loop ld [hli], a @@ -1556,19 +1556,19 @@ FillMusicRAM1f: ; 7dafd (1f:5afd) jr nz, .loop ret -Func_7db03: ; 7db03 (1f:5b03) - ld a, [wc001] +Audio3_7db03: + ld a, [wSoundID] ld l, a ld e, a ld h, $0 ld d, h add hl, hl add hl, de - ld de, SFX_Headers_1f + ld de, SFX_Headers_3 add hl, de ld e, l ld d, h - ld hl, wc006 + ld hl, wChannelCommandPointers ld a, [de] ; get channel number ld b, a rlca @@ -1594,14 +1594,14 @@ Func_7db03: ; 7db03 (1f:5b03) push af ld b, $0 ld c, a - ld hl, wc026 + ld hl, wChannelSoundIDs add hl, bc - ld a, [wc001] + ld a, [wSoundID] ld [hl], a pop af cp $3 jr c, .asm_7db46 - ld hl, wc02e + ld hl, wChannelFlags1 add hl, bc set 2, [hl] .asm_7db46 @@ -1620,53 +1620,53 @@ Func_7db03: ; 7db03 (1f:5b03) ld a, [de] inc de jr nz, .asm_7db25 - ld a, [wc001] + ld a, [wSoundID] cp $14 jr nc, .asm_7db5f jr .asm_7db89 .asm_7db5f - ld a, [wc001] + ld a, [wSoundID] cp $86 jr z, .asm_7db89 jr c, .asm_7db6a jr .asm_7db89 .asm_7db6a - ld hl, wc02a + ld hl, wChannelSoundIDs + Ch4 ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, wc012 ; sfx noise channel pointer - ld de, Noise1f_endchannel + ld hl, wChannelCommandPointers + Ch6 * 2 ; sfx noise channel pointer + ld de, Noise3_endchannel ld [hl], e inc hl ld [hl], d ; overwrite pointer to point to endchannel - ld a, [wc005] + ld a, [wSavedVolume] and a jr nz, .asm_7db89 - ld a, [$ff24] - ld [wc005], a + ld a, [rNR50] + ld [wSavedVolume], a ld a, $77 - ld [$ff24], a + ld [rNR50], a .asm_7db89 ret -Noise1f_endchannel: ; 7db8a (1f:5b8a) +Noise3_endchannel: endchannel -Unknown_7db8b: ; 7db8b (1f:5b8b) +Unknown_7db8b: db $10, $15, $1A, $1F ; channels 0-3 db $10, $15, $1A, $1F ; channels 4-7 -Unknown_7db93: ; 7db93 (1f:5b93) +Unknown_7db93: db $EE, $DD, $BB, $77 ; channels 0-3 db $EE, $DD, $BB, $77 ; channels 4-7 -Unknown_7db9b: ; 7db9b (1f:5b9b) +Unknown_7db9b: db $11, $22, $44, $88 ; channels 0-3 db $11, $22, $44, $88 ; channels 4-7 -Music1f_Pitches: ; 7dba3 (1f:5ba3) +Audio3_Pitches: dw $F82C ; C_ dw $F89D ; C# dw $F907 ; D_ diff --git a/audio/headers/musicheaders02.asm b/audio/headers/musicheaders02.asm deleted file mode 100644 index dd5b4b5b..00000000 --- a/audio/headers/musicheaders02.asm +++ /dev/null @@ -1,186 +0,0 @@ -Music_PalletTown:: ; 822e (2:422e) - db ( $80 | CH0 ) - dw Music_PalletTown_Ch1 - db CH1 - dw Music_PalletTown_Ch2 - db CH2 - dw Music_PalletTown_Ch3 - -Music_Pokecenter:: ; 8237 (2:4237) - db ( $80 | CH0 ) - dw Music_Pokecenter_Ch1 - db CH1 - dw Music_Pokecenter_Ch2 - db CH2 - dw Music_Pokecenter_Ch3 - -Music_Gym:: ; 8240 (2:4240) - db ( $80 | CH0 ) - dw Music_Gym_Ch1 - db CH1 - dw Music_Gym_Ch2 - db CH2 - dw Music_Gym_Ch3 - -; Viridian City, Pewter City, Saffron City -Music_Cities1:: ; 8249 (2:4249) - db ( $C0 | CH0 ) - dw Music_Cities1_Ch1 - db CH1 - dw Music_Cities1_Ch2 - db CH2 - dw Music_Cities1_Ch3 - db CH3 - dw Music_Cities1_Ch4 - -; Cerulean City, Fuchsia City -Music_Cities2:: ; 8255 (2:4255) - db ( $80 | CH0 ) - dw Music_Cities2_Ch1 - db CH1 - dw Music_Cities2_Ch2 - db CH2 - dw Music_Cities2_Ch3 - -Music_Celadon:: ; 825e (2:425e) - db ( $80 | CH0 ) - dw Music_Celadon_Ch1 - db CH1 - dw Music_Celadon_Ch2 - db CH2 - dw Music_Celadon_Ch3 - -Music_Cinnabar:: ; 8267 (2:4267) - db ( $80 | CH0 ) - dw Music_Cinnabar_Ch1 - db CH1 - dw Music_Cinnabar_Ch2 - db CH2 - dw Music_Cinnabar_Ch3 - -Music_Vermilion:: ; 8270 (2:4270) - db ( $C0 | CH0 ) - dw Music_Vermilion_Ch1 - db CH1 - dw Music_Vermilion_Ch2 - db CH2 - dw Music_Vermilion_Ch3 - db CH3 - dw Music_Vermilion_Ch4 - -Music_Lavender:: ; 827c (2:427c) - db ( $C0 | CH0 ) - dw Music_Lavender_Ch1 - db CH1 - dw Music_Lavender_Ch2 - db CH2 - dw Music_Lavender_Ch3 - db CH3 - dw Music_Lavender_Ch4 - -Music_SSAnne:: ; 8288 (2:4288) - db ( $80 | CH0 ) - dw Music_SSAnne_Ch1 - db CH1 - dw Music_SSAnne_Ch2 - db CH2 - dw Music_SSAnne_Ch3 - -Music_MeetProfOak:: ; 8291 (2:4291) - db ( $80 | CH0 ) - dw Music_MeetProfOak_Ch1 - db CH1 - dw Music_MeetProfOak_Ch2 - db CH2 - dw Music_MeetProfOak_Ch3 - -Music_MeetRival:: ; 829a (2:429a) - db ( $80 | CH0 ) - dw Music_MeetRival_Ch1 - db CH1 - dw Music_MeetRival_Ch2 - db CH2 - dw Music_MeetRival_Ch3 - -Music_MuseumGuy:: ; 82a3 (2:42a3) - db ( $C0 | CH0 ) - dw Music_MuseumGuy_Ch1 - db CH1 - dw Music_MuseumGuy_Ch2 - db CH2 - dw Music_MuseumGuy_Ch3 - db CH3 - dw Music_MuseumGuy_Ch4 - -Music_SafariZone:: ; 82af (2:42af) - db ( $80 | CH0 ) - dw Music_SafariZone_Ch1 - db CH1 - dw Music_SafariZone_Ch2 - db CH2 - dw Music_SafariZone_Ch3 - -Music_PkmnHealed:: ; 82b8 (2:42b8) - db ( $80 | CH0 ) - dw Music_PkmnHealed_Ch1 - db CH1 - dw Music_PkmnHealed_Ch2 - db CH2 - dw Music_PkmnHealed_Ch3 - -; Routes 1 and 2 -Music_Routes1:: ; 82c1 (2:42c1) - db ( $C0 | CH0 ) - dw Music_Routes1_Ch1 - db CH1 - dw Music_Routes1_Ch2 - db CH2 - dw Music_Routes1_Ch3 - db CH3 - dw Music_Routes1_Ch4 - -; Routes 24 and 25 -Music_Routes2:: ; 82cd (2:42cd) - db ( $C0 | CH0 ) - dw Music_Routes2_Ch1 - db CH1 - dw Music_Routes2_Ch2 - db CH2 - dw Music_Routes2_Ch3 - db CH3 - dw Music_Routes2_Ch4 - -; Routes 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22 -Music_Routes3:: ; 82d9 (2:42d9) - db ( $C0 | CH0 ) - dw Music_Routes3_Ch1 - db CH1 - dw Music_Routes3_Ch2 - db CH2 - dw Music_Routes3_Ch3 - db CH3 - dw Music_Routes3_Ch4 - -; Routes 11, 12, 13, 14, 15 -Music_Routes4:: ; 82d5 (2:42d5) - db ( $C0 | CH0 ) - dw Music_Routes4_Ch1 - db CH1 - dw Music_Routes4_Ch2 - db CH2 - dw Music_Routes4_Ch3 - db CH3 - dw Music_Routes4_Ch4 - -; Route 23, Indigo Plateau -Music_IndigoPlateau:: ; 82f1 (2:42f1) - db ( $C0 | CH0 ) - dw Music_IndigoPlateau_Ch1 - db CH1 - dw Music_IndigoPlateau_Ch2 - db CH2 - 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 deleted file mode 100644 index b4ef7375..00000000 --- a/audio/headers/musicheaders08.asm +++ /dev/null @@ -1,57 +0,0 @@ -Music_GymLeaderBattle:: ; 202be (8:42be) - db ( $80 | CH0 ) - dw Music_GymLeaderBattle_Ch1 - db CH1 - dw Music_GymLeaderBattle_Ch2 - db CH2 - dw Music_GymLeaderBattle_Ch3 - -Music_TrainerBattle:: ; 202c7 (8:42c7) - db ( $80 | CH0 ) - dw Music_TrainerBattle_Ch1 - db CH1 - dw Music_TrainerBattle_Ch2 - db CH2 - dw Music_TrainerBattle_Ch3 - -Music_WildBattle:: ; 202d0 (8:42d0) - db ( $80 | CH0 ) - dw Music_WildBattle_Ch1 - db CH1 - dw Music_WildBattle_Ch2 - db CH2 - dw Music_WildBattle_Ch3 - -Music_FinalBattle:: ; 202d9 (8:42d9) - db ( $80 | CH0 ) - dw Music_FinalBattle_Ch1 - db CH1 - dw Music_FinalBattle_Ch2 - db CH2 - dw Music_FinalBattle_Ch3 - -Music_DefeatedTrainer:: ; 202e2 (8:42e2) - db ( $80 | CH0 ) - dw Music_DefeatedTrainer_Ch1 - db CH1 - dw Music_DefeatedTrainer_Ch2 - db CH2 - dw Music_DefeatedTrainer_Ch3 - -Music_DefeatedWildMon:: ; 202eb (8:42eb) - db ( $80 | CH0 ) - dw Music_DefeatedWildMon_Ch1 - db CH1 - dw Music_DefeatedWildMon_Ch2 - db CH2 - dw Music_DefeatedWildMon_Ch3 - -Music_DefeatedGymLeader:: ; 202f4 (8:42f4) - db ( $80 | CH0 ) - dw Music_DefeatedGymLeader_Ch1 - db CH1 - dw Music_DefeatedGymLeader_Ch2 - db CH2 - dw Music_DefeatedGymLeader_Ch3 - -; 202fd
\ No newline at end of file diff --git a/audio/headers/musicheaders1.asm b/audio/headers/musicheaders1.asm new file mode 100755 index 00000000..38594d41 --- /dev/null +++ b/audio/headers/musicheaders1.asm @@ -0,0 +1,66 @@ +Music_PalletTown:: + audio Music_PalletTown, Ch0, Ch1, Ch2 + +Music_Pokecenter:: + audio Music_Pokecenter, Ch0, Ch1, Ch2 + +Music_Gym:: + audio Music_Gym, Ch0, Ch1, Ch2 + +; Viridian City, Pewter City, Saffron City +Music_Cities1:: + audio Music_Cities1, Ch0, Ch1, Ch2, Ch3 + +; Cerulean City, Fuchsia City +Music_Cities2:: + audio Music_Cities2, Ch0, Ch1, Ch2 + +Music_Celadon:: + audio Music_Celadon, Ch0, Ch1, Ch2 + +Music_Cinnabar:: + audio Music_Cinnabar, Ch0, Ch1, Ch2 + +Music_Vermilion:: + audio Music_Vermilion, Ch0, Ch1, Ch2, Ch3 + +Music_Lavender:: + audio Music_Lavender, Ch0, Ch1, Ch2, Ch3 + +Music_SSAnne:: + audio Music_SSAnne, Ch0, Ch1, Ch2 + +Music_MeetProfOak:: + audio Music_MeetProfOak, Ch0, Ch1, Ch2 + +Music_MeetRival:: + audio Music_MeetRival, Ch0, Ch1, Ch2 + +Music_MuseumGuy:: + audio Music_MuseumGuy, Ch0, Ch1, Ch2, Ch3 + +Music_SafariZone:: + audio Music_SafariZone, Ch0, Ch1, Ch2 + +Music_PkmnHealed:: + audio Music_PkmnHealed, Ch0, Ch1, Ch2 + +; Routes 1 and 2 +Music_Routes1:: + audio Music_Routes1, Ch0, Ch1, Ch2, Ch3 + +; Routes 24 and 25 +Music_Routes2:: + audio Music_Routes2, Ch0, Ch1, Ch2, Ch3 + +; Routes 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22 +Music_Routes3:: + audio Music_Routes3, Ch0, Ch1, Ch2, Ch3 + +; Routes 11, 12, 13, 14, 15 +Music_Routes4:: + audio Music_Routes4, Ch0, Ch1, Ch2, Ch3 + +; Route 23, Indigo Plateau +Music_IndigoPlateau:: + audio Music_IndigoPlateau, Ch0, Ch1, Ch2, Ch3 diff --git a/audio/headers/musicheaders1f.asm b/audio/headers/musicheaders1f.asm deleted file mode 100644 index beb70cf4..00000000 --- a/audio/headers/musicheaders1f.asm +++ /dev/null @@ -1,160 +0,0 @@ -Music_TitleScreen:: ; 7c249 (1f:4249) - db ( $C0 | CH0 ) - dw Music_TitleScreen_Ch1 - db CH1 - dw Music_TitleScreen_Ch2 - db CH2 - dw Music_TitleScreen_Ch3 - db CH3 - dw Music_TitleScreen_Ch4 - -Music_Credits:: ; 7c255 (1f:4255) - db ( $80 | CH0 ) - dw Music_Credits_Ch1 - db CH1 - dw Music_Credits_Ch2 - db CH2 - dw Music_Credits_Ch3 - -Music_HallOfFame:: ; 7c25e (1f:425e) - db ( $80 | CH0 ) - dw Music_HallOfFame_Ch1 - db CH1 - dw Music_HallOfFame_Ch2 - db CH2 - dw Music_HallOfFame_Ch3 - -Music_OaksLab:: ; 7c267 (1f:4267) - db ( $80 | CH0 ) - dw Music_OaksLab_Ch1 - db CH1 - dw Music_OaksLab_Ch2 - db CH2 - dw Music_OaksLab_Ch3 - -Music_JigglypuffSong:: ; 7c270 (1f:4270) - db $40 - dw Music_JigglypuffSong_Ch1 - db CH1 - dw Music_JigglypuffSong_Ch2 - -Music_BikeRiding:: ; 7c276 (1f:4276) - db ( $C0 | CH0 ) - dw Music_BikeRiding_Ch1 - db CH1 - dw Music_BikeRiding_Ch2 - db CH2 - dw Music_BikeRiding_Ch3 - db CH3 - dw Music_BikeRiding_Ch4 - -Music_Surfing:: ; 7c282 (1f:4282) - db ( $80 | CH0 ) - dw Music_Surfing_Ch1 - db CH1 - dw Music_Surfing_Ch2 - db CH2 - dw Music_Surfing_Ch3 - -Music_GameCorner:: ; 7c28b (1f:428b) - db ( $80 | CH0 ) - dw Music_GameCorner_Ch1 - db CH1 - dw Music_GameCorner_Ch2 - db CH2 - dw Music_GameCorner_Ch3 - -Music_IntroBattle:: ; 7c294 (1f:4294) - db ( $C0 | CH0 ) - dw Music_IntroBattle_Ch1 - db CH1 - dw Music_IntroBattle_Ch2 - db CH2 - dw Music_IntroBattle_Ch3 - db CH3 - dw Music_IntroBattle_Ch4 - -; Power Plant, Unknown Dungeon, Rocket HQ -Music_Dungeon1:: ; 7c2a0 (1f:42a0) - db ( $C0 | CH0 ) - dw Music_Dungeon1_Ch1 - db CH1 - dw Music_Dungeon1_Ch2 - db CH2 - dw Music_Dungeon1_Ch3 - db CH3 - dw Music_Dungeon1_Ch4 - -; Viridian Forest, Seafoam Islands -Music_Dungeon2:: ; 7c2ac (1f:42ac) - db ( $C0 | CH0 ) - dw Music_Dungeon2_Ch1 - db CH1 - dw Music_Dungeon2_Ch2 - db CH2 - dw Music_Dungeon2_Ch3 - db CH3 - dw Music_Dungeon2_Ch4 - -; Mt. Moon, Rock Tunnel, Victory Road -Music_Dungeon3:: ; 7c2b8 (1f:42b8) - db ( $C0 | CH0 ) - dw Music_Dungeon3_Ch1 - db CH1 - dw Music_Dungeon3_Ch2 - db CH2 - dw Music_Dungeon3_Ch3 - db CH3 - dw Music_Dungeon3_Ch4 - -Music_CinnabarMansion:: ; 7c2c4 (1f:42c4) - db ( $C0 | CH0 ) - dw Music_CinnabarMansion_Ch1 - db CH1 - dw Music_CinnabarMansion_Ch2 - db CH2 - dw Music_CinnabarMansion_Ch3 - db CH3 - dw Music_CinnabarMansion_Ch4 - -Music_PokemonTower:: ; 7c2d0 (1f:42d0) - db ( $80 | CH0 ) - dw Music_PokemonTower_Ch1 - db CH1 - dw Music_PokemonTower_Ch2 - db CH2 - dw Music_PokemonTower_Ch3 - -Music_SilphCo:: ; 7c2d9 (1f:42d9) - db ( $80 | CH0 ) - dw Music_SilphCo_Ch1 - db CH1 - dw Music_SilphCo_Ch2 - db CH2 - dw Music_SilphCo_Ch3 - -Music_MeetEvilTrainer:: ; 7c2e2 (1f:42e2) - db ( $80 | CH0 ) - dw Music_MeetEvilTrainer_Ch1 - db CH1 - dw Music_MeetEvilTrainer_Ch2 - db CH2 - dw Music_MeetEvilTrainer_Ch3 - -Music_MeetFemaleTrainer:: ; 7c2eb (1f:42eb) - db ( $80 | CH0 ) - dw Music_MeetFemaleTrainer_Ch1 - db CH1 - dw Music_MeetFemaleTrainer_Ch2 - db CH2 - dw Music_MeetFemaleTrainer_Ch3 - -Music_MeetMaleTrainer:: ; 7c2f4 (1f:42f4) - db ( $80 | CH0 ) - dw Music_MeetMaleTrainer_Ch1 - db CH1 - dw Music_MeetMaleTrainer_Ch2 - db CH2 - dw Music_MeetMaleTrainer_Ch3 - -; 0x7c2fd
\ No newline at end of file diff --git a/audio/headers/musicheaders2.asm b/audio/headers/musicheaders2.asm new file mode 100755 index 00000000..45557420 --- /dev/null +++ b/audio/headers/musicheaders2.asm @@ -0,0 +1,20 @@ +Music_GymLeaderBattle:: + audio Music_GymLeaderBattle, Ch0, Ch1, Ch2 + +Music_TrainerBattle:: + audio Music_TrainerBattle, Ch0, Ch1, Ch2 + +Music_WildBattle:: + audio Music_WildBattle, Ch0, Ch1, Ch2 + +Music_FinalBattle:: + audio Music_FinalBattle, Ch0, Ch1, Ch2 + +Music_DefeatedTrainer:: + audio Music_DefeatedTrainer, Ch0, Ch1, Ch2 + +Music_DefeatedWildMon:: + audio Music_DefeatedWildMon, Ch0, Ch1, Ch2 + +Music_DefeatedGymLeader:: + audio Music_DefeatedGymLeader, Ch0, Ch1, Ch2 diff --git a/audio/headers/musicheaders3.asm b/audio/headers/musicheaders3.asm new file mode 100755 index 00000000..90798882 --- /dev/null +++ b/audio/headers/musicheaders3.asm @@ -0,0 +1,56 @@ +Music_TitleScreen:: + audio Music_TitleScreen, Ch0, Ch1, Ch2, Ch3 + +Music_Credits:: + audio Music_Credits, Ch0, Ch1, Ch2 + +Music_HallOfFame:: + audio Music_HallOfFame, Ch0, Ch1, Ch2 + +Music_OaksLab:: + audio Music_OaksLab, Ch0, Ch1, Ch2 + +Music_JigglypuffSong:: + audio Music_JigglypuffSong, Ch0, Ch1 + +Music_BikeRiding:: + audio Music_BikeRiding, Ch0, Ch1, Ch2, Ch3 + +Music_Surfing:: + audio Music_Surfing, Ch0, Ch1, Ch2 + +Music_GameCorner:: + audio Music_GameCorner, Ch0, Ch1, Ch2 + +Music_IntroBattle:: + audio Music_IntroBattle, Ch0, Ch1, Ch2, Ch3 + +; Power Plant, Unknown Dungeon, Rocket HQ +Music_Dungeon1:: + audio Music_Dungeon1, Ch0, Ch1, Ch2, Ch3 + +; Viridian Forest, Seafoam Islands +Music_Dungeon2:: + audio Music_Dungeon2, Ch0, Ch1, Ch2, Ch3 + +; Mt. Moon, Rock Tunnel, Victory Road +Music_Dungeon3:: + audio Music_Dungeon3, Ch0, Ch1, Ch2, Ch3 + +Music_CinnabarMansion:: + audio Music_CinnabarMansion, Ch0, Ch1, Ch2, Ch3 + +Music_PokemonTower:: + audio Music_PokemonTower, Ch0, Ch1, Ch2 + +Music_SilphCo:: + audio Music_SilphCo, Ch0, Ch1, Ch2 + +Music_MeetEvilTrainer:: + audio Music_MeetEvilTrainer, Ch0, Ch1, Ch2 + +Music_MeetFemaleTrainer:: + audio Music_MeetFemaleTrainer, Ch0, Ch1, Ch2 + +Music_MeetMaleTrainer:: + audio Music_MeetMaleTrainer, Ch0, Ch1, Ch2 diff --git a/audio/headers/sfxheaders02.asm b/audio/headers/sfxheaders02.asm deleted file mode 100644 index d1c185c0..00000000 --- a/audio/headers/sfxheaders02.asm +++ /dev/null @@ -1,564 +0,0 @@ -SFX_Headers_02:: - db $ff, $ff, $ff ; padding - -SFX_02_01:: ; 8003 (2:4003) - db CH7 - dw SFX_02_01_Ch1 - -SFX_02_02:: ; 8006 (2:4006) - db CH7 - dw SFX_02_02_Ch1 - -SFX_02_03:: ; 8009 (2:4009) - db CH7 - dw SFX_02_03_Ch1 - -SFX_02_04:: ; 800c (2:400c) - db CH7 - dw SFX_02_04_Ch1 - -SFX_02_05:: ; 800f (2:400f) - db CH7 - dw SFX_02_05_Ch1 - -SFX_02_06:: ; 8012 (2:4012) - db CH7 - dw SFX_02_06_Ch1 - -SFX_02_07:: ; 8015 (2:4015) - db CH7 - dw SFX_02_07_Ch1 - -SFX_02_08:: ; 8018 (2:4018) - db CH7 - dw SFX_02_08_Ch1 - -SFX_02_09:: ; 801b (2:401b) - db CH7 - dw SFX_02_09_Ch1 - -SFX_02_0a:: ; 801e (2:401e) - db CH7 - dw SFX_02_0a_Ch1 - -SFX_02_0b:: ; 8021 (2:4021) - db CH7 - dw SFX_02_0b_Ch1 - -SFX_02_0c:: ; 8024 (2:4024) - db CH7 - dw SFX_02_0c_Ch1 - -SFX_02_0d:: ; 8027 (2:4027) - db CH7 - dw SFX_02_0d_Ch1 - -SFX_02_0e:: ; 802a (2:402a) - db CH7 - dw SFX_02_0e_Ch1 - -SFX_02_0f:: ; 802d (2:402d) - db CH7 - dw SFX_02_0f_Ch1 - -SFX_02_10:: ; 8030 (2:4030) - db CH7 - dw SFX_02_10_Ch1 - -SFX_02_11:: ; 8033 (2:4033) - db CH7 - dw SFX_02_11_Ch1 - -SFX_02_12:: ; 8036 (2:4036) - db CH7 - dw SFX_02_12_Ch1 - -SFX_02_13:: ; 8039 (2:4039) - db CH7 - dw SFX_02_13_Ch1 - -SFX_02_14:: ; 803c (2:403c) - db ( $80 | CH4 ) - dw SFX_02_14_Ch1 - db CH5 - dw SFX_02_14_Ch2 - db CH7 - dw SFX_02_14_Ch3 - -SFX_02_15:: ; 8045 (2:4045) - db ( $80 | CH4 ) - dw SFX_02_15_Ch1 - db CH5 - dw SFX_02_15_Ch2 - db CH7 - dw SFX_02_15_Ch3 - -SFX_02_16:: ; 804e (2:404e) - db ( $80 | CH4 ) - dw SFX_02_16_Ch1 - db CH5 - dw SFX_02_16_Ch2 - db CH7 - dw SFX_02_16_Ch3 - -SFX_02_17:: ; 8057 (2:4057) - db ( $80 | CH4 ) - dw SFX_02_17_Ch1 - db CH5 - dw SFX_02_17_Ch2 - db CH7 - dw SFX_02_17_Ch3 - -SFX_02_18:: ; 8060 (2:4060) - db ( $80 | CH4 ) - dw SFX_02_18_Ch1 - db CH5 - dw SFX_02_18_Ch2 - db CH7 - dw SFX_02_18_Ch3 - -SFX_02_19:: ; 8069 (2:4069) - db ( $80 | CH4 ) - dw SFX_02_19_Ch1 - db CH5 - dw SFX_02_19_Ch2 - db CH7 - dw SFX_02_19_Ch3 - -SFX_02_1a:: ; 8072 (2:4072) - db ( $80 | CH4 ) - dw SFX_02_1a_Ch1 - db CH5 - dw SFX_02_1a_Ch2 - db CH7 - dw SFX_02_1a_Ch3 - -SFX_02_1b:: ; 807b (2:407b) - db ( $80 | CH4 ) - dw SFX_02_1b_Ch1 - db CH5 - dw SFX_02_1b_Ch2 - db CH7 - dw SFX_02_1b_Ch3 - -SFX_02_1c:: ; 8084 (2:4084) - db ( $80 | CH4 ) - dw SFX_02_1c_Ch1 - db CH5 - dw SFX_02_1c_Ch2 - db CH7 - dw SFX_02_1c_Ch3 - -SFX_02_1d:: ; 808d (2:408d) - db ( $80 | CH4 ) - dw SFX_02_1d_Ch1 - db CH5 - dw SFX_02_1d_Ch2 - db CH7 - dw SFX_02_1d_Ch3 - -SFX_02_1e:: ; 8096 (2:4096) - db ( $80 | CH4 ) - dw SFX_02_1e_Ch1 - db CH5 - dw SFX_02_1e_Ch2 - db CH7 - dw SFX_02_1e_Ch3 - -SFX_02_1f:: ; 809f (2:409f) - db ( $80 | CH4 ) - dw SFX_02_1f_Ch1 - db CH5 - dw SFX_02_1f_Ch2 - db CH7 - dw SFX_02_1f_Ch3 - -SFX_02_20:: ; 80a8 (2:40a8) - db ( $80 | CH4 ) - dw SFX_02_20_Ch1 - db CH5 - dw SFX_02_20_Ch2 - db CH7 - dw SFX_02_20_Ch3 - -SFX_02_21:: ; 80b1 (2:40b1) - db ( $80 | CH4 ) - dw SFX_02_21_Ch1 - db CH5 - dw SFX_02_21_Ch2 - db CH7 - dw SFX_02_21_Ch3 - -SFX_02_22:: ; 80ba (2:40ba) - db ( $80 | CH4 ) - dw SFX_02_22_Ch1 - db CH5 - dw SFX_02_22_Ch2 - db CH7 - dw SFX_02_22_Ch3 - -SFX_02_23:: ; 80c3 (2:40c3) - db ( $80 | CH4 ) - dw SFX_02_23_Ch1 - db CH5 - dw SFX_02_23_Ch2 - db CH7 - dw SFX_02_23_Ch3 - -SFX_02_24:: ; 80cc (2:40cc) - db ( $80 | CH4 ) - dw SFX_02_24_Ch1 - db CH5 - dw SFX_02_24_Ch2 - db CH7 - dw SFX_02_24_Ch3 - -SFX_02_25:: ; 80d5 (2:40d5) - db ( $80 | CH4 ) - dw SFX_02_25_Ch1 - db CH5 - dw SFX_02_25_Ch2 - db CH7 - dw SFX_02_25_Ch3 - -SFX_02_26:: ; 80de (2:40de) - db ( $80 | CH4 ) - dw SFX_02_26_Ch1 - db CH5 - dw SFX_02_26_Ch2 - db CH7 - dw SFX_02_26_Ch3 - -SFX_02_27:: ; 80e7 (2:40e7) - db ( $80 | CH4 ) - dw SFX_02_27_Ch1 - db CH5 - dw SFX_02_27_Ch2 - db CH7 - dw SFX_02_27_Ch3 - -SFX_02_28:: ; 80f0 (2:40f0) - db ( $80 | CH4 ) - dw SFX_02_28_Ch1 - db CH5 - dw SFX_02_28_Ch2 - db CH7 - dw SFX_02_28_Ch3 - -SFX_02_29:: ; 80f9 (2:40f9) - db ( $80 | CH4 ) - dw SFX_02_29_Ch1 - db CH5 - dw SFX_02_29_Ch2 - db CH7 - dw SFX_02_29_Ch3 - -SFX_02_2a:: ; 8102 (2:4102) - db ( $80 | CH4 ) - dw SFX_02_2a_Ch1 - db CH5 - dw SFX_02_2a_Ch2 - db CH7 - dw SFX_02_2a_Ch3 - -SFX_02_2b:: ; 810b (2:410b) - db ( $80 | CH4 ) - dw SFX_02_2b_Ch1 - db CH5 - dw SFX_02_2b_Ch2 - db CH7 - dw SFX_02_2b_Ch3 - -SFX_02_2c:: ; 8114 (2:4114) - db ( $80 | CH4 ) - dw SFX_02_2c_Ch1 - db CH5 - dw SFX_02_2c_Ch2 - db CH7 - dw SFX_02_2c_Ch3 - -SFX_02_2d:: ; 811d (2:411d) - db ( $80 | CH4 ) - dw SFX_02_2d_Ch1 - db CH5 - dw SFX_02_2d_Ch2 - db CH7 - dw SFX_02_2d_Ch3 - -SFX_02_2e:: ; 8126 (2:4126) - db ( $80 | CH4 ) - dw SFX_02_2e_Ch1 - db CH5 - dw SFX_02_2e_Ch2 - db CH7 - dw SFX_02_2e_Ch3 - -SFX_02_2f:: ; 812f (2:412f) - db ( $80 | CH4 ) - dw SFX_02_2f_Ch1 - db CH5 - dw SFX_02_2f_Ch2 - db CH7 - dw SFX_02_2f_Ch3 - -SFX_02_30:: ; 8138 (2:4138) - db ( $80 | CH4 ) - dw SFX_02_30_Ch1 - db CH5 - dw SFX_02_30_Ch2 - db CH7 - dw SFX_02_30_Ch3 - -SFX_02_31:: ; 8141 (2:4141) - db ( $80 | CH4 ) - dw SFX_02_31_Ch1 - db CH5 - dw SFX_02_31_Ch2 - db CH7 - dw SFX_02_31_Ch3 - -SFX_02_32:: ; 814a (2:414a) - db ( $80 | CH4 ) - dw SFX_02_32_Ch1 - db CH5 - dw SFX_02_32_Ch2 - db CH7 - dw SFX_02_32_Ch3 - -SFX_02_33:: ; 8153 (2:4153) - db ( $80 | CH4 ) - dw SFX_02_33_Ch1 - db CH5 - dw SFX_02_33_Ch2 - db CH7 - dw SFX_02_33_Ch3 - -SFX_02_34:: ; 815c (2:415c) - db ( $80 | CH4 ) - dw SFX_02_34_Ch1 - db CH5 - dw SFX_02_34_Ch2 - db CH7 - dw SFX_02_34_Ch3 - -SFX_02_35:: ; 8165 (2:4165) - db ( $80 | CH4 ) - dw SFX_02_35_Ch1 - db CH5 - dw SFX_02_35_Ch2 - db CH7 - dw SFX_02_35_Ch3 - -SFX_02_36:: ; 816e (2:416e) - db ( $80 | CH4 ) - dw SFX_02_36_Ch1 - db CH5 - dw SFX_02_36_Ch2 - db CH7 - dw SFX_02_36_Ch3 - -SFX_02_37:: ; 8177 (2:4177) - db ( $80 | CH4 ) - dw SFX_02_37_Ch1 - db CH5 - dw SFX_02_37_Ch2 - db CH7 - dw SFX_02_37_Ch3 - -SFX_02_38:: ; 8180 (2:4180) - db ( $80 | CH4 ) - dw SFX_02_38_Ch1 - db CH5 - dw SFX_02_38_Ch2 - db CH7 - dw SFX_02_38_Ch3 - -SFX_02_39:: ; 8189 (2:4189) - db ( $80 | CH4 ) - dw SFX_02_39_Ch1 - db CH5 - dw SFX_02_39_Ch2 - db CH7 - dw SFX_02_39_Ch3 - -SFX_02_3a:: ; 8192 (2:4192) - db ( $80 | CH4 ) - dw SFX_02_3a_Ch1 - db CH5 - dw SFX_02_3a_Ch2 - db CH6 - dw SFX_02_3a_Ch3 - -SFX_02_3b:: ; 819b (2:419b) - db ( $80 | CH4 ) - dw SFX_02_3b_Ch1 - db CH5 - dw SFX_02_3b_Ch2 - db CH6 - dw SFX_02_3b_Ch3 - -SFX_02_3c:: ; 81a4 (2:41a4) - db CH4 - dw SFX_02_3c_Ch1 - -SFX_02_3d:: ; 81a7 (2:41a7) - db CH4 - dw SFX_02_3d_Ch1 - -SFX_02_3e:: ; 81aa (2:41aa) - db CH4 - dw SFX_02_3e_Ch1 - -SFX_02_3f:: ; 81ad (2:41ad) - db CH7 - dw SFX_02_3f_Ch1 - -SFX_02_40:: ; 81b0 (2:41b0) - db CH4 - dw SFX_02_40_Ch1 - -SFX_02_41:: ; 81b3 (2:41b3) - db ( $80 | CH4 ) - dw SFX_02_41_Ch1 - db CH5 - dw SFX_02_41_Ch2 - db CH6 - dw SFX_02_41_Ch3 - -SFX_02_42:: ; 81bc (2:41bc) - db ( $80 | CH4 ) - dw SFX_02_42_Ch1 - db CH5 - dw SFX_02_42_Ch2 - db CH6 - dw SFX_02_42_Ch3 - -SFX_02_43:: ; 81c5 (2:41c5) - db CH4 - dw SFX_02_43_Ch1 - -SFX_02_44:: ; 81c8 (2:41c8) - db CH4 - dw SFX_02_44_Ch1 - -SFX_02_45:: ; 81cb (2:41cb) - db CH4 - dw SFX_02_45_Ch1 - -SFX_02_46:: ; 81ce (2:41ce) - db CH4 - dw SFX_02_46_Ch1 - -SFX_02_47:: ; 81d1 (2:41d1) - db CH4 - dw SFX_02_47_Ch1 - -SFX_02_48:: ; 81d4 (2:41d4) - db CH4 - dw SFX_02_48_Ch1 - -SFX_02_49:: ; 81d7 (2:41d7) - db CH4 - dw SFX_02_49_Ch1 - -SFX_02_4a:: ; 81da (2:41da) - db CH4 - dw SFX_02_4a_Ch1 - -SFX_02_4b:: ; 81dd (2:41dd) - db CH4 - dw SFX_02_4b_Ch1 - -SFX_02_4c:: ; 81e0 (2:41e0) - db CH4 - dw SFX_02_4c_Ch1 - -SFX_02_4d:: ; 81e3 (2:41e3) - db CH4 - dw SFX_02_4d_Ch1 - -SFX_02_4e:: ; 81e6 (2:41e6) - db CH4 - dw SFX_02_4e_Ch1 - -SFX_02_4f:: ; 81e9 (2:41e9) - db CH7 - dw SFX_02_4f_Ch1 - -SFX_02_50:: ; 81ec (2:41ec) - db CH7 - dw SFX_02_50_Ch1 - -SFX_02_51:: ; 81ef (2:41ef) - db ( $40 | CH4 ) - dw SFX_02_51_Ch1 - db CH5 - dw SFX_02_51_Ch2 - -SFX_02_52:: ; 81f5 (2:41f5) - db CH4 - dw SFX_02_52_Ch1 - -SFX_02_53:: ; 81f8 (2:41f8) - db CH7 - dw SFX_02_53_Ch1 - -SFX_02_54:: ; 81fb (2:41fb) - db ( $40 | CH4 ) - dw SFX_02_54_Ch1 - db CH5 - dw SFX_02_54_Ch2 - -SFX_02_55:: ; 8201 (2:4201) - db CH4 - dw SFX_02_55_Ch1 - -SFX_02_56:: ; 8204 (2:4204) - db CH7 - dw SFX_02_56_Ch1 - -SFX_02_57:: ; 8207 (2:4207) - db CH7 - dw SFX_02_57_Ch1 - -SFX_02_58:: ; 820a (2:420a) - db ( $40 | CH4 ) - dw SFX_02_58_Ch1 - db CH5 - dw SFX_02_58_Ch2 - -SFX_02_59:: ; 8210 (2:4210) - db ( $40 | CH4 ) - dw SFX_02_59_Ch1 - db CH5 - dw SFX_02_59_Ch2 - -SFX_02_5a:: ; 8216 (2:4216) - db ( $40 | CH4 ) - dw SFX_02_5a_Ch1 - db CH5 - dw SFX_02_5a_Ch2 - -SFX_02_5b:: ; 821c (2:421c) - db CH4 - dw SFX_02_5b_Ch1 - -SFX_02_5c:: ; 821f (2:421f) - db CH7 - dw SFX_02_5c_Ch1 - -SFX_02_5d:: ; 8222 (2:4222) - db ( $40 | CH4 ) - dw SFX_02_5d_Ch1 - db CH5 - dw SFX_02_5d_Ch2 - -SFX_02_5e:: ; 8228 (2:4228) - db CH2 - dw SFX_02_5e_Ch1 - -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 deleted file mode 100644 index 547c8d4a..00000000 --- a/audio/headers/sfxheaders08.asm +++ /dev/null @@ -1,708 +0,0 @@ -SFX_Headers_08:: - db $ff, $ff, $ff ; padding - -SFX_08_01:: ; 20003 (8:4003) - db CH7 - dw SFX_08_01_Ch1 - -SFX_08_02:: ; 20006 (8:4006) - db CH7 - dw SFX_08_02_Ch1 - -SFX_08_03:: ; 20009 (8:4009) - db CH7 - dw SFX_08_03_Ch1 - -SFX_08_04:: ; 2000c (8:400c) - db CH7 - dw SFX_08_04_Ch1 - -SFX_08_05:: ; 2000f (8:400f) - db CH7 - dw SFX_08_05_Ch1 - -SFX_08_06:: ; 20012 (8:4012) - db CH7 - dw SFX_08_06_Ch1 - -SFX_08_07:: ; 20015 (8:4015) - db CH7 - dw SFX_08_07_Ch1 - -SFX_08_08:: ; 20018 (8:4018) - db CH7 - dw SFX_08_08_Ch1 - -SFX_08_09:: ; 2001b (8:401b) - db CH7 - dw SFX_08_09_Ch1 - -SFX_08_0a:: ; 2001e (8:401e) - db CH7 - dw SFX_08_0a_Ch1 - -SFX_08_0b:: ; 20021 (8:4021) - db CH7 - dw SFX_08_0b_Ch1 - -SFX_08_0c:: ; 20024 (8:4024) - db CH7 - dw SFX_08_0c_Ch1 - -SFX_08_0d:: ; 20027 (8:4027) - db CH7 - dw SFX_08_0d_Ch1 - -SFX_08_0e:: ; 2002a (8:402a) - db CH7 - dw SFX_08_0e_Ch1 - -SFX_08_0f:: ; 2002d (8:402d) - db CH7 - dw SFX_08_0f_Ch1 - -SFX_08_10:: ; 20030 (8:4030) - db CH7 - dw SFX_08_10_Ch1 - -SFX_08_11:: ; 20033 (8:4033) - db CH7 - dw SFX_08_11_Ch1 - -SFX_08_12:: ; 20036 (8:4036) - db CH7 - dw SFX_08_12_Ch1 - -SFX_08_13:: ; 20039 (8:4039) - db CH7 - dw SFX_08_13_Ch1 - -SFX_08_14:: ; 2003c (8:403c) - db ( $80 | CH4 ) - dw SFX_08_14_Ch1 - db CH5 - dw SFX_08_14_Ch2 - db CH7 - dw SFX_08_14_Ch3 - -SFX_08_15:: ; 20045 (8:4045) - db ( $80 | CH4 ) - dw SFX_08_15_Ch1 - db CH5 - dw SFX_08_15_Ch2 - db CH7 - dw SFX_08_15_Ch3 - -SFX_08_16:: ; 2004e (8:404e) - db ( $80 | CH4 ) - dw SFX_08_16_Ch1 - db CH5 - dw SFX_08_16_Ch2 - db CH7 - dw SFX_08_16_Ch3 - -SFX_08_17:: ; 20057 (8:4057) - db ( $80 | CH4 ) - dw SFX_08_17_Ch1 - db CH5 - dw SFX_08_17_Ch2 - db CH7 - dw SFX_08_17_Ch3 - -SFX_08_18:: ; 20060 (8:4060) - db ( $80 | CH4 ) - dw SFX_08_18_Ch1 - db CH5 - dw SFX_08_18_Ch2 - db CH7 - dw SFX_08_18_Ch3 - -SFX_08_19:: ; 20069 (8:4069) - db ( $80 | CH4 ) - dw SFX_08_19_Ch1 - db CH5 - dw SFX_08_19_Ch2 - db CH7 - dw SFX_08_19_Ch3 - -SFX_08_1a:: ; 20072 (8:4072) - db ( $80 | CH4 ) - dw SFX_08_1a_Ch1 - db CH5 - dw SFX_08_1a_Ch2 - db CH7 - dw SFX_08_1a_Ch3 - -SFX_08_1b:: ; 2007b (8:407b) - db ( $80 | CH4 ) - dw SFX_08_1b_Ch1 - db CH5 - dw SFX_08_1b_Ch2 - db CH7 - dw SFX_08_1b_Ch3 - -SFX_08_1c:: ; 20084 (8:4084) - db ( $80 | CH4 ) - dw SFX_08_1c_Ch1 - db CH5 - dw SFX_08_1c_Ch2 - db CH7 - dw SFX_08_1c_Ch3 - -SFX_08_1d:: ; 2008d (8:408d) - db ( $80 | CH4 ) - dw SFX_08_1d_Ch1 - db CH5 - dw SFX_08_1d_Ch2 - db CH7 - dw SFX_08_1d_Ch3 - -SFX_08_1e:: ; 20096 (8:4096) - db ( $80 | CH4 ) - dw SFX_08_1e_Ch1 - db CH5 - dw SFX_08_1e_Ch2 - db CH7 - dw SFX_08_1e_Ch3 - -SFX_08_1f:: ; 2009f (8:409f) - db ( $80 | CH4 ) - dw SFX_08_1f_Ch1 - db CH5 - dw SFX_08_1f_Ch2 - db CH7 - dw SFX_08_1f_Ch3 - -SFX_08_20:: ; 200a8 (8:40a8) - db ( $80 | CH4 ) - dw SFX_08_20_Ch1 - db CH5 - dw SFX_08_20_Ch2 - db CH7 - dw SFX_08_20_Ch3 - -SFX_08_21:: ; 200b1 (8:40b1) - db ( $80 | CH4 ) - dw SFX_08_21_Ch1 - db CH5 - dw SFX_08_21_Ch2 - db CH7 - dw SFX_08_21_Ch3 - -SFX_08_22:: ; 200ba (8:40ba) - db ( $80 | CH4 ) - dw SFX_08_22_Ch1 - db CH5 - dw SFX_08_22_Ch2 - db CH7 - dw SFX_08_22_Ch3 - -SFX_08_23:: ; 200c3 (8:40c3) - db ( $80 | CH4 ) - dw SFX_08_23_Ch1 - db CH5 - dw SFX_08_23_Ch2 - db CH7 - dw SFX_08_23_Ch3 - -SFX_08_24:: ; 200cc (8:40cc) - db ( $80 | CH4 ) - dw SFX_08_24_Ch1 - db CH5 - dw SFX_08_24_Ch2 - db CH7 - dw SFX_08_24_Ch3 - -SFX_08_25:: ; 200d5 (8:40d5) - db ( $80 | CH4 ) - dw SFX_08_25_Ch1 - db CH5 - dw SFX_08_25_Ch2 - db CH7 - dw SFX_08_25_Ch3 - -SFX_08_26:: ; 200de (8:40de) - db ( $80 | CH4 ) - dw SFX_08_26_Ch1 - db CH5 - dw SFX_08_26_Ch2 - db CH7 - dw SFX_08_26_Ch3 - -SFX_08_27:: ; 200e7 (8:40e7) - db ( $80 | CH4 ) - dw SFX_08_27_Ch1 - db CH5 - dw SFX_08_27_Ch2 - db CH7 - dw SFX_08_27_Ch3 - -SFX_08_28:: ; 200f0 (8:40f0) - db ( $80 | CH4 ) - dw SFX_08_28_Ch1 - db CH5 - dw SFX_08_28_Ch2 - db CH7 - dw SFX_08_28_Ch3 - -SFX_08_29:: ; 200f9 (8:40f9) - db ( $80 | CH4 ) - dw SFX_08_29_Ch1 - db CH5 - dw SFX_08_29_Ch2 - db CH7 - dw SFX_08_29_Ch3 - -SFX_08_2a:: ; 20102 (8:4102) - db ( $80 | CH4 ) - dw SFX_08_2a_Ch1 - db CH5 - dw SFX_08_2a_Ch2 - db CH7 - dw SFX_08_2a_Ch3 - -SFX_08_2b:: ; 2010b (8:410b) - db ( $80 | CH4 ) - dw SFX_08_2b_Ch1 - db CH5 - dw SFX_08_2b_Ch2 - db CH7 - dw SFX_08_2b_Ch3 - -SFX_08_2c:: ; 20114 (8:4114) - db ( $80 | CH4 ) - dw SFX_08_2c_Ch1 - db CH5 - dw SFX_08_2c_Ch2 - db CH7 - dw SFX_08_2c_Ch3 - -SFX_08_2d:: ; 2011d (8:411d) - db ( $80 | CH4 ) - dw SFX_08_2d_Ch1 - db CH5 - dw SFX_08_2d_Ch2 - db CH7 - dw SFX_08_2d_Ch3 - -SFX_08_2e:: ; 20126 (8:4126) - db ( $80 | CH4 ) - dw SFX_08_2e_Ch1 - db CH5 - dw SFX_08_2e_Ch2 - db CH7 - dw SFX_08_2e_Ch3 - -SFX_08_2f:: ; 2012f (8:412f) - db ( $80 | CH4 ) - dw SFX_08_2f_Ch1 - db CH5 - dw SFX_08_2f_Ch2 - db CH7 - dw SFX_08_2f_Ch3 - -SFX_08_30:: ; 20138 (8:4138) - db ( $80 | CH4 ) - dw SFX_08_30_Ch1 - db CH5 - dw SFX_08_30_Ch2 - db CH7 - dw SFX_08_30_Ch3 - -SFX_08_31:: ; 20141 (8:4141) - db ( $80 | CH4 ) - dw SFX_08_31_Ch1 - db CH5 - dw SFX_08_31_Ch2 - db CH7 - dw SFX_08_31_Ch3 - -SFX_08_32:: ; 2014a (8:414a) - db ( $80 | CH4 ) - dw SFX_08_32_Ch1 - db CH5 - dw SFX_08_32_Ch2 - db CH7 - dw SFX_08_32_Ch3 - -SFX_08_33:: ; 20153 (8:4153) - db ( $80 | CH4 ) - dw SFX_08_33_Ch1 - db CH5 - dw SFX_08_33_Ch2 - db CH7 - dw SFX_08_33_Ch3 - -SFX_08_34:: ; 2015c (8:415c) - db ( $80 | CH4 ) - dw SFX_08_34_Ch1 - db CH5 - dw SFX_08_34_Ch2 - db CH7 - dw SFX_08_34_Ch3 - -SFX_08_35:: ; 20165 (8:4165) - db ( $80 | CH4 ) - dw SFX_08_35_Ch1 - db CH5 - dw SFX_08_35_Ch2 - db CH7 - dw SFX_08_35_Ch3 - -SFX_08_36:: ; 2016e (8:416e) - db ( $80 | CH4 ) - dw SFX_08_36_Ch1 - db CH5 - dw SFX_08_36_Ch2 - db CH7 - dw SFX_08_36_Ch3 - -SFX_08_37:: ; 20177 (8:4177) - db ( $80 | CH4 ) - dw SFX_08_37_Ch1 - db CH5 - dw SFX_08_37_Ch2 - db CH7 - dw SFX_08_37_Ch3 - -SFX_08_38:: ; 20180 (8:4180) - db ( $80 | CH4 ) - dw SFX_08_38_Ch1 - db CH5 - dw SFX_08_38_Ch2 - db CH7 - dw SFX_08_38_Ch3 - -SFX_08_39:: ; 20189 (8:4189) - db ( $80 | CH4 ) - dw SFX_08_39_Ch1 - db CH5 - dw SFX_08_39_Ch2 - db CH7 - dw SFX_08_39_Ch3 - -SFX_08_3a:: ; 20192 (8:4192) - db ( $80 | CH4 ) - dw SFX_08_3a_Ch1 - db CH5 - dw SFX_08_3a_Ch2 - db CH6 - dw SFX_08_3a_Ch3 - -SFX_08_3b:: ; 2019b (8:419b) - db ( $80 | CH4 ) - dw SFX_08_3b_Ch1 - db CH5 - dw SFX_08_3b_Ch2 - db CH6 - dw SFX_08_3b_Ch3 - -SFX_08_3c:: ; 201a4 (8:41a4) - db CH4 - dw SFX_08_3c_Ch1 - -SFX_08_3d:: ; 201a7 (8:41a7) - db CH4 - dw SFX_08_3d_Ch1 - -SFX_08_3e:: ; 201aa (8:41aa) - db CH4 - dw SFX_08_3e_Ch1 - -SFX_08_3f:: ; 201ad (8:41ad) - db CH7 - dw SFX_08_3f_Ch1 - -SFX_08_40:: ; 201b0 (8:41b0) - db CH4 - dw SFX_08_40_Ch1 - -SFX_08_41:: ; 201b3 (8:41b3) - db ( $40 | CH4 ) - dw SFX_08_41_Ch1 - db CH5 - dw SFX_08_41_Ch2 - -SFX_08_42:: ; 201b9 (8:41b9) - db ( $40 | CH4 ) - dw SFX_08_42_Ch1 - db CH7 - dw SFX_08_42_Ch2 - -SFX_08_43:: ; 201bf (8:41bf) - db ( $40 | CH4 ) - dw SFX_08_43_Ch1 - db CH7 - dw SFX_08_43_Ch2 - -SFX_08_44:: ; 201c5 (8:41c5) - db CH7 - dw SFX_08_44_Ch1 - -SFX_08_45:: ; 201c8 (8:41c8) - db ( $40 | CH4 ) - dw SFX_08_45_Ch1 - db CH5 - dw SFX_08_45_Ch2 - -SFX_08_46:: ; 201ce (8:41ce) - db ( $80 | CH4 ) - dw SFX_08_46_Ch1 - db CH5 - dw SFX_08_46_Ch2 - db CH6 - dw SFX_08_46_Ch3 - -SFX_08_47:: ; 201d7 (8:41d7) - db CH7 - dw SFX_08_47_Ch1 - -SFX_08_48:: ; 201da (8:41da) - db CH4 - dw SFX_08_48_Ch1 - -SFX_08_49:: ; 201dd (8:41dd) - db CH4 - dw SFX_08_49_Ch1 - -SFX_08_4a:: ; 201e0 (8:41e0) - db CH7 - dw SFX_08_4a_Ch1 - -SFX_08_4b:: ; 201e3 (8:41e3) - db CH7 - dw SFX_08_4b_Ch1 - -SFX_08_4c:: ; 201e6 (8:41e6) - db CH7 - dw SFX_08_4c_Ch1 - -SFX_08_4d:: ; 201e9 (8:41e9) - db CH7 - dw SFX_08_4d_Ch1 - -SFX_08_4e:: ; 201ec (8:41ec) - db CH7 - dw SFX_08_4e_Ch1 - -SFX_08_4f:: ; 201ef (8:41ef) - db CH7 - dw SFX_08_4f_Ch1 - -SFX_08_50:: ; 201f2 (8:41f2) - db CH7 - dw SFX_08_50_Ch1 - -SFX_08_51:: ; 201f5 (8:41f5) - db CH7 - dw SFX_08_51_Ch1 - -SFX_08_52:: ; 201f8 (8:41f8) - db CH7 - dw SFX_08_52_Ch1 - -SFX_08_53:: ; 201fb (8:41fb) - db CH7 - dw SFX_08_53_Ch1 - -SFX_08_54:: ; 201fe (8:41fe) - db CH7 - dw SFX_08_54_Ch1 - -SFX_08_55:: ; 20201 (8:4201) - db CH7 - dw SFX_08_55_Ch1 - -SFX_08_56:: ; 20204 (8:4204) - db CH7 - dw SFX_08_56_Ch1 - -SFX_08_57:: ; 20207 (8:4207) - db CH7 - dw SFX_08_57_Ch1 - -SFX_08_58:: ; 2020a (8:420a) - db CH7 - dw SFX_08_58_Ch1 - -SFX_08_59:: ; 2020d (8:420d) - db CH7 - dw SFX_08_59_Ch1 - -SFX_08_5a:: ; 20210 (8:4210) - db CH7 - dw SFX_08_5a_Ch1 - -SFX_08_5b:: ; 20213 (8:4213) - db CH7 - dw SFX_08_5b_Ch1 - -SFX_08_5c:: ; 20216 (8:4216) - db CH7 - dw SFX_08_5c_Ch1 - -SFX_08_5d:: ; 20219 (8:4219) - db CH7 - dw SFX_08_5d_Ch1 - -SFX_08_5e:: ; 2021c (8:421c) - db ( $40 | CH4 ) - dw SFX_08_5e_Ch1 - db CH7 - dw SFX_08_5e_Ch2 - -SFX_08_5f:: ; 20222 (8:4222) - db CH7 - dw SFX_08_5f_Ch1 - -SFX_08_60:: ; 20225 (8:4225) - db CH7 - dw SFX_08_60_Ch1 - -SFX_08_61:: ; 20228 (8:4228) - db CH7 - dw SFX_08_61_Ch1 - -SFX_08_62:: ; 2022b (8:422b) - db CH7 - dw SFX_08_62_Ch1 - -SFX_08_63:: ; 2022e (8:422e) - db CH7 - dw SFX_08_63_Ch1 - -SFX_08_64:: ; 20231 (8:4231) - db ( $40 | CH4 ) - dw SFX_08_64_Ch1 - db CH7 - dw SFX_08_64_Ch2 - -SFX_08_65:: ; 20237 (8:4237) - db CH7 - dw SFX_08_65_Ch1 - -SFX_08_66:: ; 2023a (8:423a) - db CH7 - dw SFX_08_66_Ch1 - -SFX_08_67:: ; 2023d (8:423d) - db ( $80 | CH4 ) - dw SFX_08_67_Ch1 - db CH5 - dw SFX_08_67_Ch2 - db CH7 - dw SFX_08_67_Ch3 - -SFX_08_68:: ; 20246 (8:4246) - db ( $80 | CH4 ) - dw SFX_08_68_Ch1 - db CH5 - dw SFX_08_68_Ch2 - db CH7 - dw SFX_08_68_Ch3 - -SFX_08_69:: ; 2024f (8:424f) - db ( $40 | CH4 ) - dw SFX_08_69_Ch1 - db CH7 - dw SFX_08_69_Ch2 - -SFX_08_6a:: ; 20255 (8:4255) - db ( $80 | CH4 ) - dw SFX_08_6a_Ch1 - db CH5 - dw SFX_08_6a_Ch2 - db CH7 - dw SFX_08_6a_Ch3 - -SFX_08_6b:: ; 2025e (8:425e) - db ( $40 | CH4 ) - dw SFX_08_6b_Ch1 - db CH7 - dw SFX_08_6b_Ch2 - -SFX_08_6c:: ; 20264 (8:4264) - db ( $80 | CH4 ) - dw SFX_08_6c_Ch1 - db CH5 - dw SFX_08_6c_Ch2 - db CH7 - dw SFX_08_6c_Ch3 - -SFX_08_6d:: ; 2026d (8:426d) - db ( $80 | CH4 ) - dw SFX_08_6d_Ch1 - db CH5 - dw SFX_08_6d_Ch2 - db CH7 - dw SFX_08_6d_Ch3 - -SFX_08_6e:: ; 20276 (8:4276) - db ( $80 | CH4 ) - dw SFX_08_6e_Ch1 - db CH5 - dw SFX_08_6e_Ch2 - db CH7 - dw SFX_08_6e_Ch3 - -SFX_08_6f:: ; 2027f (8:427f) - db ( $80 | CH4 ) - dw SFX_08_6f_Ch1 - db CH5 - dw SFX_08_6f_Ch2 - db CH7 - dw SFX_08_6f_Ch3 - -SFX_08_70:: ; 20288 (8:4288) - db ( $80 | CH4 ) - dw SFX_08_70_Ch1 - db CH5 - dw SFX_08_70_Ch2 - db CH7 - dw SFX_08_70_Ch3 - -SFX_08_71:: ; 20291 (8:4291) - db ( $40 | CH4 ) - dw SFX_08_71_Ch1 - db CH5 - dw SFX_08_71_Ch2 - -SFX_08_72:: ; 20297 (8:4297) - db ( $40 | CH4 ) - dw SFX_08_72_Ch1 - db CH5 - dw SFX_08_72_Ch2 - -SFX_08_73:: ; 2029d (8:429d) - db ( $40 | CH4 ) - dw SFX_08_73_Ch1 - db CH5 - dw SFX_08_73_Ch2 - -SFX_08_74:: ; 202a3 (8:42a3) - db ( $80 | CH4 ) - dw SFX_08_74_Ch1 - db CH5 - dw SFX_08_74_Ch2 - db CH7 - dw SFX_08_74_Ch3 - -SFX_08_75:: ; 202ac (8:42ac) - db ( $40 | CH4 ) - dw SFX_08_75_Ch1 - db CH5 - dw SFX_08_75_Ch2 - -SFX_08_76:: ; 202b2 (8:42b2) - db ( $80 | CH4 ) - dw SFX_08_76_Ch1 - db CH5 - dw SFX_08_76_Ch2 - db CH7 - dw SFX_08_76_Ch3 - -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/sfxheaders1.asm b/audio/headers/sfxheaders1.asm new file mode 100644 index 00000000..72a69646 --- /dev/null +++ b/audio/headers/sfxheaders1.asm @@ -0,0 +1,288 @@ +SFX_Headers_1:: + db $ff, $ff, $ff ; padding + +SFX_Snare1_1:: + audio SFX_Snare1_1, Ch7 + +SFX_Snare2_1:: + audio SFX_Snare2_1, Ch7 + +SFX_Snare3_1:: + audio SFX_Snare3_1, Ch7 + +SFX_Snare4_1:: + audio SFX_Snare4_1, Ch7 + +SFX_Snare5_1:: + audio SFX_Snare5_1, Ch7 + +SFX_Triangle1_1:: + audio SFX_Triangle1_1, Ch7 + +SFX_Triangle2_1:: + audio SFX_Triangle2_1, Ch7 + +SFX_Snare6_1:: + audio SFX_Snare6_1, Ch7 + +SFX_Snare7_1:: + audio SFX_Snare7_1, Ch7 + +SFX_Snare8_1:: + audio SFX_Snare8_1, Ch7 + +SFX_Snare9_1:: + audio SFX_Snare9_1, Ch7 + +SFX_Cymbal1_1:: + audio SFX_Cymbal1_1, Ch7 + +SFX_Cymbal2_1:: + audio SFX_Cymbal2_1, Ch7 + +SFX_Cymbal3_1:: + audio SFX_Cymbal3_1, Ch7 + +SFX_Muted_Snare1_1:: + audio SFX_Muted_Snare1_1, Ch7 + +SFX_Triangle3_1:: + audio SFX_Triangle3_1, Ch7 + +SFX_Muted_Snare2_1:: + audio SFX_Muted_Snare2_1, Ch7 + +SFX_Muted_Snare3_1:: + audio SFX_Muted_Snare3_1, Ch7 + +SFX_Muted_Snare4_1:: + audio SFX_Muted_Snare4_1, Ch7 + +SFX_Cry00_1:: + audio SFX_Cry00_1, Ch4, Ch5, Ch7 + +SFX_Cry01_1:: + audio SFX_Cry01_1, Ch4, Ch5, Ch7 + +SFX_Cry02_1:: + audio SFX_Cry02_1, Ch4, Ch5, Ch7 + +SFX_Cry03_1:: + audio SFX_Cry03_1, Ch4, Ch5, Ch7 + +SFX_Cry04_1:: + audio SFX_Cry04_1, Ch4, Ch5, Ch7 + +SFX_Cry05_1:: + audio SFX_Cry05_1, Ch4, Ch5, Ch7 + +SFX_Cry06_1:: + audio SFX_Cry06_1, Ch4, Ch5, Ch7 + +SFX_Cry07_1:: + audio SFX_Cry07_1, Ch4, Ch5, Ch7 + +SFX_Cry08_1:: + audio SFX_Cry08_1, Ch4, Ch5, Ch7 + +SFX_Cry09_1:: + audio SFX_Cry09_1, Ch4, Ch5, Ch7 + +SFX_Cry0A_1:: + audio SFX_Cry0A_1, Ch4, Ch5, Ch7 + +SFX_Cry0B_1:: + audio SFX_Cry0B_1, Ch4, Ch5, Ch7 + +SFX_Cry0C_1:: + audio SFX_Cry0C_1, Ch4, Ch5, Ch7 + +SFX_Cry0D_1:: + audio SFX_Cry0D_1, Ch4, Ch5, Ch7 + +SFX_Cry0E_1:: + audio SFX_Cry0E_1, Ch4, Ch5, Ch7 + +SFX_Cry0F_1:: + audio SFX_Cry0F_1, Ch4, Ch5, Ch7 + +SFX_Cry10_1:: + audio SFX_Cry10_1, Ch4, Ch5, Ch7 + +SFX_Cry11_1:: + audio SFX_Cry11_1, Ch4, Ch5, Ch7 + +SFX_Cry12_1:: + audio SFX_Cry12_1, Ch4, Ch5, Ch7 + +SFX_Cry13_1:: + audio SFX_Cry13_1, Ch4, Ch5, Ch7 + +SFX_Cry14_1:: + audio SFX_Cry14_1, Ch4, Ch5, Ch7 + +SFX_Cry15_1:: + audio SFX_Cry15_1, Ch4, Ch5, Ch7 + +SFX_Cry16_1:: + audio SFX_Cry16_1, Ch4, Ch5, Ch7 + +SFX_Cry17_1:: + audio SFX_Cry17_1, Ch4, Ch5, Ch7 + +SFX_Cry18_1:: + audio SFX_Cry18_1, Ch4, Ch5, Ch7 + +SFX_Cry19_1:: + audio SFX_Cry19_1, Ch4, Ch5, Ch7 + +SFX_Cry1A_1:: + audio SFX_Cry1A_1, Ch4, Ch5, Ch7 + +SFX_Cry1B_1:: + audio SFX_Cry1B_1, Ch4, Ch5, Ch7 + +SFX_Cry1C_1:: + audio SFX_Cry1C_1, Ch4, Ch5, Ch7 + +SFX_Cry1D_1:: + audio SFX_Cry1D_1, Ch4, Ch5, Ch7 + +SFX_Cry1E_1:: + audio SFX_Cry1E_1, Ch4, Ch5, Ch7 + +SFX_Cry1F_1:: + audio SFX_Cry1F_1, Ch4, Ch5, Ch7 + +SFX_Cry20_1:: + audio SFX_Cry20_1, Ch4, Ch5, Ch7 + +SFX_Cry21_1:: + audio SFX_Cry21_1, Ch4, Ch5, Ch7 + +SFX_Cry22_1:: + audio SFX_Cry22_1, Ch4, Ch5, Ch7 + +SFX_Cry23_1:: + audio SFX_Cry23_1, Ch4, Ch5, Ch7 + +SFX_Cry24_1:: + audio SFX_Cry24_1, Ch4, Ch5, Ch7 + +SFX_Cry25_1:: + audio SFX_Cry25_1, Ch4, Ch5, Ch7 + +SFX_Get_Item1_1:: + audio SFX_Get_Item1_1, Ch4, Ch5, Ch6 + +SFX_Get_Item2_1:: + audio SFX_Get_Item2_1, Ch4, Ch5, Ch6 + +SFX_Tink_1:: + audio SFX_Tink_1, Ch4 + +SFX_Heal_HP_1:: + audio SFX_Heal_HP_1, Ch4 + +SFX_Heal_Ailment_1:: + audio SFX_Heal_Ailment_1, Ch4 + +SFX_Start_Menu_1:: + audio SFX_Start_Menu_1, Ch7 + +SFX_Press_AB_1:: + audio SFX_Press_AB_1, Ch4 + +SFX_Pokedex_Rating_1:: + audio SFX_Pokedex_Rating_1, Ch4, Ch5, Ch6 + +SFX_Get_Key_Item_1:: + audio SFX_Get_Key_Item_1, Ch4, Ch5, Ch6 + +SFX_Poisoned_1:: + audio SFX_Poisoned_1, Ch4 + +SFX_Trade_Machine_1:: + audio SFX_Trade_Machine_1, Ch4 + +SFX_Turn_On_PC_1:: + audio SFX_Turn_On_PC_1, Ch4 + +SFX_Turn_Off_PC_1:: + audio SFX_Turn_Off_PC_1, Ch4 + +SFX_Enter_PC_1:: + audio SFX_Enter_PC_1, Ch4 + +SFX_Shrink_1:: + audio SFX_Shrink_1, Ch4 + +SFX_Switch_1:: + audio SFX_Switch_1, Ch4 + +SFX_Healing_Machine_1:: + audio SFX_Healing_Machine_1, Ch4 + +SFX_Teleport_Exit1_1:: + audio SFX_Teleport_Exit1_1, Ch4 + +SFX_Teleport_Enter1_1:: + audio SFX_Teleport_Enter1_1, Ch4 + +SFX_Teleport_Exit2_1:: + audio SFX_Teleport_Exit2_1, Ch4 + +SFX_Ledge_1:: + audio SFX_Ledge_1, Ch4 + +SFX_Teleport_Enter2_1:: + audio SFX_Teleport_Enter2_1, Ch7 + +SFX_Fly_1:: + audio SFX_Fly_1, Ch7 + +SFX_Denied_1:: + audio SFX_Denied_1, Ch4, Ch5 + +SFX_Arrow_Tiles_1:: + audio SFX_Arrow_Tiles_1, Ch4 + +SFX_Push_Boulder_1:: + audio SFX_Push_Boulder_1, Ch7 + +SFX_SS_Anne_Horn_1:: + audio SFX_SS_Anne_Horn_1, Ch4, Ch5 + +SFX_Withdraw_Deposit_1:: + audio SFX_Withdraw_Deposit_1, Ch4 + +SFX_Cut_1:: + audio SFX_Cut_1, Ch7 + +SFX_Go_Inside_1:: + audio SFX_Go_Inside_1, Ch7 + +SFX_Swap_1:: + audio SFX_Swap_1, Ch4, Ch5 + +SFX_59_1:: + audio SFX_59_1, Ch4, Ch5 + +SFX_Purchase_1:: + audio SFX_Purchase_1, Ch4, Ch5 + +SFX_Collision_1:: + audio SFX_Collision_1, Ch4 + +SFX_Go_Outside_1:: + audio SFX_Go_Outside_1, Ch7 + +SFX_Save_1:: + audio SFX_Save_1, Ch4, Ch5 + +; the Pokeflute sound effect directly hijacks channel 2 +SFX_Pokeflute:: + audio SFX_Pokeflute, Ch2 + +SFX_Safari_Zone_PA:: + audio SFX_Safari_Zone_PA, Ch4 diff --git a/audio/headers/sfxheaders1f.asm b/audio/headers/sfxheaders1f.asm deleted file mode 100644 index 4db63a59..00000000 --- a/audio/headers/sfxheaders1f.asm +++ /dev/null @@ -1,598 +0,0 @@ -SFX_Headers_1f:: - db $ff, $ff, $ff ; padding - -SFX_1f_01:: ; 7c003 (1f:4003) - db CH7 - dw SFX_1f_01_Ch1 - -SFX_1f_02:: ; 7c006 (1f:4006) - db CH7 - dw SFX_1f_02_Ch1 - -SFX_1f_03:: ; 7c009 (1f:4009) - db CH7 - dw SFX_1f_03_Ch1 - -SFX_1f_04:: ; 7c00c (1f:400c) - db CH7 - dw SFX_1f_04_Ch1 - -SFX_1f_05:: ; 7c00f (1f:400f) - db CH7 - dw SFX_1f_05_Ch1 - -SFX_1f_06:: ; 7c012 (1f:4012) - db CH7 - dw SFX_1f_06_Ch1 - -SFX_1f_07:: ; 7c015 (1f:4015) - db CH7 - dw SFX_1f_07_Ch1 - -SFX_1f_08:: ; 7c018 (1f:4018) - db CH7 - dw SFX_1f_08_Ch1 - -SFX_1f_09:: ; 7c01b (1f:401b) - db CH7 - dw SFX_1f_09_Ch1 - -SFX_1f_0a:: ; 7c01e (1f:401e) - db CH7 - dw SFX_1f_0a_Ch1 - -SFX_1f_0b:: ; 7c021 (1f:4021) - db CH7 - dw SFX_1f_0b_Ch1 - -SFX_1f_0c:: ; 7c024 (1f:4024) - db CH7 - dw SFX_1f_0c_Ch1 - -SFX_1f_0d:: ; 7c027 (1f:4027) - db CH7 - dw SFX_1f_0d_Ch1 - -SFX_1f_0e:: ; 7c02a (1f:402a) - db CH7 - dw SFX_1f_0e_Ch1 - -SFX_1f_0f:: ; 7c02d (1f:402d) - db CH7 - dw SFX_1f_0f_Ch1 - -SFX_1f_10:: ; 7c030 (1f:4030) - db CH7 - dw SFX_1f_10_Ch1 - -SFX_1f_11:: ; 7c033 (1f:4033) - db CH7 - dw SFX_1f_11_Ch1 - -SFX_1f_12:: ; 7c036 (1f:4036) - db CH7 - dw SFX_1f_12_Ch1 - -SFX_1f_13:: ; 7c039 (1f:4039) - db CH7 - dw SFX_1f_13_Ch1 - -SFX_1f_14:: ; 7c03c (1f:403c) - db ( $80 | CH4 ) - dw SFX_1f_14_Ch1 - db CH5 - dw SFX_1f_14_Ch2 - db CH7 - dw SFX_1f_14_Ch3 - -SFX_1f_15:: ; 7c045 (1f:4045) - db ( $80 | CH4 ) - dw SFX_1f_15_Ch1 - db CH5 - dw SFX_1f_15_Ch2 - db CH7 - dw SFX_1f_15_Ch3 - -SFX_1f_16:: ; 7c04e (1f:404e) - db ( $80 | CH4 ) - dw SFX_1f_16_Ch1 - db CH5 - dw SFX_1f_16_Ch2 - db CH7 - dw SFX_1f_16_Ch3 - -SFX_1f_17:: ; 7c057 (1f:4057) - db ( $80 | CH4 ) - dw SFX_1f_17_Ch1 - db CH5 - dw SFX_1f_17_Ch2 - db CH7 - dw SFX_1f_17_Ch3 - -SFX_1f_18:: ; 7c060 (1f:4060) - db ( $80 | CH4 ) - dw SFX_1f_18_Ch1 - db CH5 - dw SFX_1f_18_Ch2 - db CH7 - dw SFX_1f_18_Ch3 - -SFX_1f_19:: ; 7c069 (1f:4069) - db ( $80 | CH4 ) - dw SFX_1f_19_Ch1 - db CH5 - dw SFX_1f_19_Ch2 - db CH7 - dw SFX_1f_19_Ch3 - -SFX_1f_1a:: ; 7c072 (1f:4072) - db ( $80 | CH4 ) - dw SFX_1f_1a_Ch1 - db CH5 - dw SFX_1f_1a_Ch2 - db CH7 - dw SFX_1f_1a_Ch3 - -SFX_1f_1b:: ; 7c07b (1f:407b) - db ( $80 | CH4 ) - dw SFX_1f_1b_Ch1 - db CH5 - dw SFX_1f_1b_Ch2 - db CH7 - dw SFX_1f_1b_Ch3 - -SFX_1f_1c:: ; 7c084 (1f:4084) - db ( $80 | CH4 ) - dw SFX_1f_1c_Ch1 - db CH5 - dw SFX_1f_1c_Ch2 - db CH7 - dw SFX_1f_1c_Ch3 - -SFX_1f_1d:: ; 7c08d (1f:408d) - db ( $80 | CH4 ) - dw SFX_1f_1d_Ch1 - db CH5 - dw SFX_1f_1d_Ch2 - db CH7 - dw SFX_1f_1d_Ch3 - -SFX_1f_1e:: ; 7c096 (1f:4096) - db ( $80 | CH4 ) - dw SFX_1f_1e_Ch1 - db CH5 - dw SFX_1f_1e_Ch2 - db CH7 - dw SFX_1f_1e_Ch3 - -SFX_1f_1f:: ; 7c09f (1f:409f) - db ( $80 | CH4 ) - dw SFX_1f_1f_Ch1 - db CH5 - dw SFX_1f_1f_Ch2 - db CH7 - dw SFX_1f_1f_Ch3 - -SFX_1f_20:: ; 7c0a8 (1f:40a8) - db ( $80 | CH4 ) - dw SFX_1f_20_Ch1 - db CH5 - dw SFX_1f_20_Ch2 - db CH7 - dw SFX_1f_20_Ch3 - -SFX_1f_21:: ; 7c0b1 (1f:40b1) - db ( $80 | CH4 ) - dw SFX_1f_21_Ch1 - db CH5 - dw SFX_1f_21_Ch2 - db CH7 - dw SFX_1f_21_Ch3 - -SFX_1f_22:: ; 7c0ba (1f:40ba) - db ( $80 | CH4 ) - dw SFX_1f_22_Ch1 - db CH5 - dw SFX_1f_22_Ch2 - db CH7 - dw SFX_1f_22_Ch3 - -SFX_1f_23:: ; 7c0c3 (1f:40c3) - db ( $80 | CH4 ) - dw SFX_1f_23_Ch1 - db CH5 - dw SFX_1f_23_Ch2 - db CH7 - dw SFX_1f_23_Ch3 - -SFX_1f_24:: ; 7c0cc (1f:40cc) - db ( $80 | CH4 ) - dw SFX_1f_24_Ch1 - db CH5 - dw SFX_1f_24_Ch2 - db CH7 - dw SFX_1f_24_Ch3 - -SFX_1f_25:: ; 7c0d5 (1f:40d5) - db ( $80 | CH4 ) - dw SFX_1f_25_Ch1 - db CH5 - dw SFX_1f_25_Ch2 - db CH7 - dw SFX_1f_25_Ch3 - -SFX_1f_26:: ; 7c0de (1f:40de) - db ( $80 | CH4 ) - dw SFX_1f_26_Ch1 - db CH5 - dw SFX_1f_26_Ch2 - db CH7 - dw SFX_1f_26_Ch3 - -SFX_1f_27:: ; 7c0e7 (1f:40e7) - db ( $80 | CH4 ) - dw SFX_1f_27_Ch1 - db CH5 - dw SFX_1f_27_Ch2 - db CH7 - dw SFX_1f_27_Ch3 - -SFX_1f_28:: ; 7c0f0 (1f:40f0) - db ( $80 | CH4 ) - dw SFX_1f_28_Ch1 - db CH5 - dw SFX_1f_28_Ch2 - db CH7 - dw SFX_1f_28_Ch3 - -SFX_1f_29:: ; 7c0f9 (1f:40f9) - db ( $80 | CH4 ) - dw SFX_1f_29_Ch1 - db CH5 - dw SFX_1f_29_Ch2 - db CH7 - dw SFX_1f_29_Ch3 - -SFX_1f_2a:: ; 7c102 (1f:4102) - db ( $80 | CH4 ) - dw SFX_1f_2a_Ch1 - db CH5 - dw SFX_1f_2a_Ch2 - db CH7 - dw SFX_1f_2a_Ch3 - -SFX_1f_2b:: ; 7c10b (1f:410b) - db ( $80 | CH4 ) - dw SFX_1f_2b_Ch1 - db CH5 - dw SFX_1f_2b_Ch2 - db CH7 - dw SFX_1f_2b_Ch3 - -SFX_1f_2c:: ; 7c114 (1f:4114) - db ( $80 | CH4 ) - dw SFX_1f_2c_Ch1 - db CH5 - dw SFX_1f_2c_Ch2 - db CH7 - dw SFX_1f_2c_Ch3 - -SFX_1f_2d:: ; 7c11d (1f:411d) - db ( $80 | CH4 ) - dw SFX_1f_2d_Ch1 - db CH5 - dw SFX_1f_2d_Ch2 - db CH7 - dw SFX_1f_2d_Ch3 - -SFX_1f_2e:: ; 7c126 (1f:4126) - db ( $80 | CH4 ) - dw SFX_1f_2e_Ch1 - db CH5 - dw SFX_1f_2e_Ch2 - db CH7 - dw SFX_1f_2e_Ch3 - -SFX_1f_2f:: ; 7c12f (1f:412f) - db ( $80 | CH4 ) - dw SFX_1f_2f_Ch1 - db CH5 - dw SFX_1f_2f_Ch2 - db CH7 - dw SFX_1f_2f_Ch3 - -SFX_1f_30:: ; 7c138 (1f:4138) - db ( $80 | CH4 ) - dw SFX_1f_30_Ch1 - db CH5 - dw SFX_1f_30_Ch2 - db CH7 - dw SFX_1f_30_Ch3 - -SFX_1f_31:: ; 7c141 (1f:4141) - db ( $80 | CH4 ) - dw SFX_1f_31_Ch1 - db CH5 - dw SFX_1f_31_Ch2 - db CH7 - dw SFX_1f_31_Ch3 - -SFX_1f_32:: ; 7c14a (1f:414a) - db ( $80 | CH4 ) - dw SFX_1f_32_Ch1 - db CH5 - dw SFX_1f_32_Ch2 - db CH7 - dw SFX_1f_32_Ch3 - -SFX_1f_33:: ; 7c153 (1f:4153) - db ( $80 | CH4 ) - dw SFX_1f_33_Ch1 - db CH5 - dw SFX_1f_33_Ch2 - db CH7 - dw SFX_1f_33_Ch3 - -SFX_1f_34:: ; 7c15c (1f:415c) - db ( $80 | CH4 ) - dw SFX_1f_34_Ch1 - db CH5 - dw SFX_1f_34_Ch2 - db CH7 - dw SFX_1f_34_Ch3 - -SFX_1f_35:: ; 7c165 (1f:4165) - db ( $80 | CH4 ) - dw SFX_1f_35_Ch1 - db CH5 - dw SFX_1f_35_Ch2 - db CH7 - dw SFX_1f_35_Ch3 - -SFX_1f_36:: ; 7c16e (1f:416e) - db ( $80 | CH4 ) - dw SFX_1f_36_Ch1 - db CH5 - dw SFX_1f_36_Ch2 - db CH7 - dw SFX_1f_36_Ch3 - -SFX_1f_37:: ; 7c177 (1f:4177) - db ( $80 | CH4 ) - dw SFX_1f_37_Ch1 - db CH5 - dw SFX_1f_37_Ch2 - db CH7 - dw SFX_1f_37_Ch3 - -SFX_1f_38:: ; 7c180 (1f:4180) - db ( $80 | CH4 ) - dw SFX_1f_38_Ch1 - db CH5 - dw SFX_1f_38_Ch2 - db CH7 - dw SFX_1f_38_Ch3 - -SFX_1f_39:: ; 7c189 (1f:4189) - db ( $80 | CH4 ) - dw SFX_1f_39_Ch1 - db CH5 - dw SFX_1f_39_Ch2 - db CH7 - dw SFX_1f_39_Ch3 - -SFX_1f_3a:: ; 7c192 (1f:4192) - db ( $80 | CH4 ) - dw SFX_1f_3a_Ch1 - db CH5 - dw SFX_1f_3a_Ch2 - db CH6 - dw SFX_1f_3a_Ch3 - -SFX_1f_3b:: ; 7c19b (1f:419b) - db ( $80 | CH4 ) - dw SFX_1f_3b_Ch1 - db CH5 - dw SFX_1f_3b_Ch2 - db CH6 - dw SFX_1f_3b_Ch3 - -SFX_1f_3c:: ; 7c1a4 (1f:41a4) - db CH4 - dw SFX_1f_3c_Ch1 - -SFX_1f_3d:: ; 7c1a7 (1f:41a7) - db CH4 - dw SFX_1f_3d_Ch1 - -SFX_1f_3e:: ; 7c1aa (1f:41aa) - db CH4 - dw SFX_1f_3e_Ch1 - -SFX_1f_3f:: ; 7c1ad (1f:41ad) - db CH7 - dw SFX_1f_3f_Ch1 - -SFX_1f_40:: ; 7c1b0 (1f:41b0) - db CH4 - dw SFX_1f_40_Ch1 - -SFX_1f_41:: ; 7c1b3 (1f:41b3) - db ( $80 | CH4 ) - dw SFX_1f_41_Ch1 - db CH5 - dw SFX_1f_41_Ch2 - db CH6 - dw SFX_1f_41_Ch3 - -SFX_1f_42:: ; 7c1bc (1f:41bc) - db ( $80 | CH4 ) - dw SFX_1f_42_Ch1 - db CH5 - dw SFX_1f_42_Ch2 - db CH6 - dw SFX_1f_42_Ch3 - -SFX_1f_43:: ; 7c1c5 (1f:41c5) - db CH4 - dw SFX_1f_43_Ch1 - -SFX_1f_44:: ; 7c1c8 (1f:41c8) - db CH4 - dw SFX_1f_44_Ch1 - -SFX_1f_45:: ; 7c1cb (1f:41cb) - db CH4 - dw SFX_1f_45_Ch1 - -SFX_1f_46:: ; 7c1ce (1f:41ce) - db CH4 - dw SFX_1f_46_Ch1 - -SFX_1f_47:: ; 7c1d1 (1f:41d1) - db CH4 - dw SFX_1f_47_Ch1 - -SFX_1f_48:: ; 7c1d4 (1f:41d4) - db CH4 - dw SFX_1f_48_Ch1 - -SFX_1f_49:: ; 7c1d7 (1f:41d7) - db CH4 - dw SFX_1f_49_Ch1 - -SFX_1f_4a:: ; 7c1da (1f:41da) - db CH4 - dw SFX_1f_4a_Ch1 - -SFX_1f_4b:: ; 7c1dd (1f:41dd) - db CH4 - dw SFX_1f_4b_Ch1 - -SFX_1f_4c:: ; 7c1e0 (1f:41e0) - db CH4 - dw SFX_1f_4c_Ch1 - -SFX_1f_4d:: ; 7c1e3 (1f:41e3) - db CH4 - dw SFX_1f_4d_Ch1 - -SFX_1f_4e:: ; 7c1e6 (1f:41e6) - db CH4 - dw SFX_1f_4e_Ch1 - -SFX_1f_4f:: ; 7c1e9 (1f:41e9) - db CH7 - dw SFX_1f_4f_Ch1 - -SFX_1f_50:: ; 7c1ec (1f:41ec) - db CH7 - dw SFX_1f_50_Ch1 - -SFX_1f_51:: ; 7c1ef (1f:41ef) - db ( $40 | CH4 ) - dw SFX_1f_51_Ch1 - db CH5 - dw SFX_1f_51_Ch2 - -SFX_1f_52:: ; 7c1f5 (1f:41f5) - db CH4 - dw SFX_1f_52_Ch1 - -SFX_1f_53:: ; 7c1f8 (1f:41f8) - db CH7 - dw SFX_1f_53_Ch1 - -SFX_1f_54:: ; 7c1fb (1f:41fb) - db ( $40 | CH4 ) - dw SFX_1f_54_Ch1 - db CH5 - dw SFX_1f_54_Ch2 - -SFX_1f_55:: ; 7c201 (1f:4201) - db CH4 - dw SFX_1f_55_Ch1 - -SFX_1f_56:: ; 7c204 (1f:4204) - db CH7 - dw SFX_1f_56_Ch1 - -SFX_1f_57:: ; 7c207 (1f:4207) - db CH7 - dw SFX_1f_57_Ch1 - -SFX_1f_58:: ; 7c20a (1f:420a) - db ( $40 | CH4 ) - dw SFX_1f_58_Ch1 - db CH5 - dw SFX_1f_58_Ch2 - -SFX_1f_59:: ; 7c210 (1f:4210) - db ( $40 | CH4 ) - dw SFX_1f_59_Ch1 - db CH5 - dw SFX_1f_59_Ch2 - -SFX_1f_5a:: ; 7c216 (1f:4216) - db ( $40 | CH4 ) - dw SFX_1f_5a_Ch1 - db CH5 - dw SFX_1f_5a_Ch2 - -SFX_1f_5b:: ; 7c21c (1f:421c) - db CH4 - dw SFX_1f_5b_Ch1 - -SFX_1f_5c:: ; 7c21f (1f:421f) - db CH7 - dw SFX_1f_5c_Ch1 - -SFX_1f_5d:: ; 7c222 (1f:4222) - db ( $40 | CH4 ) - dw SFX_1f_5d_Ch1 - db CH5 - dw SFX_1f_5d_Ch2 - -SFX_1f_5e:: ; 7c228 (1f:4228) - db CH7 - dw SFX_1f_5e_Ch1 - -SFX_1f_5f:: ; 7c22b (1f:422b) - db CH4 - dw SFX_1f_5f_Ch1 - -SFX_1f_60:: ; 7c22e (1f:422e) - db CH4 - dw SFX_1f_60_Ch1 - -SFX_1f_61:: ; 7c231 (1f:4231) - db CH7 - dw SFX_1f_61_Ch1 - -SFX_1f_62:: ; 7c234 (1f:4234) - db CH7 - dw SFX_1f_62_Ch1 - -SFX_1f_63:: ; 7c237 (1f:4237) - db CH7 - dw SFX_1f_63_Ch1 - -SFX_1f_64:: ; 7c23a (1f:423a) - db CH4 - dw SFX_1f_64_Ch1 - -SFX_1f_65:: ; 7c23d (1f:423d) - db CH4 - dw SFX_1f_65_Ch1 - -SFX_1f_66:: ; 7c240 (1f:4240) - db ( $40 | CH4 ) - dw SFX_1f_66_Ch1 - db CH5 - dw SFX_1f_66_Ch2 - -SFX_1f_67:: ; 7c246 (1f:4246) - db CH4 - dw SFX_1f_67_Ch1 - -; 0x7c249
\ No newline at end of file diff --git a/audio/headers/sfxheaders2.asm b/audio/headers/sfxheaders2.asm new file mode 100644 index 00000000..b96a764f --- /dev/null +++ b/audio/headers/sfxheaders2.asm @@ -0,0 +1,359 @@ +SFX_Headers_2:: + db $ff, $ff, $ff ; padding + +SFX_Snare1_2:: + audio SFX_Snare1_2, Ch7 + +SFX_Snare2_2:: + audio SFX_Snare2_2, Ch7 + +SFX_Snare3_2:: + audio SFX_Snare3_2, Ch7 + +SFX_Snare4_2:: + audio SFX_Snare4_2, Ch7 + +SFX_Snare5_2:: + audio SFX_Snare5_2, Ch7 + +SFX_Triangle1_2:: + audio SFX_Triangle1_2, Ch7 + +SFX_Triangle2_2:: + audio SFX_Triangle2_2, Ch7 + +SFX_Snare6_2:: + audio SFX_Snare6_2, Ch7 + +SFX_Snare7_2:: + audio SFX_Snare7_2, Ch7 + +SFX_Snare8_2:: + audio SFX_Snare8_2, Ch7 + +SFX_Snare9_2:: + audio SFX_Snare9_2, Ch7 + +SFX_Cymbal1_2:: + audio SFX_Cymbal1_2, Ch7 + +SFX_Cymbal2_2:: + audio SFX_Cymbal2_2, Ch7 + +SFX_Cymbal3_2:: + audio SFX_Cymbal3_2, Ch7 + +SFX_Muted_Snare1_2:: + audio SFX_Muted_Snare1_2, Ch7 + +SFX_Triangle3_2:: + audio SFX_Triangle3_2, Ch7 + +SFX_Muted_Snare2_2:: + audio SFX_Muted_Snare2_2, Ch7 + +SFX_Muted_Snare3_2:: + audio SFX_Muted_Snare3_2, Ch7 + +SFX_Muted_Snare4_2:: + audio SFX_Muted_Snare4_2, Ch7 + +SFX_Cry00_2:: + audio SFX_Cry00_2, Ch4, Ch5, Ch7 + +SFX_Cry01_2:: + audio SFX_Cry01_2, Ch4, Ch5, Ch7 + +SFX_Cry02_2:: + audio SFX_Cry02_2, Ch4, Ch5, Ch7 + +SFX_Cry03_2:: + audio SFX_Cry03_2, Ch4, Ch5, Ch7 + +SFX_Cry04_2:: + audio SFX_Cry04_2, Ch4, Ch5, Ch7 + +SFX_Cry05_2:: + audio SFX_Cry05_2, Ch4, Ch5, Ch7 + +SFX_Cry06_2:: + audio SFX_Cry06_2, Ch4, Ch5, Ch7 + +SFX_Cry07_2:: + audio SFX_Cry07_2, Ch4, Ch5, Ch7 + +SFX_Cry08_2:: + audio SFX_Cry08_2, Ch4, Ch5, Ch7 + +SFX_Cry09_2:: + audio SFX_Cry09_2, Ch4, Ch5, Ch7 + +SFX_Cry0A_2:: + audio SFX_Cry0A_2, Ch4, Ch5, Ch7 + +SFX_Cry0B_2:: + audio SFX_Cry0B_2, Ch4, Ch5, Ch7 + +SFX_Cry0C_2:: + audio SFX_Cry0C_2, Ch4, Ch5, Ch7 + +SFX_Cry0D_2:: + audio SFX_Cry0D_2, Ch4, Ch5, Ch7 + +SFX_Cry0E_2:: + audio SFX_Cry0E_2, Ch4, Ch5, Ch7 + +SFX_Cry0F_2:: + audio SFX_Cry0F_2, Ch4, Ch5, Ch7 + +SFX_Cry10_2:: + audio SFX_Cry10_2, Ch4, Ch5, Ch7 + +SFX_Cry11_2:: + audio SFX_Cry11_2, Ch4, Ch5, Ch7 + +SFX_Cry12_2:: + audio SFX_Cry12_2, Ch4, Ch5, Ch7 + +SFX_Cry13_2:: + audio SFX_Cry13_2, Ch4, Ch5, Ch7 + +SFX_Cry14_2:: + audio SFX_Cry14_2, Ch4, Ch5, Ch7 + +SFX_Cry15_2:: + audio SFX_Cry15_2, Ch4, Ch5, Ch7 + +SFX_Cry16_2:: + audio SFX_Cry16_2, Ch4, Ch5, Ch7 + +SFX_Cry17_2:: + audio SFX_Cry17_2, Ch4, Ch5, Ch7 + +SFX_Cry18_2:: + audio SFX_Cry18_2, Ch4, Ch5, Ch7 + +SFX_Cry19_2:: + audio SFX_Cry19_2, Ch4, Ch5, Ch7 + +SFX_Cry1A_2:: + audio SFX_Cry1A_2, Ch4, Ch5, Ch7 + +SFX_Cry1B_2:: + audio SFX_Cry1B_2, Ch4, Ch5, Ch7 + +SFX_Cry1C_2:: + audio SFX_Cry1C_2, Ch4, Ch5, Ch7 + +SFX_Cry1D_2:: + audio SFX_Cry1D_2, Ch4, Ch5, Ch7 + +SFX_Cry1E_2:: + audio SFX_Cry1E_2, Ch4, Ch5, Ch7 + +SFX_Cry1F_2:: + audio SFX_Cry1F_2, Ch4, Ch5, Ch7 + +SFX_Cry20_2:: + audio SFX_Cry20_2, Ch4, Ch5, Ch7 + +SFX_Cry21_2:: + audio SFX_Cry21_2, Ch4, Ch5, Ch7 + +SFX_Cry22_2:: + audio SFX_Cry22_2, Ch4, Ch5, Ch7 + +SFX_Cry23_2:: + audio SFX_Cry23_2, Ch4, Ch5, Ch7 + +SFX_Cry24_2:: + audio SFX_Cry24_2, Ch4, Ch5, Ch7 + +SFX_Cry25_2:: + audio SFX_Cry25_2, Ch4, Ch5, Ch7 + +SFX_Level_Up:: + audio SFX_Level_Up, Ch4, Ch5, Ch6 + +SFX_Get_Item2_2:: + audio SFX_Get_Item2_2, Ch4, Ch5, Ch6 + +SFX_Tink_2:: + audio SFX_Tink_2, Ch4 + +SFX_Heal_HP_2:: + audio SFX_Heal_HP_2, Ch4 + +SFX_Heal_Ailment_2:: + audio SFX_Heal_Ailment_2, Ch4 + +SFX_Start_Menu_2:: + audio SFX_Start_Menu_2, Ch7 + +SFX_Press_AB_2:: + audio SFX_Press_AB_2, Ch4 + +SFX_Ball_Toss:: + audio SFX_Ball_Toss, Ch4, Ch5 + +SFX_Ball_Poof:: + audio SFX_Ball_Poof, Ch4, Ch7 + +SFX_Faint_Thud:: + audio SFX_Faint_Thud, Ch4, Ch7 + +SFX_Run:: + audio SFX_Run, Ch7 + +SFX_Dex_Page_Added:: + audio SFX_Dex_Page_Added, Ch4, Ch5 + +SFX_Caught_Mon:: + audio SFX_Caught_Mon, Ch4, Ch5, Ch6 + +SFX_Peck:: + audio SFX_Peck, Ch7 + +SFX_Faint_Fall:: + audio SFX_Faint_Fall, Ch4 + +SFX_Battle_09:: + audio SFX_Battle_09, Ch4 + +SFX_Pound:: + audio SFX_Pound, Ch7 + +SFX_Battle_0B:: + audio SFX_Battle_0B, Ch7 + +SFX_Battle_0C:: + audio SFX_Battle_0C, Ch7 + +SFX_Battle_0D:: + audio SFX_Battle_0D, Ch7 + +SFX_Battle_0E:: + audio SFX_Battle_0E, Ch7 + +SFX_Battle_0F:: + audio SFX_Battle_0F, Ch7 + +SFX_Damage:: + audio SFX_Damage, Ch7 + +SFX_Not_Very_Effective:: + audio SFX_Not_Very_Effective, Ch7 + +SFX_Battle_12:: + audio SFX_Battle_12, Ch7 + +SFX_Battle_13:: + audio SFX_Battle_13, Ch7 + +SFX_Battle_14:: + audio SFX_Battle_14, Ch7 + +SFX_Vine_Whip:: + audio SFX_Vine_Whip, Ch7 + +SFX_Battle_16:: + audio SFX_Battle_16, Ch7 + +SFX_Battle_17:: + audio SFX_Battle_17, Ch7 + +SFX_Battle_18:: + audio SFX_Battle_18, Ch7 + +SFX_Battle_19:: + audio SFX_Battle_19, Ch7 + +SFX_Super_Effective:: + audio SFX_Super_Effective, Ch7 + +SFX_Battle_1B:: + audio SFX_Battle_1B, Ch7 + +SFX_Battle_1C:: + audio SFX_Battle_1C, Ch7 + +SFX_Doubleslap:: + audio SFX_Doubleslap, Ch7 + +SFX_Battle_1E:: + audio SFX_Battle_1E, Ch4, Ch7 + +SFX_Horn_Drill:: + audio SFX_Horn_Drill, Ch7 + +SFX_Battle_20:: + audio SFX_Battle_20, Ch7 + +SFX_Battle_21:: + audio SFX_Battle_21, Ch7 + +SFX_Battle_22:: + audio SFX_Battle_22, Ch7 + +SFX_Battle_23:: + audio SFX_Battle_23, Ch7 + +SFX_Battle_24:: + audio SFX_Battle_24, Ch4, Ch7 + +SFX_Battle_25:: + audio SFX_Battle_25, Ch7 + +SFX_Battle_26:: + audio SFX_Battle_26, Ch7 + +SFX_Battle_27:: + audio SFX_Battle_27, Ch4, Ch5, Ch7 + +SFX_Battle_28:: + audio SFX_Battle_28, Ch4, Ch5, Ch7 + +SFX_Battle_29:: + audio SFX_Battle_29, Ch4, Ch7 + +SFX_Battle_2A:: + audio SFX_Battle_2A, Ch4, Ch5, Ch7 + +SFX_Battle_2B:: + audio SFX_Battle_2B, Ch4, Ch7 + +SFX_Battle_2C:: + audio SFX_Battle_2C, Ch4, Ch5, Ch7 + +SFX_Psybeam:: + audio SFX_Psybeam, Ch4, Ch5, Ch7 + +SFX_Battle_2E:: + audio SFX_Battle_2E, Ch4, Ch5, Ch7 + +SFX_Battle_2F:: + audio SFX_Battle_2F, Ch4, Ch5, Ch7 + +SFX_Psychic_M:: + audio SFX_Psychic_M, Ch4, Ch5, Ch7 + +SFX_Battle_31:: + audio SFX_Battle_31, Ch4, Ch5 + +SFX_Battle_32:: + audio SFX_Battle_32, Ch4, Ch5 + +SFX_Battle_33:: + audio SFX_Battle_33, Ch4, Ch5 + +SFX_Battle_34:: + audio SFX_Battle_34, Ch4, Ch5, Ch7 + +SFX_Battle_35:: + audio SFX_Battle_35, Ch4, Ch5 + +SFX_Battle_36:: + audio SFX_Battle_36, Ch4, Ch5, Ch7 + +SFX_Silph_Scope:: + audio SFX_Silph_Scope, Ch4 diff --git a/audio/headers/sfxheaders3.asm b/audio/headers/sfxheaders3.asm new file mode 100644 index 00000000..19a19272 --- /dev/null +++ b/audio/headers/sfxheaders3.asm @@ -0,0 +1,311 @@ +SFX_Headers_3:: + db $ff, $ff, $ff ; padding + +SFX_Snare1_3:: + audio SFX_Snare1_3, Ch7 + +SFX_Snare2_3:: + audio SFX_Snare2_3, Ch7 + +SFX_Snare3_3:: + audio SFX_Snare3_3, Ch7 + +SFX_Snare4_3:: + audio SFX_Snare4_3, Ch7 + +SFX_Snare5_3:: + audio SFX_Snare5_3, Ch7 + +SFX_Triangle1_3:: + audio SFX_Triangle1_3, Ch7 + +SFX_Triangle2_3:: + audio SFX_Triangle2_3, Ch7 + +SFX_Snare6_3:: + audio SFX_Snare6_3, Ch7 + +SFX_Snare7_3:: + audio SFX_Snare7_3, Ch7 + +SFX_Snare8_3:: + audio SFX_Snare8_3, Ch7 + +SFX_Snare9_3:: + audio SFX_Snare9_3, Ch7 + +SFX_Cymbal1_3:: + audio SFX_Cymbal1_3, Ch7 + +SFX_Cymbal2_3:: + audio SFX_Cymbal2_3, Ch7 + +SFX_Cymbal3_3:: + audio SFX_Cymbal3_3, Ch7 + +SFX_Muted_Snare1_3:: + audio SFX_Muted_Snare1_3, Ch7 + +SFX_Triangle3_3:: + audio SFX_Triangle3_3, Ch7 + +SFX_Muted_Snare2_3:: + audio SFX_Muted_Snare2_3, Ch7 + +SFX_Muted_Snare3_3:: + audio SFX_Muted_Snare3_3, Ch7 + +SFX_Muted_Snare4_3:: + audio SFX_Muted_Snare4_3, Ch7 + +SFX_Cry00_3:: + audio SFX_Cry00_3, Ch4, Ch5, Ch7 + +SFX_Cry01_3:: + audio SFX_Cry01_3, Ch4, Ch5, Ch7 + +SFX_Cry02_3:: + audio SFX_Cry02_3, Ch4, Ch5, Ch7 + +SFX_Cry03_3:: + audio SFX_Cry03_3, Ch4, Ch5, Ch7 + +SFX_Cry04_3:: + audio SFX_Cry04_3, Ch4, Ch5, Ch7 + +SFX_Cry05_3:: + audio SFX_Cry05_3, Ch4, Ch5, Ch7 + +SFX_Cry06_3:: + audio SFX_Cry06_3, Ch4, Ch5, Ch7 + +SFX_Cry07_3:: + audio SFX_Cry07_3, Ch4, Ch5, Ch7 + +SFX_Cry08_3:: + audio SFX_Cry08_3, Ch4, Ch5, Ch7 + +SFX_Cry09_3:: + audio SFX_Cry09_3, Ch4, Ch5, Ch7 + +SFX_Cry0A_3:: + audio SFX_Cry0A_3, Ch4, Ch5, Ch7 + +SFX_Cry0B_3:: + audio SFX_Cry0B_3, Ch4, Ch5, Ch7 + +SFX_Cry0C_3:: + audio SFX_Cry0C_3, Ch4, Ch5, Ch7 + +SFX_Cry0D_3:: + audio SFX_Cry0D_3, Ch4, Ch5, Ch7 + +SFX_Cry0E_3:: + audio SFX_Cry0E_3, Ch4, Ch5, Ch7 + +SFX_Cry0F_3:: + audio SFX_Cry0F_3, Ch4, Ch5, Ch7 + +SFX_Cry10_3:: + audio SFX_Cry10_3, Ch4, Ch5, Ch7 + +SFX_Cry11_3:: + audio SFX_Cry11_3, Ch4, Ch5, Ch7 + +SFX_Cry12_3:: + audio SFX_Cry12_3, Ch4, Ch5, Ch7 + +SFX_Cry13_3:: + audio SFX_Cry13_3, Ch4, Ch5, Ch7 + +SFX_Cry14_3:: + audio SFX_Cry14_3, Ch4, Ch5, Ch7 + +SFX_Cry15_3:: + audio SFX_Cry15_3, Ch4, Ch5, Ch7 + +SFX_Cry16_3:: + audio SFX_Cry16_3, Ch4, Ch5, Ch7 + +SFX_Cry17_3:: + audio SFX_Cry17_3, Ch4, Ch5, Ch7 + +SFX_Cry18_3:: + audio SFX_Cry18_3, Ch4, Ch5, Ch7 + +SFX_Cry19_3:: + audio SFX_Cry19_3, Ch4, Ch5, Ch7 + +SFX_Cry1A_3:: + audio SFX_Cry1A_3, Ch4, Ch5, Ch7 + +SFX_Cry1B_3:: + audio SFX_Cry1B_3, Ch4, Ch5, Ch7 + +SFX_Cry1C_3:: + audio SFX_Cry1C_3, Ch4, Ch5, Ch7 + +SFX_Cry1D_3:: + audio SFX_Cry1D_3, Ch4, Ch5, Ch7 + +SFX_Cry1E_3:: + audio SFX_Cry1E_3, Ch4, Ch5, Ch7 + +SFX_Cry1F_3:: + audio SFX_Cry1F_3, Ch4, Ch5, Ch7 + +SFX_Cry20_3:: + audio SFX_Cry20_3, Ch4, Ch5, Ch7 + +SFX_Cry21_3:: + audio SFX_Cry21_3, Ch4, Ch5, Ch7 + +SFX_Cry22_3:: + audio SFX_Cry22_3, Ch4, Ch5, Ch7 + +SFX_Cry23_3:: + audio SFX_Cry23_3, Ch4, Ch5, Ch7 + +SFX_Cry24_3:: + audio SFX_Cry24_3, Ch4, Ch5, Ch7 + +SFX_Cry25_3:: + audio SFX_Cry25_3, Ch4, Ch5, Ch7 + +SFX_Get_Item1_3:: + audio SFX_Get_Item1_3, Ch4, Ch5, Ch6 + +SFX_Get_Item2_3:: + audio SFX_Get_Item2_3, Ch4, Ch5, Ch6 + +SFX_Tink_3:: + audio SFX_Tink_3, Ch4 + +SFX_Heal_HP_3:: + audio SFX_Heal_HP_3, Ch4 + +SFX_Heal_Ailment_3:: + audio SFX_Heal_Ailment_3, Ch4 + +SFX_Start_Menu_3:: + audio SFX_Start_Menu_3, Ch7 + +SFX_Press_AB_3:: + audio SFX_Press_AB_3, Ch4 + +SFX_Pokedex_Rating_3:: + audio SFX_Pokedex_Rating_3, Ch4, Ch5, Ch6 + +SFX_Get_Key_Item_3:: + audio SFX_Get_Key_Item_3, Ch4, Ch5, Ch6 + +SFX_Poisoned_3:: + audio SFX_Poisoned_3, Ch4 + +SFX_Trade_Machine_3:: + audio SFX_Trade_Machine_3, Ch4 + +SFX_Turn_On_PC_3:: + audio SFX_Turn_On_PC_3, Ch4 + +SFX_Turn_Off_PC_3:: + audio SFX_Turn_Off_PC_3, Ch4 + +SFX_Enter_PC_3:: + audio SFX_Enter_PC_3, Ch4 + +SFX_Shrink_3:: + audio SFX_Shrink_3, Ch4 + +SFX_Switch_3:: + audio SFX_Switch_3, Ch4 + +SFX_Healing_Machine_3:: + audio SFX_Healing_Machine_3, Ch4 + +SFX_Teleport_Exit1_3:: + audio SFX_Teleport_Exit1_3, Ch4 + +SFX_Teleport_Enter1_3:: + audio SFX_Teleport_Enter1_3, Ch4 + +SFX_Teleport_Exit2_3:: + audio SFX_Teleport_Exit2_3, Ch4 + +SFX_Ledge_3:: + audio SFX_Ledge_3, Ch4 + +SFX_Teleport_Enter2_3:: + audio SFX_Teleport_Enter2_3, Ch7 + +SFX_Fly_3:: + audio SFX_Fly_3, Ch7 + +SFX_Denied_3:: + audio SFX_Denied_3, Ch4, Ch5 + +SFX_Arrow_Tiles_3:: + audio SFX_Arrow_Tiles_3, Ch4 + +SFX_Push_Boulder_3:: + audio SFX_Push_Boulder_3, Ch7 + +SFX_SS_Anne_Horn_3:: + audio SFX_SS_Anne_Horn_3, Ch4, Ch5 + +SFX_Withdraw_Deposit_3:: + audio SFX_Withdraw_Deposit_3, Ch4 + +SFX_Cut_3:: + audio SFX_Cut_3, Ch7 + +SFX_Go_Inside_3:: + audio SFX_Go_Inside_3, Ch7 + +SFX_Swap_3:: + audio SFX_Swap_3, Ch4, Ch5 + +SFX_59_3:: + audio SFX_59_3, Ch4, Ch5 + +SFX_Purchase_3:: + audio SFX_Purchase_3, Ch4, Ch5 + +SFX_Collision_3:: + audio SFX_Collision_3, Ch4 + +SFX_Go_Outside_3:: + audio SFX_Go_Outside_3, Ch7 + +SFX_Save_3:: + audio SFX_Save_3, Ch4, Ch5 + +SFX_Intro_Lunge:: + audio SFX_Intro_Lunge, Ch7 + +SFX_Intro_Hip:: + audio SFX_Intro_Hip, Ch4 + +SFX_Intro_Hop:: + audio SFX_Intro_Hop, Ch4 + +SFX_Intro_Raise:: + audio SFX_Intro_Raise, Ch7 + +SFX_Intro_Crash:: + audio SFX_Intro_Crash, Ch7 + +SFX_Intro_Whoosh:: + audio SFX_Intro_Whoosh, Ch7 + +SFX_Slots_Stop_Wheel:: + audio SFX_Slots_Stop_Wheel, Ch4 + +SFX_Slots_Reward:: + audio SFX_Slots_Reward, Ch4 + +SFX_Slots_New_Spin:: + audio SFX_Slots_New_Spin, Ch4, Ch5 + +SFX_Shooting_Star:: + audio SFX_Shooting_Star, Ch4 diff --git a/audio/music/bikeriding.asm b/audio/music/bikeriding.asm index 662f2fc8..87c7b5c2 100644 --- a/audio/music/bikeriding.asm +++ b/audio/music/bikeriding.asm @@ -1,4 +1,4 @@ -Music_BikeRiding_Ch1:: ; 7dbbb (1f:5bbb) +Music_BikeRiding_Ch0:: tempo 144 volume 7, 7 duty 3 @@ -153,7 +153,7 @@ Music_BikeRiding_branch_7dbc9:: loopchannel 0, Music_BikeRiding_branch_7dbc9 -Music_BikeRiding_Ch2:: ; 7dc6c (1f:5c6c) +Music_BikeRiding_Ch1:: duty 2 vibrato 6, 1, 5 notetype 12, 12, 3 @@ -302,7 +302,7 @@ Music_BikeRiding_branch_7dc75:: loopchannel 0, Music_BikeRiding_branch_7dc75 -Music_BikeRiding_Ch3:: ; 7dd14 (1f:5d14) +Music_BikeRiding_Ch2:: notetype 12, 1, 3 rest 2 @@ -643,7 +643,7 @@ Music_BikeRiding_branch_7dd17:: loopchannel 0, Music_BikeRiding_branch_7dd17 -Music_BikeRiding_Ch4:: ; 7de68 (1f:5e68) +Music_BikeRiding_Ch3:: dspeed 12 rest 2 @@ -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..a1699301 100644 --- a/audio/music/celadon.asm +++ b/audio/music/celadon.asm @@ -1,4 +1,4 @@ -Music_Celadon_Ch1:: ; b6c7 (2:76c7) +Music_Celadon_Ch0:: tempo 144 volume 7, 7 duty 3 @@ -107,7 +107,7 @@ Music_Celadon_branch_b6d4:: loopchannel 0, Music_Celadon_branch_b6d4 -Music_Celadon_Ch2:: ; b73a (2:773a) +Music_Celadon_Ch1:: duty 3 notetype 12, 12, 2 octave 4 @@ -226,7 +226,7 @@ Music_Celadon_branch_b74a:: loopchannel 0, Music_Celadon_branch_b74a -Music_Celadon_Ch3:: ; b7b5 (2:77b5) +Music_Celadon_Ch2:: notetype 12, 1, 3 rest 8 octave 5 @@ -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..c6b3564d 100644 --- a/audio/music/cinnabar.asm +++ b/audio/music/cinnabar.asm @@ -1,4 +1,4 @@ -Music_Cinnabar_Ch1:: ; b86d (2:786d) +Music_Cinnabar_Ch0:: tempo 144 volume 7, 7 duty 3 @@ -85,7 +85,7 @@ Music_Cinnabar_branch_b878:: loopchannel 0, Music_Cinnabar_branch_b878 -Music_Cinnabar_Ch2:: ; b8d4 (2:78d4) +Music_Cinnabar_Ch1:: duty 3 vibrato 10, 2, 3 @@ -179,7 +179,7 @@ Music_Cinnabar_branch_b8d9:: loopchannel 0, Music_Cinnabar_branch_b8d9 -Music_Cinnabar_Ch3:: ; b93d (2:793d) +Music_Cinnabar_Ch2:: notetype 12, 1, 0 Music_Cinnabar_branch_b93f:: @@ -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..bb54a456 100644 --- a/audio/music/cinnabarmansion.asm +++ b/audio/music/cinnabarmansion.asm @@ -1,4 +1,4 @@ -Music_CinnabarMansion_Ch1:: ; 7ed0f (1f:6d0f) +Music_CinnabarMansion_Ch0:: tempo 144 volume 7, 7 vibrato 11, 2, 5 @@ -38,7 +38,7 @@ Music_CinnabarMansion_branch_7ed19:: loopchannel 0, Music_CinnabarMansion_branch_7ed19 -Music_CinnabarMansion_Ch2:: ; 7ed40 (1f:6d40) +Music_CinnabarMansion_Ch1:: duty 2 toggleperfectpitch vibrato 10, 2, 4 @@ -95,7 +95,7 @@ Music_CinnabarMansion_branch_7ed6c:: endchannel -Music_CinnabarMansion_Ch3:: ; 7ed7e (1f:6d7e) +Music_CinnabarMansion_Ch2:: notetype 12, 1, 1 Music_CinnabarMansion_branch_7ed80:: @@ -143,7 +143,7 @@ Music_CinnabarMansion_branch_7ed80:: loopchannel 0, Music_CinnabarMansion_branch_7ed80 -Music_CinnabarMansion_Ch4:: ; 7edb0 (1f:6db0) +Music_CinnabarMansion_Ch3:: dspeed 6 rest 16 rest 16 @@ -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..984202f6 100644 --- a/audio/music/cities1.asm +++ b/audio/music/cities1.asm @@ -2,7 +2,7 @@ Music_Cities1_branch_aa6f:: tempo 232 loopchannel 0, Music_Cities1_branch_aa79 -Music_Cities1_Ch1:: ; aa76 (2:6a76) +Music_Cities1_Ch0:: tempo 144 Music_Cities1_branch_aa79:: @@ -268,7 +268,7 @@ Music_Cities1_branch_ab8a:: endchannel -Music_Cities1_Ch2:: ; ab92 (2:6b92) +Music_Cities1_Ch1:: vibrato 5, 1, 5 callchannel Music_Cities1_branch_ac00 octave 4 @@ -357,7 +357,7 @@ Music_Cities1_Ch2:: ; ab92 (2:6b92) G# 1 notetype 12, 10, 4 A_ 1 - loopchannel 0, Music_Cities1_Ch2 + loopchannel 0, Music_Cities1_Ch1 Music_Cities1_branch_ac00:: duty 2 @@ -401,7 +401,7 @@ Music_Cities1_branch_ac00:: endchannel -Music_Cities1_Ch3:: ; ac32 (2:6c32) +Music_Cities1_Ch2:: notetype 12, 1, 1 toggleperfectpitch @@ -579,7 +579,7 @@ Music_Cities1_branch_acce:: endchannel -Music_Cities1_Ch4:: ; acef (2:6cef) +Music_Cities1_Ch3:: dspeed 12 callchannel Music_Cities1_branch_ad36 @@ -609,7 +609,7 @@ Music_Cities1_branch_acf3:: triangle1 6 snare6 6 snare6 4 - loopchannel 0, Music_Cities1_Ch4 + loopchannel 0, Music_Cities1_Ch3 Music_Cities1_branch_ad36:: snare6 6 @@ -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..fb167999 100644 --- a/audio/music/cities2.asm +++ b/audio/music/cities2.asm @@ -1,4 +1,4 @@ -Music_Cities2_Ch1:: ; b504 (2:7504) +Music_Cities2_Ch0:: tempo 148 volume 7, 7 duty 3 @@ -94,7 +94,7 @@ Music_Cities2_branch_b51a:: loopchannel 0, Music_Cities2_branch_b51a -Music_Cities2_Ch2:: ; b569 (2:7569) +Music_Cities2_Ch1:: duty 3 vibrato 8, 2, 3 notetype 12, 12, 2 @@ -280,7 +280,7 @@ Music_Cities2_branch_b58b:: loopchannel 0, Music_Cities2_branch_b58b -Music_Cities2_Ch3:: ; b640 (2:7640) +Music_Cities2_Ch2:: notetype 12, 1, 1 rest 16 octave 4 @@ -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..f092326b 100644 --- a/audio/music/credits.asm +++ b/audio/music/credits.asm @@ -1,4 +1,4 @@ -Music_Credits_Ch1:: ; 7fc1f (1f:7c1f) +Music_Credits_Ch0:: tempo 140 volume 7, 7 duty 3 @@ -284,7 +284,7 @@ Music_Credits_Ch1:: ; 7fc1f (1f:7c1f) endchannel -Music_Credits_Ch2:: ; 7fd5f (1f:7d5f) +Music_Credits_Ch1:: duty 3 vibrato 10, 2, 5 notetype 12, 12, 5 @@ -574,7 +574,7 @@ Music_Credits_Ch2:: ; 7fd5f (1f:7d5f) endchannel -Music_Credits_Ch3:: ; 7fec2 (1f:7ec2) +Music_Credits_Ch2:: notetype 12, 1, 0 octave 5 C# 6 @@ -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..1ea6c1ff 100644 --- a/audio/music/defeatedgymleader.asm +++ b/audio/music/defeatedgymleader.asm @@ -1,4 +1,4 @@ -Music_DefeatedGymLeader_Ch1:: ; 23cad (8:7cad) +Music_DefeatedGymLeader_Ch0:: tempo 112 volume 7, 7 duty 3 @@ -162,7 +162,7 @@ Music_DefeatedGymLeader_branch_23ccc:: loopchannel 0, Music_DefeatedGymLeader_branch_23ccc -Music_DefeatedGymLeader_Ch2:: ; 23d6d (8:7d6d) +Music_DefeatedGymLeader_Ch1:: duty 2 vibrato 24, 2, 4 notetype 12, 12, 4 @@ -352,7 +352,7 @@ Music_DefeatedGymLeader_branch_23d84:: loopchannel 0, Music_DefeatedGymLeader_branch_23d84 -Music_DefeatedGymLeader_Ch3:: ; 23e52 (8:7e52) +Music_DefeatedGymLeader_Ch2:: notetype 12, 1, 0 vibrato 16, 1, 2 octave 4 @@ -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..87c5d2c9 100644 --- a/audio/music/defeatedtrainer.asm +++ b/audio/music/defeatedtrainer.asm @@ -1,4 +1,4 @@ -Music_DefeatedTrainer_Ch1:: ; 23a53 (8:7a53) +Music_DefeatedTrainer_Ch0:: tempo 224 volume 7, 7 duty 2 @@ -95,7 +95,7 @@ Music_DefeatedTrainer_branch_23a76:: loopchannel 0, Music_DefeatedTrainer_branch_23a76 -Music_DefeatedTrainer_Ch2:: ; 23ac1 (8:7ac1) +Music_DefeatedTrainer_Ch1:: duty 2 notetype 4, 12, 3 octave 4 @@ -172,7 +172,7 @@ Music_DefeatedTrainer_branch_23ad2:: loopchannel 0, Music_DefeatedTrainer_branch_23ad2 -Music_DefeatedTrainer_Ch3:: ; 23b15 (8:7b15) +Music_DefeatedTrainer_Ch2:: notetype 4, 1, 0 octave 5 D_ 2 @@ -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..ea3f733f 100644 --- a/audio/music/defeatedwildmon.asm +++ b/audio/music/defeatedwildmon.asm @@ -1,4 +1,4 @@ -Music_DefeatedWildMon_Ch1:: ; 23b74 (8:7b74) +Music_DefeatedWildMon_Ch0:: tempo 112 volume 7, 7 executemusic @@ -67,7 +67,7 @@ Music_DefeatedWildMon_branch_23b8b:: loopchannel 0, Music_DefeatedWildMon_branch_23b8b -Music_DefeatedWildMon_Ch2:: ; 23bc1 (8:7bc1) +Music_DefeatedWildMon_Ch1:: executemusic duty 2 notetype 12, 12, 3 @@ -142,7 +142,7 @@ Music_DefeatedWildMon_branch_23bce:: loopchannel 0, Music_DefeatedWildMon_branch_23bce -Music_DefeatedWildMon_Ch3:: ; 23c0e (8:7c0e) +Music_DefeatedWildMon_Ch2:: executemusic notetype 12, 2, 0 octave 5 @@ -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..c6f6b105 100644 --- a/audio/music/dungeon1.asm +++ b/audio/music/dungeon1.asm @@ -1,4 +1,4 @@ -Music_Dungeon1_Ch1:: ; 7ded1 (1f:5ed1) +Music_Dungeon1_Ch0:: tempo 144 volume 7, 7 duty 3 @@ -226,7 +226,7 @@ Music_Dungeon1_branch_7dfd5:: endchannel -Music_Dungeon1_Ch2:: ; 7dfde (1f:5fde) +Music_Dungeon1_Ch1:: vibrato 11, 1, 5 duty 3 notetype 12, 0, 15 @@ -441,7 +441,7 @@ Music_Dungeon1_branch_7e0cd:: endchannel -Music_Dungeon1_Ch3:: ; 7e0dc (1f:60dc) +Music_Dungeon1_Ch2:: notetype 12, 1, 1 vibrato 8, 2, 6 rest 14 @@ -596,7 +596,7 @@ Music_Dungeon1_branch_7e177:: endchannel -Music_Dungeon1_Ch4:: ; 7e18a (1f:618a) +Music_Dungeon1_Ch3:: dspeed 12 rest 14 cymbal1 1 @@ -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..d5f459fb 100644 --- a/audio/music/dungeon2.asm +++ b/audio/music/dungeon2.asm @@ -1,4 +1,4 @@ -Music_Dungeon2_Ch1:: ; 7e887 (1f:6887) +Music_Dungeon2_Ch0:: tempo 144 volume 7, 7 duty 3 @@ -70,7 +70,7 @@ Music_Dungeon2_branch_7e892:: loopchannel 0, Music_Dungeon2_branch_7e892 -Music_Dungeon2_Ch2:: ; 7e8d8 (1f:68d8) +Music_Dungeon2_Ch1:: vibrato 11, 1, 5 Music_Dungeon2_branch_7e8db:: @@ -162,7 +162,7 @@ Music_Dungeon2_branch_7e8db:: loopchannel 0, Music_Dungeon2_branch_7e8db -Music_Dungeon2_Ch3:: ; 7e93b (1f:693b) +Music_Dungeon2_Ch2:: notetype 12, 1, 3 vibrato 8, 2, 6 @@ -302,7 +302,7 @@ Music_Dungeon2_branch_7e9d1:: endchannel -Music_Dungeon2_Ch4:: ; 7e9dc (1f:69dc) +Music_Dungeon2_Ch3:: dspeed 12 Music_Dungeon2_branch_7e9dd:: @@ -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..f9742a26 100644 --- a/audio/music/dungeon3.asm +++ b/audio/music/dungeon3.asm @@ -1,4 +1,4 @@ -Music_Dungeon3_Ch1:: ; 7e9f1 (1f:69f1) +Music_Dungeon3_Ch0:: tempo 160 volume 7, 7 duty 3 @@ -335,7 +335,7 @@ Music_Dungeon3_branch_7eafc:: endchannel -Music_Dungeon3_Ch2:: ; 7eb68 (1f:6b68) +Music_Dungeon3_Ch1:: vibrato 11, 1, 5 duty 3 @@ -607,7 +607,7 @@ Music_Dungeon3_branch_7eb6d:: loopchannel 0, Music_Dungeon3_branch_7eb6d -Music_Dungeon3_Ch3:: ; 7ec7a (1f:6c7a) +Music_Dungeon3_Ch2:: notetype 12, 1, 2 rest 16 rest 16 @@ -707,10 +707,10 @@ Music_Dungeon3_Ch3:: ; 7ec7a (1f:6c7a) rest 16 rest 16 rest 10 - loopchannel 0, Music_Dungeon3_Ch3 + loopchannel 0, Music_Dungeon3_Ch2 -Music_Dungeon3_Ch4:: ; 7ece4 (1f:6ce4) +Music_Dungeon3_Ch3:: dspeed 12 rest 16 rest 16 @@ -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..adb0f8b9 100644 --- a/audio/music/finalbattle.asm +++ b/audio/music/finalbattle.asm @@ -1,4 +1,4 @@ -Music_FinalBattle_Ch1:: ; 233a6 (8:73a6) +Music_FinalBattle_Ch0:: tempo 112 volume 7, 7 duty 3 @@ -381,7 +381,7 @@ Music_FinalBattle_branch_23429:: loopchannel 0, Music_FinalBattle_branch_23429 -Music_FinalBattle_Ch2:: ; 2356a (8:756a) +Music_FinalBattle_Ch1:: duty 3 vibrato 8, 2, 5 notetype 12, 12, 2 @@ -738,7 +738,7 @@ Music_FinalBattle_branch_23710:: endchannel -Music_FinalBattle_Ch3:: ; 2371c (8:771c) +Music_FinalBattle_Ch2:: notetype 12, 1, 1 octave 4 E_ 4 @@ -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..832bade6 100644 --- a/audio/music/gamecorner.asm +++ b/audio/music/gamecorner.asm @@ -1,4 +1,4 @@ -Music_GameCorner_Ch1:: ; 7e20b (1f:620b) +Music_GameCorner_Ch0:: tempo 120 volume 7, 7 duty 3 @@ -183,7 +183,7 @@ Music_GameCorner_branch_7e222:: loopchannel 0, Music_GameCorner_branch_7e222 -Music_GameCorner_Ch2:: ; 7e2df (1f:62df) +Music_GameCorner_Ch1:: duty 2 vibrato 10, 2, 3 notetype 12, 12, 6 @@ -343,7 +343,7 @@ Music_GameCorner_branch_7e2fa:: loopchannel 0, Music_GameCorner_branch_7e2fa -Music_GameCorner_Ch3:: ; 7e38b (1f:638b) +Music_GameCorner_Ch2:: notetype 12, 1, 3 octave 5 C# 1 @@ -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..ad99bddd 100644 --- a/audio/music/gym.asm +++ b/audio/music/gym.asm @@ -1,4 +1,4 @@ -Music_Gym_Ch1:: ; bcbb (2:7cbb) +Music_Gym_Ch0:: tempo 138 volume 7, 7 duty 3 @@ -165,7 +165,7 @@ Music_Gym_branch_bcd8:: loopchannel 0, Music_Gym_branch_bcd8 -Music_Gym_Ch2:: ; bd6b (2:7d6b) +Music_Gym_Ch1:: duty 3 vibrato 10, 2, 5 notetype 12, 12, 7 @@ -288,7 +288,7 @@ Music_Gym_branch_bd82:: loopchannel 0, Music_Gym_branch_bd82 -Music_Gym_Ch3:: ; bdfa (2:7dfa) +Music_Gym_Ch2:: notetype 12, 1, 1 rest 16 rest 10 @@ -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..6c1cffb5 100644 --- a/audio/music/gymleaderbattle.asm +++ b/audio/music/gymleaderbattle.asm @@ -1,4 +1,4 @@ -Music_GymLeaderBattle_Ch1:: ; 22370 (8:6370) +Music_GymLeaderBattle_Ch0:: tempo 104 volume 7, 7 duty 3 @@ -547,7 +547,7 @@ Music_GymLeaderBattle_branch_223b0:: loopchannel 0, Music_GymLeaderBattle_branch_223b0 -Music_GymLeaderBattle_Ch2:: ; 225a1 (8:65a1) +Music_GymLeaderBattle_Ch1:: duty 3 vibrato 8, 2, 5 notetype 12, 12, 3 @@ -848,7 +848,7 @@ Music_GymLeaderBattle_branch_225e0:: loopchannel 0, Music_GymLeaderBattle_branch_225e0 -Music_GymLeaderBattle_Ch3:: ; 226ef (8:66ef) +Music_GymLeaderBattle_Ch2:: vibrato 0, 2, 0 notetype 12, 1, 3 rest 12 @@ -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..098c82c8 100644 --- a/audio/music/halloffame.asm +++ b/audio/music/halloffame.asm @@ -1,4 +1,4 @@ -Music_HallOfFame_Ch1:: ; 7fbaf (1f:7baf) +Music_HallOfFame_Ch0:: tempo 112 volume 7, 7 duty 3 @@ -31,7 +31,7 @@ Music_HallOfFame_branch_7fbc5:: loopchannel 0, Music_HallOfFame_branch_7fbc5 -Music_HallOfFame_Ch2:: ; 7fbda (1f:7bda) +Music_HallOfFame_Ch1:: vibrato 8, 2, 5 duty 3 @@ -63,7 +63,7 @@ Music_HallOfFame_branch_7fbdf:: loopchannel 0, Music_HallOfFame_branch_7fbdf -Music_HallOfFame_Ch3:: ; 7fbfc (1f:7bfc) +Music_HallOfFame_Ch2:: notetype 12, 1, 2 Music_HallOfFame_branch_7fbfe:: @@ -93,5 +93,4 @@ Music_HallOfFame_branch_7fbfe:: G_ 4 E_ 4 G_ 4 - loopchannel 0, Music_HallOfFame_Ch3 -; 0x7fc1f + loopchannel 0, Music_HallOfFame_Ch2 diff --git a/audio/music/indigoplateau.asm b/audio/music/indigoplateau.asm index 32ce02c2..f139775b 100644 --- a/audio/music/indigoplateau.asm +++ b/audio/music/indigoplateau.asm @@ -1,4 +1,4 @@ -Music_IndigoPlateau_Ch1:: ; a5f0 (2:65f0) +Music_IndigoPlateau_Ch0:: tempo 132 volume 7, 7 duty 3 @@ -86,7 +86,7 @@ Music_IndigoPlateau_branch_a659:: endchannel -Music_IndigoPlateau_Ch2:: ; a664 (2:6664) +Music_IndigoPlateau_Ch1:: duty 3 vibrato 8, 2, 5 notetype 12, 12, 2 @@ -147,7 +147,7 @@ Music_IndigoPlateau_branch_a6af:: endchannel -Music_IndigoPlateau_Ch3:: ; a6ba (2:66ba) +Music_IndigoPlateau_Ch2:: notetype 12, 1, 0 octave 4 D_ 2 @@ -225,7 +225,7 @@ Music_IndigoPlateau_branch_a6fe:: endchannel -Music_IndigoPlateau_Ch4:: ; a70f (2:670f) +Music_IndigoPlateau_Ch3:: dspeed 6 mutedsnare2 16 mutedsnare2 16 @@ -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..2aad0d88 100644 --- a/audio/music/introbattle.asm +++ b/audio/music/introbattle.asm @@ -1,4 +1,4 @@ -Music_IntroBattle_Ch1:: ; 7f844 (1f:7844) +Music_IntroBattle_Ch0:: tempo 98 volume 7, 7 duty 3 @@ -90,7 +90,7 @@ Music_IntroBattle_Ch1:: ; 7f844 (1f:7844) endchannel -Music_IntroBattle_Ch2:: ; 7f8bc (1f:78bc) +Music_IntroBattle_Ch1:: duty 3 vibrato 8, 2, 5 notetype 12, 12, 2 @@ -165,7 +165,7 @@ Music_IntroBattle_Ch2:: ; 7f8bc (1f:78bc) endchannel -Music_IntroBattle_Ch3:: ; 7f91d (1f:791d) +Music_IntroBattle_Ch2:: notetype 12, 1, 0 rest 8 octave 4 @@ -229,7 +229,7 @@ Music_IntroBattle_Ch3:: ; 7f91d (1f:791d) endchannel -Music_IntroBattle_Ch4:: ; 7f95b (1f:795b) +Music_IntroBattle_Ch3:: dspeed 6 mutedsnare4 1 mutedsnare4 1 @@ -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..0b791a30 100644 --- a/audio/music/jigglypuffsong.asm +++ b/audio/music/jigglypuffsong.asm @@ -1,4 +1,4 @@ -Music_JigglypuffSong_Ch1:: ; 7fb7d (1f:7b7d) +Music_JigglypuffSong_Ch0:: tempo 144 volume 7, 7 vibrato 8, 2, 4 @@ -21,7 +21,7 @@ Music_JigglypuffSong_Ch1:: ; 7fb7d (1f:7b7d) endchannel -Music_JigglypuffSong_Ch2:: ; 7fb9a (1f:7b9a) +Music_JigglypuffSong_Ch1:: vibrato 5, 1, 5 duty 2 dutycycle 10 @@ -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..da58e489 100644 --- a/audio/music/lavender.asm +++ b/audio/music/lavender.asm @@ -1,4 +1,4 @@ -Music_Lavender_Ch1:: ; bb58 (2:7b58) +Music_Lavender_Ch0:: tempo 152 volume 7, 7 duty 1 @@ -62,7 +62,7 @@ Music_Lavender_branch_bb6b:: loopchannel 0, Music_Lavender_branch_bb6b -Music_Lavender_Ch2:: ; bb9e (2:7b9e) +Music_Lavender_Ch1:: vibrato 0, 3, 4 duty 3 notetype 12, 9, 1 @@ -76,7 +76,7 @@ Music_Lavender_branch_bba5:: loopchannel 0, Music_Lavender_branch_bba5 -Music_Lavender_Ch3:: ; bbae (2:7bae) +Music_Lavender_Ch2:: vibrato 4, 1, 1 notetype 12, 3, 5 rest 16 @@ -186,7 +186,7 @@ Music_Lavender_branch_bbb9:: loopchannel 0, Music_Lavender_branch_bbb9 -Music_Lavender_Ch4:: ; bc21 (2:7c21) +Music_Lavender_Ch3:: dspeed 12 rest 16 rest 16 @@ -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..941b0c34 100644 --- a/audio/music/meeteviltrainer.asm +++ b/audio/music/meeteviltrainer.asm @@ -1,4 +1,4 @@ -Music_MeetEvilTrainer_Ch1:: ; 7f69d (1f:769d) +Music_MeetEvilTrainer_Ch0:: tempo 124 volume 7, 7 duty 2 @@ -21,7 +21,7 @@ Music_MeetEvilTrainer_branch_7f6ae:: loopchannel 0, Music_MeetEvilTrainer_branch_7f6ae -Music_MeetEvilTrainer_Ch2:: ; 7f6ba (1f:76ba) +Music_MeetEvilTrainer_Ch1:: duty 1 notetype 12, 11, 6 octave 3 @@ -60,7 +60,7 @@ Music_MeetEvilTrainer_branch_7f6c2:: loopchannel 0, Music_MeetEvilTrainer_branch_7f6c2 -Music_MeetEvilTrainer_Ch3:: ; 7f6e6 (1f:76e6) +Music_MeetEvilTrainer_Ch2:: notetype 12, 1, 0 rest 8 octave 4 @@ -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..2a5659b4 100644 --- a/audio/music/meetfemaletrainer.asm +++ b/audio/music/meetfemaletrainer.asm @@ -1,4 +1,4 @@ -Music_MeetFemaleTrainer_Ch1:: ; 7f6f9 (1f:76f9) +Music_MeetFemaleTrainer_Ch0:: tempo 124 volume 7, 7 duty 1 @@ -26,7 +26,7 @@ Music_MeetFemaleTrainer_branch_7f70c:: loopchannel 0, Music_MeetFemaleTrainer_branch_7f70c -Music_MeetFemaleTrainer_Ch2:: ; 7f71c (1f:771c) +Music_MeetFemaleTrainer_Ch1:: duty 2 notetype 12, 12, 2 octave 3 @@ -71,7 +71,7 @@ Music_MeetFemaleTrainer_branch_7f726:: loopchannel 0, Music_MeetFemaleTrainer_branch_7f726 -Music_MeetFemaleTrainer_Ch3:: ; 7f74b (1f:774b) +Music_MeetFemaleTrainer_Ch2:: notetype 12, 1, 0 rest 8 octave 5 @@ -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..c13e40cb 100644 --- a/audio/music/meetmaletrainer.asm +++ b/audio/music/meetmaletrainer.asm @@ -1,4 +1,4 @@ -Music_MeetMaleTrainer_Ch1:: ; 7f77b (1f:777b) +Music_MeetMaleTrainer_Ch0:: tempo 112 volume 7, 7 duty 3 @@ -32,7 +32,7 @@ Music_MeetMaleTrainer_branch_7f78f:: loopchannel 0, Music_MeetMaleTrainer_branch_7f78f -Music_MeetMaleTrainer_Ch2:: ; 7f7a2 (1f:77a2) +Music_MeetMaleTrainer_Ch1:: duty 3 vibrato 24, 2, 2 notetype 12, 12, 4 @@ -75,7 +75,7 @@ Music_MeetMaleTrainer_branch_7f7b5:: loopchannel 0, Music_MeetMaleTrainer_branch_7f7b5 -Music_MeetMaleTrainer_Ch3:: ; 7f7d2 (1f:77d2) +Music_MeetMaleTrainer_Ch2:: notetype 12, 1, 0 rest 6 octave 4 @@ -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..5c6ea13d 100644 --- a/audio/music/meetprofoak.asm +++ b/audio/music/meetprofoak.asm @@ -1,4 +1,4 @@ -Music_MeetProfOak_Ch1:: ; af59 (2:6f59) +Music_MeetProfOak_Ch0:: tempo 112 volume 7, 7 duty 3 @@ -74,7 +74,7 @@ Music_MeetProfOak_branch_af85:: loopchannel 0, Music_MeetProfOak_branch_af85 -Music_MeetProfOak_Ch2:: ; afa9 (2:6fa9) +Music_MeetProfOak_Ch1:: vibrato 8, 1, 1 duty 2 notetype 12, 12, 4 @@ -208,7 +208,7 @@ Music_MeetProfOak_branch_b005:: loopchannel 0, Music_MeetProfOak_branch_b005 -Music_MeetProfOak_Ch3:: ; b03d (2:703d) +Music_MeetProfOak_Ch2:: notetype 12, 1, 2 rest 10 octave 4 @@ -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..a6391247 100644 --- a/audio/music/meetrival.asm +++ b/audio/music/meetrival.asm @@ -2,7 +2,7 @@ Music_MeetRival_branch_b119:: tempo 100 loopchannel 0, Music_MeetRival_branch_b123 -Music_MeetRival_Ch1:: ; b120 (2:7120) +Music_MeetRival_Ch0:: tempo 112 Music_MeetRival_branch_b123:: @@ -143,7 +143,7 @@ Music_MeetRival_branch_b1a5:: loopchannel 0, Music_MeetRival_branch_b140 -Music_MeetRival_Ch2:: ; b1bb (2:71bb) +Music_MeetRival_Ch1:: duty 3 vibrato 10, 2, 6 notetype 12, 12, 7 @@ -248,7 +248,7 @@ Music_MeetRival_branch_b21d:: loopchannel 0, Music_MeetRival_branch_b1d8 -Music_MeetRival_Ch3:: ; b233 (2:7233) +Music_MeetRival_Ch2:: notetype 12, 1, 4 octave 5 D_ 2 @@ -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..e41b37bd 100644 --- a/audio/music/museumguy.asm +++ b/audio/music/museumguy.asm @@ -1,4 +1,4 @@ -Music_MuseumGuy_Ch1:: ; adae (2:6dae) +Music_MuseumGuy_Ch0:: tempo 128 volume 7, 7 duty 2 @@ -54,7 +54,7 @@ Music_MuseumGuy_branch_adec:: endchannel -Music_MuseumGuy_Ch2:: ; adf1 (2:6df1) +Music_MuseumGuy_Ch1:: duty 2 notetype 12, 12, 1 octave 4 @@ -165,7 +165,7 @@ Music_MuseumGuy_branch_ae26:: loopchannel 0, Music_MuseumGuy_branch_ae26 -Music_MuseumGuy_Ch3:: ; ae6e (2:6e6e) +Music_MuseumGuy_Ch2:: notetype 12, 1, 0 rest 16 octave 4 @@ -261,7 +261,7 @@ Music_MuseumGuy_branch_aec1:: endchannel -Music_MuseumGuy_Ch4:: ; aed1 (2:6ed1) +Music_MuseumGuy_Ch3:: dspeed 12 rest 16 rest 16 @@ -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..87245350 100644 --- a/audio/music/oakslab.asm +++ b/audio/music/oakslab.asm @@ -1,4 +1,4 @@ -Music_OaksLab_Ch1:: ; 7eeb9 (1f:6eb9) +Music_OaksLab_Ch0:: tempo 140 volume 7, 7 duty 3 @@ -69,7 +69,7 @@ Music_OaksLab_branch_7eed0:: loopchannel 0, Music_OaksLab_branch_7eed0 -Music_OaksLab_Ch2:: ; 7ef05 (1f:6f05) +Music_OaksLab_Ch1:: duty 3 vibrato 10, 2, 5 notetype 12, 12, 4 @@ -144,7 +144,7 @@ Music_OaksLab_branch_7ef16:: loopchannel 0, Music_OaksLab_branch_7ef16 -Music_OaksLab_Ch3:: ; 7ef52 (1f:6f52) +Music_OaksLab_Ch2:: notetype 12, 1, 1 rest 2 octave 4 @@ -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..5ad31f81 100644 --- a/audio/music/pallettown.asm +++ b/audio/music/pallettown.asm @@ -1,4 +1,4 @@ -Music_PalletTown_Ch1:: ; a7c5 (2:67c5) +Music_PalletTown_Ch0:: tempo 160 volume 7, 7 duty 2 @@ -148,7 +148,7 @@ Music_PalletTown_branch_a7ce:: endchannel -Music_PalletTown_Ch2:: ; a85f (2:685f) +Music_PalletTown_Ch1:: duty 2 Music_PalletTown_branch_a861:: @@ -262,7 +262,7 @@ Music_PalletTown_branch_a861:: endchannel -Music_PalletTown_Ch3:: ; a8de (2:68de) +Music_PalletTown_Ch2:: vibrato 24, 2, 8 notetype 12, 1, 2 @@ -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..9d3cd3d0 100644 --- a/audio/music/pkmnhealed.asm +++ b/audio/music/pkmnhealed.asm @@ -1,4 +1,4 @@ -Music_PkmnHealed_Ch1:: ; 9ba3 (2:5ba3) +Music_PkmnHealed_Ch0:: tempo 144 volume 7, 7 duty 2 @@ -19,7 +19,7 @@ Music_PkmnHealed_Ch1:: ; 9ba3 (2:5ba3) endchannel -Music_PkmnHealed_Ch2:: ; 9bc4 (2:5bc4) +Music_PkmnHealed_Ch1:: duty 2 notetype 12, 12, 3 octave 4 @@ -33,7 +33,7 @@ Music_PkmnHealed_Ch2:: ; 9bc4 (2:5bc4) endchannel -Music_PkmnHealed_Ch3:: ; 9bd2 (2:5bd2) +Music_PkmnHealed_Ch2:: notetype 12, 1, 0 octave 4 E_ 2 @@ -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..83d161d7 100644 --- a/audio/music/pokecenter.asm +++ b/audio/music/pokecenter.asm @@ -1,4 +1,4 @@ -Music_Pokecenter_Ch1:: ; be56 (2:7e56) +Music_Pokecenter_Ch0:: tempo 144 volume 7, 7 duty 3 @@ -149,7 +149,7 @@ Music_Pokecenter_branch_be61:: loopchannel 0, Music_Pokecenter_branch_be61 -Music_Pokecenter_Ch2:: ; bef9 (2:7ef9) +Music_Pokecenter_Ch1:: vibrato 8, 2, 5 Music_Pokecenter_branch_befc:: @@ -248,7 +248,7 @@ Music_Pokecenter_branch_bf60:: endchannel -Music_Pokecenter_Ch3:: ; bf70 (2:7f70) +Music_Pokecenter_Ch2:: notetype 12, 1, 0 Music_Pokecenter_branch_bf72:: @@ -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..0f17ddeb 100644 --- a/audio/music/pokemontower.asm +++ b/audio/music/pokemontower.asm @@ -1,4 +1,4 @@ -Music_PokemonTower_Ch1:: ; 7f04a (1f:704a) +Music_PokemonTower_Ch0:: tempo 152 volume 7, 7 duty 3 @@ -140,7 +140,7 @@ Music_PokemonTower_branch_7f05a:: loopchannel 0, Music_PokemonTower_branch_7f05a -Music_PokemonTower_Ch2:: ; 7f0e3 (1f:70e3) +Music_PokemonTower_Ch1:: vibrato 20, 3, 4 duty 3 notetype 12, 10, 0 @@ -292,7 +292,7 @@ Music_PokemonTower_branch_7f0ee:: loopchannel 0, Music_PokemonTower_branch_7f0ee -Music_PokemonTower_Ch3:: ; 7f19a (1f:719a) +Music_PokemonTower_Ch2:: vibrato 4, 1, 1 notetype 12, 1, 3 rest 8 @@ -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..fc3227ce 100644 --- a/audio/music/routes1.asm +++ b/audio/music/routes1.asm @@ -1,4 +1,4 @@ -Music_Routes1_Ch1:: ; 9bde (2:5bde) +Music_Routes1_Ch0:: tempo 152 volume 7, 7 vibrato 4, 2, 3 @@ -106,7 +106,7 @@ Music_Routes1_branch_9be9:: endchannel -Music_Routes1_Ch2:: ; 9c51 (2:5c51) +Music_Routes1_Ch1:: duty 2 Music_Routes1_branch_9c53:: @@ -234,7 +234,7 @@ Music_Routes1_branch_9c8d:: endchannel -Music_Routes1_Ch3:: ; 9cd8 (2:5cd8) +Music_Routes1_Ch2:: vibrato 8, 2, 5 notetype 12, 1, 3 @@ -309,7 +309,7 @@ Music_Routes1_branch_9cdd:: endchannel -Music_Routes1_Ch4:: ; 9d24 (2:5d24) +Music_Routes1_Ch3:: dspeed 12 rest 4 mutedsnare1 2 @@ -400,6 +400,5 @@ Music_Routes1_Ch4:: ; 9d24 (2:5d24) rest 2 mutedsnare1 2 mutedsnare1 2 - loopchannel 0, Music_Routes1_Ch4 + loopchannel 0, Music_Routes1_Ch3 endchannel -; 0x9db9 diff --git a/audio/music/routes2.asm b/audio/music/routes2.asm index 9ba376ce..ae5b22d1 100644 --- a/audio/music/routes2.asm +++ b/audio/music/routes2.asm @@ -1,4 +1,4 @@ -Music_Routes2_Ch1:: ; 9db9 (2:5db9) +Music_Routes2_Ch0:: tempo 152 volume 7, 7 vibrato 9, 2, 5 @@ -142,7 +142,7 @@ Music_Routes2_branch_9dc3:: endchannel -Music_Routes2_Ch2:: ; 9e4f (2:5e4f) +Music_Routes2_Ch1:: vibrato 8, 2, 6 duty 3 @@ -216,7 +216,7 @@ Music_Routes2_branch_9e54:: endchannel -Music_Routes2_Ch3:: ; 9e9b (2:5e9b) +Music_Routes2_Ch2:: vibrato 9, 2, 8 Music_Routes2_branch_9e9e:: @@ -324,7 +324,7 @@ Music_Routes2_branch_9e9e:: endchannel -Music_Routes2_Ch4:: ; 9f08 (2:5f08) +Music_Routes2_Ch3:: dspeed 12 snare3 2 rest 2 @@ -421,6 +421,5 @@ Music_Routes2_Ch4:: ; 9f08 (2:5f08) rest 3 snare3 3 rest 3 - loopchannel 0, Music_Routes2_Ch4 + loopchannel 0, Music_Routes2_Ch3 endchannel -; 0x9fad diff --git a/audio/music/routes3.asm b/audio/music/routes3.asm index e62ca9bd..b384308b 100644 --- a/audio/music/routes3.asm +++ b/audio/music/routes3.asm @@ -1,4 +1,4 @@ -Music_Routes3_Ch1:: ; 9fad (2:5fad) +Music_Routes3_Ch0:: tempo 148 volume 7, 7 duty 3 @@ -77,7 +77,7 @@ Music_Routes3_branch_9fc3:: loopchannel 0, Music_Routes3_branch_9fc3 -Music_Routes3_Ch2:: ; a009 (2:6009) +Music_Routes3_Ch1:: vibrato 8, 2, 3 duty 2 notetype 12, 12, 7 @@ -178,7 +178,7 @@ Music_Routes3_branch_a01a:: loopchannel 0, Music_Routes3_branch_a01a -Music_Routes3_Ch3:: ; a07f (2:607f) +Music_Routes3_Ch2:: vibrato 4, 1, 0 notetype 6, 1, 2 octave 4 @@ -354,7 +354,7 @@ Music_Routes3_branch_a0a3:: loopchannel 0, Music_Routes3_branch_a0a3 -Music_Routes3_Ch4:: ; a131 (2:6131) +Music_Routes3_Ch3:: dspeed 6 mutedsnare4 1 mutedsnare4 1 @@ -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..a9149f05 100644 --- a/audio/music/routes4.asm +++ b/audio/music/routes4.asm @@ -1,4 +1,4 @@ -Music_Routes4_Ch1:: ; a26a (2:626a) +Music_Routes4_Ch0:: tempo 148 volume 7, 7 duty 3 @@ -138,7 +138,7 @@ Music_Routes4_branch_a28a:: loopchannel 0, Music_Routes4_branch_a28a -Music_Routes4_Ch2:: ; a304 (2:6304) +Music_Routes4_Ch1:: vibrato 12, 2, 4 duty 1 notetype 12, 9, 2 @@ -288,7 +288,7 @@ Music_Routes4_branch_a325:: loopchannel 0, Music_Routes4_branch_a325 -Music_Routes4_Ch3:: ; a3c4 (2:63c4) +Music_Routes4_Ch2:: notetype 12, 1, 0 octave 4 E_ 1 @@ -506,7 +506,7 @@ Music_Routes4_branch_a3d7:: loopchannel 0, Music_Routes4_branch_a3d7 -Music_Routes4_Ch4:: ; a49d (2:649d) +Music_Routes4_Ch3:: dspeed 12 rest 16 rest 12 @@ -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..e2853646 100644 --- a/audio/music/safarizone.asm +++ b/audio/music/safarizone.asm @@ -1,4 +1,4 @@ -Music_SafariZone_Ch1:: ; bc2e (2:7c2e) +Music_SafariZone_Ch0:: tempo 132 volume 7, 7 vibrato 6, 3, 4 @@ -39,7 +39,7 @@ Music_SafariZone_branch_bc5f:: endchannel -Music_SafariZone_Ch2:: ; bc6a (2:7c6a) +Music_SafariZone_Ch1:: duty 2 vibrato 8, 2, 5 notetype 12, 10, 2 @@ -73,7 +73,7 @@ Music_SafariZone_branch_bc89:: endchannel -Music_SafariZone_Ch3:: ; bc94 (2:7c94) +Music_SafariZone_Ch2:: notetype 12, 1, 0 rest 8 @@ -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..3e1ff3fc 100644 --- a/audio/music/silphco.asm +++ b/audio/music/silphco.asm @@ -1,4 +1,4 @@ -Music_SilphCo_Ch1:: ; 7f243 (1f:7243) +Music_SilphCo_Ch0:: tempo 160 volume 7, 7 duty 3 @@ -395,7 +395,7 @@ Music_SilphCo_branch_7f3f0:: endchannel -Music_SilphCo_Ch2:: ; 7f409 (1f:7409) +Music_SilphCo_Ch1:: vibrato 10, 3, 2 duty 3 notetype 6, 12, 3 @@ -780,7 +780,7 @@ Music_SilphCo_branch_7f42e:: loopchannel 0, Music_SilphCo_branch_7f42e -Music_SilphCo_Ch3:: ; 7f5be (1f:75be) +Music_SilphCo_Ch2:: vibrato 8, 1, 1 notetype 12, 1, 1 rest 12 @@ -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..1356c8b1 100644 --- a/audio/music/ssanne.asm +++ b/audio/music/ssanne.asm @@ -1,4 +1,4 @@ -Music_SSAnne_Ch1:: ; b3a7 (2:73a7) +Music_SSAnne_Ch0:: tempo 128 volume 7, 7 duty 1 @@ -107,7 +107,7 @@ Music_SSAnne_branch_b3b2:: loopchannel 0, Music_SSAnne_branch_b3b2 -Music_SSAnne_Ch2:: ; b419 (2:7419) +Music_SSAnne_Ch1:: duty 0 vibrato 12, 2, 4 @@ -282,7 +282,7 @@ Music_SSAnne_branch_b41e:: loopchannel 0, Music_SSAnne_branch_b41e -Music_SSAnne_Ch3:: ; b4cb (2:74cb) +Music_SSAnne_Ch2:: notetype 12, 1, 3 rest 16 rest 12 @@ -335,5 +335,4 @@ Music_SSAnne_Ch3:: ; b4cb (2:74cb) F# 8 G# 8 B_ 8 - loopchannel 0, Music_SSAnne_Ch3 -; 0xb504 + loopchannel 0, Music_SSAnne_Ch2 diff --git a/audio/music/surfing.asm b/audio/music/surfing.asm index 2b829caf..c4507a55 100644 --- a/audio/music/surfing.asm +++ b/audio/music/surfing.asm @@ -1,4 +1,4 @@ -Music_Surfing_Ch1:: ; 7fa19 (1f:7a19) +Music_Surfing_Ch0:: tempo 160 volume 7, 7 duty 3 @@ -116,7 +116,7 @@ Music_Surfing_branch_7fa30:: loopchannel 0, Music_Surfing_branch_7fa30 -Music_Surfing_Ch2:: ; 7fa9c (1f:7a9c) +Music_Surfing_Ch1:: duty 3 vibrato 16, 2, 5 notetype 12, 12, 6 @@ -203,7 +203,7 @@ Music_Surfing_branch_7faae:: loopchannel 0, Music_Surfing_branch_7faae -Music_Surfing_Ch3:: ; 7fafa (1f:7afa) +Music_Surfing_Ch2:: notetype 12, 1, 0 rest 12 octave 5 @@ -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..2d41b082 100644 --- a/audio/music/titlescreen.asm +++ b/audio/music/titlescreen.asm @@ -1,4 +1,4 @@ -Music_TitleScreen_Ch1:: ; 7e4c0 (1f:64c0) +Music_TitleScreen_Ch0:: tempo 144 volume 7, 7 vibrato 9, 3, 4 @@ -154,7 +154,7 @@ Music_TitleScreen_branch_7e55c:: endchannel -Music_TitleScreen_Ch2:: ; 7e578 (1f:6578) +Music_TitleScreen_Ch1:: vibrato 16, 4, 6 duty 1 notetype 12, 14, 1 @@ -321,7 +321,7 @@ Music_TitleScreen_branch_7e636:: endchannel -Music_TitleScreen_Ch3:: ; 7e643 (1f:6643) +Music_TitleScreen_Ch2:: notetype 12, 1, 0 octave 3 G_ 1 @@ -459,7 +459,7 @@ Music_TitleScreen_branch_7e6e5:: endchannel -Music_TitleScreen_Ch4:: ; 7e6eb (1f:66eb) +Music_TitleScreen_Ch3:: dspeed 6 rest 4 snare3 1 @@ -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..5bd2c5f8 100644 --- a/audio/music/trainerbattle.asm +++ b/audio/music/trainerbattle.asm @@ -1,4 +1,4 @@ -Music_TrainerBattle_Ch1:: ; 22919 (8:6919) +Music_TrainerBattle_Ch0:: tempo 112 volume 7, 7 duty 3 @@ -649,7 +649,7 @@ Music_TrainerBattle_branch_22962:: loopchannel 0, Music_TrainerBattle_branch_22962 -Music_TrainerBattle_Ch2:: ; 22bae (8:6bae) +Music_TrainerBattle_Ch1:: duty 3 vibrato 10, 2, 5 notetype 12, 12, 2 @@ -953,7 +953,7 @@ Music_TrainerBattle_branch_22bfc:: loopchannel 0, Music_TrainerBattle_branch_22bfc -Music_TrainerBattle_Ch3:: ; 22d10 (8:6d10) +Music_TrainerBattle_Ch2:: vibrato 0, 2, 0 notetype 12, 1, 4 octave 3 @@ -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..fb541581 100644 --- a/audio/music/unusedsong.asm +++ b/audio/music/unusedsong.asm @@ -1,4 +1,4 @@ -Music_UnusedSong_Ch1:: ; a913 (2:6913) +Music_UnusedSong_Ch0:: tempo 144 volume 7, 7 vibrato 5, 1, 6 @@ -182,7 +182,7 @@ Music_UnusedSong_branch_a91b:: endchannel -Music_UnusedSong_Ch2:: ; a9cf (2:69cf) +Music_UnusedSong_Ch1:: tempo 144 volume 7, 7 toggleperfectpitch @@ -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..c89c9b3b 100644 --- a/audio/music/vermilion.asm +++ b/audio/music/vermilion.asm @@ -1,4 +1,4 @@ -Music_Vermilion_Ch1:: ; b9eb (2:79eb) +Music_Vermilion_Ch0:: tempo 156 volume 7, 7 duty 3 @@ -111,7 +111,7 @@ Music_Vermilion_branch_b9f6:: loopchannel 0, Music_Vermilion_branch_b9f6 -Music_Vermilion_Ch2:: ; ba61 (2:7a61) +Music_Vermilion_Ch1:: duty 3 vibrato 10, 2, 3 @@ -178,7 +178,7 @@ Music_Vermilion_branch_ba66:: loopchannel 0, Music_Vermilion_branch_ba66 -Music_Vermilion_Ch3:: ; baa6 (2:7aa6) +Music_Vermilion_Ch2:: notetype 12, 1, 0 Music_Vermilion_branch_baa8:: @@ -282,7 +282,7 @@ Music_Vermilion_branch_baa8:: loopchannel 0, Music_Vermilion_branch_baa8 -Music_Vermilion_Ch4:: ; bb0d (2:7b0d) +Music_Vermilion_Ch3:: dspeed 12 Music_Vermilion_branch_bb0e:: @@ -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..e9aad529 100644 --- a/audio/music/wildbattle.asm +++ b/audio/music/wildbattle.asm @@ -1,4 +1,4 @@ -Music_WildBattle_Ch1:: ; 23099 (8:7099) +Music_WildBattle_Ch0:: tempo 104 volume 7, 7 duty 3 @@ -300,7 +300,7 @@ Music_WildBattle_branch_230e0:: loopchannel 0, Music_WildBattle_branch_230e0 -Music_WildBattle_Ch2:: ; 231d8 (8:71d8) +Music_WildBattle_Ch1:: duty 3 vibrato 8, 2, 5 notetype 12, 12, 3 @@ -462,7 +462,7 @@ Music_WildBattle_branch_23225:: loopchannel 0, Music_WildBattle_branch_23225 -Music_WildBattle_Ch3:: ; 23290 (8:7290) +Music_WildBattle_Ch2:: vibrato 0, 2, 0 notetype 12, 1, 1 octave 4 @@ -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..086fef53 100644 --- a/audio/music/yellow/meetjessiejames.asm +++ b/audio/music/yellow/meetjessiejames.asm @@ -1,4 +1,4 @@ -Music_MeetJessieJames_Ch1:: ; 8316d (20:716d) +Music_MeetJessieJames_Ch1:: tempo 144 volume 7, 7 duty 3 @@ -77,7 +77,7 @@ Music_MeetJessieJames_branch_83187:: loopchannel 0, Music_MeetJessieJames_branch_83187 -Music_MeetJessieJames_Ch2:: ; 831c8 (20:71c8) +Music_MeetJessieJames_Ch2:: duty 3 vibrato 6, 1, 5 notetype 12, 12, 2 @@ -164,7 +164,7 @@ Music_MeetJessieJames_branch_831df:: loopchannel 0, Music_MeetJessieJames_branch_831df -Music_MeetJessieJames_Ch3:: ; 8322a (20:722a) +Music_MeetJessieJames_Ch3:: notetype 12, 1, 0 rest 16 rest 8 @@ -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..1ee3f760 100644 --- a/audio/music/yellow/surfingpikachu.asm +++ b/audio/music/yellow/surfingpikachu.asm @@ -1,4 +1,4 @@ -Music_SurfingPikachu_Ch1:: ; 82ce8 (20:6ce8) +Music_SurfingPikachu_Ch1:: tempo 117 volume 7, 7 duty 3 @@ -162,7 +162,7 @@ Music_SurfingPikachu_branch_82d1a:: loopchannel 0, Music_SurfingPikachu_branch_82d1a -Music_SurfingPikachu_Ch2:: ; 82d9d (20:6d9d) +Music_SurfingPikachu_Ch2:: duty 3 vibrato 6, 1, 5 notetype 12, 12, 4 @@ -312,7 +312,7 @@ Music_SurfingPikachu_branch_82de0:: loopchannel 0, Music_SurfingPikachu_branch_82de0 -Music_SurfingPikachu_Ch3:: ; 82e45 (20:6e45) +Music_SurfingPikachu_Ch3:: notetype 12, 1, 0 octave 4 B_ 6 @@ -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..c809d10f 100644 --- a/audio/music/yellow/yellowintro.asm +++ b/audio/music/yellow/yellowintro.asm @@ -1,4 +1,4 @@ -Music_YellowIntro_Ch1:: ; 7f65c (1f:765c) +Music_YellowIntro_Ch1:: tempo 116 volume 7, 7 duty 3 @@ -100,7 +100,7 @@ Music_YellowIntro_Ch1:: ; 7f65c (1f:765c) endchannel -Music_YellowIntro_Ch2:: ; 7f6d3 (1f:76d3) +Music_YellowIntro_Ch2:: duty 2 vibrato 6, 1, 5 notetype 12, 12, 2 @@ -203,7 +203,7 @@ Music_YellowIntro_Ch2:: ; 7f6d3 (1f:76d3) endchannel -Music_YellowIntro_Ch3:: ; 7f749 (1f:7749) +Music_YellowIntro_Ch3:: notetype 12, 1, 0 octave 4 E_ 1 @@ -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..f65ca164 100644 --- a/audio/music/yellow/yellowunusedsong.asm +++ b/audio/music/yellow/yellowunusedsong.asm @@ -1,4 +1,4 @@ -Music_YellowUnusedSong_Ch1:: ; 82fbe (20:6fbe) +Music_YellowUnusedSong_Ch1:: tempo 140 volume 7, 7 duty 3 @@ -75,7 +75,7 @@ Music_YellowUnusedSong_branch_82fde:: loopchannel 0, Music_YellowUnusedSong_branch_82fde -Music_YellowUnusedSong_Ch2:: ; 83010 (20:7010) +Music_YellowUnusedSong_Ch2:: duty 2 notetype 8, 12, 2 octave 4 @@ -161,7 +161,7 @@ Music_YellowUnusedSong_branch_8302a:: loopchannel 0, Music_YellowUnusedSong_branch_8302a -Music_YellowUnusedSong_Ch3:: ; 83068 (20:7068) +Music_YellowUnusedSong_Ch3:: notetype 12, 1, 0 vibrato 2, 1, 5 rest 16 @@ -202,7 +202,7 @@ Music_YellowUnusedSong_branch_83075:: loopchannel 0, Music_YellowUnusedSong_branch_83075 -Music_YellowUnusedSong_Ch4:: ; 83092 (20:7092) +Music_YellowUnusedSong_Ch4:: dspeed 12 snare3 4 dspeed 8 @@ -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_59.asm b/audio/sfx/59_1.asm index a4985d1f..f36f9e1e 100644 --- a/audio/sfx/sfx_02_59.asm +++ b/audio/sfx/59_1.asm @@ -1,12 +1,11 @@ -SFX_02_59_Ch1: ; 841b (2:441b) +SFX_59_1_Ch4: duty 2 unknownsfx0x20 4, 241, 128, 7 endchannel -SFX_02_59_Ch2: ; 8422 (2:4422) +SFX_59_1_Ch5: duty 2 unknownsfx0x20 1, 8, 0, 0 unknownsfx0x20 4, 161, 97, 7 endchannel -; 0x842d
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_59.asm b/audio/sfx/59_3.asm index a50d05c0..559318ba 100644 --- a/audio/sfx/sfx_1f_59.asm +++ b/audio/sfx/59_3.asm @@ -1,12 +1,11 @@ -SFX_1f_59_Ch1: ; 7c404 (1f:4404) +SFX_59_3_Ch4: duty 2 unknownsfx0x20 4, 241, 128, 7 endchannel -SFX_1f_59_Ch2: ; 7c40b (1f:440b) +SFX_59_3_Ch5: duty 2 unknownsfx0x20 1, 8, 0, 0 unknownsfx0x20 4, 161, 97, 7 endchannel -; 0x7c416
\ No newline at end of file diff --git a/audio/sfx/sfx_02_52.asm b/audio/sfx/arrow_tiles_1.asm index 9534b08d..c9ef1564 100644 --- a/audio/sfx/sfx_02_52.asm +++ b/audio/sfx/arrow_tiles_1.asm @@ -1,7 +1,6 @@ -SFX_02_52_Ch1: ; 8649 (2:4649) +SFX_Arrow_Tiles_1_Ch4: duty 0 unknownsfx0x10 23 unknownsfx0x20 15, 210, 0, 7 unknownsfx0x10 8 endchannel -; 0x8654
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_52.asm b/audio/sfx/arrow_tiles_3.asm index 6fa9eaa2..f88b9c83 100644 --- a/audio/sfx/sfx_1f_52.asm +++ b/audio/sfx/arrow_tiles_3.asm @@ -1,7 +1,6 @@ -SFX_1f_52_Ch1: ; 7c626 (1f:4626) +SFX_Arrow_Tiles_3_Ch4: duty 0 unknownsfx0x10 23 unknownsfx0x20 15, 210, 0, 7 unknownsfx0x10 8 endchannel -; 0x7c631
\ No newline at end of file diff --git a/audio/sfx/sfx_08_42.asm b/audio/sfx/ball_poof.asm index 43232843..7068c66c 100644 --- a/audio/sfx/sfx_08_42.asm +++ b/audio/sfx/ball_poof.asm @@ -1,4 +1,4 @@ -SFX_08_42_Ch1: ; 2043d (8:443d) +SFX_Ball_Poof_Ch4: duty 2 unknownsfx0x10 22 unknownsfx0x20 15, 242, 0, 4 @@ -6,7 +6,6 @@ SFX_08_42_Ch1: ; 2043d (8:443d) endchannel -SFX_08_42_Ch2: ; 20448 (8:4448) +SFX_Ball_Poof_Ch7: unknownnoise0x20 15, 162, 34 endchannel -; 0x2044c
\ No newline at end of file diff --git a/audio/sfx/sfx_08_41.asm b/audio/sfx/ball_toss.asm index f4825bb4..e9beac77 100644 --- a/audio/sfx/sfx_08_41.asm +++ b/audio/sfx/ball_toss.asm @@ -1,12 +1,11 @@ -SFX_08_41_Ch1: ; 2042d (8:442d) +SFX_Ball_Toss_Ch4: duty 2 unknownsfx0x10 47 unknownsfx0x20 15, 242, 128, 7 endchannel -SFX_08_41_Ch2: ; 20436 (8:4436) +SFX_Ball_Toss_Ch5: duty 2 unknownsfx0x20 15, 194, 130, 7 endchannel -; 0x2043d
\ No newline at end of file diff --git a/audio/sfx/sfx_08_49.asm b/audio/sfx/battle_09.asm index 6219a615..11f156cb 100644 --- a/audio/sfx/sfx_08_49.asm +++ b/audio/sfx/battle_09.asm @@ -1,7 +1,6 @@ -SFX_08_49_Ch1: ; 204b9 (8:44b9) +SFX_Battle_09_Ch4: duty 1 unknownsfx0x10 151 unknownsfx0x20 15, 242, 0, 5 unknownsfx0x10 8 endchannel -; 0x204c4
\ No newline at end of file diff --git a/audio/sfx/sfx_08_4b.asm b/audio/sfx/battle_0b.asm index 980af0c9..d6feba8e 100644 --- a/audio/sfx/sfx_08_4b.asm +++ b/audio/sfx/battle_0b.asm @@ -1,4 +1,3 @@ -SFX_08_4b_Ch1: ; 204c8 (8:44c8) +SFX_Battle_0B_Ch7: unknownnoise0x20 8, 241, 84 endchannel -; 0x204cc
\ No newline at end of file diff --git a/audio/sfx/sfx_08_4c.asm b/audio/sfx/battle_0c.asm index f7f32305..f193fc20 100644 --- a/audio/sfx/sfx_08_4c.asm +++ b/audio/sfx/battle_0c.asm @@ -1,6 +1,5 @@ -SFX_08_4c_Ch1: ; 204cc (8:44cc) +SFX_Battle_0C_Ch7: unknownnoise0x20 15, 143, 17 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/battle_0d.asm index da4fa223..f9d423ad 100644 --- a/audio/sfx/sfx_08_4d.asm +++ b/audio/sfx/battle_0d.asm @@ -1,6 +1,5 @@ -SFX_08_4d_Ch1: ; 204d6 (8:44d6) +SFX_Battle_0D_Ch7: unknownnoise0x20 15, 143, 52 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/battle_0e.asm index f371f7ee..92a660b2 100644 --- a/audio/sfx/sfx_08_4e.asm +++ b/audio/sfx/battle_0e.asm @@ -1,5 +1,4 @@ -SFX_08_4e_Ch1: ; 204e0 (8:44e0) +SFX_Battle_0E_Ch7: 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/battle_0f.asm index 3200b9aa..846a9053 100644 --- a/audio/sfx/sfx_08_4f.asm +++ b/audio/sfx/battle_0f.asm @@ -1,7 +1,6 @@ -SFX_08_4f_Ch1: ; 204e7 (8:44e7) +SFX_Battle_0F_Ch7: unknownnoise0x20 2, 225, 75 unknownnoise0x20 10, 241, 68 unknownnoise0x20 2, 225, 58 unknownnoise0x20 6, 241, 52 endchannel -; 0x204f4
\ No newline at end of file diff --git a/audio/sfx/sfx_08_52.asm b/audio/sfx/battle_12.asm index d5ca41b6..77be75c0 100644 --- a/audio/sfx/sfx_08_52.asm +++ b/audio/sfx/battle_12.asm @@ -1,7 +1,6 @@ -SFX_08_52_Ch1: ; 2050b (8:450b) +SFX_Battle_12_Ch7: unknownnoise0x20 8, 79, 35 unknownnoise0x20 4, 196, 34 unknownnoise0x20 6, 242, 35 - loopchannel 4, SFX_08_52_Ch1 + loopchannel 4, SFX_Battle_12_Ch7 endchannel -; 0x20519
\ No newline at end of file diff --git a/audio/sfx/sfx_08_53.asm b/audio/sfx/battle_13.asm index 07215881..81e1a0ef 100644 --- a/audio/sfx/sfx_08_53.asm +++ b/audio/sfx/battle_13.asm @@ -1,7 +1,6 @@ -SFX_08_53_Ch1: ; 20519 (8:4519) +SFX_Battle_13_Ch7: unknownnoise0x20 8, 79, 51 unknownnoise0x20 4, 196, 34 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/battle_14.asm index 019cb3a1..8cecfb37 100644 --- a/audio/sfx/sfx_08_54.asm +++ b/audio/sfx/battle_14.asm @@ -1,7 +1,6 @@ -SFX_08_54_Ch1: ; 20526 (8:4526) +SFX_Battle_14_Ch7: unknownnoise0x20 8, 255, 50 unknownnoise0x20 8, 244, 67 unknownnoise0x20 8, 242, 84 unknownnoise0x20 8, 241, 101 endchannel -; 0x20533
\ No newline at end of file diff --git a/audio/sfx/sfx_08_56.asm b/audio/sfx/battle_16.asm index 05d62e90..dcc7014d 100644 --- a/audio/sfx/sfx_08_56.asm +++ b/audio/sfx/battle_16.asm @@ -1,6 +1,5 @@ -SFX_08_56_Ch1: ; 2054c (8:454c) +SFX_Battle_16_Ch7: unknownnoise0x20 1, 148, 35 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/battle_17.asm index d8fa8880..82bb2117 100644 --- a/audio/sfx/sfx_08_57.asm +++ b/audio/sfx/battle_17.asm @@ -1,7 +1,6 @@ -SFX_08_57_Ch1: ; 20556 (8:4556) +SFX_Battle_17_Ch7: unknownnoise0x20 2, 148, 51 unknownnoise0x20 4, 180, 34 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/battle_18.asm index 66a07ba4..14aac5c1 100644 --- a/audio/sfx/sfx_08_58.asm +++ b/audio/sfx/battle_18.asm @@ -1,5 +1,4 @@ -SFX_08_58_Ch1: ; 20563 (8:4563) +SFX_Battle_18_Ch7: 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/battle_19.asm index b67845d6..6bc1804d 100644 --- a/audio/sfx/sfx_08_59.asm +++ b/audio/sfx/battle_19.asm @@ -1,6 +1,5 @@ -SFX_08_59_Ch1: ; 2056a (8:456a) +SFX_Battle_19_Ch7: unknownnoise0x20 2, 132, 67 unknownnoise0x20 2, 196, 34 unknownnoise0x20 8, 242, 52 endchannel -; 0x20574
\ No newline at end of file diff --git a/audio/sfx/sfx_08_5b.asm b/audio/sfx/battle_1b.asm index 2a1cc2fa..a4d8992b 100644 --- a/audio/sfx/sfx_08_5b.asm +++ b/audio/sfx/battle_1b.asm @@ -1,5 +1,4 @@ -SFX_08_5b_Ch1: ; 2057b (8:457b) +SFX_Battle_1B_Ch7: 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/battle_1c.asm index f395fa7e..05cdd091 100644 --- a/audio/sfx/sfx_08_5c.asm +++ b/audio/sfx/battle_1c.asm @@ -1,6 +1,5 @@ -SFX_08_5c_Ch1: ; 20582 (8:4582) +SFX_Battle_1C_Ch7: unknownnoise0x20 2, 194, 1 unknownnoise0x20 15, 244, 1 unknownnoise0x20 15, 242, 1 endchannel -; 0x2058c
\ No newline at end of file diff --git a/audio/sfx/sfx_08_5e.asm b/audio/sfx/battle_1e.asm index 24159908..8d3f4745 100644 --- a/audio/sfx/sfx_08_5e.asm +++ b/audio/sfx/battle_1e.asm @@ -1,4 +1,4 @@ -SFX_08_5e_Ch1: ; 20593 (8:4593) +SFX_Battle_1E_Ch4: duty 0 unknownsfx0x10 58 unknownsfx0x20 4, 242, 0, 2 @@ -8,10 +8,9 @@ SFX_08_5e_Ch1: ; 20593 (8:4593) endchannel -SFX_08_5e_Ch2: ; 205a4 (8:45a4) +SFX_Battle_1E_Ch7: unknownnoise0x20 0, 209, 66 unknownnoise0x20 4, 161, 50 unknownnoise0x20 0, 209, 34 unknownnoise0x20 6, 161, 50 endchannel -; 0x205b1
\ No newline at end of file diff --git a/audio/sfx/sfx_08_60.asm b/audio/sfx/battle_20.asm index fcf2bb8b..f7413e63 100644 --- a/audio/sfx/sfx_08_60.asm +++ b/audio/sfx/battle_20.asm @@ -1,5 +1,4 @@ -SFX_08_60_Ch1: ; 205be (8:45be) +SFX_Battle_20_Ch7: 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/battle_21.asm index 39c12c1e..a6b63a6c 100644 --- a/audio/sfx/sfx_08_61.asm +++ b/audio/sfx/battle_21.asm @@ -1,8 +1,7 @@ -SFX_08_61_Ch1: ; 205c5 (8:45c5) +SFX_Battle_21_Ch7: unknownnoise0x20 2, 241, 51 unknownnoise0x20 2, 193, 50 unknownnoise0x20 2, 161, 49 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/battle_22.asm index 13f4b95a..6a20c3ae 100644 --- a/audio/sfx/sfx_08_62.asm +++ b/audio/sfx/battle_22.asm @@ -1,5 +1,4 @@ -SFX_08_62_Ch1: ; 205d5 (8:45d5) +SFX_Battle_22_Ch7: 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/battle_23.asm index bd5b9e2f..e532cf08 100644 --- a/audio/sfx/sfx_08_63.asm +++ b/audio/sfx/battle_23.asm @@ -1,8 +1,7 @@ -SFX_08_63_Ch1: ; 205dc (8:45dc) +SFX_Battle_23_Ch7: unknownnoise0x20 2, 242, 67 unknownnoise0x20 4, 181, 50 unknownnoise0x20 9, 134, 49 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/battle_24.asm index b615919f..46e9d29f 100644 --- a/audio/sfx/sfx_08_64.asm +++ b/audio/sfx/battle_24.asm @@ -1,4 +1,4 @@ -SFX_08_64_Ch1: ; 205ec (8:45ec) +SFX_Battle_24_Ch4: duty 1 unknownsfx0x10 151 unknownsfx0x20 15, 242, 0, 7 @@ -6,8 +6,7 @@ SFX_08_64_Ch1: ; 205ec (8:45ec) endchannel -SFX_08_64_Ch2: ; 205f7 (8:45f7) +SFX_Battle_24_Ch7: 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/battle_25.asm index e0368e06..3a46e505 100644 --- a/audio/sfx/sfx_08_65.asm +++ b/audio/sfx/battle_25.asm @@ -1,8 +1,7 @@ -SFX_08_65_Ch1: ; 205fe (8:45fe) +SFX_Battle_25_Ch7: unknownnoise0x20 15, 79, 65 unknownnoise0x20 8, 143, 65 unknownnoise0x20 8, 207, 65 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/battle_26.asm index 07f1ab05..ce1ac2f9 100644 --- a/audio/sfx/sfx_08_66.asm +++ b/audio/sfx/battle_26.asm @@ -1,4 +1,4 @@ -SFX_08_66_Ch1: ; 2060e (8:460e) +SFX_Battle_26_Ch7: unknownnoise0x20 10, 255, 80 unknownnoise0x20 15, 255, 81 unknownnoise0x20 8, 242, 81 @@ -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/battle_27.asm index aa327873..1e662c29 100644 --- a/audio/sfx/sfx_08_67.asm +++ b/audio/sfx/battle_27.asm @@ -1,28 +1,27 @@ -SFX_08_67_Ch1: ; 20624 (8:4624) +SFX_Battle_27_Ch4: duty 2 unknownsfx0x20 15, 63, 192, 7 -SFX_08_67_branch_2062a: +SFX_Battle_27_branch_2062a: unknownsfx0x20 15, 223, 192, 7 - loopchannel 4, SFX_08_67_branch_2062a + loopchannel 4, SFX_Battle_27_branch_2062a unknownsfx0x20 15, 209, 192, 7 endchannel -SFX_08_67_Ch2: ; 20637 (8:4637) +SFX_Battle_27_Ch5: dutycycle 179 unknownsfx0x20 15, 47, 200, 7 -SFX_08_67_branch_2063d: +SFX_Battle_27_branch_2063d: unknownsfx0x20 15, 207, 199, 7 - loopchannel 4, SFX_08_67_branch_2063d + loopchannel 4, SFX_Battle_27_branch_2063d unknownsfx0x20 15, 193, 200, 7 endchannel -SFX_08_67_Ch3: ; 2064a (8:464a) +SFX_Battle_27_Ch7: unknownnoise0x20 3, 151, 18 unknownnoise0x20 3, 161, 17 - loopchannel 10, SFX_08_67_Ch3 + loopchannel 10, SFX_Battle_27_Ch7 endchannel -; 0x20655
\ No newline at end of file diff --git a/audio/sfx/sfx_08_68.asm b/audio/sfx/battle_28.asm index efa46f92..298ddb7a 100644 --- a/audio/sfx/sfx_08_68.asm +++ b/audio/sfx/battle_28.asm @@ -1,22 +1,21 @@ -SFX_08_68_Ch1: ; 20655 (8:4655) +SFX_Battle_28_Ch4: duty 0 unknownsfx0x20 0, 241, 192, 7 unknownsfx0x20 0, 241, 0, 7 - loopchannel 12, SFX_08_68_Ch1 + loopchannel 12, SFX_Battle_28_Ch4 endchannel -SFX_08_68_Ch2: ; 20664 (8:4664) +SFX_Battle_28_Ch5: dutycycle 179 unknownsfx0x20 0, 225, 193, 7 unknownsfx0x20 0, 225, 1, 7 - loopchannel 12, SFX_08_68_Ch2 + loopchannel 12, SFX_Battle_28_Ch5 endchannel -SFX_08_68_Ch3: ; 20673 (8:4673) +SFX_Battle_28_Ch7: unknownnoise0x20 1, 209, 73 unknownnoise0x20 1, 209, 41 - loopchannel 6, SFX_08_68_Ch3 + loopchannel 6, SFX_Battle_28_Ch7 endchannel -; 0x2067e
\ No newline at end of file diff --git a/audio/sfx/sfx_08_69.asm b/audio/sfx/battle_29.asm index 26395cfa..e36c18dc 100644 --- a/audio/sfx/sfx_08_69.asm +++ b/audio/sfx/battle_29.asm @@ -1,19 +1,18 @@ -SFX_08_69_Ch1: ; 2067e (8:467e) +SFX_Battle_29_Ch4: dutycycle 201 unknownsfx0x20 11, 243, 32, 1 unknownsfx0x20 9, 211, 80, 1 - loopchannel 5, SFX_08_69_Ch1 + loopchannel 5, SFX_Battle_29_Ch4 unknownsfx0x20 8, 227, 48, 1 unknownsfx0x20 15, 194, 16, 1 endchannel -SFX_08_69_Ch2: ; 20695 (8:4695) +SFX_Battle_29_Ch7: unknownnoise0x20 10, 243, 53 unknownnoise0x20 14, 246, 69 - loopchannel 4, SFX_08_69_Ch2 + loopchannel 4, SFX_Battle_29_Ch7 unknownnoise0x20 12, 244, 188 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/battle_2a.asm index efe39d5d..710a45f1 100644 --- a/audio/sfx/sfx_08_6a.asm +++ b/audio/sfx/battle_2a.asm @@ -1,29 +1,28 @@ -SFX_08_6a_Ch1: ; 206a9 (8:46a9) +SFX_Battle_2A_Ch4: dutycycle 57 unknownsfx0x20 4, 244, 0, 6 unknownsfx0x20 3, 196, 0, 5 unknownsfx0x20 5, 181, 0, 6 unknownsfx0x20 13, 226, 192, 6 - loopchannel 3, SFX_08_6a_Ch1 + loopchannel 3, SFX_Battle_2A_Ch4 unknownsfx0x20 8, 209, 0, 6 endchannel -SFX_08_6a_Ch2: ; 206c4 (8:46c4) +SFX_Battle_2A_Ch5: dutycycle 141 unknownsfx0x20 5, 228, 224, 5 unknownsfx0x20 4, 180, 224, 4 unknownsfx0x20 6, 165, 232, 5 unknownsfx0x20 14, 209, 160, 6 - loopchannel 3, SFX_08_6a_Ch2 + loopchannel 3, SFX_Battle_2A_Ch5 endchannel -SFX_08_6a_Ch3: ; 206db (8:46db) +SFX_Battle_2A_Ch7: unknownnoise0x20 5, 195, 51 unknownnoise0x20 3, 146, 67 unknownnoise0x20 10, 181, 51 unknownnoise0x20 15, 195, 50 - loopchannel 2, SFX_08_6a_Ch3 + loopchannel 2, SFX_Battle_2A_Ch7 endchannel -; 0x206ec
\ No newline at end of file diff --git a/audio/sfx/sfx_08_6b.asm b/audio/sfx/battle_2b.asm index d0491d28..da57c7a7 100644 --- a/audio/sfx/sfx_08_6b.asm +++ b/audio/sfx/battle_2b.asm @@ -1,22 +1,21 @@ -SFX_08_6b_Ch1: ; 206ec (8:46ec) +SFX_Battle_2B_Ch4: dutycycle 210 unknownsfx0x20 3, 129, 0, 3 unknownsfx0x20 3, 193, 0, 4 unknownsfx0x20 3, 241, 0, 5 unknownsfx0x20 3, 177, 0, 4 unknownsfx0x20 3, 113, 0, 3 - loopchannel 5, SFX_08_6b_Ch1 + loopchannel 5, SFX_Battle_2B_Ch4 unknownsfx0x20 8, 129, 0, 4 endchannel -SFX_08_6b_Ch2: ; 2070b (8:470b) +SFX_Battle_2B_Ch7: unknownnoise0x20 3, 98, 34 unknownnoise0x20 3, 162, 50 unknownnoise0x20 3, 210, 51 unknownnoise0x20 3, 146, 35 unknownnoise0x20 3, 82, 18 - loopchannel 5, SFX_08_6b_Ch2 + loopchannel 5, SFX_Battle_2B_Ch7 unknownnoise0x20 8, 129, 18 endchannel -; 0x20722
\ No newline at end of file diff --git a/audio/sfx/sfx_08_6c.asm b/audio/sfx/battle_2c.asm index c9a020cd..2f8bdc49 100644 --- a/audio/sfx/sfx_08_6c.asm +++ b/audio/sfx/battle_2c.asm @@ -1,26 +1,25 @@ -SFX_08_6c_Ch1: ; 20722 (8:4722) +SFX_Battle_2C_Ch4: dutycycle 57 unknownsfx0x20 15, 244, 0, 5 unknownsfx0x20 15, 196, 0, 4 unknownsfx0x20 15, 226, 192, 5 - loopchannel 3, SFX_08_6c_Ch1 + loopchannel 3, SFX_Battle_2C_Ch4 endchannel -SFX_08_6c_Ch2: ; 20735 (8:4735) +SFX_Battle_2C_Ch5: dutycycle 141 unknownsfx0x20 7, 228, 48, 4 unknownsfx0x20 15, 180, 48, 3 unknownsfx0x20 15, 162, 56, 4 - loopchannel 4, SFX_08_6c_Ch2 + loopchannel 4, SFX_Battle_2C_Ch5 endchannel -SFX_08_6c_Ch3: ; 20748 (8:4748) +SFX_Battle_2C_Ch7: unknownnoise0x20 9, 244, 68 unknownnoise0x20 9, 242, 67 unknownnoise0x20 15, 244, 66 unknownnoise0x20 15, 244, 65 - loopchannel 3, SFX_08_6c_Ch3 + loopchannel 3, SFX_Battle_2C_Ch7 endchannel -; 0x20759
\ No newline at end of file diff --git a/audio/sfx/sfx_08_6e.asm b/audio/sfx/battle_2e.asm index 3f0a40d5..20c86033 100644 --- a/audio/sfx/sfx_08_6e.asm +++ b/audio/sfx/battle_2e.asm @@ -1,28 +1,27 @@ -SFX_08_6e_Ch1: ; 20792 (8:4792) +SFX_Battle_2E_Ch4: duty 0 unknownsfx0x20 2, 241, 0, 2 unknownsfx0x20 3, 241, 0, 7 unknownsfx0x20 4, 241, 0, 5 unknownsfx0x20 5, 241, 240, 7 - loopchannel 8, SFX_08_6e_Ch1 + loopchannel 8, SFX_Battle_2E_Ch4 endchannel -SFX_08_6e_Ch2: ; 207a9 (8:47a9) +SFX_Battle_2E_Ch5: dutycycle 179 unknownsfx0x20 2, 225, 2, 3 unknownsfx0x20 3, 225, 242, 7 unknownsfx0x20 4, 225, 2, 6 unknownsfx0x20 5, 225, 2, 7 - loopchannel 8, SFX_08_6e_Ch2 + loopchannel 8, SFX_Battle_2E_Ch5 endchannel -SFX_08_6e_Ch3: ; 207c0 (8:47c0) +SFX_Battle_2E_Ch7: unknownnoise0x20 2, 211, 16 unknownnoise0x20 3, 211, 17 unknownnoise0x20 2, 210, 16 unknownnoise0x20 5, 210, 18 - loopchannel 9, SFX_08_6e_Ch3 + loopchannel 9, SFX_Battle_2E_Ch7 endchannel -; 0x207d1
\ No newline at end of file diff --git a/audio/sfx/sfx_08_6f.asm b/audio/sfx/battle_2f.asm index bb5ca6e8..fb4c7a14 100644 --- a/audio/sfx/sfx_08_6f.asm +++ b/audio/sfx/battle_2f.asm @@ -1,22 +1,21 @@ -SFX_08_6f_Ch1: ; 207d1 (8:47d1) +SFX_Battle_2F_Ch4: dutycycle 43 unknownsfx0x20 3, 241, 240, 7 unknownsfx0x20 4, 242, 0, 2 - loopchannel 8, SFX_08_6f_Ch1 + loopchannel 8, SFX_Battle_2F_Ch4 endchannel -SFX_08_6f_Ch2: ; 207e0 (8:47e0) +SFX_Battle_2F_Ch5: dutycycle 179 unknownsfx0x20 4, 226, 2, 2 unknownsfx0x20 4, 225, 226, 7 - loopchannel 9, SFX_08_6f_Ch2 + loopchannel 9, SFX_Battle_2F_Ch5 endchannel -SFX_08_6f_Ch3: ; 207ef (8:47ef) +SFX_Battle_2F_Ch7: unknownnoise0x20 4, 255, 67 unknownnoise0x20 4, 242, 68 - loopchannel 9, SFX_08_6f_Ch3 + loopchannel 9, SFX_Battle_2F_Ch7 endchannel -; 0x207fa
\ No newline at end of file diff --git a/audio/sfx/sfx_08_71.asm b/audio/sfx/battle_31.asm index a594e0be..cc1169eb 100644 --- a/audio/sfx/sfx_08_71.asm +++ b/audio/sfx/battle_31.asm @@ -1,4 +1,4 @@ -SFX_08_71_Ch1: ; 20847 (8:4847) +SFX_Battle_31_Ch4: duty 2 unknownsfx0x20 15, 255, 224, 7 unknownsfx0x20 15, 255, 224, 7 @@ -8,7 +8,7 @@ SFX_08_71_Ch1: ; 20847 (8:4847) endchannel -SFX_08_71_Ch2: ; 2085e (8:485e) +SFX_Battle_31_Ch5: duty 3 unknownsfx0x20 15, 255, 226, 7 unknownsfx0x20 15, 255, 225, 7 @@ -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/battle_32.asm index cfd83636..c7bff4b2 100644 --- a/audio/sfx/sfx_08_72.asm +++ b/audio/sfx/battle_32.asm @@ -1,4 +1,4 @@ -SFX_08_72_Ch1: ; 20875 (8:4875) +SFX_Battle_32_Ch4: duty 2 unknownsfx0x10 175 unknownsfx0x20 8, 241, 0, 7 @@ -6,8 +6,7 @@ SFX_08_72_Ch1: ; 20875 (8:4875) endchannel -SFX_08_72_Ch2: ; 20880 (8:4880) +SFX_Battle_32_Ch5: 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/battle_33.asm index 6097a9cb..c92b5482 100644 --- a/audio/sfx/sfx_08_73.asm +++ b/audio/sfx/battle_33.asm @@ -1,4 +1,4 @@ -SFX_08_73_Ch1: ; 20887 (8:4887) +SFX_Battle_33_Ch4: duty 2 unknownsfx0x20 6, 241, 0, 5 unknownsfx0x20 6, 241, 128, 5 @@ -8,7 +8,7 @@ SFX_08_73_Ch1: ; 20887 (8:4887) endchannel -SFX_08_73_Ch2: ; 2089e (8:489e) +SFX_Battle_33_Ch5: duty 3 unknownsfx0x20 6, 225, 16, 5 unknownsfx0x20 6, 225, 144, 5 @@ -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/battle_34.asm index ed322dcb..38576ecb 100644 --- a/audio/sfx/sfx_08_74.asm +++ b/audio/sfx/battle_34.asm @@ -1,4 +1,4 @@ -SFX_08_74_Ch1: ; 208b5 (8:48b5) +SFX_Battle_34_Ch4: dutycycle 237 unknownsfx0x20 8, 255, 248, 3 unknownsfx0x20 15, 255, 0, 4 @@ -6,7 +6,7 @@ SFX_08_74_Ch1: ; 208b5 (8:48b5) endchannel -SFX_08_74_Ch2: ; 208c4 (8:48c4) +SFX_Battle_34_Ch5: dutycycle 180 unknownsfx0x20 8, 239, 192, 3 unknownsfx0x20 15, 239, 192, 3 @@ -14,10 +14,9 @@ SFX_08_74_Ch2: ; 208c4 (8:48c4) endchannel -SFX_08_74_Ch3: ; 208d3 (8:48d3) +SFX_Battle_34_Ch7: unknownnoise0x20 4, 255, 81 unknownnoise0x20 8, 255, 84 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/battle_35.asm index 0a25cb45..7ce3afb4 100644 --- a/audio/sfx/sfx_08_75.asm +++ b/audio/sfx/battle_35.asm @@ -1,4 +1,4 @@ -SFX_08_75_Ch1: ; 208e0 (8:48e0) +SFX_Battle_35_Ch4: executemusic vibrato 10, 2, 4 duty 2 @@ -13,7 +13,7 @@ SFX_08_75_Ch1: ; 208e0 (8:48e0) endchannel -SFX_08_75_Ch2: ; 208f0 (8:48f0) +SFX_Battle_35_Ch5: executemusic vibrato 10, 2, 3 duty 2 @@ -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/battle_36.asm index 7a1891ae..df23fb37 100644 --- a/audio/sfx/sfx_08_76.asm +++ b/audio/sfx/battle_36.asm @@ -1,4 +1,4 @@ -SFX_08_76_Ch1: ; 20902 (8:4902) +SFX_Battle_36_Ch4: duty 0 unknownsfx0x20 2, 241, 128, 7 unknownsfx0x20 2, 241, 0, 7 @@ -12,15 +12,15 @@ SFX_08_76_Ch1: ; 20902 (8:4902) unknownsfx0x20 2, 241, 0, 7 unknownsfx0x20 2, 241, 208, 7 -SFX_08_76_branch_20930: +SFX_Battle_36_branch_20930: unknownsfx0x20 2, 241, 0, 7 unknownsfx0x20 2, 241, 224, 7 - loopchannel 12, SFX_08_76_branch_20930 + loopchannel 12, SFX_Battle_36_branch_20930 unknownsfx0x20 15, 241, 0, 7 endchannel -SFX_08_76_Ch2: ; 20941 (8:4941) +SFX_Battle_36_Ch5: dutycycle 179 unknownsfx0x20 2, 241, 129, 7 unknownsfx0x20 2, 241, 1, 7 @@ -35,14 +35,13 @@ SFX_08_76_Ch2: ; 20941 (8:4941) unknownsfx0x20 2, 241, 209, 7 unknownsfx0x20 2, 241, 1, 7 unknownsfx0x20 2, 241, 225, 7 - loopchannel 12, SFX_08_76_branch_20930 + loopchannel 12, SFX_Battle_36_branch_20930 unknownsfx0x20 15, 241, 1, 7 endchannel -SFX_08_76_Ch3: ; 20980 (8:4980) +SFX_Battle_36_Ch7: unknownnoise0x20 1, 209, 73 unknownnoise0x20 1, 209, 41 - loopchannel 26, SFX_08_76_Ch3 + loopchannel 26, SFX_Battle_36_Ch7 endchannel -; 0x2098b
\ No newline at end of file diff --git a/audio/sfx/sfx_08_46.asm b/audio/sfx/caught_mon.asm index b1d35eb1..b844a54a 100644 --- a/audio/sfx/sfx_08_46.asm +++ b/audio/sfx/caught_mon.asm @@ -1,4 +1,4 @@ -SFX_08_46_Ch1: ; 23a13 (8:7a13) +SFX_Caught_Mon_Ch4: executemusic tempo 256 volume 7, 7 @@ -22,7 +22,7 @@ SFX_08_46_Ch1: ; 23a13 (8:7a13) endchannel -SFX_08_46_Ch2: ; 23a2e (8:7a2e) +SFX_Caught_Mon_Ch5: executemusic duty 2 notetype 6, 12, 2 @@ -44,7 +44,7 @@ SFX_08_46_Ch2: ; 23a2e (8:7a2e) endchannel -SFX_08_46_Ch3: ; 23a44 (8:7a44) +SFX_Caught_Mon_Ch6: executemusic notetype 6, 1, 0 octave 4 @@ -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_02_5b.asm b/audio/sfx/collision_1.asm index e14879ed..241a5e68 100644 --- a/audio/sfx/sfx_02_5b.asm +++ b/audio/sfx/collision_1.asm @@ -1,7 +1,6 @@ -SFX_02_5b_Ch1: ; 8447 (2:4447) +SFX_Collision_1_Ch4: duty 2 unknownsfx0x10 90 unknownsfx0x20 15, 241, 0, 3 unknownsfx0x10 8 endchannel -; 0x8452
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_5b.asm b/audio/sfx/collision_3.asm index 771aa496..649792eb 100644 --- a/audio/sfx/sfx_1f_5b.asm +++ b/audio/sfx/collision_3.asm @@ -1,7 +1,6 @@ -SFX_1f_5b_Ch1: ; 7c430 (1f:4430) +SFX_Collision_3_Ch4: duty 2 unknownsfx0x10 90 unknownsfx0x20 15, 241, 0, 3 unknownsfx0x10 8 endchannel -; 0x7c43b
\ No newline at end of file diff --git a/audio/sfx/sfx_02_14.asm b/audio/sfx/cry00_1.asm index 70dfe276..98920dfc 100644 --- a/audio/sfx/sfx_02_14.asm +++ b/audio/sfx/cry00_1.asm @@ -1,4 +1,4 @@ -SFX_02_14_Ch1: ; 8987 (2:4987) +SFX_Cry00_1_Ch4: dutycycle 245 unknownsfx0x20 4, 243, 24, 7 unknownsfx0x20 15, 229, 152, 7 @@ -6,7 +6,7 @@ SFX_02_14_Ch1: ; 8987 (2:4987) endchannel -SFX_02_14_Ch2: ; 8996 (2:4996) +SFX_Cry00_1_Ch5: dutycycle 160 unknownsfx0x20 5, 179, 8, 7 unknownsfx0x20 15, 197, 136, 7 @@ -14,9 +14,8 @@ SFX_02_14_Ch2: ; 8996 (2:4996) endchannel -SFX_02_14_Ch3: ; 89a5 (2:49a5) +SFX_Cry00_1_Ch7: unknownnoise0x20 3, 161, 28 unknownnoise0x20 14, 148, 44 unknownnoise0x20 8, 129, 28 endchannel -; 0x89af
\ No newline at end of file diff --git a/audio/sfx/sfx_08_14.asm b/audio/sfx/cry00_2.asm index b037b6a1..17a9207e 100644 --- a/audio/sfx/sfx_08_14.asm +++ b/audio/sfx/cry00_2.asm @@ -1,4 +1,4 @@ -SFX_08_14_Ch1: ; 20c2f (8:4c2f) +SFX_Cry00_2_Ch4: dutycycle 245 unknownsfx0x20 4, 243, 24, 7 unknownsfx0x20 15, 229, 152, 7 @@ -6,7 +6,7 @@ SFX_08_14_Ch1: ; 20c2f (8:4c2f) endchannel -SFX_08_14_Ch2: ; 20c3e (8:4c3e) +SFX_Cry00_2_Ch5: dutycycle 160 unknownsfx0x20 5, 179, 8, 7 unknownsfx0x20 15, 197, 136, 7 @@ -14,9 +14,8 @@ SFX_08_14_Ch2: ; 20c3e (8:4c3e) endchannel -SFX_08_14_Ch3: ; 20c4d (8:4c4d) +SFX_Cry00_2_Ch7: unknownnoise0x20 3, 161, 28 unknownnoise0x20 14, 148, 44 unknownnoise0x20 8, 129, 28 endchannel -; 0x20c57
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_14.asm b/audio/sfx/cry00_3.asm index 373bb2c3..81ad7edf 100644 --- a/audio/sfx/sfx_1f_14.asm +++ b/audio/sfx/cry00_3.asm @@ -1,4 +1,4 @@ -SFX_1f_14_Ch1: ; 7c9fc (1f:49fc) +SFX_Cry00_3_Ch4: dutycycle 245 unknownsfx0x20 4, 243, 24, 7 unknownsfx0x20 15, 229, 152, 7 @@ -6,7 +6,7 @@ SFX_1f_14_Ch1: ; 7c9fc (1f:49fc) endchannel -SFX_1f_14_Ch2: ; 7ca0b (1f:4a0b) +SFX_Cry00_3_Ch5: dutycycle 160 unknownsfx0x20 5, 179, 8, 7 unknownsfx0x20 15, 197, 136, 7 @@ -14,9 +14,8 @@ SFX_1f_14_Ch2: ; 7ca0b (1f:4a0b) endchannel -SFX_1f_14_Ch3: ; 7ca1a (1f:4a1a) +SFX_Cry00_3_Ch7: unknownnoise0x20 3, 161, 28 unknownnoise0x20 14, 148, 44 unknownnoise0x20 8, 129, 28 endchannel -; 0x7ca24
\ No newline at end of file diff --git a/audio/sfx/sfx_02_15.asm b/audio/sfx/cry01_1.asm index 619cb208..392adbe3 100644 --- a/audio/sfx/sfx_02_15.asm +++ b/audio/sfx/cry01_1.asm @@ -1,4 +1,4 @@ -SFX_02_15_Ch1: ; 8b97 (2:4b97) +SFX_Cry01_1_Ch4: dutycycle 160 unknownsfx0x20 4, 243, 0, 6 unknownsfx0x20 8, 213, 96, 7 @@ -7,7 +7,7 @@ SFX_02_15_Ch1: ; 8b97 (2:4b97) endchannel -SFX_02_15_Ch2: ; 8baa (2:4baa) +SFX_Cry01_1_Ch5: dutycycle 90 unknownsfx0x20 5, 179, 241, 6 unknownsfx0x20 7, 197, 82, 7 @@ -16,10 +16,9 @@ SFX_02_15_Ch2: ; 8baa (2:4baa) endchannel -SFX_02_15_Ch3: ; 8bbd (2:4bbd) +SFX_Cry01_1_Ch7: unknownnoise0x20 3, 162, 60 unknownnoise0x20 12, 148, 44 unknownnoise0x20 3, 130, 28 unknownnoise0x20 8, 113, 44 endchannel -; 0x8bca
\ No newline at end of file diff --git a/audio/sfx/sfx_08_15.asm b/audio/sfx/cry01_2.asm index 40cacf00..a7397fd8 100644 --- a/audio/sfx/sfx_08_15.asm +++ b/audio/sfx/cry01_2.asm @@ -1,4 +1,4 @@ -SFX_08_15_Ch1: ; 20e3f (8:4e3f) +SFX_Cry01_2_Ch4: dutycycle 160 unknownsfx0x20 4, 243, 0, 6 unknownsfx0x20 8, 213, 96, 7 @@ -7,7 +7,7 @@ SFX_08_15_Ch1: ; 20e3f (8:4e3f) endchannel -SFX_08_15_Ch2: ; 20e52 (8:4e52) +SFX_Cry01_2_Ch5: dutycycle 90 unknownsfx0x20 5, 179, 241, 6 unknownsfx0x20 7, 197, 82, 7 @@ -16,10 +16,9 @@ SFX_08_15_Ch2: ; 20e52 (8:4e52) endchannel -SFX_08_15_Ch3: ; 20e65 (8:4e65) +SFX_Cry01_2_Ch7: unknownnoise0x20 3, 162, 60 unknownnoise0x20 12, 148, 44 unknownnoise0x20 3, 130, 28 unknownnoise0x20 8, 113, 44 endchannel -; 0x20e72
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_15.asm b/audio/sfx/cry01_3.asm index b3edbdbd..19235f9e 100644 --- a/audio/sfx/sfx_1f_15.asm +++ b/audio/sfx/cry01_3.asm @@ -1,4 +1,4 @@ -SFX_1f_15_Ch1: ; 7cc0c (1f:4c0c) +SFX_Cry01_3_Ch4: dutycycle 160 unknownsfx0x20 4, 243, 0, 6 unknownsfx0x20 8, 213, 96, 7 @@ -7,7 +7,7 @@ SFX_1f_15_Ch1: ; 7cc0c (1f:4c0c) endchannel -SFX_1f_15_Ch2: ; 7cc1f (1f:4c1f) +SFX_Cry01_3_Ch5: dutycycle 90 unknownsfx0x20 5, 179, 241, 6 unknownsfx0x20 7, 197, 82, 7 @@ -16,10 +16,9 @@ SFX_1f_15_Ch2: ; 7cc1f (1f:4c1f) endchannel -SFX_1f_15_Ch3: ; 7cc32 (1f:4c32) +SFX_Cry01_3_Ch7: unknownnoise0x20 3, 162, 60 unknownnoise0x20 12, 148, 44 unknownnoise0x20 3, 130, 28 unknownnoise0x20 8, 113, 44 endchannel -; 0x7cc3f
\ No newline at end of file diff --git a/audio/sfx/sfx_02_16.asm b/audio/sfx/cry02_1.asm index 4e095a04..62834724 100644 --- a/audio/sfx/sfx_02_16.asm +++ b/audio/sfx/cry02_1.asm @@ -1,4 +1,4 @@ -SFX_02_16_Ch1: ; 8b0c (2:4b0c) +SFX_Cry02_1_Ch4: duty 0 unknownsfx0x20 8, 245, 128, 4 unknownsfx0x20 2, 225, 224, 5 @@ -6,13 +6,12 @@ SFX_02_16_Ch1: ; 8b0c (2:4b0c) endchannel -SFX_02_16_Ch2: ; 8b1b (2:4b1b) +SFX_Cry02_1_Ch5: dutycycle 165 unknownsfx0x20 7, 149, 65, 4 unknownsfx0x20 2, 129, 33, 5 unknownsfx0x20 8, 97, 26, 5 -SFX_02_16_Ch3: ; 8b29 (2:4b29) +SFX_Cry02_1_Ch7: endchannel -; 0x8b2a
\ No newline at end of file diff --git a/audio/sfx/sfx_08_16.asm b/audio/sfx/cry02_2.asm index bbe80ddb..ae40372a 100644 --- a/audio/sfx/sfx_08_16.asm +++ b/audio/sfx/cry02_2.asm @@ -1,4 +1,4 @@ -SFX_08_16_Ch1: ; 20db4 (8:4db4) +SFX_Cry02_2_Ch4: duty 0 unknownsfx0x20 8, 245, 128, 4 unknownsfx0x20 2, 225, 224, 5 @@ -6,13 +6,12 @@ SFX_08_16_Ch1: ; 20db4 (8:4db4) endchannel -SFX_08_16_Ch2: ; 20dc3 (8:4dc3) +SFX_Cry02_2_Ch5: dutycycle 165 unknownsfx0x20 7, 149, 65, 4 unknownsfx0x20 2, 129, 33, 5 unknownsfx0x20 8, 97, 26, 5 -SFX_08_16_Ch3: ; 20dd1 (8:4dd1) +SFX_Cry02_2_Ch7: endchannel -; 0x20dd2
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_16.asm b/audio/sfx/cry02_3.asm index 7c2346fb..32be5608 100644 --- a/audio/sfx/sfx_1f_16.asm +++ b/audio/sfx/cry02_3.asm @@ -1,4 +1,4 @@ -SFX_1f_16_Ch1: ; 7cb81 (1f:4b81) +SFX_Cry02_3_Ch4: duty 0 unknownsfx0x20 8, 245, 128, 4 unknownsfx0x20 2, 225, 224, 5 @@ -6,13 +6,12 @@ SFX_1f_16_Ch1: ; 7cb81 (1f:4b81) endchannel -SFX_1f_16_Ch2: ; 7cb90 (1f:4b90) +SFX_Cry02_3_Ch5: dutycycle 165 unknownsfx0x20 7, 149, 65, 4 unknownsfx0x20 2, 129, 33, 5 unknownsfx0x20 8, 97, 26, 5 -SFX_1f_16_Ch3: ; 7cb9e (1f:4b9e) +SFX_Cry02_3_Ch7: endchannel -; 0x7cb9f
\ No newline at end of file diff --git a/audio/sfx/sfx_02_17.asm b/audio/sfx/cry03_1.asm index f8b66456..706d2325 100644 --- a/audio/sfx/sfx_02_17.asm +++ b/audio/sfx/cry03_1.asm @@ -1,4 +1,4 @@ -SFX_02_17_Ch1: ; 88a6 (2:48a6) +SFX_Cry03_1_Ch4: dutycycle 240 unknownsfx0x20 4, 247, 8, 6 unknownsfx0x20 6, 230, 0, 6 @@ -10,7 +10,7 @@ SFX_02_17_Ch1: ; 88a6 (2:48a6) endchannel -SFX_02_17_Ch2: ; 88c5 (2:48c5) +SFX_Cry03_1_Ch5: dutycycle 10 unknownsfx0x20 4, 199, 4, 5 unknownsfx0x20 6, 166, 2, 5 @@ -22,10 +22,9 @@ SFX_02_17_Ch2: ; 88c5 (2:48c5) endchannel -SFX_02_17_Ch3: ; 88e4 (2:48e4) +SFX_Cry03_1_Ch7: unknownnoise0x20 12, 228, 76 unknownnoise0x20 10, 199, 92 unknownnoise0x20 12, 182, 76 unknownnoise0x20 15, 162, 92 endchannel -; 0x88f1
\ No newline at end of file diff --git a/audio/sfx/sfx_08_17.asm b/audio/sfx/cry03_2.asm index 03587fa4..89e98ae4 100644 --- a/audio/sfx/sfx_08_17.asm +++ b/audio/sfx/cry03_2.asm @@ -1,4 +1,4 @@ -SFX_08_17_Ch1: ; 20b4e (8:4b4e) +SFX_Cry03_2_Ch4: dutycycle 240 unknownsfx0x20 4, 247, 8, 6 unknownsfx0x20 6, 230, 0, 6 @@ -10,7 +10,7 @@ SFX_08_17_Ch1: ; 20b4e (8:4b4e) endchannel -SFX_08_17_Ch2: ; 20b6d (8:4b6d) +SFX_Cry03_2_Ch5: dutycycle 10 unknownsfx0x20 4, 199, 4, 5 unknownsfx0x20 6, 166, 2, 5 @@ -22,10 +22,9 @@ SFX_08_17_Ch2: ; 20b6d (8:4b6d) endchannel -SFX_08_17_Ch3: ; 20b8c (8:4b8c) +SFX_Cry03_2_Ch7: unknownnoise0x20 12, 228, 76 unknownnoise0x20 10, 199, 92 unknownnoise0x20 12, 182, 76 unknownnoise0x20 15, 162, 92 endchannel -; 0x20b99
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_17.asm b/audio/sfx/cry03_3.asm index bfda0fe3..d472d37b 100644 --- a/audio/sfx/sfx_1f_17.asm +++ b/audio/sfx/cry03_3.asm @@ -1,4 +1,4 @@ -SFX_1f_17_Ch1: ; 7c91b (1f:491b) +SFX_Cry03_3_Ch4: dutycycle 240 unknownsfx0x20 4, 247, 8, 6 unknownsfx0x20 6, 230, 0, 6 @@ -10,7 +10,7 @@ SFX_1f_17_Ch1: ; 7c91b (1f:491b) endchannel -SFX_1f_17_Ch2: ; 7c93a (1f:493a) +SFX_Cry03_3_Ch5: dutycycle 10 unknownsfx0x20 4, 199, 4, 5 unknownsfx0x20 6, 166, 2, 5 @@ -22,10 +22,9 @@ SFX_1f_17_Ch2: ; 7c93a (1f:493a) endchannel -SFX_1f_17_Ch3: ; 7c959 (1f:4959) +SFX_Cry03_3_Ch7: unknownnoise0x20 12, 228, 76 unknownnoise0x20 10, 199, 92 unknownnoise0x20 12, 182, 76 unknownnoise0x20 15, 162, 92 endchannel -; 0x7c966
\ No newline at end of file diff --git a/audio/sfx/sfx_02_18.asm b/audio/sfx/cry04_1.asm index 4d546cbf..d1bb26c6 100644 --- a/audio/sfx/sfx_02_18.asm +++ b/audio/sfx/cry04_1.asm @@ -1,4 +1,4 @@ -SFX_02_18_Ch1: ; 8c55 (2:4c55) +SFX_Cry04_1_Ch4: dutycycle 240 unknownsfx0x20 4, 247, 160, 6 unknownsfx0x20 8, 230, 164, 6 @@ -10,7 +10,7 @@ SFX_02_18_Ch1: ; 8c55 (2:4c55) endchannel -SFX_02_18_Ch2: ; 8c74 (2:4c74) +SFX_Cry04_1_Ch5: dutycycle 90 unknownsfx0x20 4, 231, 1, 6 unknownsfx0x20 8, 214, 3, 6 @@ -22,7 +22,7 @@ SFX_02_18_Ch2: ; 8c74 (2:4c74) endchannel -SFX_02_18_Ch3: ; 8c93 (2:4c93) +SFX_Cry04_1_Ch7: unknownnoise0x20 7, 214, 92 unknownnoise0x20 8, 230, 76 unknownnoise0x20 4, 212, 92 @@ -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_08_18.asm b/audio/sfx/cry04_2.asm index b1e97f95..aa5baf29 100644 --- a/audio/sfx/sfx_08_18.asm +++ b/audio/sfx/cry04_2.asm @@ -1,4 +1,4 @@ -SFX_08_18_Ch1: ; 20efd (8:4efd) +SFX_Cry04_2_Ch4: dutycycle 240 unknownsfx0x20 4, 247, 160, 6 unknownsfx0x20 8, 230, 164, 6 @@ -10,7 +10,7 @@ SFX_08_18_Ch1: ; 20efd (8:4efd) endchannel -SFX_08_18_Ch2: ; 20f1c (8:4f1c) +SFX_Cry04_2_Ch5: dutycycle 90 unknownsfx0x20 4, 231, 1, 6 unknownsfx0x20 8, 214, 3, 6 @@ -22,7 +22,7 @@ SFX_08_18_Ch2: ; 20f1c (8:4f1c) endchannel -SFX_08_18_Ch3: ; 20f3b (8:4f3b) +SFX_Cry04_2_Ch7: unknownnoise0x20 7, 214, 92 unknownnoise0x20 8, 230, 76 unknownnoise0x20 4, 212, 92 @@ -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_1f_18.asm b/audio/sfx/cry04_3.asm index 7e532f3e..b4d9cf2e 100644 --- a/audio/sfx/sfx_1f_18.asm +++ b/audio/sfx/cry04_3.asm @@ -1,4 +1,4 @@ -SFX_1f_18_Ch1: ; 7ccca (1f:4cca) +SFX_Cry04_3_Ch4: dutycycle 240 unknownsfx0x20 4, 247, 160, 6 unknownsfx0x20 8, 230, 164, 6 @@ -10,7 +10,7 @@ SFX_1f_18_Ch1: ; 7ccca (1f:4cca) endchannel -SFX_1f_18_Ch2: ; 7cce9 (1f:4ce9) +SFX_Cry04_3_Ch5: dutycycle 90 unknownsfx0x20 4, 231, 1, 6 unknownsfx0x20 8, 214, 3, 6 @@ -22,7 +22,7 @@ SFX_1f_18_Ch2: ; 7cce9 (1f:4ce9) endchannel -SFX_1f_18_Ch3: ; 7cd08 (1f:4d08) +SFX_Cry04_3_Ch7: unknownnoise0x20 7, 214, 92 unknownnoise0x20 8, 230, 76 unknownnoise0x20 4, 212, 92 @@ -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_02_19.asm b/audio/sfx/cry05_1.asm index 3cc7ae73..dc68e77d 100644 --- a/audio/sfx/sfx_02_19.asm +++ b/audio/sfx/cry05_1.asm @@ -1,4 +1,4 @@ -SFX_02_19_Ch1: ; 8a35 (2:4a35) +SFX_Cry05_1_Ch4: dutycycle 10 unknownsfx0x20 6, 226, 0, 5 unknownsfx0x20 6, 227, 128, 5 @@ -7,7 +7,7 @@ SFX_02_19_Ch1: ; 8a35 (2:4a35) endchannel -SFX_02_19_Ch2: ; 8a48 (2:4a48) +SFX_Cry05_1_Ch5: dutycycle 245 unknownsfx0x20 6, 226, 130, 4 unknownsfx0x20 6, 211, 1, 5 @@ -15,6 +15,5 @@ SFX_02_19_Ch2: ; 8a48 (2:4a48) unknownsfx0x20 8, 129, 193, 4 -SFX_02_19_Ch3: ; 8a5a (2:4a5a) +SFX_Cry05_1_Ch7: endchannel -; 0x8a5b
\ No newline at end of file diff --git a/audio/sfx/sfx_08_19.asm b/audio/sfx/cry05_2.asm index 097796bc..f7e09dcc 100644 --- a/audio/sfx/sfx_08_19.asm +++ b/audio/sfx/cry05_2.asm @@ -1,4 +1,4 @@ -SFX_08_19_Ch1: ; 20cdd (8:4cdd) +SFX_Cry05_2_Ch4: dutycycle 10 unknownsfx0x20 6, 226, 0, 5 unknownsfx0x20 6, 227, 128, 5 @@ -7,7 +7,7 @@ SFX_08_19_Ch1: ; 20cdd (8:4cdd) endchannel -SFX_08_19_Ch2: ; 20cf0 (8:4cf0) +SFX_Cry05_2_Ch5: dutycycle 245 unknownsfx0x20 6, 226, 130, 4 unknownsfx0x20 6, 211, 1, 5 @@ -15,6 +15,5 @@ SFX_08_19_Ch2: ; 20cf0 (8:4cf0) unknownsfx0x20 8, 129, 193, 4 -SFX_08_19_Ch3: ; 20d02 (8:4d02) +SFX_Cry05_2_Ch7: endchannel -; 0x20d03
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_19.asm b/audio/sfx/cry05_3.asm index c9609be5..2e8839c9 100644 --- a/audio/sfx/sfx_1f_19.asm +++ b/audio/sfx/cry05_3.asm @@ -1,4 +1,4 @@ -SFX_1f_19_Ch1: ; 7caaa (1f:4aaa) +SFX_Cry05_3_Ch4: dutycycle 10 unknownsfx0x20 6, 226, 0, 5 unknownsfx0x20 6, 227, 128, 5 @@ -7,7 +7,7 @@ SFX_1f_19_Ch1: ; 7caaa (1f:4aaa) endchannel -SFX_1f_19_Ch2: ; 7cabd (1f:4abd) +SFX_Cry05_3_Ch5: dutycycle 245 unknownsfx0x20 6, 226, 130, 4 unknownsfx0x20 6, 211, 1, 5 @@ -15,6 +15,5 @@ SFX_1f_19_Ch2: ; 7cabd (1f:4abd) unknownsfx0x20 8, 129, 193, 4 -SFX_1f_19_Ch3: ; 7cacf (1f:4acf) +SFX_Cry05_3_Ch7: endchannel -; 0x7cad0
\ No newline at end of file diff --git a/audio/sfx/sfx_02_1a.asm b/audio/sfx/cry06_1.asm index 8b029d5c..d3b051c8 100644 --- a/audio/sfx/sfx_02_1a.asm +++ b/audio/sfx/cry06_1.asm @@ -1,4 +1,4 @@ -SFX_02_1a_Ch1: ; 89df (2:49df) +SFX_Cry06_1_Ch4: dutycycle 250 unknownsfx0x20 6, 131, 71, 2 unknownsfx0x20 15, 98, 38, 2 @@ -8,11 +8,11 @@ SFX_02_1a_Ch1: ; 89df (2:49df) unknownsfx0x20 15, 66, 7, 2 -SFX_02_1a_Ch2: ; 89f9 (2:49f9) +SFX_Cry06_1_Ch5: endchannel -SFX_02_1a_Ch3: ; 89fa (2:49fa) +SFX_Cry06_1_Ch7: unknownnoise0x20 8, 212, 140 unknownnoise0x20 4, 226, 156 unknownnoise0x20 15, 198, 140 @@ -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_08_1a.asm b/audio/sfx/cry06_2.asm index 089460e4..6a46246c 100644 --- a/audio/sfx/sfx_08_1a.asm +++ b/audio/sfx/cry06_2.asm @@ -1,4 +1,4 @@ -SFX_08_1a_Ch1: ; 20c87 (8:4c87) +SFX_Cry06_2_Ch4: dutycycle 250 unknownsfx0x20 6, 131, 71, 2 unknownsfx0x20 15, 98, 38, 2 @@ -8,11 +8,11 @@ SFX_08_1a_Ch1: ; 20c87 (8:4c87) unknownsfx0x20 15, 66, 7, 2 -SFX_08_1a_Ch2: ; 20ca1 (8:4ca1) +SFX_Cry06_2_Ch5: endchannel -SFX_08_1a_Ch3: ; 20ca2 (8:4ca2) +SFX_Cry06_2_Ch7: unknownnoise0x20 8, 212, 140 unknownnoise0x20 4, 226, 156 unknownnoise0x20 15, 198, 140 @@ -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_1f_1a.asm b/audio/sfx/cry06_3.asm index 2498f122..692cd1cf 100644 --- a/audio/sfx/sfx_1f_1a.asm +++ b/audio/sfx/cry06_3.asm @@ -1,4 +1,4 @@ -SFX_1f_1a_Ch1: ; 7ca54 (1f:4a54) +SFX_Cry06_3_Ch4: dutycycle 250 unknownsfx0x20 6, 131, 71, 2 unknownsfx0x20 15, 98, 38, 2 @@ -8,11 +8,11 @@ SFX_1f_1a_Ch1: ; 7ca54 (1f:4a54) unknownsfx0x20 15, 66, 7, 2 -SFX_1f_1a_Ch2: ; 7ca6e (1f:4a6e) +SFX_Cry06_3_Ch5: endchannel -SFX_1f_1a_Ch3: ; 7ca6f (1f:4a6f) +SFX_Cry06_3_Ch7: unknownnoise0x20 8, 212, 140 unknownnoise0x20 4, 226, 156 unknownnoise0x20 15, 198, 140 @@ -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_02_1b.asm b/audio/sfx/cry07_1.asm index 8626d876..2eebb7f9 100644 --- a/audio/sfx/sfx_02_1b.asm +++ b/audio/sfx/cry07_1.asm @@ -1,4 +1,4 @@ -SFX_02_1b_Ch1: ; 8a0d (2:4a0d) +SFX_Cry07_1_Ch4: dutycycle 240 unknownsfx0x20 4, 243, 224, 6 unknownsfx0x20 15, 228, 64, 6 @@ -6,7 +6,7 @@ SFX_02_1b_Ch1: ; 8a0d (2:4a0d) endchannel -SFX_02_1b_Ch2: ; 8a1c (2:4a1c) +SFX_Cry07_1_Ch5: dutycycle 10 unknownsfx0x20 3, 195, 131, 6 unknownsfx0x20 14, 180, 2, 6 @@ -14,9 +14,8 @@ SFX_02_1b_Ch2: ; 8a1c (2:4a1c) endchannel -SFX_02_1b_Ch3: ; 8a2b (2:4a2b) +SFX_Cry07_1_Ch7: unknownnoise0x20 4, 211, 92 unknownnoise0x20 15, 230, 76 unknownnoise0x20 8, 177, 92 endchannel -; 0x8a35
\ No newline at end of file diff --git a/audio/sfx/sfx_08_1b.asm b/audio/sfx/cry07_2.asm index 1eec17f5..e0381424 100644 --- a/audio/sfx/sfx_08_1b.asm +++ b/audio/sfx/cry07_2.asm @@ -1,4 +1,4 @@ -SFX_08_1b_Ch1: ; 20cb5 (8:4cb5) +SFX_Cry07_2_Ch4: dutycycle 240 unknownsfx0x20 4, 243, 224, 6 unknownsfx0x20 15, 228, 64, 6 @@ -6,7 +6,7 @@ SFX_08_1b_Ch1: ; 20cb5 (8:4cb5) endchannel -SFX_08_1b_Ch2: ; 20cc4 (8:4cc4) +SFX_Cry07_2_Ch5: dutycycle 10 unknownsfx0x20 3, 195, 131, 6 unknownsfx0x20 14, 180, 2, 6 @@ -14,9 +14,8 @@ SFX_08_1b_Ch2: ; 20cc4 (8:4cc4) endchannel -SFX_08_1b_Ch3: ; 20cd3 (8:4cd3) +SFX_Cry07_2_Ch7: unknownnoise0x20 4, 211, 92 unknownnoise0x20 15, 230, 76 unknownnoise0x20 8, 177, 92 endchannel -; 0x20cdd
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_1b.asm b/audio/sfx/cry07_3.asm index df3167b1..92a401a9 100644 --- a/audio/sfx/sfx_1f_1b.asm +++ b/audio/sfx/cry07_3.asm @@ -1,4 +1,4 @@ -SFX_1f_1b_Ch1: ; 7ca82 (1f:4a82) +SFX_Cry07_3_Ch4: dutycycle 240 unknownsfx0x20 4, 243, 224, 6 unknownsfx0x20 15, 228, 64, 6 @@ -6,7 +6,7 @@ SFX_1f_1b_Ch1: ; 7ca82 (1f:4a82) endchannel -SFX_1f_1b_Ch2: ; 7ca91 (1f:4a91) +SFX_Cry07_3_Ch5: dutycycle 10 unknownsfx0x20 3, 195, 131, 6 unknownsfx0x20 14, 180, 2, 6 @@ -14,9 +14,8 @@ SFX_1f_1b_Ch2: ; 7ca91 (1f:4a91) endchannel -SFX_1f_1b_Ch3: ; 7caa0 (1f:4aa0) +SFX_Cry07_3_Ch7: unknownnoise0x20 4, 211, 92 unknownnoise0x20 15, 230, 76 unknownnoise0x20 8, 177, 92 endchannel -; 0x7caaa
\ No newline at end of file diff --git a/audio/sfx/sfx_02_1c.asm b/audio/sfx/cry08_1.asm index d96c0eb8..91901faa 100644 --- a/audio/sfx/sfx_02_1c.asm +++ b/audio/sfx/cry08_1.asm @@ -1,4 +1,4 @@ -SFX_02_1c_Ch1: ; 8c25 (2:4c25) +SFX_Cry08_1_Ch4: dutycycle 240 unknownsfx0x20 15, 246, 101, 5 unknownsfx0x20 10, 228, 124, 5 @@ -7,7 +7,7 @@ SFX_02_1c_Ch1: ; 8c25 (2:4c25) endchannel -SFX_02_1c_Ch2: ; 8c38 (2:4c38) +SFX_Cry08_1_Ch5: dutycycle 90 unknownsfx0x20 14, 214, 3, 5 unknownsfx0x20 9, 180, 27, 5 @@ -16,9 +16,8 @@ SFX_02_1c_Ch2: ; 8c38 (2:4c38) endchannel -SFX_02_1c_Ch3: ; 8c4b (2:4c4b) +SFX_Cry08_1_Ch7: unknownnoise0x20 12, 230, 76 unknownnoise0x20 11, 215, 92 unknownnoise0x20 15, 194, 76 endchannel -; 0x8c55
\ No newline at end of file diff --git a/audio/sfx/sfx_08_1c.asm b/audio/sfx/cry08_2.asm index ec6b03a7..45d12f38 100644 --- a/audio/sfx/sfx_08_1c.asm +++ b/audio/sfx/cry08_2.asm @@ -1,4 +1,4 @@ -SFX_08_1c_Ch1: ; 20ecd (8:4ecd) +SFX_Cry08_2_Ch4: dutycycle 240 unknownsfx0x20 15, 246, 101, 5 unknownsfx0x20 10, 228, 124, 5 @@ -7,7 +7,7 @@ SFX_08_1c_Ch1: ; 20ecd (8:4ecd) endchannel -SFX_08_1c_Ch2: ; 20ee0 (8:4ee0) +SFX_Cry08_2_Ch5: dutycycle 90 unknownsfx0x20 14, 214, 3, 5 unknownsfx0x20 9, 180, 27, 5 @@ -16,9 +16,8 @@ SFX_08_1c_Ch2: ; 20ee0 (8:4ee0) endchannel -SFX_08_1c_Ch3: ; 20ef3 (8:4ef3) +SFX_Cry08_2_Ch7: unknownnoise0x20 12, 230, 76 unknownnoise0x20 11, 215, 92 unknownnoise0x20 15, 194, 76 endchannel -; 0x20efd
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_1c.asm b/audio/sfx/cry08_3.asm index 4e7ac177..8f1ec3fb 100644 --- a/audio/sfx/sfx_1f_1c.asm +++ b/audio/sfx/cry08_3.asm @@ -1,4 +1,4 @@ -SFX_1f_1c_Ch1: ; 7cc9a (1f:4c9a) +SFX_Cry08_3_Ch4: dutycycle 240 unknownsfx0x20 15, 246, 101, 5 unknownsfx0x20 10, 228, 124, 5 @@ -7,7 +7,7 @@ SFX_1f_1c_Ch1: ; 7cc9a (1f:4c9a) endchannel -SFX_1f_1c_Ch2: ; 7ccad (1f:4cad) +SFX_Cry08_3_Ch5: dutycycle 90 unknownsfx0x20 14, 214, 3, 5 unknownsfx0x20 9, 180, 27, 5 @@ -16,9 +16,8 @@ SFX_1f_1c_Ch2: ; 7ccad (1f:4cad) endchannel -SFX_1f_1c_Ch3: ; 7ccc0 (1f:4cc0) +SFX_Cry08_3_Ch7: unknownnoise0x20 12, 230, 76 unknownnoise0x20 11, 215, 92 unknownnoise0x20 15, 194, 76 endchannel -; 0x7ccca
\ No newline at end of file diff --git a/audio/sfx/sfx_02_1d.asm b/audio/sfx/cry09_1.asm index f5db0868..11b4ab55 100644 --- a/audio/sfx/sfx_02_1d.asm +++ b/audio/sfx/cry09_1.asm @@ -1,4 +1,4 @@ -SFX_02_1d_Ch1: ; 872f (2:472f) +SFX_Cry09_1_Ch4: dutycycle 240 unknownsfx0x20 15, 247, 160, 7 unknownsfx0x20 6, 230, 163, 7 @@ -10,7 +10,7 @@ SFX_02_1d_Ch1: ; 872f (2:472f) endchannel -SFX_02_1d_Ch2: ; 874c (2:474c) +SFX_Cry09_1_Ch5: dutycycle 5 unknownsfx0x20 2, 8, 0, 0 unknownsfx0x20 15, 167, 161, 6 @@ -23,7 +23,7 @@ SFX_02_1d_Ch2: ; 874c (2:474c) endchannel -SFX_02_1d_Ch3: ; 876d (2:476d) +SFX_Cry09_1_Ch7: unknownnoise0x20 2, 242, 60 unknownnoise0x20 8, 228, 62 unknownnoise0x20 15, 215, 60 @@ -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_08_1d.asm b/audio/sfx/cry09_2.asm index 7162b031..ac4b1f74 100644 --- a/audio/sfx/sfx_08_1d.asm +++ b/audio/sfx/cry09_2.asm @@ -1,4 +1,4 @@ -SFX_08_1d_Ch1: ; 209d7 (8:49d7) +SFX_Cry09_2_Ch4: dutycycle 240 unknownsfx0x20 15, 247, 160, 7 unknownsfx0x20 6, 230, 163, 7 @@ -10,7 +10,7 @@ SFX_08_1d_Ch1: ; 209d7 (8:49d7) endchannel -SFX_08_1d_Ch2: ; 209f4 (8:49f4) +SFX_Cry09_2_Ch5: dutycycle 5 unknownsfx0x20 2, 8, 0, 0 unknownsfx0x20 15, 167, 161, 6 @@ -23,7 +23,7 @@ SFX_08_1d_Ch2: ; 209f4 (8:49f4) endchannel -SFX_08_1d_Ch3: ; 20a15 (8:4a15) +SFX_Cry09_2_Ch7: unknownnoise0x20 2, 242, 60 unknownnoise0x20 8, 228, 62 unknownnoise0x20 15, 215, 60 @@ -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_1f_1d.asm b/audio/sfx/cry09_3.asm index 703b55d5..1d3856cc 100644 --- a/audio/sfx/sfx_1f_1d.asm +++ b/audio/sfx/cry09_3.asm @@ -1,4 +1,4 @@ -SFX_1f_1d_Ch1: ; 7c7a4 (1f:47a4) +SFX_Cry09_3_Ch4: dutycycle 240 unknownsfx0x20 15, 247, 160, 7 unknownsfx0x20 6, 230, 163, 7 @@ -10,7 +10,7 @@ SFX_1f_1d_Ch1: ; 7c7a4 (1f:47a4) endchannel -SFX_1f_1d_Ch2: ; 7c7c1 (1f:47c1) +SFX_Cry09_3_Ch5: dutycycle 5 unknownsfx0x20 2, 8, 0, 0 unknownsfx0x20 15, 167, 161, 6 @@ -23,7 +23,7 @@ SFX_1f_1d_Ch2: ; 7c7c1 (1f:47c1) endchannel -SFX_1f_1d_Ch3: ; 7c7e2 (1f:47e2) +SFX_Cry09_3_Ch7: unknownnoise0x20 2, 242, 60 unknownnoise0x20 8, 228, 62 unknownnoise0x20 15, 215, 60 @@ -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_02_1e.asm b/audio/sfx/cry0a_1.asm index 524d67d7..051a5d73 100644 --- a/audio/sfx/sfx_02_1e.asm +++ b/audio/sfx/cry0a_1.asm @@ -1,4 +1,4 @@ -SFX_02_1e_Ch1: ; 8bca (2:4bca) +SFX_Cry0A_1_Ch4: dutycycle 240 unknownsfx0x20 8, 247, 224, 6 unknownsfx0x20 6, 230, 229, 6 @@ -10,7 +10,7 @@ SFX_02_1e_Ch1: ; 8bca (2:4bca) endchannel -SFX_02_1e_Ch2: ; 8be9 (2:4be9) +SFX_Cry0A_1_Ch5: dutycycle 5 unknownsfx0x20 3, 8, 0, 0 unknownsfx0x20 8, 167, 161, 6 @@ -23,7 +23,7 @@ SFX_02_1e_Ch2: ; 8be9 (2:4be9) endchannel -SFX_02_1e_Ch3: ; 8c0c (2:4c0c) +SFX_Cry0A_1_Ch7: unknownnoise0x20 2, 242, 60 unknownnoise0x20 8, 228, 62 unknownnoise0x20 8, 215, 60 @@ -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_08_1e.asm b/audio/sfx/cry0a_2.asm index 13475f11..d7fdd264 100644 --- a/audio/sfx/sfx_08_1e.asm +++ b/audio/sfx/cry0a_2.asm @@ -1,4 +1,4 @@ -SFX_08_1e_Ch1: ; 20e72 (8:4e72) +SFX_Cry0A_2_Ch4: dutycycle 240 unknownsfx0x20 8, 247, 224, 6 unknownsfx0x20 6, 230, 229, 6 @@ -10,7 +10,7 @@ SFX_08_1e_Ch1: ; 20e72 (8:4e72) endchannel -SFX_08_1e_Ch2: ; 20e91 (8:4e91) +SFX_Cry0A_2_Ch5: dutycycle 5 unknownsfx0x20 3, 8, 0, 0 unknownsfx0x20 8, 167, 161, 6 @@ -23,7 +23,7 @@ SFX_08_1e_Ch2: ; 20e91 (8:4e91) endchannel -SFX_08_1e_Ch3: ; 20eb4 (8:4eb4) +SFX_Cry0A_2_Ch7: unknownnoise0x20 2, 242, 60 unknownnoise0x20 8, 228, 62 unknownnoise0x20 8, 215, 60 @@ -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_1f_1e.asm b/audio/sfx/cry0a_3.asm index 4733a534..e16287c4 100644 --- a/audio/sfx/sfx_1f_1e.asm +++ b/audio/sfx/cry0a_3.asm @@ -1,4 +1,4 @@ -SFX_1f_1e_Ch1: ; 7cc3f (1f:4c3f) +SFX_Cry0A_3_Ch4: dutycycle 240 unknownsfx0x20 8, 247, 224, 6 unknownsfx0x20 6, 230, 229, 6 @@ -10,7 +10,7 @@ SFX_1f_1e_Ch1: ; 7cc3f (1f:4c3f) endchannel -SFX_1f_1e_Ch2: ; 7cc5e (1f:4c5e) +SFX_Cry0A_3_Ch5: dutycycle 5 unknownsfx0x20 3, 8, 0, 0 unknownsfx0x20 8, 167, 161, 6 @@ -23,7 +23,7 @@ SFX_1f_1e_Ch2: ; 7cc5e (1f:4c5e) endchannel -SFX_1f_1e_Ch3: ; 7cc81 (1f:4c81) +SFX_Cry0A_3_Ch7: unknownnoise0x20 2, 242, 60 unknownnoise0x20 8, 228, 62 unknownnoise0x20 8, 215, 60 @@ -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_02_1f.asm b/audio/sfx/cry0b_1.asm index 9506fb43..5ee9b81c 100644 --- a/audio/sfx/sfx_02_1f.asm +++ b/audio/sfx/cry0b_1.asm @@ -1,4 +1,4 @@ -SFX_02_1f_Ch1: ; 8a5b (2:4a5b) +SFX_Cry0B_1_Ch4: dutycycle 204 unknownsfx0x20 4, 241, 0, 7 unknownsfx0x20 4, 225, 128, 7 @@ -13,7 +13,7 @@ SFX_02_1f_Ch1: ; 8a5b (2:4a5b) endchannel -SFX_02_1f_Ch2: ; 8a86 (2:4a86) +SFX_Cry0B_1_Ch5: dutycycle 68 unknownsfx0x20 12, 8, 0, 0 unknownsfx0x20 4, 241, 1, 7 @@ -25,7 +25,7 @@ SFX_02_1f_Ch2: ; 8a86 (2:4a86) endchannel -SFX_02_1f_Ch3: ; 8aa5 (2:4aa5) +SFX_Cry0B_1_Ch7: unknownnoise0x20 15, 8, 0 unknownnoise0x20 4, 8, 0 unknownnoise0x20 4, 209, 76 @@ -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_08_1f.asm b/audio/sfx/cry0b_2.asm index a882c512..f762ea02 100644 --- a/audio/sfx/sfx_08_1f.asm +++ b/audio/sfx/cry0b_2.asm @@ -1,4 +1,4 @@ -SFX_08_1f_Ch1: ; 20d03 (8:4d03) +SFX_Cry0B_2_Ch4: dutycycle 204 unknownsfx0x20 4, 241, 0, 7 unknownsfx0x20 4, 225, 128, 7 @@ -13,7 +13,7 @@ SFX_08_1f_Ch1: ; 20d03 (8:4d03) endchannel -SFX_08_1f_Ch2: ; 20d2e (8:4d2e) +SFX_Cry0B_2_Ch5: dutycycle 68 unknownsfx0x20 12, 8, 0, 0 unknownsfx0x20 4, 241, 1, 7 @@ -25,7 +25,7 @@ SFX_08_1f_Ch2: ; 20d2e (8:4d2e) endchannel -SFX_08_1f_Ch3: ; 20d4d (8:4d4d) +SFX_Cry0B_2_Ch7: unknownnoise0x20 15, 8, 0 unknownnoise0x20 4, 8, 0 unknownnoise0x20 4, 209, 76 @@ -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_1f_1f.asm b/audio/sfx/cry0b_3.asm index 9188186b..22420974 100644 --- a/audio/sfx/sfx_1f_1f.asm +++ b/audio/sfx/cry0b_3.asm @@ -1,4 +1,4 @@ -SFX_1f_1f_Ch1: ; 7cad0 (1f:4ad0) +SFX_Cry0B_3_Ch4: dutycycle 204 unknownsfx0x20 4, 241, 0, 7 unknownsfx0x20 4, 225, 128, 7 @@ -13,7 +13,7 @@ SFX_1f_1f_Ch1: ; 7cad0 (1f:4ad0) endchannel -SFX_1f_1f_Ch2: ; 7cafb (1f:4afb) +SFX_Cry0B_3_Ch5: dutycycle 68 unknownsfx0x20 12, 8, 0, 0 unknownsfx0x20 4, 241, 1, 7 @@ -25,7 +25,7 @@ SFX_1f_1f_Ch2: ; 7cafb (1f:4afb) endchannel -SFX_1f_1f_Ch3: ; 7cb1a (1f:4b1a) +SFX_Cry0B_3_Ch7: unknownnoise0x20 15, 8, 0 unknownnoise0x20 4, 8, 0 unknownnoise0x20 4, 209, 76 @@ -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_02_20.asm b/audio/sfx/cry0c_1.asm index 00923339..dfbf0283 100644 --- a/audio/sfx/sfx_02_20.asm +++ b/audio/sfx/cry0c_1.asm @@ -1,4 +1,4 @@ -SFX_02_20_Ch1: ; 8abe (2:4abe) +SFX_Cry0C_1_Ch4: dutycycle 204 unknownsfx0x20 8, 245, 0, 6 unknownsfx0x20 2, 210, 56, 6 @@ -12,7 +12,7 @@ SFX_02_20_Ch1: ; 8abe (2:4abe) endchannel -SFX_02_20_Ch2: ; 8ae5 (2:4ae5) +SFX_Cry0C_1_Ch5: dutycycle 68 unknownsfx0x20 12, 195, 192, 5 unknownsfx0x20 3, 177, 249, 5 @@ -25,6 +25,5 @@ SFX_02_20_Ch2: ; 8ae5 (2:4ae5) unknownsfx0x20 8, 145, 225, 5 -SFX_02_20_Ch3: ; 8b0b (2:4b0b) +SFX_Cry0C_1_Ch7: endchannel -; 0x8b0c
\ No newline at end of file diff --git a/audio/sfx/sfx_08_20.asm b/audio/sfx/cry0c_2.asm index 94a54b0a..11e0d06a 100644 --- a/audio/sfx/sfx_08_20.asm +++ b/audio/sfx/cry0c_2.asm @@ -1,4 +1,4 @@ -SFX_08_20_Ch1: ; 20d66 (8:4d66) +SFX_Cry0C_2_Ch4: dutycycle 204 unknownsfx0x20 8, 245, 0, 6 unknownsfx0x20 2, 210, 56, 6 @@ -12,7 +12,7 @@ SFX_08_20_Ch1: ; 20d66 (8:4d66) endchannel -SFX_08_20_Ch2: ; 20d8d (8:4d8d) +SFX_Cry0C_2_Ch5: dutycycle 68 unknownsfx0x20 12, 195, 192, 5 unknownsfx0x20 3, 177, 249, 5 @@ -25,6 +25,5 @@ SFX_08_20_Ch2: ; 20d8d (8:4d8d) unknownsfx0x20 8, 145, 225, 5 -SFX_08_20_Ch3: ; 20db3 (8:4db3) +SFX_Cry0C_2_Ch7: endchannel -; 0x20db4
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_20.asm b/audio/sfx/cry0c_3.asm index 2d0b1fc6..6fc798f2 100644 --- a/audio/sfx/sfx_1f_20.asm +++ b/audio/sfx/cry0c_3.asm @@ -1,4 +1,4 @@ -SFX_1f_20_Ch1: ; 7cb33 (1f:4b33) +SFX_Cry0C_3_Ch4: dutycycle 204 unknownsfx0x20 8, 245, 0, 6 unknownsfx0x20 2, 210, 56, 6 @@ -12,7 +12,7 @@ SFX_1f_20_Ch1: ; 7cb33 (1f:4b33) endchannel -SFX_1f_20_Ch2: ; 7cb5a (1f:4b5a) +SFX_Cry0C_3_Ch5: dutycycle 68 unknownsfx0x20 12, 195, 192, 5 unknownsfx0x20 3, 177, 249, 5 @@ -25,6 +25,5 @@ SFX_1f_20_Ch2: ; 7cb5a (1f:4b5a) unknownsfx0x20 8, 145, 225, 5 -SFX_1f_20_Ch3: ; 7cb80 (1f:4b80) +SFX_Cry0C_3_Ch7: endchannel -; 0x7cb81
\ No newline at end of file diff --git a/audio/sfx/sfx_02_21.asm b/audio/sfx/cry0d_1.asm index 60ecb431..2864fa01 100644 --- a/audio/sfx/sfx_02_21.asm +++ b/audio/sfx/cry0d_1.asm @@ -1,4 +1,4 @@ -SFX_02_21_Ch1: ; 8b2a (2:4b2a) +SFX_Cry0D_1_Ch4: dutycycle 136 unknownsfx0x20 5, 242, 80, 6 unknownsfx0x20 9, 209, 96, 6 @@ -6,11 +6,11 @@ SFX_02_21_Ch1: ; 8b2a (2:4b2a) unknownsfx0x20 9, 193, 34, 6 unknownsfx0x20 5, 242, 16, 6 unknownsfx0x20 6, 209, 32, 6 - loopchannel 2, SFX_02_21_Ch1 + loopchannel 2, SFX_Cry0D_1_Ch4 endchannel -SFX_02_21_Ch2: ; 8b49 (2:4b49) +SFX_Cry0D_1_Ch5: dutycycle 64 unknownsfx0x20 4, 8, 0, 0 unknownsfx0x20 5, 242, 81, 6 @@ -26,7 +26,7 @@ SFX_02_21_Ch2: ; 8b49 (2:4b49) endchannel -SFX_02_21_Ch3: ; 8b78 (2:4b78) +SFX_Cry0D_1_Ch7: unknownnoise0x20 6, 210, 28 unknownnoise0x20 9, 177, 44 unknownnoise0x20 8, 194, 44 @@ -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_08_21.asm b/audio/sfx/cry0d_2.asm index 4bfaac76..ef4a0eb6 100644 --- a/audio/sfx/sfx_08_21.asm +++ b/audio/sfx/cry0d_2.asm @@ -1,4 +1,4 @@ -SFX_08_21_Ch1: ; 20dd2 (8:4dd2) +SFX_Cry0D_2_Ch4: dutycycle 136 unknownsfx0x20 5, 242, 80, 6 unknownsfx0x20 9, 209, 96, 6 @@ -6,11 +6,11 @@ SFX_08_21_Ch1: ; 20dd2 (8:4dd2) unknownsfx0x20 9, 193, 34, 6 unknownsfx0x20 5, 242, 16, 6 unknownsfx0x20 6, 209, 32, 6 - loopchannel 2, SFX_08_21_Ch1 + loopchannel 2, SFX_Cry0D_2_Ch4 endchannel -SFX_08_21_Ch2: ; 20df1 (8:4df1) +SFX_Cry0D_2_Ch5: dutycycle 64 unknownsfx0x20 4, 8, 0, 0 unknownsfx0x20 5, 242, 81, 6 @@ -26,7 +26,7 @@ SFX_08_21_Ch2: ; 20df1 (8:4df1) endchannel -SFX_08_21_Ch3: ; 20e20 (8:4e20) +SFX_Cry0D_2_Ch7: unknownnoise0x20 6, 210, 28 unknownnoise0x20 9, 177, 44 unknownnoise0x20 8, 194, 44 @@ -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_1f_21.asm b/audio/sfx/cry0d_3.asm index 31c600b0..1fbc40b5 100644 --- a/audio/sfx/sfx_1f_21.asm +++ b/audio/sfx/cry0d_3.asm @@ -1,4 +1,4 @@ -SFX_1f_21_Ch1: ; 7cb9f (1f:4b9f) +SFX_Cry0D_3_Ch4: dutycycle 136 unknownsfx0x20 5, 242, 80, 6 unknownsfx0x20 9, 209, 96, 6 @@ -6,11 +6,11 @@ SFX_1f_21_Ch1: ; 7cb9f (1f:4b9f) unknownsfx0x20 9, 193, 34, 6 unknownsfx0x20 5, 242, 16, 6 unknownsfx0x20 6, 209, 32, 6 - loopchannel 2, SFX_1f_21_Ch1 + loopchannel 2, SFX_Cry0D_3_Ch4 endchannel -SFX_1f_21_Ch2: ; 7cbbe (1f:4bbe) +SFX_Cry0D_3_Ch5: dutycycle 64 unknownsfx0x20 4, 8, 0, 0 unknownsfx0x20 5, 242, 81, 6 @@ -26,7 +26,7 @@ SFX_1f_21_Ch2: ; 7cbbe (1f:4bbe) endchannel -SFX_1f_21_Ch3: ; 7cbed (1f:4bed) +SFX_Cry0D_3_Ch7: unknownnoise0x20 6, 210, 28 unknownnoise0x20 9, 177, 44 unknownnoise0x20 8, 194, 44 @@ -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_02_22.asm b/audio/sfx/cry0e_1.asm index 3f7a2783..37cabb7c 100644 --- a/audio/sfx/sfx_02_22.asm +++ b/audio/sfx/cry0e_1.asm @@ -1,4 +1,4 @@ -SFX_02_22_Ch1: ; 89af (2:49af) +SFX_Cry0E_1_Ch4: dutycycle 165 unknownsfx0x20 4, 225, 0, 7 unknownsfx0x20 4, 242, 128, 7 @@ -7,7 +7,7 @@ SFX_02_22_Ch1: ; 89af (2:49af) endchannel -SFX_02_22_Ch2: ; 89c2 (2:49c2) +SFX_Cry0E_1_Ch5: dutycycle 10 unknownsfx0x20 4, 177, 225, 6 unknownsfx0x20 3, 194, 225, 6 @@ -16,9 +16,8 @@ SFX_02_22_Ch2: ; 89c2 (2:49c2) endchannel -SFX_02_22_Ch3: ; 89d5 (2:49d5) +SFX_Cry0E_1_Ch7: unknownnoise0x20 2, 97, 50 unknownnoise0x20 2, 97, 33 unknownnoise0x20 8, 97, 17 endchannel -; 0x89df
\ No newline at end of file diff --git a/audio/sfx/sfx_08_22.asm b/audio/sfx/cry0e_2.asm index b922acb3..5f6f481f 100644 --- a/audio/sfx/sfx_08_22.asm +++ b/audio/sfx/cry0e_2.asm @@ -1,4 +1,4 @@ -SFX_08_22_Ch1: ; 20c57 (8:4c57) +SFX_Cry0E_2_Ch4: dutycycle 165 unknownsfx0x20 4, 225, 0, 7 unknownsfx0x20 4, 242, 128, 7 @@ -7,7 +7,7 @@ SFX_08_22_Ch1: ; 20c57 (8:4c57) endchannel -SFX_08_22_Ch2: ; 20c6a (8:4c6a) +SFX_Cry0E_2_Ch5: dutycycle 10 unknownsfx0x20 4, 177, 225, 6 unknownsfx0x20 3, 194, 225, 6 @@ -16,9 +16,8 @@ SFX_08_22_Ch2: ; 20c6a (8:4c6a) endchannel -SFX_08_22_Ch3: ; 20c7d (8:4c7d) +SFX_Cry0E_2_Ch7: unknownnoise0x20 2, 97, 50 unknownnoise0x20 2, 97, 33 unknownnoise0x20 8, 97, 17 endchannel -; 0x20c87
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_22.asm b/audio/sfx/cry0e_3.asm index a239822f..13cf9405 100644 --- a/audio/sfx/sfx_1f_22.asm +++ b/audio/sfx/cry0e_3.asm @@ -1,4 +1,4 @@ -SFX_1f_22_Ch1: ; 7ca24 (1f:4a24) +SFX_Cry0E_3_Ch4: dutycycle 165 unknownsfx0x20 4, 225, 0, 7 unknownsfx0x20 4, 242, 128, 7 @@ -7,7 +7,7 @@ SFX_1f_22_Ch1: ; 7ca24 (1f:4a24) endchannel -SFX_1f_22_Ch2: ; 7ca37 (1f:4a37) +SFX_Cry0E_3_Ch5: dutycycle 10 unknownsfx0x20 4, 177, 225, 6 unknownsfx0x20 3, 194, 225, 6 @@ -16,9 +16,8 @@ SFX_1f_22_Ch2: ; 7ca37 (1f:4a37) endchannel -SFX_1f_22_Ch3: ; 7ca4a (1f:4a4a) +SFX_Cry0E_3_Ch7: unknownnoise0x20 2, 97, 50 unknownnoise0x20 2, 97, 33 unknownnoise0x20 8, 97, 17 endchannel -; 0x7ca54
\ No newline at end of file diff --git a/audio/sfx/sfx_02_23.asm b/audio/sfx/cry0f_1.asm index c7e0a345..81abdc09 100644 --- a/audio/sfx/sfx_02_23.asm +++ b/audio/sfx/cry0f_1.asm @@ -1,4 +1,4 @@ -SFX_02_23_Ch1: ; 88f1 (2:48f1) +SFX_Cry0F_1_Ch4: dutycycle 241 unknownsfx0x20 4, 247, 192, 7 unknownsfx0x20 12, 230, 194, 7 @@ -9,7 +9,7 @@ SFX_02_23_Ch1: ; 88f1 (2:48f1) endchannel -SFX_02_23_Ch2: ; 890c (2:490c) +SFX_Cry0F_1_Ch5: dutycycle 204 unknownsfx0x20 3, 199, 129, 7 unknownsfx0x20 12, 182, 128, 7 @@ -20,11 +20,10 @@ SFX_02_23_Ch2: ; 890c (2:490c) endchannel -SFX_02_23_Ch3: ; 8927 (2:4927) +SFX_Cry0F_1_Ch7: unknownnoise0x20 3, 228, 60 unknownnoise0x20 12, 214, 44 unknownnoise0x20 4, 228, 60 unknownnoise0x20 8, 183, 92 unknownnoise0x20 15, 194, 93 endchannel -; 0x8937
\ No newline at end of file diff --git a/audio/sfx/sfx_08_23.asm b/audio/sfx/cry0f_2.asm index 9a78abd2..112b9e8b 100644 --- a/audio/sfx/sfx_08_23.asm +++ b/audio/sfx/cry0f_2.asm @@ -1,4 +1,4 @@ -SFX_08_23_Ch1: ; 20b99 (8:4b99) +SFX_Cry0F_2_Ch4: dutycycle 241 unknownsfx0x20 4, 247, 192, 7 unknownsfx0x20 12, 230, 194, 7 @@ -9,7 +9,7 @@ SFX_08_23_Ch1: ; 20b99 (8:4b99) endchannel -SFX_08_23_Ch2: ; 20bb4 (8:4bb4) +SFX_Cry0F_2_Ch5: dutycycle 204 unknownsfx0x20 3, 199, 129, 7 unknownsfx0x20 12, 182, 128, 7 @@ -20,11 +20,10 @@ SFX_08_23_Ch2: ; 20bb4 (8:4bb4) endchannel -SFX_08_23_Ch3: ; 20bcf (8:4bcf) +SFX_Cry0F_2_Ch7: unknownnoise0x20 3, 228, 60 unknownnoise0x20 12, 214, 44 unknownnoise0x20 4, 228, 60 unknownnoise0x20 8, 183, 92 unknownnoise0x20 15, 194, 93 endchannel -; 0x20bdf
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_23.asm b/audio/sfx/cry0f_3.asm index dd021169..08abd131 100644 --- a/audio/sfx/sfx_1f_23.asm +++ b/audio/sfx/cry0f_3.asm @@ -1,4 +1,4 @@ -SFX_1f_23_Ch1: ; 7c966 (1f:4966) +SFX_Cry0F_3_Ch4: dutycycle 241 unknownsfx0x20 4, 247, 192, 7 unknownsfx0x20 12, 230, 194, 7 @@ -9,7 +9,7 @@ SFX_1f_23_Ch1: ; 7c966 (1f:4966) endchannel -SFX_1f_23_Ch2: ; 7c981 (1f:4981) +SFX_Cry0F_3_Ch5: dutycycle 204 unknownsfx0x20 3, 199, 129, 7 unknownsfx0x20 12, 182, 128, 7 @@ -20,11 +20,10 @@ SFX_1f_23_Ch2: ; 7c981 (1f:4981) endchannel -SFX_1f_23_Ch3: ; 7c99c (1f:499c) +SFX_Cry0F_3_Ch7: unknownnoise0x20 3, 228, 60 unknownnoise0x20 12, 214, 44 unknownnoise0x20 4, 228, 60 unknownnoise0x20 8, 183, 92 unknownnoise0x20 15, 194, 93 endchannel -; 0x7c9ac
\ No newline at end of file diff --git a/audio/sfx/sfx_02_24.asm b/audio/sfx/cry10_1.asm index f092bae9..eef13d3d 100644 --- a/audio/sfx/sfx_02_24.asm +++ b/audio/sfx/cry10_1.asm @@ -1,4 +1,4 @@ -SFX_02_24_Ch1: ; 8937 (2:4937) +SFX_Cry10_1_Ch4: dutycycle 201 unknownsfx0x20 8, 247, 128, 6 unknownsfx0x20 2, 247, 96, 6 @@ -11,7 +11,7 @@ SFX_02_24_Ch1: ; 8937 (2:4937) endchannel -SFX_02_24_Ch2: ; 895a (2:495a) +SFX_Cry10_1_Ch5: dutycycle 121 unknownsfx0x20 10, 231, 130, 6 unknownsfx0x20 2, 231, 98, 6 @@ -24,9 +24,8 @@ SFX_02_24_Ch2: ; 895a (2:495a) endchannel -SFX_02_24_Ch3: ; 897d (2:497d) +SFX_Cry10_1_Ch7: unknownnoise0x20 4, 116, 33 unknownnoise0x20 4, 116, 16 unknownnoise0x20 4, 113, 32 endchannel -; 0x8987
\ No newline at end of file diff --git a/audio/sfx/sfx_08_24.asm b/audio/sfx/cry10_2.asm index 2bdc4e9d..dd468979 100644 --- a/audio/sfx/sfx_08_24.asm +++ b/audio/sfx/cry10_2.asm @@ -1,4 +1,4 @@ -SFX_08_24_Ch1: ; 20bdf (8:4bdf) +SFX_Cry10_2_Ch4: dutycycle 201 unknownsfx0x20 8, 247, 128, 6 unknownsfx0x20 2, 247, 96, 6 @@ -11,7 +11,7 @@ SFX_08_24_Ch1: ; 20bdf (8:4bdf) endchannel -SFX_08_24_Ch2: ; 20c02 (8:4c02) +SFX_Cry10_2_Ch5: dutycycle 121 unknownsfx0x20 10, 231, 130, 6 unknownsfx0x20 2, 231, 98, 6 @@ -24,9 +24,8 @@ SFX_08_24_Ch2: ; 20c02 (8:4c02) endchannel -SFX_08_24_Ch3: ; 20c25 (8:4c25) +SFX_Cry10_2_Ch7: unknownnoise0x20 4, 116, 33 unknownnoise0x20 4, 116, 16 unknownnoise0x20 4, 113, 32 endchannel -; 0x20c2f
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_24.asm b/audio/sfx/cry10_3.asm index 448541e6..e9a5200d 100644 --- a/audio/sfx/sfx_1f_24.asm +++ b/audio/sfx/cry10_3.asm @@ -1,4 +1,4 @@ -SFX_1f_24_Ch1: ; 7c9ac (1f:49ac) +SFX_Cry10_3_Ch4: dutycycle 201 unknownsfx0x20 8, 247, 128, 6 unknownsfx0x20 2, 247, 96, 6 @@ -11,7 +11,7 @@ SFX_1f_24_Ch1: ; 7c9ac (1f:49ac) endchannel -SFX_1f_24_Ch2: ; 7c9cf (1f:49cf) +SFX_Cry10_3_Ch5: dutycycle 121 unknownsfx0x20 10, 231, 130, 6 unknownsfx0x20 2, 231, 98, 6 @@ -24,9 +24,8 @@ SFX_1f_24_Ch2: ; 7c9cf (1f:49cf) endchannel -SFX_1f_24_Ch3: ; 7c9f2 (1f:49f2) +SFX_Cry10_3_Ch7: unknownnoise0x20 4, 116, 33 unknownnoise0x20 4, 116, 16 unknownnoise0x20 4, 113, 32 endchannel -; 0x7c9fc
\ No newline at end of file diff --git a/audio/sfx/sfx_02_25.asm b/audio/sfx/cry11_1.asm index 4025d4f7..f7c314ef 100644 --- a/audio/sfx/sfx_02_25.asm +++ b/audio/sfx/cry11_1.asm @@ -1,4 +1,4 @@ -SFX_02_25_Ch1: ; 8813 (2:4813) +SFX_Cry11_1_Ch4: dutycycle 240 unknownsfx0x20 6, 247, 160, 7 unknownsfx0x20 8, 230, 164, 7 @@ -10,7 +10,7 @@ SFX_02_25_Ch1: ; 8813 (2:4813) endchannel -SFX_02_25_Ch2: ; 8832 (2:4832) +SFX_Cry11_1_Ch5: dutycycle 10 unknownsfx0x20 4, 8, 0, 0 unknownsfx0x20 6, 167, 65, 7 @@ -23,7 +23,7 @@ SFX_02_25_Ch2: ; 8832 (2:4832) endchannel -SFX_02_25_Ch3: ; 8855 (2:4855) +SFX_Cry11_1_Ch7: unknownnoise0x20 2, 242, 76 unknownnoise0x20 6, 230, 58 unknownnoise0x20 4, 215, 58 @@ -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_08_25.asm b/audio/sfx/cry11_2.asm index 84f8f816..0009a0ec 100644 --- a/audio/sfx/sfx_08_25.asm +++ b/audio/sfx/cry11_2.asm @@ -1,4 +1,4 @@ -SFX_08_25_Ch1: ; 20abb (8:4abb) +SFX_Cry11_2_Ch4: dutycycle 240 unknownsfx0x20 6, 247, 160, 7 unknownsfx0x20 8, 230, 164, 7 @@ -10,7 +10,7 @@ SFX_08_25_Ch1: ; 20abb (8:4abb) endchannel -SFX_08_25_Ch2: ; 20ada (8:4ada) +SFX_Cry11_2_Ch5: dutycycle 10 unknownsfx0x20 4, 8, 0, 0 unknownsfx0x20 6, 167, 65, 7 @@ -23,7 +23,7 @@ SFX_08_25_Ch2: ; 20ada (8:4ada) endchannel -SFX_08_25_Ch3: ; 20afd (8:4afd) +SFX_Cry11_2_Ch7: unknownnoise0x20 2, 242, 76 unknownnoise0x20 6, 230, 58 unknownnoise0x20 4, 215, 58 @@ -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_1f_25.asm b/audio/sfx/cry11_3.asm index b0db2369..a8af19f6 100644 --- a/audio/sfx/sfx_1f_25.asm +++ b/audio/sfx/cry11_3.asm @@ -1,4 +1,4 @@ -SFX_1f_25_Ch1: ; 7c888 (1f:4888) +SFX_Cry11_3_Ch4: dutycycle 240 unknownsfx0x20 6, 247, 160, 7 unknownsfx0x20 8, 230, 164, 7 @@ -10,7 +10,7 @@ SFX_1f_25_Ch1: ; 7c888 (1f:4888) endchannel -SFX_1f_25_Ch2: ; 7c8a7 (1f:48a7) +SFX_Cry11_3_Ch5: dutycycle 10 unknownsfx0x20 4, 8, 0, 0 unknownsfx0x20 6, 167, 65, 7 @@ -23,7 +23,7 @@ SFX_1f_25_Ch2: ; 7c8a7 (1f:48a7) endchannel -SFX_1f_25_Ch3: ; 7c8ca (1f:48ca) +SFX_Cry11_3_Ch7: unknownnoise0x20 2, 242, 76 unknownnoise0x20 6, 230, 58 unknownnoise0x20 4, 215, 58 @@ -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_02_26.asm b/audio/sfx/cry12_1.asm index eae085f4..29d93eff 100644 --- a/audio/sfx/sfx_02_26.asm +++ b/audio/sfx/cry12_1.asm @@ -1,4 +1,4 @@ -SFX_02_26_Ch1: ; 8d2b (2:4d2b) +SFX_Cry12_1_Ch4: dutycycle 165 unknownsfx0x20 12, 242, 64, 4 unknownsfx0x20 15, 227, 160, 4 @@ -7,7 +7,7 @@ SFX_02_26_Ch1: ; 8d2b (2:4d2b) endchannel -SFX_02_26_Ch2: ; 8d3e (2:4d3e) +SFX_Cry12_1_Ch5: dutycycle 238 unknownsfx0x20 11, 210, 56, 4 unknownsfx0x20 14, 198, 152, 4 @@ -16,10 +16,9 @@ SFX_02_26_Ch2: ; 8d3e (2:4d3e) endchannel -SFX_02_26_Ch3: ; 8d51 (2:4d51) +SFX_Cry12_1_Ch7: unknownnoise0x20 10, 230, 108 unknownnoise0x20 15, 210, 92 unknownnoise0x20 3, 194, 108 unknownnoise0x20 8, 209, 92 endchannel -; 0x8d5e
\ No newline at end of file diff --git a/audio/sfx/sfx_08_26.asm b/audio/sfx/cry12_2.asm index 90ae7cb9..90f373c0 100644 --- a/audio/sfx/sfx_08_26.asm +++ b/audio/sfx/cry12_2.asm @@ -1,4 +1,4 @@ -SFX_08_26_Ch1: ; 20fd3 (8:4fd3) +SFX_Cry12_2_Ch4: dutycycle 165 unknownsfx0x20 12, 242, 64, 4 unknownsfx0x20 15, 227, 160, 4 @@ -7,7 +7,7 @@ SFX_08_26_Ch1: ; 20fd3 (8:4fd3) endchannel -SFX_08_26_Ch2: ; 20fe6 (8:4fe6) +SFX_Cry12_2_Ch5: dutycycle 238 unknownsfx0x20 11, 210, 56, 4 unknownsfx0x20 14, 198, 152, 4 @@ -16,10 +16,9 @@ SFX_08_26_Ch2: ; 20fe6 (8:4fe6) endchannel -SFX_08_26_Ch3: ; 20ff9 (8:4ff9) +SFX_Cry12_2_Ch7: unknownnoise0x20 10, 230, 108 unknownnoise0x20 15, 210, 92 unknownnoise0x20 3, 194, 108 unknownnoise0x20 8, 209, 92 endchannel -; 0x21006
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_26.asm b/audio/sfx/cry12_3.asm index f0b205d5..f2c012ae 100644 --- a/audio/sfx/sfx_1f_26.asm +++ b/audio/sfx/cry12_3.asm @@ -1,4 +1,4 @@ -SFX_1f_26_Ch1: ; 7cda0 (1f:4da0) +SFX_Cry12_3_Ch4: dutycycle 165 unknownsfx0x20 12, 242, 64, 4 unknownsfx0x20 15, 227, 160, 4 @@ -7,7 +7,7 @@ SFX_1f_26_Ch1: ; 7cda0 (1f:4da0) endchannel -SFX_1f_26_Ch2: ; 7cdb3 (1f:4db3) +SFX_Cry12_3_Ch5: dutycycle 238 unknownsfx0x20 11, 210, 56, 4 unknownsfx0x20 14, 198, 152, 4 @@ -16,10 +16,9 @@ SFX_1f_26_Ch2: ; 7cdb3 (1f:4db3) endchannel -SFX_1f_26_Ch3: ; 7cdc6 (1f:4dc6) +SFX_Cry12_3_Ch7: unknownnoise0x20 10, 230, 108 unknownnoise0x20 15, 210, 92 unknownnoise0x20 3, 194, 108 unknownnoise0x20 8, 209, 92 endchannel -; 0x7cdd3
\ No newline at end of file diff --git a/audio/sfx/sfx_02_27.asm b/audio/sfx/cry13_1.asm index c019aab3..703db728 100644 --- a/audio/sfx/sfx_02_27.asm +++ b/audio/sfx/cry13_1.asm @@ -1,4 +1,4 @@ -SFX_02_27_Ch1: ; 8d5e (2:4d5e) +SFX_Cry13_1_Ch4: dutycycle 51 unknownsfx0x20 15, 246, 192, 5 unknownsfx0x20 8, 227, 188, 5 @@ -9,7 +9,7 @@ SFX_02_27_Ch1: ; 8d5e (2:4d5e) endchannel -SFX_02_27_Ch2: ; 8d79 (2:4d79) +SFX_Cry13_1_Ch5: dutycycle 153 unknownsfx0x20 14, 198, 177, 4 unknownsfx0x20 7, 195, 173, 4 @@ -20,7 +20,7 @@ SFX_02_27_Ch2: ; 8d79 (2:4d79) endchannel -SFX_02_27_Ch3: ; 8d94 (2:4d94) +SFX_Cry13_1_Ch7: unknownnoise0x20 10, 230, 92 unknownnoise0x20 10, 214, 108 unknownnoise0x20 4, 194, 76 @@ -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_08_27.asm b/audio/sfx/cry13_2.asm index 6eb9474d..7d75853c 100644 --- a/audio/sfx/sfx_08_27.asm +++ b/audio/sfx/cry13_2.asm @@ -1,4 +1,4 @@ -SFX_08_27_Ch1: ; 21006 (8:5006) +SFX_Cry13_2_Ch4: dutycycle 51 unknownsfx0x20 15, 246, 192, 5 unknownsfx0x20 8, 227, 188, 5 @@ -9,7 +9,7 @@ SFX_08_27_Ch1: ; 21006 (8:5006) endchannel -SFX_08_27_Ch2: ; 21021 (8:5021) +SFX_Cry13_2_Ch5: dutycycle 153 unknownsfx0x20 14, 198, 177, 4 unknownsfx0x20 7, 195, 173, 4 @@ -20,7 +20,7 @@ SFX_08_27_Ch2: ; 21021 (8:5021) endchannel -SFX_08_27_Ch3: ; 2103c (8:503c) +SFX_Cry13_2_Ch7: unknownnoise0x20 10, 230, 92 unknownnoise0x20 10, 214, 108 unknownnoise0x20 4, 194, 76 @@ -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_1f_27.asm b/audio/sfx/cry13_3.asm index de7adafb..53296f1a 100644 --- a/audio/sfx/sfx_1f_27.asm +++ b/audio/sfx/cry13_3.asm @@ -1,4 +1,4 @@ -SFX_1f_27_Ch1: ; 7cdd3 (1f:4dd3) +SFX_Cry13_3_Ch4: dutycycle 51 unknownsfx0x20 15, 246, 192, 5 unknownsfx0x20 8, 227, 188, 5 @@ -9,7 +9,7 @@ SFX_1f_27_Ch1: ; 7cdd3 (1f:4dd3) endchannel -SFX_1f_27_Ch2: ; 7cdee (1f:4dee) +SFX_Cry13_3_Ch5: dutycycle 153 unknownsfx0x20 14, 198, 177, 4 unknownsfx0x20 7, 195, 173, 4 @@ -20,7 +20,7 @@ SFX_1f_27_Ch2: ; 7cdee (1f:4dee) endchannel -SFX_1f_27_Ch3: ; 7ce09 (1f:4e09) +SFX_Cry13_3_Ch7: unknownnoise0x20 10, 230, 92 unknownnoise0x20 10, 214, 108 unknownnoise0x20 4, 194, 76 @@ -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_02_28.asm b/audio/sfx/cry14_1.asm index c183df6b..fa8964de 100644 --- a/audio/sfx/sfx_02_28.asm +++ b/audio/sfx/cry14_1.asm @@ -1,4 +1,4 @@ -SFX_02_28_Ch1: ; 8da7 (2:4da7) +SFX_Cry14_1_Ch4: dutycycle 240 unknownsfx0x20 8, 228, 144, 7 unknownsfx0x20 15, 245, 192, 7 @@ -6,7 +6,7 @@ SFX_02_28_Ch1: ; 8da7 (2:4da7) endchannel -SFX_02_28_Ch2: ; 8db6 (2:4db6) +SFX_Cry14_1_Ch5: dutycycle 165 unknownsfx0x20 10, 196, 113, 7 unknownsfx0x20 15, 182, 162, 7 @@ -14,9 +14,8 @@ SFX_02_28_Ch2: ; 8db6 (2:4db6) endchannel -SFX_02_28_Ch3: ; 8dc5 (2:4dc5) +SFX_Cry14_1_Ch7: unknownnoise0x20 8, 228, 76 unknownnoise0x20 14, 196, 60 unknownnoise0x20 8, 209, 44 endchannel -; 0x8dcf
\ No newline at end of file diff --git a/audio/sfx/sfx_08_28.asm b/audio/sfx/cry14_2.asm index 2d6b2a3c..1f70dca8 100644 --- a/audio/sfx/sfx_08_28.asm +++ b/audio/sfx/cry14_2.asm @@ -1,4 +1,4 @@ -SFX_08_28_Ch1: ; 2104f (8:504f) +SFX_Cry14_2_Ch4: dutycycle 240 unknownsfx0x20 8, 228, 144, 7 unknownsfx0x20 15, 245, 192, 7 @@ -6,7 +6,7 @@ SFX_08_28_Ch1: ; 2104f (8:504f) endchannel -SFX_08_28_Ch2: ; 2105e (8:505e) +SFX_Cry14_2_Ch5: dutycycle 165 unknownsfx0x20 10, 196, 113, 7 unknownsfx0x20 15, 182, 162, 7 @@ -14,9 +14,8 @@ SFX_08_28_Ch2: ; 2105e (8:505e) endchannel -SFX_08_28_Ch3: ; 2106d (8:506d) +SFX_Cry14_2_Ch7: unknownnoise0x20 8, 228, 76 unknownnoise0x20 14, 196, 60 unknownnoise0x20 8, 209, 44 endchannel -; 0x21077
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_28.asm b/audio/sfx/cry14_3.asm index c76c94a7..3bab2100 100644 --- a/audio/sfx/sfx_1f_28.asm +++ b/audio/sfx/cry14_3.asm @@ -1,4 +1,4 @@ -SFX_1f_28_Ch1: ; 7ce1c (1f:4e1c) +SFX_Cry14_3_Ch4: dutycycle 240 unknownsfx0x20 8, 228, 144, 7 unknownsfx0x20 15, 245, 192, 7 @@ -6,7 +6,7 @@ SFX_1f_28_Ch1: ; 7ce1c (1f:4e1c) endchannel -SFX_1f_28_Ch2: ; 7ce2b (1f:4e2b) +SFX_Cry14_3_Ch5: dutycycle 165 unknownsfx0x20 10, 196, 113, 7 unknownsfx0x20 15, 182, 162, 7 @@ -14,9 +14,8 @@ SFX_1f_28_Ch2: ; 7ce2b (1f:4e2b) endchannel -SFX_1f_28_Ch3: ; 7ce3a (1f:4e3a) +SFX_Cry14_3_Ch7: unknownnoise0x20 8, 228, 76 unknownnoise0x20 14, 196, 60 unknownnoise0x20 8, 209, 44 endchannel -; 0x7ce44
\ No newline at end of file diff --git a/audio/sfx/sfx_02_29.asm b/audio/sfx/cry15_1.asm index 872fa90a..0220ad4f 100644 --- a/audio/sfx/sfx_02_29.asm +++ b/audio/sfx/cry15_1.asm @@ -1,4 +1,4 @@ -SFX_02_29_Ch1: ; 8e35 (2:4e35) +SFX_Cry15_1_Ch4: dutycycle 240 unknownsfx0x20 4, 243, 128, 7 unknownsfx0x20 15, 231, 0, 7 @@ -9,7 +9,7 @@ SFX_02_29_Ch1: ; 8e35 (2:4e35) endchannel -SFX_02_29_Ch2: ; 8e50 (2:4e50) +SFX_Cry15_1_Ch5: dutycycle 90 unknownsfx0x20 6, 195, 1, 7 unknownsfx0x20 14, 183, 129, 6 @@ -20,7 +20,7 @@ SFX_02_29_Ch2: ; 8e50 (2:4e50) endchannel -SFX_02_29_Ch3: ; 8e6b (2:4e6b) +SFX_Cry15_1_Ch7: unknownnoise0x20 6, 227, 92 unknownnoise0x20 14, 214, 76 unknownnoise0x20 6, 198, 60 @@ -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_08_29.asm b/audio/sfx/cry15_2.asm index 66842f0a..2ebd7ab0 100644 --- a/audio/sfx/sfx_08_29.asm +++ b/audio/sfx/cry15_2.asm @@ -1,4 +1,4 @@ -SFX_08_29_Ch1: ; 210dd (8:50dd) +SFX_Cry15_2_Ch4: dutycycle 240 unknownsfx0x20 4, 243, 128, 7 unknownsfx0x20 15, 231, 0, 7 @@ -9,7 +9,7 @@ SFX_08_29_Ch1: ; 210dd (8:50dd) endchannel -SFX_08_29_Ch2: ; 210f8 (8:50f8) +SFX_Cry15_2_Ch5: dutycycle 90 unknownsfx0x20 6, 195, 1, 7 unknownsfx0x20 14, 183, 129, 6 @@ -20,7 +20,7 @@ SFX_08_29_Ch2: ; 210f8 (8:50f8) endchannel -SFX_08_29_Ch3: ; 21113 (8:5113) +SFX_Cry15_2_Ch7: unknownnoise0x20 6, 227, 92 unknownnoise0x20 14, 214, 76 unknownnoise0x20 6, 198, 60 @@ -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_1f_29.asm b/audio/sfx/cry15_3.asm index bc19ea3b..39ba7a74 100644 --- a/audio/sfx/sfx_1f_29.asm +++ b/audio/sfx/cry15_3.asm @@ -1,4 +1,4 @@ -SFX_1f_29_Ch1: ; 7ceaa (1f:4eaa) +SFX_Cry15_3_Ch4: dutycycle 240 unknownsfx0x20 4, 243, 128, 7 unknownsfx0x20 15, 231, 0, 7 @@ -9,7 +9,7 @@ SFX_1f_29_Ch1: ; 7ceaa (1f:4eaa) endchannel -SFX_1f_29_Ch2: ; 7cec5 (1f:4ec5) +SFX_Cry15_3_Ch5: dutycycle 90 unknownsfx0x20 6, 195, 1, 7 unknownsfx0x20 14, 183, 129, 6 @@ -20,7 +20,7 @@ SFX_1f_29_Ch2: ; 7cec5 (1f:4ec5) endchannel -SFX_1f_29_Ch3: ; 7cee0 (1f:4ee0) +SFX_Cry15_3_Ch7: unknownnoise0x20 6, 227, 92 unknownnoise0x20 14, 214, 76 unknownnoise0x20 6, 198, 60 @@ -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_02_2a.asm b/audio/sfx/cry16_1.asm index f5313860..34d6f6d9 100644 --- a/audio/sfx/sfx_02_2a.asm +++ b/audio/sfx/cry16_1.asm @@ -1,4 +1,4 @@ -SFX_02_2a_Ch1: ; 8cc8 (2:4cc8) +SFX_Cry16_1_Ch4: dutycycle 240 unknownsfx0x20 15, 215, 128, 7 unknownsfx0x20 4, 230, 160, 7 @@ -6,7 +6,7 @@ SFX_02_2a_Ch1: ; 8cc8 (2:4cc8) endchannel -SFX_02_2a_Ch2: ; 8cd7 (2:4cd7) +SFX_Cry16_1_Ch5: dutycycle 90 unknownsfx0x20 15, 199, 83, 7 unknownsfx0x20 5, 182, 114, 7 @@ -14,9 +14,8 @@ SFX_02_2a_Ch2: ; 8cd7 (2:4cd7) endchannel -SFX_02_2a_Ch3: ; 8ce6 (2:4ce6) +SFX_Cry16_1_Ch7: unknownnoise0x20 13, 246, 76 unknownnoise0x20 4, 230, 60 unknownnoise0x20 15, 242, 76 endchannel -; 0x8cf0
\ No newline at end of file diff --git a/audio/sfx/sfx_08_2a.asm b/audio/sfx/cry16_2.asm index d3494708..8948cd29 100644 --- a/audio/sfx/sfx_08_2a.asm +++ b/audio/sfx/cry16_2.asm @@ -1,4 +1,4 @@ -SFX_08_2a_Ch1: ; 20f70 (8:4f70) +SFX_Cry16_2_Ch4: dutycycle 240 unknownsfx0x20 15, 215, 128, 7 unknownsfx0x20 4, 230, 160, 7 @@ -6,7 +6,7 @@ SFX_08_2a_Ch1: ; 20f70 (8:4f70) endchannel -SFX_08_2a_Ch2: ; 20f7f (8:4f7f) +SFX_Cry16_2_Ch5: dutycycle 90 unknownsfx0x20 15, 199, 83, 7 unknownsfx0x20 5, 182, 114, 7 @@ -14,9 +14,8 @@ SFX_08_2a_Ch2: ; 20f7f (8:4f7f) endchannel -SFX_08_2a_Ch3: ; 20f8e (8:4f8e) +SFX_Cry16_2_Ch7: unknownnoise0x20 13, 246, 76 unknownnoise0x20 4, 230, 60 unknownnoise0x20 15, 242, 76 endchannel -; 0x20f98
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_2a.asm b/audio/sfx/cry16_3.asm index b91e4c2e..026ee67b 100644 --- a/audio/sfx/sfx_1f_2a.asm +++ b/audio/sfx/cry16_3.asm @@ -1,4 +1,4 @@ -SFX_1f_2a_Ch1: ; 7cd3d (1f:4d3d) +SFX_Cry16_3_Ch4: dutycycle 240 unknownsfx0x20 15, 215, 128, 7 unknownsfx0x20 4, 230, 160, 7 @@ -6,7 +6,7 @@ SFX_1f_2a_Ch1: ; 7cd3d (1f:4d3d) endchannel -SFX_1f_2a_Ch2: ; 7cd4c (1f:4d4c) +SFX_Cry16_3_Ch5: dutycycle 90 unknownsfx0x20 15, 199, 83, 7 unknownsfx0x20 5, 182, 114, 7 @@ -14,9 +14,8 @@ SFX_1f_2a_Ch2: ; 7cd4c (1f:4d4c) endchannel -SFX_1f_2a_Ch3: ; 7cd5b (1f:4d5b) +SFX_Cry16_3_Ch7: unknownnoise0x20 13, 246, 76 unknownnoise0x20 4, 230, 60 unknownnoise0x20 15, 242, 76 endchannel -; 0x7cd65
\ No newline at end of file diff --git a/audio/sfx/sfx_02_2b.asm b/audio/sfx/cry17_1.asm index c0792c94..97dec764 100644 --- a/audio/sfx/sfx_02_2b.asm +++ b/audio/sfx/cry17_1.asm @@ -1,4 +1,4 @@ -SFX_02_2b_Ch1: ; 8e7e (2:4e7e) +SFX_Cry17_1_Ch4: dutycycle 15 unknownsfx0x20 15, 247, 0, 5 unknownsfx0x20 15, 231, 8, 5 @@ -7,7 +7,7 @@ SFX_02_2b_Ch1: ; 8e7e (2:4e7e) endchannel -SFX_02_2b_Ch2: ; 8e91 (2:4e91) +SFX_Cry17_1_Ch5: dutycycle 68 unknownsfx0x20 14, 215, 129, 4 unknownsfx0x20 14, 199, 137, 4 @@ -16,10 +16,9 @@ SFX_02_2b_Ch2: ; 8e91 (2:4e91) endchannel -SFX_02_2b_Ch3: ; 8ea4 (2:4ea4) +SFX_Cry17_1_Ch7: unknownnoise0x20 14, 247, 124 unknownnoise0x20 12, 246, 108 unknownnoise0x20 9, 228, 124 unknownnoise0x20 15, 226, 108 endchannel -; 0x8eb1
\ No newline at end of file diff --git a/audio/sfx/sfx_08_2b.asm b/audio/sfx/cry17_2.asm index 301c9712..a6ab03a2 100644 --- a/audio/sfx/sfx_08_2b.asm +++ b/audio/sfx/cry17_2.asm @@ -1,4 +1,4 @@ -SFX_08_2b_Ch1: ; 21126 (8:5126) +SFX_Cry17_2_Ch4: dutycycle 15 unknownsfx0x20 15, 247, 0, 5 unknownsfx0x20 15, 231, 8, 5 @@ -7,7 +7,7 @@ SFX_08_2b_Ch1: ; 21126 (8:5126) endchannel -SFX_08_2b_Ch2: ; 21139 (8:5139) +SFX_Cry17_2_Ch5: dutycycle 68 unknownsfx0x20 14, 215, 129, 4 unknownsfx0x20 14, 199, 137, 4 @@ -16,10 +16,9 @@ SFX_08_2b_Ch2: ; 21139 (8:5139) endchannel -SFX_08_2b_Ch3: ; 2114c (8:514c) +SFX_Cry17_2_Ch7: unknownnoise0x20 14, 247, 124 unknownnoise0x20 12, 246, 108 unknownnoise0x20 9, 228, 124 unknownnoise0x20 15, 226, 108 endchannel -; 0x21159
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_2b.asm b/audio/sfx/cry17_3.asm index da51e7c9..53555206 100644 --- a/audio/sfx/sfx_1f_2b.asm +++ b/audio/sfx/cry17_3.asm @@ -1,4 +1,4 @@ -SFX_1f_2b_Ch1: ; 7cef3 (1f:4ef3) +SFX_Cry17_3_Ch4: dutycycle 15 unknownsfx0x20 15, 247, 0, 5 unknownsfx0x20 15, 231, 8, 5 @@ -7,7 +7,7 @@ SFX_1f_2b_Ch1: ; 7cef3 (1f:4ef3) endchannel -SFX_1f_2b_Ch2: ; 7cf06 (1f:4f06) +SFX_Cry17_3_Ch5: dutycycle 68 unknownsfx0x20 14, 215, 129, 4 unknownsfx0x20 14, 199, 137, 4 @@ -16,10 +16,9 @@ SFX_1f_2b_Ch2: ; 7cf06 (1f:4f06) endchannel -SFX_1f_2b_Ch3: ; 7cf19 (1f:4f19) +SFX_Cry17_3_Ch7: unknownnoise0x20 14, 247, 124 unknownnoise0x20 12, 246, 108 unknownnoise0x20 9, 228, 124 unknownnoise0x20 15, 226, 108 endchannel -; 0x7cf26
\ No newline at end of file diff --git a/audio/sfx/sfx_02_2c.asm b/audio/sfx/cry18_1.asm index e923c9e1..8cb3283f 100644 --- a/audio/sfx/sfx_02_2c.asm +++ b/audio/sfx/cry18_1.asm @@ -1,4 +1,4 @@ -SFX_02_2c_Ch1: ; 8f8e (2:4f8e) +SFX_Cry18_1_Ch4: dutycycle 80 unknownsfx0x20 10, 245, 128, 6 unknownsfx0x20 3, 226, 160, 6 @@ -11,7 +11,7 @@ SFX_02_2c_Ch1: ; 8f8e (2:4f8e) endchannel -SFX_02_2c_Ch2: ; 8fb1 (2:4fb1) +SFX_Cry18_1_Ch5: dutycycle 15 unknownsfx0x20 9, 213, 49, 6 unknownsfx0x20 3, 210, 82, 6 @@ -24,7 +24,7 @@ SFX_02_2c_Ch2: ; 8fb1 (2:4fb1) endchannel -SFX_02_2c_Ch3: ; 8fd4 (2:4fd4) +SFX_Cry18_1_Ch7: unknownnoise0x20 6, 227, 76 unknownnoise0x20 4, 195, 60 unknownnoise0x20 5, 212, 60 @@ -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_08_2c.asm b/audio/sfx/cry18_2.asm index d3844d4a..01dacd5f 100644 --- a/audio/sfx/sfx_08_2c.asm +++ b/audio/sfx/cry18_2.asm @@ -1,4 +1,4 @@ -SFX_08_2c_Ch1: ; 21236 (8:5236) +SFX_Cry18_2_Ch4: dutycycle 80 unknownsfx0x20 10, 245, 128, 6 unknownsfx0x20 3, 226, 160, 6 @@ -11,7 +11,7 @@ SFX_08_2c_Ch1: ; 21236 (8:5236) endchannel -SFX_08_2c_Ch2: ; 21259 (8:5259) +SFX_Cry18_2_Ch5: dutycycle 15 unknownsfx0x20 9, 213, 49, 6 unknownsfx0x20 3, 210, 82, 6 @@ -24,7 +24,7 @@ SFX_08_2c_Ch2: ; 21259 (8:5259) endchannel -SFX_08_2c_Ch3: ; 2127c (8:527c) +SFX_Cry18_2_Ch7: unknownnoise0x20 6, 227, 76 unknownnoise0x20 4, 195, 60 unknownnoise0x20 5, 212, 60 @@ -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_1f_2c.asm b/audio/sfx/cry18_3.asm index a480b584..23d2d6a6 100644 --- a/audio/sfx/sfx_1f_2c.asm +++ b/audio/sfx/cry18_3.asm @@ -1,4 +1,4 @@ -SFX_1f_2c_Ch1: ; 7d003 (1f:5003) +SFX_Cry18_3_Ch4: dutycycle 80 unknownsfx0x20 10, 245, 128, 6 unknownsfx0x20 3, 226, 160, 6 @@ -11,7 +11,7 @@ SFX_1f_2c_Ch1: ; 7d003 (1f:5003) endchannel -SFX_1f_2c_Ch2: ; 7d026 (1f:5026) +SFX_Cry18_3_Ch5: dutycycle 15 unknownsfx0x20 9, 213, 49, 6 unknownsfx0x20 3, 210, 82, 6 @@ -24,7 +24,7 @@ SFX_1f_2c_Ch2: ; 7d026 (1f:5026) endchannel -SFX_1f_2c_Ch3: ; 7d049 (1f:5049) +SFX_Cry18_3_Ch7: unknownnoise0x20 6, 227, 76 unknownnoise0x20 4, 195, 60 unknownnoise0x20 5, 212, 60 @@ -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_02_2d.asm b/audio/sfx/cry19_1.asm index 70e71eb1..2e6790e5 100644 --- a/audio/sfx/sfx_02_2d.asm +++ b/audio/sfx/cry19_1.asm @@ -1,4 +1,4 @@ -SFX_02_2d_Ch1: ; 8ca6 (2:4ca6) +SFX_Cry19_1_Ch4: dutycycle 27 unknownsfx0x20 7, 210, 64, 7 unknownsfx0x20 15, 229, 96, 7 @@ -6,7 +6,7 @@ SFX_02_2d_Ch1: ; 8ca6 (2:4ca6) endchannel -SFX_02_2d_Ch2: ; 8cb5 (2:4cb5) +SFX_Cry19_1_Ch5: dutycycle 129 unknownsfx0x20 2, 194, 1, 7 unknownsfx0x20 4, 194, 8, 7 @@ -14,6 +14,5 @@ SFX_02_2d_Ch2: ; 8cb5 (2:4cb5) unknownsfx0x20 15, 162, 1, 7 -SFX_02_2d_Ch3: ; 8cc7 (2:4cc7) +SFX_Cry19_1_Ch7: endchannel -; 0x8cc8
\ No newline at end of file diff --git a/audio/sfx/sfx_08_2d.asm b/audio/sfx/cry19_2.asm index 3e28d648..f412ec14 100644 --- a/audio/sfx/sfx_08_2d.asm +++ b/audio/sfx/cry19_2.asm @@ -1,4 +1,4 @@ -SFX_08_2d_Ch1: ; 20f4e (8:4f4e) +SFX_Cry19_2_Ch4: dutycycle 27 unknownsfx0x20 7, 210, 64, 7 unknownsfx0x20 15, 229, 96, 7 @@ -6,7 +6,7 @@ SFX_08_2d_Ch1: ; 20f4e (8:4f4e) endchannel -SFX_08_2d_Ch2: ; 20f5d (8:4f5d) +SFX_Cry19_2_Ch5: dutycycle 129 unknownsfx0x20 2, 194, 1, 7 unknownsfx0x20 4, 194, 8, 7 @@ -14,6 +14,5 @@ SFX_08_2d_Ch2: ; 20f5d (8:4f5d) unknownsfx0x20 15, 162, 1, 7 -SFX_08_2d_Ch3: ; 20f6f (8:4f6f) +SFX_Cry19_2_Ch7: endchannel -; 0x20f70
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_2d.asm b/audio/sfx/cry19_3.asm index f4c4ecd9..2baff05e 100644 --- a/audio/sfx/sfx_1f_2d.asm +++ b/audio/sfx/cry19_3.asm @@ -1,4 +1,4 @@ -SFX_1f_2d_Ch1: ; 7cd1b (1f:4d1b) +SFX_Cry19_3_Ch4: dutycycle 27 unknownsfx0x20 7, 210, 64, 7 unknownsfx0x20 15, 229, 96, 7 @@ -6,7 +6,7 @@ SFX_1f_2d_Ch1: ; 7cd1b (1f:4d1b) endchannel -SFX_1f_2d_Ch2: ; 7cd2a (1f:4d2a) +SFX_Cry19_3_Ch5: dutycycle 129 unknownsfx0x20 2, 194, 1, 7 unknownsfx0x20 4, 194, 8, 7 @@ -14,6 +14,5 @@ SFX_1f_2d_Ch2: ; 7cd2a (1f:4d2a) unknownsfx0x20 15, 162, 1, 7 -SFX_1f_2d_Ch3: ; 7cd3c (1f:4d3c) +SFX_Cry19_3_Ch7: endchannel -; 0x7cd3d
\ No newline at end of file diff --git a/audio/sfx/sfx_02_2e.asm b/audio/sfx/cry1a_1.asm index d95bfbe3..5d03596e 100644 --- a/audio/sfx/sfx_02_2e.asm +++ b/audio/sfx/cry1a_1.asm @@ -1,4 +1,4 @@ -SFX_02_2e_Ch1: ; 8eff (2:4eff) +SFX_Cry1A_1_Ch4: dutycycle 240 unknownsfx0x20 6, 247, 64, 7 unknownsfx0x20 12, 230, 68, 7 @@ -9,7 +9,7 @@ SFX_02_2e_Ch1: ; 8eff (2:4eff) endchannel -SFX_02_2e_Ch2: ; 8f1a (2:4f1a) +SFX_Cry1A_1_Ch5: dutycycle 10 unknownsfx0x20 6, 199, 1, 7 unknownsfx0x20 11, 182, 2, 7 @@ -20,7 +20,7 @@ SFX_02_2e_Ch2: ; 8f1a (2:4f1a) endchannel -SFX_02_2e_Ch3: ; 8f35 (2:4f35) +SFX_Cry1A_1_Ch7: unknownnoise0x20 3, 226, 60 unknownnoise0x20 8, 214, 76 unknownnoise0x20 5, 212, 60 @@ -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_08_2e.asm b/audio/sfx/cry1a_2.asm index fea62a2f..4dcf2a42 100644 --- a/audio/sfx/sfx_08_2e.asm +++ b/audio/sfx/cry1a_2.asm @@ -1,4 +1,4 @@ -SFX_08_2e_Ch1: ; 211a7 (8:51a7) +SFX_Cry1A_2_Ch4: dutycycle 240 unknownsfx0x20 6, 247, 64, 7 unknownsfx0x20 12, 230, 68, 7 @@ -9,7 +9,7 @@ SFX_08_2e_Ch1: ; 211a7 (8:51a7) endchannel -SFX_08_2e_Ch2: ; 211c2 (8:51c2) +SFX_Cry1A_2_Ch5: dutycycle 10 unknownsfx0x20 6, 199, 1, 7 unknownsfx0x20 11, 182, 2, 7 @@ -20,7 +20,7 @@ SFX_08_2e_Ch2: ; 211c2 (8:51c2) endchannel -SFX_08_2e_Ch3: ; 211dd (8:51dd) +SFX_Cry1A_2_Ch7: unknownnoise0x20 3, 226, 60 unknownnoise0x20 8, 214, 76 unknownnoise0x20 5, 212, 60 @@ -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_1f_2e.asm b/audio/sfx/cry1a_3.asm index 2c72b5a1..274ce438 100644 --- a/audio/sfx/sfx_1f_2e.asm +++ b/audio/sfx/cry1a_3.asm @@ -1,4 +1,4 @@ -SFX_1f_2e_Ch1: ; 7cf74 (1f:4f74) +SFX_Cry1A_3_Ch4: dutycycle 240 unknownsfx0x20 6, 247, 64, 7 unknownsfx0x20 12, 230, 68, 7 @@ -9,7 +9,7 @@ SFX_1f_2e_Ch1: ; 7cf74 (1f:4f74) endchannel -SFX_1f_2e_Ch2: ; 7cf8f (1f:4f8f) +SFX_Cry1A_3_Ch5: dutycycle 10 unknownsfx0x20 6, 199, 1, 7 unknownsfx0x20 11, 182, 2, 7 @@ -20,7 +20,7 @@ SFX_1f_2e_Ch2: ; 7cf8f (1f:4f8f) endchannel -SFX_1f_2e_Ch3: ; 7cfaa (1f:4faa) +SFX_Cry1A_3_Ch7: unknownnoise0x20 3, 226, 60 unknownnoise0x20 8, 214, 76 unknownnoise0x20 5, 212, 60 @@ -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_02_2f.asm b/audio/sfx/cry1b_1.asm index 08ea2788..562239c7 100644 --- a/audio/sfx/sfx_02_2f.asm +++ b/audio/sfx/cry1b_1.asm @@ -1,4 +1,4 @@ -SFX_02_2f_Ch1: ; 8cf0 (2:4cf0) +SFX_Cry1B_1_Ch4: dutycycle 240 unknownsfx0x20 6, 247, 192, 6 unknownsfx0x20 15, 231, 0, 7 @@ -8,7 +8,7 @@ SFX_02_2f_Ch1: ; 8cf0 (2:4cf0) endchannel -SFX_02_2f_Ch2: ; 8d07 (2:4d07) +SFX_Cry1B_1_Ch5: dutycycle 10 unknownsfx0x20 7, 230, 129, 6 unknownsfx0x20 14, 213, 193, 6 @@ -18,10 +18,9 @@ SFX_02_2f_Ch2: ; 8d07 (2:4d07) endchannel -SFX_02_2f_Ch3: ; 8d1e (2:4d1e) +SFX_Cry1B_1_Ch7: unknownnoise0x20 10, 166, 60 unknownnoise0x20 14, 148, 44 unknownnoise0x20 5, 163, 60 unknownnoise0x20 8, 145, 44 endchannel -; 0x8d2b
\ No newline at end of file diff --git a/audio/sfx/sfx_08_2f.asm b/audio/sfx/cry1b_2.asm index fcfa40e0..45bb41a2 100644 --- a/audio/sfx/sfx_08_2f.asm +++ b/audio/sfx/cry1b_2.asm @@ -1,4 +1,4 @@ -SFX_08_2f_Ch1: ; 20f98 (8:4f98) +SFX_Cry1B_2_Ch4: dutycycle 240 unknownsfx0x20 6, 247, 192, 6 unknownsfx0x20 15, 231, 0, 7 @@ -8,7 +8,7 @@ SFX_08_2f_Ch1: ; 20f98 (8:4f98) endchannel -SFX_08_2f_Ch2: ; 20faf (8:4faf) +SFX_Cry1B_2_Ch5: dutycycle 10 unknownsfx0x20 7, 230, 129, 6 unknownsfx0x20 14, 213, 193, 6 @@ -18,10 +18,9 @@ SFX_08_2f_Ch2: ; 20faf (8:4faf) endchannel -SFX_08_2f_Ch3: ; 20fc6 (8:4fc6) +SFX_Cry1B_2_Ch7: unknownnoise0x20 10, 166, 60 unknownnoise0x20 14, 148, 44 unknownnoise0x20 5, 163, 60 unknownnoise0x20 8, 145, 44 endchannel -; 0x20fd3
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_2f.asm b/audio/sfx/cry1b_3.asm index 9b0bf71b..e6e31b00 100644 --- a/audio/sfx/sfx_1f_2f.asm +++ b/audio/sfx/cry1b_3.asm @@ -1,4 +1,4 @@ -SFX_1f_2f_Ch1: ; 7cd65 (1f:4d65) +SFX_Cry1B_3_Ch4: dutycycle 240 unknownsfx0x20 6, 247, 192, 6 unknownsfx0x20 15, 231, 0, 7 @@ -8,7 +8,7 @@ SFX_1f_2f_Ch1: ; 7cd65 (1f:4d65) endchannel -SFX_1f_2f_Ch2: ; 7cd7c (1f:4d7c) +SFX_Cry1B_3_Ch5: dutycycle 10 unknownsfx0x20 7, 230, 129, 6 unknownsfx0x20 14, 213, 193, 6 @@ -18,10 +18,9 @@ SFX_1f_2f_Ch2: ; 7cd7c (1f:4d7c) endchannel -SFX_1f_2f_Ch3: ; 7cd93 (1f:4d93) +SFX_Cry1B_3_Ch7: unknownnoise0x20 10, 166, 60 unknownnoise0x20 14, 148, 44 unknownnoise0x20 5, 163, 60 unknownnoise0x20 8, 145, 44 endchannel -; 0x7cda0
\ No newline at end of file diff --git a/audio/sfx/sfx_02_30.asm b/audio/sfx/cry1c_1.asm index 7131fc1a..332b7da8 100644 --- a/audio/sfx/sfx_02_30.asm +++ b/audio/sfx/cry1c_1.asm @@ -1,4 +1,4 @@ -SFX_02_30_Ch1: ; 8eb1 (2:4eb1) +SFX_Cry1C_1_Ch4: dutycycle 245 unknownsfx0x20 7, 214, 225, 7 unknownsfx0x20 6, 198, 226, 7 @@ -11,7 +11,7 @@ SFX_02_30_Ch1: ; 8eb1 (2:4eb1) endchannel -SFX_02_30_Ch2: ; 8ed4 (2:4ed4) +SFX_Cry1C_1_Ch5: dutycycle 68 unknownsfx0x20 6, 195, 201, 7 unknownsfx0x20 6, 179, 199, 7 @@ -22,11 +22,10 @@ SFX_02_30_Ch2: ; 8ed4 (2:4ed4) endchannel -SFX_02_30_Ch3: ; 8eef (2:4eef) +SFX_Cry1C_1_Ch7: unknownnoise0x20 13, 25, 124 unknownnoise0x20 13, 247, 140 unknownnoise0x20 12, 214, 124 unknownnoise0x20 8, 196, 108 unknownnoise0x20 15, 179, 92 endchannel -; 0x8eff
\ No newline at end of file diff --git a/audio/sfx/sfx_08_30.asm b/audio/sfx/cry1c_2.asm index 600b72f2..aee95be5 100644 --- a/audio/sfx/sfx_08_30.asm +++ b/audio/sfx/cry1c_2.asm @@ -1,4 +1,4 @@ -SFX_08_30_Ch1: ; 21159 (8:5159) +SFX_Cry1C_2_Ch4: dutycycle 245 unknownsfx0x20 7, 214, 225, 7 unknownsfx0x20 6, 198, 226, 7 @@ -11,7 +11,7 @@ SFX_08_30_Ch1: ; 21159 (8:5159) endchannel -SFX_08_30_Ch2: ; 2117c (8:517c) +SFX_Cry1C_2_Ch5: dutycycle 68 unknownsfx0x20 6, 195, 201, 7 unknownsfx0x20 6, 179, 199, 7 @@ -22,11 +22,10 @@ SFX_08_30_Ch2: ; 2117c (8:517c) endchannel -SFX_08_30_Ch3: ; 21197 (8:5197) +SFX_Cry1C_2_Ch7: unknownnoise0x20 13, 25, 124 unknownnoise0x20 13, 247, 140 unknownnoise0x20 12, 214, 124 unknownnoise0x20 8, 196, 108 unknownnoise0x20 15, 179, 92 endchannel -; 0x211a7
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_30.asm b/audio/sfx/cry1c_3.asm index b6833986..13e687f6 100644 --- a/audio/sfx/sfx_1f_30.asm +++ b/audio/sfx/cry1c_3.asm @@ -1,4 +1,4 @@ -SFX_1f_30_Ch1: ; 7cf26 (1f:4f26) +SFX_Cry1C_3_Ch4: dutycycle 245 unknownsfx0x20 7, 214, 225, 7 unknownsfx0x20 6, 198, 226, 7 @@ -11,7 +11,7 @@ SFX_1f_30_Ch1: ; 7cf26 (1f:4f26) endchannel -SFX_1f_30_Ch2: ; 7cf49 (1f:4f49) +SFX_Cry1C_3_Ch5: dutycycle 68 unknownsfx0x20 6, 195, 201, 7 unknownsfx0x20 6, 179, 199, 7 @@ -22,11 +22,10 @@ SFX_1f_30_Ch2: ; 7cf49 (1f:4f49) endchannel -SFX_1f_30_Ch3: ; 7cf64 (1f:4f64) +SFX_Cry1C_3_Ch7: unknownnoise0x20 13, 25, 124 unknownnoise0x20 13, 247, 140 unknownnoise0x20 12, 214, 124 unknownnoise0x20 8, 196, 108 unknownnoise0x20 15, 179, 92 endchannel -; 0x7cf74
\ No newline at end of file diff --git a/audio/sfx/sfx_02_31.asm b/audio/sfx/cry1d_1.asm index 79d09433..4e7b6308 100644 --- a/audio/sfx/sfx_02_31.asm +++ b/audio/sfx/cry1d_1.asm @@ -1,4 +1,4 @@ -SFX_02_31_Ch1: ; 8f48 (2:4f48) +SFX_Cry1D_1_Ch4: dutycycle 244 unknownsfx0x20 15, 240, 5, 7 unknownsfx0x20 10, 224, 0, 7 @@ -9,7 +9,7 @@ SFX_02_31_Ch1: ; 8f48 (2:4f48) endchannel -SFX_02_31_Ch2: ; 8f63 (2:4f63) +SFX_Cry1D_1_Ch5: dutycycle 34 unknownsfx0x20 15, 176, 195, 6 unknownsfx0x20 10, 160, 193, 6 @@ -20,11 +20,10 @@ SFX_02_31_Ch2: ; 8f63 (2:4f63) endchannel -SFX_02_31_Ch3: ; 8f7e (2:4f7e) +SFX_Cry1D_1_Ch7: unknownnoise0x20 6, 230, 76 unknownnoise0x20 15, 214, 60 unknownnoise0x20 10, 197, 74 unknownnoise0x20 1, 178, 91 unknownnoise0x20 15, 194, 76 endchannel -; 0x8f8e
\ No newline at end of file diff --git a/audio/sfx/sfx_08_31.asm b/audio/sfx/cry1d_2.asm index d43791b0..9ee56bf8 100644 --- a/audio/sfx/sfx_08_31.asm +++ b/audio/sfx/cry1d_2.asm @@ -1,4 +1,4 @@ -SFX_08_31_Ch1: ; 211f0 (8:51f0) +SFX_Cry1D_2_Ch4: dutycycle 244 unknownsfx0x20 15, 240, 5, 7 unknownsfx0x20 10, 224, 0, 7 @@ -9,7 +9,7 @@ SFX_08_31_Ch1: ; 211f0 (8:51f0) endchannel -SFX_08_31_Ch2: ; 2120b (8:520b) +SFX_Cry1D_2_Ch5: dutycycle 34 unknownsfx0x20 15, 176, 195, 6 unknownsfx0x20 10, 160, 193, 6 @@ -20,11 +20,10 @@ SFX_08_31_Ch2: ; 2120b (8:520b) endchannel -SFX_08_31_Ch3: ; 21226 (8:5226) +SFX_Cry1D_2_Ch7: unknownnoise0x20 6, 230, 76 unknownnoise0x20 15, 214, 60 unknownnoise0x20 10, 197, 74 unknownnoise0x20 1, 178, 91 unknownnoise0x20 15, 194, 76 endchannel -; 0x21236
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_31.asm b/audio/sfx/cry1d_3.asm index b67f3863..e2e5fae3 100644 --- a/audio/sfx/sfx_1f_31.asm +++ b/audio/sfx/cry1d_3.asm @@ -1,4 +1,4 @@ -SFX_1f_31_Ch1: ; 7cfbd (1f:4fbd) +SFX_Cry1D_3_Ch4: dutycycle 244 unknownsfx0x20 15, 240, 5, 7 unknownsfx0x20 10, 224, 0, 7 @@ -9,7 +9,7 @@ SFX_1f_31_Ch1: ; 7cfbd (1f:4fbd) endchannel -SFX_1f_31_Ch2: ; 7cfd8 (1f:4fd8) +SFX_Cry1D_3_Ch5: dutycycle 34 unknownsfx0x20 15, 176, 195, 6 unknownsfx0x20 10, 160, 193, 6 @@ -20,11 +20,10 @@ SFX_1f_31_Ch2: ; 7cfd8 (1f:4fd8) endchannel -SFX_1f_31_Ch3: ; 7cff3 (1f:4ff3) +SFX_Cry1D_3_Ch7: unknownnoise0x20 6, 230, 76 unknownnoise0x20 15, 214, 60 unknownnoise0x20 10, 197, 74 unknownnoise0x20 1, 178, 91 unknownnoise0x20 15, 194, 76 endchannel -; 0x7d003
\ No newline at end of file diff --git a/audio/sfx/sfx_02_32.asm b/audio/sfx/cry1e_1.asm index f2fbf611..56d97001 100644 --- a/audio/sfx/sfx_02_32.asm +++ b/audio/sfx/cry1e_1.asm @@ -1,4 +1,4 @@ -SFX_02_32_Ch1: ; 8dcf (2:4dcf) +SFX_Cry1E_1_Ch4: dutycycle 240 unknownsfx0x20 6, 242, 0, 6 unknownsfx0x20 6, 226, 64, 6 @@ -11,7 +11,7 @@ SFX_02_32_Ch1: ; 8dcf (2:4dcf) endchannel -SFX_02_32_Ch2: ; 8df2 (2:4df2) +SFX_Cry1E_1_Ch5: dutycycle 17 unknownsfx0x20 3, 8, 1, 0 unknownsfx0x20 6, 194, 193, 5 @@ -25,7 +25,7 @@ SFX_02_32_Ch2: ; 8df2 (2:4df2) endchannel -SFX_02_32_Ch3: ; 8e19 (2:4e19) +SFX_Cry1E_1_Ch7: unknownnoise0x20 6, 8, 1 unknownnoise0x20 5, 226, 92 unknownnoise0x20 5, 194, 76 @@ -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_08_32.asm b/audio/sfx/cry1e_2.asm index 886df035..7ed25afe 100644 --- a/audio/sfx/sfx_08_32.asm +++ b/audio/sfx/cry1e_2.asm @@ -1,4 +1,4 @@ -SFX_08_32_Ch1: ; 21077 (8:5077) +SFX_Cry1E_2_Ch4: dutycycle 240 unknownsfx0x20 6, 242, 0, 6 unknownsfx0x20 6, 226, 64, 6 @@ -11,7 +11,7 @@ SFX_08_32_Ch1: ; 21077 (8:5077) endchannel -SFX_08_32_Ch2: ; 2109a (8:509a) +SFX_Cry1E_2_Ch5: dutycycle 17 unknownsfx0x20 3, 8, 1, 0 unknownsfx0x20 6, 194, 193, 5 @@ -25,7 +25,7 @@ SFX_08_32_Ch2: ; 2109a (8:509a) endchannel -SFX_08_32_Ch3: ; 210c1 (8:50c1) +SFX_Cry1E_2_Ch7: unknownnoise0x20 6, 8, 1 unknownnoise0x20 5, 226, 92 unknownnoise0x20 5, 194, 76 @@ -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_1f_32.asm b/audio/sfx/cry1e_3.asm index 92bb6a6f..82dbdfcc 100644 --- a/audio/sfx/sfx_1f_32.asm +++ b/audio/sfx/cry1e_3.asm @@ -1,4 +1,4 @@ -SFX_1f_32_Ch1: ; 7ce44 (1f:4e44) +SFX_Cry1E_3_Ch4: dutycycle 240 unknownsfx0x20 6, 242, 0, 6 unknownsfx0x20 6, 226, 64, 6 @@ -11,7 +11,7 @@ SFX_1f_32_Ch1: ; 7ce44 (1f:4e44) endchannel -SFX_1f_32_Ch2: ; 7ce67 (1f:4e67) +SFX_Cry1E_3_Ch5: dutycycle 17 unknownsfx0x20 3, 8, 1, 0 unknownsfx0x20 6, 194, 193, 5 @@ -25,7 +25,7 @@ SFX_1f_32_Ch2: ; 7ce67 (1f:4e67) endchannel -SFX_1f_32_Ch3: ; 7ce8e (1f:4e8e) +SFX_Cry1E_3_Ch7: unknownnoise0x20 6, 8, 1 unknownnoise0x20 5, 226, 92 unknownnoise0x20 5, 194, 76 @@ -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_02_33.asm b/audio/sfx/cry1f_1.asm index f4387a3a..a38bd975 100644 --- a/audio/sfx/sfx_02_33.asm +++ b/audio/sfx/cry1f_1.asm @@ -1,4 +1,4 @@ -SFX_02_33_Ch1: ; 8fe7 (2:4fe7) +SFX_Cry1F_1_Ch4: dutycycle 165 unknownsfx0x20 3, 244, 65, 6 unknownsfx0x20 13, 214, 33, 7 @@ -7,7 +7,7 @@ SFX_02_33_Ch1: ; 8fe7 (2:4fe7) endchannel -SFX_02_33_Ch2: ; 8ffa (2:4ffa) +SFX_Cry1F_1_Ch5: dutycycle 204 unknownsfx0x20 4, 244, 128, 5 unknownsfx0x20 14, 230, 224, 6 @@ -16,10 +16,9 @@ SFX_02_33_Ch2: ; 8ffa (2:4ffa) endchannel -SFX_02_33_Ch3: ; 900d (2:500d) +SFX_Cry1F_1_Ch7: unknownnoise0x20 5, 196, 70 unknownnoise0x20 13, 165, 68 unknownnoise0x20 8, 196, 69 unknownnoise0x20 8, 177, 68 endchannel -; 0x901a
\ No newline at end of file diff --git a/audio/sfx/sfx_08_33.asm b/audio/sfx/cry1f_2.asm index 098dd501..3d261bb2 100644 --- a/audio/sfx/sfx_08_33.asm +++ b/audio/sfx/cry1f_2.asm @@ -1,4 +1,4 @@ -SFX_08_33_Ch1: ; 2128f (8:528f) +SFX_Cry1F_2_Ch4: dutycycle 165 unknownsfx0x20 3, 244, 65, 6 unknownsfx0x20 13, 214, 33, 7 @@ -7,7 +7,7 @@ SFX_08_33_Ch1: ; 2128f (8:528f) endchannel -SFX_08_33_Ch2: ; 212a2 (8:52a2) +SFX_Cry1F_2_Ch5: dutycycle 204 unknownsfx0x20 4, 244, 128, 5 unknownsfx0x20 14, 230, 224, 6 @@ -16,10 +16,9 @@ SFX_08_33_Ch2: ; 212a2 (8:52a2) endchannel -SFX_08_33_Ch3: ; 212b5 (8:52b5) +SFX_Cry1F_2_Ch7: unknownnoise0x20 5, 196, 70 unknownnoise0x20 13, 165, 68 unknownnoise0x20 8, 196, 69 unknownnoise0x20 8, 177, 68 endchannel -; 0x212c2
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_33.asm b/audio/sfx/cry1f_3.asm index 607635c7..2bdfe24b 100644 --- a/audio/sfx/sfx_1f_33.asm +++ b/audio/sfx/cry1f_3.asm @@ -1,4 +1,4 @@ -SFX_1f_33_Ch1: ; 7d05c (1f:505c) +SFX_Cry1F_3_Ch4: dutycycle 165 unknownsfx0x20 3, 244, 65, 6 unknownsfx0x20 13, 214, 33, 7 @@ -7,7 +7,7 @@ SFX_1f_33_Ch1: ; 7d05c (1f:505c) endchannel -SFX_1f_33_Ch2: ; 7d06f (1f:506f) +SFX_Cry1F_3_Ch5: dutycycle 204 unknownsfx0x20 4, 244, 128, 5 unknownsfx0x20 14, 230, 224, 6 @@ -16,10 +16,9 @@ SFX_1f_33_Ch2: ; 7d06f (1f:506f) endchannel -SFX_1f_33_Ch3: ; 7d082 (1f:5082) +SFX_Cry1F_3_Ch7: unknownnoise0x20 5, 196, 70 unknownnoise0x20 13, 165, 68 unknownnoise0x20 8, 196, 69 unknownnoise0x20 8, 177, 68 endchannel -; 0x7d08f
\ No newline at end of file diff --git a/audio/sfx/sfx_02_34.asm b/audio/sfx/cry20_1.asm index 4c2fa4cc..14ec6942 100644 --- a/audio/sfx/sfx_02_34.asm +++ b/audio/sfx/cry20_1.asm @@ -1,4 +1,4 @@ -SFX_02_34_Ch1: ; 901a (2:501a) +SFX_Cry20_1_Ch4: dutycycle 240 unknownsfx0x20 13, 241, 17, 5 unknownsfx0x20 13, 225, 21, 5 @@ -7,7 +7,7 @@ SFX_02_34_Ch1: ; 901a (2:501a) endchannel -SFX_02_34_Ch2: ; 902d (2:502d) +SFX_Cry20_1_Ch5: dutycycle 21 unknownsfx0x20 12, 225, 12, 5 unknownsfx0x20 12, 209, 16, 5 @@ -16,10 +16,9 @@ SFX_02_34_Ch2: ; 902d (2:502d) endchannel -SFX_02_34_Ch3: ; 9040 (2:5040) +SFX_Cry20_1_Ch7: unknownnoise0x20 14, 242, 101 unknownnoise0x20 13, 226, 85 unknownnoise0x20 14, 210, 86 unknownnoise0x20 8, 209, 102 endchannel -; 0x904d
\ No newline at end of file diff --git a/audio/sfx/sfx_08_34.asm b/audio/sfx/cry20_2.asm index f355ed72..bcbf27a6 100644 --- a/audio/sfx/sfx_08_34.asm +++ b/audio/sfx/cry20_2.asm @@ -1,4 +1,4 @@ -SFX_08_34_Ch1: ; 212c2 (8:52c2) +SFX_Cry20_2_Ch4: dutycycle 240 unknownsfx0x20 13, 241, 17, 5 unknownsfx0x20 13, 225, 21, 5 @@ -7,7 +7,7 @@ SFX_08_34_Ch1: ; 212c2 (8:52c2) endchannel -SFX_08_34_Ch2: ; 212d5 (8:52d5) +SFX_Cry20_2_Ch5: dutycycle 21 unknownsfx0x20 12, 225, 12, 5 unknownsfx0x20 12, 209, 16, 5 @@ -16,10 +16,9 @@ SFX_08_34_Ch2: ; 212d5 (8:52d5) endchannel -SFX_08_34_Ch3: ; 212e8 (8:52e8) +SFX_Cry20_2_Ch7: unknownnoise0x20 14, 242, 101 unknownnoise0x20 13, 226, 85 unknownnoise0x20 14, 210, 86 unknownnoise0x20 8, 209, 102 endchannel -; 0x212f5
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_34.asm b/audio/sfx/cry20_3.asm index 59a5bd3a..12e42d7f 100644 --- a/audio/sfx/sfx_1f_34.asm +++ b/audio/sfx/cry20_3.asm @@ -1,4 +1,4 @@ -SFX_1f_34_Ch1: ; 7d08f (1f:508f) +SFX_Cry20_3_Ch4: dutycycle 240 unknownsfx0x20 13, 241, 17, 5 unknownsfx0x20 13, 225, 21, 5 @@ -7,7 +7,7 @@ SFX_1f_34_Ch1: ; 7d08f (1f:508f) endchannel -SFX_1f_34_Ch2: ; 7d0a2 (1f:50a2) +SFX_Cry20_3_Ch5: dutycycle 21 unknownsfx0x20 12, 225, 12, 5 unknownsfx0x20 12, 209, 16, 5 @@ -16,10 +16,9 @@ SFX_1f_34_Ch2: ; 7d0a2 (1f:50a2) endchannel -SFX_1f_34_Ch3: ; 7d0b5 (1f:50b5) +SFX_Cry20_3_Ch7: unknownnoise0x20 14, 242, 101 unknownnoise0x20 13, 226, 85 unknownnoise0x20 14, 210, 86 unknownnoise0x20 8, 209, 102 endchannel -; 0x7d0c2
\ No newline at end of file diff --git a/audio/sfx/sfx_02_35.asm b/audio/sfx/cry21_1.asm index 33685f61..c08704d7 100644 --- a/audio/sfx/sfx_02_35.asm +++ b/audio/sfx/cry21_1.asm @@ -1,4 +1,4 @@ -SFX_02_35_Ch1: ; 904d (2:504d) +SFX_Cry21_1_Ch4: dutycycle 27 unknownsfx0x20 3, 243, 100, 5 unknownsfx0x20 2, 226, 68, 5 @@ -11,7 +11,7 @@ SFX_02_35_Ch1: ; 904d (2:504d) endchannel -SFX_02_35_Ch2: ; 9070 (2:5070) +SFX_Cry21_1_Ch5: dutycycle 204 unknownsfx0x20 3, 211, 96, 5 unknownsfx0x20 2, 194, 64, 5 @@ -23,6 +23,5 @@ SFX_02_35_Ch2: ; 9070 (2:5070) unknownsfx0x20 8, 193, 0, 5 -SFX_02_35_Ch3: ; 9092 (2:5092) +SFX_Cry21_1_Ch7: endchannel -; 0x9093
\ No newline at end of file diff --git a/audio/sfx/sfx_08_35.asm b/audio/sfx/cry21_2.asm index d55d627c..b8f68dbd 100644 --- a/audio/sfx/sfx_08_35.asm +++ b/audio/sfx/cry21_2.asm @@ -1,4 +1,4 @@ -SFX_08_35_Ch1: ; 212f5 (8:52f5) +SFX_Cry21_2_Ch4: dutycycle 27 unknownsfx0x20 3, 243, 100, 5 unknownsfx0x20 2, 226, 68, 5 @@ -11,7 +11,7 @@ SFX_08_35_Ch1: ; 212f5 (8:52f5) endchannel -SFX_08_35_Ch2: ; 21318 (8:5318) +SFX_Cry21_2_Ch5: dutycycle 204 unknownsfx0x20 3, 211, 96, 5 unknownsfx0x20 2, 194, 64, 5 @@ -23,6 +23,5 @@ SFX_08_35_Ch2: ; 21318 (8:5318) unknownsfx0x20 8, 193, 0, 5 -SFX_08_35_Ch3: ; 2133a (8:533a) +SFX_Cry21_2_Ch7: endchannel -; 0x2133b
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_35.asm b/audio/sfx/cry21_3.asm index 10d4c3a2..4a549af9 100644 --- a/audio/sfx/sfx_1f_35.asm +++ b/audio/sfx/cry21_3.asm @@ -1,4 +1,4 @@ -SFX_1f_35_Ch1: ; 7d0c2 (1f:50c2) +SFX_Cry21_3_Ch4: dutycycle 27 unknownsfx0x20 3, 243, 100, 5 unknownsfx0x20 2, 226, 68, 5 @@ -11,7 +11,7 @@ SFX_1f_35_Ch1: ; 7d0c2 (1f:50c2) endchannel -SFX_1f_35_Ch2: ; 7d0e5 (1f:50e5) +SFX_Cry21_3_Ch5: dutycycle 204 unknownsfx0x20 3, 211, 96, 5 unknownsfx0x20 2, 194, 64, 5 @@ -23,6 +23,5 @@ SFX_1f_35_Ch2: ; 7d0e5 (1f:50e5) unknownsfx0x20 8, 193, 0, 5 -SFX_1f_35_Ch3: ; 7d107 (1f:5107) +SFX_Cry21_3_Ch7: endchannel -; 0x7d108
\ No newline at end of file diff --git a/audio/sfx/sfx_02_36.asm b/audio/sfx/cry22_1.asm index e648e3dd..0da8dbd2 100644 --- a/audio/sfx/sfx_02_36.asm +++ b/audio/sfx/cry22_1.asm @@ -1,4 +1,4 @@ -SFX_02_36_Ch1: ; 9093 (2:5093) +SFX_Cry22_1_Ch4: dutycycle 17 unknownsfx0x20 2, 61, 129, 3 unknownsfx0x20 7, 245, 1, 6 @@ -7,7 +7,7 @@ SFX_02_36_Ch1: ; 9093 (2:5093) endchannel -SFX_02_36_Ch2: ; 90a6 (2:50a6) +SFX_Cry22_1_Ch5: dutycycle 238 unknownsfx0x20 2, 62, 176, 5 unknownsfx0x20 7, 213, 93, 7 @@ -16,10 +16,9 @@ SFX_02_36_Ch2: ; 90a6 (2:50a6) endchannel -SFX_02_36_Ch3: ; 90b9 (2:50b9) +SFX_Cry22_1_Ch7: unknownnoise0x20 2, 146, 73 unknownnoise0x20 7, 181, 41 unknownnoise0x20 1, 162, 57 unknownnoise0x20 8, 145, 73 endchannel -; 0x90c6
\ No newline at end of file diff --git a/audio/sfx/sfx_08_36.asm b/audio/sfx/cry22_2.asm index f51a37a0..d7456dbc 100644 --- a/audio/sfx/sfx_08_36.asm +++ b/audio/sfx/cry22_2.asm @@ -1,4 +1,4 @@ -SFX_08_36_Ch1: ; 2133b (8:533b) +SFX_Cry22_2_Ch4: dutycycle 17 unknownsfx0x20 2, 61, 129, 3 unknownsfx0x20 7, 245, 1, 6 @@ -7,7 +7,7 @@ SFX_08_36_Ch1: ; 2133b (8:533b) endchannel -SFX_08_36_Ch2: ; 2134e (8:534e) +SFX_Cry22_2_Ch5: dutycycle 238 unknownsfx0x20 2, 62, 176, 5 unknownsfx0x20 7, 213, 93, 7 @@ -16,10 +16,9 @@ SFX_08_36_Ch2: ; 2134e (8:534e) endchannel -SFX_08_36_Ch3: ; 21361 (8:5361) +SFX_Cry22_2_Ch7: unknownnoise0x20 2, 146, 73 unknownnoise0x20 7, 181, 41 unknownnoise0x20 1, 162, 57 unknownnoise0x20 8, 145, 73 endchannel -; 0x2136e
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_36.asm b/audio/sfx/cry22_3.asm index 376b5f3a..927c174c 100644 --- a/audio/sfx/sfx_1f_36.asm +++ b/audio/sfx/cry22_3.asm @@ -1,4 +1,4 @@ -SFX_1f_36_Ch1: ; 7d108 (1f:5108) +SFX_Cry22_3_Ch4: dutycycle 17 unknownsfx0x20 2, 61, 129, 3 unknownsfx0x20 7, 245, 1, 6 @@ -7,7 +7,7 @@ SFX_1f_36_Ch1: ; 7d108 (1f:5108) endchannel -SFX_1f_36_Ch2: ; 7d11b (1f:511b) +SFX_Cry22_3_Ch5: dutycycle 238 unknownsfx0x20 2, 62, 176, 5 unknownsfx0x20 7, 213, 93, 7 @@ -16,10 +16,9 @@ SFX_1f_36_Ch2: ; 7d11b (1f:511b) endchannel -SFX_1f_36_Ch3: ; 7d12e (1f:512e) +SFX_Cry22_3_Ch7: unknownnoise0x20 2, 146, 73 unknownnoise0x20 7, 181, 41 unknownnoise0x20 1, 162, 57 unknownnoise0x20 8, 145, 73 endchannel -; 0x7d13b
\ No newline at end of file diff --git a/audio/sfx/sfx_02_37.asm b/audio/sfx/cry23_1.asm index 0fc80e1a..cc0587d7 100644 --- a/audio/sfx/sfx_02_37.asm +++ b/audio/sfx/cry23_1.asm @@ -1,4 +1,4 @@ -SFX_02_37_Ch1: ; 8786 (2:4786) +SFX_Cry23_1_Ch4: dutycycle 240 unknownsfx0x20 15, 247, 192, 7 unknownsfx0x20 6, 228, 193, 7 @@ -8,7 +8,7 @@ SFX_02_37_Ch1: ; 8786 (2:4786) endchannel -SFX_02_37_Ch2: ; 879d (2:479d) +SFX_Cry23_1_Ch5: dutycycle 95 unknownsfx0x20 15, 151, 129, 7 unknownsfx0x20 6, 132, 128, 7 @@ -17,10 +17,9 @@ SFX_02_37_Ch2: ; 879d (2:479d) endchannel -SFX_02_37_Ch3: ; 87b0 (2:47b0) +SFX_Cry23_1_Ch7: unknownnoise0x20 3, 242, 60 unknownnoise0x20 13, 230, 44 unknownnoise0x20 15, 215, 60 unknownnoise0x20 8, 193, 44 endchannel -; 0x87bd
\ No newline at end of file diff --git a/audio/sfx/sfx_08_37.asm b/audio/sfx/cry23_2.asm index 813c4504..5d130aa5 100644 --- a/audio/sfx/sfx_08_37.asm +++ b/audio/sfx/cry23_2.asm @@ -1,4 +1,4 @@ -SFX_08_37_Ch1: ; 20a2e (8:4a2e) +SFX_Cry23_2_Ch4: dutycycle 240 unknownsfx0x20 15, 247, 192, 7 unknownsfx0x20 6, 228, 193, 7 @@ -8,7 +8,7 @@ SFX_08_37_Ch1: ; 20a2e (8:4a2e) endchannel -SFX_08_37_Ch2: ; 20a45 (8:4a45) +SFX_Cry23_2_Ch5: dutycycle 95 unknownsfx0x20 15, 151, 129, 7 unknownsfx0x20 6, 132, 128, 7 @@ -17,10 +17,9 @@ SFX_08_37_Ch2: ; 20a45 (8:4a45) endchannel -SFX_08_37_Ch3: ; 20a58 (8:4a58) +SFX_Cry23_2_Ch7: unknownnoise0x20 3, 242, 60 unknownnoise0x20 13, 230, 44 unknownnoise0x20 15, 215, 60 unknownnoise0x20 8, 193, 44 endchannel -; 0x20a65
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_37.asm b/audio/sfx/cry23_3.asm index 41698fd9..8ada0c63 100644 --- a/audio/sfx/sfx_1f_37.asm +++ b/audio/sfx/cry23_3.asm @@ -1,4 +1,4 @@ -SFX_1f_37_Ch1: ; 7c7fb (1f:47fb) +SFX_Cry23_3_Ch4: dutycycle 240 unknownsfx0x20 15, 247, 192, 7 unknownsfx0x20 6, 228, 193, 7 @@ -8,7 +8,7 @@ SFX_1f_37_Ch1: ; 7c7fb (1f:47fb) endchannel -SFX_1f_37_Ch2: ; 7c812 (1f:4812) +SFX_Cry23_3_Ch5: dutycycle 95 unknownsfx0x20 15, 151, 129, 7 unknownsfx0x20 6, 132, 128, 7 @@ -17,10 +17,9 @@ SFX_1f_37_Ch2: ; 7c812 (1f:4812) endchannel -SFX_1f_37_Ch3: ; 7c825 (1f:4825) +SFX_Cry23_3_Ch7: unknownnoise0x20 3, 242, 60 unknownnoise0x20 13, 230, 44 unknownnoise0x20 15, 215, 60 unknownnoise0x20 8, 193, 44 endchannel -; 0x7c832
\ No newline at end of file diff --git a/audio/sfx/sfx_02_38.asm b/audio/sfx/cry24_1.asm index 2c982a3d..f79dc72c 100644 --- a/audio/sfx/sfx_02_38.asm +++ b/audio/sfx/cry24_1.asm @@ -1,4 +1,4 @@ -SFX_02_38_Ch1: ; 87bd (2:47bd) +SFX_Cry24_1_Ch4: dutycycle 240 unknownsfx0x20 15, 247, 128, 6 unknownsfx0x20 10, 230, 132, 6 @@ -11,7 +11,7 @@ SFX_02_38_Ch1: ; 87bd (2:47bd) endchannel -SFX_02_38_Ch2: ; 87e0 (2:47e0) +SFX_Cry24_1_Ch5: dutycycle 5 unknownsfx0x20 15, 183, 65, 6 unknownsfx0x20 10, 150, 66, 6 @@ -24,11 +24,10 @@ SFX_02_38_Ch2: ; 87e0 (2:47e0) endchannel -SFX_02_38_Ch3: ; 8803 (2:4803) +SFX_Cry24_1_Ch7: unknownnoise0x20 15, 228, 60 unknownnoise0x20 10, 199, 76 unknownnoise0x20 10, 199, 60 unknownnoise0x20 12, 183, 76 unknownnoise0x20 15, 162, 92 endchannel -; 0x8813
\ No newline at end of file diff --git a/audio/sfx/sfx_08_38.asm b/audio/sfx/cry24_2.asm index b162539e..aede2b95 100644 --- a/audio/sfx/sfx_08_38.asm +++ b/audio/sfx/cry24_2.asm @@ -1,4 +1,4 @@ -SFX_08_38_Ch1: ; 20a65 (8:4a65) +SFX_Cry24_2_Ch4: dutycycle 240 unknownsfx0x20 15, 247, 128, 6 unknownsfx0x20 10, 230, 132, 6 @@ -11,7 +11,7 @@ SFX_08_38_Ch1: ; 20a65 (8:4a65) endchannel -SFX_08_38_Ch2: ; 20a88 (8:4a88) +SFX_Cry24_2_Ch5: dutycycle 5 unknownsfx0x20 15, 183, 65, 6 unknownsfx0x20 10, 150, 66, 6 @@ -24,11 +24,10 @@ SFX_08_38_Ch2: ; 20a88 (8:4a88) endchannel -SFX_08_38_Ch3: ; 20aab (8:4aab) +SFX_Cry24_2_Ch7: unknownnoise0x20 15, 228, 60 unknownnoise0x20 10, 199, 76 unknownnoise0x20 10, 199, 60 unknownnoise0x20 12, 183, 76 unknownnoise0x20 15, 162, 92 endchannel -; 0x20abb
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_38.asm b/audio/sfx/cry24_3.asm index 885eee1f..cad3ada1 100644 --- a/audio/sfx/sfx_1f_38.asm +++ b/audio/sfx/cry24_3.asm @@ -1,4 +1,4 @@ -SFX_1f_38_Ch1: ; 7c832 (1f:4832) +SFX_Cry24_3_Ch4: dutycycle 240 unknownsfx0x20 15, 247, 128, 6 unknownsfx0x20 10, 230, 132, 6 @@ -11,7 +11,7 @@ SFX_1f_38_Ch1: ; 7c832 (1f:4832) endchannel -SFX_1f_38_Ch2: ; 7c855 (1f:4855) +SFX_Cry24_3_Ch5: dutycycle 5 unknownsfx0x20 15, 183, 65, 6 unknownsfx0x20 10, 150, 66, 6 @@ -24,11 +24,10 @@ SFX_1f_38_Ch2: ; 7c855 (1f:4855) endchannel -SFX_1f_38_Ch3: ; 7c878 (1f:4878) +SFX_Cry24_3_Ch7: unknownnoise0x20 15, 228, 60 unknownnoise0x20 10, 199, 76 unknownnoise0x20 10, 199, 60 unknownnoise0x20 12, 183, 76 unknownnoise0x20 15, 162, 92 endchannel -; 0x7c888
\ No newline at end of file diff --git a/audio/sfx/sfx_02_39.asm b/audio/sfx/cry25_1.asm index 5aa9b436..f3ae46ae 100644 --- a/audio/sfx/sfx_02_39.asm +++ b/audio/sfx/cry25_1.asm @@ -1,4 +1,4 @@ -SFX_02_39_Ch1: ; 886b (2:486b) +SFX_Cry25_1_Ch4: dutycycle 165 unknownsfx0x20 6, 244, 64, 7 unknownsfx0x20 15, 227, 48, 7 @@ -8,7 +8,7 @@ SFX_02_39_Ch1: ; 886b (2:486b) endchannel -SFX_02_39_Ch2: ; 8882 (2:4882) +SFX_Cry25_1_Ch5: dutycycle 119 unknownsfx0x20 6, 195, 18, 7 unknownsfx0x20 15, 179, 4, 7 @@ -18,10 +18,9 @@ SFX_02_39_Ch2: ; 8882 (2:4882) endchannel -SFX_02_39_Ch3: ; 8899 (2:4899) +SFX_Cry25_1_Ch7: unknownnoise0x20 8, 214, 44 unknownnoise0x20 12, 198, 60 unknownnoise0x20 10, 182, 44 unknownnoise0x20 8, 145, 28 endchannel -; 0x88a6
\ No newline at end of file diff --git a/audio/sfx/sfx_08_39.asm b/audio/sfx/cry25_2.asm index ecce76f2..9b976b4e 100644 --- a/audio/sfx/sfx_08_39.asm +++ b/audio/sfx/cry25_2.asm @@ -1,4 +1,4 @@ -SFX_08_39_Ch1: ; 20b13 (8:4b13) +SFX_Cry25_2_Ch4: dutycycle 165 unknownsfx0x20 6, 244, 64, 7 unknownsfx0x20 15, 227, 48, 7 @@ -8,7 +8,7 @@ SFX_08_39_Ch1: ; 20b13 (8:4b13) endchannel -SFX_08_39_Ch2: ; 20b2a (8:4b2a) +SFX_Cry25_2_Ch5: dutycycle 119 unknownsfx0x20 6, 195, 18, 7 unknownsfx0x20 15, 179, 4, 7 @@ -18,10 +18,9 @@ SFX_08_39_Ch2: ; 20b2a (8:4b2a) endchannel -SFX_08_39_Ch3: ; 20b41 (8:4b41) +SFX_Cry25_2_Ch7: unknownnoise0x20 8, 214, 44 unknownnoise0x20 12, 198, 60 unknownnoise0x20 10, 182, 44 unknownnoise0x20 8, 145, 28 endchannel -; 0x20b4e
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_39.asm b/audio/sfx/cry25_3.asm index d29da9aa..e76feb9e 100644 --- a/audio/sfx/sfx_1f_39.asm +++ b/audio/sfx/cry25_3.asm @@ -1,4 +1,4 @@ -SFX_1f_39_Ch1: ; 7c8e0 (1f:48e0) +SFX_Cry25_3_Ch4: dutycycle 165 unknownsfx0x20 6, 244, 64, 7 unknownsfx0x20 15, 227, 48, 7 @@ -8,7 +8,7 @@ SFX_1f_39_Ch1: ; 7c8e0 (1f:48e0) endchannel -SFX_1f_39_Ch2: ; 7c8f7 (1f:48f7) +SFX_Cry25_3_Ch5: dutycycle 119 unknownsfx0x20 6, 195, 18, 7 unknownsfx0x20 15, 179, 4, 7 @@ -18,10 +18,9 @@ SFX_1f_39_Ch2: ; 7c8f7 (1f:48f7) endchannel -SFX_1f_39_Ch3: ; 7c90e (1f:490e) +SFX_Cry25_3_Ch7: unknownnoise0x20 8, 214, 44 unknownnoise0x20 12, 198, 60 unknownnoise0x20 10, 182, 44 unknownnoise0x20 8, 145, 28 endchannel -; 0x7c91b
\ No newline at end of file diff --git a/audio/sfx/sfx_02_56.asm b/audio/sfx/cut_1.asm index 5dfab306..73510fd7 100644 --- a/audio/sfx/sfx_02_56.asm +++ b/audio/sfx/cut_1.asm @@ -1,8 +1,7 @@ -SFX_02_56_Ch1: ; 83e1 (2:43e1) +SFX_Cut_1_Ch7: unknownnoise0x20 2, 247, 36 unknownnoise0x20 2, 247, 52 unknownnoise0x20 4, 247, 68 unknownnoise0x20 8, 244, 85 unknownnoise0x20 8, 241, 68 endchannel -; 0x83f1
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_56.asm b/audio/sfx/cut_3.asm index 77624440..6e7d8951 100644 --- a/audio/sfx/sfx_1f_56.asm +++ b/audio/sfx/cut_3.asm @@ -1,8 +1,7 @@ -SFX_1f_56_Ch1: ; 7c3ca (1f:43ca) +SFX_Cut_3_Ch7: unknownnoise0x20 2, 247, 36 unknownnoise0x20 2, 247, 52 unknownnoise0x20 4, 247, 68 unknownnoise0x20 8, 244, 85 unknownnoise0x20 8, 241, 68 endchannel -; 0x7c3da
\ No newline at end of file diff --git a/audio/sfx/sfx_02_0c.asm b/audio/sfx/cymbal1_1.asm index 98c4ef19..35cae4df 100644 --- a/audio/sfx/sfx_02_0c.asm +++ b/audio/sfx/cymbal1_1.asm @@ -1,4 +1,3 @@ -SFX_02_0c_Ch1: ; 833b (2:433b) +SFX_Cymbal1_1_Ch7: unknownnoise0x20 0, 161, 16 endchannel -; 0x833f
\ No newline at end of file diff --git a/audio/sfx/sfx_08_0c.asm b/audio/sfx/cymbal1_2.asm index 8a87cf9a..bffe7690 100644 --- a/audio/sfx/sfx_08_0c.asm +++ b/audio/sfx/cymbal1_2.asm @@ -1,4 +1,3 @@ -SFX_08_0c_Ch1: ; 2033b (8:433b) +SFX_Cymbal1_2_Ch7: unknownnoise0x20 0, 161, 16 endchannel -; 0x2033f
\ No newline at end of file diff --git a/audio/sfx/cymbal1_3.asm b/audio/sfx/cymbal1_3.asm new file mode 100644 index 00000000..0f03f455 --- /dev/null +++ b/audio/sfx/cymbal1_3.asm @@ -0,0 +1,3 @@ +SFX_Cymbal1_3_Ch7: + unknownnoise0x20 0, 161, 16 + endchannel diff --git a/audio/sfx/sfx_02_0d.asm b/audio/sfx/cymbal2_1.asm index dfa8e738..ce19bb6b 100644 --- a/audio/sfx/sfx_02_0d.asm +++ b/audio/sfx/cymbal2_1.asm @@ -1,4 +1,3 @@ -SFX_02_0d_Ch1: ; 833f (2:433f) +SFX_Cymbal2_1_Ch7: unknownnoise0x20 0, 162, 17 endchannel -; 0x8343
\ No newline at end of file diff --git a/audio/sfx/sfx_08_0d.asm b/audio/sfx/cymbal2_2.asm index d5997986..f45dec5b 100644 --- a/audio/sfx/sfx_08_0d.asm +++ b/audio/sfx/cymbal2_2.asm @@ -1,4 +1,3 @@ -SFX_08_0d_Ch1: ; 2033f (8:433f) +SFX_Cymbal2_2_Ch7: unknownnoise0x20 0, 162, 17 endchannel -; 0x20343
\ No newline at end of file diff --git a/audio/sfx/cymbal2_3.asm b/audio/sfx/cymbal2_3.asm new file mode 100644 index 00000000..2d2ebf1c --- /dev/null +++ b/audio/sfx/cymbal2_3.asm @@ -0,0 +1,3 @@ +SFX_Cymbal2_3_Ch7: + unknownnoise0x20 0, 162, 17 + endchannel diff --git a/audio/sfx/sfx_02_0e.asm b/audio/sfx/cymbal3_1.asm index 52b0dd4d..98f3977d 100644 --- a/audio/sfx/sfx_02_0e.asm +++ b/audio/sfx/cymbal3_1.asm @@ -1,4 +1,3 @@ -SFX_02_0e_Ch1: ; 8343 (2:4343) +SFX_Cymbal3_1_Ch7: unknownnoise0x20 0, 162, 80 endchannel -; 0x8347
\ No newline at end of file diff --git a/audio/sfx/sfx_08_0e.asm b/audio/sfx/cymbal3_2.asm index f98ceb2e..2a2cb997 100644 --- a/audio/sfx/sfx_08_0e.asm +++ b/audio/sfx/cymbal3_2.asm @@ -1,4 +1,3 @@ -SFX_08_0e_Ch1: ; 20343 (8:4343) +SFX_Cymbal3_2_Ch7: unknownnoise0x20 0, 162, 80 endchannel -; 0x20347
\ No newline at end of file diff --git a/audio/sfx/cymbal3_3.asm b/audio/sfx/cymbal3_3.asm new file mode 100644 index 00000000..60b96278 --- /dev/null +++ b/audio/sfx/cymbal3_3.asm @@ -0,0 +1,3 @@ +SFX_Cymbal3_3_Ch7: + unknownnoise0x20 0, 162, 80 + endchannel diff --git a/audio/sfx/sfx_08_50.asm b/audio/sfx/damage.asm index 176da9c1..452fd5ed 100644 --- a/audio/sfx/sfx_08_50.asm +++ b/audio/sfx/damage.asm @@ -1,6 +1,5 @@ -SFX_08_50_Ch1: ; 204f4 (8:44f4) +SFX_Damage_Ch7: unknownnoise0x20 2, 244, 68 unknownnoise0x20 2, 244, 20 unknownnoise0x20 15, 241, 50 endchannel -; 0x204fe
\ No newline at end of file diff --git a/audio/sfx/sfx_02_51.asm b/audio/sfx/denied_1.asm index 956fb558..e7d5a8ca 100644 --- a/audio/sfx/sfx_02_51.asm +++ b/audio/sfx/denied_1.asm @@ -1,4 +1,4 @@ -SFX_02_51_Ch1: ; 861f (2:461f) +SFX_Denied_1_Ch4: duty 3 unknownsfx0x10 90 unknownsfx0x20 4, 240, 0, 5 @@ -9,11 +9,10 @@ SFX_02_51_Ch1: ; 861f (2:461f) endchannel -SFX_02_51_Ch2: ; 8636 (2:4636) +SFX_Denied_1_Ch5: duty 3 unknownsfx0x20 4, 240, 1, 4 unknownsfx0x20 4, 0, 0, 0 unknownsfx0x20 15, 240, 1, 4 unknownsfx0x20 1, 0, 0, 0 endchannel -; 0x8649
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_51.asm b/audio/sfx/denied_3.asm index 4df2d1d8..cf3b2a20 100644 --- a/audio/sfx/sfx_1f_51.asm +++ b/audio/sfx/denied_3.asm @@ -1,4 +1,4 @@ -SFX_1f_51_Ch1: ; 7c5fc (1f:45fc) +SFX_Denied_3_Ch4: duty 3 unknownsfx0x10 90 unknownsfx0x20 4, 240, 0, 5 @@ -9,11 +9,10 @@ SFX_1f_51_Ch1: ; 7c5fc (1f:45fc) endchannel -SFX_1f_51_Ch2: ; 7c613 (1f:4613) +SFX_Denied_3_Ch5: duty 3 unknownsfx0x20 4, 240, 1, 4 unknownsfx0x20 4, 0, 0, 0 unknownsfx0x20 15, 240, 1, 4 unknownsfx0x20 1, 0, 0, 0 endchannel -; 0x7c626
\ No newline at end of file diff --git a/audio/sfx/sfx_08_45.asm b/audio/sfx/dex_page_added.asm index 5b22cbcc..08180071 100644 --- a/audio/sfx/sfx_08_45.asm +++ b/audio/sfx/dex_page_added.asm @@ -1,4 +1,4 @@ -SFX_08_45_Ch1: ; 2047f (8:447f) +SFX_Dex_Page_Added_Ch4: duty 2 unknownsfx0x10 68 unknownsfx0x20 15, 240, 240, 4 @@ -8,9 +8,8 @@ SFX_08_45_Ch1: ; 2047f (8:447f) endchannel -SFX_08_45_Ch2: ; 20490 (8:4490) +SFX_Dex_Page_Added_Ch5: duty 2 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_5d.asm b/audio/sfx/doubleslap.asm index 2b54b1b9..4e71ac36 100644 --- a/audio/sfx/sfx_08_5d.asm +++ b/audio/sfx/doubleslap.asm @@ -1,5 +1,4 @@ -SFX_08_5d_Ch1: ; 2058c (8:458c) +SFX_Doubleslap_Ch7: unknownnoise0x20 8, 241, 50 unknownnoise0x20 8, 241, 51 endchannel -; 0x20593
\ No newline at end of file diff --git a/audio/sfx/sfx_02_47.asm b/audio/sfx/enter_pc_1.asm index afcd01eb..338c32ab 100644 --- a/audio/sfx/sfx_02_47.asm +++ b/audio/sfx/enter_pc_1.asm @@ -1,8 +1,7 @@ -SFX_02_47_Ch1: ; 853b (2:453b) +SFX_Enter_PC_1_Ch4: duty 2 unknownsfx0x20 6, 240, 0, 7 unknownsfx0x20 4, 0, 0, 0 unknownsfx0x20 6, 240, 0, 7 unknownsfx0x20 1, 0, 0, 0 endchannel -; 0x854e
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_47.asm b/audio/sfx/enter_pc_3.asm index f56c49b7..f34ed9d0 100644 --- a/audio/sfx/sfx_1f_47.asm +++ b/audio/sfx/enter_pc_3.asm @@ -1,8 +1,7 @@ -SFX_1f_47_Ch1: ; 7c518 (1f:4518) +SFX_Enter_PC_3_Ch4: duty 2 unknownsfx0x20 4, 240, 0, 7 unknownsfx0x20 4, 0, 0, 0 unknownsfx0x20 4, 240, 0, 7 unknownsfx0x20 1, 0, 0, 0 endchannel -; 0x7c52b
\ No newline at end of file diff --git a/audio/sfx/sfx_08_48.asm b/audio/sfx/faint_fall.asm index ace8ada4..cd403485 100644 --- a/audio/sfx/sfx_08_48.asm +++ b/audio/sfx/faint_fall.asm @@ -1,7 +1,6 @@ -SFX_08_48_Ch1: ; 204ae (8:44ae) +SFX_Faint_Fall_Ch4: duty 1 unknownsfx0x10 175 unknownsfx0x20 15, 242, 128, 7 unknownsfx0x10 8 endchannel -; 0x204b9
\ No newline at end of file diff --git a/audio/sfx/sfx_08_43.asm b/audio/sfx/faint_thud.asm index 53b1676d..479efab3 100644 --- a/audio/sfx/sfx_08_43.asm +++ b/audio/sfx/faint_thud.asm @@ -1,12 +1,11 @@ -SFX_08_43_Ch1: ; 2044c (8:444c) +SFX_Faint_Thud_Ch4: unknownsfx0x20 15, 209, 0, 2 unknownsfx0x10 8 endchannel -SFX_08_43_Ch2: ; 20453 (8:4453) +SFX_Faint_Thud_Ch7: unknownnoise0x20 4, 245, 51 unknownnoise0x20 8, 244, 34 unknownnoise0x20 15, 242, 33 endchannel -; 0x2045d
\ No newline at end of file diff --git a/audio/sfx/sfx_02_50.asm b/audio/sfx/fly_1.asm index 023b255f..ededef48 100644 --- a/audio/sfx/sfx_02_50.asm +++ b/audio/sfx/fly_1.asm @@ -1,4 +1,4 @@ -SFX_02_50_Ch1: ; 85ee (2:45ee) +SFX_Fly_1_Ch7: unknownnoise0x20 2, 241, 18 unknownnoise0x20 2, 0, 0 unknownnoise0x20 2, 161, 18 @@ -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_1f_50.asm b/audio/sfx/fly_3.asm index fba01b43..084c8b4c 100644 --- a/audio/sfx/sfx_1f_50.asm +++ b/audio/sfx/fly_3.asm @@ -1,4 +1,4 @@ -SFX_1f_50_Ch1: ; 7c5cb (1f:45cb) +SFX_Fly_3_Ch7: unknownnoise0x20 2, 241, 18 unknownnoise0x20 2, 0, 0 unknownnoise0x20 2, 161, 18 @@ -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_02_3a.asm b/audio/sfx/get_item1_1.asm index 1844b2ab..2cf5e8c9 100644 --- a/audio/sfx/sfx_02_3a.asm +++ b/audio/sfx/get_item1_1.asm @@ -1,4 +1,4 @@ -SFX_02_3a_Ch1: ; ad77 (2:6d77) +SFX_Get_Item1_1_Ch4: executemusic tempo 256 volume 7, 7 @@ -16,7 +16,7 @@ SFX_02_3a_Ch1: ; ad77 (2:6d77) endchannel -SFX_02_3a_Ch2: ; ad8e (2:6d8e) +SFX_Get_Item1_1_Ch5: executemusic vibrato 8, 2, 7 duty 2 @@ -30,7 +30,7 @@ SFX_02_3a_Ch2: ; ad8e (2:6d8e) endchannel -SFX_02_3a_Ch3: ; ad9e (2:6d9e) +SFX_Get_Item1_1_Ch6: executemusic notetype 4, 1, 0 octave 4 @@ -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_1f_3a.asm b/audio/sfx/get_item1_3.asm index 1d92127e..6c4c01b5 100644 --- a/audio/sfx/sfx_1f_3a.asm +++ b/audio/sfx/get_item1_3.asm @@ -1,4 +1,4 @@ -SFX_1f_3a_Ch1: ; 7e850 (1f:6850) +SFX_Get_Item1_3_Ch4: executemusic tempo 256 volume 7, 7 @@ -16,7 +16,7 @@ SFX_1f_3a_Ch1: ; 7e850 (1f:6850) endchannel -SFX_1f_3a_Ch2: ; 7e867 (1f:6867) +SFX_Get_Item1_3_Ch5: executemusic vibrato 8, 2, 7 duty 2 @@ -30,7 +30,7 @@ SFX_1f_3a_Ch2: ; 7e867 (1f:6867) endchannel -SFX_1f_3a_Ch3: ; 7e877 (1f:6877) +SFX_Get_Item1_3_Ch6: executemusic notetype 4, 1, 0 octave 4 @@ -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_02_3b.asm b/audio/sfx/get_item2_1.asm index 9c59d670..01e66269 100644 --- a/audio/sfx/sfx_02_3b.asm +++ b/audio/sfx/get_item2_1.asm @@ -1,4 +1,4 @@ -SFX_02_3b_Ch1: ; b316 (2:7316) +SFX_Get_Item2_1_Ch4: executemusic tempo 256 volume 7, 7 @@ -25,7 +25,7 @@ SFX_02_3b_Ch1: ; b316 (2:7316) endchannel -SFX_02_3b_Ch2: ; b335 (2:7335) +SFX_Get_Item2_1_Ch5: executemusic vibrato 8, 2, 7 duty 2 @@ -46,7 +46,7 @@ SFX_02_3b_Ch2: ; b335 (2:7335) endchannel -SFX_02_3b_Ch3: ; b34d (2:734d) +SFX_Get_Item2_1_Ch6: executemusic notetype 5, 1, 0 octave 5 @@ -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_08_3b.asm b/audio/sfx/get_item2_2.asm index 910cf9dc..27c5864d 100644 --- a/audio/sfx/sfx_08_3b.asm +++ b/audio/sfx/get_item2_2.asm @@ -1,4 +1,4 @@ -SFX_08_3b_Ch1: ; 239c7 (8:79c7) +SFX_Get_Item2_2_Ch4: executemusic tempo 256 volume 7, 7 @@ -25,7 +25,7 @@ SFX_08_3b_Ch1: ; 239c7 (8:79c7) endchannel -SFX_08_3b_Ch2: ; 239e6 (8:79e6) +SFX_Get_Item2_2_Ch5: executemusic vibrato 8, 2, 7 duty 2 @@ -46,7 +46,7 @@ SFX_08_3b_Ch2: ; 239e6 (8:79e6) endchannel -SFX_08_3b_Ch3: ; 239fe (8:79fe) +SFX_Get_Item2_2_Ch6: executemusic notetype 5, 1, 0 octave 5 @@ -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_1f_3b.asm b/audio/sfx/get_item2_3.asm index 3ce00c8a..42d74e8e 100644 --- a/audio/sfx/sfx_1f_3b.asm +++ b/audio/sfx/get_item2_3.asm @@ -1,4 +1,4 @@ -SFX_1f_3b_Ch1: ; 7ee28 (1f:6e28) +SFX_Get_Item2_3_Ch4: executemusic tempo 256 volume 7, 7 @@ -25,7 +25,7 @@ SFX_1f_3b_Ch1: ; 7ee28 (1f:6e28) endchannel -SFX_1f_3b_Ch2: ; 7ee47 (1f:6e47) +SFX_Get_Item2_3_Ch5: executemusic vibrato 8, 2, 7 duty 2 @@ -46,7 +46,7 @@ SFX_1f_3b_Ch2: ; 7ee47 (1f:6e47) endchannel -SFX_1f_3b_Ch3: ; 7ee5f (1f:6e5f) +SFX_Get_Item2_3_Ch6: executemusic notetype 5, 1, 0 octave 5 @@ -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_02_42.asm b/audio/sfx/get_key_item_1.asm index 5dfcb574..b2ae3d57 100644 --- a/audio/sfx/sfx_02_42.asm +++ b/audio/sfx/get_key_item_1.asm @@ -1,4 +1,4 @@ -SFX_02_42_Ch1: ; b362 (2:7362) +SFX_Get_Key_Item_1_Ch4: executemusic tempo 256 volume 7, 7 @@ -23,7 +23,7 @@ SFX_02_42_Ch1: ; b362 (2:7362) endchannel -SFX_02_42_Ch2: ; b381 (2:7381) +SFX_Get_Key_Item_1_Ch5: executemusic vibrato 4, 2, 3 duty 2 @@ -47,7 +47,7 @@ SFX_02_42_Ch2: ; b381 (2:7381) endchannel -SFX_02_42_Ch3: ; b39d (2:739d) +SFX_Get_Key_Item_1_Ch6: executemusic notetype 5, 1, 0 octave 4 @@ -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_1f_42.asm b/audio/sfx/get_key_item_3.asm index 6c8c388a..aebae361 100644 --- a/audio/sfx/sfx_1f_42.asm +++ b/audio/sfx/get_key_item_3.asm @@ -1,4 +1,4 @@ -SFX_1f_42_Ch1: ; 7ee74 (1f:6e74) +SFX_Get_Key_Item_3_Ch4: executemusic tempo 256 volume 7, 7 @@ -23,7 +23,7 @@ SFX_1f_42_Ch1: ; 7ee74 (1f:6e74) endchannel -SFX_1f_42_Ch2: ; 7ee93 (1f:6e93) +SFX_Get_Key_Item_3_Ch5: executemusic vibrato 4, 2, 3 duty 2 @@ -47,7 +47,7 @@ SFX_1f_42_Ch2: ; 7ee93 (1f:6e93) endchannel -SFX_1f_42_Ch3: ; 7eeaf (1f:6eaf) +SFX_Get_Key_Item_3_Ch6: executemusic notetype 5, 1, 0 octave 4 @@ -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_02_57.asm b/audio/sfx/go_inside_1.asm index 1b7e4237..aa523774 100644 --- a/audio/sfx/sfx_02_57.asm +++ b/audio/sfx/go_inside_1.asm @@ -1,5 +1,4 @@ -SFX_02_57_Ch1: ; 83f1 (2:43f1) +SFX_Go_Inside_1_Ch7: unknownnoise0x20 9, 241, 68 unknownnoise0x20 8, 209, 67 endchannel -; 0x83f8
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_57.asm b/audio/sfx/go_inside_3.asm index 36880103..9939ba6d 100644 --- a/audio/sfx/sfx_1f_57.asm +++ b/audio/sfx/go_inside_3.asm @@ -1,5 +1,4 @@ -SFX_1f_57_Ch1: ; 7c3da (1f:43da) +SFX_Go_Inside_3_Ch7: unknownnoise0x20 9, 241, 68 unknownnoise0x20 8, 209, 67 endchannel -; 0x7c3e1
\ No newline at end of file diff --git a/audio/sfx/sfx_02_5c.asm b/audio/sfx/go_outside_1.asm index 34866769..c60bb592 100644 --- a/audio/sfx/sfx_02_5c.asm +++ b/audio/sfx/go_outside_1.asm @@ -1,8 +1,7 @@ -SFX_02_5c_Ch1: ; 8452 (2:4452) +SFX_Go_Outside_1_Ch7: unknownnoise0x20 2, 241, 84 unknownnoise0x20 12, 113, 35 unknownnoise0x20 2, 177, 84 unknownnoise0x20 12, 97, 35 unknownnoise0x20 6, 65, 84 endchannel -; 0x8462
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_5c.asm b/audio/sfx/go_outside_3.asm index 8ac03d9c..30b9884c 100644 --- a/audio/sfx/sfx_1f_5c.asm +++ b/audio/sfx/go_outside_3.asm @@ -1,8 +1,7 @@ -SFX_1f_5c_Ch1: ; 7c43b (1f:443b) +SFX_Go_Outside_3_Ch7: unknownnoise0x20 2, 241, 84 unknownnoise0x20 12, 113, 35 unknownnoise0x20 2, 177, 84 unknownnoise0x20 12, 97, 35 unknownnoise0x20 6, 65, 84 endchannel -; 0x7c44b
\ No newline at end of file diff --git a/audio/sfx/sfx_02_3e.asm b/audio/sfx/heal_ailment_1.asm index 18d49ff3..ca703c09 100644 --- a/audio/sfx/sfx_02_3e.asm +++ b/audio/sfx/heal_ailment_1.asm @@ -1,4 +1,4 @@ -SFX_02_3e_Ch1: ; 84d9 (2:44d9) +SFX_Heal_Ailment_1_Ch4: duty 2 unknownsfx0x10 20 unknownsfx0x20 4, 242, 0, 6 @@ -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_08_3e.asm b/audio/sfx/heal_ailment_2.asm index 3ac78576..b06abe62 100644 --- a/audio/sfx/sfx_08_3e.asm +++ b/audio/sfx/heal_ailment_2.asm @@ -1,4 +1,4 @@ -SFX_08_3e_Ch1: ; 203fd (8:43fd) +SFX_Heal_Ailment_2_Ch4: duty 2 unknownsfx0x10 20 unknownsfx0x20 4, 242, 0, 6 @@ -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_1f_3e.asm b/audio/sfx/heal_ailment_3.asm index 411b544d..c13d74fd 100644 --- a/audio/sfx/sfx_1f_3e.asm +++ b/audio/sfx/heal_ailment_3.asm @@ -1,4 +1,4 @@ -SFX_1f_3e_Ch1: ; 7c4b2 (1f:44b2) +SFX_Heal_Ailment_3_Ch4: duty 2 unknownsfx0x10 20 unknownsfx0x20 4, 242, 0, 6 @@ -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_02_3d.asm b/audio/sfx/heal_hp_1.asm index 206c0c35..75400957 100644 --- a/audio/sfx/sfx_02_3d.asm +++ b/audio/sfx/heal_hp_1.asm @@ -1,8 +1,7 @@ -SFX_02_3d_Ch1: ; 84b7 (2:44b7) +SFX_Heal_HP_1_Ch4: duty 2 unknownsfx0x10 23 unknownsfx0x20 15, 240, 240, 4 unknownsfx0x20 15, 242, 80, 6 unknownsfx0x10 8 endchannel -; 0x84c6
\ No newline at end of file diff --git a/audio/sfx/sfx_08_3d.asm b/audio/sfx/heal_hp_2.asm index c2d411af..182937cd 100644 --- a/audio/sfx/sfx_08_3d.asm +++ b/audio/sfx/heal_hp_2.asm @@ -1,8 +1,7 @@ -SFX_08_3d_Ch1: ; 203ee (8:43ee) +SFX_Heal_HP_2_Ch4: duty 2 unknownsfx0x10 23 unknownsfx0x20 15, 240, 240, 4 unknownsfx0x20 15, 242, 80, 6 unknownsfx0x10 8 endchannel -; 0x203fd
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_3d.asm b/audio/sfx/heal_hp_3.asm index f7acd76f..c238013a 100644 --- a/audio/sfx/sfx_1f_3d.asm +++ b/audio/sfx/heal_hp_3.asm @@ -1,8 +1,7 @@ -SFX_1f_3d_Ch1: ; 7c490 (1f:4490) +SFX_Heal_HP_3_Ch4: duty 2 unknownsfx0x10 23 unknownsfx0x20 15, 240, 240, 4 unknownsfx0x20 15, 242, 80, 6 unknownsfx0x10 8 endchannel -; 0x7c49f
\ No newline at end of file diff --git a/audio/sfx/sfx_02_4a.asm b/audio/sfx/healing_machine_1.asm index 278c927d..ebaee990 100644 --- a/audio/sfx/sfx_02_4a.asm +++ b/audio/sfx/healing_machine_1.asm @@ -1,4 +1,4 @@ -SFX_02_4a_Ch1: ; 8580 (2:4580) +SFX_Healing_Machine_1_Ch4: duty 2 unknownsfx0x10 44 unknownsfx0x20 4, 242, 0, 5 @@ -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_1f_4a.asm b/audio/sfx/healing_machine_3.asm index c0d8324b..ac11fee4 100644 --- a/audio/sfx/sfx_1f_4a.asm +++ b/audio/sfx/healing_machine_3.asm @@ -1,4 +1,4 @@ -SFX_1f_4a_Ch1: ; 7c55d (1f:455d) +SFX_Healing_Machine_3_Ch4: duty 2 unknownsfx0x10 44 unknownsfx0x20 4, 242, 0, 5 @@ -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_08_5f.asm b/audio/sfx/horn_drill.asm index b8084264..12ca5da6 100644 --- a/audio/sfx/sfx_08_5f.asm +++ b/audio/sfx/horn_drill.asm @@ -1,7 +1,6 @@ -SFX_08_5f_Ch1: ; 205b1 (8:45b1) +SFX_Horn_Drill_Ch7: unknownnoise0x20 3, 146, 49 unknownnoise0x20 3, 178, 50 unknownnoise0x20 3, 194, 51 unknownnoise0x20 8, 241, 84 endchannel -; 0x205be
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_62.asm b/audio/sfx/intro_crash.asm index 71be0e5d..82c58356 100644 --- a/audio/sfx/sfx_1f_62.asm +++ b/audio/sfx/intro_crash.asm @@ -1,5 +1,4 @@ -SFX_1f_62_Ch1: ; 7c6de (1f:46de) +SFX_Intro_Crash_Ch7: unknownnoise0x20 2, 210, 50 unknownnoise0x20 15, 242, 67 endchannel -; 0x7c6e5
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_5f.asm b/audio/sfx/intro_hip.asm index 7ae72e98..0d450e21 100644 --- a/audio/sfx/sfx_1f_5f.asm +++ b/audio/sfx/intro_hip.asm @@ -1,7 +1,6 @@ -SFX_1f_5f_Ch1: ; 7c6be (1f:46be) +SFX_Intro_Hip_Ch4: duty 2 unknownsfx0x10 38 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/intro_hop.asm index 3f098eeb..1bd9faec 100644 --- a/audio/sfx/sfx_1f_60.asm +++ b/audio/sfx/intro_hop.asm @@ -1,7 +1,6 @@ -SFX_1f_60_Ch1: ; 7c6c9 (1f:46c9) +SFX_Intro_Hop_Ch4: duty 2 unknownsfx0x10 38 unknownsfx0x20 12, 194, 128, 6 unknownsfx0x10 8 endchannel -; 0x7c6d4
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_5e.asm b/audio/sfx/intro_lunge.asm index e6bbaa64..bb534a70 100644 --- a/audio/sfx/sfx_1f_5e.asm +++ b/audio/sfx/intro_lunge.asm @@ -1,4 +1,4 @@ -SFX_1f_5e_Ch1: ; 7c6a5 (1f:46a5) +SFX_Intro_Lunge_Ch7: unknownnoise0x20 6, 32, 16 unknownnoise0x20 6, 47, 64 unknownnoise0x20 6, 79, 65 @@ -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_61.asm b/audio/sfx/intro_raise.asm index 745ce3a4..060ef09a 100644 --- a/audio/sfx/sfx_1f_61.asm +++ b/audio/sfx/intro_raise.asm @@ -1,6 +1,5 @@ -SFX_1f_61_Ch1: ; 7c6d4 (1f:46d4) +SFX_Intro_Raise_Ch7: unknownnoise0x20 2, 111, 33 unknownnoise0x20 2, 175, 49 unknownnoise0x20 15, 242, 65 endchannel -; 0x7c6de
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_63.asm b/audio/sfx/intro_whoosh.asm index 88ce100d..e874e773 100644 --- a/audio/sfx/sfx_1f_63.asm +++ b/audio/sfx/intro_whoosh.asm @@ -1,8 +1,7 @@ -SFX_1f_63_Ch1: ; 7c6e5 (1f:46e5) +SFX_Intro_Whoosh_Ch7: unknownnoise0x20 4, 44, 32 unknownnoise0x20 3, 160, 32 unknownnoise0x20 3, 176, 33 unknownnoise0x20 3, 192, 34 unknownnoise0x20 15, 210, 36 endchannel -; 0x7c6f5
\ No newline at end of file diff --git a/audio/sfx/sfx_02_4e.asm b/audio/sfx/ledge_1.asm index b690ee55..26acaf1b 100644 --- a/audio/sfx/sfx_02_4e.asm +++ b/audio/sfx/ledge_1.asm @@ -1,7 +1,6 @@ -SFX_02_4e_Ch1: ; 85d6 (2:45d6) +SFX_Ledge_1_Ch4: duty 2 unknownsfx0x10 149 unknownsfx0x20 15, 242, 0, 4 unknownsfx0x10 8 endchannel -; 0x85e1
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_4e.asm b/audio/sfx/ledge_3.asm index 92f1a396..623e56ce 100644 --- a/audio/sfx/sfx_1f_4e.asm +++ b/audio/sfx/ledge_3.asm @@ -1,7 +1,6 @@ -SFX_1f_4e_Ch1: ; 7c5b3 (1f:45b3) +SFX_Ledge_3_Ch4: duty 2 unknownsfx0x10 149 unknownsfx0x20 15, 242, 0, 4 unknownsfx0x10 8 endchannel -; 0x7c5be
\ No newline at end of file diff --git a/audio/sfx/sfx_08_3a.asm b/audio/sfx/level_up.asm index 24cb206c..5b3da83d 100644 --- a/audio/sfx/sfx_08_3a.asm +++ b/audio/sfx/level_up.asm @@ -1,4 +1,4 @@ -SFX_08_3a_Ch1: ; 2397d (8:797d) +SFX_Level_Up_Ch4: executemusic tempo 256 volume 7, 7 @@ -20,7 +20,7 @@ SFX_08_3a_Ch1: ; 2397d (8:797d) endchannel -SFX_08_3a_Ch2: ; 23998 (8:7998) +SFX_Level_Up_Ch5: executemusic vibrato 4, 2, 2 duty 2 @@ -40,7 +40,7 @@ SFX_08_3a_Ch2: ; 23998 (8:7998) endchannel -SFX_08_3a_Ch3: ; 239b0 (8:79b0) +SFX_Level_Up_Ch6: executemusic notetype 6, 1, 0 octave 5 @@ -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_02_0f.asm b/audio/sfx/muted_snare1_1.asm index 5a2404fc..4b205470 100644 --- a/audio/sfx/sfx_02_0f.asm +++ b/audio/sfx/muted_snare1_1.asm @@ -1,5 +1,4 @@ -SFX_02_0f_Ch1: ; 8347 (2:4347) +SFX_Muted_Snare1_1_Ch7: unknownnoise0x20 0, 161, 24 unknownnoise0x20 0, 49, 51 endchannel -; 0x834e
\ No newline at end of file diff --git a/audio/sfx/sfx_08_0f.asm b/audio/sfx/muted_snare1_2.asm index 22452696..d530bd89 100644 --- a/audio/sfx/sfx_08_0f.asm +++ b/audio/sfx/muted_snare1_2.asm @@ -1,5 +1,4 @@ -SFX_08_0f_Ch1: ; 20347 (8:4347) +SFX_Muted_Snare1_2_Ch7: unknownnoise0x20 0, 161, 24 unknownnoise0x20 0, 49, 51 endchannel -; 0x2034e
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_0f.asm b/audio/sfx/muted_snare1_3.asm index f8e11b6d..8b5c2c6d 100644 --- a/audio/sfx/sfx_1f_0f.asm +++ b/audio/sfx/muted_snare1_3.asm @@ -1,5 +1,4 @@ -SFX_1f_0f_Ch1: ; 7c347 (1f:4347) +SFX_Muted_Snare1_3_Ch7: unknownnoise0x20 0, 161, 24 unknownnoise0x20 0, 49, 51 endchannel -; 0x7c34e
\ No newline at end of file diff --git a/audio/sfx/sfx_02_11.asm b/audio/sfx/muted_snare2_1.asm index 3ab56c2b..4e15e386 100644 --- a/audio/sfx/sfx_02_11.asm +++ b/audio/sfx/muted_snare2_1.asm @@ -1,4 +1,3 @@ -SFX_02_11_Ch1: ; 8355 (2:4355) +SFX_Muted_Snare2_1_Ch7: unknownnoise0x20 0, 145, 34 endchannel -; 0x8359
\ No newline at end of file diff --git a/audio/sfx/sfx_08_11.asm b/audio/sfx/muted_snare2_2.asm index 7ac28d21..5107fb77 100644 --- a/audio/sfx/sfx_08_11.asm +++ b/audio/sfx/muted_snare2_2.asm @@ -1,4 +1,3 @@ -SFX_08_11_Ch1: ; 20355 (8:4355) +SFX_Muted_Snare2_2_Ch7: unknownnoise0x20 0, 145, 34 endchannel -; 0x20359
\ No newline at end of file diff --git a/audio/sfx/muted_snare2_3.asm b/audio/sfx/muted_snare2_3.asm new file mode 100644 index 00000000..043c870d --- /dev/null +++ b/audio/sfx/muted_snare2_3.asm @@ -0,0 +1,3 @@ +SFX_Muted_Snare2_3_Ch7: + unknownnoise0x20 0, 145, 34 + endchannel diff --git a/audio/sfx/sfx_02_12.asm b/audio/sfx/muted_snare3_1.asm index 608e341c..d0c689a4 100644 --- a/audio/sfx/sfx_02_12.asm +++ b/audio/sfx/muted_snare3_1.asm @@ -1,4 +1,3 @@ -SFX_02_12_Ch1: ; 8359 (2:4359) +SFX_Muted_Snare3_1_Ch7: unknownnoise0x20 0, 113, 34 endchannel -; 0x835d
\ No newline at end of file diff --git a/audio/sfx/sfx_08_12.asm b/audio/sfx/muted_snare3_2.asm index 3d5bebad..3e470ae6 100644 --- a/audio/sfx/sfx_08_12.asm +++ b/audio/sfx/muted_snare3_2.asm @@ -1,4 +1,3 @@ -SFX_08_12_Ch1: ; 20359 (8:4359) +SFX_Muted_Snare3_2_Ch7: unknownnoise0x20 0, 113, 34 endchannel -; 0x2035d
\ No newline at end of file diff --git a/audio/sfx/muted_snare3_3.asm b/audio/sfx/muted_snare3_3.asm new file mode 100644 index 00000000..c8749577 --- /dev/null +++ b/audio/sfx/muted_snare3_3.asm @@ -0,0 +1,3 @@ +SFX_Muted_Snare3_3_Ch7: + unknownnoise0x20 0, 113, 34 + endchannel diff --git a/audio/sfx/sfx_02_13.asm b/audio/sfx/muted_snare4_1.asm index 38b06431..ebe2ee1d 100644 --- a/audio/sfx/sfx_02_13.asm +++ b/audio/sfx/muted_snare4_1.asm @@ -1,4 +1,3 @@ -SFX_02_13_Ch1: ; 835d (2:435d) +SFX_Muted_Snare4_1_Ch7: unknownnoise0x20 0, 97, 34 endchannel -; 0x8361
\ No newline at end of file diff --git a/audio/sfx/muted_snare4_2.asm b/audio/sfx/muted_snare4_2.asm new file mode 100644 index 00000000..bdbe4d11 --- /dev/null +++ b/audio/sfx/muted_snare4_2.asm @@ -0,0 +1,3 @@ +SFX_Muted_Snare4_2_Ch7: + unknownnoise0x20 0, 97, 34 + endchannel diff --git a/audio/sfx/muted_snare4_3.asm b/audio/sfx/muted_snare4_3.asm new file mode 100644 index 00000000..59d72218 --- /dev/null +++ b/audio/sfx/muted_snare4_3.asm @@ -0,0 +1,3 @@ +SFX_Muted_Snare4_3_Ch7: + unknownnoise0x20 0, 97, 34 + endchannel diff --git a/audio/sfx/sfx_08_51.asm b/audio/sfx/not_very_effective.asm index 85cd06bb..3f74c515 100644 --- a/audio/sfx/sfx_08_51.asm +++ b/audio/sfx/not_very_effective.asm @@ -1,7 +1,6 @@ -SFX_08_51_Ch1: ; 204fe (8:44fe) +SFX_Not_Very_Effective_Ch7: unknownnoise0x20 4, 143, 85 unknownnoise0x20 2, 244, 68 unknownnoise0x20 8, 244, 34 unknownnoise0x20 15, 242, 33 endchannel -; 0x2050b
\ No newline at end of file diff --git a/audio/sfx/sfx_08_47.asm b/audio/sfx/peck.asm index 87e76a17..cca7ecaa 100644 --- a/audio/sfx/sfx_08_47.asm +++ b/audio/sfx/peck.asm @@ -1,4 +1,3 @@ -SFX_08_47_Ch1: ; 204aa (8:44aa) +SFX_Peck_Ch7: unknownnoise0x20 2, 161, 18 endchannel -; 0x204ae
\ No newline at end of file diff --git a/audio/sfx/sfx_02_43.asm b/audio/sfx/poisoned_1.asm index c8f88914..73068b86 100644 --- a/audio/sfx/sfx_02_43.asm +++ b/audio/sfx/poisoned_1.asm @@ -1,9 +1,8 @@ -SFX_02_43_Ch1: ; 84c6 (2:44c6) +SFX_Poisoned_1_Ch4: duty 0 unknownsfx0x10 20 unknownsfx0x20 4, 242, 0, 6 - loopchannel 4, SFX_02_43_Ch1 + loopchannel 4, SFX_Poisoned_1_Ch4 unknownsfx0x20 15, 243, 0, 6 unknownsfx0x10 8 endchannel -; 0x84d9
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_43.asm b/audio/sfx/poisoned_3.asm index 59b7339c..7dc973bc 100644 --- a/audio/sfx/sfx_1f_43.asm +++ b/audio/sfx/poisoned_3.asm @@ -1,9 +1,8 @@ -SFX_1f_43_Ch1: ; 7c49f (1f:449f) +SFX_Poisoned_3_Ch4: duty 0 unknownsfx0x10 20 unknownsfx0x20 4, 242, 0, 6 - loopchannel 4, SFX_1f_43_Ch1 + loopchannel 4, SFX_Poisoned_3_Ch4 unknownsfx0x20 15, 243, 0, 6 unknownsfx0x10 8 endchannel -; 0x7c4b2
\ No newline at end of file diff --git a/audio/sfx/sfx_02_41.asm b/audio/sfx/pokedex_rating_1.asm index de5be1c7..1e0f95f5 100644 --- a/audio/sfx/sfx_02_41.asm +++ b/audio/sfx/pokedex_rating_1.asm @@ -1,4 +1,4 @@ -SFX_02_41_Ch1: ; b2c8 (2:72c8) +SFX_Pokedex_Rating_1_Ch4: executemusic tempo 256 volume 7, 7 @@ -21,7 +21,7 @@ SFX_02_41_Ch1: ; b2c8 (2:72c8) endchannel -SFX_02_41_Ch2: ; b2e1 (2:72e1) +SFX_Pokedex_Rating_1_Ch5: executemusic duty 2 notetype 5, 12, 2 @@ -44,7 +44,7 @@ SFX_02_41_Ch2: ; b2e1 (2:72e1) endchannel -SFX_02_41_Ch3: ; b2f7 (2:72f7) +SFX_Pokedex_Rating_1_Ch6: executemusic notetype 5, 1, 0 octave 5 @@ -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_1f_41.asm b/audio/sfx/pokedex_rating_3.asm index 6f854c74..01ac0e1c 100644 --- a/audio/sfx/sfx_1f_41.asm +++ b/audio/sfx/pokedex_rating_3.asm @@ -1,4 +1,4 @@ -SFX_1f_41_Ch1: ; 7edda (1f:6dda) +SFX_Pokedex_Rating_3_Ch4: executemusic tempo 256 volume 7, 7 @@ -21,7 +21,7 @@ SFX_1f_41_Ch1: ; 7edda (1f:6dda) endchannel -SFX_1f_41_Ch2: ; 7edf3 (1f:6df3) +SFX_Pokedex_Rating_3_Ch5: executemusic duty 2 notetype 5, 12, 2 @@ -44,7 +44,7 @@ SFX_1f_41_Ch2: ; 7edf3 (1f:6df3) endchannel -SFX_1f_41_Ch3: ; 7ee09 (1f:6e09) +SFX_Pokedex_Rating_3_Ch6: executemusic notetype 5, 1, 0 octave 5 @@ -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_02_5e.asm b/audio/sfx/pokeflute.asm index ade4d200..272c114f 100644 --- a/audio/sfx/sfx_02_5e.asm +++ b/audio/sfx/pokeflute.asm @@ -1,4 +1,4 @@ -SFX_02_5e_Ch1: ; 83ca (2:43ca) +SFX_Pokeflute_Ch2: vibrato 16, 1, 4 notetype 12, 1, 0 octave 5 @@ -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_08_pokeflute.asm b/audio/sfx/pokeflute_ch4_ch5.asm index 103e2d56..146488d8 100755 --- a/audio/sfx/sfx_08_pokeflute.asm +++ b/audio/sfx/pokeflute_ch4_ch5.asm @@ -1,8 +1,8 @@ -SFX_08_PokeFlute_Ch1: ; 22322 (8:6322) +SFX_08_PokeFlute_Ch4: tempo 256 -SFX_08_PokeFlute_Ch2: ; 22325 (8:6325) +SFX_08_PokeFlute_Ch5: executemusic notetype 8, 0, 0 rest 5 @@ -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/pokeflute_ch6.asm index cf3f32a7..4d4e5bae 100755 --- a/audio/sfx/sfx_08_pokeflute_ch3.asm +++ b/audio/sfx/pokeflute_ch6.asm @@ -1,4 +1,4 @@ -SFX_08_PokeFlute_Ch3: ; 2049b (8:449b) +SFX_08_PokeFlute_Ch6: executemusic vibrato 16, 1, 4 notetype 8, 1, 0 @@ -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_4a.asm b/audio/sfx/pound.asm index 3ebc3281..fc6d292e 100644 --- a/audio/sfx/sfx_08_4a.asm +++ b/audio/sfx/pound.asm @@ -1,4 +1,3 @@ -SFX_08_4a_Ch1: ; 204c4 (8:44c4) +SFX_Pound_Ch7: unknownnoise0x20 2, 161, 34 endchannel -; 0x204c8
\ No newline at end of file diff --git a/audio/sfx/sfx_02_40.asm b/audio/sfx/press_ab_1.asm index a5789282..95edbf4a 100644 --- a/audio/sfx/sfx_02_40.asm +++ b/audio/sfx/press_ab_1.asm @@ -1,8 +1,7 @@ -SFX_02_40_Ch1: ; 8462 (2:4462) +SFX_Press_AB_1_Ch4: duty 2 unknownsfx0x20 0, 145, 192, 7 unknownsfx0x20 0, 129, 208, 7 unknownsfx0x20 0, 145, 192, 7 unknownsfx0x20 12, 161, 208, 7 endchannel -; 0x8475
\ No newline at end of file diff --git a/audio/sfx/sfx_08_40.asm b/audio/sfx/press_ab_2.asm index 7603a54a..0d8faa46 100644 --- a/audio/sfx/sfx_08_40.asm +++ b/audio/sfx/press_ab_2.asm @@ -1,8 +1,7 @@ -SFX_08_40_Ch1: ; 203c3 (8:43c3) +SFX_Press_AB_2_Ch4: duty 2 unknownsfx0x20 0, 145, 192, 7 unknownsfx0x20 0, 129, 208, 7 unknownsfx0x20 0, 145, 192, 7 unknownsfx0x20 12, 161, 208, 7 endchannel -; 0x203d6
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_40.asm b/audio/sfx/press_ab_3.asm index 216bd569..0f11fc34 100644 --- a/audio/sfx/sfx_1f_40.asm +++ b/audio/sfx/press_ab_3.asm @@ -1,8 +1,7 @@ -SFX_1f_40_Ch1: ; 7c44b (1f:444b) +SFX_Press_AB_3_Ch4: duty 2 unknownsfx0x20 0, 145, 192, 7 unknownsfx0x20 0, 129, 208, 7 unknownsfx0x20 0, 145, 192, 7 unknownsfx0x20 12, 161, 208, 7 endchannel -; 0x7c45e
\ No newline at end of file diff --git a/audio/sfx/sfx_08_6d.asm b/audio/sfx/psybeam.asm index 6e94d9eb..12a1b6fc 100644 --- a/audio/sfx/sfx_08_6d.asm +++ b/audio/sfx/psybeam.asm @@ -1,26 +1,25 @@ -SFX_08_6d_Ch1: ; 20759 (8:4759) +SFX_Psybeam_Ch4: dutycycle 161 unknownsfx0x20 10, 241, 64, 6 unknownsfx0x20 10, 243, 128, 6 unknownsfx0x20 10, 242, 32, 6 - loopchannel 4, SFX_08_6d_Ch1 + loopchannel 4, SFX_Psybeam_Ch4 unknownsfx0x20 10, 241, 64, 6 endchannel -SFX_08_6d_Ch2: ; 20770 (8:4770) +SFX_Psybeam_Ch5: dutycycle 179 unknownsfx0x20 10, 243, 113, 5 unknownsfx0x20 7, 227, 49, 5 unknownsfx0x20 10, 241, 81, 5 - loopchannel 4, SFX_08_6d_Ch2 + loopchannel 4, SFX_Psybeam_Ch5 unknownsfx0x20 10, 241, 113, 5 endchannel -SFX_08_6d_Ch3: ; 20787 (8:4787) +SFX_Psybeam_Ch7: unknownnoise0x20 2, 209, 74 unknownnoise0x20 2, 210, 42 - loopchannel 21, SFX_08_6d_Ch3 + loopchannel 21, SFX_Psybeam_Ch7 endchannel -; 0x20792
\ No newline at end of file diff --git a/audio/sfx/sfx_08_70.asm b/audio/sfx/psychic_m.asm index 01c90d9a..2bbde2f1 100644 --- a/audio/sfx/sfx_08_70.asm +++ b/audio/sfx/psychic_m.asm @@ -1,4 +1,4 @@ -SFX_08_70_Ch1: ; 207fa (8:47fa) +SFX_Psychic_M_Ch4: duty 2 unknownsfx0x10 247 unknownsfx0x20 8, 196, 189, 7 @@ -11,7 +11,7 @@ SFX_08_70_Ch1: ; 207fa (8:47fa) endchannel -SFX_08_70_Ch2: ; 20819 (8:4819) +SFX_Psychic_M_Ch5: duty 2 unknownsfx0x20 8, 196, 112, 7 unknownsfx0x20 8, 196, 97, 7 @@ -22,7 +22,7 @@ SFX_08_70_Ch2: ; 20819 (8:4819) endchannel -SFX_08_70_Ch3: ; 20834 (8:4834) +SFX_Psychic_M_Ch7: unknownnoise0x20 15, 63, 20 unknownnoise0x20 15, 207, 19 unknownnoise0x20 15, 207, 18 @@ -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_02_5a.asm b/audio/sfx/purchase_1.asm index a9bb7f69..1c9490a2 100644 --- a/audio/sfx/sfx_02_5a.asm +++ b/audio/sfx/purchase_1.asm @@ -1,14 +1,13 @@ -SFX_02_5a_Ch1: ; 842d (2:442d) +SFX_Purchase_1_Ch4: duty 2 unknownsfx0x20 4, 225, 0, 7 unknownsfx0x20 8, 242, 224, 7 endchannel -SFX_02_5a_Ch2: ; 8438 (2:4438) +SFX_Purchase_1_Ch5: duty 2 unknownsfx0x20 1, 8, 0, 0 unknownsfx0x20 4, 145, 193, 6 unknownsfx0x20 8, 162, 161, 7 endchannel -; 0x8447
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_5a.asm b/audio/sfx/purchase_3.asm index 8c050129..78929c27 100644 --- a/audio/sfx/sfx_1f_5a.asm +++ b/audio/sfx/purchase_3.asm @@ -1,14 +1,13 @@ -SFX_1f_5a_Ch1: ; 7c416 (1f:4416) +SFX_Purchase_3_Ch4: duty 2 unknownsfx0x20 4, 225, 0, 7 unknownsfx0x20 8, 242, 224, 7 endchannel -SFX_1f_5a_Ch2: ; 7c421 (1f:4421) +SFX_Purchase_3_Ch5: duty 2 unknownsfx0x20 1, 8, 0, 0 unknownsfx0x20 4, 145, 193, 6 unknownsfx0x20 8, 162, 161, 7 endchannel -; 0x7c430
\ No newline at end of file diff --git a/audio/sfx/sfx_02_53.asm b/audio/sfx/push_boulder_1.asm index 4b739723..86035278 100644 --- a/audio/sfx/sfx_02_53.asm +++ b/audio/sfx/push_boulder_1.asm @@ -1,4 +1,4 @@ -SFX_02_53_Ch1: ; 8654 (2:4654) +SFX_Push_Boulder_1_Ch7: unknownnoise0x20 4, 162, 35 unknownnoise0x20 8, 241, 52 unknownnoise0x20 15, 0, 0 @@ -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_1f_53.asm b/audio/sfx/push_boulder_3.asm index 86e7ce4a..ecaeb768 100644 --- a/audio/sfx/sfx_1f_53.asm +++ b/audio/sfx/push_boulder_3.asm @@ -1,4 +1,4 @@ -SFX_1f_53_Ch1: ; 7c631 (1f:4631) +SFX_Push_Boulder_3_Ch7: unknownnoise0x20 4, 162, 35 unknownnoise0x20 8, 241, 52 unknownnoise0x20 15, 0, 0 @@ -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_08_44.asm b/audio/sfx/run.asm index 59a587bb..81d01467 100644 --- a/audio/sfx/sfx_08_44.asm +++ b/audio/sfx/run.asm @@ -1,4 +1,4 @@ -SFX_08_44_Ch1: ; 2045d (8:445d) +SFX_Run_Ch7: unknownnoise0x20 2, 97, 35 unknownnoise0x20 2, 161, 51 unknownnoise0x20 2, 193, 51 @@ -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_02_5f.asm b/audio/sfx/safari_zone_pa.asm index 48c6539e..f898def0 100644 --- a/audio/sfx/sfx_02_5f.asm +++ b/audio/sfx/safari_zone_pa.asm @@ -1,4 +1,4 @@ -SFX_02_5f_Ch1: ; 86c8 (2:46c8) +SFX_Safari_Zone_PA_Ch4: duty 2 unknownsfx0x20 15, 243, 48, 7 unknownsfx0x20 8, 101, 48, 7 @@ -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_5d.asm b/audio/sfx/save_1.asm index 2a05d5dd..afb1f13a 100644 --- a/audio/sfx/sfx_02_5d.asm +++ b/audio/sfx/save_1.asm @@ -1,4 +1,4 @@ -SFX_02_5d_Ch1: ; 8475 (2:4475) +SFX_Save_1_Ch4: duty 2 unknownsfx0x20 4, 244, 0, 7 unknownsfx0x20 2, 228, 0, 6 @@ -10,7 +10,7 @@ SFX_02_5d_Ch1: ; 8475 (2:4475) endchannel -SFX_02_5d_Ch2: ; 8494 (2:4494) +SFX_Save_1_Ch5: duty 2 unknownsfx0x20 4, 8, 0, 0 unknownsfx0x20 2, 212, 1, 7 @@ -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_1f_5d.asm b/audio/sfx/save_3.asm index f0606032..083e77c8 100644 --- a/audio/sfx/sfx_1f_5d.asm +++ b/audio/sfx/save_3.asm @@ -1,4 +1,4 @@ -SFX_1f_5d_Ch1: ; 7c45e (1f:445e) +SFX_Save_3_Ch4: duty 2 IF DEF(_RED) unknownsfx0x20 4, 244, 0, 7 @@ -16,7 +16,7 @@ ENDC endchannel -SFX_1f_5d_Ch2: ; 7c475 (1f:4475) +SFX_Save_3_Ch5: duty 2 IF DEF(_RED) unknownsfx0x20 4, 8, 0, 0 @@ -34,4 +34,3 @@ ELSE unknownsfx0x20 15, 210, 225, 7 ENDC endchannel -; 0x7c490 diff --git a/audio/sfx/sfx_08_06.asm b/audio/sfx/sfx_08_06.asm deleted file mode 100644 index 6e8c2b8c..00000000 --- a/audio/sfx/sfx_08_06.asm +++ /dev/null @@ -1,4 +0,0 @@ -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_13.asm b/audio/sfx/sfx_08_13.asm deleted file mode 100644 index e6712805..00000000 --- a/audio/sfx/sfx_08_13.asm +++ /dev/null @@ -1,4 +0,0 @@ -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_1f_01.asm b/audio/sfx/sfx_1f_01.asm deleted file mode 100644 index e7a40492..00000000 --- a/audio/sfx/sfx_1f_01.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index bb95fe0b..00000000 --- a/audio/sfx/sfx_1f_02.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 3d6fa66a..00000000 --- a/audio/sfx/sfx_1f_03.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 3d73e1a3..00000000 --- a/audio/sfx/sfx_1f_04.asm +++ /dev/null @@ -1,4 +0,0 @@ -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_06.asm b/audio/sfx/sfx_1f_06.asm deleted file mode 100644 index 1d6c85cf..00000000 --- a/audio/sfx/sfx_1f_06.asm +++ /dev/null @@ -1,4 +0,0 @@ -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_08.asm b/audio/sfx/sfx_1f_08.asm deleted file mode 100644 index 8798fc9b..00000000 --- a/audio/sfx/sfx_1f_08.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index ef7a87bc..00000000 --- a/audio/sfx/sfx_1f_09.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 4b3ffa3e..00000000 --- a/audio/sfx/sfx_1f_0a.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index a7f558fd..00000000 --- a/audio/sfx/sfx_1f_0b.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 50d7d56f..00000000 --- a/audio/sfx/sfx_1f_0c.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index b329482b..00000000 --- a/audio/sfx/sfx_1f_0d.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 7b36809b..00000000 --- a/audio/sfx/sfx_1f_0e.asm +++ /dev/null @@ -1,4 +0,0 @@ -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_11.asm b/audio/sfx/sfx_1f_11.asm deleted file mode 100644 index 503396fb..00000000 --- a/audio/sfx/sfx_1f_11.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 344281f5..00000000 --- a/audio/sfx/sfx_1f_12.asm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 2eab2643..00000000 --- a/audio/sfx/sfx_1f_13.asm +++ /dev/null @@ -1,4 +0,0 @@ -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_67.asm b/audio/sfx/shooting_star.asm index 4bd391a1..f9b03feb 100644 --- a/audio/sfx/sfx_1f_67.asm +++ b/audio/sfx/shooting_star.asm @@ -1,4 +1,4 @@ -SFX_1f_67_Ch1: ; 7c72d (1f:472d) +SFX_Shooting_Star_Ch4: dutycycle 228 unknownsfx0x10 47 unknownsfx0x20 4, 64, 224, 7 @@ -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_02_48.asm b/audio/sfx/shrink_1.asm index 0db1b90d..54731535 100644 --- a/audio/sfx/sfx_02_48.asm +++ b/audio/sfx/shrink_1.asm @@ -1,4 +1,4 @@ -SFX_02_48_Ch1: ; 854e (2:454e) +SFX_Shrink_1_Ch4: duty 1 unknownsfx0x10 23 unknownsfx0x20 15, 215, 0, 6 @@ -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_1f_48.asm b/audio/sfx/shrink_3.asm index c46af22b..b03cbe55 100644 --- a/audio/sfx/sfx_1f_48.asm +++ b/audio/sfx/shrink_3.asm @@ -1,4 +1,4 @@ -SFX_1f_48_Ch1: ; 7c52b (1f:452b) +SFX_Shrink_3_Ch4: duty 1 unknownsfx0x10 23 unknownsfx0x20 15, 215, 0, 6 @@ -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_08_77.asm b/audio/sfx/silph_scope.asm index 84def9b8..ee238262 100644 --- a/audio/sfx/sfx_08_77.asm +++ b/audio/sfx/silph_scope.asm @@ -1,4 +1,4 @@ -SFX_08_77_Ch1: ; 20412 (8:4412) +SFX_Silph_Scope_Ch4: duty 0 unknownsfx0x20 0, 210, 0, 7 unknownsfx0x20 0, 210, 64, 7 @@ -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_1f_66.asm b/audio/sfx/slots_new_spin.asm index 1b581a91..ae1a6d90 100644 --- a/audio/sfx/sfx_1f_66.asm +++ b/audio/sfx/slots_new_spin.asm @@ -1,4 +1,4 @@ -SFX_1f_66_Ch1: ; 7c70f (1f:470f) +SFX_Slots_New_Spin_Ch4: duty 3 unknownsfx0x20 5, 225, 0, 7 unknownsfx0x20 2, 225, 128, 7 @@ -6,10 +6,9 @@ SFX_1f_66_Ch1: ; 7c70f (1f:470f) endchannel -SFX_1f_66_Ch2: ; 7c71e (1f:471e) +SFX_Slots_New_Spin_Ch5: duty 2 unknownsfx0x20 4, 193, 193, 6 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_65.asm b/audio/sfx/slots_reward.asm index b8708858..6923ac71 100644 --- a/audio/sfx/sfx_1f_65.asm +++ b/audio/sfx/slots_reward.asm @@ -1,6 +1,5 @@ -SFX_1f_65_Ch1: ; 7c704 (1f:4704) +SFX_Slots_Reward_Ch4: duty 2 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_64.asm b/audio/sfx/slots_stop_wheel.asm index 703343ad..85d73daf 100644 --- a/audio/sfx/sfx_1f_64.asm +++ b/audio/sfx/slots_stop_wheel.asm @@ -1,7 +1,6 @@ -SFX_1f_64_Ch1: ; 7c6f5 (1f:46f5) +SFX_Slots_Stop_Wheel_Ch4: duty 2 unknownsfx0x20 1, 242, 160, 6 unknownsfx0x20 1, 242, 224, 6 unknownsfx0x20 8, 241, 0, 7 endchannel -; 0x7c704
\ No newline at end of file diff --git a/audio/sfx/sfx_02_01.asm b/audio/sfx/snare1_1.asm index e92c35b8..aae0ef28 100644 --- a/audio/sfx/sfx_02_01.asm +++ b/audio/sfx/snare1_1.asm @@ -1,4 +1,3 @@ -SFX_02_01_Ch1: ; 82fd (2:42fd) +SFX_Snare1_1_Ch7: unknownnoise0x20 0, 193, 51 endchannel -; 0x8301
\ No newline at end of file diff --git a/audio/sfx/sfx_08_01.asm b/audio/sfx/snare1_2.asm index e5e03793..e5013081 100644 --- a/audio/sfx/sfx_08_01.asm +++ b/audio/sfx/snare1_2.asm @@ -1,4 +1,3 @@ -SFX_08_01_Ch1: ; 202fd (8:42fd) +SFX_Snare1_2_Ch7: unknownnoise0x20 0, 193, 51 endchannel -; 0x20301
\ No newline at end of file diff --git a/audio/sfx/snare1_3.asm b/audio/sfx/snare1_3.asm new file mode 100644 index 00000000..4ffffa7f --- /dev/null +++ b/audio/sfx/snare1_3.asm @@ -0,0 +1,3 @@ +SFX_Snare1_3_Ch7: + unknownnoise0x20 0, 193, 51 + endchannel diff --git a/audio/sfx/sfx_02_02.asm b/audio/sfx/snare2_1.asm index ca252725..286e397a 100644 --- a/audio/sfx/sfx_02_02.asm +++ b/audio/sfx/snare2_1.asm @@ -1,4 +1,3 @@ -SFX_02_02_Ch1: ; 8301 (2:4301) +SFX_Snare2_1_Ch7: unknownnoise0x20 0, 177, 51 endchannel -; 0x8305
\ No newline at end of file diff --git a/audio/sfx/sfx_08_02.asm b/audio/sfx/snare2_2.asm index d86123b5..a3718612 100644 --- a/audio/sfx/sfx_08_02.asm +++ b/audio/sfx/snare2_2.asm @@ -1,4 +1,3 @@ -SFX_08_02_Ch1: ; 20301 (8:4301) +SFX_Snare2_2_Ch7: unknownnoise0x20 0, 177, 51 endchannel -; 0x20305
\ No newline at end of file diff --git a/audio/sfx/snare2_3.asm b/audio/sfx/snare2_3.asm new file mode 100644 index 00000000..67f8c7fb --- /dev/null +++ b/audio/sfx/snare2_3.asm @@ -0,0 +1,3 @@ +SFX_Snare2_3_Ch7: + unknownnoise0x20 0, 177, 51 + endchannel diff --git a/audio/sfx/sfx_02_03.asm b/audio/sfx/snare3_1.asm index 4eb687a8..686b4561 100644 --- a/audio/sfx/sfx_02_03.asm +++ b/audio/sfx/snare3_1.asm @@ -1,4 +1,3 @@ -SFX_02_03_Ch1: ; 8305 (2:4305) +SFX_Snare3_1_Ch7: unknownnoise0x20 0, 161, 51 endchannel -; 0x8309
\ No newline at end of file diff --git a/audio/sfx/sfx_08_03.asm b/audio/sfx/snare3_2.asm index 9b29488f..f8236d40 100644 --- a/audio/sfx/sfx_08_03.asm +++ b/audio/sfx/snare3_2.asm @@ -1,4 +1,3 @@ -SFX_08_03_Ch1: ; 20305 (8:4305) +SFX_Snare3_2_Ch7: unknownnoise0x20 0, 161, 51 endchannel -; 0x20309
\ No newline at end of file diff --git a/audio/sfx/snare3_3.asm b/audio/sfx/snare3_3.asm new file mode 100644 index 00000000..3b52bac9 --- /dev/null +++ b/audio/sfx/snare3_3.asm @@ -0,0 +1,3 @@ +SFX_Snare3_3_Ch7: + unknownnoise0x20 0, 161, 51 + endchannel diff --git a/audio/sfx/sfx_02_04.asm b/audio/sfx/snare4_1.asm index 45caab6b..35d58dba 100644 --- a/audio/sfx/sfx_02_04.asm +++ b/audio/sfx/snare4_1.asm @@ -1,4 +1,3 @@ -SFX_02_04_Ch1: ; 8309 (2:4309) +SFX_Snare4_1_Ch7: unknownnoise0x20 0, 129, 51 endchannel -; 0x830d
\ No newline at end of file diff --git a/audio/sfx/sfx_08_04.asm b/audio/sfx/snare4_2.asm index 63c3b508..713f8996 100644 --- a/audio/sfx/sfx_08_04.asm +++ b/audio/sfx/snare4_2.asm @@ -1,4 +1,3 @@ -SFX_08_04_Ch1: ; 20309 (8:4309) +SFX_Snare4_2_Ch7: unknownnoise0x20 0, 129, 51 endchannel -; 0x2030d
\ No newline at end of file diff --git a/audio/sfx/snare4_3.asm b/audio/sfx/snare4_3.asm new file mode 100644 index 00000000..231193e1 --- /dev/null +++ b/audio/sfx/snare4_3.asm @@ -0,0 +1,3 @@ +SFX_Snare4_3_Ch7: + unknownnoise0x20 0, 129, 51 + endchannel diff --git a/audio/sfx/sfx_02_05.asm b/audio/sfx/snare5_1.asm index 156254e5..54106d58 100644 --- a/audio/sfx/sfx_02_05.asm +++ b/audio/sfx/snare5_1.asm @@ -1,4 +1,4 @@ -SFX_02_05_Ch1: ; 830d (2:430d) +SFX_Snare5_1_Ch7: unknownnoise0x20 7, 132, 55 unknownnoise0x20 6, 132, 54 unknownnoise0x20 5, 131, 53 @@ -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_08_05.asm b/audio/sfx/snare5_2.asm index 6fcd5f68..f7f55eb5 100644 --- a/audio/sfx/sfx_08_05.asm +++ b/audio/sfx/snare5_2.asm @@ -1,4 +1,4 @@ -SFX_08_05_Ch1: ; 2030d (8:430d) +SFX_Snare5_2_Ch7: unknownnoise0x20 7, 132, 55 unknownnoise0x20 6, 132, 54 unknownnoise0x20 5, 131, 53 @@ -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_1f_05.asm b/audio/sfx/snare5_3.asm index 3db77f2e..76dc3966 100644 --- a/audio/sfx/sfx_1f_05.asm +++ b/audio/sfx/snare5_3.asm @@ -1,4 +1,4 @@ -SFX_1f_05_Ch1: ; 7c30d (1f:430d) +SFX_Snare5_3_Ch7: unknownnoise0x20 7, 132, 55 unknownnoise0x20 6, 132, 54 unknownnoise0x20 5, 131, 53 @@ -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_02_08.asm b/audio/sfx/snare6_1.asm index 4efce48f..97c0241d 100644 --- a/audio/sfx/sfx_02_08.asm +++ b/audio/sfx/snare6_1.asm @@ -1,4 +1,3 @@ -SFX_02_08_Ch1: ; 832b (2:432b) +SFX_Snare6_1_Ch7: unknownnoise0x20 0, 129, 16 endchannel -; 0x832f
\ No newline at end of file diff --git a/audio/sfx/sfx_08_08.asm b/audio/sfx/snare6_2.asm index 4d28817b..797d5518 100644 --- a/audio/sfx/sfx_08_08.asm +++ b/audio/sfx/snare6_2.asm @@ -1,4 +1,3 @@ -SFX_08_08_Ch1: ; 2032b (8:432b) +SFX_Snare6_2_Ch7: unknownnoise0x20 0, 129, 16 endchannel -; 0x2032f
\ No newline at end of file diff --git a/audio/sfx/snare6_3.asm b/audio/sfx/snare6_3.asm new file mode 100644 index 00000000..28fc695a --- /dev/null +++ b/audio/sfx/snare6_3.asm @@ -0,0 +1,3 @@ +SFX_Snare6_3_Ch7: + unknownnoise0x20 0, 129, 16 + endchannel diff --git a/audio/sfx/sfx_02_09.asm b/audio/sfx/snare7_1.asm index bb04efca..1b54eefa 100644 --- a/audio/sfx/sfx_02_09.asm +++ b/audio/sfx/snare7_1.asm @@ -1,4 +1,3 @@ -SFX_02_09_Ch1: ; 832f (2:432f) +SFX_Snare7_1_Ch7: unknownnoise0x20 0, 130, 35 endchannel -; 0x8333
\ No newline at end of file diff --git a/audio/sfx/sfx_08_09.asm b/audio/sfx/snare7_2.asm index 94eac4b0..e480f87f 100644 --- a/audio/sfx/sfx_08_09.asm +++ b/audio/sfx/snare7_2.asm @@ -1,4 +1,3 @@ -SFX_08_09_Ch1: ; 2032f (8:432f) +SFX_Snare7_2_Ch7: unknownnoise0x20 0, 130, 35 endchannel -; 0x20333
\ No newline at end of file diff --git a/audio/sfx/snare7_3.asm b/audio/sfx/snare7_3.asm new file mode 100644 index 00000000..b57dfc13 --- /dev/null +++ b/audio/sfx/snare7_3.asm @@ -0,0 +1,3 @@ +SFX_Snare7_3_Ch7: + unknownnoise0x20 0, 130, 35 + endchannel diff --git a/audio/sfx/sfx_02_0a.asm b/audio/sfx/snare8_1.asm index 128c9a74..1a0f74a3 100644 --- a/audio/sfx/sfx_02_0a.asm +++ b/audio/sfx/snare8_1.asm @@ -1,4 +1,3 @@ -SFX_02_0a_Ch1: ; 8333 (2:4333) +SFX_Snare8_1_Ch7: unknownnoise0x20 0, 130, 37 endchannel -; 0x8337
\ No newline at end of file diff --git a/audio/sfx/sfx_08_0a.asm b/audio/sfx/snare8_2.asm index c7a3a090..87619598 100644 --- a/audio/sfx/sfx_08_0a.asm +++ b/audio/sfx/snare8_2.asm @@ -1,4 +1,3 @@ -SFX_08_0a_Ch1: ; 20333 (8:4333) +SFX_Snare8_2_Ch7: unknownnoise0x20 0, 130, 37 endchannel -; 0x20337
\ No newline at end of file diff --git a/audio/sfx/snare8_3.asm b/audio/sfx/snare8_3.asm new file mode 100644 index 00000000..54076c8e --- /dev/null +++ b/audio/sfx/snare8_3.asm @@ -0,0 +1,3 @@ +SFX_Snare8_3_Ch7: + unknownnoise0x20 0, 130, 37 + endchannel diff --git a/audio/sfx/sfx_02_0b.asm b/audio/sfx/snare9_1.asm index de643bd6..6923bb09 100644 --- a/audio/sfx/sfx_02_0b.asm +++ b/audio/sfx/snare9_1.asm @@ -1,4 +1,3 @@ -SFX_02_0b_Ch1: ; 8337 (2:4337) +SFX_Snare9_1_Ch7: unknownnoise0x20 0, 130, 38 endchannel -; 0x833b
\ No newline at end of file diff --git a/audio/sfx/sfx_08_0b.asm b/audio/sfx/snare9_2.asm index 8010f4c9..308ae7f6 100644 --- a/audio/sfx/sfx_08_0b.asm +++ b/audio/sfx/snare9_2.asm @@ -1,4 +1,3 @@ -SFX_08_0b_Ch1: ; 20337 (8:4337) +SFX_Snare9_2_Ch7: unknownnoise0x20 0, 130, 38 endchannel -; 0x2033b
\ No newline at end of file diff --git a/audio/sfx/snare9_3.asm b/audio/sfx/snare9_3.asm new file mode 100644 index 00000000..ffbdc454 --- /dev/null +++ b/audio/sfx/snare9_3.asm @@ -0,0 +1,3 @@ +SFX_Snare9_3_Ch7: + unknownnoise0x20 0, 130, 38 + endchannel diff --git a/audio/sfx/sfx_02_54.asm b/audio/sfx/ss_anne_horn_1.asm index 4f3343fb..38407f24 100644 --- a/audio/sfx/sfx_02_54.asm +++ b/audio/sfx/ss_anne_horn_1.asm @@ -1,4 +1,4 @@ -SFX_02_54_Ch1: ; 866d (2:466d) +SFX_SS_Anne_Horn_1_Ch4: duty 2 unknownsfx0x20 15, 240, 0, 5 unknownsfx0x20 4, 0, 0, 0 @@ -10,7 +10,7 @@ SFX_02_54_Ch1: ; 866d (2:466d) endchannel -SFX_02_54_Ch2: ; 868c (2:468c) +SFX_SS_Anne_Horn_1_Ch5: duty 3 unknownsfx0x20 15, 240, 130, 4 unknownsfx0x20 4, 0, 0, 0 @@ -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_1f_54.asm b/audio/sfx/ss_anne_horn_3.asm index acdc3da5..3162f664 100644 --- a/audio/sfx/sfx_1f_54.asm +++ b/audio/sfx/ss_anne_horn_3.asm @@ -1,4 +1,4 @@ -SFX_1f_54_Ch1: ; 7c64a (1f:464a) +SFX_SS_Anne_Horn_3_Ch4: duty 2 unknownsfx0x20 15, 240, 0, 5 unknownsfx0x20 4, 0, 0, 0 @@ -10,7 +10,7 @@ SFX_1f_54_Ch1: ; 7c64a (1f:464a) endchannel -SFX_1f_54_Ch2: ; 7c669 (1f:4669) +SFX_SS_Anne_Horn_3_Ch5: duty 3 unknownsfx0x20 15, 240, 130, 4 unknownsfx0x20 4, 0, 0, 0 @@ -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_02_3f.asm b/audio/sfx/start_menu_1.asm index b7009e79..3a979b44 100644 --- a/audio/sfx/sfx_02_3f.asm +++ b/audio/sfx/start_menu_1.asm @@ -1,5 +1,4 @@ -SFX_02_3f_Ch1: ; 83c3 (2:43c3) +SFX_Start_Menu_1_Ch7: unknownnoise0x20 1, 226, 51 unknownnoise0x20 8, 225, 34 endchannel -; 0x83ca
\ No newline at end of file diff --git a/audio/sfx/sfx_08_3f.asm b/audio/sfx/start_menu_2.asm index a834f917..2706f555 100644 --- a/audio/sfx/sfx_08_3f.asm +++ b/audio/sfx/start_menu_2.asm @@ -1,5 +1,4 @@ -SFX_08_3f_Ch1: ; 203d6 (8:43d6) +SFX_Start_Menu_2_Ch7: unknownnoise0x20 1, 226, 51 unknownnoise0x20 8, 225, 34 endchannel -; 0x203dd
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_3f.asm b/audio/sfx/start_menu_3.asm index de7a44cf..4b16cea4 100644 --- a/audio/sfx/sfx_1f_3f.asm +++ b/audio/sfx/start_menu_3.asm @@ -1,5 +1,4 @@ -SFX_1f_3f_Ch1: ; 7c3c3 (1f:43c3) +SFX_Start_Menu_3_Ch7: unknownnoise0x20 1, 226, 51 unknownnoise0x20 8, 225, 34 endchannel -; 0x7c3ca
\ No newline at end of file diff --git a/audio/sfx/sfx_08_5a.asm b/audio/sfx/super_effective.asm index 6d9994ab..63ba35e8 100644 --- a/audio/sfx/sfx_08_5a.asm +++ b/audio/sfx/super_effective.asm @@ -1,5 +1,4 @@ -SFX_08_5a_Ch1: ; 20574 (8:4574) +SFX_Super_Effective_Ch7: unknownnoise0x20 4, 241, 52 unknownnoise0x20 15, 242, 100 endchannel -; 0x2057b
\ No newline at end of file diff --git a/audio/sfx/sfx_02_58.asm b/audio/sfx/swap_1.asm index b98ad41e..95a31fcd 100644 --- a/audio/sfx/sfx_02_58.asm +++ b/audio/sfx/swap_1.asm @@ -1,12 +1,11 @@ -SFX_02_58_Ch1: ; 83f8 (2:43f8) +SFX_Swap_1_Ch4: duty 2 unknownsfx0x20 8, 225, 64, 7 endchannel -SFX_02_58_Ch2: ; 83ff (2:43ff) +SFX_Swap_1_Ch5: duty 2 unknownsfx0x20 2, 8, 0, 0 unknownsfx0x20 8, 177, 65, 7 endchannel -; 0x840a
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_58.asm b/audio/sfx/swap_3.asm index ac61fe40..6ed97d7d 100644 --- a/audio/sfx/sfx_1f_58.asm +++ b/audio/sfx/swap_3.asm @@ -1,12 +1,11 @@ -SFX_1f_58_Ch1: ; 7c3e1 (1f:43e1) +SFX_Swap_3_Ch4: duty 2 unknownsfx0x20 8, 225, 64, 7 endchannel -SFX_1f_58_Ch2: ; 7c3e8 (1f:43e8) +SFX_Swap_3_Ch5: duty 2 unknownsfx0x20 2, 8, 0, 0 unknownsfx0x20 8, 177, 65, 7 endchannel -; 0x7c3f3
\ No newline at end of file diff --git a/audio/sfx/sfx_02_49.asm b/audio/sfx/switch_1.asm index b19c3fcc..ee15dc20 100644 --- a/audio/sfx/sfx_02_49.asm +++ b/audio/sfx/switch_1.asm @@ -1,4 +1,4 @@ -SFX_02_49_Ch1: ; 8569 (2:4569) +SFX_Switch_1_Ch4: duty 2 unknownsfx0x20 4, 0, 0, 0 unknownsfx0x20 2, 241, 128, 6 @@ -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_1f_49.asm b/audio/sfx/switch_3.asm index 0f20dcd3..d98a7f29 100644 --- a/audio/sfx/sfx_1f_49.asm +++ b/audio/sfx/switch_3.asm @@ -1,4 +1,4 @@ -SFX_1f_49_Ch1: ; 7c546 (1f:4546) +SFX_Switch_3_Ch4: duty 2 unknownsfx0x20 4, 0, 0, 0 unknownsfx0x20 2, 241, 128, 6 @@ -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_02_4c.asm b/audio/sfx/teleport_enter1_1.asm index b9063058..60c87cab 100644 --- a/audio/sfx/sfx_02_4c.asm +++ b/audio/sfx/teleport_enter1_1.asm @@ -1,4 +1,4 @@ -SFX_02_4c_Ch1: ; 85b0 (2:45b0) +SFX_Teleport_Enter1_1_Ch4: duty 1 unknownsfx0x10 23 unknownsfx0x20 15, 215, 0, 7 @@ -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_1f_4c.asm b/audio/sfx/teleport_enter1_3.asm index 811d4bc7..d3dab8b4 100644 --- a/audio/sfx/sfx_1f_4c.asm +++ b/audio/sfx/teleport_enter1_3.asm @@ -1,4 +1,4 @@ -SFX_1f_4c_Ch1: ; 7c58d (1f:458d) +SFX_Teleport_Enter1_3_Ch4: duty 1 unknownsfx0x10 23 unknownsfx0x20 15, 215, 0, 7 @@ -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_02_4f.asm b/audio/sfx/teleport_enter2_1.asm index 32ebf8cc..53eb3335 100644 --- a/audio/sfx/sfx_02_4f.asm +++ b/audio/sfx/teleport_enter2_1.asm @@ -1,7 +1,6 @@ -SFX_02_4f_Ch1: ; 85e1 (2:45e1) +SFX_Teleport_Enter2_1_Ch7: unknownnoise0x20 2, 241, 50 unknownnoise0x20 2, 0, 0 unknownnoise0x20 2, 241, 34 unknownnoise0x20 1, 0, 0 endchannel -; 0x85ee
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_4f.asm b/audio/sfx/teleport_enter2_3.asm index aab678ab..8b7c7894 100644 --- a/audio/sfx/sfx_1f_4f.asm +++ b/audio/sfx/teleport_enter2_3.asm @@ -1,7 +1,6 @@ -SFX_1f_4f_Ch1: ; 7c5be (1f:45be) +SFX_Teleport_Enter2_3_Ch7: unknownnoise0x20 2, 241, 50 unknownnoise0x20 2, 0, 0 unknownnoise0x20 2, 241, 34 unknownnoise0x20 1, 0, 0 endchannel -; 0x7c5cb
\ No newline at end of file diff --git a/audio/sfx/sfx_02_4b.asm b/audio/sfx/teleport_exit1_1.asm index 923aa8e7..084c116f 100644 --- a/audio/sfx/sfx_02_4b.asm +++ b/audio/sfx/teleport_exit1_1.asm @@ -1,4 +1,4 @@ -SFX_02_4b_Ch1: ; 8595 (2:4595) +SFX_Teleport_Exit1_1_Ch4: duty 1 unknownsfx0x10 23 unknownsfx0x20 15, 215, 0, 5 @@ -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_1f_4b.asm b/audio/sfx/teleport_exit1_3.asm index c4d33187..b3a26af8 100644 --- a/audio/sfx/sfx_1f_4b.asm +++ b/audio/sfx/teleport_exit1_3.asm @@ -1,4 +1,4 @@ -SFX_1f_4b_Ch1: ; 7c572 (1f:4572) +SFX_Teleport_Exit1_3_Ch4: duty 1 unknownsfx0x10 23 unknownsfx0x20 15, 215, 0, 5 @@ -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_02_4d.asm b/audio/sfx/teleport_exit2_1.asm index 1d492dde..4b168bb9 100644 --- a/audio/sfx/sfx_02_4d.asm +++ b/audio/sfx/teleport_exit2_1.asm @@ -1,7 +1,6 @@ -SFX_02_4d_Ch1: ; 85cb (2:45cb) +SFX_Teleport_Exit2_1_Ch4: duty 1 unknownsfx0x10 22 unknownsfx0x20 15, 210, 0, 5 unknownsfx0x10 8 endchannel -; 0x85d6
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_4d.asm b/audio/sfx/teleport_exit2_3.asm index 8dcb0a8b..171e59d8 100644 --- a/audio/sfx/sfx_1f_4d.asm +++ b/audio/sfx/teleport_exit2_3.asm @@ -1,7 +1,6 @@ -SFX_1f_4d_Ch1: ; 7c5a8 (1f:45a8) +SFX_Teleport_Exit2_3_Ch4: duty 1 unknownsfx0x10 22 unknownsfx0x20 15, 210, 0, 5 unknownsfx0x10 8 endchannel -; 0x7c5b3
\ No newline at end of file diff --git a/audio/sfx/sfx_02_3c.asm b/audio/sfx/tink_1.asm index e695705e..c1f5f00c 100644 --- a/audio/sfx/sfx_02_3c.asm +++ b/audio/sfx/tink_1.asm @@ -1,4 +1,4 @@ -SFX_02_3c_Ch1: ; 840a (2:440a) +SFX_Tink_1_Ch4: duty 2 unknownsfx0x10 58 unknownsfx0x20 4, 242, 0, 2 @@ -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_08_3c.asm b/audio/sfx/tink_2.asm index e9ebca58..bab45323 100644 --- a/audio/sfx/sfx_08_3c.asm +++ b/audio/sfx/tink_2.asm @@ -1,4 +1,4 @@ -SFX_08_3c_Ch1: ; 203dd (8:43dd) +SFX_Tink_2_Ch4: duty 2 unknownsfx0x10 58 unknownsfx0x20 4, 242, 0, 2 @@ -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_1f_3c.asm b/audio/sfx/tink_3.asm index fb476203..a9cf73ec 100644 --- a/audio/sfx/sfx_1f_3c.asm +++ b/audio/sfx/tink_3.asm @@ -1,4 +1,4 @@ -SFX_1f_3c_Ch1: ; 7c3f3 (1f:43f3) +SFX_Tink_3_Ch4: duty 2 unknownsfx0x10 58 unknownsfx0x20 4, 242, 0, 2 @@ -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_02_44.asm b/audio/sfx/trade_machine_1.asm index 8ecfc89b..2f67936b 100644 --- a/audio/sfx/sfx_02_44.asm +++ b/audio/sfx/trade_machine_1.asm @@ -1,8 +1,7 @@ -SFX_02_44_Ch1: ; 84ee (2:44ee) +SFX_Trade_Machine_1_Ch4: duty 2 unknownsfx0x10 21 unknownsfx0x20 15, 240, 240, 4 unknownsfx0x20 15, 242, 80, 6 unknownsfx0x10 8 endchannel -; 0x84fd
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_44.asm b/audio/sfx/trade_machine_3.asm index bc2ff935..b590455e 100644 --- a/audio/sfx/sfx_1f_44.asm +++ b/audio/sfx/trade_machine_3.asm @@ -1,8 +1,7 @@ -SFX_1f_44_Ch1: ; 7c4c7 (1f:44c7) +SFX_Trade_Machine_3_Ch4: duty 2 unknownsfx0x10 21 unknownsfx0x20 15, 240, 240, 4 unknownsfx0x20 15, 242, 80, 6 unknownsfx0x10 8 endchannel -; 0x7c4d6
\ No newline at end of file diff --git a/audio/sfx/sfx_02_06.asm b/audio/sfx/triangle1_1.asm index 03f8d4aa..957dc63f 100644 --- a/audio/sfx/sfx_02_06.asm +++ b/audio/sfx/triangle1_1.asm @@ -1,4 +1,3 @@ -SFX_02_06_Ch1: ; 8320 (2:4320) +SFX_Triangle1_1_Ch7: unknownnoise0x20 0, 81, 42 endchannel -; 0x8324
\ No newline at end of file diff --git a/audio/sfx/triangle1_2.asm b/audio/sfx/triangle1_2.asm new file mode 100644 index 00000000..535448cd --- /dev/null +++ b/audio/sfx/triangle1_2.asm @@ -0,0 +1,3 @@ +SFX_Triangle1_2_Ch7: + unknownnoise0x20 0, 81, 42 + endchannel diff --git a/audio/sfx/triangle1_3.asm b/audio/sfx/triangle1_3.asm new file mode 100644 index 00000000..a13d00ea --- /dev/null +++ b/audio/sfx/triangle1_3.asm @@ -0,0 +1,3 @@ +SFX_Triangle1_3_Ch7: + unknownnoise0x20 0, 81, 42 + endchannel diff --git a/audio/sfx/sfx_02_07.asm b/audio/sfx/triangle2_1.asm index 02fd9e06..09ba8a67 100644 --- a/audio/sfx/sfx_02_07.asm +++ b/audio/sfx/triangle2_1.asm @@ -1,5 +1,4 @@ -SFX_02_07_Ch1: ; 8324 (2:4324) +SFX_Triangle2_1_Ch7: unknownnoise0x20 1, 65, 43 unknownnoise0x20 0, 97, 42 endchannel -; 0x832b
\ No newline at end of file diff --git a/audio/sfx/sfx_08_07.asm b/audio/sfx/triangle2_2.asm index 5281cc7b..6512648a 100644 --- a/audio/sfx/sfx_08_07.asm +++ b/audio/sfx/triangle2_2.asm @@ -1,5 +1,4 @@ -SFX_08_07_Ch1: ; 20324 (8:4324) +SFX_Triangle2_2_Ch7: unknownnoise0x20 1, 65, 43 unknownnoise0x20 0, 97, 42 endchannel -; 0x2032b
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_07.asm b/audio/sfx/triangle2_3.asm index 69982127..b0612aba 100644 --- a/audio/sfx/sfx_1f_07.asm +++ b/audio/sfx/triangle2_3.asm @@ -1,5 +1,4 @@ -SFX_1f_07_Ch1: ; 7c324 (1f:4324) +SFX_Triangle2_3_Ch7: unknownnoise0x20 1, 65, 43 unknownnoise0x20 0, 97, 42 endchannel -; 0x7c32b
\ No newline at end of file diff --git a/audio/sfx/sfx_02_10.asm b/audio/sfx/triangle3_1.asm index 057fd81b..9fd3952f 100644 --- a/audio/sfx/sfx_02_10.asm +++ b/audio/sfx/triangle3_1.asm @@ -1,5 +1,4 @@ -SFX_02_10_Ch1: ; 834e (2:434e) +SFX_Triangle3_1_Ch7: unknownnoise0x20 2, 145, 40 unknownnoise0x20 0, 113, 24 endchannel -; 0x8355
\ No newline at end of file diff --git a/audio/sfx/sfx_08_10.asm b/audio/sfx/triangle3_2.asm index cc94f730..38b3198b 100644 --- a/audio/sfx/sfx_08_10.asm +++ b/audio/sfx/triangle3_2.asm @@ -1,5 +1,4 @@ -SFX_08_10_Ch1: ; 2034e (8:434e) +SFX_Triangle3_2_Ch7: unknownnoise0x20 2, 145, 40 unknownnoise0x20 0, 113, 24 endchannel -; 0x20355
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_10.asm b/audio/sfx/triangle3_3.asm index 049d47a8..138c8fac 100644 --- a/audio/sfx/sfx_1f_10.asm +++ b/audio/sfx/triangle3_3.asm @@ -1,5 +1,4 @@ -SFX_1f_10_Ch1: ; 7c34e (1f:434e) +SFX_Triangle3_3_Ch7: unknownnoise0x20 2, 145, 40 unknownnoise0x20 0, 113, 24 endchannel -; 0x7c355
\ No newline at end of file diff --git a/audio/sfx/sfx_02_46.asm b/audio/sfx/turn_off_pc_1.asm index 64d4acce..6b2561fe 100644 --- a/audio/sfx/sfx_02_46.asm +++ b/audio/sfx/turn_off_pc_1.asm @@ -1,8 +1,7 @@ -SFX_02_46_Ch1: ; 8528 (2:4528) +SFX_Turn_Off_PC_1_Ch4: duty 2 unknownsfx0x20 4, 240, 0, 6 unknownsfx0x20 4, 240, 0, 4 unknownsfx0x20 4, 240, 0, 2 unknownsfx0x20 1, 0, 0, 0 endchannel -; 0x853b
\ No newline at end of file diff --git a/audio/sfx/sfx_1f_46.asm b/audio/sfx/turn_off_pc_3.asm index 4e9026b7..cf6d95cd 100644 --- a/audio/sfx/sfx_1f_46.asm +++ b/audio/sfx/turn_off_pc_3.asm @@ -1,8 +1,7 @@ -SFX_1f_46_Ch1: ; 7c505 (1f:4505) +SFX_Turn_Off_PC_3_Ch4: duty 2 unknownsfx0x20 4, 240, 0, 6 unknownsfx0x20 4, 240, 0, 4 unknownsfx0x20 4, 240, 0, 2 unknownsfx0x20 1, 0, 0, 0 endchannel -; 0x7c518
\ No newline at end of file diff --git a/audio/sfx/sfx_02_45.asm b/audio/sfx/turn_on_pc_1.asm index d06160b0..dede7c3e 100644 --- a/audio/sfx/sfx_02_45.asm +++ b/audio/sfx/turn_on_pc_1.asm @@ -1,4 +1,4 @@ -SFX_02_45_Ch1: ; 84fd (2:44fd) +SFX_Turn_On_PC_1_Ch4: duty 2 unknownsfx0x20 15, 242, 192, 7 unknownsfx0x20 15, 0, 0, 0 @@ -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_1f_45.asm b/audio/sfx/turn_on_pc_3.asm index c2f734ad..1ed54d3c 100644 --- a/audio/sfx/sfx_1f_45.asm +++ b/audio/sfx/turn_on_pc_3.asm @@ -1,4 +1,4 @@ -SFX_1f_45_Ch1: ; 7c4d6 (1f:44d6) +SFX_Turn_On_PC_3_Ch4: duty 2 unknownsfx0x20 15, 242, 192, 7 unknownsfx0x20 15, 0, 0, 0 @@ -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_08_unused2.asm b/audio/sfx/unused2_2.asm index 0bfe4dd3..36c10ba3 100755 --- a/audio/sfx/sfx_08_unused2.asm +++ b/audio/sfx/unused2_2.asm @@ -1,4 +1,4 @@ -SFX_08_unused2_Ch1: ; 2232f (8:632f) +SFX_08_unused2_Ch4: executemusic tempo 256 volume 7, 7 @@ -17,7 +17,7 @@ SFX_08_unused2_Ch1: ; 2232f (8:632f) endchannel -SFX_08_unused2_Ch2: ; 22347 (8:6347) +SFX_08_unused2_Ch5: executemusic vibrato 8, 2, 7 duty 2 @@ -33,7 +33,7 @@ SFX_08_unused2_Ch2: ; 22347 (8:6347) endchannel -SFX_08_unused2_Ch3: ; 22359 (8:6359) +SFX_08_unused2_Ch6: executemusic notetype 6, 1, 0 octave 4 @@ -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_02_unused.asm b/audio/sfx/unused_1.asm index db3a8b26..21d54fb1 100644..100755 --- a/audio/sfx/sfx_02_unused.asm +++ b/audio/sfx/unused_1.asm @@ -1,4 +1,4 @@ -SFX_02_unused_Ch1: ; 86e3 (2:46e3) +SFX_02_unused_Ch4: dutycycle 240 unknownsfx0x20 15, 224, 128, 7 unknownsfx0x20 15, 240, 132, 7 @@ -9,7 +9,7 @@ SFX_02_unused_Ch1: ; 86e3 (2:46e3) endchannel -SFX_02_unused_Ch2: ; 86fe (2:46fe) +SFX_02_unused_Ch5: dutycycle 5 unknownsfx0x20 15, 160, 65, 7 unknownsfx0x20 15, 176, 67, 7 @@ -20,7 +20,7 @@ SFX_02_unused_Ch2: ; 86fe (2:46fe) endchannel -SFX_02_unused_Ch3: ; 8719 (2:4719) +SFX_02_unused_Ch7: unknownnoise0x20 2, 242, 76 unknownnoise0x20 6, 224, 58 unknownnoise0x20 15, 208, 58 @@ -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_unused.asm b/audio/sfx/unused_2.asm index 4ba4c212..20de851f 100755 --- a/audio/sfx/sfx_08_unused.asm +++ b/audio/sfx/unused_2.asm @@ -1,4 +1,4 @@ -SFX_08_unused_Ch1: ; 2098b (8:498b) +SFX_08_unused_Ch4: dutycycle 240 unknownsfx0x20 15, 224, 128, 7 unknownsfx0x20 15, 240, 132, 7 @@ -9,7 +9,7 @@ SFX_08_unused_Ch1: ; 2098b (8:498b) endchannel -SFX_08_unused_Ch2: ; 209a6 (8:49a6) +SFX_08_unused_Ch5: dutycycle 5 unknownsfx0x20 15, 160, 65, 7 unknownsfx0x20 15, 176, 67, 7 @@ -20,7 +20,7 @@ SFX_08_unused_Ch2: ; 209a6 (8:49a6) endchannel -SFX_08_unused_Ch3: ; 209c1 (8:49c1) +SFX_08_unused_Ch7: unknownnoise0x20 2, 242, 76 unknownnoise0x20 6, 224, 58 unknownnoise0x20 15, 208, 58 @@ -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_1f_unused.asm b/audio/sfx/unused_3.asm index 773c069e..d4a30539 100755 --- a/audio/sfx/sfx_1f_unused.asm +++ b/audio/sfx/unused_3.asm @@ -1,4 +1,4 @@ -SFX_1f_unused_Ch1: ; 7c758 (1f:4758) +SFX_1f_unused_Ch4: dutycycle 240 unknownsfx0x20 15, 224, 128, 7 unknownsfx0x20 15, 240, 132, 7 @@ -9,7 +9,7 @@ SFX_1f_unused_Ch1: ; 7c758 (1f:4758) endchannel -SFX_1f_unused_Ch2: ; 7c773 (1f:4773) +SFX_1f_unused_Ch5: dutycycle 5 unknownsfx0x20 15, 160, 65, 7 unknownsfx0x20 15, 176, 67, 7 @@ -20,7 +20,7 @@ SFX_1f_unused_Ch2: ; 7c773 (1f:4773) endchannel -SFX_1f_unused_Ch3: ; 7c78e (1f:478e) +SFX_1f_unused_Ch7: unknownnoise0x20 2, 242, 76 unknownnoise0x20 6, 224, 58 unknownnoise0x20 15, 208, 58 @@ -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/audio/sfx/sfx_08_55.asm b/audio/sfx/vine_whip.asm index 93049b71..ad0bd40b 100644 --- a/audio/sfx/sfx_08_55.asm +++ b/audio/sfx/vine_whip.asm @@ -1,4 +1,4 @@ -SFX_08_55_Ch1: ; 20533 (8:4533) +SFX_Vine_Whip_Ch7: unknownnoise0x20 1, 194, 51 unknownnoise0x20 2, 242, 33 unknownnoise0x20 1, 226, 51 @@ -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_02_55.asm b/audio/sfx/withdraw_deposit_1.asm index ec138968..d7a2f54d 100644 --- a/audio/sfx/sfx_02_55.asm +++ b/audio/sfx/withdraw_deposit_1.asm @@ -1,4 +1,4 @@ -SFX_02_55_Ch1: ; 86ab (2:46ab) +SFX_Withdraw_Deposit_1_Ch4: duty 1 unknownsfx0x10 58 unknownsfx0x20 4, 242, 0, 5 @@ -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_1f_55.asm b/audio/sfx/withdraw_deposit_3.asm index 9a27c885..1fd1fe3e 100644 --- a/audio/sfx/sfx_1f_55.asm +++ b/audio/sfx/withdraw_deposit_3.asm @@ -1,4 +1,4 @@ -SFX_1f_55_Ch1: ; 7c688 (1f:4688) +SFX_Withdraw_Deposit_3_Ch4: duty 1 unknownsfx0x10 58 unknownsfx0x20 4, 242, 0, 5 @@ -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/blue.asm b/blue.asm deleted file mode 100644 index c8c50a5d..00000000 --- a/blue.asm +++ /dev/null @@ -1,2 +0,0 @@ -_BLUE EQU 1 -INCLUDE "charmap.asm" diff --git a/blue/audio.asm b/blue/audio.asm deleted file mode 100644 index 53e37a2d..00000000 --- a/blue/audio.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "blue.asm" -INCLUDE "audio.asm" diff --git a/blue/main.asm b/blue/main.asm deleted file mode 100644 index 3fcef980..00000000 --- a/blue/main.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "blue.asm" -INCLUDE "main.asm" diff --git a/blue/text.asm b/blue/text.asm deleted file mode 100644 index ec6d7203..00000000 --- a/blue/text.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "blue.asm" -INCLUDE "text.asm" diff --git a/blue/wram.asm b/blue/wram.asm deleted file mode 100644 index 70292177..00000000 --- a/blue/wram.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "blue.asm" -INCLUDE "wram.asm" diff --git a/charmap.asm b/charmap.asm index 980c79a3..4b5278c6 100644 --- a/charmap.asm +++ b/charmap.asm @@ -147,9 +147,17 @@ charmap "ゅ", $E1 charmap "ょ", $E2 charmap "ー", $E3 +charmap "<pkmn>", $4A ; PkMn charmap "@", $50 +charmap "<PLAYER>", $52 +charmap "<RIVAL>", $53 charmap "#", $54 ;charmap "POKé", $54 +charmap "<TARGET>", $59 +charmap "<USER>", $5A +charmap "′", $71 +charmap "″", $73 +charmap "№", $74 charmap "…", $75 charmap "┌", $79 @@ -159,8 +167,6 @@ charmap "│", $7C charmap "└", $7D charmap "┘", $7E -charmap "№", $74 - charmap " ", $7F charmap "A", $80 charmap "B", $81 @@ -226,17 +232,24 @@ charmap "'l", $BC charmap "'s", $BD charmap "'t", $BE charmap "'v", $BF + charmap "'", $E0 + charmap "-", $E3 charmap "'r", $E4 charmap "'m", $E5 charmap "?", $E6 charmap "!", $E7 charmap ".", $E8 + +charmap "▷", $EC charmap "▶", $ED +charmap "▲", $ED +charmap "▼", $EE charmap "♂", $EF charmap "¥", $F0 charmap "×", $F1 +charmap "⠄", $F2 charmap "/", $F3 charmap ",", $F4 charmap "♀", $F5 diff --git a/constants.asm b/constants.asm index 0b24ea05..c8e5a78d 100644 --- a/constants.asm +++ b/constants.asm @@ -1,4 +1,5 @@ INCLUDE "macros.asm" +INCLUDE "charmap.asm" INCLUDE "hram.asm" INCLUDE "vram.asm" @@ -7,8 +8,6 @@ INCLUDE "constants/hardware_constants.asm" INCLUDE "constants/oam_constants.asm" INCLUDE "constants/misc_constants.asm" -INCLUDE "constants/wram_constants.asm" - INCLUDE "constants/pokemon_constants.asm" INCLUDE "constants/pokedex_constants.asm" INCLUDE "constants/trainer_constants.asm" @@ -23,10 +22,11 @@ INCLUDE "constants/palette_constants.asm" INCLUDE "constants/evolution_constants.asm" INCLUDE "constants/list_constants.asm" INCLUDE "constants/map_constants.asm" -INCLUDE "constants/map_dimensions.asm" INCLUDE "constants/connection_constants.asm" INCLUDE "constants/hide_show_constants.asm" INCLUDE "constants/credits_constants.asm" INCLUDE "constants/music_constants.asm" INCLUDE "constants/tilesets.asm" INCLUDE "constants/starter_mons.asm" +INCLUDE "constants/event_constants.asm" +INCLUDE "constants/text_constants.asm" diff --git a/constants/connection_constants.asm b/constants/connection_constants.asm index 389ba867..154c4163 100755 --- a/constants/connection_constants.asm +++ b/constants/connection_constants.asm @@ -1,5 +1,9 @@ -; connection directions
-EAST EQU 1
-WEST EQU 2
-SOUTH EQU 4
-NORTH EQU 8
\ No newline at end of file +; width of east/west connections +; height of north/south connections +MAP_BORDER EQU 3 + +; connection directions +EAST EQU 1 +WEST EQU 2 +SOUTH EQU 4 +NORTH EQU 8 diff --git a/constants/credits_constants.asm b/constants/credits_constants.asm index 1291dc13..f5715072 100644 --- a/constants/credits_constants.asm +++ b/constants/credits_constants.asm @@ -1,65 +1,67 @@ -CRED_VERSION EQU $00 -CRED_TAJIRI EQU $01 -CRED_TA_OOTA EQU $02 -CRED_MORIMOTO EQU $03 -CRED_WATANABE EQU $04 -CRED_MASUDE EQU $05 -CRED_NISINO EQU $06 -CRED_SUGIMORI EQU $07 -CRED_NISHIDA EQU $08 -CRED_MIYAMOTO EQU $09 -CRED_KAWAGUCHI EQU $0A -CRED_ISHIHARA EQU $0B -CRED_YAMAUCHI EQU $0C -CRED_ZINNAI EQU $0D -CRED_HISHIDA EQU $0E -CRED_SAKAI EQU $0F -CRED_YAMAGUCHI EQU $10 -CRED_YAMAMOTO EQU $11 -CRED_TANIGUCHI EQU $12 -CRED_NONOMURA EQU $13 -CRED_FUZIWARA EQU $14 -CRED_MATSUSIMA EQU $15 -CRED_TOMISAWA EQU $16 -CRED_KAWAMOTO EQU $17 -CRED_KAKEI EQU $18 -CRED_TSUCHIYA EQU $19 -CRED_TA_NAKAMURA EQU $1A -CRED_YUDA EQU $1B -CRED_MON EQU $1C ; Pokemon -CRED_DIRECTOR EQU $1D -CRED_PROGRAMMERS EQU $1E -CRED_CHAR_DESIGN EQU $1F -CRED_MUSIC EQU $20 -CRED_SOUND_EFFECTS EQU $21 -CRED_GAME_DESIGN EQU $22 -CRED_MONSTER_DESIGN EQU $23 -CRED_GAME_SCENE EQU $24 -CRED_PARAM EQU $25 -CRED_MAP EQU $26 -CRED_TEST EQU $27 -CRED_SPECIAL EQU $28 -CRED_PRODUCERS EQU $29 -CRED_PRODUCER EQU $2A -CRED_EXECUTIVE EQU $2B -CRED_TAMADA EQU $2C -CRED_SA_OOTA EQU $2D -CRED_YOSHIKAWA EQU $2E -CRED_TO_OOTA EQU $2F -CRED_US_STAFF EQU $30 -CRED_US_COORD EQU $31 -CRED_TILDEN EQU $32 -CRED_KAWAKAMI EQU $33 -CRED_HI_NAKAMURA EQU $34 -CRED_GIESE EQU $35 -CRED_OSBORNE EQU $36 -CRED_TRANS EQU $37 -CRED_OGASAWARA EQU $38 -CRED_IWATA EQU $39 -CRED_IZUSHI EQU $3A -CRED_HARADA EQU $3B -CRED_MURAKAWA EQU $3C -CRED_FUKUI EQU $3D -CRED_CLUB EQU $3E -CRED_PAAD EQU $3F +const_value = 0 + + const CRED_VERSION ; $00 + const CRED_TAJIRI ; $01 + const CRED_TA_OOTA ; $02 + const CRED_MORIMOTO ; $03 + const CRED_WATANABE ; $04 + const CRED_MASUDE ; $05 + const CRED_NISINO ; $06 + const CRED_SUGIMORI ; $07 + const CRED_NISHIDA ; $08 + const CRED_MIYAMOTO ; $09 + const CRED_KAWAGUCHI ; $0A + const CRED_ISHIHARA ; $0B + const CRED_YAMAUCHI ; $0C + const CRED_ZINNAI ; $0D + const CRED_HISHIDA ; $0E + const CRED_SAKAI ; $0F + const CRED_YAMAGUCHI ; $10 + const CRED_YAMAMOTO ; $11 + const CRED_TANIGUCHI ; $12 + const CRED_NONOMURA ; $13 + const CRED_FUZIWARA ; $14 + const CRED_MATSUSIMA ; $15 + const CRED_TOMISAWA ; $16 + const CRED_KAWAMOTO ; $17 + const CRED_KAKEI ; $18 + const CRED_TSUCHIYA ; $19 + const CRED_TA_NAKAMURA ; $1A + const CRED_YUDA ; $1B + const CRED_MON ; $1C + const CRED_DIRECTOR ; $1D + const CRED_PROGRAMMERS ; $1E + const CRED_CHAR_DESIGN ; $1F + const CRED_MUSIC ; $20 + const CRED_SOUND_EFFECTS ; $21 + const CRED_GAME_DESIGN ; $22 + const CRED_MONSTER_DESIGN ; $23 + const CRED_GAME_SCENE ; $24 + const CRED_PARAM ; $25 + const CRED_MAP ; $26 + const CRED_TEST ; $27 + const CRED_SPECIAL ; $28 + const CRED_PRODUCERS ; $29 + const CRED_PRODUCER ; $2A + const CRED_EXECUTIVE ; $2B + const CRED_TAMADA ; $2C + const CRED_SA_OOTA ; $2D + const CRED_YOSHIKAWA ; $2E + const CRED_TO_OOTA ; $2F + const CRED_US_STAFF ; $30 + const CRED_US_COORD ; $31 + const CRED_TILDEN ; $32 + const CRED_KAWAKAMI ; $33 + const CRED_HI_NAKAMURA ; $34 + const CRED_GIESE ; $35 + const CRED_OSBORNE ; $36 + const CRED_TRANS ; $37 + const CRED_OGASAWARA ; $38 + const CRED_IWATA ; $39 + const CRED_IZUSHI ; $3A + const CRED_HARADA ; $3B + const CRED_MURAKAWA ; $3C + const CRED_FUKUI ; $3D + const CRED_CLUB ; $3E + const CRED_PAAD ; $3F diff --git a/constants/event_constants.asm b/constants/event_constants.asm new file mode 100755 index 00000000..5b73012b --- /dev/null +++ b/constants/event_constants.asm @@ -0,0 +1,2562 @@ +const_value = 0 + + const EVENT_FOLLOWED_OAK_INTO_LAB ; 000, (D747, bit 0) + const EVENT_001 ; 001, (D747, bit 1) + const EVENT_002 ; 002, (D747, bit 2) + const EVENT_HALL_OF_FAME_DEX_RATING ; 003, (D747, bit 3) + const EVENT_004 ; 004, (D747, bit 4) + const EVENT_005 ; 005, (D747, bit 5) + const EVENT_PALLET_AFTER_GETTING_POKEBALLS ; 006, (D747, bit 6) + const EVENT_007 ; 007, (D747, bit 7) + const EVENT_008 ; 008, (D748, bit 0) + const EVENT_009 ; 009, (D748, bit 1) + const EVENT_00A ; 00A, (D748, bit 2) + const EVENT_00B ; 00B, (D748, bit 3) + const EVENT_00C ; 00C, (D748, bit 4) + const EVENT_00D ; 00D, (D748, bit 5) + const EVENT_00E ; 00E, (D748, bit 6) + const EVENT_00F ; 00F, (D748, bit 7) + const EVENT_010 ; 010, (D749, bit 0) + const EVENT_011 ; 011, (D749, bit 1) + const EVENT_012 ; 012, (D749, bit 2) + const EVENT_013 ; 013, (D749, bit 3) + const EVENT_014 ; 014, (D749, bit 4) + const EVENT_015 ; 015, (D749, bit 5) + const EVENT_016 ; 016, (D749, bit 6) + const EVENT_017 ; 017, (D749, bit 7) + const EVENT_GOT_TOWN_MAP ; 018, (D74A, bit 0) + const EVENT_ENTERED_BLUES_HOUSE ; 019, (D74A, bit 1) + const EVENT_DAISY_WALKING ; 01A, (D74A, bit 2) + const EVENT_01B ; 01B, (D74A, bit 3) + const EVENT_01C ; 01C, (D74A, bit 4) + const EVENT_01D ; 01D, (D74A, bit 5) + const EVENT_01E ; 01E, (D74A, bit 6) + const EVENT_01F ; 01F, (D74A, bit 7) + const EVENT_FOLLOWED_OAK_INTO_LAB_2 ; 020, (D74B, bit 0) + const EVENT_OAK_ASKED_TO_CHOOSE_MON ; 021, (D74B, bit 1) + const EVENT_GOT_STARTER ; 022, (D74B, bit 2) + const EVENT_BATTLED_RIVAL_IN_OAKS_LAB ; 023, (D74B, bit 3) + const EVENT_GOT_POKEBALLS_FROM_OAK ; 024, (D74B, bit 4) + const EVENT_GOT_POKEDEX ; 025, (D74B, bit 5) + const EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 ; 026, (D74B, bit 6) + const EVENT_OAK_APPEARED_IN_PALLET ; 027, (D74B, bit 7) + const EVENT_VIRIDIAN_GYM_OPEN ; 028, (D74C, bit 0) + const EVENT_GOT_TM42 ; 029, (D74C, bit 1) + const EVENT_02A ; 02A, (D74C, bit 2) + const EVENT_02B ; 02B, (D74C, bit 3) + const EVENT_02C ; 02C, (D74C, bit 4) + const EVENT_02D ; 02D, (D74C, bit 5) + const EVENT_02E ; 02E, (D74C, bit 6) + const EVENT_02F ; 02F, (D74C, bit 7) + const EVENT_030 ; 030, (D74D, bit 0) + const EVENT_031 ; 031, (D74D, bit 1) + const EVENT_032 ; 032, (D74D, bit 2) + const EVENT_033 ; 033, (D74D, bit 3) + const EVENT_034 ; 034, (D74D, bit 4) + const EVENT_035 ; 035, (D74D, bit 5) + const EVENT_036 ; 036, (D74D, bit 6) + const EVENT_037 ; 037, (D74D, bit 7) + const EVENT_OAK_GOT_PARCEL ; 038, (D74E, bit 0) + const EVENT_GOT_OAKS_PARCEL ; 039, (D74E, bit 1) + const EVENT_03A ; 03A, (D74E, bit 2) + const EVENT_03B ; 03B, (D74E, bit 3) + const EVENT_03C ; 03C, (D74E, bit 4) + const EVENT_03D ; 03D, (D74E, bit 5) + const EVENT_03E ; 03E, (D74E, bit 6) + const EVENT_03F ; 03F, (D74E, bit 7) + const EVENT_040 ; 040, (D74F, bit 0) + const EVENT_041 ; 041, (D74F, bit 1) + const EVENT_042 ; 042, (D74F, bit 2) + const EVENT_043 ; 043, (D74F, bit 3) + const EVENT_044 ; 044, (D74F, bit 4) + const EVENT_045 ; 045, (D74F, bit 5) + const EVENT_046 ; 046, (D74F, bit 6) + const EVENT_047 ; 047, (D74F, bit 7) + const EVENT_048 ; 048, (D750, bit 0) + const EVENT_049 ; 049, (D750, bit 1) + const EVENT_04A ; 04A, (D750, bit 2) + const EVENT_04B ; 04B, (D750, bit 3) + const EVENT_04C ; 04C, (D750, bit 4) + const EVENT_04D ; 04D, (D750, bit 5) + const EVENT_04E ; 04E, (D750, bit 6) + const EVENT_04F ; 04F, (D750, bit 7) + const EVENT_GOT_TM27 ; 050, (D751, bit 0) + const EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI ; 051, (D751, bit 1) + const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0 ; 052, (D751, bit 2) + const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1 ; 053, (D751, bit 3) + const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2 ; 054, (D751, bit 4) + const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3 ; 055, (D751, bit 5) + const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4 ; 056, (D751, bit 6) + const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5 ; 057, (D751, bit 7) + const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6 ; 058, (D752, bit 0) + const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7 ; 059, (D752, bit 1) + const EVENT_05A ; 05A, (D752, bit 2) + const EVENT_05B ; 05B, (D752, bit 3) + const EVENT_05C ; 05C, (D752, bit 4) + const EVENT_05D ; 05D, (D752, bit 5) + const EVENT_05E ; 05E, (D752, bit 6) + const EVENT_05F ; 05F, (D752, bit 7) + const EVENT_060 ; 060, (D753, bit 0) + const EVENT_061 ; 061, (D753, bit 1) + const EVENT_062 ; 062, (D753, bit 2) + const EVENT_063 ; 063, (D753, bit 3) + const EVENT_064 ; 064, (D753, bit 4) + const EVENT_065 ; 065, (D753, bit 5) + const EVENT_066 ; 066, (D753, bit 6) + const EVENT_067 ; 067, (D753, bit 7) + const EVENT_BOUGHT_MUSEUM_TICKET ; 068, (D754, bit 0) + const EVENT_GOT_OLD_AMBER ; 069, (D754, bit 1) + const EVENT_06A ; 06A, (D754, bit 2) + const EVENT_06B ; 06B, (D754, bit 3) + const EVENT_06C ; 06C, (D754, bit 4) + const EVENT_06D ; 06D, (D754, bit 5) + const EVENT_06E ; 06E, (D754, bit 6) + const EVENT_06F ; 06F, (D754, bit 7) + const EVENT_070 ; 070, (D755, bit 0) + const EVENT_071 ; 071, (D755, bit 1) + const EVENT_BEAT_PEWTER_GYM_TRAINER_0 ; 072, (D755, bit 2) + const EVENT_073 ; 073, (D755, bit 3) + const EVENT_074 ; 074, (D755, bit 4) + const EVENT_075 ; 075, (D755, bit 5) + const EVENT_GOT_TM34 ; 076, (D755, bit 6) + const EVENT_BEAT_BROCK ; 077, (D755, bit 7) + const EVENT_078 ; 078, (D756, bit 0) + const EVENT_079 ; 079, (D756, bit 1) + const EVENT_07A ; 07A, (D756, bit 2) + const EVENT_07B ; 07B, (D756, bit 3) + const EVENT_07C ; 07C, (D756, bit 4) + const EVENT_07D ; 07D, (D756, bit 5) + const EVENT_07E ; 07E, (D756, bit 6) + const EVENT_07F ; 07F, (D756, bit 7) + const EVENT_080 ; 080, (D757, bit 0) + const EVENT_081 ; 081, (D757, bit 1) + const EVENT_082 ; 082, (D757, bit 2) + const EVENT_083 ; 083, (D757, bit 3) + const EVENT_084 ; 084, (D757, bit 4) + const EVENT_085 ; 085, (D757, bit 5) + const EVENT_086 ; 086, (D757, bit 6) + const EVENT_087 ; 087, (D757, bit 7) + const EVENT_088 ; 088, (D758, bit 0) + const EVENT_089 ; 089, (D758, bit 1) + const EVENT_08A ; 08A, (D758, bit 2) + const EVENT_08B ; 08B, (D758, bit 3) + const EVENT_08C ; 08C, (D758, bit 4) + const EVENT_08D ; 08D, (D758, bit 5) + const EVENT_08E ; 08E, (D758, bit 6) + const EVENT_08F ; 08F, (D758, bit 7) + const EVENT_090 ; 090, (D759, bit 0) + const EVENT_091 ; 091, (D759, bit 1) + const EVENT_092 ; 092, (D759, bit 2) + const EVENT_093 ; 093, (D759, bit 3) + const EVENT_094 ; 094, (D759, bit 4) + const EVENT_095 ; 095, (D759, bit 5) + const EVENT_096 ; 096, (D759, bit 6) + const EVENT_097 ; 097, (D759, bit 7) + const EVENT_BEAT_CERULEAN_RIVAL ; 098, (D75A, bit 0) + const EVENT_099 ; 099, (D75A, bit 1) + const EVENT_09A ; 09A, (D75A, bit 2) + const EVENT_09B ; 09B, (D75A, bit 3) + const EVENT_09C ; 09C, (D75A, bit 4) + const EVENT_09D ; 09D, (D75A, bit 5) + const EVENT_09E ; 09E, (D75A, bit 6) + const EVENT_09F ; 09F, (D75A, bit 7) + const EVENT_0A0 ; 0A0, (D75B, bit 0) + const EVENT_0A1 ; 0A1, (D75B, bit 1) + const EVENT_0A2 ; 0A2, (D75B, bit 2) + const EVENT_0A3 ; 0A3, (D75B, bit 3) + const EVENT_0A4 ; 0A4, (D75B, bit 4) + const EVENT_0A5 ; 0A5, (D75B, bit 5) + const EVENT_0A6 ; 0A6, (D75B, bit 6) + const EVENT_BEAT_CERULEAN_ROCKET_THIEF ; 0A7, (D75B, bit 7) + const EVENT_0A8 ; 0A8, (D75C, bit 0) + const EVENT_0A9 ; 0A9, (D75C, bit 1) + const EVENT_0AA ; 0AA, (D75C, bit 2) + const EVENT_0AB ; 0AB, (D75C, bit 3) + const EVENT_0AC ; 0AC, (D75C, bit 4) + const EVENT_0AD ; 0AD, (D75C, bit 5) + const EVENT_0AE ; 0AE, (D75C, bit 6) + const EVENT_0AF ; 0AF, (D75C, bit 7) + const EVENT_0B0 ; 0B0, (D75D, bit 0) + const EVENT_0B1 ; 0B1, (D75D, bit 1) + const EVENT_0B2 ; 0B2, (D75D, bit 2) + const EVENT_0B3 ; 0B3, (D75D, bit 3) + const EVENT_0B4 ; 0B4, (D75D, bit 4) + const EVENT_0B5 ; 0B5, (D75D, bit 5) + const EVENT_0B6 ; 0B6, (D75D, bit 6) + const EVENT_0B7 ; 0B7, (D75D, bit 7) + const EVENT_0B8 ; 0B8, (D75E, bit 0) + const EVENT_0B9 ; 0B9, (D75E, bit 1) + const EVENT_BEAT_CERULEAN_GYM_TRAINER_0 ; 0BA, (D75E, bit 2) + const EVENT_BEAT_CERULEAN_GYM_TRAINER_1 ; 0BB, (D75E, bit 3) + const EVENT_0BC ; 0BC, (D75E, bit 4) + const EVENT_0BD ; 0BD, (D75E, bit 5) + const EVENT_GOT_TM11 ; 0BE, (D75E, bit 6) + const EVENT_BEAT_MISTY ; 0BF, (D75E, bit 7) + const EVENT_GOT_BICYCLE ; 0C0, (D75F, bit 0) + const EVENT_0C1 ; 0C1, (D75F, bit 1) + const EVENT_0C2 ; 0C2, (D75F, bit 2) + const EVENT_0C3 ; 0C3, (D75F, bit 3) + const EVENT_0C4 ; 0C4, (D75F, bit 4) + const EVENT_0C5 ; 0C5, (D75F, bit 5) + const EVENT_0C6 ; 0C6, (D75F, bit 6) + const EVENT_0C7 ; 0C7, (D75F, bit 7) + const EVENT_0C8 ; 0C8, (D760, bit 0) + const EVENT_0C9 ; 0C9, (D760, bit 1) + const EVENT_0CA ; 0CA, (D760, bit 2) + const EVENT_0CB ; 0CB, (D760, bit 3) + const EVENT_0CC ; 0CC, (D760, bit 4) + const EVENT_0CD ; 0CD, (D760, bit 5) + const EVENT_0CE ; 0CE, (D760, bit 6) + const EVENT_0CF ; 0CF, (D760, bit 7) + const EVENT_0D0 ; 0D0, (D761, bit 0) + const EVENT_0D1 ; 0D1, (D761, bit 1) + const EVENT_0D2 ; 0D2, (D761, bit 2) + const EVENT_0D3 ; 0D3, (D761, bit 3) + const EVENT_0D4 ; 0D4, (D761, bit 4) + const EVENT_0D5 ; 0D5, (D761, bit 5) + const EVENT_0D6 ; 0D6, (D761, bit 6) + const EVENT_0D7 ; 0D7, (D761, bit 7) + const EVENT_0D8 ; 0D8, (D762, bit 0) + const EVENT_0D9 ; 0D9, (D762, bit 1) + const EVENT_0DA ; 0DA, (D762, bit 2) + const EVENT_0DB ; 0DB, (D762, bit 3) + const EVENT_0DC ; 0DC, (D762, bit 4) + const EVENT_0DD ; 0DD, (D762, bit 5) + const EVENT_0DE ; 0DE, (D762, bit 6) + const EVENT_0DF ; 0DF, (D762, bit 7) + const EVENT_0E0 ; 0E0, (D763, bit 0) + const EVENT_0E1 ; 0E1, (D763, bit 1) + const EVENT_0E2 ; 0E2, (D763, bit 2) + const EVENT_0E3 ; 0E3, (D763, bit 3) + const EVENT_0E4 ; 0E4, (D763, bit 4) + const EVENT_0E5 ; 0E5, (D763, bit 5) + const EVENT_0E6 ; 0E6, (D763, bit 6) + const EVENT_0E7 ; 0E7, (D763, bit 7) + const EVENT_0E8 ; 0E8, (D764, bit 0) + const EVENT_0E9 ; 0E9, (D764, bit 1) + const EVENT_0EA ; 0EA, (D764, bit 2) + const EVENT_0EB ; 0EB, (D764, bit 3) + const EVENT_0EC ; 0EC, (D764, bit 4) + const EVENT_0ED ; 0ED, (D764, bit 5) + const EVENT_POKEMON_TOWER_RIVAL_ON_LEFT ; 0EE, (D764, bit 6) + const EVENT_BEAT_POKEMON_TOWER_RIVAL ; 0EF, (D764, bit 7) + const EVENT_0F0 ; 0F0, (D765, bit 0) + const EVENT_BEAT_POKEMONTOWER_3_TRAINER_0 ; 0F1, (D765, bit 1) + const EVENT_BEAT_POKEMONTOWER_3_TRAINER_1 ; 0F2, (D765, bit 2) + const EVENT_BEAT_POKEMONTOWER_3_TRAINER_2 ; 0F3, (D765, bit 3) + const EVENT_0F4 ; 0F4, (D765, bit 4) + const EVENT_0F5 ; 0F5, (D765, bit 5) + const EVENT_0F6 ; 0F6, (D765, bit 6) + const EVENT_0F7 ; 0F7, (D765, bit 7) + const EVENT_0F8 ; 0F8, (D766, bit 0) + const EVENT_BEAT_POKEMONTOWER_4_TRAINER_0 ; 0F9, (D766, bit 1) + const EVENT_BEAT_POKEMONTOWER_4_TRAINER_1 ; 0FA, (D766, bit 2) + const EVENT_BEAT_POKEMONTOWER_4_TRAINER_2 ; 0FB, (D766, bit 3) + const EVENT_0FC ; 0FC, (D766, bit 4) + const EVENT_0FD ; 0FD, (D766, bit 5) + const EVENT_0FE ; 0FE, (D766, bit 6) + const EVENT_0FF ; 0FF, (D766, bit 7) + const EVENT_100 ; 100, (D767, bit 0) + const EVENT_101 ; 101, (D767, bit 1) + const EVENT_BEAT_POKEMONTOWER_5_TRAINER_0 ; 102, (D767, bit 2) + const EVENT_BEAT_POKEMONTOWER_5_TRAINER_1 ; 103, (D767, bit 3) + const EVENT_BEAT_POKEMONTOWER_5_TRAINER_2 ; 104, (D767, bit 4) + const EVENT_BEAT_POKEMONTOWER_5_TRAINER_3 ; 105, (D767, bit 5) + const EVENT_106 ; 106, (D767, bit 6) + const EVENT_IN_PURIFIED_ZONE ; 107, (D767, bit 7) + const EVENT_108 ; 108, (D768, bit 0) + const EVENT_BEAT_POKEMONTOWER_6_TRAINER_0 ; 109, (D768, bit 1) + const EVENT_BEAT_POKEMONTOWER_6_TRAINER_1 ; 10A, (D768, bit 2) + const EVENT_BEAT_POKEMONTOWER_6_TRAINER_2 ; 10B, (D768, bit 3) + const EVENT_10C ; 10C, (D768, bit 4) + const EVENT_10D ; 10D, (D768, bit 5) + const EVENT_10E ; 10E, (D768, bit 6) + const EVENT_BEAT_GHOST_MAROWAK ; 10F, (D768, bit 7) + const EVENT_110 ; 110, (D769, bit 0) + const EVENT_BEAT_POKEMONTOWER_7_TRAINER_0 ; 111, (D769, bit 1) + const EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 ; 112, (D769, bit 2) + const EVENT_BEAT_POKEMONTOWER_7_TRAINER_2 ; 113, (D769, bit 3) + const EVENT_114 ; 114, (D769, bit 4) + const EVENT_115 ; 115, (D769, bit 5) + const EVENT_116 ; 116, (D769, bit 6) + const EVENT_RESCUED_MR_FUJI_2 ; 117, (D769, bit 7) + const EVENT_118 ; 118, (D76A, bit 0) + const EVENT_119 ; 119, (D76A, bit 1) + const EVENT_11A ; 11A, (D76A, bit 2) + const EVENT_11B ; 11B, (D76A, bit 3) + const EVENT_11C ; 11C, (D76A, bit 4) + const EVENT_11D ; 11D, (D76A, bit 5) + const EVENT_11E ; 11E, (D76A, bit 6) + const EVENT_11F ; 11F, (D76A, bit 7) + const EVENT_120 ; 120, (D76B, bit 0) + const EVENT_121 ; 121, (D76B, bit 1) + const EVENT_122 ; 122, (D76B, bit 2) + const EVENT_123 ; 123, (D76B, bit 3) + const EVENT_124 ; 124, (D76B, bit 4) + const EVENT_125 ; 125, (D76B, bit 5) + const EVENT_126 ; 126, (D76B, bit 6) + const EVENT_127 ; 127, (D76B, bit 7) + const EVENT_GOT_POKE_FLUTE ; 128, (D76C, bit 0) + const EVENT_129 ; 129, (D76C, bit 1) + const EVENT_12A ; 12A, (D76C, bit 2) + const EVENT_12B ; 12B, (D76C, bit 3) + const EVENT_12C ; 12C, (D76C, bit 4) + const EVENT_12D ; 12D, (D76C, bit 5) + const EVENT_12E ; 12E, (D76C, bit 6) + const EVENT_12F ; 12F, (D76C, bit 7) + const EVENT_130 ; 130, (D76D, bit 0) + const EVENT_131 ; 131, (D76D, bit 1) + const EVENT_132 ; 132, (D76D, bit 2) + const EVENT_133 ; 133, (D76D, bit 3) + const EVENT_134 ; 134, (D76D, bit 4) + const EVENT_135 ; 135, (D76D, bit 5) + const EVENT_136 ; 136, (D76D, bit 6) + const EVENT_137 ; 137, (D76D, bit 7) + const EVENT_138 ; 138, (D76E, bit 0) + const EVENT_139 ; 139, (D76E, bit 1) + const EVENT_13A ; 13A, (D76E, bit 2) + const EVENT_13B ; 13B, (D76E, bit 3) + const EVENT_13C ; 13C, (D76E, bit 4) + const EVENT_13D ; 13D, (D76E, bit 5) + const EVENT_13E ; 13E, (D76E, bit 6) + const EVENT_13F ; 13F, (D76E, bit 7) + const EVENT_140 ; 140, (D76F, bit 0) + const EVENT_141 ; 141, (D76F, bit 1) + const EVENT_142 ; 142, (D76F, bit 2) + const EVENT_143 ; 143, (D76F, bit 3) + const EVENT_144 ; 144, (D76F, bit 4) + const EVENT_145 ; 145, (D76F, bit 5) + const EVENT_146 ; 146, (D76F, bit 6) + const EVENT_147 ; 147, (D76F, bit 7) + const EVENT_148 ; 148, (D770, bit 0) + const EVENT_149 ; 149, (D770, bit 1) + const EVENT_14A ; 14A, (D770, bit 2) + const EVENT_14B ; 14B, (D770, bit 3) + const EVENT_14C ; 14C, (D770, bit 4) + const EVENT_14D ; 14D, (D770, bit 5) + const EVENT_14E ; 14E, (D770, bit 6) + const EVENT_14F ; 14F, (D770, bit 7) + const EVENT_150 ; 150, (D771, bit 0) + const EVENT_GOT_BIKE_VOUCHER ; 151, (D771, bit 1) + const EVENT_152 ; 152, (D771, bit 2) + const EVENT_153 ; 153, (D771, bit 3) + const EVENT_154 ; 154, (D771, bit 4) + const EVENT_155 ; 155, (D771, bit 5) + const EVENT_SEEL_FAN_BOAST ; 156, (D771, bit 6) + const EVENT_PIKACHU_FAN_BOAST ; 157, (D771, bit 7) + const EVENT_158 ; 158, (D772, bit 0) + const EVENT_159 ; 159, (D772, bit 1) + const EVENT_15A ; 15A, (D772, bit 2) + const EVENT_15B ; 15B, (D772, bit 3) + const EVENT_15C ; 15C, (D772, bit 4) + const EVENT_15D ; 15D, (D772, bit 5) + const EVENT_15E ; 15E, (D772, bit 6) + const EVENT_15F ; 15F, (D772, bit 7) + const EVENT_2ND_LOCK_OPENED ; 160, (D773, bit 0) + const EVENT_1ST_LOCK_OPENED ; 161, (D773, bit 1) + const EVENT_BEAT_VERMILION_GYM_TRAINER_0 ; 162, (D773, bit 2) + const EVENT_BEAT_VERMILION_GYM_TRAINER_1 ; 163, (D773, bit 3) + const EVENT_BEAT_VERMILION_GYM_TRAINER_2 ; 164, (D773, bit 4) + const EVENT_165 ; 165, (D773, bit 5) + const EVENT_GOT_TM24 ; 166, (D773, bit 6) + const EVENT_BEAT_LT_SURGE ; 167, (D773, bit 7) + const EVENT_168 ; 168, (D774, bit 0) + const EVENT_169 ; 169, (D774, bit 1) + const EVENT_16A ; 16A, (D774, bit 2) + const EVENT_16B ; 16B, (D774, bit 3) + const EVENT_16C ; 16C, (D774, bit 4) + const EVENT_16D ; 16D, (D774, bit 5) + const EVENT_16E ; 16E, (D774, bit 6) + const EVENT_16F ; 16F, (D774, bit 7) + const EVENT_170 ; 170, (D775, bit 0) + const EVENT_171 ; 171, (D775, bit 1) + const EVENT_172 ; 172, (D775, bit 2) + const EVENT_173 ; 173, (D775, bit 3) + const EVENT_174 ; 174, (D775, bit 4) + const EVENT_175 ; 175, (D775, bit 5) + const EVENT_176 ; 176, (D775, bit 6) + const EVENT_177 ; 177, (D775, bit 7) + const EVENT_178 ; 178, (D776, bit 0) + const EVENT_179 ; 179, (D776, bit 1) + const EVENT_17A ; 17A, (D776, bit 2) + const EVENT_17B ; 17B, (D776, bit 3) + const EVENT_17C ; 17C, (D776, bit 4) + const EVENT_17D ; 17D, (D776, bit 5) + const EVENT_17E ; 17E, (D776, bit 6) + const EVENT_17F ; 17F, (D776, bit 7) + const EVENT_GOT_TM41 ; 180, (D777, bit 0) + const EVENT_181 ; 181, (D777, bit 1) + const EVENT_182 ; 182, (D777, bit 2) + const EVENT_183 ; 183, (D777, bit 3) + const EVENT_184 ; 184, (D777, bit 4) + const EVENT_185 ; 185, (D777, bit 5) + const EVENT_186 ; 186, (D777, bit 6) + const EVENT_187 ; 187, (D777, bit 7) + const EVENT_188 ; 188, (D778, bit 0) + const EVENT_189 ; 189, (D778, bit 1) + const EVENT_18A ; 18A, (D778, bit 2) + const EVENT_18B ; 18B, (D778, bit 3) + const EVENT_GOT_TM13 ; 18C, (D778, bit 4) + const EVENT_GOT_TM48 ; 18D, (D778, bit 5) + const EVENT_GOT_TM49 ; 18E, (D778, bit 6) + const EVENT_GOT_TM18 ; 18F, (D778, bit 7) + const EVENT_190 ; 190, (D779, bit 0) + const EVENT_191 ; 191, (D779, bit 1) + const EVENT_192 ; 192, (D779, bit 2) + const EVENT_193 ; 193, (D779, bit 3) + const EVENT_194 ; 194, (D779, bit 4) + const EVENT_195 ; 195, (D779, bit 5) + const EVENT_196 ; 196, (D779, bit 6) + const EVENT_197 ; 197, (D779, bit 7) + const EVENT_198 ; 198, (D77A, bit 0) + const EVENT_199 ; 199, (D77A, bit 1) + const EVENT_19A ; 19A, (D77A, bit 2) + const EVENT_19B ; 19B, (D77A, bit 3) + const EVENT_19C ; 19C, (D77A, bit 4) + const EVENT_19D ; 19D, (D77A, bit 5) + const EVENT_19E ; 19E, (D77A, bit 6) + const EVENT_19F ; 19F, (D77A, bit 7) + const EVENT_1A0 ; 1A0, (D77B, bit 0) + const EVENT_1A1 ; 1A1, (D77B, bit 1) + const EVENT_1A2 ; 1A2, (D77B, bit 2) + const EVENT_1A3 ; 1A3, (D77B, bit 3) + const EVENT_1A4 ; 1A4, (D77B, bit 4) + const EVENT_1A5 ; 1A5, (D77B, bit 5) + const EVENT_1A6 ; 1A6, (D77B, bit 6) + const EVENT_1A7 ; 1A7, (D77B, bit 7) + const EVENT_GOT_TM21 ; 1A8, (D77C, bit 0) + const EVENT_BEAT_ERIKA ; 1A9, (D77C, bit 1) + const EVENT_BEAT_CELADON_GYM_TRAINER_0 ; 1AA, (D77C, bit 2) + const EVENT_BEAT_CELADON_GYM_TRAINER_1 ; 1AB, (D77C, bit 3) + const EVENT_BEAT_CELADON_GYM_TRAINER_2 ; 1AC, (D77C, bit 4) + const EVENT_BEAT_CELADON_GYM_TRAINER_3 ; 1AD, (D77C, bit 5) + const EVENT_BEAT_CELADON_GYM_TRAINER_4 ; 1AE, (D77C, bit 6) + const EVENT_BEAT_CELADON_GYM_TRAINER_5 ; 1AF, (D77C, bit 7) + const EVENT_BEAT_CELADON_GYM_TRAINER_6 ; 1B0, (D77D, bit 0) + const EVENT_1B1 ; 1B1, (D77D, bit 1) + const EVENT_1B2 ; 1B2, (D77D, bit 2) + const EVENT_1B3 ; 1B3, (D77D, bit 3) + const EVENT_1B4 ; 1B4, (D77D, bit 4) + const EVENT_1B5 ; 1B5, (D77D, bit 5) + const EVENT_1B6 ; 1B6, (D77D, bit 6) + const EVENT_1B7 ; 1B7, (D77D, bit 7) + const EVENT_1B8 ; 1B8, (D77E, bit 0) + const EVENT_FOUND_ROCKET_HIDEOUT ; 1B9, (D77E, bit 1) + const EVENT_GOT_10_COINS ; 1BA, (D77E, bit 2) + const EVENT_GOT_20_COINS ; 1BB, (D77E, bit 3) + const EVENT_GOT_20_COINS_2 ; 1BC, (D77E, bit 4) + const EVENT_1BD ; 1BD, (D77E, bit 5) + const EVENT_1BE ; 1BE, (D77E, bit 6) + const EVENT_1BF ; 1BF, (D77E, bit 7) + const EVENT_1C0 ; 1C0, (D77F, bit 0) + const EVENT_1C1 ; 1C1, (D77F, bit 1) + const EVENT_1C2 ; 1C2, (D77F, bit 2) + const EVENT_1C3 ; 1C3, (D77F, bit 3) + const EVENT_1C4 ; 1C4, (D77F, bit 4) + const EVENT_1C5 ; 1C5, (D77F, bit 5) + const EVENT_1C6 ; 1C6, (D77F, bit 6) + const EVENT_1C7 ; 1C7, (D77F, bit 7) + const EVENT_1C8 ; 1C8, (D780, bit 0) + const EVENT_1C9 ; 1C9, (D780, bit 1) + const EVENT_1CA ; 1CA, (D780, bit 2) + const EVENT_1CB ; 1CB, (D780, bit 3) + const EVENT_1CC ; 1CC, (D780, bit 4) + const EVENT_1CD ; 1CD, (D780, bit 5) + const EVENT_1CE ; 1CE, (D780, bit 6) + const EVENT_1CF ; 1CF, (D780, bit 7) + const EVENT_1D0 ; 1D0, (D781, bit 0) + const EVENT_1D1 ; 1D1, (D781, bit 1) + const EVENT_1D2 ; 1D2, (D781, bit 2) + const EVENT_1D3 ; 1D3, (D781, bit 3) + const EVENT_1D4 ; 1D4, (D781, bit 4) + const EVENT_1D5 ; 1D5, (D781, bit 5) + const EVENT_1D6 ; 1D6, (D781, bit 6) + const EVENT_1D7 ; 1D7, (D781, bit 7) + const EVENT_1D8 ; 1D8, (D782, bit 0) + const EVENT_1D9 ; 1D9, (D782, bit 1) + const EVENT_1DA ; 1DA, (D782, bit 2) + const EVENT_1DB ; 1DB, (D782, bit 3) + const EVENT_1DC ; 1DC, (D782, bit 4) + const EVENT_1DD ; 1DD, (D782, bit 5) + const EVENT_1DE ; 1DE, (D782, bit 6) + const EVENT_1DF ; 1DF, (D782, bit 7) + const EVENT_GOT_COIN_CASE ; 1E0, (D783, bit 0) + const EVENT_1E1 ; 1E1, (D783, bit 1) + const EVENT_1E2 ; 1E2, (D783, bit 2) + const EVENT_1E3 ; 1E3, (D783, bit 3) + const EVENT_1E4 ; 1E4, (D783, bit 4) + const EVENT_1E5 ; 1E5, (D783, bit 5) + const EVENT_1E6 ; 1E6, (D783, bit 6) + const EVENT_1E7 ; 1E7, (D783, bit 7) + const EVENT_1E8 ; 1E8, (D784, bit 0) + const EVENT_1E9 ; 1E9, (D784, bit 1) + const EVENT_1EA ; 1EA, (D784, bit 2) + const EVENT_1EB ; 1EB, (D784, bit 3) + const EVENT_1EC ; 1EC, (D784, bit 4) + const EVENT_1ED ; 1ED, (D784, bit 5) + const EVENT_1EE ; 1EE, (D784, bit 6) + const EVENT_1EF ; 1EF, (D784, bit 7) + const EVENT_1F0 ; 1F0, (D785, bit 0) + const EVENT_1F1 ; 1F1, (D785, bit 1) + const EVENT_1F2 ; 1F2, (D785, bit 2) + const EVENT_1F3 ; 1F3, (D785, bit 3) + const EVENT_1F4 ; 1F4, (D785, bit 4) + const EVENT_1F5 ; 1F5, (D785, bit 5) + const EVENT_1F6 ; 1F6, (D785, bit 6) + const EVENT_1F7 ; 1F7, (D785, bit 7) + const EVENT_1F8 ; 1F8, (D786, bit 0) + const EVENT_1F9 ; 1F9, (D786, bit 1) + const EVENT_1FA ; 1FA, (D786, bit 2) + const EVENT_1FB ; 1FB, (D786, bit 3) + const EVENT_1FC ; 1FC, (D786, bit 4) + const EVENT_1FD ; 1FD, (D786, bit 5) + const EVENT_1FE ; 1FE, (D786, bit 6) + const EVENT_1FF ; 1FF, (D786, bit 7) + const EVENT_200 ; 200, (D787, bit 0) + const EVENT_201 ; 201, (D787, bit 1) + const EVENT_202 ; 202, (D787, bit 2) + const EVENT_203 ; 203, (D787, bit 3) + const EVENT_204 ; 204, (D787, bit 4) + const EVENT_205 ; 205, (D787, bit 5) + const EVENT_206 ; 206, (D787, bit 6) + const EVENT_207 ; 207, (D787, bit 7) + const EVENT_208 ; 208, (D788, bit 0) + const EVENT_209 ; 209, (D788, bit 1) + const EVENT_20A ; 20A, (D788, bit 2) + const EVENT_20B ; 20B, (D788, bit 3) + const EVENT_20C ; 20C, (D788, bit 4) + const EVENT_20D ; 20D, (D788, bit 5) + const EVENT_20E ; 20E, (D788, bit 6) + const EVENT_20F ; 20F, (D788, bit 7) + const EVENT_210 ; 210, (D789, bit 0) + const EVENT_211 ; 211, (D789, bit 1) + const EVENT_212 ; 212, (D789, bit 2) + const EVENT_213 ; 213, (D789, bit 3) + const EVENT_214 ; 214, (D789, bit 4) + const EVENT_215 ; 215, (D789, bit 5) + const EVENT_216 ; 216, (D789, bit 6) + const EVENT_217 ; 217, (D789, bit 7) + const EVENT_218 ; 218, (D78A, bit 0) + const EVENT_219 ; 219, (D78A, bit 1) + const EVENT_21A ; 21A, (D78A, bit 2) + const EVENT_21B ; 21B, (D78A, bit 3) + const EVENT_21C ; 21C, (D78A, bit 4) + const EVENT_21D ; 21D, (D78A, bit 5) + const EVENT_21E ; 21E, (D78A, bit 6) + const EVENT_21F ; 21F, (D78A, bit 7) + const EVENT_220 ; 220, (D78B, bit 0) + const EVENT_221 ; 221, (D78B, bit 1) + const EVENT_222 ; 222, (D78B, bit 2) + const EVENT_223 ; 223, (D78B, bit 3) + const EVENT_224 ; 224, (D78B, bit 4) + const EVENT_225 ; 225, (D78B, bit 5) + const EVENT_226 ; 226, (D78B, bit 6) + const EVENT_227 ; 227, (D78B, bit 7) + const EVENT_228 ; 228, (D78C, bit 0) + const EVENT_229 ; 229, (D78C, bit 1) + const EVENT_22A ; 22A, (D78C, bit 2) + const EVENT_22B ; 22B, (D78C, bit 3) + const EVENT_22C ; 22C, (D78C, bit 4) + const EVENT_22D ; 22D, (D78C, bit 5) + const EVENT_22E ; 22E, (D78C, bit 6) + const EVENT_22F ; 22F, (D78C, bit 7) + const EVENT_230 ; 230, (D78D, bit 0) + const EVENT_231 ; 231, (D78D, bit 1) + const EVENT_232 ; 232, (D78D, bit 2) + const EVENT_233 ; 233, (D78D, bit 3) + const EVENT_234 ; 234, (D78D, bit 4) + const EVENT_235 ; 235, (D78D, bit 5) + const EVENT_236 ; 236, (D78D, bit 6) + const EVENT_237 ; 237, (D78D, bit 7) + const EVENT_GOT_HM04 ; 238, (D78E, bit 0) + const EVENT_GAVE_GOLD_TEETH ; 239, (D78E, bit 1) + const EVENT_23A ; 23A, (D78E, bit 2) + const EVENT_23B ; 23B, (D78E, bit 3) + const EVENT_23C ; 23C, (D78E, bit 4) + const EVENT_23D ; 23D, (D78E, bit 5) + const EVENT_23E ; 23E, (D78E, bit 6) + const EVENT_23F ; 23F, (D78E, bit 7) + const EVENT_240 ; 240, (D78F, bit 0) + const EVENT_241 ; 241, (D78F, bit 1) + const EVENT_242 ; 242, (D78F, bit 2) + const EVENT_243 ; 243, (D78F, bit 3) + const EVENT_244 ; 244, (D78F, bit 4) + const EVENT_245 ; 245, (D78F, bit 5) + const EVENT_246 ; 246, (D78F, bit 6) + const EVENT_247 ; 247, (D78F, bit 7) + const EVENT_248 ; 248, (D790, bit 0) + const EVENT_249 ; 249, (D790, bit 1) + const EVENT_24A ; 24A, (D790, bit 2) + const EVENT_24B ; 24B, (D790, bit 3) + const EVENT_24C ; 24C, (D790, bit 4) + const EVENT_24D ; 24D, (D790, bit 5) + const EVENT_SAFARI_GAME_OVER ; 24E, (D790, bit 6) + const EVENT_IN_SAFARI_ZONE ; 24F, (D790, bit 7) + const EVENT_250 ; 250, (D791, bit 0) + const EVENT_251 ; 251, (D791, bit 1) + const EVENT_252 ; 252, (D791, bit 2) + const EVENT_253 ; 253, (D791, bit 3) + const EVENT_254 ; 254, (D791, bit 4) + const EVENT_255 ; 255, (D791, bit 5) + const EVENT_256 ; 256, (D791, bit 6) + const EVENT_257 ; 257, (D791, bit 7) + const EVENT_GOT_TM06 ; 258, (D792, bit 0) + const EVENT_BEAT_KOGA ; 259, (D792, bit 1) + const EVENT_BEAT_FUCHSIA_GYM_TRAINER_0 ; 25A, (D792, bit 2) + const EVENT_BEAT_FUCHSIA_GYM_TRAINER_1 ; 25B, (D792, bit 3) + const EVENT_BEAT_FUCHSIA_GYM_TRAINER_2 ; 25C, (D792, bit 4) + const EVENT_BEAT_FUCHSIA_GYM_TRAINER_3 ; 25D, (D792, bit 5) + const EVENT_BEAT_FUCHSIA_GYM_TRAINER_4 ; 25E, (D792, bit 6) + const EVENT_BEAT_FUCHSIA_GYM_TRAINER_5 ; 25F, (D792, bit 7) + const EVENT_260 ; 260, (D793, bit 0) + const EVENT_261 ; 261, (D793, bit 1) + const EVENT_262 ; 262, (D793, bit 2) + const EVENT_263 ; 263, (D793, bit 3) + const EVENT_264 ; 264, (D793, bit 4) + const EVENT_265 ; 265, (D793, bit 5) + const EVENT_266 ; 266, (D793, bit 6) + const EVENT_267 ; 267, (D793, bit 7) + const EVENT_268 ; 268, (D794, bit 0) + const EVENT_269 ; 269, (D794, bit 1) + const EVENT_26A ; 26A, (D794, bit 2) + const EVENT_26B ; 26B, (D794, bit 3) + const EVENT_26C ; 26C, (D794, bit 4) + const EVENT_26D ; 26D, (D794, bit 5) + const EVENT_26E ; 26E, (D794, bit 6) + const EVENT_26F ; 26F, (D794, bit 7) + const EVENT_270 ; 270, (D795, bit 0) + const EVENT_271 ; 271, (D795, bit 1) + const EVENT_272 ; 272, (D795, bit 2) + const EVENT_273 ; 273, (D795, bit 3) + const EVENT_274 ; 274, (D795, bit 4) + const EVENT_275 ; 275, (D795, bit 5) + const EVENT_276 ; 276, (D795, bit 6) + const EVENT_277 ; 277, (D795, bit 7) + const EVENT_MANSION_SWITCH_ON ; 278, (D796, bit 0) + const EVENT_279 ; 279, (D796, bit 1) + const EVENT_27A ; 27A, (D796, bit 2) + const EVENT_27B ; 27B, (D796, bit 3) + const EVENT_27C ; 27C, (D796, bit 4) + const EVENT_27D ; 27D, (D796, bit 5) + const EVENT_27E ; 27E, (D796, bit 6) + const EVENT_27F ; 27F, (D796, bit 7) + const EVENT_280 ; 280, (D797, bit 0) + const EVENT_281 ; 281, (D797, bit 1) + const EVENT_282 ; 282, (D797, bit 2) + const EVENT_283 ; 283, (D797, bit 3) + const EVENT_284 ; 284, (D797, bit 4) + const EVENT_285 ; 285, (D797, bit 5) + const EVENT_286 ; 286, (D797, bit 6) + const EVENT_287 ; 287, (D797, bit 7) + const EVENT_288 ; 288, (D798, bit 0) + const EVENT_BEAT_MANSION_1_TRAINER_0 ; 289, (D798, bit 1) + const EVENT_28A ; 28A, (D798, bit 2) + const EVENT_28B ; 28B, (D798, bit 3) + const EVENT_28C ; 28C, (D798, bit 4) + const EVENT_28D ; 28D, (D798, bit 5) + const EVENT_28E ; 28E, (D798, bit 6) + const EVENT_28F ; 28F, (D798, bit 7) + const EVENT_290 ; 290, (D799, bit 0) + const EVENT_291 ; 291, (D799, bit 1) + const EVENT_292 ; 292, (D799, bit 2) + const EVENT_293 ; 293, (D799, bit 3) + const EVENT_294 ; 294, (D799, bit 4) + const EVENT_295 ; 295, (D799, bit 5) + const EVENT_296 ; 296, (D799, bit 6) + const EVENT_297 ; 297, (D799, bit 7) + const EVENT_GOT_TM38 ; 298, (D79A, bit 0) + const EVENT_BEAT_BLAINE ; 299, (D79A, bit 1) + const EVENT_BEAT_CINNABAR_GYM_TRAINER_0 ; 29A, (D79A, bit 2) + const EVENT_BEAT_CINNABAR_GYM_TRAINER_1 ; 29B, (D79A, bit 3) + const EVENT_BEAT_CINNABAR_GYM_TRAINER_2 ; 29C, (D79A, bit 4) + const EVENT_BEAT_CINNABAR_GYM_TRAINER_3 ; 29D, (D79A, bit 5) + const EVENT_BEAT_CINNABAR_GYM_TRAINER_4 ; 29E, (D79A, bit 6) + const EVENT_BEAT_CINNABAR_GYM_TRAINER_5 ; 29F, (D79A, bit 7) + const EVENT_BEAT_CINNABAR_GYM_TRAINER_6 ; 2A0, (D79B, bit 0) + const EVENT_2A1 ; 2A1, (D79B, bit 1) + const EVENT_2A2 ; 2A2, (D79B, bit 2) + const EVENT_2A3 ; 2A3, (D79B, bit 3) + const EVENT_2A4 ; 2A4, (D79B, bit 4) + const EVENT_2A5 ; 2A5, (D79B, bit 5) + const EVENT_2A6 ; 2A6, (D79B, bit 6) + const EVENT_2A7 ; 2A7, (D79B, bit 7) + const EVENT_CINNABAR_GYM_GATE0_UNLOCKED ; 2A8, (D79C, bit 0) doesn't exist, but the bit is set + const EVENT_CINNABAR_GYM_GATE1_UNLOCKED ; 2A9, (D79C, bit 1) + const EVENT_CINNABAR_GYM_GATE2_UNLOCKED ; 2AA, (D79C, bit 2) + const EVENT_CINNABAR_GYM_GATE3_UNLOCKED ; 2AB, (D79C, bit 3) + const EVENT_CINNABAR_GYM_GATE4_UNLOCKED ; 2AC, (D79C, bit 4) + const EVENT_CINNABAR_GYM_GATE5_UNLOCKED ; 2AD, (D79C, bit 5) + const EVENT_CINNABAR_GYM_GATE6_UNLOCKED ; 2AE, (D79C, bit 6) + const EVENT_2AF ; 2AF, (D79C, bit 7) + const EVENT_2B0 ; 2B0, (D79D, bit 0) + const EVENT_2B1 ; 2B1, (D79D, bit 1) + const EVENT_2B2 ; 2B2, (D79D, bit 2) + const EVENT_2B3 ; 2B3, (D79D, bit 3) + const EVENT_2B4 ; 2B4, (D79D, bit 4) + const EVENT_2B5 ; 2B5, (D79D, bit 5) + const EVENT_2B6 ; 2B6, (D79D, bit 6) + const EVENT_2B7 ; 2B7, (D79D, bit 7) + const EVENT_2B8 ; 2B8, (D79E, bit 0) + const EVENT_2B9 ; 2B9, (D79E, bit 1) + const EVENT_2BA ; 2BA, (D79E, bit 2) + const EVENT_2BB ; 2BB, (D79E, bit 3) + const EVENT_2BC ; 2BC, (D79E, bit 4) + const EVENT_2BD ; 2BD, (D79E, bit 5) + const EVENT_2BE ; 2BE, (D79E, bit 6) + const EVENT_2BF ; 2BF, (D79E, bit 7) + const EVENT_2C0 ; 2C0, (D79F, bit 0) + const EVENT_2C1 ; 2C1, (D79F, bit 1) + const EVENT_2C2 ; 2C2, (D79F, bit 2) + const EVENT_2C3 ; 2C3, (D79F, bit 3) + const EVENT_2C4 ; 2C4, (D79F, bit 4) + const EVENT_2C5 ; 2C5, (D79F, bit 5) + const EVENT_2C6 ; 2C6, (D79F, bit 6) + const EVENT_2C7 ; 2C7, (D79F, bit 7) + const EVENT_2C8 ; 2C8, (D7A0, bit 0) + const EVENT_2C9 ; 2C9, (D7A0, bit 1) + const EVENT_2CA ; 2CA, (D7A0, bit 2) + const EVENT_2CB ; 2CB, (D7A0, bit 3) + const EVENT_2CC ; 2CC, (D7A0, bit 4) + const EVENT_2CD ; 2CD, (D7A0, bit 5) + const EVENT_2CE ; 2CE, (D7A0, bit 6) + const EVENT_2CF ; 2CF, (D7A0, bit 7) + const EVENT_2D0 ; 2D0, (D7A1, bit 0) + const EVENT_2D1 ; 2D1, (D7A1, bit 1) + const EVENT_2D2 ; 2D2, (D7A1, bit 2) + const EVENT_2D3 ; 2D3, (D7A1, bit 3) + const EVENT_2D4 ; 2D4, (D7A1, bit 4) + const EVENT_2D5 ; 2D5, (D7A1, bit 5) + const EVENT_2D6 ; 2D6, (D7A1, bit 6) + const EVENT_GOT_TM35 ; 2D7, (D7A1, bit 7) + const EVENT_2D8 ; 2D8, (D7A2, bit 0) + const EVENT_2D9 ; 2D9, (D7A2, bit 1) + const EVENT_2DA ; 2DA, (D7A2, bit 2) + const EVENT_2DB ; 2DB, (D7A2, bit 3) + const EVENT_2DC ; 2DC, (D7A2, bit 4) + const EVENT_2DD ; 2DD, (D7A2, bit 5) + const EVENT_2DE ; 2DE, (D7A2, bit 6) + const EVENT_2DF ; 2DF, (D7A2, bit 7) + const EVENT_GAVE_FOSSIL_TO_LAB ; 2E0, (D7A3, bit 0) + const EVENT_LAB_STILL_REVIVING_FOSSIL ; 2E1, (D7A3, bit 1) + const EVENT_LAB_HANDING_OVER_FOSSIL_MON ; 2E2, (D7A3, bit 2) + const EVENT_2E3 ; 2E3, (D7A3, bit 3) + const EVENT_2E4 ; 2E4, (D7A3, bit 4) + const EVENT_2E5 ; 2E5, (D7A3, bit 5) + const EVENT_2E6 ; 2E6, (D7A3, bit 6) + const EVENT_2E7 ; 2E7, (D7A3, bit 7) + const EVENT_2E8 ; 2E8, (D7A4, bit 0) + const EVENT_2E9 ; 2E9, (D7A4, bit 1) + const EVENT_2EA ; 2EA, (D7A4, bit 2) + const EVENT_2EB ; 2EB, (D7A4, bit 3) + const EVENT_2EC ; 2EC, (D7A4, bit 4) + const EVENT_2ED ; 2ED, (D7A4, bit 5) + const EVENT_2EE ; 2EE, (D7A4, bit 6) + const EVENT_2EF ; 2EF, (D7A4, bit 7) + const EVENT_2F0 ; 2F0, (D7A5, bit 0) + const EVENT_2F1 ; 2F1, (D7A5, bit 1) + const EVENT_2F2 ; 2F2, (D7A5, bit 2) + const EVENT_2F3 ; 2F3, (D7A5, bit 3) + const EVENT_2F4 ; 2F4, (D7A5, bit 4) + const EVENT_2F5 ; 2F5, (D7A5, bit 5) + const EVENT_2F6 ; 2F6, (D7A5, bit 6) + const EVENT_2F7 ; 2F7, (D7A5, bit 7) + const EVENT_2F8 ; 2F8, (D7A6, bit 0) + const EVENT_2F9 ; 2F9, (D7A6, bit 1) + const EVENT_2FA ; 2FA, (D7A6, bit 2) + const EVENT_2FB ; 2FB, (D7A6, bit 3) + const EVENT_2FC ; 2FC, (D7A6, bit 4) + const EVENT_2FD ; 2FD, (D7A6, bit 5) + const EVENT_2FE ; 2FE, (D7A6, bit 6) + const EVENT_2FF ; 2FF, (D7A6, bit 7) + const EVENT_300 ; 300, (D7A7, bit 0) + const EVENT_301 ; 301, (D7A7, bit 1) + const EVENT_302 ; 302, (D7A7, bit 2) + const EVENT_303 ; 303, (D7A7, bit 3) + const EVENT_304 ; 304, (D7A7, bit 4) + const EVENT_305 ; 305, (D7A7, bit 5) + const EVENT_306 ; 306, (D7A7, bit 6) + const EVENT_307 ; 307, (D7A7, bit 7) + const EVENT_308 ; 308, (D7A8, bit 0) + const EVENT_309 ; 309, (D7A8, bit 1) + const EVENT_30A ; 30A, (D7A8, bit 2) + const EVENT_30B ; 30B, (D7A8, bit 3) + const EVENT_30C ; 30C, (D7A8, bit 4) + const EVENT_30D ; 30D, (D7A8, bit 5) + const EVENT_30E ; 30E, (D7A8, bit 6) + const EVENT_30F ; 30F, (D7A8, bit 7) + const EVENT_310 ; 310, (D7A9, bit 0) + const EVENT_311 ; 311, (D7A9, bit 1) + const EVENT_312 ; 312, (D7A9, bit 2) + const EVENT_313 ; 313, (D7A9, bit 3) + const EVENT_314 ; 314, (D7A9, bit 4) + const EVENT_315 ; 315, (D7A9, bit 5) + const EVENT_316 ; 316, (D7A9, bit 6) + const EVENT_317 ; 317, (D7A9, bit 7) + const EVENT_318 ; 318, (D7AA, bit 0) + const EVENT_319 ; 319, (D7AA, bit 1) + const EVENT_31A ; 31A, (D7AA, bit 2) + const EVENT_31B ; 31B, (D7AA, bit 3) + const EVENT_31C ; 31C, (D7AA, bit 4) + const EVENT_31D ; 31D, (D7AA, bit 5) + const EVENT_31E ; 31E, (D7AA, bit 6) + const EVENT_31F ; 31F, (D7AA, bit 7) + const EVENT_320 ; 320, (D7AB, bit 0) + const EVENT_321 ; 321, (D7AB, bit 1) + const EVENT_322 ; 322, (D7AB, bit 2) + const EVENT_323 ; 323, (D7AB, bit 3) + const EVENT_324 ; 324, (D7AB, bit 4) + const EVENT_325 ; 325, (D7AB, bit 5) + const EVENT_326 ; 326, (D7AB, bit 6) + const EVENT_327 ; 327, (D7AB, bit 7) + const EVENT_328 ; 328, (D7AC, bit 0) + const EVENT_329 ; 329, (D7AC, bit 1) + const EVENT_32A ; 32A, (D7AC, bit 2) + const EVENT_32B ; 32B, (D7AC, bit 3) + const EVENT_32C ; 32C, (D7AC, bit 4) + const EVENT_32D ; 32D, (D7AC, bit 5) + const EVENT_32E ; 32E, (D7AC, bit 6) + const EVENT_32F ; 32F, (D7AC, bit 7) + const EVENT_330 ; 330, (D7AD, bit 0) + const EVENT_331 ; 331, (D7AD, bit 1) + const EVENT_332 ; 332, (D7AD, bit 2) + const EVENT_333 ; 333, (D7AD, bit 3) + const EVENT_334 ; 334, (D7AD, bit 4) + const EVENT_335 ; 335, (D7AD, bit 5) + const EVENT_336 ; 336, (D7AD, bit 6) + const EVENT_337 ; 337, (D7AD, bit 7) + const EVENT_338 ; 338, (D7AE, bit 0) + const EVENT_339 ; 339, (D7AE, bit 1) + const EVENT_33A ; 33A, (D7AE, bit 2) + const EVENT_33B ; 33B, (D7AE, bit 3) + const EVENT_33C ; 33C, (D7AE, bit 4) + const EVENT_33D ; 33D, (D7AE, bit 5) + const EVENT_33E ; 33E, (D7AE, bit 6) + const EVENT_33F ; 33F, (D7AE, bit 7) + const EVENT_GOT_TM31 ; 340, (D7AF, bit 0) + const EVENT_341 ; 341, (D7AF, bit 1) + const EVENT_342 ; 342, (D7AF, bit 2) + const EVENT_343 ; 343, (D7AF, bit 3) + const EVENT_344 ; 344, (D7AF, bit 4) + const EVENT_345 ; 345, (D7AF, bit 5) + const EVENT_346 ; 346, (D7AF, bit 6) + const EVENT_347 ; 347, (D7AF, bit 7) + const EVENT_348 ; 348, (D7B0, bit 0) + const EVENT_349 ; 349, (D7B0, bit 1) + const EVENT_34A ; 34A, (D7B0, bit 2) + const EVENT_34B ; 34B, (D7B0, bit 3) + const EVENT_34C ; 34C, (D7B0, bit 4) + const EVENT_34D ; 34D, (D7B0, bit 5) + const EVENT_34E ; 34E, (D7B0, bit 6) + const EVENT_34F ; 34F, (D7B0, bit 7) + const EVENT_DEFEATED_FIGHTING_DOJO ; 350, (D7B1, bit 0) + const EVENT_BEAT_KARATE_MASTER ; 351, (D7B1, bit 1) + const EVENT_BEAT_FIGHTING_DOJO_TRAINER_0 ; 352, (D7B1, bit 2) + const EVENT_BEAT_FIGHTING_DOJO_TRAINER_1 ; 353, (D7B1, bit 3) + const EVENT_BEAT_FIGHTING_DOJO_TRAINER_2 ; 354, (D7B1, bit 4) + const EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 ; 355, (D7B1, bit 5) + const EVENT_GOT_HITMONLEE ; 356, (D7B1, bit 6) + const EVENT_GOT_HITMONCHAN ; 357, (D7B1, bit 7) + const EVENT_358 ; 358, (D7B2, bit 0) + const EVENT_359 ; 359, (D7B2, bit 1) + const EVENT_35A ; 35A, (D7B2, bit 2) + const EVENT_35B ; 35B, (D7B2, bit 3) + const EVENT_35C ; 35C, (D7B2, bit 4) + const EVENT_35D ; 35D, (D7B2, bit 5) + const EVENT_35E ; 35E, (D7B2, bit 6) + const EVENT_35F ; 35F, (D7B2, bit 7) + const EVENT_GOT_TM46 ; 360, (D7B3, bit 0) + const EVENT_BEAT_SABRINA ; 361, (D7B3, bit 1) + const EVENT_BEAT_SAFFRON_GYM_TRAINER_0 ; 362, (D7B3, bit 2) + const EVENT_BEAT_SAFFRON_GYM_TRAINER_1 ; 363, (D7B3, bit 3) + const EVENT_BEAT_SAFFRON_GYM_TRAINER_2 ; 364, (D7B3, bit 4) + const EVENT_BEAT_SAFFRON_GYM_TRAINER_3 ; 365, (D7B3, bit 5) + const EVENT_BEAT_SAFFRON_GYM_TRAINER_4 ; 366, (D7B3, bit 6) + const EVENT_BEAT_SAFFRON_GYM_TRAINER_5 ; 367, (D7B3, bit 7) + const EVENT_BEAT_SAFFRON_GYM_TRAINER_6 ; 368, (D7B4, bit 0) + const EVENT_369 ; 369, (D7B4, bit 1) + const EVENT_36A ; 36A, (D7B4, bit 2) + const EVENT_36B ; 36B, (D7B4, bit 3) + const EVENT_36C ; 36C, (D7B4, bit 4) + const EVENT_36D ; 36D, (D7B4, bit 5) + const EVENT_36E ; 36E, (D7B4, bit 6) + const EVENT_36F ; 36F, (D7B4, bit 7) + const EVENT_370 ; 370, (D7B5, bit 0) + const EVENT_371 ; 371, (D7B5, bit 1) + const EVENT_372 ; 372, (D7B5, bit 2) + const EVENT_373 ; 373, (D7B5, bit 3) + const EVENT_374 ; 374, (D7B5, bit 4) + const EVENT_375 ; 375, (D7B5, bit 5) + const EVENT_376 ; 376, (D7B5, bit 6) + const EVENT_377 ; 377, (D7B5, bit 7) + const EVENT_378 ; 378, (D7B6, bit 0) + const EVENT_379 ; 379, (D7B6, bit 1) + const EVENT_37A ; 37A, (D7B6, bit 2) + const EVENT_37B ; 37B, (D7B6, bit 3) + const EVENT_37C ; 37C, (D7B6, bit 4) + const EVENT_37D ; 37D, (D7B6, bit 5) + const EVENT_37E ; 37E, (D7B6, bit 6) + const EVENT_37F ; 37F, (D7B6, bit 7) + const EVENT_380 ; 380, (D7B7, bit 0) + const EVENT_381 ; 381, (D7B7, bit 1) + const EVENT_382 ; 382, (D7B7, bit 2) + const EVENT_383 ; 383, (D7B7, bit 3) + const EVENT_384 ; 384, (D7B7, bit 4) + const EVENT_385 ; 385, (D7B7, bit 5) + const EVENT_386 ; 386, (D7B7, bit 6) + const EVENT_387 ; 387, (D7B7, bit 7) + const EVENT_388 ; 388, (D7B8, bit 0) + const EVENT_389 ; 389, (D7B8, bit 1) + const EVENT_38A ; 38A, (D7B8, bit 2) + const EVENT_38B ; 38B, (D7B8, bit 3) + const EVENT_38C ; 38C, (D7B8, bit 4) + const EVENT_38D ; 38D, (D7B8, bit 5) + const EVENT_38E ; 38E, (D7B8, bit 6) + const EVENT_38F ; 38F, (D7B8, bit 7) + const EVENT_390 ; 390, (D7B9, bit 0) + const EVENT_391 ; 391, (D7B9, bit 1) + const EVENT_392 ; 392, (D7B9, bit 2) + const EVENT_393 ; 393, (D7B9, bit 3) + const EVENT_394 ; 394, (D7B9, bit 4) + const EVENT_395 ; 395, (D7B9, bit 5) + const EVENT_396 ; 396, (D7B9, bit 6) + const EVENT_SILPH_CO_RECEPTIONIST_AT_DESK ; 397, (D7B9, bit 7) + const EVENT_398 ; 398, (D7BA, bit 0) + const EVENT_399 ; 399, (D7BA, bit 1) + const EVENT_39A ; 39A, (D7BA, bit 2) + const EVENT_39B ; 39B, (D7BA, bit 3) + const EVENT_39C ; 39C, (D7BA, bit 4) + const EVENT_39D ; 39D, (D7BA, bit 5) + const EVENT_39E ; 39E, (D7BA, bit 6) + const EVENT_39F ; 39F, (D7BA, bit 7) + const EVENT_3A0 ; 3A0, (D7BB, bit 0) + const EVENT_3A1 ; 3A1, (D7BB, bit 1) + const EVENT_3A2 ; 3A2, (D7BB, bit 2) + const EVENT_3A3 ; 3A3, (D7BB, bit 3) + const EVENT_3A4 ; 3A4, (D7BB, bit 4) + const EVENT_3A5 ; 3A5, (D7BB, bit 5) + const EVENT_3A6 ; 3A6, (D7BB, bit 6) + const EVENT_3A7 ; 3A7, (D7BB, bit 7) + const EVENT_3A8 ; 3A8, (D7BC, bit 0) + const EVENT_3A9 ; 3A9, (D7BC, bit 1) + const EVENT_3AA ; 3AA, (D7BC, bit 2) + const EVENT_3AB ; 3AB, (D7BC, bit 3) + const EVENT_3AC ; 3AC, (D7BC, bit 4) + const EVENT_3AD ; 3AD, (D7BC, bit 5) + const EVENT_3AE ; 3AE, (D7BC, bit 6) + const EVENT_3AF ; 3AF, (D7BC, bit 7) + const EVENT_GOT_TM29 ; 3B0, (D7BD, bit 0) + const EVENT_3B1 ; 3B1, (D7BD, bit 1) + const EVENT_3B2 ; 3B2, (D7BD, bit 2) + const EVENT_3B3 ; 3B3, (D7BD, bit 3) + const EVENT_3B4 ; 3B4, (D7BD, bit 4) + const EVENT_3B5 ; 3B5, (D7BD, bit 5) + const EVENT_3B6 ; 3B6, (D7BD, bit 6) + const EVENT_3B7 ; 3B7, (D7BD, bit 7) + const EVENT_3B8 ; 3B8, (D7BE, bit 0) + const EVENT_3B9 ; 3B9, (D7BE, bit 1) + const EVENT_3BA ; 3BA, (D7BE, bit 2) + const EVENT_3BB ; 3BB, (D7BE, bit 3) + const EVENT_3BC ; 3BC, (D7BE, bit 4) + const EVENT_3BD ; 3BD, (D7BE, bit 5) + const EVENT_3BE ; 3BE, (D7BE, bit 6) + const EVENT_3BF ; 3BF, (D7BE, bit 7) + const EVENT_GOT_POTION_SAMPLE ; 3C0, (D7BF, bit 0) + const EVENT_3C1 ; 3C1, (D7BF, bit 1) + const EVENT_3C2 ; 3C2, (D7BF, bit 2) + const EVENT_3C3 ; 3C3, (D7BF, bit 3) + const EVENT_3C4 ; 3C4, (D7BF, bit 4) + const EVENT_3C5 ; 3C5, (D7BF, bit 5) + const EVENT_3C6 ; 3C6, (D7BF, bit 6) + const EVENT_3C7 ; 3C7, (D7BF, bit 7) + const EVENT_3C8 ; 3C8, (D7C0, bit 0) + const EVENT_3C9 ; 3C9, (D7C0, bit 1) + const EVENT_3CA ; 3CA, (D7C0, bit 2) + const EVENT_3CB ; 3CB, (D7C0, bit 3) + const EVENT_3CC ; 3CC, (D7C0, bit 4) + const EVENT_3CD ; 3CD, (D7C0, bit 5) + const EVENT_3CE ; 3CE, (D7C0, bit 6) + const EVENT_3CF ; 3CF, (D7C0, bit 7) + const EVENT_3D0 ; 3D0, (D7C1, bit 0) + const EVENT_3D1 ; 3D1, (D7C1, bit 1) + const EVENT_3D2 ; 3D2, (D7C1, bit 2) + const EVENT_3D3 ; 3D3, (D7C1, bit 3) + const EVENT_3D4 ; 3D4, (D7C1, bit 4) + const EVENT_3D5 ; 3D5, (D7C1, bit 5) + const EVENT_3D6 ; 3D6, (D7C1, bit 6) + const EVENT_3D7 ; 3D7, (D7C1, bit 7) + const EVENT_GOT_HM05 ; 3D8, (D7C2, bit 0) + const EVENT_3D9 ; 3D9, (D7C2, bit 1) + const EVENT_3DA ; 3DA, (D7C2, bit 2) + const EVENT_3DB ; 3DB, (D7C2, bit 3) + const EVENT_3DC ; 3DC, (D7C2, bit 4) + const EVENT_3DD ; 3DD, (D7C2, bit 5) + const EVENT_3DE ; 3DE, (D7C2, bit 6) + const EVENT_3DF ; 3DF, (D7C2, bit 7) + const EVENT_3E0 ; 3E0, (D7C3, bit 0) + const EVENT_3E1 ; 3E1, (D7C3, bit 1) + const EVENT_BEAT_ROUTE_3_TRAINER_0 ; 3E2, (D7C3, bit 2) + const EVENT_BEAT_ROUTE_3_TRAINER_1 ; 3E3, (D7C3, bit 3) + const EVENT_BEAT_ROUTE_3_TRAINER_2 ; 3E4, (D7C3, bit 4) + const EVENT_BEAT_ROUTE_3_TRAINER_3 ; 3E5, (D7C3, bit 5) + const EVENT_BEAT_ROUTE_3_TRAINER_4 ; 3E6, (D7C3, bit 6) + const EVENT_BEAT_ROUTE_3_TRAINER_5 ; 3E7, (D7C3, bit 7) + const EVENT_BEAT_ROUTE_3_TRAINER_6 ; 3E8, (D7C4, bit 0) + const EVENT_BEAT_ROUTE_3_TRAINER_7 ; 3E9, (D7C4, bit 1) + const EVENT_3EA ; 3EA, (D7C4, bit 2) + const EVENT_3EB ; 3EB, (D7C4, bit 3) + const EVENT_3EC ; 3EC, (D7C4, bit 4) + const EVENT_3ED ; 3ED, (D7C4, bit 5) + const EVENT_3EE ; 3EE, (D7C4, bit 6) + const EVENT_3EF ; 3EF, (D7C4, bit 7) + const EVENT_3F0 ; 3F0, (D7C5, bit 0) + const EVENT_3F1 ; 3F1, (D7C5, bit 1) + const EVENT_BEAT_ROUTE_4_TRAINER_0 ; 3F2, (D7C5, bit 2) + const EVENT_3F3 ; 3F3, (D7C5, bit 3) + const EVENT_3F4 ; 3F4, (D7C5, bit 4) + const EVENT_3F5 ; 3F5, (D7C5, bit 5) + const EVENT_3F6 ; 3F6, (D7C5, bit 6) + const EVENT_3F7 ; 3F7, (D7C5, bit 7) + const EVENT_3F8 ; 3F8, (D7C6, bit 0) + const EVENT_3F9 ; 3F9, (D7C6, bit 1) + const EVENT_3FA ; 3FA, (D7C6, bit 2) + const EVENT_3FB ; 3FB, (D7C6, bit 3) + const EVENT_3FC ; 3FC, (D7C6, bit 4) + const EVENT_3FD ; 3FD, (D7C6, bit 5) + const EVENT_3FE ; 3FE, (D7C6, bit 6) + const EVENT_BOUGHT_MAGIKARP ; 3FF, (D7C6, bit 7) + const EVENT_400 ; 400, (D7C7, bit 0) + const EVENT_401 ; 401, (D7C7, bit 1) + const EVENT_402 ; 402, (D7C7, bit 2) + const EVENT_403 ; 403, (D7C7, bit 3) + const EVENT_404 ; 404, (D7C7, bit 4) + const EVENT_405 ; 405, (D7C7, bit 5) + const EVENT_406 ; 406, (D7C7, bit 6) + const EVENT_407 ; 407, (D7C7, bit 7) + const EVENT_408 ; 408, (D7C8, bit 0) + const EVENT_409 ; 409, (D7C8, bit 1) + const EVENT_40A ; 40A, (D7C8, bit 2) + const EVENT_40B ; 40B, (D7C8, bit 3) + const EVENT_40C ; 40C, (D7C8, bit 4) + const EVENT_40D ; 40D, (D7C8, bit 5) + const EVENT_40E ; 40E, (D7C8, bit 6) + const EVENT_40F ; 40F, (D7C8, bit 7) + const EVENT_410 ; 410, (D7C9, bit 0) + const EVENT_BEAT_ROUTE_6_TRAINER_0 ; 411, (D7C9, bit 1) + const EVENT_BEAT_ROUTE_6_TRAINER_1 ; 412, (D7C9, bit 2) + const EVENT_BEAT_ROUTE_6_TRAINER_2 ; 413, (D7C9, bit 3) + const EVENT_BEAT_ROUTE_6_TRAINER_3 ; 414, (D7C9, bit 4) + const EVENT_BEAT_ROUTE_6_TRAINER_4 ; 415, (D7C9, bit 5) + const EVENT_BEAT_ROUTE_6_TRAINER_5 ; 416, (D7C9, bit 6) + const EVENT_417 ; 417, (D7C9, bit 7) + const EVENT_418 ; 418, (D7CA, bit 0) + const EVENT_419 ; 419, (D7CA, bit 1) + const EVENT_41A ; 41A, (D7CA, bit 2) + const EVENT_41B ; 41B, (D7CA, bit 3) + const EVENT_41C ; 41C, (D7CA, bit 4) + const EVENT_41D ; 41D, (D7CA, bit 5) + const EVENT_41E ; 41E, (D7CA, bit 6) + const EVENT_41F ; 41F, (D7CA, bit 7) + const EVENT_420 ; 420, (D7CB, bit 0) + const EVENT_421 ; 421, (D7CB, bit 1) + const EVENT_422 ; 422, (D7CB, bit 2) + const EVENT_423 ; 423, (D7CB, bit 3) + const EVENT_424 ; 424, (D7CB, bit 4) + const EVENT_425 ; 425, (D7CB, bit 5) + const EVENT_426 ; 426, (D7CB, bit 6) + const EVENT_427 ; 427, (D7CB, bit 7) + const EVENT_428 ; 428, (D7CC, bit 0) + const EVENT_429 ; 429, (D7CC, bit 1) + const EVENT_42A ; 42A, (D7CC, bit 2) + const EVENT_42B ; 42B, (D7CC, bit 3) + const EVENT_42C ; 42C, (D7CC, bit 4) + const EVENT_42D ; 42D, (D7CC, bit 5) + const EVENT_42E ; 42E, (D7CC, bit 6) + const EVENT_42F ; 42F, (D7CC, bit 7) + const EVENT_430 ; 430, (D7CD, bit 0) + const EVENT_BEAT_ROUTE_8_TRAINER_0 ; 431, (D7CD, bit 1) + const EVENT_BEAT_ROUTE_8_TRAINER_1 ; 432, (D7CD, bit 2) + const EVENT_BEAT_ROUTE_8_TRAINER_2 ; 433, (D7CD, bit 3) + const EVENT_BEAT_ROUTE_8_TRAINER_3 ; 434, (D7CD, bit 4) + const EVENT_BEAT_ROUTE_8_TRAINER_4 ; 435, (D7CD, bit 5) + const EVENT_BEAT_ROUTE_8_TRAINER_5 ; 436, (D7CD, bit 6) + const EVENT_BEAT_ROUTE_8_TRAINER_6 ; 437, (D7CD, bit 7) + const EVENT_BEAT_ROUTE_8_TRAINER_7 ; 438, (D7CE, bit 0) + const EVENT_BEAT_ROUTE_8_TRAINER_8 ; 439, (D7CE, bit 1) + const EVENT_43A ; 43A, (D7CE, bit 2) + const EVENT_43B ; 43B, (D7CE, bit 3) + const EVENT_43C ; 43C, (D7CE, bit 4) + const EVENT_43D ; 43D, (D7CE, bit 5) + const EVENT_43E ; 43E, (D7CE, bit 6) + const EVENT_43F ; 43F, (D7CE, bit 7) + const EVENT_440 ; 440, (D7CF, bit 0) + const EVENT_BEAT_ROUTE_9_TRAINER_0 ; 441, (D7CF, bit 1) + const EVENT_BEAT_ROUTE_9_TRAINER_1 ; 442, (D7CF, bit 2) + const EVENT_BEAT_ROUTE_9_TRAINER_2 ; 443, (D7CF, bit 3) + const EVENT_BEAT_ROUTE_9_TRAINER_3 ; 444, (D7CF, bit 4) + const EVENT_BEAT_ROUTE_9_TRAINER_4 ; 445, (D7CF, bit 5) + const EVENT_BEAT_ROUTE_9_TRAINER_5 ; 446, (D7CF, bit 6) + const EVENT_BEAT_ROUTE_9_TRAINER_6 ; 447, (D7CF, bit 7) + const EVENT_BEAT_ROUTE_9_TRAINER_7 ; 448, (D7D0, bit 0) + const EVENT_BEAT_ROUTE_9_TRAINER_8 ; 449, (D7D0, bit 1) + const EVENT_44A ; 44A, (D7D0, bit 2) + const EVENT_44B ; 44B, (D7D0, bit 3) + const EVENT_44C ; 44C, (D7D0, bit 4) + const EVENT_44D ; 44D, (D7D0, bit 5) + const EVENT_44E ; 44E, (D7D0, bit 6) + const EVENT_44F ; 44F, (D7D0, bit 7) + const EVENT_450 ; 450, (D7D1, bit 0) + const EVENT_BEAT_ROUTE_10_TRAINER_0 ; 451, (D7D1, bit 1) + const EVENT_BEAT_ROUTE_10_TRAINER_1 ; 452, (D7D1, bit 2) + const EVENT_BEAT_ROUTE_10_TRAINER_2 ; 453, (D7D1, bit 3) + const EVENT_BEAT_ROUTE_10_TRAINER_3 ; 454, (D7D1, bit 4) + const EVENT_BEAT_ROUTE_10_TRAINER_4 ; 455, (D7D1, bit 5) + const EVENT_BEAT_ROUTE_10_TRAINER_5 ; 456, (D7D1, bit 6) + const EVENT_457 ; 457, (D7D1, bit 7) + const EVENT_458 ; 458, (D7D2, bit 0) + const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0 ; 459, (D7D2, bit 1) + const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1 ; 45A, (D7D2, bit 2) + const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2 ; 45B, (D7D2, bit 3) + const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3 ; 45C, (D7D2, bit 4) + const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4 ; 45D, (D7D2, bit 5) + const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5 ; 45E, (D7D2, bit 6) + const EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6 ; 45F, (D7D2, bit 7) + const EVENT_460 ; 460, (D7D3, bit 0) + const EVENT_BEAT_POWER_PLANT_VOLTORB_0 ; 461, (D7D3, bit 1) + const EVENT_BEAT_POWER_PLANT_VOLTORB_1 ; 462, (D7D3, bit 2) + const EVENT_BEAT_POWER_PLANT_VOLTORB_2 ; 463, (D7D3, bit 3) + const EVENT_BEAT_POWER_PLANT_VOLTORB_3 ; 464, (D7D3, bit 4) + const EVENT_BEAT_POWER_PLANT_VOLTORB_4 ; 465, (D7D3, bit 5) + const EVENT_BEAT_POWER_PLANT_VOLTORB_5 ; 466, (D7D3, bit 6) + const EVENT_BEAT_POWER_PLANT_VOLTORB_6 ; 467, (D7D3, bit 7) + const EVENT_BEAT_POWER_PLANT_VOLTORB_7 ; 468, (D7D4, bit 0) + const EVENT_BEAT_ZAPDOS ; 469, (D7D4, bit 1) + const EVENT_46A ; 46A, (D7D4, bit 2) + const EVENT_46B ; 46B, (D7D4, bit 3) + const EVENT_46C ; 46C, (D7D4, bit 4) + const EVENT_46D ; 46D, (D7D4, bit 5) + const EVENT_46E ; 46E, (D7D4, bit 6) + const EVENT_46F ; 46F, (D7D4, bit 7) + const EVENT_470 ; 470, (D7D5, bit 0) + const EVENT_BEAT_ROUTE_11_TRAINER_0 ; 471, (D7D5, bit 1) + const EVENT_BEAT_ROUTE_11_TRAINER_1 ; 472, (D7D5, bit 2) + const EVENT_BEAT_ROUTE_11_TRAINER_2 ; 473, (D7D5, bit 3) + const EVENT_BEAT_ROUTE_11_TRAINER_3 ; 474, (D7D5, bit 4) + const EVENT_BEAT_ROUTE_11_TRAINER_4 ; 475, (D7D5, bit 5) + const EVENT_BEAT_ROUTE_11_TRAINER_5 ; 476, (D7D5, bit 6) + const EVENT_BEAT_ROUTE_11_TRAINER_6 ; 477, (D7D5, bit 7) + const EVENT_BEAT_ROUTE_11_TRAINER_7 ; 478, (D7D6, bit 0) + const EVENT_BEAT_ROUTE_11_TRAINER_8 ; 479, (D7D6, bit 1) + const EVENT_BEAT_ROUTE_11_TRAINER_9 ; 47A, (D7D6, bit 2) + const EVENT_47B ; 47B, (D7D6, bit 3) + const EVENT_47C ; 47C, (D7D6, bit 4) + const EVENT_47D ; 47D, (D7D6, bit 5) + const EVENT_47E ; 47E, (D7D6, bit 6) + const EVENT_GOT_ITEMFINDER ; 47F, (D7D6, bit 7) + const EVENT_GOT_TM39 ; 480, (D7D7, bit 0) + const EVENT_481 ; 481, (D7D7, bit 1) + const EVENT_BEAT_ROUTE_12_TRAINER_0 ; 482, (D7D7, bit 2) + const EVENT_BEAT_ROUTE_12_TRAINER_1 ; 483, (D7D7, bit 3) + const EVENT_BEAT_ROUTE_12_TRAINER_2 ; 484, (D7D7, bit 4) + const EVENT_BEAT_ROUTE_12_TRAINER_3 ; 485, (D7D7, bit 5) + const EVENT_BEAT_ROUTE_12_TRAINER_4 ; 486, (D7D7, bit 6) + const EVENT_BEAT_ROUTE_12_TRAINER_5 ; 487, (D7D7, bit 7) + const EVENT_BEAT_ROUTE_12_TRAINER_6 ; 488, (D7D8, bit 0) + const EVENT_489 ; 489, (D7D8, bit 1) + const EVENT_48A ; 48A, (D7D8, bit 2) + const EVENT_48B ; 48B, (D7D8, bit 3) + const EVENT_48C ; 48C, (D7D8, bit 4) + const EVENT_48D ; 48D, (D7D8, bit 5) + const EVENT_FIGHT_ROUTE12_SNORLAX ; 48E, (D7D8, bit 6) + const EVENT_BEAT_ROUTE12_SNORLAX ; 48F, (D7D8, bit 7) + const EVENT_490 ; 490, (D7D9, bit 0) + const EVENT_BEAT_ROUTE_13_TRAINER_0 ; 491, (D7D9, bit 1) + const EVENT_BEAT_ROUTE_13_TRAINER_1 ; 492, (D7D9, bit 2) + const EVENT_BEAT_ROUTE_13_TRAINER_2 ; 493, (D7D9, bit 3) + const EVENT_BEAT_ROUTE_13_TRAINER_3 ; 494, (D7D9, bit 4) + const EVENT_BEAT_ROUTE_13_TRAINER_4 ; 495, (D7D9, bit 5) + const EVENT_BEAT_ROUTE_13_TRAINER_5 ; 496, (D7D9, bit 6) + const EVENT_BEAT_ROUTE_13_TRAINER_6 ; 497, (D7D9, bit 7) + const EVENT_BEAT_ROUTE_13_TRAINER_7 ; 498, (D7DA, bit 0) + const EVENT_BEAT_ROUTE_13_TRAINER_8 ; 499, (D7DA, bit 1) + const EVENT_BEAT_ROUTE_13_TRAINER_9 ; 49A, (D7DA, bit 2) + const EVENT_49B ; 49B, (D7DA, bit 3) + const EVENT_49C ; 49C, (D7DA, bit 4) + const EVENT_49D ; 49D, (D7DA, bit 5) + const EVENT_49E ; 49E, (D7DA, bit 6) + const EVENT_49F ; 49F, (D7DA, bit 7) + const EVENT_4A0 ; 4A0, (D7DB, bit 0) + const EVENT_BEAT_ROUTE_14_TRAINER_0 ; 4A1, (D7DB, bit 1) + const EVENT_BEAT_ROUTE_14_TRAINER_1 ; 4A2, (D7DB, bit 2) + const EVENT_BEAT_ROUTE_14_TRAINER_2 ; 4A3, (D7DB, bit 3) + const EVENT_BEAT_ROUTE_14_TRAINER_3 ; 4A4, (D7DB, bit 4) + const EVENT_BEAT_ROUTE_14_TRAINER_4 ; 4A5, (D7DB, bit 5) + const EVENT_BEAT_ROUTE_14_TRAINER_5 ; 4A6, (D7DB, bit 6) + const EVENT_BEAT_ROUTE_14_TRAINER_6 ; 4A7, (D7DB, bit 7) + const EVENT_BEAT_ROUTE_14_TRAINER_7 ; 4A8, (D7DC, bit 0) + const EVENT_BEAT_ROUTE_14_TRAINER_8 ; 4A9, (D7DC, bit 1) + const EVENT_BEAT_ROUTE_14_TRAINER_9 ; 4AA, (D7DC, bit 2) + const EVENT_4AB ; 4AB, (D7DC, bit 3) + const EVENT_4AC ; 4AC, (D7DC, bit 4) + const EVENT_4AD ; 4AD, (D7DC, bit 5) + const EVENT_4AE ; 4AE, (D7DC, bit 6) + const EVENT_4AF ; 4AF, (D7DC, bit 7) + const EVENT_GOT_EXP_ALL ; 4B0, (D7DD, bit 0) + const EVENT_BEAT_ROUTE_15_TRAINER_0 ; 4B1, (D7DD, bit 1) + const EVENT_BEAT_ROUTE_15_TRAINER_1 ; 4B2, (D7DD, bit 2) + const EVENT_BEAT_ROUTE_15_TRAINER_2 ; 4B3, (D7DD, bit 3) + const EVENT_BEAT_ROUTE_15_TRAINER_3 ; 4B4, (D7DD, bit 4) + const EVENT_BEAT_ROUTE_15_TRAINER_4 ; 4B5, (D7DD, bit 5) + const EVENT_BEAT_ROUTE_15_TRAINER_5 ; 4B6, (D7DD, bit 6) + const EVENT_BEAT_ROUTE_15_TRAINER_6 ; 4B7, (D7DD, bit 7) + const EVENT_BEAT_ROUTE_15_TRAINER_7 ; 4B8, (D7DE, bit 0) + const EVENT_BEAT_ROUTE_15_TRAINER_8 ; 4B9, (D7DE, bit 1) + const EVENT_BEAT_ROUTE_15_TRAINER_9 ; 4BA, (D7DE, bit 2) + const EVENT_4BB ; 4BB, (D7DE, bit 3) + const EVENT_4BC ; 4BC, (D7DE, bit 4) + const EVENT_4BD ; 4BD, (D7DE, bit 5) + const EVENT_4BE ; 4BE, (D7DE, bit 6) + const EVENT_4BF ; 4BF, (D7DE, bit 7) + const EVENT_4C0 ; 4C0, (D7DF, bit 0) + const EVENT_BEAT_ROUTE_16_TRAINER_0 ; 4C1, (D7DF, bit 1) + const EVENT_BEAT_ROUTE_16_TRAINER_1 ; 4C2, (D7DF, bit 2) + const EVENT_BEAT_ROUTE_16_TRAINER_2 ; 4C3, (D7DF, bit 3) + const EVENT_BEAT_ROUTE_16_TRAINER_3 ; 4C4, (D7DF, bit 4) + const EVENT_BEAT_ROUTE_16_TRAINER_4 ; 4C5, (D7DF, bit 5) + const EVENT_BEAT_ROUTE_16_TRAINER_5 ; 4C6, (D7DF, bit 6) + const EVENT_4C7 ; 4C7, (D7DF, bit 7) + const EVENT_FIGHT_ROUTE16_SNORLAX ; 4C8, (D7E0, bit 0) + const EVENT_BEAT_ROUTE16_SNORLAX ; 4C9, (D7E0, bit 1) + const EVENT_4CA ; 4CA, (D7E0, bit 2) + const EVENT_4CB ; 4CB, (D7E0, bit 3) + const EVENT_4CC ; 4CC, (D7E0, bit 4) + const EVENT_4CD ; 4CD, (D7E0, bit 5) + const EVENT_GOT_HM02 ; 4CE, (D7E0, bit 6) + const EVENT_RESCUED_MR_FUJI ; 4CF, (D7E0, bit 7) + const EVENT_4D0 ; 4D0, (D7E1, bit 0) + const EVENT_BEAT_ROUTE_17_TRAINER_0 ; 4D1, (D7E1, bit 1) + const EVENT_BEAT_ROUTE_17_TRAINER_1 ; 4D2, (D7E1, bit 2) + const EVENT_BEAT_ROUTE_17_TRAINER_2 ; 4D3, (D7E1, bit 3) + const EVENT_BEAT_ROUTE_17_TRAINER_3 ; 4D4, (D7E1, bit 4) + const EVENT_BEAT_ROUTE_17_TRAINER_4 ; 4D5, (D7E1, bit 5) + const EVENT_BEAT_ROUTE_17_TRAINER_5 ; 4D6, (D7E1, bit 6) + const EVENT_BEAT_ROUTE_17_TRAINER_6 ; 4D7, (D7E1, bit 7) + const EVENT_BEAT_ROUTE_17_TRAINER_7 ; 4D8, (D7E2, bit 0) + const EVENT_BEAT_ROUTE_17_TRAINER_8 ; 4D9, (D7E2, bit 1) + const EVENT_BEAT_ROUTE_17_TRAINER_9 ; 4DA, (D7E2, bit 2) + const EVENT_4DB ; 4DB, (D7E2, bit 3) + const EVENT_4DC ; 4DC, (D7E2, bit 4) + const EVENT_4DD ; 4DD, (D7E2, bit 5) + const EVENT_4DE ; 4DE, (D7E2, bit 6) + const EVENT_4DF ; 4DF, (D7E2, bit 7) + const EVENT_4E0 ; 4E0, (D7E3, bit 0) + const EVENT_BEAT_ROUTE_18_TRAINER_0 ; 4E1, (D7E3, bit 1) + const EVENT_BEAT_ROUTE_18_TRAINER_1 ; 4E2, (D7E3, bit 2) + const EVENT_BEAT_ROUTE_18_TRAINER_2 ; 4E3, (D7E3, bit 3) + const EVENT_4E4 ; 4E4, (D7E3, bit 4) + const EVENT_4E5 ; 4E5, (D7E3, bit 5) + const EVENT_4E6 ; 4E6, (D7E3, bit 6) + const EVENT_4E7 ; 4E7, (D7E3, bit 7) + const EVENT_4E8 ; 4E8, (D7E4, bit 0) + const EVENT_4E9 ; 4E9, (D7E4, bit 1) + const EVENT_4EA ; 4EA, (D7E4, bit 2) + const EVENT_4EB ; 4EB, (D7E4, bit 3) + const EVENT_4EC ; 4EC, (D7E4, bit 4) + const EVENT_4ED ; 4ED, (D7E4, bit 5) + const EVENT_4EE ; 4EE, (D7E4, bit 6) + const EVENT_4EF ; 4EF, (D7E4, bit 7) + const EVENT_4F0 ; 4F0, (D7E5, bit 0) + const EVENT_BEAT_ROUTE_19_TRAINER_0 ; 4F1, (D7E5, bit 1) + const EVENT_BEAT_ROUTE_19_TRAINER_1 ; 4F2, (D7E5, bit 2) + const EVENT_BEAT_ROUTE_19_TRAINER_2 ; 4F3, (D7E5, bit 3) + const EVENT_BEAT_ROUTE_19_TRAINER_3 ; 4F4, (D7E5, bit 4) + const EVENT_BEAT_ROUTE_19_TRAINER_4 ; 4F5, (D7E5, bit 5) + const EVENT_BEAT_ROUTE_19_TRAINER_5 ; 4F6, (D7E5, bit 6) + const EVENT_BEAT_ROUTE_19_TRAINER_6 ; 4F7, (D7E5, bit 7) + const EVENT_BEAT_ROUTE_19_TRAINER_7 ; 4F8, (D7E6, bit 0) + const EVENT_BEAT_ROUTE_19_TRAINER_8 ; 4F9, (D7E6, bit 1) + const EVENT_BEAT_ROUTE_19_TRAINER_9 ; 4FA, (D7E6, bit 2) + const EVENT_4FB ; 4FB, (D7E6, bit 3) + const EVENT_4FC ; 4FC, (D7E6, bit 4) + const EVENT_4FD ; 4FD, (D7E6, bit 5) + const EVENT_4FE ; 4FE, (D7E6, bit 6) + const EVENT_4FF ; 4FF, (D7E6, bit 7) + const EVENT_IN_SEAFOAM_ISLANDS ; 500, (D7E7, bit 0) + const EVENT_BEAT_ROUTE_20_TRAINER_0 ; 501, (D7E7, bit 1) + const EVENT_BEAT_ROUTE_20_TRAINER_1 ; 502, (D7E7, bit 2) + const EVENT_BEAT_ROUTE_20_TRAINER_2 ; 503, (D7E7, bit 3) + const EVENT_BEAT_ROUTE_20_TRAINER_3 ; 504, (D7E7, bit 4) + const EVENT_BEAT_ROUTE_20_TRAINER_4 ; 505, (D7E7, bit 5) + const EVENT_BEAT_ROUTE_20_TRAINER_5 ; 506, (D7E7, bit 6) + const EVENT_BEAT_ROUTE_20_TRAINER_6 ; 507, (D7E7, bit 7) + const EVENT_BEAT_ROUTE_20_TRAINER_7 ; 508, (D7E8, bit 0) + const EVENT_BEAT_ROUTE_20_TRAINER_8 ; 509, (D7E8, bit 1) + const EVENT_BEAT_ROUTE_20_TRAINER_9 ; 50A, (D7E8, bit 2) + const EVENT_50B ; 50B, (D7E8, bit 3) + const EVENT_50C ; 50C, (D7E8, bit 4) + const EVENT_50D ; 50D, (D7E8, bit 5) + const EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE ; 50E, (D7E8, bit 6) + const EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE ; 50F, (D7E8, bit 7) + const EVENT_510 ; 510, (D7E9, bit 0) + const EVENT_BEAT_ROUTE_21_TRAINER_0 ; 511, (D7E9, bit 1) + const EVENT_BEAT_ROUTE_21_TRAINER_1 ; 512, (D7E9, bit 2) + const EVENT_BEAT_ROUTE_21_TRAINER_2 ; 513, (D7E9, bit 3) + const EVENT_BEAT_ROUTE_21_TRAINER_3 ; 514, (D7E9, bit 4) + const EVENT_BEAT_ROUTE_21_TRAINER_4 ; 515, (D7E9, bit 5) + const EVENT_BEAT_ROUTE_21_TRAINER_5 ; 516, (D7E9, bit 6) + const EVENT_BEAT_ROUTE_21_TRAINER_6 ; 517, (D7E9, bit 7) + const EVENT_BEAT_ROUTE_21_TRAINER_7 ; 518, (D7EA, bit 0) + const EVENT_BEAT_ROUTE_21_TRAINER_8 ; 519, (D7EA, bit 1) + const EVENT_51A ; 51A, (D7EA, bit 2) + const EVENT_51B ; 51B, (D7EA, bit 3) + const EVENT_51C ; 51C, (D7EA, bit 4) + const EVENT_51D ; 51D, (D7EA, bit 5) + const EVENT_51E ; 51E, (D7EA, bit 6) + const EVENT_51F ; 51F, (D7EA, bit 7) + const EVENT_1ST_ROUTE22_RIVAL_BATTLE ; 520, (D7EB, bit 0) + const EVENT_2ND_ROUTE22_RIVAL_BATTLE ; 521, (D7EB, bit 1) + const EVENT_522 ; 522, (D7EB, bit 2) + const EVENT_523 ; 523, (D7EB, bit 3) + const EVENT_524 ; 524, (D7EB, bit 4) + const EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE ; 525, (D7EB, bit 5) + const EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE ; 526, (D7EB, bit 6) + const EVENT_ROUTE22_RIVAL_WANTS_BATTLE ; 527, (D7EB, bit 7) + const EVENT_528 ; 528, (D7EC, bit 0) + const EVENT_529 ; 529, (D7EC, bit 1) + const EVENT_52A ; 52A, (D7EC, bit 2) + const EVENT_52B ; 52B, (D7EC, bit 3) + const EVENT_52C ; 52C, (D7EC, bit 4) + const EVENT_52D ; 52D, (D7EC, bit 5) + const EVENT_52E ; 52E, (D7EC, bit 6) + const EVENT_52F ; 52F, (D7EC, bit 7) + const EVENT_PASSED_CASCADEBADGE_CHECK ; 530, (D7ED, bit 0) + const EVENT_PASSED_THUNDERBADGE_CHECK ; 531, (D7ED, bit 1) + const EVENT_PASSED_RAINBOWBADGE_CHECK ; 532, (D7ED, bit 2) + const EVENT_PASSED_SOULBADGE_CHECK ; 533, (D7ED, bit 3) + const EVENT_PASSED_MARSHBADGE_CHECK ; 534, (D7ED, bit 4) + const EVENT_PASSED_VOLCANOBADGE_CHECK ; 535, (D7ED, bit 5) + const EVENT_PASSED_EARTHBADGE_CHECK ; 536, (D7ED, bit 6) + const EVENT_537 ; 537, (D7ED, bit 7) + const EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 ; 538, (D7EE, bit 0) + const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0 ; 539, (D7EE, bit 1) + const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1 ; 53A, (D7EE, bit 2) + const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2 ; 53B, (D7EE, bit 3) + const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3 ; 53C, (D7EE, bit 4) + const EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4 ; 53D, (D7EE, bit 5) + const EVENT_BEAT_MOLTRES ; 53E, (D7EE, bit 6) + const EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2 ; 53F, (D7EE, bit 7) + const EVENT_GOT_NUGGET ; 540, (D7EF, bit 0) + const EVENT_BEAT_ROUTE24_ROCKET ; 541, (D7EF, bit 1) + const EVENT_BEAT_ROUTE_24_TRAINER_0 ; 542, (D7EF, bit 2) + const EVENT_BEAT_ROUTE_24_TRAINER_1 ; 543, (D7EF, bit 3) + const EVENT_BEAT_ROUTE_24_TRAINER_2 ; 544, (D7EF, bit 4) + const EVENT_BEAT_ROUTE_24_TRAINER_3 ; 545, (D7EF, bit 5) + const EVENT_BEAT_ROUTE_24_TRAINER_4 ; 546, (D7EF, bit 6) + const EVENT_BEAT_ROUTE_24_TRAINER_5 ; 547, (D7EF, bit 7) + const EVENT_548 ; 548, (D7F0, bit 0) + const EVENT_NUGGET_REWARD_AVAILABLE ; 549, (D7F0, bit 1) + const EVENT_54A ; 54A, (D7F0, bit 2) + const EVENT_54B ; 54B, (D7F0, bit 3) + const EVENT_54C ; 54C, (D7F0, bit 4) + const EVENT_54D ; 54D, (D7F0, bit 5) + const EVENT_54E ; 54E, (D7F0, bit 6) + const EVENT_54F ; 54F, (D7F0, bit 7) + const EVENT_MET_BILL ; 550, (D7F1, bit 0) + const EVENT_BEAT_ROUTE_25_TRAINER_0 ; 551, (D7F1, bit 1) + const EVENT_BEAT_ROUTE_25_TRAINER_1 ; 552, (D7F1, bit 2) + const EVENT_BEAT_ROUTE_25_TRAINER_2 ; 553, (D7F1, bit 3) + const EVENT_BEAT_ROUTE_25_TRAINER_3 ; 554, (D7F1, bit 4) + const EVENT_BEAT_ROUTE_25_TRAINER_4 ; 555, (D7F1, bit 5) + const EVENT_BEAT_ROUTE_25_TRAINER_5 ; 556, (D7F1, bit 6) + const EVENT_BEAT_ROUTE_25_TRAINER_6 ; 557, (D7F1, bit 7) + const EVENT_BEAT_ROUTE_25_TRAINER_7 ; 558, (D7F2, bit 0) + const EVENT_BEAT_ROUTE_25_TRAINER_8 ; 559, (D7F2, bit 1) + const EVENT_55A ; 55A, (D7F2, bit 2) + const EVENT_USED_CELL_SEPARATOR_ON_BILL ; 55B, (D7F2, bit 3) + const EVENT_GOT_SS_TICKET ; 55C, (D7F2, bit 4) + const EVENT_MET_BILL_2 ; 55D, (D7F2, bit 5) + const EVENT_BILL_SAID_USE_CELL_SEPARATOR ; 55E, (D7F2, bit 6) + const EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ; 55F, (D7F2, bit 7) + const EVENT_560 ; 560, (D7F3, bit 0) + const EVENT_561 ; 561, (D7F3, bit 1) + const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0 ; 562, (D7F3, bit 2) + const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1 ; 563, (D7F3, bit 3) + const EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2 ; 564, (D7F3, bit 4) + const EVENT_565 ; 565, (D7F3, bit 5) + const EVENT_566 ; 566, (D7F3, bit 6) + const EVENT_567 ; 567, (D7F3, bit 7) + const EVENT_568 ; 568, (D7F4, bit 0) + const EVENT_569 ; 569, (D7F4, bit 1) + const EVENT_56A ; 56A, (D7F4, bit 2) + const EVENT_56B ; 56B, (D7F4, bit 3) + const EVENT_56C ; 56C, (D7F4, bit 4) + const EVENT_56D ; 56D, (D7F4, bit 5) + const EVENT_56E ; 56E, (D7F4, bit 6) + const EVENT_56F ; 56F, (D7F4, bit 7) + const EVENT_570 ; 570, (D7F5, bit 0) + const EVENT_BEAT_MT_MOON_1_TRAINER_0 ; 571, (D7F5, bit 1) + const EVENT_BEAT_MT_MOON_1_TRAINER_1 ; 572, (D7F5, bit 2) + const EVENT_BEAT_MT_MOON_1_TRAINER_2 ; 573, (D7F5, bit 3) + const EVENT_BEAT_MT_MOON_1_TRAINER_3 ; 574, (D7F5, bit 4) + const EVENT_BEAT_MT_MOON_1_TRAINER_4 ; 575, (D7F5, bit 5) + const EVENT_BEAT_MT_MOON_1_TRAINER_5 ; 576, (D7F5, bit 6) + const EVENT_BEAT_MT_MOON_1_TRAINER_6 ; 577, (D7F5, bit 7) + const EVENT_578 ; 578, (D7F6, bit 0) + const EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD ; 579, (D7F6, bit 1) + const EVENT_BEAT_MT_MOON_3_TRAINER_0 ; 57A, (D7F6, bit 2) + const EVENT_BEAT_MT_MOON_3_TRAINER_1 ; 57B, (D7F6, bit 3) + const EVENT_BEAT_MT_MOON_3_TRAINER_2 ; 57C, (D7F6, bit 4) + const EVENT_BEAT_MT_MOON_3_TRAINER_3 ; 57D, (D7F6, bit 5) + const EVENT_GOT_DOME_FOSSIL ; 57E, (D7F6, bit 6) + const EVENT_GOT_HELIX_FOSSIL ; 57F, (D7F6, bit 7) + const EVENT_580 ; 580, (D7F7, bit 0) + const EVENT_581 ; 581, (D7F7, bit 1) + const EVENT_582 ; 582, (D7F7, bit 2) + const EVENT_583 ; 583, (D7F7, bit 3) + const EVENT_584 ; 584, (D7F7, bit 4) + const EVENT_585 ; 585, (D7F7, bit 5) + const EVENT_586 ; 586, (D7F7, bit 6) + const EVENT_587 ; 587, (D7F7, bit 7) + const EVENT_588 ; 588, (D7F8, bit 0) + const EVENT_589 ; 589, (D7F8, bit 1) + const EVENT_58A ; 58A, (D7F8, bit 2) + const EVENT_58B ; 58B, (D7F8, bit 3) + const EVENT_58C ; 58C, (D7F8, bit 4) + const EVENT_58D ; 58D, (D7F8, bit 5) + const EVENT_58E ; 58E, (D7F8, bit 6) + const EVENT_58F ; 58F, (D7F8, bit 7) + const EVENT_590 ; 590, (D7F9, bit 0) + const EVENT_591 ; 591, (D7F9, bit 1) + const EVENT_592 ; 592, (D7F9, bit 2) + const EVENT_593 ; 593, (D7F9, bit 3) + const EVENT_594 ; 594, (D7F9, bit 4) + const EVENT_595 ; 595, (D7F9, bit 5) + const EVENT_596 ; 596, (D7F9, bit 6) + const EVENT_597 ; 597, (D7F9, bit 7) + const EVENT_598 ; 598, (D7FA, bit 0) + const EVENT_599 ; 599, (D7FA, bit 1) + const EVENT_59A ; 59A, (D7FA, bit 2) + const EVENT_59B ; 59B, (D7FA, bit 3) + const EVENT_59C ; 59C, (D7FA, bit 4) + const EVENT_59D ; 59D, (D7FA, bit 5) + const EVENT_59E ; 59E, (D7FA, bit 6) + const EVENT_59F ; 59F, (D7FA, bit 7) + const EVENT_5A0 ; 5A0, (D7FB, bit 0) + const EVENT_5A1 ; 5A1, (D7FB, bit 1) + const EVENT_5A2 ; 5A2, (D7FB, bit 2) + const EVENT_5A3 ; 5A3, (D7FB, bit 3) + const EVENT_5A4 ; 5A4, (D7FB, bit 4) + const EVENT_5A5 ; 5A5, (D7FB, bit 5) + const EVENT_5A6 ; 5A6, (D7FB, bit 6) + const EVENT_5A7 ; 5A7, (D7FB, bit 7) + const EVENT_5A8 ; 5A8, (D7FC, bit 0) + const EVENT_5A9 ; 5A9, (D7FC, bit 1) + const EVENT_5AA ; 5AA, (D7FC, bit 2) + const EVENT_5AB ; 5AB, (D7FC, bit 3) + const EVENT_5AC ; 5AC, (D7FC, bit 4) + const EVENT_5AD ; 5AD, (D7FC, bit 5) + const EVENT_5AE ; 5AE, (D7FC, bit 6) + const EVENT_5AF ; 5AF, (D7FC, bit 7) + const EVENT_5B0 ; 5B0, (D7FD, bit 0) + const EVENT_5B1 ; 5B1, (D7FD, bit 1) + const EVENT_5B2 ; 5B2, (D7FD, bit 2) + const EVENT_5B3 ; 5B3, (D7FD, bit 3) + const EVENT_5B4 ; 5B4, (D7FD, bit 4) + const EVENT_5B5 ; 5B5, (D7FD, bit 5) + const EVENT_5B6 ; 5B6, (D7FD, bit 6) + const EVENT_5B7 ; 5B7, (D7FD, bit 7) + const EVENT_5B8 ; 5B8, (D7FE, bit 0) + const EVENT_5B9 ; 5B9, (D7FE, bit 1) + const EVENT_5BA ; 5BA, (D7FE, bit 2) + const EVENT_5BB ; 5BB, (D7FE, bit 3) + const EVENT_5BC ; 5BC, (D7FE, bit 4) + const EVENT_5BD ; 5BD, (D7FE, bit 5) + const EVENT_5BE ; 5BE, (D7FE, bit 6) + const EVENT_5BF ; 5BF, (D7FE, bit 7) + const EVENT_5C0 ; 5C0, (D7FF, bit 0) + const EVENT_5C1 ; 5C1, (D7FF, bit 1) + const EVENT_5C2 ; 5C2, (D7FF, bit 2) + const EVENT_5C3 ; 5C3, (D7FF, bit 3) + const EVENT_BEAT_SS_ANNE_5_TRAINER_0 ; 5C4, (D7FF, bit 4) + const EVENT_BEAT_SS_ANNE_5_TRAINER_1 ; 5C5, (D7FF, bit 5) + const EVENT_5C6 ; 5C6, (D7FF, bit 6) + const EVENT_5C7 ; 5C7, (D7FF, bit 7) + const EVENT_5C8 ; 5C8, (D800, bit 0) + const EVENT_5C9 ; 5C9, (D800, bit 1) + const EVENT_5CA ; 5CA, (D800, bit 2) + const EVENT_5CB ; 5CB, (D800, bit 3) + const EVENT_5CC ; 5CC, (D800, bit 4) + const EVENT_5CD ; 5CD, (D800, bit 5) + const EVENT_5CE ; 5CE, (D800, bit 6) + const EVENT_5CF ; 5CF, (D800, bit 7) + const EVENT_5D0 ; 5D0, (D801, bit 0) + const EVENT_5D1 ; 5D1, (D801, bit 1) + const EVENT_5D2 ; 5D2, (D801, bit 2) + const EVENT_5D3 ; 5D3, (D801, bit 3) + const EVENT_5D4 ; 5D4, (D801, bit 4) + const EVENT_5D5 ; 5D5, (D801, bit 5) + const EVENT_5D6 ; 5D6, (D801, bit 6) + const EVENT_5D7 ; 5D7, (D801, bit 7) + const EVENT_5D8 ; 5D8, (D802, bit 0) + const EVENT_5D9 ; 5D9, (D802, bit 1) + const EVENT_5DA ; 5DA, (D802, bit 2) + const EVENT_5DB ; 5DB, (D802, bit 3) + const EVENT_5DC ; 5DC, (D802, bit 4) + const EVENT_5DD ; 5DD, (D802, bit 5) + const EVENT_5DE ; 5DE, (D802, bit 6) + const EVENT_5DF ; 5DF, (D802, bit 7) + const EVENT_GOT_HM01 ; 5E0, (D803, bit 0) + const EVENT_RUBBED_CAPTAINS_BACK ; 5E1, (D803, bit 1) + const EVENT_SS_ANNE_LEFT ; 5E2, (D803, bit 2) + const EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT ; 5E3, (D803, bit 3) + const EVENT_STARTED_WALKING_OUT_OF_DOCK ; 5E4, (D803, bit 4) + const EVENT_WALKED_OUT_OF_DOCK ; 5E5, (D803, bit 5) + const EVENT_5E6 ; 5E6, (D803, bit 6) + const EVENT_5E7 ; 5E7, (D803, bit 7) + const EVENT_5E8 ; 5E8, (D804, bit 0) + const EVENT_5E9 ; 5E9, (D804, bit 1) + const EVENT_5EA ; 5EA, (D804, bit 2) + const EVENT_5EB ; 5EB, (D804, bit 3) + const EVENT_5EC ; 5EC, (D804, bit 4) + const EVENT_5ED ; 5ED, (D804, bit 5) + const EVENT_5EE ; 5EE, (D804, bit 6) + const EVENT_5EF ; 5EF, (D804, bit 7) + const EVENT_5F0 ; 5F0, (D805, bit 0) + const EVENT_BEAT_SS_ANNE_8_TRAINER_0 ; 5F1, (D805, bit 1) + const EVENT_BEAT_SS_ANNE_8_TRAINER_1 ; 5F2, (D805, bit 2) + const EVENT_BEAT_SS_ANNE_8_TRAINER_2 ; 5F3, (D805, bit 3) + const EVENT_BEAT_SS_ANNE_8_TRAINER_3 ; 5F4, (D805, bit 4) + const EVENT_5F5 ; 5F5, (D805, bit 5) + const EVENT_5F6 ; 5F6, (D805, bit 6) + const EVENT_5F7 ; 5F7, (D805, bit 7) + const EVENT_5F8 ; 5F8, (D806, bit 0) + const EVENT_5F9 ; 5F9, (D806, bit 1) + const EVENT_5FA ; 5FA, (D806, bit 2) + const EVENT_5FB ; 5FB, (D806, bit 3) + const EVENT_5FC ; 5FC, (D806, bit 4) + const EVENT_5FD ; 5FD, (D806, bit 5) + const EVENT_5FE ; 5FE, (D806, bit 6) + const EVENT_5FF ; 5FF, (D806, bit 7) + const EVENT_600 ; 600, (D807, bit 0) + const EVENT_BEAT_SS_ANNE_9_TRAINER_0 ; 601, (D807, bit 1) + const EVENT_BEAT_SS_ANNE_9_TRAINER_1 ; 602, (D807, bit 2) + const EVENT_BEAT_SS_ANNE_9_TRAINER_2 ; 603, (D807, bit 3) + const EVENT_BEAT_SS_ANNE_9_TRAINER_3 ; 604, (D807, bit 4) + const EVENT_605 ; 605, (D807, bit 5) + const EVENT_606 ; 606, (D807, bit 6) + const EVENT_607 ; 607, (D807, bit 7) + const EVENT_608 ; 608, (D808, bit 0) + const EVENT_609 ; 609, (D808, bit 1) + const EVENT_60A ; 60A, (D808, bit 2) + const EVENT_60B ; 60B, (D808, bit 3) + const EVENT_60C ; 60C, (D808, bit 4) + const EVENT_60D ; 60D, (D808, bit 5) + const EVENT_60E ; 60E, (D808, bit 6) + const EVENT_60F ; 60F, (D808, bit 7) + const EVENT_610 ; 610, (D809, bit 0) + const EVENT_BEAT_SS_ANNE_10_TRAINER_0 ; 611, (D809, bit 1) + const EVENT_BEAT_SS_ANNE_10_TRAINER_1 ; 612, (D809, bit 2) + const EVENT_BEAT_SS_ANNE_10_TRAINER_2 ; 613, (D809, bit 3) + const EVENT_BEAT_SS_ANNE_10_TRAINER_3 ; 614, (D809, bit 4) + const EVENT_BEAT_SS_ANNE_10_TRAINER_4 ; 615, (D809, bit 5) + const EVENT_BEAT_SS_ANNE_10_TRAINER_5 ; 616, (D809, bit 6) + const EVENT_617 ; 617, (D809, bit 7) + const EVENT_618 ; 618, (D80A, bit 0) + const EVENT_619 ; 619, (D80A, bit 1) + const EVENT_61A ; 61A, (D80A, bit 2) + const EVENT_61B ; 61B, (D80A, bit 3) + const EVENT_61C ; 61C, (D80A, bit 4) + const EVENT_61D ; 61D, (D80A, bit 5) + const EVENT_61E ; 61E, (D80A, bit 6) + const EVENT_61F ; 61F, (D80A, bit 7) + const EVENT_620 ; 620, (D80B, bit 0) + const EVENT_621 ; 621, (D80B, bit 1) + const EVENT_622 ; 622, (D80B, bit 2) + const EVENT_623 ; 623, (D80B, bit 3) + const EVENT_624 ; 624, (D80B, bit 4) + const EVENT_625 ; 625, (D80B, bit 5) + const EVENT_626 ; 626, (D80B, bit 6) + const EVENT_627 ; 627, (D80B, bit 7) + const EVENT_628 ; 628, (D80C, bit 0) + const EVENT_629 ; 629, (D80C, bit 1) + const EVENT_62A ; 62A, (D80C, bit 2) + const EVENT_62B ; 62B, (D80C, bit 3) + const EVENT_62C ; 62C, (D80C, bit 4) + const EVENT_62D ; 62D, (D80C, bit 5) + const EVENT_62E ; 62E, (D80C, bit 6) + const EVENT_62F ; 62F, (D80C, bit 7) + const EVENT_630 ; 630, (D80D, bit 0) + const EVENT_631 ; 631, (D80D, bit 1) + const EVENT_632 ; 632, (D80D, bit 2) + const EVENT_633 ; 633, (D80D, bit 3) + const EVENT_634 ; 634, (D80D, bit 4) + const EVENT_635 ; 635, (D80D, bit 5) + const EVENT_636 ; 636, (D80D, bit 6) + const EVENT_637 ; 637, (D80D, bit 7) + const EVENT_638 ; 638, (D80E, bit 0) + const EVENT_639 ; 639, (D80E, bit 1) + const EVENT_63A ; 63A, (D80E, bit 2) + const EVENT_63B ; 63B, (D80E, bit 3) + const EVENT_63C ; 63C, (D80E, bit 4) + const EVENT_63D ; 63D, (D80E, bit 5) + const EVENT_63E ; 63E, (D80E, bit 6) + const EVENT_63F ; 63F, (D80E, bit 7) + const EVENT_640 ; 640, (D80F, bit 0) + const EVENT_641 ; 641, (D80F, bit 1) + const EVENT_642 ; 642, (D80F, bit 2) + const EVENT_643 ; 643, (D80F, bit 3) + const EVENT_644 ; 644, (D80F, bit 4) + const EVENT_645 ; 645, (D80F, bit 5) + const EVENT_646 ; 646, (D80F, bit 6) + const EVENT_647 ; 647, (D80F, bit 7) + const EVENT_648 ; 648, (D810, bit 0) + const EVENT_649 ; 649, (D810, bit 1) + const EVENT_64A ; 64A, (D810, bit 2) + const EVENT_64B ; 64B, (D810, bit 3) + const EVENT_64C ; 64C, (D810, bit 4) + const EVENT_64D ; 64D, (D810, bit 5) + const EVENT_64E ; 64E, (D810, bit 6) + const EVENT_64F ; 64F, (D810, bit 7) + const EVENT_650 ; 650, (D811, bit 0) + const EVENT_651 ; 651, (D811, bit 1) + const EVENT_652 ; 652, (D811, bit 2) + const EVENT_653 ; 653, (D811, bit 3) + const EVENT_654 ; 654, (D811, bit 4) + const EVENT_655 ; 655, (D811, bit 5) + const EVENT_656 ; 656, (D811, bit 6) + const EVENT_657 ; 657, (D811, bit 7) + const EVENT_658 ; 658, (D812, bit 0) + const EVENT_659 ; 659, (D812, bit 1) + const EVENT_65A ; 65A, (D812, bit 2) + const EVENT_65B ; 65B, (D812, bit 3) + const EVENT_65C ; 65C, (D812, bit 4) + const EVENT_65D ; 65D, (D812, bit 5) + const EVENT_65E ; 65E, (D812, bit 6) + const EVENT_65F ; 65F, (D812, bit 7) + const EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1 ; 660, (D813, bit 0) + const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0 ; 661, (D813, bit 1) + const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1 ; 662, (D813, bit 2) + const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2 ; 663, (D813, bit 3) + const EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3 ; 664, (D813, bit 4) + const EVENT_665 ; 665, (D813, bit 5) + const EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2 ; 666, (D813, bit 6) + const EVENT_667 ; 667, (D813, bit 7) + const EVENT_668 ; 668, (D814, bit 0) + const EVENT_669 ; 669, (D814, bit 1) + const EVENT_66A ; 66A, (D814, bit 2) + const EVENT_66B ; 66B, (D814, bit 3) + const EVENT_66C ; 66C, (D814, bit 4) + const EVENT_66D ; 66D, (D814, bit 5) + const EVENT_66E ; 66E, (D814, bit 6) + const EVENT_66F ; 66F, (D814, bit 7) + const EVENT_670 ; 670, (D815, bit 0) + const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0 ; 671, (D815, bit 1) + const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1 ; 672, (D815, bit 2) + const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2 ; 673, (D815, bit 3) + const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3 ; 674, (D815, bit 4) + const EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4 ; 675, (D815, bit 5) + const EVENT_676 ; 676, (D815, bit 6) + const EVENT_677 ; 677, (D815, bit 7) + const EVENT_678 ; 678, (D816, bit 0) + const EVENT_679 ; 679, (D816, bit 1) + const EVENT_67A ; 67A, (D816, bit 2) + const EVENT_67B ; 67B, (D816, bit 3) + const EVENT_67C ; 67C, (D816, bit 4) + const EVENT_67D ; 67D, (D816, bit 5) + const EVENT_67E ; 67E, (D816, bit 6) + const EVENT_67F ; 67F, (D816, bit 7) + const EVENT_680 ; 680, (D817, bit 0) + const EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0 ; 681, (D817, bit 1) + const EVENT_682 ; 682, (D817, bit 2) + const EVENT_683 ; 683, (D817, bit 3) + const EVENT_684 ; 684, (D817, bit 4) + const EVENT_685 ; 685, (D817, bit 5) + const EVENT_686 ; 686, (D817, bit 6) + const EVENT_687 ; 687, (D817, bit 7) + const EVENT_688 ; 688, (D818, bit 0) + const EVENT_689 ; 689, (D818, bit 1) + const EVENT_68A ; 68A, (D818, bit 2) + const EVENT_68B ; 68B, (D818, bit 3) + const EVENT_68C ; 68C, (D818, bit 4) + const EVENT_68D ; 68D, (D818, bit 5) + const EVENT_68E ; 68E, (D818, bit 6) + const EVENT_68F ; 68F, (D818, bit 7) + const EVENT_690 ; 690, (D819, bit 0) + const EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0 ; 691, (D819, bit 1) + const EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1 ; 692, (D819, bit 2) + const EVENT_693 ; 693, (D819, bit 3) + const EVENT_694 ; 694, (D819, bit 4) + const EVENT_695 ; 695, (D819, bit 5) + const EVENT_696 ; 696, (D819, bit 6) + const EVENT_697 ; 697, (D819, bit 7) + const EVENT_698 ; 698, (D81A, bit 0) + const EVENT_699 ; 699, (D81A, bit 1) + const EVENT_69A ; 69A, (D81A, bit 2) + const EVENT_69B ; 69B, (D81A, bit 3) + const EVENT_69C ; 69C, (D81A, bit 4) + const EVENT_69D ; 69D, (D81A, bit 5) + const EVENT_69E ; 69E, (D81A, bit 6) + const EVENT_69F ; 69F, (D81A, bit 7) + const EVENT_6A0 ; 6A0, (D81B, bit 0) + const EVENT_6A1 ; 6A1, (D81B, bit 1) + const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0 ; 6A2, (D81B, bit 2) + const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1 ; 6A3, (D81B, bit 3) + const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 ; 6A4, (D81B, bit 4) + const EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED ; 6A5, (D81B, bit 5) + const EVENT_ROCKET_DROPPED_LIFT_KEY ; 6A6, (D81B, bit 6) + const EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI ; 6A7, (D81B, bit 7) + const EVENT_6A8 ; 6A8, (D81C, bit 0) + const EVENT_6A9 ; 6A9, (D81C, bit 1) + const EVENT_6AA ; 6AA, (D81C, bit 2) + const EVENT_6AB ; 6AB, (D81C, bit 3) + const EVENT_6AC ; 6AC, (D81C, bit 4) + const EVENT_6AD ; 6AD, (D81C, bit 5) + const EVENT_6AE ; 6AE, (D81C, bit 6) + const EVENT_6AF ; 6AF, (D81C, bit 7) + const EVENT_6B0 ; 6B0, (D81D, bit 0) + const EVENT_6B1 ; 6B1, (D81D, bit 1) + const EVENT_6B2 ; 6B2, (D81D, bit 2) + const EVENT_6B3 ; 6B3, (D81D, bit 3) + const EVENT_6B4 ; 6B4, (D81D, bit 4) + const EVENT_6B5 ; 6B5, (D81D, bit 5) + const EVENT_6B6 ; 6B6, (D81D, bit 6) + const EVENT_6B7 ; 6B7, (D81D, bit 7) + const EVENT_6B8 ; 6B8, (D81E, bit 0) + const EVENT_6B9 ; 6B9, (D81E, bit 1) + const EVENT_6BA ; 6BA, (D81E, bit 2) + const EVENT_6BB ; 6BB, (D81E, bit 3) + const EVENT_6BC ; 6BC, (D81E, bit 4) + const EVENT_6BD ; 6BD, (D81E, bit 5) + const EVENT_6BE ; 6BE, (D81E, bit 6) + const EVENT_6BF ; 6BF, (D81E, bit 7) + const EVENT_6C0 ; 6C0, (D81F, bit 0) + const EVENT_6C1 ; 6C1, (D81F, bit 1) + const EVENT_6C2 ; 6C2, (D81F, bit 2) + const EVENT_6C3 ; 6C3, (D81F, bit 3) + const EVENT_6C4 ; 6C4, (D81F, bit 4) + const EVENT_6C5 ; 6C5, (D81F, bit 5) + const EVENT_6C6 ; 6C6, (D81F, bit 6) + const EVENT_6C7 ; 6C7, (D81F, bit 7) + const EVENT_6C8 ; 6C8, (D820, bit 0) + const EVENT_6C9 ; 6C9, (D820, bit 1) + const EVENT_6CA ; 6CA, (D820, bit 2) + const EVENT_6CB ; 6CB, (D820, bit 3) + const EVENT_6CC ; 6CC, (D820, bit 4) + const EVENT_6CD ; 6CD, (D820, bit 5) + const EVENT_6CE ; 6CE, (D820, bit 6) + const EVENT_6CF ; 6CF, (D820, bit 7) + const EVENT_6D0 ; 6D0, (D821, bit 0) + const EVENT_6D1 ; 6D1, (D821, bit 1) + const EVENT_6D2 ; 6D2, (D821, bit 2) + const EVENT_6D3 ; 6D3, (D821, bit 3) + const EVENT_6D4 ; 6D4, (D821, bit 4) + const EVENT_6D5 ; 6D5, (D821, bit 5) + const EVENT_6D6 ; 6D6, (D821, bit 6) + const EVENT_6D7 ; 6D7, (D821, bit 7) + const EVENT_6D8 ; 6D8, (D822, bit 0) + const EVENT_6D9 ; 6D9, (D822, bit 1) + const EVENT_6DA ; 6DA, (D822, bit 2) + const EVENT_6DB ; 6DB, (D822, bit 3) + const EVENT_6DC ; 6DC, (D822, bit 4) + const EVENT_6DD ; 6DD, (D822, bit 5) + const EVENT_6DE ; 6DE, (D822, bit 6) + const EVENT_6DF ; 6DF, (D822, bit 7) + const EVENT_6E0 ; 6E0, (D823, bit 0) + const EVENT_6E1 ; 6E1, (D823, bit 1) + const EVENT_6E2 ; 6E2, (D823, bit 2) + const EVENT_6E3 ; 6E3, (D823, bit 3) + const EVENT_6E4 ; 6E4, (D823, bit 4) + const EVENT_6E5 ; 6E5, (D823, bit 5) + const EVENT_6E6 ; 6E6, (D823, bit 6) + const EVENT_6E7 ; 6E7, (D823, bit 7) + const EVENT_6E8 ; 6E8, (D824, bit 0) + const EVENT_6E9 ; 6E9, (D824, bit 1) + const EVENT_6EA ; 6EA, (D824, bit 2) + const EVENT_6EB ; 6EB, (D824, bit 3) + const EVENT_6EC ; 6EC, (D824, bit 4) + const EVENT_6ED ; 6ED, (D824, bit 5) + const EVENT_6EE ; 6EE, (D824, bit 6) + const EVENT_6EF ; 6EF, (D824, bit 7) + const EVENT_6F0 ; 6F0, (D825, bit 0) + const EVENT_6F1 ; 6F1, (D825, bit 1) + const EVENT_BEAT_SILPH_CO_2F_TRAINER_0 ; 6F2, (D825, bit 2) + const EVENT_BEAT_SILPH_CO_2F_TRAINER_1 ; 6F3, (D825, bit 3) + const EVENT_BEAT_SILPH_CO_2F_TRAINER_2 ; 6F4, (D825, bit 4) + const EVENT_BEAT_SILPH_CO_2F_TRAINER_3 ; 6F5, (D825, bit 5) + const EVENT_6F6 ; 6F6, (D825, bit 6) + const EVENT_6F7 ; 6F7, (D825, bit 7) + const EVENT_6F8 ; 6F8, (D826, bit 0) + const EVENT_6F9 ; 6F9, (D826, bit 1) + const EVENT_6FA ; 6FA, (D826, bit 2) + const EVENT_6FB ; 6FB, (D826, bit 3) + const EVENT_6FC ; 6FC, (D826, bit 4) + const EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ; 6FD, (D826, bit 5) + const EVENT_SILPH_CO_2_UNLOCKED_DOOR2 ; 6FE, (D826, bit 6) + const EVENT_GOT_TM36 ; 6FF, (D826, bit 7) + const EVENT_700 ; 700, (D827, bit 0) + const EVENT_701 ; 701, (D827, bit 1) + const EVENT_BEAT_SILPH_CO_3F_TRAINER_0 ; 702, (D827, bit 2) + const EVENT_BEAT_SILPH_CO_3F_TRAINER_1 ; 703, (D827, bit 3) + const EVENT_704 ; 704, (D827, bit 4) + const EVENT_705 ; 705, (D827, bit 5) + const EVENT_706 ; 706, (D827, bit 6) + const EVENT_707 ; 707, (D827, bit 7) + const EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ; 708, (D828, bit 0) + const EVENT_SILPH_CO_3_UNLOCKED_DOOR2 ; 709, (D828, bit 1) + const EVENT_70A ; 70A, (D828, bit 2) + const EVENT_70B ; 70B, (D828, bit 3) + const EVENT_70C ; 70C, (D828, bit 4) + const EVENT_70D ; 70D, (D828, bit 5) + const EVENT_70E ; 70E, (D828, bit 6) + const EVENT_70F ; 70F, (D828, bit 7) + const EVENT_710 ; 710, (D829, bit 0) + const EVENT_711 ; 711, (D829, bit 1) + const EVENT_BEAT_SILPH_CO_4F_TRAINER_0 ; 712, (D829, bit 2) + const EVENT_BEAT_SILPH_CO_4F_TRAINER_1 ; 713, (D829, bit 3) + const EVENT_BEAT_SILPH_CO_4F_TRAINER_2 ; 714, (D829, bit 4) + const EVENT_715 ; 715, (D829, bit 5) + const EVENT_716 ; 716, (D829, bit 6) + const EVENT_717 ; 717, (D829, bit 7) + const EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ; 718, (D82A, bit 0) + const EVENT_SILPH_CO_4_UNLOCKED_DOOR2 ; 719, (D82A, bit 1) + const EVENT_71A ; 71A, (D82A, bit 2) + const EVENT_71B ; 71B, (D82A, bit 3) + const EVENT_71C ; 71C, (D82A, bit 4) + const EVENT_71D ; 71D, (D82A, bit 5) + const EVENT_71E ; 71E, (D82A, bit 6) + const EVENT_71F ; 71F, (D82A, bit 7) + const EVENT_720 ; 720, (D82B, bit 0) + const EVENT_721 ; 721, (D82B, bit 1) + const EVENT_BEAT_SILPH_CO_5F_TRAINER_0 ; 722, (D82B, bit 2) + const EVENT_BEAT_SILPH_CO_5F_TRAINER_1 ; 723, (D82B, bit 3) + const EVENT_BEAT_SILPH_CO_5F_TRAINER_2 ; 724, (D82B, bit 4) + const EVENT_BEAT_SILPH_CO_5F_TRAINER_3 ; 725, (D82B, bit 5) + const EVENT_726 ; 726, (D82B, bit 6) + const EVENT_727 ; 727, (D82B, bit 7) + const EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ; 728, (D82C, bit 0) + const EVENT_SILPH_CO_5_UNLOCKED_DOOR2 ; 729, (D82C, bit 1) + const EVENT_SILPH_CO_5_UNLOCKED_DOOR3 ; 72A, (D82C, bit 2) + const EVENT_72B ; 72B, (D82C, bit 3) + const EVENT_72C ; 72C, (D82C, bit 4) + const EVENT_72D ; 72D, (D82C, bit 5) + const EVENT_72E ; 72E, (D82C, bit 6) + const EVENT_72F ; 72F, (D82C, bit 7) + const EVENT_730 ; 730, (D82D, bit 0) + const EVENT_731 ; 731, (D82D, bit 1) + const EVENT_732 ; 732, (D82D, bit 2) + const EVENT_733 ; 733, (D82D, bit 3) + const EVENT_734 ; 734, (D82D, bit 4) + const EVENT_735 ; 735, (D82D, bit 5) + const EVENT_BEAT_SILPH_CO_6F_TRAINER_0 ; 736, (D82D, bit 6) + const EVENT_BEAT_SILPH_CO_6F_TRAINER_1 ; 737, (D82D, bit 7) + const EVENT_BEAT_SILPH_CO_6F_TRAINER_2 ; 738, (D82E, bit 0) + const EVENT_739 ; 739, (D82E, bit 1) + const EVENT_73A ; 73A, (D82E, bit 2) + const EVENT_73B ; 73B, (D82E, bit 3) + const EVENT_73C ; 73C, (D82E, bit 4) + const EVENT_73D ; 73D, (D82E, bit 5) + const EVENT_73E ; 73E, (D82E, bit 6) + const EVENT_SILPH_CO_6_UNLOCKED_DOOR ; 73F, (D82E, bit 7) + const EVENT_BEAT_SILPH_CO_RIVAL ; 740, (D82F, bit 0) + const EVENT_741 ; 741, (D82F, bit 1) + const EVENT_742 ; 742, (D82F, bit 2) + const EVENT_743 ; 743, (D82F, bit 3) + const EVENT_744 ; 744, (D82F, bit 4) + const EVENT_BEAT_SILPH_CO_7F_TRAINER_0 ; 745, (D82F, bit 5) + const EVENT_BEAT_SILPH_CO_7F_TRAINER_1 ; 746, (D82F, bit 6) + const EVENT_BEAT_SILPH_CO_7F_TRAINER_2 ; 747, (D82F, bit 7) + const EVENT_BEAT_SILPH_CO_7F_TRAINER_3 ; 748, (D830, bit 0) + const EVENT_749 ; 749, (D830, bit 1) + const EVENT_74A ; 74A, (D830, bit 2) + const EVENT_74B ; 74B, (D830, bit 3) + const EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ; 74C, (D830, bit 4) + const EVENT_SILPH_CO_7_UNLOCKED_DOOR2 ; 74D, (D830, bit 5) + const EVENT_SILPH_CO_7_UNLOCKED_DOOR3 ; 74E, (D830, bit 6) + const EVENT_74F ; 74F, (D830, bit 7) + const EVENT_750 ; 750, (D831, bit 0) + const EVENT_751 ; 751, (D831, bit 1) + const EVENT_BEAT_SILPH_CO_8F_TRAINER_0 ; 752, (D831, bit 2) + const EVENT_BEAT_SILPH_CO_8F_TRAINER_1 ; 753, (D831, bit 3) + const EVENT_BEAT_SILPH_CO_8F_TRAINER_2 ; 754, (D831, bit 4) + const EVENT_755 ; 755, (D831, bit 5) + const EVENT_756 ; 756, (D831, bit 6) + const EVENT_757 ; 757, (D831, bit 7) + const EVENT_SILPH_CO_8_UNLOCKED_DOOR ; 758, (D832, bit 0) + const EVENT_759 ; 759, (D832, bit 1) + const EVENT_75A ; 75A, (D832, bit 2) + const EVENT_75B ; 75B, (D832, bit 3) + const EVENT_75C ; 75C, (D832, bit 4) + const EVENT_75D ; 75D, (D832, bit 5) + const EVENT_75E ; 75E, (D832, bit 6) + const EVENT_75F ; 75F, (D832, bit 7) + const EVENT_760 ; 760, (D833, bit 0) + const EVENT_761 ; 761, (D833, bit 1) + const EVENT_BEAT_SILPH_CO_9F_TRAINER_0 ; 762, (D833, bit 2) + const EVENT_BEAT_SILPH_CO_9F_TRAINER_1 ; 763, (D833, bit 3) + const EVENT_BEAT_SILPH_CO_9F_TRAINER_2 ; 764, (D833, bit 4) + const EVENT_765 ; 765, (D833, bit 5) + const EVENT_766 ; 766, (D833, bit 6) + const EVENT_767 ; 767, (D833, bit 7) + const EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ; 768, (D834, bit 0) + const EVENT_SILPH_CO_9_UNLOCKED_DOOR2 ; 769, (D834, bit 1) + const EVENT_SILPH_CO_9_UNLOCKED_DOOR3 ; 76A, (D834, bit 2) + const EVENT_SILPH_CO_9_UNLOCKED_DOOR4 ; 76B, (D834, bit 3) + const EVENT_76C ; 76C, (D834, bit 4) + const EVENT_76D ; 76D, (D834, bit 5) + const EVENT_76E ; 76E, (D834, bit 6) + const EVENT_76F ; 76F, (D834, bit 7) + const EVENT_770 ; 770, (D835, bit 0) + const EVENT_BEAT_SILPH_CO_10F_TRAINER_0 ; 771, (D835, bit 1) + const EVENT_BEAT_SILPH_CO_10F_TRAINER_1 ; 772, (D835, bit 2) + const EVENT_773 ; 773, (D835, bit 3) + const EVENT_774 ; 774, (D835, bit 4) + const EVENT_775 ; 775, (D835, bit 5) + const EVENT_776 ; 776, (D835, bit 6) + const EVENT_777 ; 777, (D835, bit 7) + const EVENT_SILPH_CO_10_UNLOCKED_DOOR ; 778, (D836, bit 0) + const EVENT_779 ; 779, (D836, bit 1) + const EVENT_77A ; 77A, (D836, bit 2) + const EVENT_77B ; 77B, (D836, bit 3) + const EVENT_77C ; 77C, (D836, bit 4) + const EVENT_77D ; 77D, (D836, bit 5) + const EVENT_77E ; 77E, (D836, bit 6) + const EVENT_77F ; 77F, (D836, bit 7) + const EVENT_780 ; 780, (D837, bit 0) + const EVENT_781 ; 781, (D837, bit 1) + const EVENT_782 ; 782, (D837, bit 2) + const EVENT_783 ; 783, (D837, bit 3) + const EVENT_BEAT_SILPH_CO_11F_TRAINER_0 ; 784, (D837, bit 4) + const EVENT_BEAT_SILPH_CO_11F_TRAINER_1 ; 785, (D837, bit 5) + const EVENT_786 ; 786, (D837, bit 6) + const EVENT_787 ; 787, (D837, bit 7) + const EVENT_SILPH_CO_11_UNLOCKED_DOOR ; 788, (D838, bit 0) + const EVENT_789 ; 789, (D838, bit 1) + const EVENT_78A ; 78A, (D838, bit 2) + const EVENT_78B ; 78B, (D838, bit 3) + const EVENT_78C ; 78C, (D838, bit 4) + const EVENT_GOT_MASTER_BALL ; 78D, (D838, bit 5) + const EVENT_78E ; 78E, (D838, bit 6) + const EVENT_BEAT_SILPH_CO_GIOVANNI ; 78F, (D838, bit 7) + const EVENT_790 ; 790, (D839, bit 0) + const EVENT_791 ; 791, (D839, bit 1) + const EVENT_792 ; 792, (D839, bit 2) + const EVENT_793 ; 793, (D839, bit 3) + const EVENT_794 ; 794, (D839, bit 4) + const EVENT_795 ; 795, (D839, bit 5) + const EVENT_796 ; 796, (D839, bit 6) + const EVENT_797 ; 797, (D839, bit 7) + const EVENT_798 ; 798, (D83A, bit 0) + const EVENT_799 ; 799, (D83A, bit 1) + const EVENT_79A ; 79A, (D83A, bit 2) + const EVENT_79B ; 79B, (D83A, bit 3) + const EVENT_79C ; 79C, (D83A, bit 4) + const EVENT_79D ; 79D, (D83A, bit 5) + const EVENT_79E ; 79E, (D83A, bit 6) + const EVENT_79F ; 79F, (D83A, bit 7) + const EVENT_7A0 ; 7A0, (D83B, bit 0) + const EVENT_7A1 ; 7A1, (D83B, bit 1) + const EVENT_7A2 ; 7A2, (D83B, bit 2) + const EVENT_7A3 ; 7A3, (D83B, bit 3) + const EVENT_7A4 ; 7A4, (D83B, bit 4) + const EVENT_7A5 ; 7A5, (D83B, bit 5) + const EVENT_7A6 ; 7A6, (D83B, bit 6) + const EVENT_7A7 ; 7A7, (D83B, bit 7) + const EVENT_7A8 ; 7A8, (D83C, bit 0) + const EVENT_7A9 ; 7A9, (D83C, bit 1) + const EVENT_7AA ; 7AA, (D83C, bit 2) + const EVENT_7AB ; 7AB, (D83C, bit 3) + const EVENT_7AC ; 7AC, (D83C, bit 4) + const EVENT_7AD ; 7AD, (D83C, bit 5) + const EVENT_7AE ; 7AE, (D83C, bit 6) + const EVENT_7AF ; 7AF, (D83C, bit 7) + const EVENT_7B0 ; 7B0, (D83D, bit 0) + const EVENT_7B1 ; 7B1, (D83D, bit 1) + const EVENT_7B2 ; 7B2, (D83D, bit 2) + const EVENT_7B3 ; 7B3, (D83D, bit 3) + const EVENT_7B4 ; 7B4, (D83D, bit 4) + const EVENT_7B5 ; 7B5, (D83D, bit 5) + const EVENT_7B6 ; 7B6, (D83D, bit 6) + const EVENT_7B7 ; 7B7, (D83D, bit 7) + const EVENT_7B8 ; 7B8, (D83E, bit 0) + const EVENT_7B9 ; 7B9, (D83E, bit 1) + const EVENT_7BA ; 7BA, (D83E, bit 2) + const EVENT_7BB ; 7BB, (D83E, bit 3) + const EVENT_7BC ; 7BC, (D83E, bit 4) + const EVENT_7BD ; 7BD, (D83E, bit 5) + const EVENT_7BE ; 7BE, (D83E, bit 6) + const EVENT_7BF ; 7BF, (D83E, bit 7) + const EVENT_7C0 ; 7C0, (D83F, bit 0) + const EVENT_7C1 ; 7C1, (D83F, bit 1) + const EVENT_7C2 ; 7C2, (D83F, bit 2) + const EVENT_7C3 ; 7C3, (D83F, bit 3) + const EVENT_7C4 ; 7C4, (D83F, bit 4) + const EVENT_7C5 ; 7C5, (D83F, bit 5) + const EVENT_7C6 ; 7C6, (D83F, bit 6) + const EVENT_7C7 ; 7C7, (D83F, bit 7) + const EVENT_7C8 ; 7C8, (D840, bit 0) + const EVENT_7C9 ; 7C9, (D840, bit 1) + const EVENT_7CA ; 7CA, (D840, bit 2) + const EVENT_7CB ; 7CB, (D840, bit 3) + const EVENT_7CC ; 7CC, (D840, bit 4) + const EVENT_7CD ; 7CD, (D840, bit 5) + const EVENT_7CE ; 7CE, (D840, bit 6) + const EVENT_7CF ; 7CF, (D840, bit 7) + const EVENT_7D0 ; 7D0, (D841, bit 0) + const EVENT_7D1 ; 7D1, (D841, bit 1) + const EVENT_7D2 ; 7D2, (D841, bit 2) + const EVENT_7D3 ; 7D3, (D841, bit 3) + const EVENT_7D4 ; 7D4, (D841, bit 4) + const EVENT_7D5 ; 7D5, (D841, bit 5) + const EVENT_7D6 ; 7D6, (D841, bit 6) + const EVENT_7D7 ; 7D7, (D841, bit 7) + const EVENT_7D8 ; 7D8, (D842, bit 0) + const EVENT_7D9 ; 7D9, (D842, bit 1) + const EVENT_7DA ; 7DA, (D842, bit 2) + const EVENT_7DB ; 7DB, (D842, bit 3) + const EVENT_7DC ; 7DC, (D842, bit 4) + const EVENT_7DD ; 7DD, (D842, bit 5) + const EVENT_7DE ; 7DE, (D842, bit 6) + const EVENT_7DF ; 7DF, (D842, bit 7) + const EVENT_7E0 ; 7E0, (D843, bit 0) + const EVENT_7E1 ; 7E1, (D843, bit 1) + const EVENT_7E2 ; 7E2, (D843, bit 2) + const EVENT_7E3 ; 7E3, (D843, bit 3) + const EVENT_7E4 ; 7E4, (D843, bit 4) + const EVENT_7E5 ; 7E5, (D843, bit 5) + const EVENT_7E6 ; 7E6, (D843, bit 6) + const EVENT_7E7 ; 7E7, (D843, bit 7) + const EVENT_7E8 ; 7E8, (D844, bit 0) + const EVENT_7E9 ; 7E9, (D844, bit 1) + const EVENT_7EA ; 7EA, (D844, bit 2) + const EVENT_7EB ; 7EB, (D844, bit 3) + const EVENT_7EC ; 7EC, (D844, bit 4) + const EVENT_7ED ; 7ED, (D844, bit 5) + const EVENT_7EE ; 7EE, (D844, bit 6) + const EVENT_7EF ; 7EF, (D844, bit 7) + const EVENT_7F0 ; 7F0, (D845, bit 0) + const EVENT_7F1 ; 7F1, (D845, bit 1) + const EVENT_7F2 ; 7F2, (D845, bit 2) + const EVENT_7F3 ; 7F3, (D845, bit 3) + const EVENT_7F4 ; 7F4, (D845, bit 4) + const EVENT_7F5 ; 7F5, (D845, bit 5) + const EVENT_7F6 ; 7F6, (D845, bit 6) + const EVENT_7F7 ; 7F7, (D845, bit 7) + const EVENT_7F8 ; 7F8, (D846, bit 0) + const EVENT_7F9 ; 7F9, (D846, bit 1) + const EVENT_7FA ; 7FA, (D846, bit 2) + const EVENT_7FB ; 7FB, (D846, bit 3) + const EVENT_7FC ; 7FC, (D846, bit 4) + const EVENT_7FD ; 7FD, (D846, bit 5) + const EVENT_7FE ; 7FE, (D846, bit 6) + const EVENT_7FF ; 7FF, (D846, bit 7) + const EVENT_800 ; 800, (D847, bit 0) + const EVENT_BEAT_MANSION_2_TRAINER_0 ; 801, (D847, bit 1) + const EVENT_802 ; 802, (D847, bit 2) + const EVENT_803 ; 803, (D847, bit 3) + const EVENT_804 ; 804, (D847, bit 4) + const EVENT_805 ; 805, (D847, bit 5) + const EVENT_806 ; 806, (D847, bit 6) + const EVENT_807 ; 807, (D847, bit 7) + const EVENT_808 ; 808, (D848, bit 0) + const EVENT_809 ; 809, (D848, bit 1) + const EVENT_80A ; 80A, (D848, bit 2) + const EVENT_80B ; 80B, (D848, bit 3) + const EVENT_80C ; 80C, (D848, bit 4) + const EVENT_80D ; 80D, (D848, bit 5) + const EVENT_80E ; 80E, (D848, bit 6) + const EVENT_80F ; 80F, (D848, bit 7) + const EVENT_810 ; 810, (D849, bit 0) + const EVENT_BEAT_MANSION_3_TRAINER_0 ; 811, (D849, bit 1) + const EVENT_BEAT_MANSION_3_TRAINER_1 ; 812, (D849, bit 2) + const EVENT_813 ; 813, (D849, bit 3) + const EVENT_814 ; 814, (D849, bit 4) + const EVENT_815 ; 815, (D849, bit 5) + const EVENT_816 ; 816, (D849, bit 6) + const EVENT_817 ; 817, (D849, bit 7) + const EVENT_818 ; 818, (D84A, bit 0) + const EVENT_819 ; 819, (D84A, bit 1) + const EVENT_81A ; 81A, (D84A, bit 2) + const EVENT_81B ; 81B, (D84A, bit 3) + const EVENT_81C ; 81C, (D84A, bit 4) + const EVENT_81D ; 81D, (D84A, bit 5) + const EVENT_81E ; 81E, (D84A, bit 6) + const EVENT_81F ; 81F, (D84A, bit 7) + const EVENT_820 ; 820, (D84B, bit 0) + const EVENT_BEAT_MANSION_4_TRAINER_0 ; 821, (D84B, bit 1) + const EVENT_BEAT_MANSION_4_TRAINER_1 ; 822, (D84B, bit 2) + const EVENT_823 ; 823, (D84B, bit 3) + const EVENT_824 ; 824, (D84B, bit 4) + const EVENT_825 ; 825, (D84B, bit 5) + const EVENT_826 ; 826, (D84B, bit 6) + const EVENT_827 ; 827, (D84B, bit 7) + const EVENT_828 ; 828, (D84C, bit 0) + const EVENT_829 ; 829, (D84C, bit 1) + const EVENT_82A ; 82A, (D84C, bit 2) + const EVENT_82B ; 82B, (D84C, bit 3) + const EVENT_82C ; 82C, (D84C, bit 4) + const EVENT_82D ; 82D, (D84C, bit 5) + const EVENT_82E ; 82E, (D84C, bit 6) + const EVENT_82F ; 82F, (D84C, bit 7) + const EVENT_830 ; 830, (D84D, bit 0) + const EVENT_831 ; 831, (D84D, bit 1) + const EVENT_832 ; 832, (D84D, bit 2) + const EVENT_833 ; 833, (D84D, bit 3) + const EVENT_834 ; 834, (D84D, bit 4) + const EVENT_835 ; 835, (D84D, bit 5) + const EVENT_836 ; 836, (D84D, bit 6) + const EVENT_837 ; 837, (D84D, bit 7) + const EVENT_838 ; 838, (D84E, bit 0) + const EVENT_839 ; 839, (D84E, bit 1) + const EVENT_83A ; 83A, (D84E, bit 2) + const EVENT_83B ; 83B, (D84E, bit 3) + const EVENT_83C ; 83C, (D84E, bit 4) + const EVENT_83D ; 83D, (D84E, bit 5) + const EVENT_83E ; 83E, (D84E, bit 6) + const EVENT_83F ; 83F, (D84E, bit 7) + const EVENT_840 ; 840, (D84F, bit 0) + const EVENT_841 ; 841, (D84F, bit 1) + const EVENT_842 ; 842, (D84F, bit 2) + const EVENT_843 ; 843, (D84F, bit 3) + const EVENT_844 ; 844, (D84F, bit 4) + const EVENT_845 ; 845, (D84F, bit 5) + const EVENT_846 ; 846, (D84F, bit 6) + const EVENT_847 ; 847, (D84F, bit 7) + const EVENT_848 ; 848, (D850, bit 0) + const EVENT_849 ; 849, (D850, bit 1) + const EVENT_84A ; 84A, (D850, bit 2) + const EVENT_84B ; 84B, (D850, bit 3) + const EVENT_84C ; 84C, (D850, bit 4) + const EVENT_84D ; 84D, (D850, bit 5) + const EVENT_84E ; 84E, (D850, bit 6) + const EVENT_84F ; 84F, (D850, bit 7) + const EVENT_850 ; 850, (D851, bit 0) + const EVENT_851 ; 851, (D851, bit 1) + const EVENT_852 ; 852, (D851, bit 2) + const EVENT_853 ; 853, (D851, bit 3) + const EVENT_854 ; 854, (D851, bit 4) + const EVENT_855 ; 855, (D851, bit 5) + const EVENT_856 ; 856, (D851, bit 6) + const EVENT_857 ; 857, (D851, bit 7) + const EVENT_858 ; 858, (D852, bit 0) + const EVENT_859 ; 859, (D852, bit 1) + const EVENT_85A ; 85A, (D852, bit 2) + const EVENT_85B ; 85B, (D852, bit 3) + const EVENT_85C ; 85C, (D852, bit 4) + const EVENT_85D ; 85D, (D852, bit 5) + const EVENT_85E ; 85E, (D852, bit 6) + const EVENT_85F ; 85F, (D852, bit 7) + const EVENT_860 ; 860, (D853, bit 0) + const EVENT_861 ; 861, (D853, bit 1) + const EVENT_862 ; 862, (D853, bit 2) + const EVENT_863 ; 863, (D853, bit 3) + const EVENT_864 ; 864, (D853, bit 4) + const EVENT_865 ; 865, (D853, bit 5) + const EVENT_866 ; 866, (D853, bit 6) + const EVENT_867 ; 867, (D853, bit 7) + const EVENT_868 ; 868, (D854, bit 0) + const EVENT_869 ; 869, (D854, bit 1) + const EVENT_86A ; 86A, (D854, bit 2) + const EVENT_86B ; 86B, (D854, bit 3) + const EVENT_86C ; 86C, (D854, bit 4) + const EVENT_86D ; 86D, (D854, bit 5) + const EVENT_86E ; 86E, (D854, bit 6) + const EVENT_86F ; 86F, (D854, bit 7) + const EVENT_870 ; 870, (D855, bit 0) + const EVENT_871 ; 871, (D855, bit 1) + const EVENT_872 ; 872, (D855, bit 2) + const EVENT_873 ; 873, (D855, bit 3) + const EVENT_874 ; 874, (D855, bit 4) + const EVENT_875 ; 875, (D855, bit 5) + const EVENT_876 ; 876, (D855, bit 6) + const EVENT_877 ; 877, (D855, bit 7) + const EVENT_878 ; 878, (D856, bit 0) + const EVENT_879 ; 879, (D856, bit 1) + const EVENT_87A ; 87A, (D856, bit 2) + const EVENT_87B ; 87B, (D856, bit 3) + const EVENT_87C ; 87C, (D856, bit 4) + const EVENT_87D ; 87D, (D856, bit 5) + const EVENT_87E ; 87E, (D856, bit 6) + const EVENT_87F ; 87F, (D856, bit 7) + const EVENT_GOT_HM03 ; 880, (D857, bit 0) + const EVENT_881 ; 881, (D857, bit 1) + const EVENT_882 ; 882, (D857, bit 2) + const EVENT_883 ; 883, (D857, bit 3) + const EVENT_884 ; 884, (D857, bit 4) + const EVENT_885 ; 885, (D857, bit 5) + const EVENT_886 ; 886, (D857, bit 6) + const EVENT_887 ; 887, (D857, bit 7) + const EVENT_888 ; 888, (D858, bit 0) + const EVENT_889 ; 889, (D858, bit 1) + const EVENT_88A ; 88A, (D858, bit 2) + const EVENT_88B ; 88B, (D858, bit 3) + const EVENT_88C ; 88C, (D858, bit 4) + const EVENT_88D ; 88D, (D858, bit 5) + const EVENT_88E ; 88E, (D858, bit 6) + const EVENT_88F ; 88F, (D858, bit 7) + const EVENT_890 ; 890, (D859, bit 0) + const EVENT_891 ; 891, (D859, bit 1) + const EVENT_892 ; 892, (D859, bit 2) + const EVENT_893 ; 893, (D859, bit 3) + const EVENT_894 ; 894, (D859, bit 4) + const EVENT_895 ; 895, (D859, bit 5) + const EVENT_896 ; 896, (D859, bit 6) + const EVENT_897 ; 897, (D859, bit 7) + const EVENT_898 ; 898, (D85A, bit 0) + const EVENT_899 ; 899, (D85A, bit 1) + const EVENT_89A ; 89A, (D85A, bit 2) + const EVENT_89B ; 89B, (D85A, bit 3) + const EVENT_89C ; 89C, (D85A, bit 4) + const EVENT_89D ; 89D, (D85A, bit 5) + const EVENT_89E ; 89E, (D85A, bit 6) + const EVENT_89F ; 89F, (D85A, bit 7) + const EVENT_8A0 ; 8A0, (D85B, bit 0) + const EVENT_8A1 ; 8A1, (D85B, bit 1) + const EVENT_8A2 ; 8A2, (D85B, bit 2) + const EVENT_8A3 ; 8A3, (D85B, bit 3) + const EVENT_8A4 ; 8A4, (D85B, bit 4) + const EVENT_8A5 ; 8A5, (D85B, bit 5) + const EVENT_8A6 ; 8A6, (D85B, bit 6) + const EVENT_8A7 ; 8A7, (D85B, bit 7) + const EVENT_8A8 ; 8A8, (D85C, bit 0) + const EVENT_8A9 ; 8A9, (D85C, bit 1) + const EVENT_8AA ; 8AA, (D85C, bit 2) + const EVENT_8AB ; 8AB, (D85C, bit 3) + const EVENT_8AC ; 8AC, (D85C, bit 4) + const EVENT_8AD ; 8AD, (D85C, bit 5) + const EVENT_8AE ; 8AE, (D85C, bit 6) + const EVENT_8AF ; 8AF, (D85C, bit 7) + const EVENT_8B0 ; 8B0, (D85D, bit 0) + const EVENT_8B1 ; 8B1, (D85D, bit 1) + const EVENT_8B2 ; 8B2, (D85D, bit 2) + const EVENT_8B3 ; 8B3, (D85D, bit 3) + const EVENT_8B4 ; 8B4, (D85D, bit 4) + const EVENT_8B5 ; 8B5, (D85D, bit 5) + const EVENT_8B6 ; 8B6, (D85D, bit 6) + const EVENT_8B7 ; 8B7, (D85D, bit 7) + const EVENT_8B8 ; 8B8, (D85E, bit 0) + const EVENT_8B9 ; 8B9, (D85E, bit 1) + const EVENT_8BA ; 8BA, (D85E, bit 2) + const EVENT_8BB ; 8BB, (D85E, bit 3) + const EVENT_8BC ; 8BC, (D85E, bit 4) + const EVENT_8BD ; 8BD, (D85E, bit 5) + const EVENT_8BE ; 8BE, (D85E, bit 6) + const EVENT_8BF ; 8BF, (D85E, bit 7) + const EVENT_8C0 ; 8C0, (D85F, bit 0) + const EVENT_BEAT_MEWTWO ; 8C1, (D85F, bit 1) + const EVENT_8C2 ; 8C2, (D85F, bit 2) + const EVENT_8C3 ; 8C3, (D85F, bit 3) + const EVENT_8C4 ; 8C4, (D85F, bit 4) + const EVENT_8C5 ; 8C5, (D85F, bit 5) + const EVENT_8C6 ; 8C6, (D85F, bit 6) + const EVENT_8C7 ; 8C7, (D85F, bit 7) + const EVENT_8C8 ; 8C8, (D860, bit 0) + const EVENT_8C9 ; 8C9, (D860, bit 1) + const EVENT_8CA ; 8CA, (D860, bit 2) + const EVENT_8CB ; 8CB, (D860, bit 3) + const EVENT_8CC ; 8CC, (D860, bit 4) + const EVENT_8CD ; 8CD, (D860, bit 5) + const EVENT_8CE ; 8CE, (D860, bit 6) + const EVENT_8CF ; 8CF, (D860, bit 7) + const EVENT_8D0 ; 8D0, (D861, bit 0) + const EVENT_8D1 ; 8D1, (D861, bit 1) + const EVENT_8D2 ; 8D2, (D861, bit 2) + const EVENT_8D3 ; 8D3, (D861, bit 3) + const EVENT_8D4 ; 8D4, (D861, bit 4) + const EVENT_8D5 ; 8D5, (D861, bit 5) + const EVENT_8D6 ; 8D6, (D861, bit 6) + const EVENT_8D7 ; 8D7, (D861, bit 7) + const EVENT_8D8 ; 8D8, (D862, bit 0) + const EVENT_8D9 ; 8D9, (D862, bit 1) + const EVENT_8DA ; 8DA, (D862, bit 2) + const EVENT_8DB ; 8DB, (D862, bit 3) + const EVENT_8DC ; 8DC, (D862, bit 4) + const EVENT_8DD ; 8DD, (D862, bit 5) + const EVENT_8DE ; 8DE, (D862, bit 6) + const EVENT_8DF ; 8DF, (D862, bit 7) + const ELITE4_EVENTS_START ; 8E0, (D863, bit 0) + const EVENT_BEAT_LORELEIS_ROOM_TRAINER_0 ; 8E1, (D863, bit 1) + const EVENT_8E2 ; 8E2, (D863, bit 2) + const EVENT_8E3 ; 8E3, (D863, bit 3) + const EVENT_8E4 ; 8E4, (D863, bit 4) + const EVENT_8E5 ; 8E5, (D863, bit 5) + const EVENT_AUTOWALKED_INTO_LORELEIS_ROOM ; 8E6, (D863, bit 6) + const EVENT_8E7 ; 8E7, (D863, bit 7) + const EVENT_8E8 ; 8E8, (D864, bit 0) + const EVENT_BEAT_BRUNOS_ROOM_TRAINER_0 ; 8E9, (D864, bit 1) + const EVENT_8EA ; 8EA, (D864, bit 2) + const EVENT_8EB ; 8EB, (D864, bit 3) + const EVENT_8EC ; 8EC, (D864, bit 4) + const EVENT_8ED ; 8ED, (D864, bit 5) + const EVENT_AUTOWALKED_INTO_BRUNOS_ROOM ; 8EE, (D864, bit 6) + const EVENT_8EF ; 8EF, (D864, bit 7) + const EVENT_8F0 ; 8F0, (D865, bit 0) + const EVENT_BEAT_AGATHAS_ROOM_TRAINER_0 ; 8F1, (D865, bit 1) + const EVENT_8F2 ; 8F2, (D865, bit 2) + const EVENT_8F3 ; 8F3, (D865, bit 3) + const EVENT_8F4 ; 8F4, (D865, bit 4) + const EVENT_8F5 ; 8F5, (D865, bit 5) + const EVENT_AUTOWALKED_INTO_AGATHAS_ROOM ; 8F6, (D865, bit 6) + const EVENT_8F7 ; 8F7, (D865, bit 7) + const EVENT_8F8 ; 8F8, (D866, bit 0) + const EVENT_BEAT_LANCES_ROOM_TRAINER_0 ; 8F9, (D866, bit 1) + const EVENT_8FA ; 8FA, (D866, bit 2) + const EVENT_8FB ; 8FB, (D866, bit 3) + const EVENT_8FC ; 8FC, (D866, bit 4) + const EVENT_8FD ; 8FD, (D866, bit 5) + const EVENT_BEAT_LANCE ; 8FE, (D866, bit 6) + const EVENT_LANCES_ROOM_LOCK_DOOR ; 8FF, (D866, bit 7) + const EVENT_900 ; 900, (D867, bit 0) + const EVENT_BEAT_CHAMPION_RIVAL ; 901, (D867, bit 1) + const EVENT_902 ; 902, (D867, bit 2) + const EVENT_903 ; 903, (D867, bit 3) + const EVENT_904 ; 904, (D867, bit 4) + const EVENT_905 ; 905, (D867, bit 5) + const EVENT_906 ; 906, (D867, bit 6) + const ELITE4_CHAMPION_EVENTS_END ; 907, (D867, bit 7) + const EVENT_908 ; 908, (D868, bit 0) + const EVENT_909 ; 909, (D868, bit 1) + const EVENT_90A ; 90A, (D868, bit 2) + const EVENT_90B ; 90B, (D868, bit 3) + const EVENT_90C ; 90C, (D868, bit 4) + const EVENT_90D ; 90D, (D868, bit 5) + const EVENT_90E ; 90E, (D868, bit 6) + const EVENT_90F ; 90F, (D868, bit 7) + const EVENT_910 ; 910, (D869, bit 0) + const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0 ; 911, (D869, bit 1) + const EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1 ; 912, (D869, bit 2) + const EVENT_913 ; 913, (D869, bit 3) + const EVENT_914 ; 914, (D869, bit 4) + const EVENT_915 ; 915, (D869, bit 5) + const EVENT_916 ; 916, (D869, bit 6) + const EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH ; 917, (D869, bit 7) + const EVENT_918 ; 918, (D86A, bit 0) + const EVENT_919 ; 919, (D86A, bit 1) + const EVENT_91A ; 91A, (D86A, bit 2) + const EVENT_91B ; 91B, (D86A, bit 3) + const EVENT_91C ; 91C, (D86A, bit 4) + const EVENT_91D ; 91D, (D86A, bit 5) + const EVENT_91E ; 91E, (D86A, bit 6) + const EVENT_91F ; 91F, (D86A, bit 7) + const EVENT_920 ; 920, (D86B, bit 0) + const EVENT_921 ; 921, (D86B, bit 1) + const EVENT_922 ; 922, (D86B, bit 2) + const EVENT_923 ; 923, (D86B, bit 3) + const EVENT_924 ; 924, (D86B, bit 4) + const EVENT_925 ; 925, (D86B, bit 5) + const EVENT_926 ; 926, (D86B, bit 6) + const EVENT_927 ; 927, (D86B, bit 7) + const EVENT_928 ; 928, (D86C, bit 0) + const EVENT_929 ; 929, (D86C, bit 1) + const EVENT_92A ; 92A, (D86C, bit 2) + const EVENT_92B ; 92B, (D86C, bit 3) + const EVENT_92C ; 92C, (D86C, bit 4) + const EVENT_92D ; 92D, (D86C, bit 5) + const EVENT_92E ; 92E, (D86C, bit 6) + const EVENT_92F ; 92F, (D86C, bit 7) + const EVENT_930 ; 930, (D86D, bit 0) + const EVENT_931 ; 931, (D86D, bit 1) + const EVENT_932 ; 932, (D86D, bit 2) + const EVENT_933 ; 933, (D86D, bit 3) + const EVENT_934 ; 934, (D86D, bit 4) + const EVENT_935 ; 935, (D86D, bit 5) + const EVENT_936 ; 936, (D86D, bit 6) + const EVENT_937 ; 937, (D86D, bit 7) + const EVENT_938 ; 938, (D86E, bit 0) + const EVENT_939 ; 939, (D86E, bit 1) + const EVENT_93A ; 93A, (D86E, bit 2) + const EVENT_93B ; 93B, (D86E, bit 3) + const EVENT_93C ; 93C, (D86E, bit 4) + const EVENT_93D ; 93D, (D86E, bit 5) + const EVENT_93E ; 93E, (D86E, bit 6) + const EVENT_93F ; 93F, (D86E, bit 7) + const EVENT_940 ; 940, (D86F, bit 0) + const EVENT_941 ; 941, (D86F, bit 1) + const EVENT_942 ; 942, (D86F, bit 2) + const EVENT_943 ; 943, (D86F, bit 3) + const EVENT_944 ; 944, (D86F, bit 4) + const EVENT_945 ; 945, (D86F, bit 5) + const EVENT_946 ; 946, (D86F, bit 6) + const EVENT_947 ; 947, (D86F, bit 7) + const EVENT_948 ; 948, (D870, bit 0) + const EVENT_949 ; 949, (D870, bit 1) + const EVENT_94A ; 94A, (D870, bit 2) + const EVENT_94B ; 94B, (D870, bit 3) + const EVENT_94C ; 94C, (D870, bit 4) + const EVENT_94D ; 94D, (D870, bit 5) + const EVENT_94E ; 94E, (D870, bit 6) + const EVENT_94F ; 94F, (D870, bit 7) + const EVENT_950 ; 950, (D871, bit 0) + const EVENT_951 ; 951, (D871, bit 1) + const EVENT_952 ; 952, (D871, bit 2) + const EVENT_953 ; 953, (D871, bit 3) + const EVENT_954 ; 954, (D871, bit 4) + const EVENT_955 ; 955, (D871, bit 5) + const EVENT_956 ; 956, (D871, bit 6) + const EVENT_957 ; 957, (D871, bit 7) + const EVENT_958 ; 958, (D872, bit 0) + const EVENT_959 ; 959, (D872, bit 1) + const EVENT_95A ; 95A, (D872, bit 2) + const EVENT_95B ; 95B, (D872, bit 3) + const EVENT_95C ; 95C, (D872, bit 4) + const EVENT_95D ; 95D, (D872, bit 5) + const EVENT_95E ; 95E, (D872, bit 6) + const EVENT_95F ; 95F, (D872, bit 7) + const EVENT_960 ; 960, (D873, bit 0) + const EVENT_961 ; 961, (D873, bit 1) + const EVENT_962 ; 962, (D873, bit 2) + const EVENT_963 ; 963, (D873, bit 3) + const EVENT_964 ; 964, (D873, bit 4) + const EVENT_965 ; 965, (D873, bit 5) + const EVENT_966 ; 966, (D873, bit 6) + const EVENT_967 ; 967, (D873, bit 7) + const EVENT_968 ; 968, (D874, bit 0) + const EVENT_969 ; 969, (D874, bit 1) + const EVENT_96A ; 96A, (D874, bit 2) + const EVENT_96B ; 96B, (D874, bit 3) + const EVENT_96C ; 96C, (D874, bit 4) + const EVENT_96D ; 96D, (D874, bit 5) + const EVENT_96E ; 96E, (D874, bit 6) + const EVENT_96F ; 96F, (D874, bit 7) + const EVENT_970 ; 970, (D875, bit 0) + const EVENT_971 ; 971, (D875, bit 1) + const EVENT_972 ; 972, (D875, bit 2) + const EVENT_973 ; 973, (D875, bit 3) + const EVENT_974 ; 974, (D875, bit 4) + const EVENT_975 ; 975, (D875, bit 5) + const EVENT_976 ; 976, (D875, bit 6) + const EVENT_977 ; 977, (D875, bit 7) + const EVENT_978 ; 978, (D876, bit 0) + const EVENT_979 ; 979, (D876, bit 1) + const EVENT_97A ; 97A, (D876, bit 2) + const EVENT_97B ; 97B, (D876, bit 3) + const EVENT_97C ; 97C, (D876, bit 4) + const EVENT_97D ; 97D, (D876, bit 5) + const EVENT_97E ; 97E, (D876, bit 6) + const EVENT_97F ; 97F, (D876, bit 7) + const EVENT_980 ; 980, (D877, bit 0) + const EVENT_981 ; 981, (D877, bit 1) + const EVENT_982 ; 982, (D877, bit 2) + const EVENT_983 ; 983, (D877, bit 3) + const EVENT_984 ; 984, (D877, bit 4) + const EVENT_985 ; 985, (D877, bit 5) + const EVENT_986 ; 986, (D877, bit 6) + const EVENT_987 ; 987, (D877, bit 7) + const EVENT_988 ; 988, (D878, bit 0) + const EVENT_989 ; 989, (D878, bit 1) + const EVENT_98A ; 98A, (D878, bit 2) + const EVENT_98B ; 98B, (D878, bit 3) + const EVENT_98C ; 98C, (D878, bit 4) + const EVENT_98D ; 98D, (D878, bit 5) + const EVENT_98E ; 98E, (D878, bit 6) + const EVENT_98F ; 98F, (D878, bit 7) + const EVENT_990 ; 990, (D879, bit 0) + const EVENT_991 ; 991, (D879, bit 1) + const EVENT_992 ; 992, (D879, bit 2) + const EVENT_993 ; 993, (D879, bit 3) + const EVENT_994 ; 994, (D879, bit 4) + const EVENT_995 ; 995, (D879, bit 5) + const EVENT_996 ; 996, (D879, bit 6) + const EVENT_997 ; 997, (D879, bit 7) + const EVENT_998 ; 998, (D87A, bit 0) + const EVENT_999 ; 999, (D87A, bit 1) + const EVENT_99A ; 99A, (D87A, bit 2) + const EVENT_99B ; 99B, (D87A, bit 3) + const EVENT_99C ; 99C, (D87A, bit 4) + const EVENT_99D ; 99D, (D87A, bit 5) + const EVENT_99E ; 99E, (D87A, bit 6) + const EVENT_99F ; 99F, (D87A, bit 7) + const EVENT_9A0 ; 9A0, (D87B, bit 0) + const EVENT_9A1 ; 9A1, (D87B, bit 1) + const EVENT_9A2 ; 9A2, (D87B, bit 2) + const EVENT_9A3 ; 9A3, (D87B, bit 3) + const EVENT_9A4 ; 9A4, (D87B, bit 4) + const EVENT_9A5 ; 9A5, (D87B, bit 5) + const EVENT_9A6 ; 9A6, (D87B, bit 6) + const EVENT_9A7 ; 9A7, (D87B, bit 7) + const EVENT_9A8 ; 9A8, (D87C, bit 0) + const EVENT_9A9 ; 9A9, (D87C, bit 1) + const EVENT_9AA ; 9AA, (D87C, bit 2) + const EVENT_9AB ; 9AB, (D87C, bit 3) + const EVENT_9AC ; 9AC, (D87C, bit 4) + const EVENT_9AD ; 9AD, (D87C, bit 5) + const EVENT_9AE ; 9AE, (D87C, bit 6) + const EVENT_9AF ; 9AF, (D87C, bit 7) + const EVENT_9B0 ; 9B0, (D87D, bit 0) + const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0 ; 9B1, (D87D, bit 1) + const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1 ; 9B2, (D87D, bit 2) + const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2 ; 9B3, (D87D, bit 3) + const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3 ; 9B4, (D87D, bit 4) + const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4 ; 9B5, (D87D, bit 5) + const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5 ; 9B6, (D87D, bit 6) + const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6 ; 9B7, (D87D, bit 7) + const EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7 ; 9B8, (D87E, bit 0) + const EVENT_9B9 ; 9B9, (D87E, bit 1) + const EVENT_9BA ; 9BA, (D87E, bit 2) + const EVENT_9BB ; 9BB, (D87E, bit 3) + const EVENT_9BC ; 9BC, (D87E, bit 4) + const EVENT_9BD ; 9BD, (D87E, bit 5) + const EVENT_9BE ; 9BE, (D87E, bit 6) + const EVENT_9BF ; 9BF, (D87E, bit 7) + const EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ; 9C0, (D87F, bit 0) + const EVENT_SEAFOAM2_BOULDER2_DOWN_HOLE ; 9C1, (D87F, bit 1) + const EVENT_9C2 ; 9C2, (D87F, bit 2) + const EVENT_9C3 ; 9C3, (D87F, bit 3) + const EVENT_9C4 ; 9C4, (D87F, bit 4) + const EVENT_9C5 ; 9C5, (D87F, bit 5) + const EVENT_9C6 ; 9C6, (D87F, bit 6) + const EVENT_9C7 ; 9C7, (D87F, bit 7) + const EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE ; 9C8, (D880, bit 0) + const EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ; 9C9, (D880, bit 1) + const EVENT_9CA ; 9CA, (D880, bit 2) + const EVENT_9CB ; 9CB, (D880, bit 3) + const EVENT_9CC ; 9CC, (D880, bit 4) + const EVENT_9CD ; 9CD, (D880, bit 5) + const EVENT_9CE ; 9CE, (D880, bit 6) + const EVENT_9CF ; 9CF, (D880, bit 7) + const EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE ; 9D0, (D881, bit 0) + const EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ; 9D1, (D881, bit 1) + const EVENT_9D2 ; 9D2, (D881, bit 2) + const EVENT_9D3 ; 9D3, (D881, bit 3) + const EVENT_9D4 ; 9D4, (D881, bit 4) + const EVENT_9D5 ; 9D5, (D881, bit 5) + const EVENT_9D6 ; 9D6, (D881, bit 6) + const EVENT_9D7 ; 9D7, (D881, bit 7) + const EVENT_9D8 ; 9D8, (D882, bit 0) + const EVENT_9D9 ; 9D9, (D882, bit 1) + const EVENT_BEAT_ARTICUNO ; 9DA, (D882, bit 2) + const EVENT_9DB ; 9DB, (D882, bit 3) + const EVENT_9DC ; 9DC, (D882, bit 4) + const EVENT_9DD ; 9DD, (D882, bit 5) + const EVENT_9DE ; 9DE, (D882, bit 6) + const EVENT_9DF ; 9DF, (D882, bit 7) + const EVENT_9E0 ; 9E0, (D883, bit 0) + const EVENT_9E1 ; 9E1, (D883, bit 1) + const EVENT_9E2 ; 9E2, (D883, bit 2) + const EVENT_9E3 ; 9E3, (D883, bit 3) + const EVENT_9E4 ; 9E4, (D883, bit 4) + const EVENT_9E5 ; 9E5, (D883, bit 5) + const EVENT_9E6 ; 9E6, (D883, bit 6) + const EVENT_9E7 ; 9E7, (D883, bit 7) + const EVENT_9E8 ; 9E8, (D884, bit 0) + const EVENT_9E9 ; 9E9, (D884, bit 1) + const EVENT_9EA ; 9EA, (D884, bit 2) + const EVENT_9EB ; 9EB, (D884, bit 3) + const EVENT_9EC ; 9EC, (D884, bit 4) + const EVENT_9ED ; 9ED, (D884, bit 5) + const EVENT_9EE ; 9EE, (D884, bit 6) + const EVENT_9EF ; 9EF, (D884, bit 7) + const EVENT_9F0 ; 9F0, (D885, bit 0) + const EVENT_9F1 ; 9F1, (D885, bit 1) + const EVENT_9F2 ; 9F2, (D885, bit 2) + const EVENT_9F3 ; 9F3, (D885, bit 3) + const EVENT_9F4 ; 9F4, (D885, bit 4) + const EVENT_9F5 ; 9F5, (D885, bit 5) + const EVENT_9F6 ; 9F6, (D885, bit 6) + const EVENT_9F7 ; 9F7, (D885, bit 7) + const EVENT_9F8 ; 9F8, (D886, bit 0) + const EVENT_9F9 ; 9F9, (D886, bit 1) + const EVENT_9FA ; 9FA, (D886, bit 2) + const EVENT_9FB ; 9FB, (D886, bit 3) + const EVENT_9FC ; 9FC, (D886, bit 4) + const EVENT_9FD ; 9FD, (D886, bit 5) + const EVENT_9FE ; 9FE, (D886, bit 6) + const EVENT_9FF ; 9FF, (D886, bit 7) 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/hardware_constants.asm b/constants/hardware_constants.asm index f9e3fe19..21a3ad93 100644 --- a/constants/hardware_constants.asm +++ b/constants/hardware_constants.asm @@ -107,4 +107,3 @@ rUNKNOWN5 EQU $ff75 ; (8Fh) - Bit 4-6 (Read/Write) rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only) rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only) rIE EQU $ffff ; Interrupt Enable (R/W) - diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 1c5beb77..1a44b1e7 100755 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -2,7 +2,7 @@ ; sprites marked with an X are constants that are never used ; because those sprites are not (de)activated in a map's script ; (they are either items or sprites that deactivate after battle -; and are detected in W_MISSABLEOBJECTLIST) +; and are detected in wMissableObjectList) const_value = 0 @@ -82,7 +82,7 @@ const_value = 0 const HS_MANSION_1_ITEM_2 ; 49 X const HS_FIGHTING_DOJO_GIFT_1 ; 4A const HS_FIGHTING_DOJO_GIFT_2 ; 4B - const HS_SILPH_CO_1F_1 ; 4C + const HS_SILPH_CO_1F_RECEPTIONIST ; 4C const HS_VOLTORB_1 ; 4D X const HS_VOLTORB_2 ; 4E X const HS_VOLTORB_3 ; 4F X diff --git a/constants/item_constants.asm b/constants/item_constants.asm index be320371..fe6fcb15 100644..100755 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -1,141 +1,159 @@ -MASTER_BALL EQU $01 -ULTRA_BALL EQU $02 -GREAT_BALL EQU $03 -POKE_BALL EQU $04 -TOWN_MAP EQU $05 -BICYCLE EQU $06 -SURFBOARD EQU $07 ; buggy? -SAFARI_BALL EQU $08 -POKEDEX EQU $09 -MOON_STONE EQU $0A -ANTIDOTE EQU $0B -BURN_HEAL EQU $0C -ICE_HEAL EQU $0D -AWAKENING EQU $0E -PARLYZ_HEAL EQU $0F -FULL_RESTORE EQU $10 -MAX_POTION EQU $11 -HYPER_POTION EQU $12 -SUPER_POTION EQU $13 -POTION EQU $14 -BOULDERBADGE EQU $15 -CASCADEBADGE EQU $16 -SAFARI_BAIT EQU $15 ; overload -SAFARI_ROCK EQU $16 ; overload -THUNDERBADGE EQU $17 -RAINBOWBADGE EQU $18 -SOULBADGE EQU $19 -MARSHBADGE EQU $1A -VOLCANOBADGE EQU $1B -EARTHBADGE EQU $1C -ESCAPE_ROPE EQU $1D -REPEL EQU $1E -OLD_AMBER EQU $1F -FIRE_STONE EQU $20 -THUNDER_STONE EQU $21 -WATER_STONE EQU $22 -HP_UP EQU $23 -PROTEIN EQU $24 -IRON EQU $25 -CARBOS EQU $26 -CALCIUM EQU $27 -RARE_CANDY EQU $28 -DOME_FOSSIL EQU $29 -HELIX_FOSSIL EQU $2A -SECRET_KEY EQU $2B -; XXX ????? EQU $2C -BIKE_VOUCHER EQU $2D -X_ACCURACY EQU $2E -LEAF_STONE EQU $2F -CARD_KEY EQU $30 -NUGGET EQU $31 -;PP_UP EQU $32 -POKE_DOLL EQU $33 -FULL_HEAL EQU $34 -REVIVE EQU $35 -MAX_REVIVE EQU $36 -GUARD_SPEC_ EQU $37 -SUPER_REPEL EQU $38 -MAX_REPEL EQU $39 -DIRE_HIT EQU $3A -COIN EQU $3B -FRESH_WATER EQU $3C -SODA_POP EQU $3D -LEMONADE EQU $3E -S_S__TICKET EQU $3F -GOLD_TEETH EQU $40 -X_ATTACK EQU $41 -X_DEFEND EQU $42 -X_SPEED EQU $43 -X_SPECIAL EQU $44 -COIN_CASE EQU $45 -OAKS_PARCEL EQU $46 -ITEMFINDER EQU $47 -SILPH_SCOPE EQU $48 -POKE_FLUTE EQU $49 -LIFT_KEY EQU $4A -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 -ELIXER EQU $52 -MAX_ELIXER EQU $53 -HM_01 EQU $C4 -HM_02 EQU $C5 -HM_03 EQU $C6 -HM_04 EQU $C7 -HM_05 EQU $C8 -TM_01 EQU $C9 -TM_02 EQU $CA -TM_03 EQU $CB -TM_04 EQU $CC -TM_05 EQU $CD -TM_06 EQU $CE -TM_07 EQU $CF -TM_08 EQU $D0 -TM_09 EQU $D1 -TM_10 EQU $D2 -TM_11 EQU $D3 -TM_12 EQU $D4 -TM_13 EQU $D5 -TM_14 EQU $D6 -TM_15 EQU $D7 -TM_16 EQU $D8 -TM_17 EQU $D9 -TM_18 EQU $DA -TM_19 EQU $DB -TM_20 EQU $DC -TM_21 EQU $DD -TM_22 EQU $DE -TM_23 EQU $DF -TM_24 EQU $E0 -TM_25 EQU $E1 -TM_26 EQU $E2 -TM_27 EQU $E3 -TM_28 EQU $E4 -TM_29 EQU $E5 -TM_30 EQU $E6 -TM_31 EQU $E7 -TM_32 EQU $E8 -TM_33 EQU $E9 -TM_34 EQU $EA -TM_35 EQU $EB -TM_36 EQU $EC -TM_37 EQU $ED -TM_38 EQU $EE -TM_39 EQU $EF -TM_40 EQU $F0 -TM_41 EQU $F1 -TM_42 EQU $F2 -TM_43 EQU $F3 -TM_44 EQU $F4 -TM_45 EQU $F5 -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 +const_value = 1 + + const MASTER_BALL ; $01 + const ULTRA_BALL ; $02 + const GREAT_BALL ; $03 + const POKE_BALL ; $04 + const TOWN_MAP ; $05 + const BICYCLE ; $06 + const SURFBOARD ; $07 buggy? + const SAFARI_BALL ; $08 + const POKEDEX ; $09 + const MOON_STONE ; $0A + const ANTIDOTE ; $0B + const BURN_HEAL ; $0C + const ICE_HEAL ; $0D + const AWAKENING ; $0E + const PARLYZ_HEAL ; $0F + const FULL_RESTORE ; $10 + const MAX_POTION ; $11 + const HYPER_POTION ; $12 + const SUPER_POTION ; $13 + const POTION ; $14 + const BOULDERBADGE ; $15 + const CASCADEBADGE ; $16 +SAFARI_BAIT EQU $15 ; overload +SAFARI_ROCK EQU $16 ; overload + const THUNDERBADGE ; $17 + const RAINBOWBADGE ; $18 + const SOULBADGE ; $19 + const MARSHBADGE ; $1A + const VOLCANOBADGE ; $1B + const EARTHBADGE ; $1C + const ESCAPE_ROPE ; $1D + const REPEL ; $1E + const OLD_AMBER ; $1F + const FIRE_STONE ; $20 + const THUNDER_STONE ; $21 + const WATER_STONE ; $22 + const HP_UP ; $23 + const PROTEIN ; $24 + const IRON ; $25 + const CARBOS ; $26 + const CALCIUM ; $27 + const RARE_CANDY ; $28 + const DOME_FOSSIL ; $29 + const HELIX_FOSSIL ; $2A + const SECRET_KEY ; $2B + const UNUSED_ITEM ; $2C "?????" + const BIKE_VOUCHER ; $2D + const X_ACCURACY ; $2E + const LEAF_STONE ; $2F + const CARD_KEY ; $30 + const NUGGET ; $31 + const PP_UP_2 ; $32 + const POKE_DOLL ; $33 + const FULL_HEAL ; $34 + const REVIVE ; $35 + const MAX_REVIVE ; $36 + const GUARD_SPEC ; $37 + const SUPER_REPEL ; $38 + const MAX_REPEL ; $39 + const DIRE_HIT ; $3A + const COIN ; $3B + const FRESH_WATER ; $3C + const SODA_POP ; $3D + const LEMONADE ; $3E + const S_S_TICKET ; $3F + const GOLD_TEETH ; $40 + const X_ATTACK ; $41 + const X_DEFEND ; $42 + const X_SPEED ; $43 + const X_SPECIAL ; $44 + const COIN_CASE ; $45 + const OAKS_PARCEL ; $46 + const ITEMFINDER ; $47 + const SILPH_SCOPE ; $48 + const POKE_FLUTE ; $49 + const LIFT_KEY ; $4A + const EXP_ALL ; $4B + const OLD_ROD ; $4C + const GOOD_ROD ; $4D + const SUPER_ROD ; $4E + const PP_UP ; $4F + const ETHER ; $50 + const MAX_ETHER ; $51 + const ELIXER ; $52 + const MAX_ELIXER ; $53 + const FLOOR_B2F ; $54 + const FLOOR_B1F ; $55 + const FLOOR_1F ; $56 + const FLOOR_2F ; $57 + const FLOOR_3F ; $58 + const FLOOR_4F ; $59 + const FLOOR_5F ; $5A + const FLOOR_6F ; $5B + const FLOOR_7F ; $5C + const FLOOR_8F ; $5D + const FLOOR_9F ; $5E + const FLOOR_10F ; $5F + const FLOOR_11F ; $60 + const FLOOR_B4F ; $61 + +const_value = $C4 + + const HM_01 ; $C4 + const HM_02 ; $C5 + const HM_03 ; $C6 + const HM_04 ; $C7 + const HM_05 ; $C8 + const TM_01 ; $C9 + const TM_02 ; $CA + const TM_03 ; $CB + const TM_04 ; $CC + const TM_05 ; $CD + const TM_06 ; $CE + const TM_07 ; $CF + const TM_08 ; $D0 + const TM_09 ; $D1 + const TM_10 ; $D2 + const TM_11 ; $D3 + const TM_12 ; $D4 + const TM_13 ; $D5 + const TM_14 ; $D6 + const TM_15 ; $D7 + const TM_16 ; $D8 + const TM_17 ; $D9 + const TM_18 ; $DA + const TM_19 ; $DB + const TM_20 ; $DC + const TM_21 ; $DD + const TM_22 ; $DE + const TM_23 ; $DF + const TM_24 ; $E0 + const TM_25 ; $E1 + const TM_26 ; $E2 + const TM_27 ; $E3 + const TM_28 ; $E4 + const TM_29 ; $E5 + const TM_30 ; $E6 + const TM_31 ; $E7 + const TM_32 ; $E8 + const TM_33 ; $E9 + const TM_34 ; $EA + const TM_35 ; $EB + const TM_36 ; $EC + const TM_37 ; $ED + const TM_38 ; $EE + const TM_39 ; $EF + const TM_40 ; $F0 + const TM_41 ; $F1 + const TM_42 ; $F2 + const TM_43 ; $F3 + const TM_44 ; $F4 + const TM_45 ; $F5 + const TM_46 ; $F6 + const TM_47 ; $F7 + const TM_48 ; $F8 + const TM_49 ; $F9 + const TM_50 ; $FA diff --git a/constants/list_constants.asm b/constants/list_constants.asm index 1299f7d8..7e26a6b6 100755 --- a/constants/list_constants.asm +++ b/constants/list_constants.asm @@ -1,14 +1,20 @@ -; 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 + +INIT_ENEMYOT_LIST EQU 1 +INIT_BAG_ITEM_LIST EQU 2 +INIT_OTHER_ITEM_LIST EQU 3 +INIT_PLAYEROT_LIST EQU 4 +INIT_MON_LIST EQU 5 diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 11deedd0..cbedef3f 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -1,251 +1,255 @@ -PALLET_TOWN EQU $00 -VIRIDIAN_CITY EQU $01 -PEWTER_CITY EQU $02 -CERULEAN_CITY EQU $03 -LAVENDER_TOWN EQU $04 -VERMILION_CITY EQU $05 -CELADON_CITY EQU $06 -FUCHSIA_CITY EQU $07 -CINNABAR_ISLAND EQU $08 -INDIGO_PLATEAU EQU $09 -SAFFRON_CITY EQU $0A -; unused EQU $0B -ROUTE_1 EQU $0C -ROUTE_2 EQU $0D -ROUTE_3 EQU $0E -ROUTE_4 EQU $0F -ROUTE_5 EQU $10 -ROUTE_6 EQU $11 -ROUTE_7 EQU $12 -ROUTE_8 EQU $13 -ROUTE_9 EQU $14 -ROUTE_10 EQU $15 -ROUTE_11 EQU $16 -ROUTE_12 EQU $17 -ROUTE_13 EQU $18 -ROUTE_14 EQU $19 -ROUTE_15 EQU $1A -ROUTE_16 EQU $1B -ROUTE_17 EQU $1C -ROUTE_18 EQU $1D -ROUTE_19 EQU $1E -ROUTE_20 EQU $1F -ROUTE_21 EQU $20 -ROUTE_22 EQU $21 -ROUTE_23 EQU $22 -ROUTE_24 EQU $23 -ROUTE_25 EQU $24 -REDS_HOUSE_1F EQU $25 -REDS_HOUSE_2F EQU $26 -BLUES_HOUSE EQU $27 -OAKS_LAB EQU $28 -VIRIDIAN_POKECENTER EQU $29 -VIRIDIAN_MART EQU $2A -VIRIDIAN_SCHOOL EQU $2B -VIRIDIAN_HOUSE EQU $2C -VIRIDIAN_GYM EQU $2D -DIGLETTS_CAVE_EXIT EQU $2E -VIRIDIAN_FOREST_EXIT EQU $2F -ROUTE_2_HOUSE EQU $30 -ROUTE_2_GATE EQU $31 -VIRIDIAN_FOREST_ENTRANCE EQU $32 -VIRIDIAN_FOREST EQU $33 -MUSEUM_1F EQU $34 -MUSEUM_2F EQU $35 -PEWTER_GYM EQU $36 -PEWTER_HOUSE_1 EQU $37 -PEWTER_MART EQU $38 -PEWTER_HOUSE_2 EQU $39 -PEWTER_POKECENTER EQU $3A -MT_MOON_1 EQU $3B -MT_MOON_2 EQU $3C -MT_MOON_3 EQU $3D -TRASHED_HOUSE EQU $3E -CERULEAN_HOUSE EQU $3F -CERULEAN_POKECENTER EQU $40 -CERULEAN_GYM EQU $41 -BIKE_SHOP EQU $42 -CERULEAN_MART EQU $43 -MT_MOON_POKECENTER EQU $44 -;copy of TRASHED_HOUSE EQU $45 -ROUTE_5_GATE EQU $46 -PATH_ENTRANCE_ROUTE_5 EQU $47 -DAYCAREM EQU $48 -ROUTE_6_GATE EQU $49 -PATH_ENTRANCE_ROUTE_6 EQU $4A -;copy of PATH_ENTRANCE_ROUTE_6 EQU $4B -ROUTE_7_GATE EQU $4C -PATH_ENTRANCE_ROUTE_7 EQU $4D -;copy of PATH_ENTRANCE_ROUTE_7 EQU $4E -ROUTE_8_GATE EQU $4F -PATH_ENTRANCE_ROUTE_8 EQU $50 -ROCK_TUNNEL_POKECENTER EQU $51 -ROCK_TUNNEL_1 EQU $52 -POWER_PLANT EQU $53 -ROUTE_11_GATE_1F EQU $54 -DIGLETTS_CAVE_ENTRANCE EQU $55 -ROUTE_11_GATE_2F EQU $56 -ROUTE_12_GATE_1F EQU $57 -BILLS_HOUSE EQU $58 -VERMILION_POKECENTER EQU $59 -POKEMON_FAN_CLUB EQU $5A -VERMILION_MART EQU $5B -VERMILION_GYM EQU $5C -VERMILION_HOUSE_1 EQU $5D -VERMILION_DOCK EQU $5E -SS_ANNE_1 EQU $5F -SS_ANNE_2 EQU $60 -SS_ANNE_3 EQU $61 -SS_ANNE_4 EQU $62 -SS_ANNE_5 EQU $63 -SS_ANNE_6 EQU $64 -SS_ANNE_7 EQU $65 -SS_ANNE_8 EQU $66 -SS_ANNE_9 EQU $67 -SS_ANNE_10 EQU $68 -;EQU $69 -;EQU $6A -;EQU $6B -VICTORY_ROAD_1 EQU $6C -;EQU $6D -;EQU $6E -;EQU $6F -;EQU $70 -LANCES_ROOM EQU $71 -;EQU $72 -;EQU $73 -;EQU $74 -;EQU $75 -HALL_OF_FAME EQU $76 -UNDERGROUND_PATH_NS EQU $77 -CHAMPIONS_ROOM EQU $78 -UNDERGROUND_PATH_WE EQU $79 -CELADON_MART_1 EQU $7A -CELADON_MART_2 EQU $7B -CELADON_MART_3 EQU $7C -CELADON_MART_4 EQU $7D -CELADON_MART_ROOF EQU $7E -CELADON_MART_ELEVATOR EQU $7F -CELADON_MANSION_1 EQU $80 -CELADON_MANSION_2 EQU $81 -CELADON_MANSION_3 EQU $82 -CELADON_MANSION_4 EQU $83 -CELADON_MANSION_5 EQU $84 -CELADON_POKECENTER EQU $85 -CELADON_GYM EQU $86 -GAME_CORNER EQU $87 -CELADON_MART_5 EQU $88 -CELADON_PRIZE_ROOM EQU $89 -CELADON_DINER EQU $8A -CELADON_HOUSE EQU $8B -CELADON_HOTEL EQU $8C -LAVENDER_POKECENTER EQU $8D -POKEMONTOWER_1 EQU $8E -POKEMONTOWER_2 EQU $8F -POKEMONTOWER_3 EQU $90 -POKEMONTOWER_4 EQU $91 -POKEMONTOWER_5 EQU $92 -POKEMONTOWER_6 EQU $93 -POKEMONTOWER_7 EQU $94 -LAVENDER_HOUSE_1 EQU $95 -LAVENDER_MART EQU $96 -LAVENDER_HOUSE_2 EQU $97 -FUCHSIA_MART EQU $98 -FUCHSIA_HOUSE_1 EQU $99 -FUCHSIA_POKECENTER EQU $9A -FUCHSIA_HOUSE_2 EQU $9B -SAFARI_ZONE_ENTRANCE EQU $9C -FUCHSIA_GYM EQU $9D -FUCHSIA_MEETING_ROOM EQU $9E -SEAFOAM_ISLANDS_2 EQU $9F -SEAFOAM_ISLANDS_3 EQU $A0 -SEAFOAM_ISLANDS_4 EQU $A1 -SEAFOAM_ISLANDS_5 EQU $A2 -VERMILION_HOUSE_2 EQU $A3 -FUCHSIA_HOUSE_3 EQU $A4 -MANSION_1 EQU $A5 -CINNABAR_GYM EQU $A6 -CINNABAR_LAB_1 EQU $A7 -CINNABAR_LAB_2 EQU $A8 -CINNABAR_LAB_3 EQU $A9 -CINNABAR_LAB_4 EQU $AA -CINNABAR_POKECENTER EQU $AB -CINNABAR_MART EQU $AC -;copy of CINNABAR_MART EQU $AD -INDIGO_PLATEAU_LOBBY EQU $AE -COPYCATS_HOUSE_1F EQU $AF -COPYCATS_HOUSE_2F EQU $B0 -FIGHTING_DOJO EQU $B1 -SAFFRON_GYM EQU $B2 -SAFFRON_HOUSE_1 EQU $B3 -SAFFRON_MART EQU $B4 -SILPH_CO_1F EQU $B5 -SAFFRON_POKECENTER EQU $B6 -SAFFRON_HOUSE_2 EQU $B7 -ROUTE_15_GATE_1F EQU $B8 -ROUTE_15_GATE_2F EQU $B9 -ROUTE_16_GATE_1F EQU $BA -ROUTE_16_GATE_2F EQU $BB -ROUTE_16_HOUSE EQU $BC -ROUTE_12_HOUSE EQU $BD -ROUTE_18_GATE_1F EQU $BE -ROUTE_18_GATE_2F EQU $BF -SEAFOAM_ISLANDS_1 EQU $C0 -ROUTE_22_GATE EQU $C1 -VICTORY_ROAD_2 EQU $C2 -ROUTE_12_GATE_2F EQU $C3 -VERMILION_HOUSE_3 EQU $C4 -DIGLETTS_CAVE EQU $C5 -VICTORY_ROAD_3 EQU $C6 -ROCKET_HIDEOUT_1 EQU $C7 -ROCKET_HIDEOUT_2 EQU $C8 -ROCKET_HIDEOUT_3 EQU $C9 -ROCKET_HIDEOUT_4 EQU $CA -ROCKET_HIDEOUT_ELEVATOR EQU $CB -;EQU $CC -;EQU $CD -;EQU $CE -SILPH_CO_2F EQU $CF -SILPH_CO_3F EQU $D0 -SILPH_CO_4F EQU $D1 -SILPH_CO_5F EQU $D2 -SILPH_CO_6F EQU $D3 -SILPH_CO_7F EQU $D4 -SILPH_CO_8F EQU $D5 -MANSION_2 EQU $D6 -MANSION_3 EQU $D7 -MANSION_4 EQU $D8 -SAFARI_ZONE_EAST EQU $D9 -SAFARI_ZONE_NORTH EQU $DA -SAFARI_ZONE_WEST EQU $DB -SAFARI_ZONE_CENTER EQU $DC -SAFARI_ZONE_REST_HOUSE_1 EQU $DD -SAFARI_ZONE_SECRET_HOUSE EQU $DE -SAFARI_ZONE_REST_HOUSE_2 EQU $DF -SAFARI_ZONE_REST_HOUSE_3 EQU $E0 -SAFARI_ZONE_REST_HOUSE_4 EQU $E1 -UNKNOWN_DUNGEON_2 EQU $E2 -UNKNOWN_DUNGEON_3 EQU $E3 -UNKNOWN_DUNGEON_1 EQU $E4 -NAME_RATERS_HOUSE EQU $E5 -CERULEAN_HOUSE_3 EQU $E6 -;EQU $E7 -ROCK_TUNNEL_2 EQU $E8 -SILPH_CO_9F EQU $E9 -SILPH_CO_10F EQU $EA -SILPH_CO_11F EQU $EB -SILPH_CO_ELEVATOR EQU $EC -;EQU $ED -;EQU $EE -BATTLE_CENTER EQU $EF -TRADE_CENTER EQU $F0 -;EQU $F1 -;EQU $F2 -;EQU $F3 -;EQU $F4 -LORELEIS_ROOM EQU $F5 -BRUNOS_ROOM EQU $F6 -AGATHAS_ROOM EQU $F7 -IF DEF(_OPTION_BEACH_HOUSE) -BEACH_HOUSE EQU $F8 -ENDC +mapconst: MACRO + const \1 +\1_HEIGHT EQU \2 +\1_WIDTH EQU \3 +ENDM + + const_def + mapconst PALLET_TOWN, 9, 10 ; $00 + mapconst VIRIDIAN_CITY, 18, 20 ; $01 + mapconst PEWTER_CITY, 18, 20 ; $02 + mapconst CERULEAN_CITY, 18, 20 ; $03 + mapconst LAVENDER_TOWN, 9, 10 ; $04 + mapconst VERMILION_CITY, 18, 20 ; $05 + mapconst CELADON_CITY, 18, 25 ; $06 + mapconst FUCHSIA_CITY, 18, 20 ; $07 + mapconst CINNABAR_ISLAND, 9, 10 ; $08 + mapconst INDIGO_PLATEAU, 9, 10 ; $09 + mapconst SAFFRON_CITY, 18, 20 ; $0A + mapconst UNUSED_MAP_0B, 0, 0 ; $0B + mapconst ROUTE_1, 18, 10 ; $0C + mapconst ROUTE_2, 36, 10 ; $0D + mapconst ROUTE_3, 9, 35 ; $0E + mapconst ROUTE_4, 9, 45 ; $0F + mapconst ROUTE_5, 18, 10 ; $10 + mapconst ROUTE_6, 18, 10 ; $11 + mapconst ROUTE_7, 9, 10 ; $12 + mapconst ROUTE_8, 9, 30 ; $13 + mapconst ROUTE_9, 9, 30 ; $14 + mapconst ROUTE_10, 36, 10 ; $15 + mapconst ROUTE_11, 9, 30 ; $16 + mapconst ROUTE_12, 54, 10 ; $17 + mapconst ROUTE_13, 9, 30 ; $18 + mapconst ROUTE_14, 27, 10 ; $19 + mapconst ROUTE_15, 9, 30 ; $1A + mapconst ROUTE_16, 9, 20 ; $1B + mapconst ROUTE_17, 72, 10 ; $1C + mapconst ROUTE_18, 9, 25 ; $1D + mapconst ROUTE_19, 27, 10 ; $1E + mapconst ROUTE_20, 9, 50 ; $1F + mapconst ROUTE_21, 45, 10 ; $20 + mapconst ROUTE_22, 9, 20 ; $21 + mapconst ROUTE_23, 72, 10 ; $22 + mapconst ROUTE_24, 18, 10 ; $23 + mapconst ROUTE_25, 9, 30 ; $24 + mapconst REDS_HOUSE_1F, 4, 4 ; $25 + mapconst REDS_HOUSE_2F, 4, 4 ; $26 + mapconst BLUES_HOUSE, 4, 4 ; $27 + mapconst OAKS_LAB, 6, 5 ; $28 + mapconst VIRIDIAN_POKECENTER, 4, 7 ; $29 + mapconst VIRIDIAN_MART, 4, 4 ; $2A + mapconst VIRIDIAN_SCHOOL, 4, 4 ; $2B + mapconst VIRIDIAN_HOUSE, 4, 4 ; $2C + mapconst VIRIDIAN_GYM, 9, 10 ; $2D + mapconst DIGLETTS_CAVE_EXIT, 4, 4 ; $2E + mapconst VIRIDIAN_FOREST_EXIT, 4, 5 ; $2F + mapconst ROUTE_2_HOUSE, 4, 4 ; $30 + mapconst ROUTE_2_GATE, 4, 5 ; $31 + mapconst VIRIDIAN_FOREST_ENTRANCE, 4, 5 ; $32 + mapconst VIRIDIAN_FOREST, 24, 17 ; $33 + mapconst MUSEUM_1F, 4, 10 ; $34 + mapconst MUSEUM_2F, 4, 7 ; $35 + mapconst PEWTER_GYM, 7, 5 ; $36 + mapconst PEWTER_HOUSE_1, 4, 4 ; $37 + mapconst PEWTER_MART, 4, 4 ; $38 + mapconst PEWTER_HOUSE_2, 4, 4 ; $39 + mapconst PEWTER_POKECENTER, 4, 7 ; $3A + mapconst MT_MOON_1, 18, 20 ; $3B + mapconst MT_MOON_2, 14, 14 ; $3C + mapconst MT_MOON_3, 18, 20 ; $3D + mapconst TRASHED_HOUSE, 4, 4 ; $3E + mapconst CERULEAN_HOUSE_1, 4, 4 ; $3F + mapconst CERULEAN_POKECENTER, 4, 7 ; $40 + mapconst CERULEAN_GYM, 7, 5 ; $41 + mapconst BIKE_SHOP, 4, 4 ; $42 + mapconst CERULEAN_MART, 4, 4 ; $43 + mapconst MT_MOON_POKECENTER, 4, 7 ; $44 + mapconst TRASHED_HOUSE_COPY, 4, 4 ; $45 + mapconst ROUTE_5_GATE, 3, 4 ; $46 + mapconst PATH_ENTRANCE_ROUTE_5, 4, 4 ; $47 + mapconst DAYCAREM, 4, 4 ; $48 + mapconst ROUTE_6_GATE, 3, 4 ; $49 + mapconst PATH_ENTRANCE_ROUTE_6, 4, 4 ; $4A + mapconst PATH_ENTRANCE_ROUTE_6_COPY, 4, 4 ; $4B + mapconst ROUTE_7_GATE, 4, 3 ; $4C + mapconst PATH_ENTRANCE_ROUTE_7, 4, 4 ; $4D + mapconst PATH_ENTRANCE_ROUTE_7_COPY, 4, 4 ; $4E + mapconst ROUTE_8_GATE, 4, 3 ; $4F + mapconst PATH_ENTRANCE_ROUTE_8, 4, 4 ; $50 + mapconst ROCK_TUNNEL_POKECENTER, 4, 7 ; $51 + mapconst ROCK_TUNNEL_1, 18, 20 ; $52 + mapconst POWER_PLANT, 18, 20 ; $53 + mapconst ROUTE_11_GATE_1F, 5, 4 ; $54 + mapconst DIGLETTS_CAVE_ENTRANCE, 4, 4 ; $55 + mapconst ROUTE_11_GATE_2F, 4, 4 ; $56 + mapconst ROUTE_12_GATE_1F, 4, 5 ; $57 + mapconst BILLS_HOUSE, 4, 4 ; $58 + mapconst VERMILION_POKECENTER, 4, 7 ; $59 + mapconst POKEMON_FAN_CLUB, 4, 4 ; $5A + mapconst VERMILION_MART, 4, 4 ; $5B + mapconst VERMILION_GYM, 9, 5 ; $5C + mapconst VERMILION_HOUSE_1, 4, 4 ; $5D + mapconst VERMILION_DOCK, 6, 14 ; $5E + mapconst SS_ANNE_1, 9, 20 ; $5F + mapconst SS_ANNE_2, 9, 20 ; $60 + mapconst SS_ANNE_3, 3, 10 ; $61 + mapconst SS_ANNE_4, 4, 15 ; $62 + mapconst SS_ANNE_5, 7, 10 ; $63 + mapconst SS_ANNE_6, 8, 7 ; $64 + mapconst SS_ANNE_7, 4, 3 ; $65 + mapconst SS_ANNE_8, 8, 12 ; $66 + mapconst SS_ANNE_9, 8, 12 ; $67 + mapconst SS_ANNE_10, 8, 12 ; $68 + mapconst UNUSED_MAP_69, 0, 0 ; $69 + mapconst UNUSED_MAP_6A, 0, 0 ; $6A + mapconst UNUSED_MAP_6B, 0, 0 ; $6B + mapconst VICTORY_ROAD_1, 9, 10 ; $6C + mapconst UNUSED_MAP_6D, 0, 0 ; $6D + mapconst UNUSED_MAP_6E, 0, 0 ; $6E + mapconst UNUSED_MAP_6F, 0, 0 ; $6F + mapconst UNUSED_MAP_70, 0, 0 ; $70 + mapconst LANCES_ROOM, 13, 13 ; $71 + mapconst UNUSED_MAP_72, 0, 0 ; $72 + mapconst UNUSED_MAP_73, 0, 0 ; $73 + mapconst UNUSED_MAP_74, 0, 0 ; $74 + mapconst UNUSED_MAP_75, 0, 0 ; $75 + mapconst HALL_OF_FAME, 4, 5 ; $76 + mapconst UNDERGROUND_PATH_NS, 24, 4 ; $77 + mapconst CHAMPIONS_ROOM, 4, 4 ; $78 + mapconst UNDERGROUND_PATH_WE, 4, 25 ; $79 + mapconst CELADON_MART_1, 4, 10 ; $7A + mapconst CELADON_MART_2, 4, 10 ; $7B + mapconst CELADON_MART_3, 4, 10 ; $7C + mapconst CELADON_MART_4, 4, 10 ; $7D + mapconst CELADON_MART_ROOF, 4, 10 ; $7E + mapconst CELADON_MART_ELEVATOR, 2, 2 ; $7F + mapconst CELADON_MANSION_1, 6, 4 ; $80 + mapconst CELADON_MANSION_2, 6, 4 ; $81 + mapconst CELADON_MANSION_3, 6, 4 ; $82 + mapconst CELADON_MANSION_4, 6, 4 ; $83 + mapconst CELADON_MANSION_5, 4, 4 ; $84 + mapconst CELADON_POKECENTER, 4, 7 ; $85 + mapconst CELADON_GYM, 9, 5 ; $86 + mapconst GAME_CORNER, 9, 10 ; $87 + mapconst CELADON_MART_5, 4, 10 ; $88 + mapconst CELADON_PRIZE_ROOM, 4, 5 ; $89 + mapconst CELADON_DINER, 4, 5 ; $8A + mapconst CELADON_HOUSE, 4, 4 ; $8B + mapconst CELADON_HOTEL, 4, 7 ; $8C + mapconst LAVENDER_POKECENTER, 4, 7 ; $8D + mapconst POKEMONTOWER_1, 9, 10 ; $8E + mapconst POKEMONTOWER_2, 9, 10 ; $8F + mapconst POKEMONTOWER_3, 9, 10 ; $90 + mapconst POKEMONTOWER_4, 9, 10 ; $91 + mapconst POKEMONTOWER_5, 9, 10 ; $92 + mapconst POKEMONTOWER_6, 9, 10 ; $93 + mapconst POKEMONTOWER_7, 9, 10 ; $94 + mapconst LAVENDER_HOUSE_1, 4, 4 ; $95 + mapconst LAVENDER_MART, 4, 4 ; $96 + mapconst LAVENDER_HOUSE_2, 4, 4 ; $97 + mapconst FUCHSIA_MART, 4, 4 ; $98 + mapconst FUCHSIA_HOUSE_1, 4, 4 ; $99 + mapconst FUCHSIA_POKECENTER, 4, 7 ; $9A + mapconst FUCHSIA_HOUSE_2, 4, 5 ; $9B + mapconst SAFARI_ZONE_ENTRANCE, 3, 4 ; $9C + mapconst FUCHSIA_GYM, 9, 5 ; $9D + mapconst FUCHSIA_MEETING_ROOM, 4, 7 ; $9E + mapconst SEAFOAM_ISLANDS_2, 9, 15 ; $9F + mapconst SEAFOAM_ISLANDS_3, 9, 15 ; $A0 + mapconst SEAFOAM_ISLANDS_4, 9, 15 ; $A1 + mapconst SEAFOAM_ISLANDS_5, 9, 15 ; $A2 + mapconst VERMILION_HOUSE_2, 4, 4 ; $A3 + mapconst FUCHSIA_HOUSE_3, 4, 4 ; $A4 + mapconst MANSION_1, 14, 15 ; $A5 + mapconst CINNABAR_GYM, 9, 10 ; $A6 + mapconst CINNABAR_LAB_1, 4, 9 ; $A7 + mapconst CINNABAR_LAB_2, 4, 4 ; $A8 + mapconst CINNABAR_LAB_3, 4, 4 ; $A9 + mapconst CINNABAR_LAB_4, 4, 4 ; $AA + mapconst CINNABAR_POKECENTER, 4, 7 ; $AB + mapconst CINNABAR_MART, 4, 4 ; $AC + mapconst CINNABAR_MART_COPY, 4, 4 ; $AD + mapconst INDIGO_PLATEAU_LOBBY, 6, 8 ; $AE + mapconst COPYCATS_HOUSE_1F, 4, 4 ; $AF + mapconst COPYCATS_HOUSE_2F, 4, 4 ; $B0 + mapconst FIGHTING_DOJO, 6, 5 ; $B1 + mapconst SAFFRON_GYM, 9, 10 ; $B2 + mapconst SAFFRON_HOUSE_1, 4, 4 ; $B3 + mapconst SAFFRON_MART, 4, 4 ; $B4 + mapconst SILPH_CO_1F, 9, 15 ; $B5 + mapconst SAFFRON_POKECENTER, 4, 7 ; $B6 + mapconst SAFFRON_HOUSE_2, 4, 4 ; $B7 + mapconst ROUTE_15_GATE_1F, 5, 4 ; $B8 + mapconst ROUTE_15_GATE_2F, 4, 4 ; $B9 + mapconst ROUTE_16_GATE_1F, 7, 4 ; $BA + mapconst ROUTE_16_GATE_2F, 4, 4 ; $BB + mapconst ROUTE_16_HOUSE, 4, 4 ; $BC + mapconst ROUTE_12_HOUSE, 4, 4 ; $BD + mapconst ROUTE_18_GATE_1F, 5, 4 ; $BE + mapconst ROUTE_18_GATE_2F, 4, 4 ; $BF + mapconst SEAFOAM_ISLANDS_1, 9, 15 ; $C0 + mapconst ROUTE_22_GATE, 4, 5 ; $C1 + mapconst VICTORY_ROAD_2, 9, 15 ; $C2 + mapconst ROUTE_12_GATE_2F, 4, 4 ; $C3 + mapconst VERMILION_HOUSE_3, 4, 4 ; $C4 + mapconst DIGLETTS_CAVE, 18, 20 ; $C5 + mapconst VICTORY_ROAD_3, 9, 15 ; $C6 + mapconst ROCKET_HIDEOUT_1, 14, 15 ; $C7 + mapconst ROCKET_HIDEOUT_2, 14, 15 ; $C8 + mapconst ROCKET_HIDEOUT_3, 14, 15 ; $C9 + mapconst ROCKET_HIDEOUT_4, 12, 15 ; $CA + mapconst ROCKET_HIDEOUT_ELEVATOR, 4, 3 ; $CB + mapconst UNUSED_MAP_CC, 0, 0 ; $CC + mapconst UNUSED_MAP_CD, 0, 0 ; $CD + mapconst UNUSED_MAP_CE, 0, 0 ; $CE + mapconst SILPH_CO_2F, 9, 15 ; $CF + mapconst SILPH_CO_3F, 9, 15 ; $D0 + mapconst SILPH_CO_4F, 9, 15 ; $D1 + mapconst SILPH_CO_5F, 9, 15 ; $D2 + mapconst SILPH_CO_6F, 9, 13 ; $D3 + mapconst SILPH_CO_7F, 9, 13 ; $D4 + mapconst SILPH_CO_8F, 9, 13 ; $D5 + mapconst MANSION_2, 14, 15 ; $D6 + mapconst MANSION_3, 9, 15 ; $D7 + mapconst MANSION_4, 14, 15 ; $D8 + mapconst SAFARI_ZONE_EAST, 13, 15 ; $D9 + mapconst SAFARI_ZONE_NORTH, 18, 20 ; $DA + mapconst SAFARI_ZONE_WEST, 13, 15 ; $DB + mapconst SAFARI_ZONE_CENTER, 13, 15 ; $DC + mapconst SAFARI_ZONE_REST_HOUSE_1, 4, 4 ; $DD + mapconst SAFARI_ZONE_SECRET_HOUSE, 4, 4 ; $DE + mapconst SAFARI_ZONE_REST_HOUSE_2, 4, 4 ; $DF + mapconst SAFARI_ZONE_REST_HOUSE_3, 4, 4 ; $E0 + mapconst SAFARI_ZONE_REST_HOUSE_4, 4, 4 ; $E1 + mapconst UNKNOWN_DUNGEON_2, 9, 15 ; $E2 + mapconst UNKNOWN_DUNGEON_3, 9, 15 ; $E3 + mapconst UNKNOWN_DUNGEON_1, 9, 15 ; $E4 + mapconst NAME_RATERS_HOUSE, 4, 4 ; $E5 + mapconst CERULEAN_HOUSE_2, 4, 4 ; $E6 + mapconst UNUSED_MAP_E7, 0, 0 ; $E7 + mapconst ROCK_TUNNEL_2, 18, 20 ; $E8 + mapconst SILPH_CO_9F, 9, 13 ; $E9 + mapconst SILPH_CO_10F, 9, 8 ; $EA + mapconst SILPH_CO_11F, 9, 9 ; $EB + mapconst SILPH_CO_ELEVATOR, 2, 2 ; $EC + mapconst UNUSED_MAP_ED, 0, 0 ; $ED + mapconst UNUSED_MAP_EE, 0, 0 ; $EE + mapconst TRADE_CENTER, 4, 5 ; $EF + mapconst COLOSSEUM, 4, 5 ; $F0 + mapconst UNUSED_MAP_F1, 0, 0 ; $F1 + mapconst UNUSED_MAP_F2, 0, 0 ; $F2 + mapconst UNUSED_MAP_F3, 0, 0 ; $F3 + mapconst UNUSED_MAP_F4, 0, 0 ; $F4 + mapconst LORELEIS_ROOM, 6, 5 ; $F5 + mapconst BRUNOS_ROOM, 6, 5 ; $F6 + mapconst AGATHAS_ROOM, 6, 5 ; $F7 diff --git a/constants/map_dimensions.asm b/constants/map_dimensions.asm deleted file mode 100755 index 236ccac4..00000000 --- a/constants/map_dimensions.asm +++ /dev/null @@ -1,898 +0,0 @@ -; Map sizes (y, x) - -; PalletTown_h map_id=0 -PALLET_TOWN_HEIGHT EQU $09 -PALLET_TOWN_WIDTH EQU $0a - -; ViridianCity_h map_id=1 -VIRIDIAN_CITY_HEIGHT EQU $12 -VIRIDIAN_CITY_WIDTH EQU $14 - -; PewterCity_h map_id=2 -PEWTER_CITY_HEIGHT EQU $12 -PEWTER_CITY_WIDTH EQU $14 - -; CeruleanCity_h map_id=3 -CERULEAN_CITY_HEIGHT EQU $12 -CERULEAN_CITY_WIDTH EQU $14 - -; LavenderTown_h map_id=4 -LAVENDER_TOWN_HEIGHT EQU $09 -LAVENDER_TOWN_WIDTH EQU $0a - -; VermilionCity_h map_id=5 -VERMILION_CITY_HEIGHT EQU $12 -VERMILION_CITY_WIDTH EQU $14 - -; CeladonCity_h map_id=6 -CELADON_CITY_HEIGHT EQU $12 -CELADON_CITY_WIDTH EQU $19 - -; FuchsiaCity_h map_id=7 -FUCHSIA_CITY_HEIGHT EQU $12 -FUCHSIA_CITY_WIDTH EQU $14 - -; CinnabarIsland_h map_id=8 -CINNABAR_ISLAND_HEIGHT EQU $09 -CINNABAR_ISLAND_WIDTH EQU $0a - -; IndigoPlateau_h map_id=9 -INDIGO_PLATEAU_HEIGHT EQU $09 -INDIGO_PLATEAU_WIDTH EQU $0a - -; SaffronCity_h map_id=10 -SAFFRON_CITY_HEIGHT EQU $12 -SAFFRON_CITY_WIDTH EQU $14 - -; Route1_h map_id=12 -ROUTE_1_HEIGHT EQU $12 -ROUTE_1_WIDTH EQU $0a - -; Route2_h map_id=13 -ROUTE_2_HEIGHT EQU $24 -ROUTE_2_WIDTH EQU $0a - -; Route3_h map_id=14 -ROUTE_3_HEIGHT EQU $09 -ROUTE_3_WIDTH EQU $23 - -; Route4_h map_id=15 -ROUTE_4_HEIGHT EQU $09 -ROUTE_4_WIDTH EQU $2d - -; Route5_h map_id=16 -ROUTE_5_HEIGHT EQU $12 -ROUTE_5_WIDTH EQU $0a - -; Route6_h map_id=17 -ROUTE_6_HEIGHT EQU $12 -ROUTE_6_WIDTH EQU $0a - -; Route7_h map_id=18 -ROUTE_7_HEIGHT EQU $09 -ROUTE_7_WIDTH EQU $0a - -; Route8_h map_id=19 -ROUTE_8_HEIGHT EQU $09 -ROUTE_8_WIDTH EQU $1e - -; Route9_h map_id=20 -ROUTE_9_HEIGHT EQU $09 -ROUTE_9_WIDTH EQU $1e - -; Route10_h map_id=21 -ROUTE_10_HEIGHT EQU $24 -ROUTE_10_WIDTH EQU $0a - -; Route11_h map_id=22 -ROUTE_11_HEIGHT EQU $09 -ROUTE_11_WIDTH EQU $1e - -; Route12_h map_id=23 -ROUTE_12_HEIGHT EQU $36 -ROUTE_12_WIDTH EQU $0a - -; Route13_h map_id=24 -ROUTE_13_HEIGHT EQU $09 -ROUTE_13_WIDTH EQU $1e - -; Route14_h map_id=25 -ROUTE_14_HEIGHT EQU $1b -ROUTE_14_WIDTH EQU $0a - -; Route15_h map_id=26 -ROUTE_15_HEIGHT EQU $09 -ROUTE_15_WIDTH EQU $1e - -; Route16_h map_id=27 -ROUTE_16_HEIGHT EQU $09 -ROUTE_16_WIDTH EQU $14 - -; Route17_h map_id=28 -ROUTE_17_HEIGHT EQU $48 -ROUTE_17_WIDTH EQU $0a - -; Route18_h map_id=29 -ROUTE_18_HEIGHT EQU $09 -ROUTE_18_WIDTH EQU $19 - -; Route19_h map_id=30 -ROUTE_19_HEIGHT EQU $1b -ROUTE_19_WIDTH EQU $0a - -; Route20_h map_id=31 -ROUTE_20_HEIGHT EQU $09 -ROUTE_20_WIDTH EQU $32 - -; Route21_h map_id=32 -ROUTE_21_HEIGHT EQU $2d -ROUTE_21_WIDTH EQU $0a - -; Route22_h map_id=33 -ROUTE_22_HEIGHT EQU $09 -ROUTE_22_WIDTH EQU $14 - -; Route23_h map_id=34 -ROUTE_23_HEIGHT EQU $48 -ROUTE_23_WIDTH EQU $0a - -; Route24_h map_id=35 -ROUTE_24_HEIGHT EQU $12 -ROUTE_24_WIDTH EQU $0a - -; Route25_h map_id=36 -ROUTE_25_HEIGHT EQU $09 -ROUTE_25_WIDTH EQU $1e - -; RedsHouse1F_h map_id=37 -REDS_HOUSE_1F_HEIGHT EQU $04 -REDS_HOUSE_1F_WIDTH EQU $04 - -; RedsHouse2F_h map_id=38 -REDS_HOUSE_2F_HEIGHT EQU $04 -REDS_HOUSE_2F_WIDTH EQU $04 - -; BluesHouse_h map_id=39 -BLUES_HOUSE_HEIGHT EQU $04 -BLUES_HOUSE_WIDTH EQU $04 - -; OaksLab_h map_id=40 -OAKS_LAB_HEIGHT EQU $06 -OAKS_LAB_WIDTH EQU $05 - -; ViridianPokeCenter_h map_id=41 -VIRIDIAN_POKECENTER_HEIGHT EQU $04 -VIRIDIAN_POKECENTER_WIDTH EQU $07 - -; ViridianMart_h map_id=42 -VIRIDIAN_MART_HEIGHT EQU $04 -VIRIDIAN_MART_WIDTH EQU $04 - -; School_h map_id=43 -VIRIDIAN_SCHOOL_HEIGHT EQU $04 -VIRIDIAN_SCHOOL_WIDTH EQU $04 - -; ViridianHouse_h map_id=44 -VIRIDIAN_HOUSE_HEIGHT EQU $04 -VIRIDIAN_HOUSE_WIDTH EQU $04 - -; ViridianGym_h map_id=45 -VIRIDIAN_GYM_HEIGHT EQU $09 -VIRIDIAN_GYM_WIDTH EQU $0a - -; DiglettsCaveRoute2_h map_id=46 -DIGLETTS_CAVE_EXIT_HEIGHT EQU $04 -DIGLETTS_CAVE_EXIT_WIDTH EQU $04 - -; ViridianForestExit_h map_id=47 -VIRIDIAN_FOREST_EXIT_HEIGHT EQU $04 -VIRIDIAN_FOREST_EXIT_WIDTH EQU $05 - -; Route2House_h map_id=48 -ROUTE_2_HOUSE_HEIGHT EQU $04 -ROUTE_2_HOUSE_WIDTH EQU $04 - -; Route2Gate_h map_id=49 -ROUTE_2_GATE_HEIGHT EQU $04 -ROUTE_2_GATE_WIDTH EQU $05 - -; ViridianForestEntrance_h map_id=50 -VIRIDIAN_FOREST_ENTRANCE_HEIGHT EQU $04 -VIRIDIAN_FOREST_ENTRANCE_WIDTH EQU $05 - -; ViridianForest_h map_id=51 -VIRIDIAN_FOREST_HEIGHT EQU $18 -VIRIDIAN_FOREST_WIDTH EQU $11 - -; MuseumF1_h map_id=52 -MUSEUM_1F_HEIGHT EQU $04 -MUSEUM_1F_WIDTH EQU $0a - -; MuseumF2_h map_id=53 -MUSEUM_2F_HEIGHT EQU $04 -MUSEUM_2F_WIDTH EQU $07 - -; PewterGym_h map_id=54 -PEWTER_GYM_HEIGHT EQU $07 -PEWTER_GYM_WIDTH EQU $05 - -; PewterHouse1_h map_id=55 -PEWTER_HOUSE_1_HEIGHT EQU $04 -PEWTER_HOUSE_1_WIDTH EQU $04 - -; PewterMart_h map_id=56 -PEWTER_MART_HEIGHT EQU $04 -PEWTER_MART_WIDTH EQU $04 - -; PewterHouse2_h map_id=57 -PEWTER_HOUSE_2_HEIGHT EQU $04 -PEWTER_HOUSE_2_WIDTH EQU $04 - -; PewterPokecenter_h map_id=58 -PEWTER_POKECENTER_HEIGHT EQU $04 -PEWTER_POKECENTER_WIDTH EQU $07 - -; MtMoon1_h map_id=59 -MT_MOON_1_HEIGHT EQU $12 -MT_MOON_1_WIDTH EQU $14 - -; MtMoon2_h map_id=60 -MT_MOON_2_HEIGHT EQU $0e -MT_MOON_2_WIDTH EQU $0e - -; MtMoon3_h map_id=61 -MT_MOON_3_HEIGHT EQU $12 -MT_MOON_3_WIDTH EQU $14 - -; CeruleanHouseTrashed_h map_id=62 -TRASHED_HOUSE_HEIGHT EQU $04 -TRASHED_HOUSE_WIDTH EQU $04 - -; CeruleanHouse1_h map_id=63 -CERULEAN_HOUSE_1_HEIGHT EQU $04 -CERULEAN_HOUSE_1_WIDTH EQU $04 - -; CeruleanPokecenter_h map_id=64 -CERULEAN_POKECENTER_HEIGHT EQU $04 -CERULEAN_POKECENTER_WIDTH EQU $07 - -; CeruleanGym_h map_id=65 -CERULEAN_GYM_HEIGHT EQU $07 -CERULEAN_GYM_WIDTH EQU $05 - -; BikeShop_h map_id=66 -BIKE_SHOP_HEIGHT EQU $04 -BIKE_SHOP_WIDTH EQU $04 - -; CeruleanMart_h map_id=67 -CERULEAN_MART_HEIGHT EQU $04 -CERULEAN_MART_WIDTH EQU $04 - -; MtMoonPokecenter_h map_id=68 -MT_MOON_POKECENTER_HEIGHT EQU $04 -MT_MOON_POKECENTER_WIDTH EQU $07 - -; Route5Gate_h map_id=70 -ROUTE_5_GATE_HEIGHT EQU $03 -ROUTE_5_GATE_WIDTH EQU $04 - -; UndergroundTunnelEntranceRoute5_h map_id=71 -PATH_ENTRANCE_ROUTE_5_HEIGHT EQU $04 -PATH_ENTRANCE_ROUTE_5_WIDTH EQU $04 - -; DayCareM_h map_id=72 -DAYCAREM_HEIGHT EQU $04 -DAYCAREM_WIDTH EQU $04 - -; Route6Gate_h map_id=73 -ROUTE_6_GATE_HEIGHT EQU $03 -ROUTE_6_GATE_WIDTH EQU $04 - -; UndergroundTunnelEntranceRoute6_h map_id=74 -PATH_ENTRANCE_ROUTE_6_HEIGHT EQU $04 -PATH_ENTRANCE_ROUTE_6_WIDTH EQU $04 - -; Route7Gate_h map_id=76 -ROUTE_7_GATE_HEIGHT EQU $04 -ROUTE_7_GATE_WIDTH EQU $03 - -; UndergroundPathEntranceRoute7_h map_id=77 -PATH_ENTRANCE_ROUTE_7_HEIGHT EQU $04 -PATH_ENTRANCE_ROUTE_7_WIDTH EQU $04 - -; UndergroundPathEntranceRoute7Copy_h map_id=78 -PATH_ENTRANCE_ROUTE_7_COPY_HEIGHT EQU $04 -PATH_ENTRANCE_ROUTE_7_COPY_WIDTH EQU $04 - -; Route8Gate_h map_id=79 -ROUTE_8_GATE_HEIGHT EQU $04 -ROUTE_8_GATE_WIDTH EQU $03 - -; UndergroundPathEntranceRoute8_h map_id=80 -PATH_ENTRANCE_ROUTE_8_HEIGHT EQU $04 -PATH_ENTRANCE_ROUTE_8_WIDTH EQU $04 - -; RockTunnelPokecenter_h map_id=81 -ROCK_TUNNEL_POKECENTER_HEIGHT EQU $04 -ROCK_TUNNEL_POKECENTER_WIDTH EQU $07 - -; RockTunnel1_h map_id=82 -ROCK_TUNNEL_1_HEIGHT EQU $12 -ROCK_TUNNEL_1_WIDTH EQU $14 - -; PowerPlant_h map_id=83 -POWER_PLANT_HEIGHT EQU $12 -POWER_PLANT_WIDTH EQU $14 - -; Route11Gate_h map_id=84 -ROUTE_11_GATE_1F_HEIGHT EQU $05 -ROUTE_11_GATE_1F_WIDTH EQU $04 - -; DiglettsCaveEntranceRoute11_h map_id=85 -DIGLETTS_CAVE_ENTRANCE_HEIGHT EQU $04 -DIGLETTS_CAVE_ENTRANCE_WIDTH EQU $04 - -; Route11GateUpstairs_h map_id=86 -ROUTE_11_GATE_2F_HEIGHT EQU $04 -ROUTE_11_GATE_2F_WIDTH EQU $04 - -; Route12Gate_h map_id=87 -ROUTE_12_GATE_1F_HEIGHT EQU $04 -ROUTE_12_GATE_1F_WIDTH EQU $05 - -; BillsHouse_h map_id=88 -BILLS_HOUSE_HEIGHT EQU $04 -BILLS_HOUSE_WIDTH EQU $04 - -; VermilionPokecenter_h map_id=89 -VERMILION_POKECENTER_HEIGHT EQU $04 -VERMILION_POKECENTER_WIDTH EQU $07 - -; FanClub_h map_id=90 -POKEMON_FAN_CLUB_HEIGHT EQU $04 -POKEMON_FAN_CLUB_WIDTH EQU $04 - -; VermilionMart_h map_id=91 -VERMILION_MART_HEIGHT EQU $04 -VERMILION_MART_WIDTH EQU $04 - -; VermilionGym_h map_id=92 -VERMILION_GYM_HEIGHT EQU $09 -VERMILION_GYM_WIDTH EQU $05 - -; VermilionHouse1_h map_id=93 -VERMILION_HOUSE_1_HEIGHT EQU $04 -VERMILION_HOUSE_1_WIDTH EQU $04 - -; VermilionDock_h map_id=94 -VERMILION_DOCK_HEIGHT EQU $06 -VERMILION_DOCK_WIDTH EQU $0e - -; SSAnne1_h map_id=95 -SS_ANNE_1_HEIGHT EQU $09 -SS_ANNE_1_WIDTH EQU $14 - -; SSAnne2_h map_id=96 -SS_ANNE_2_HEIGHT EQU $09 -SS_ANNE_2_WIDTH EQU $14 - -; SSAnne3_h map_id=97 -SS_ANNE_3_HEIGHT EQU $03 -SS_ANNE_3_WIDTH EQU $0a - -; SSAnne4_h map_id=98 -SS_ANNE_4_HEIGHT EQU $04 -SS_ANNE_4_WIDTH EQU $0f - -; SSAnne5_h map_id=99 -SS_ANNE_5_HEIGHT EQU $07 -SS_ANNE_5_WIDTH EQU $0a - -; SSAnne6_h map_id=100 -SS_ANNE_6_HEIGHT EQU $08 -SS_ANNE_6_WIDTH EQU $07 - -; SSAnne7_h map_id=101 -SS_ANNE_7_HEIGHT EQU $04 -SS_ANNE_7_WIDTH EQU $03 - -; SSAnne8_h map_id=102 -SS_ANNE_8_HEIGHT EQU $08 -SS_ANNE_8_WIDTH EQU $0c - -; SSAnne9_h map_id=103 -SS_ANNE_9_HEIGHT EQU $08 -SS_ANNE_9_WIDTH EQU $0c - -; SSAnne10_h map_id=104 -SS_ANNE_10_HEIGHT EQU $08 -SS_ANNE_10_WIDTH EQU $0c - -; VictoryRoad1_h map_id=108 -VICTORY_ROAD_1_HEIGHT EQU $09 -VICTORY_ROAD_1_WIDTH EQU $0a - -; Lance_h map_id=113 -LANCES_ROOM_HEIGHT EQU $0d -LANCES_ROOM_WIDTH EQU $0d - -; HallofFameRoom_h map_id=118 -HALL_OF_FAME_HEIGHT EQU $04 -HALL_OF_FAME_WIDTH EQU $05 - -; UndergroundPathNS_h map_id=119 -UNDERGROUND_PATH_NS_HEIGHT EQU $18 -UNDERGROUND_PATH_NS_WIDTH EQU $04 - -; Gary_h map_id=120 -CHAMPIONS_ROOM_HEIGHT EQU $04 -CHAMPIONS_ROOM_WIDTH EQU $04 - -; UndergroundPathWE_h map_id=121 -UNDERGROUND_PATH_WE_HEIGHT EQU $04 -UNDERGROUND_PATH_WE_WIDTH EQU $19 - -; CeladonMart1_h map_id=122 -CELADON_MART_1_HEIGHT EQU $04 -CELADON_MART_1_WIDTH EQU $0a - -; CeladonMart2_h map_id=123 -CELADON_MART_2_HEIGHT EQU $04 -CELADON_MART_2_WIDTH EQU $0a - -; CeladonMart3_h map_id=124 -CELADON_MART_3_HEIGHT EQU $04 -CELADON_MART_3_WIDTH EQU $0a - -; CeladonMart4_h map_id=125 -CELADON_MART_4_HEIGHT EQU $04 -CELADON_MART_4_WIDTH EQU $0a - -; CeladonMartRoof_h map_id=126 -CELADON_MART_ROOF_HEIGHT EQU $04 -CELADON_MART_ROOF_WIDTH EQU $0a - -; CeladonMartElevator_h map_id=127 -CELADON_MART_ELEVATOR_HEIGHT EQU $02 -CELADON_MART_ELEVATOR_WIDTH EQU $02 - -; CeladonMansion1_h map_id=128 -CELADON_MANSION_1_HEIGHT EQU $06 -CELADON_MANSION_1_WIDTH EQU $04 - -; CeladonMansion2_h map_id=129 -CELADON_MANSION_2_HEIGHT EQU $06 -CELADON_MANSION_2_WIDTH EQU $04 - -; CeladonMansion3_h map_id=130 -CELADON_MANSION_3_HEIGHT EQU $06 -CELADON_MANSION_3_WIDTH EQU $04 - -; CeladonMansion4_h map_id=131 -CELADON_MANSION_4_HEIGHT EQU $06 -CELADON_MANSION_4_WIDTH EQU $04 - -; CeladonMansion5_h map_id=132 -CELADON_MANSION_5_HEIGHT EQU $04 -CELADON_MANSION_5_WIDTH EQU $04 - -; CeladonPokecenter_h map_id=133 -CELADON_POKECENTER_HEIGHT EQU $04 -CELADON_POKECENTER_WIDTH EQU $07 - -; CeladonGym_h map_id=134 -CELADON_GYM_HEIGHT EQU $09 -CELADON_GYM_WIDTH EQU $05 - -; CeladonGameCorner_h map_id=135 -GAME_CORNER_HEIGHT EQU $09 -GAME_CORNER_WIDTH EQU $0a - -; CeladonMart5_h map_id=136 -CELADON_MART_5_HEIGHT EQU $04 -CELADON_MART_5_WIDTH EQU $0a - -; CeladonPrizeRoom_h map_id=137 -CELADON_PRIZE_ROOM_HEIGHT EQU $04 -CELADON_PRIZE_ROOM_WIDTH EQU $05 - -; CeladonDiner_h map_id=138 -CELADON_DINER_HEIGHT EQU $04 -CELADON_DINER_WIDTH EQU $05 - -; CeladonHouse_h map_id=139 -CELADON_HOUSE_HEIGHT EQU $04 -CELADON_HOUSE_WIDTH EQU $04 - -; CeladonHotel_h map_id=140 -CELADON_HOTEL_HEIGHT EQU $04 -CELADON_HOTEL_WIDTH EQU $07 - -; LavenderPokecenter_h map_id=141 -LAVENDER_POKECENTER_HEIGHT EQU $04 -LAVENDER_POKECENTER_WIDTH EQU $07 - -; PokemonTower1_h map_id=142 -POKEMONTOWER_1_HEIGHT EQU $09 -POKEMONTOWER_1_WIDTH EQU $0a - -; PokemonTower2_h map_id=143 -POKEMONTOWER_2_HEIGHT EQU $09 -POKEMONTOWER_2_WIDTH EQU $0a - -; PokemonTower3_h map_id=144 -POKEMONTOWER_3_HEIGHT EQU $09 -POKEMONTOWER_3_WIDTH EQU $0a - -; PokemonTower4_h map_id=145 -POKEMONTOWER_4_HEIGHT EQU $09 -POKEMONTOWER_4_WIDTH EQU $0a - -; PokemonTower5_h map_id=146 -POKEMONTOWER_5_HEIGHT EQU $09 -POKEMONTOWER_5_WIDTH EQU $0a - -; PokemonTower6_h map_id=147 -POKEMONTOWER_6_HEIGHT EQU $09 -POKEMONTOWER_6_WIDTH EQU $0a - -; PokemonTower7_h map_id=148 -POKEMONTOWER_7_HEIGHT EQU $09 -POKEMONTOWER_7_WIDTH EQU $0a - -; LavenderHouse1_h map_id=149 -LAVENDER_HOUSE_1_HEIGHT EQU $04 -LAVENDER_HOUSE_1_WIDTH EQU $04 - -; LavenderMart_h map_id=150 -LAVENDER_MART_HEIGHT EQU $04 -LAVENDER_MART_WIDTH EQU $04 - -; LavenderHouse2_h map_id=151 -LAVENDER_HOUSE_2_HEIGHT EQU $04 -LAVENDER_HOUSE_2_WIDTH EQU $04 - -; FuchsiaMart_h map_id=152 -FUCHSIA_MART_HEIGHT EQU $04 -FUCHSIA_MART_WIDTH EQU $04 - -; FuchsiaHouse1_h map_id=153 -FUCHSIA_HOUSE_1_HEIGHT EQU $04 -FUCHSIA_HOUSE_1_WIDTH EQU $04 - -; FuchsiaPokecenter_h map_id=154 -FUCHSIA_POKECENTER_HEIGHT EQU $04 -FUCHSIA_POKECENTER_WIDTH EQU $07 - -; FuchsiaHouse2_h map_id=155 -FUCHSIA_HOUSE_2_HEIGHT EQU $04 -FUCHSIA_HOUSE_2_WIDTH EQU $05 - -; SafariZoneEntrance_h map_id=156 -SAFARI_ZONE_ENTRANCE_HEIGHT EQU $03 -SAFARI_ZONE_ENTRANCE_WIDTH EQU $04 - -; FuchsiaGym_h map_id=157 -FUCHSIA_GYM_HEIGHT EQU $09 -FUCHSIA_GYM_WIDTH EQU $05 - -; FuchsiaMeetingRoom_h map_id=158 -FUCHSIA_MEETING_ROOM_HEIGHT EQU $04 -FUCHSIA_MEETING_ROOM_WIDTH EQU $07 - -; SeafoamIslands2_h map_id=159 -SEAFOAM_ISLANDS_2_HEIGHT EQU $09 -SEAFOAM_ISLANDS_2_WIDTH EQU $0f - -; SeafoamIslands3_h map_id=160 -SEAFOAM_ISLANDS_3_HEIGHT EQU $09 -SEAFOAM_ISLANDS_3_WIDTH EQU $0f - -; SeafoamIslands4_h map_id=161 -SEAFOAM_ISLANDS_4_HEIGHT EQU $09 -SEAFOAM_ISLANDS_4_WIDTH EQU $0f - -; SeafoamIslands5_h map_id=162 -SEAFOAM_ISLANDS_5_HEIGHT EQU $09 -SEAFOAM_ISLANDS_5_WIDTH EQU $0f - -; VermilionHouse2_h map_id=163 -VERMILION_HOUSE_2_HEIGHT EQU $04 -VERMILION_HOUSE_2_WIDTH EQU $04 - -; FuchsiaHouse3_h map_id=164 -FUCHSIA_HOUSE_3_HEIGHT EQU $04 -FUCHSIA_HOUSE_3_WIDTH EQU $04 - -; Mansion1_h map_id=165 -MANSION_1_HEIGHT EQU $0e -MANSION_1_WIDTH EQU $0f - -; CinnabarGym_h map_id=166 -CINNABAR_GYM_HEIGHT EQU $09 -CINNABAR_GYM_WIDTH EQU $0a - -; Lab1_h map_id=167 -CINNABAR_LAB_1_HEIGHT EQU $04 -CINNABAR_LAB_1_WIDTH EQU $09 - -; Lab2_h map_id=168 -CINNABAR_LAB_2_HEIGHT EQU $04 -CINNABAR_LAB_2_WIDTH EQU $04 - -; Lab3_h map_id=169 -CINNABAR_LAB_3_HEIGHT EQU $04 -CINNABAR_LAB_3_WIDTH EQU $04 - -; Lab4_h map_id=170 -CINNABAR_LAB_4_HEIGHT EQU $04 -CINNABAR_LAB_4_WIDTH EQU $04 - -; CinnabarPokecenter_h map_id=171 -CINNABAR_POKECENTER_HEIGHT EQU $04 -CINNABAR_POKECENTER_WIDTH EQU $07 - -; CinnabarMart_h map_id=172 -CINNABAR_MART_HEIGHT EQU $04 -CINNABAR_MART_WIDTH EQU $04 - -; IndigoPlateauLobby_h map_id=174 -INDIGO_PLATEAU_LOBBY_HEIGHT EQU $06 -INDIGO_PLATEAU_LOBBY_WIDTH EQU $08 - -; CopycatsHouse1F_h map_id=175 -COPYCATS_HOUSE_1F_HEIGHT EQU $04 -COPYCATS_HOUSE_1F_WIDTH EQU $04 - -; CopycatsHouse2F_h map_id=176 -COPYCATS_HOUSE_2F_HEIGHT EQU $04 -COPYCATS_HOUSE_2F_WIDTH EQU $04 - -; FightingDojo_h map_id=177 -FIGHTING_DOJO_HEIGHT EQU $06 -FIGHTING_DOJO_WIDTH EQU $05 - -; SaffronGym_h map_id=178 -SAFFRON_GYM_HEIGHT EQU $09 -SAFFRON_GYM_WIDTH EQU $0a - -; SaffronHouse1_h map_id=179 -SAFFRON_HOUSE_1_HEIGHT EQU $04 -SAFFRON_HOUSE_1_WIDTH EQU $04 - -; SaffronMart_h map_id=180 -SAFFRON_MART_HEIGHT EQU $04 -SAFFRON_MART_WIDTH EQU $04 - -; SilphCo1_h map_id=181 -SILPH_CO_1F_HEIGHT EQU $09 -SILPH_CO_1F_WIDTH EQU $0f - -; SaffronPokecenter_h map_id=182 -SAFFRON_POKECENTER_HEIGHT EQU $04 -SAFFRON_POKECENTER_WIDTH EQU $07 - -; SaffronHouse2_h map_id=183 -SAFFRON_HOUSE_2_HEIGHT EQU $04 -SAFFRON_HOUSE_2_WIDTH EQU $04 - -; Route15Gate1F_h map_id=184 -ROUTE_15_GATE_1F_HEIGHT EQU $05 -ROUTE_15_GATE_1F_WIDTH EQU $04 - -; Route15GateUpstairs_h map_id=185 -ROUTE_15_GATE_2F_HEIGHT EQU $04 -ROUTE_15_GATE_2F_WIDTH EQU $04 - -; Route16GateMap_h map_id=186 -ROUTE_16_GATE_1F_HEIGHT EQU $07 -ROUTE_16_GATE_1F_WIDTH EQU $04 - -; Route16GateUpstairs_h map_id=187 -ROUTE_16_GATE_2F_HEIGHT EQU $04 -ROUTE_16_GATE_2F_WIDTH EQU $04 - -; Route16House_h map_id=188 -ROUTE_16_HOUSE_HEIGHT EQU $04 -ROUTE_16_HOUSE_WIDTH EQU $04 - -; Route12House_h map_id=189 -ROUTE_12_HOUSE_HEIGHT EQU $04 -ROUTE_12_HOUSE_WIDTH EQU $04 - -; Route18Gate_h map_id=190 -ROUTE_18_GATE_1F_HEIGHT EQU $05 -ROUTE_18_GATE_1F_WIDTH EQU $04 - -; Route18GateHeader_h map_id=191 -ROUTE_18_GATE_2F_HEIGHT EQU $04 -ROUTE_18_GATE_2F_WIDTH EQU $04 - -; SeafoamIslands1_h map_id=192 -SEAFOAM_ISLANDS_1_HEIGHT EQU $09 -SEAFOAM_ISLANDS_1_WIDTH EQU $0f - -; Route22Gate_h map_id=193 -ROUTE_22_GATE_HEIGHT EQU $04 -ROUTE_22_GATE_WIDTH EQU $05 - -; VictoryRoad2_h map_id=194 -VICTORY_ROAD_2_HEIGHT EQU $09 -VICTORY_ROAD_2_WIDTH EQU $0f - -; Route12GateUpstairs_h map_id=195 -ROUTE_12_GATE_2F_HEIGHT EQU $04 -ROUTE_12_GATE_2F_WIDTH EQU $04 - -; VermilionHouse3_h map_id=196 -VERMILION_HOUSE_3_HEIGHT EQU $04 -VERMILION_HOUSE_3_WIDTH EQU $04 - -; DiglettsCave_h map_id=197 -DIGLETTS_CAVE_HEIGHT EQU $12 -DIGLETTS_CAVE_WIDTH EQU $14 - -; VictoryRoad3_h map_id=198 -VICTORY_ROAD_3_HEIGHT EQU $09 -VICTORY_ROAD_3_WIDTH EQU $0f - -; RocketHideout1_h map_id=199 -ROCKET_HIDEOUT_1_HEIGHT EQU $0e -ROCKET_HIDEOUT_1_WIDTH EQU $0f - -; RocketHideout2_h map_id=200 -ROCKET_HIDEOUT_2_HEIGHT EQU $0e -ROCKET_HIDEOUT_2_WIDTH EQU $0f - -; RocketHideout3_h map_id=201 -ROCKET_HIDEOUT_3_HEIGHT EQU $0e -ROCKET_HIDEOUT_3_WIDTH EQU $0f - -; RocketHideout4_h map_id=202 -ROCKET_HIDEOUT_4_HEIGHT EQU $0c -ROCKET_HIDEOUT_4_WIDTH EQU $0f - -; RocketHideoutElevator_h map_id=203 -ROCKET_HIDEOUT_ELEVATOR_HEIGHT EQU $04 -ROCKET_HIDEOUT_ELEVATOR_WIDTH EQU $03 - -; SilphCo2_h map_id=207 -SILPH_CO_2F_HEIGHT EQU $09 -SILPH_CO_2F_WIDTH EQU $0f - -; SilphCo3_h map_id=208 -SILPH_CO_3F_HEIGHT EQU $09 -SILPH_CO_3F_WIDTH EQU $0f - -; SilphCo4_h map_id=209 -SILPH_CO_4F_HEIGHT EQU $09 -SILPH_CO_4F_WIDTH EQU $0f - -; SilphCo5_h map_id=210 -SILPH_CO_5F_HEIGHT EQU $09 -SILPH_CO_5F_WIDTH EQU $0f - -; SilphCo6_h map_id=211 -SILPH_CO_6F_HEIGHT EQU $09 -SILPH_CO_6F_WIDTH EQU $0d - -; SilphCo7_h map_id=212 -SILPH_CO_7F_HEIGHT EQU $09 -SILPH_CO_7F_WIDTH EQU $0d - -; SilphCo8_h map_id=213 -SILPH_CO_8F_HEIGHT EQU $09 -SILPH_CO_8F_WIDTH EQU $0d - -; Mansion2_h map_id=214 -MANSION_2_HEIGHT EQU $0e -MANSION_2_WIDTH EQU $0f - -; Mansion3_h map_id=215 -MANSION_3_HEIGHT EQU $09 -MANSION_3_WIDTH EQU $0f - -; Mansion4_h map_id=216 -MANSION_4_HEIGHT EQU $0e -MANSION_4_WIDTH EQU $0f - -; SafariZoneEast_h map_id=217 -SAFARI_ZONE_EAST_HEIGHT EQU $0d -SAFARI_ZONE_EAST_WIDTH EQU $0f - -; SafariZoneNorth_h map_id=218 -SAFARI_ZONE_NORTH_HEIGHT EQU $12 -SAFARI_ZONE_NORTH_WIDTH EQU $14 - -; SafariZoneWest_h map_id=219 -SAFARI_ZONE_WEST_HEIGHT EQU $0d -SAFARI_ZONE_WEST_WIDTH EQU $0f - -; SafariZoneCenter_h map_id=220 -SAFARI_ZONE_CENTER_HEIGHT EQU $0d -SAFARI_ZONE_CENTER_WIDTH EQU $0f - -; SafariZoneRestHouse1_h map_id=221 -SAFARI_ZONE_REST_HOUSE_1_HEIGHT EQU $04 -SAFARI_ZONE_REST_HOUSE_1_WIDTH EQU $04 - -; SafariZoneSecretHouse_h map_id=222 -SAFARI_ZONE_SECRET_HOUSE_HEIGHT EQU $04 -SAFARI_ZONE_SECRET_HOUSE_WIDTH EQU $04 - -; SafariZoneRestHouse2_h map_id=223 -SAFARI_ZONE_REST_HOUSE_2_HEIGHT EQU $04 -SAFARI_ZONE_REST_HOUSE_2_WIDTH EQU $04 - -; SafariZoneRestHouse3_h map_id=224 -SAFARI_ZONE_REST_HOUSE_3_HEIGHT EQU $04 -SAFARI_ZONE_REST_HOUSE_3_WIDTH EQU $04 - -; SafariZoneRestHouse4_h map_id=225 -SAFARI_ZONE_REST_HOUSE_4_HEIGHT EQU $04 -SAFARI_ZONE_REST_HOUSE_4_WIDTH EQU $04 - -; UnknownDungeon2_h map_id=226 -UNKNOWN_DUNGEON_2_HEIGHT EQU $09 -UNKNOWN_DUNGEON_2_WIDTH EQU $0f - -; UnknownDungeon3_h map_id=227 -UNKNOWN_DUNGEON_3_HEIGHT EQU $09 -UNKNOWN_DUNGEON_3_WIDTH EQU $0f - -; UnknownDungeon1_h map_id=228 -UNKNOWN_DUNGEON_1_HEIGHT EQU $09 -UNKNOWN_DUNGEON_1_WIDTH EQU $0f - -; NameRater_h map_id=229 -NAME_RATERS_HOUSE_HEIGHT EQU $04 -NAME_RATERS_HOUSE_WIDTH EQU $04 - -; CeruleanHouse2_h map_id=230 -CERULEAN_HOUSE_2_HEIGHT EQU $04 -CERULEAN_HOUSE_2_WIDTH EQU $04 - -; RockTunnel2_h map_id=232 -ROCK_TUNNEL_2_HEIGHT EQU $12 -ROCK_TUNNEL_2_WIDTH EQU $14 - -; SilphCo9_h map_id=233 -SILPH_CO_9F_HEIGHT EQU $09 -SILPH_CO_9F_WIDTH EQU $0d - -; SilphCo10_h map_id=234 -SILPH_CO_10F_HEIGHT EQU $09 -SILPH_CO_10F_WIDTH EQU $08 - -; SilphCo11_h map_id=235 -SILPH_CO_11F_HEIGHT EQU $09 -SILPH_CO_11F_WIDTH EQU $09 - -; SilphCoElevator_h map_id=236 -SILPH_CO_ELEVATOR_HEIGHT EQU $02 -SILPH_CO_ELEVATOR_WIDTH EQU $02 - -; BattleCenterM_h map_id=239 -BATTLE_CENTER_HEIGHT EQU $04 -BATTLE_CENTER_WIDTH EQU $05 - -; TradeCenterM_h map_id=240 -TRADE_CENTER_HEIGHT EQU $04 -TRADE_CENTER_WIDTH EQU $05 - -; Lorelei_h map_id=245 -LORELEIS_ROOM_HEIGHT EQU $06 -LORELEIS_ROOM_WIDTH EQU $05 - -; Bruno_h map_id=246 -BRUNOS_ROOM_HEIGHT EQU $06 -BRUNOS_ROOM_WIDTH EQU $05 - -; Agatha_h map_id=247 -AGATHAS_ROOM_HEIGHT EQU $06 -AGATHAS_ROOM_WIDTH EQU $05 - -IF DEF(_OPTION_BEACH_HOUSE) -BEACH_HOUSE_HEIGHT EQU 4 -BEACH_HOUSE_WIDTH EQU 7 -ENDC diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 3452a393..57b19a37 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -1,15 +1,24 @@ MAX_LEVEL EQU 100 -NUM_MOVES EQU 4 + +NUM_MOVES EQU 4 +NUM_STATS EQU 5 +NUM_STAT_MODS EQU 8 +NUM_DVS EQU 2 PARTY_LENGTH EQU 6 MONS_PER_BOX EQU 20 NUM_BOXES EQU 12 -HOF_MON EQU $10 -HOF_TEAM EQU PARTY_LENGTH * HOF_MON -NUM_HOF_TEAMS EQU 50 +BAG_ITEM_CAPACITY EQU 20 +PC_ITEM_CAPACITY EQU 50 + +HOF_MON EQU $10 +HOF_TEAM EQU PARTY_LENGTH * HOF_MON +HOF_TEAM_CAPACITY EQU 50 +NAME_LENGTH EQU 11 +ITEM_NAME_LENGTH EQU 13 A_BUTTON EQU %00000001 B_BUTTON EQU %00000010 @@ -20,9 +29,27 @@ D_LEFT EQU %00100000 D_UP EQU %01000000 D_DOWN EQU %10000000 +const_value set 0 + const BIT_A_BUTTON + const BIT_B_BUTTON + const BIT_SELECT + const BIT_START + const BIT_D_RIGHT + const BIT_D_LEFT + const BIT_D_UP + const BIT_D_DOWN + SCREEN_WIDTH EQU 20 SCREEN_HEIGHT EQU 18 +SCREEN_WIDTH_PIXELS EQU SCREEN_WIDTH * 8 +SCREEN_HEIGHT_PIXELS EQU SCREEN_HEIGHT * 8 + +BG_MAP_WIDTH EQU 32 +BG_MAP_HEIGHT EQU 32 + +SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile) + NPC_MOVEMENT_DOWN EQU $00 NPC_MOVEMENT_UP EQU $40 NPC_MOVEMENT_LEFT EQU $80 @@ -58,6 +85,96 @@ TRADE_CANCEL_MENU EQU 5 HEAL_CANCEL_MENU EQU 6 NO_YES_MENU EQU 7 +; menu exit method constants for list menus and the buy/sell/quit menu +CHOSE_MENU_ITEM EQU 1 ; pressed A +CANCELLED_MENU EQU 2 ; pressed B + +; menu exit method constants for two-option menus +CHOSE_FIRST_ITEM EQU 1 +CHOSE_SECOND_ITEM EQU 2 + +; move mon constants +BOX_TO_PARTY EQU 0 +PARTY_TO_BOX EQU 1 +DAYCARE_TO_PARTY EQU 2 +PARTY_TO_DAYCARE EQU 3 + +; emotion bubbles +EXCLAMATION_BUBBLE EQU 0 +QUESTION_BUBBLE EQU 1 +SMILE_BUBBLE EQU 2 + +; slot symbols +SLOTS7 EQU $0200 +SLOTSBAR EQU $0604 +SLOTSCHERRY EQU $0A08 +SLOTSFISH EQU $0E0C +SLOTSBIRD EQU $1210 +SLOTSMOUSE EQU $1614 + +; party menu types +NORMAL_PARTY_MENU EQU 0 +USE_ITEM_PARTY_MENU EQU 1 +BATTLE_PARTY_MENU EQU 2 +TMHM_PARTY_MENU EQU 3 +SWAP_MONS_PARTY_MENU EQU 4 +EVO_STONE_PARTY_MENU EQU 5 + +; party memu message IDs +ANTIDOTE_MSG EQU $F0 +BURN_HEAL_MSG EQU $F1 +ICE_HEAL_MSG EQU $F2 +AWAKENING_MSG EQU $F3 +PARALYZ_HEAL_MSG EQU $F4 +POTION_MSG EQU $F5 +FULL_HEAL_MSG EQU $F6 +REVIVE_MSG EQU $F7 +RARE_CANDY_MSG EQU $F8 + +; naming screen types +NAME_PLAYER_SCREEN EQU 0 +NAME_RIVAL_SCREEN EQU 1 +NAME_MON_SCREEN EQU 2 + +; mon data locations +; Note that some values are not supported by all functions that use these values. +PLAYER_PARTY_DATA EQU 0 +ENEMY_PARTY_DATA EQU 1 +BOX_DATA EQU 2 +DAYCARE_DATA EQU 3 +BATTLE_MON_DATA EQU 4 + +; player direction constants + +PLAYER_DIR_BIT_RIGHT EQU 0 +PLAYER_DIR_BIT_LEFT EQU 1 +PLAYER_DIR_BIT_DOWN EQU 2 +PLAYER_DIR_BIT_UP EQU 3 + +PLAYER_DIR_RIGHT EQU (1 << PLAYER_DIR_BIT_RIGHT) +PLAYER_DIR_LEFT EQU (1 << PLAYER_DIR_BIT_LEFT) +PLAYER_DIR_DOWN EQU (1 << PLAYER_DIR_BIT_DOWN) +PLAYER_DIR_UP EQU (1 << PLAYER_DIR_BIT_UP) + +; flag operations + +FLAG_RESET EQU 0 +FLAG_SET EQU 1 +FLAG_TEST EQU 2 + +; HP bar +HP_BAR_GREEN EQU 0 +HP_BAR_YELLOW EQU 1 +HP_BAR_RED EQU 2 + +; D733 flags +BIT_TEST_BATTLE EQU 0 + +; battle type constants +BATTLE_TYPE_NORMAL EQU 0 +BATTLE_TYPE_OLD_MAN EQU 1 +BATTLE_TYPE_SAFARI EQU 2 + ; serial ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 @@ -83,3 +200,7 @@ LINK_STATE_START_BATTLE EQU $03 ; pre-battle initialisation LINK_STATE_BATTLING EQU $04 ; in a link battle LINK_STATE_RESET EQU $05 ; reset game (unused) LINK_STATE_TRADING EQU $32 ; in a link trade + +LINKBATTLE_RUN EQU $F +LINKBATTLE_STRUGGLE EQU $E +LINKBATTLE_NO_ACTION EQU $D diff --git a/constants/move_animation_constants.asm b/constants/move_animation_constants.asm index 018c094b..27658c83 100644 --- a/constants/move_animation_constants.asm +++ b/constants/move_animation_constants.asm @@ -1,43 +1,44 @@ ; subanimations +const_value = $D8 ; special effects, prefaced with "SE" for "Special Effect" -SE_WAVY_SCREEN EQU $D8 ; used in Psywave/Night Shade/Psychic etc. -SE_SUBSTITUTE_MON EQU $D9 ; used in Substitute (turns the pokemon into a mini sprite) -SE_SHAKE_BACK_AND_FORTH EQU $DA ; used in Double Team -SE_SLIDE_ENEMY_MON_OUT EQU $DB ; used in Whirlwind -SE_SHOW_ENEMY_MON_PIC EQU $DC ; used in Seismic Toss -SE_SHOW_MON_PIC EQU $DD ; used in Low Kick/Quick Attack/Seismic Toss etc. -SE_BLINK_ENEMY_MON EQU $DE ; used in Seismic Toss -SE_HIDE_ENEMY_MON_PIC EQU $DF ; used in Seismic Toss -SE_FLASH_ENEMY_MON_PIC EQU $E0 ; unused -SE_DELAY_ANIMATION_10 EQU $E1 ; used in lots of animations -SE_SPIRAL_BALLS_INWARD EQU $E2 ; used in Growth/Focus Energy/Hyper Beam etc. -SE_SHAKE_ENEMY_HUD_2 EQU $E3 ; unused -SE_SHAKE_ENEMY_HUD EQU $E4 ; -SE_SLIDE_MON_HALF_LEFT EQU $E5 ; used in Softboiled -SE_PETALS_FALLING EQU $E6 ; used in Petal Dance -SE_LEAVES_FALLING EQU $E7 ; used in Razor Leaf -SE_TRANSFORM_MON EQU $E8 ; used in Transform -SE_SLIDE_MON_DOWN_AND_HIDE EQU $E9 ; used in Acid Armor -SE_MINIMIZE_MON EQU $EA ; used in Minimize -SE_BOUNCE_UP_AND_DOWN EQU $EB ; used in Splash -SE_SHOOT_MANY_BALLS_UPWARD EQU $EC ; used in an unused animation -SE_SHOOT_BALLS_UPWARD EQU $ED ; used in Teleport/Sky Attack -SE_SQUISH_MON_PIC EQU $EE ; used in Teleport/Sky Attack -SE_HIDE_MON_PIC EQU $EF -SE_LIGHT_SCREEN_PALETTE EQU $F0 ; used in Mist/Double Edge/Absorb/etc. -SE_RESET_MON_POSITION EQU $F1 ; used in Tackle/Body Slam/etc. -SE_MOVE_MON_HORIZONTALLY EQU $F2 ; used in Tackle/Body Slam/etc. -SE_BLINK_MON EQU $F3 ; used in Recover -SE_SLIDE_MON_OUT EQU $F4 ; used in Seismic Toss/Low Kick/etc. -SE_FLASH_MON_PIC EQU $F5 -SE_SLIDE_MON_DOWN EQU $F6 ; used in Withdraw/Waterfall/fainting -SE_SLIDE_MON_UP EQU $F7 ; used in Dig/Waterfall/etc. -SE_FLASH_SCREEN_LONG EQU $F8 ; used in Confusion/Psychic/etc. -SE_DARKEN_MON_PALETTE EQU $F9 ; used in Smokescreen/Smog/etc. -SE_WATER_DROPLETS_EVERYWHERE EQU $FA ; used in Mist/Surf/Toxic/etc. -SE_SHAKE_SCREEN EQU $FB ; used in Earthquake/Fissure/etc. -SE_RESET_SCREEN_PALETTE EQU $FC ; used in Leer/Thunderpunch/etc. -SE_DARK_SCREEN_PALETTE EQU $FD ; used in Hyper Beam/Thunderpunch/etc. -SE_DARK_SCREEN_FLASH EQU $FE ; used in Cut/Take Down/etc. + const SE_WAVY_SCREEN ; $D8 used in Psywave/Night Shade/Psychic etc. + const SE_SUBSTITUTE_MON ; $D9 used in Substitute (turns the pokemon into a mini sprite) + const SE_SHAKE_BACK_AND_FORTH ; $DA used in Double Team + const SE_SLIDE_ENEMY_MON_OFF ; $DB used in Whirlwind + const SE_SHOW_ENEMY_MON_PIC ; $DC used in Seismic Toss + const SE_SHOW_MON_PIC ; $DD used in Low Kick/Quick Attack/Seismic Toss etc. + const SE_BLINK_ENEMY_MON ; $DE used in Seismic Toss + const SE_HIDE_ENEMY_MON_PIC ; $DF used in Seismic Toss + const SE_FLASH_ENEMY_MON_PIC ; $E0 unused + const SE_DELAY_ANIMATION_10 ; $E1 used in lots of animations + const SE_SPIRAL_BALLS_INWARD ; $E2 used in Growth/Focus Energy/Hyper Beam etc. + const SE_SHAKE_ENEMY_HUD_2 ; $E3 unused + const SE_SHAKE_ENEMY_HUD ; $E4 + const SE_SLIDE_MON_HALF_OFF ; $E5 used in Softboiled + const SE_PETALS_FALLING ; $E6 used in Petal Dance + const SE_LEAVES_FALLING ; $E7 used in Razor Leaf + const SE_TRANSFORM_MON ; $E8 used in Transform + const SE_SLIDE_MON_DOWN_AND_HIDE ; $E9 used in Acid Armor + const SE_MINIMIZE_MON ; $EA used in Minimize + const SE_BOUNCE_UP_AND_DOWN ; $EB used in Splash + const SE_SHOOT_MANY_BALLS_UPWARD ; $EC used in an unused animation + const SE_SHOOT_BALLS_UPWARD ; $ED used in Teleport/Sky Attack + const SE_SQUISH_MON_PIC ; $EE used in Teleport/Sky Attack + const SE_HIDE_MON_PIC ; $EF + const SE_LIGHT_SCREEN_PALETTE ; $F0 used in Mist/Double Edge/Absorb/etc. + const SE_RESET_MON_POSITION ; $F1 used in Tackle/Body Slam/etc. + const SE_MOVE_MON_HORIZONTALLY ; $F2 used in Tackle/Body Slam/etc. + const SE_BLINK_MON ; $F3 used in Recover + const SE_SLIDE_MON_OFF ; $F4 used in Seismic Toss/Low Kick/etc. + const SE_FLASH_MON_PIC ; $F5 + const SE_SLIDE_MON_DOWN ; $F6 used in Withdraw/Waterfall/fainting + const SE_SLIDE_MON_UP ; $F7 used in Dig/Waterfall/etc. + const SE_FLASH_SCREEN_LONG ; $F8 used in Confusion/Psychic/etc. + const SE_DARKEN_MON_PALETTE ; $F9 used in Smokescreen/Smog/etc. + const SE_WATER_DROPLETS_EVERYWHERE ; $FA used in Mist/Surf/Toxic/etc. + const SE_SHAKE_SCREEN ; $FB used in Earthquake/Fissure/etc. + const SE_RESET_SCREEN_PALETTE ; $FC used in Leer/Thunderpunch/etc. + const SE_DARK_SCREEN_PALETTE ; $FD used in Hyper Beam/Thunderpunch/etc. + const SE_DARK_SCREEN_FLASH ; $FE used in Cut/Take Down/etc. diff --git a/constants/move_effect_constants.asm b/constants/move_effect_constants.asm index ff7ddc12..b66772d1 100644 --- a/constants/move_effect_constants.asm +++ b/constants/move_effect_constants.asm @@ -2,92 +2,95 @@ ; {stat}_(UP|DOWN)(1|2) means that the move raises the user's (or lowers the target's) corresponding stat modifier by 1 (or 2) stages ; {status condition}_side_effect means that the move has a side chance of causing that condition ; {status condition}_effect means that the move causes the status condition every time it hits the target -NO_ADDITIONAL_EFFECT EQU $00 -POISON_SIDE_EFFECT1 EQU $02 -DRAIN_HP_EFFECT EQU $03 -BURN_SIDE_EFFECT1 EQU $04 -FREEZE_SIDE_EFFECT EQU $05 -PARALYZE_SIDE_EFFECT1 EQU $06 -EXPLODE_EFFECT EQU $07 ; Explosion, Self Destruct -DREAM_EATER_EFFECT EQU $08 -MIRROR_MOVE_EFFECT EQU $09 -ATTACK_UP1_EFFECT EQU $0A -DEFENSE_UP1_EFFECT EQU $0B -SPEED_UP1_EFFECT EQU $0C -SPECIAL_UP1_EFFECT EQU $0D -ACCURACY_UP1_EFFECT EQU $0E -EVASION_UP1_EFFECT EQU $0F -PAY_DAY_EFFECT EQU $10 -SWIFT_EFFECT EQU $11 -ATTACK_DOWN1_EFFECT EQU $12 -DEFENSE_DOWN1_EFFECT EQU $13 -SPEED_DOWN1_EFFECT EQU $14 -SPECIAL_DOWN1_EFFECT EQU $15 -ACCURACY_DOWN1_EFFECT EQU $16 -EVASION_DOWN1_EFFECT EQU $17 -CONVERSION_EFFECT EQU $18 -HAZE_EFFECT EQU $19 -BIDE_EFFECT EQU $1A -THRASH_PETAL_DANCE_EFFECT EQU $1B -SWITCH_AND_TELEPORT_EFFECT EQU $1C -TWO_TO_FIVE_ATTACKS_EFFECT EQU $1D -; unused effect EQU $1E -FLINCH_SIDE_EFFECT1 EQU $1F -SLEEP_EFFECT EQU $20 -POISON_SIDE_EFFECT2 EQU $21 -BURN_SIDE_EFFECT2 EQU $22 -; unused effect EQU $23 -PARALYZE_SIDE_EFFECT2 EQU $24 -FLINCH_SIDE_EFFECT2 EQU $25 -OHKO_EFFECT EQU $26 ; moves like Horn Drill -CHARGE_EFFECT EQU $27 ; moves like Solar Beam -SUPER_FANG_EFFECT EQU $28 -SPECIAL_DAMAGE_EFFECT EQU $29 ; Seismic Toss, Night Shade, Sonic Boom, Dragon Rage, Psywave -TRAPPING_EFFECT EQU $2A ; moves like Wrap -FLY_EFFECT EQU $2B -ATTACK_TWICE_EFFECT EQU $2C -JUMP_KICK_EFFECT EQU $2D ; Jump Kick and Hi Jump Kick effect -MIST_EFFECT EQU $2E -FOCUS_ENERGY_EFFECT EQU $2F -RECOIL_EFFECT EQU $30 ; moves like Double Edge -CONFUSION_EFFECT EQU $31 ; Confuse Ray, Supersonic (not the move Confusion) -ATTACK_UP2_EFFECT EQU $32 -DEFENSE_UP2_EFFECT EQU $33 -SPEED_UP2_EFFECT EQU $34 -SPECIAL_UP2_EFFECT EQU $35 -ACCURACY_UP2_EFFECT EQU $36 -EVASION_UP2_EFFECT EQU $37 -HEAL_EFFECT EQU $38 ; Recover, Softboiled, Rest -TRANSFORM_EFFECT EQU $39 -ATTACK_DOWN2_EFFECT EQU $3A -DEFENSE_DOWN2_EFFECT EQU $3B -SPEED_DOWN2_EFFECT EQU $3C -SPECIAL_DOWN2_EFFECT EQU $3D -ACCURACY_DOWN2_EFFECT EQU $3E -EVASION_DOWN2_EFFECT EQU $3F -LIGHT_SCREEN_EFFECT EQU $40 -REFLECT_EFFECT EQU $41 -POISON_EFFECT EQU $42 -PARALYZE_EFFECT EQU $43 -ATTACK_DOWN_SIDE_EFFECT EQU $44 -DEFENSE_DOWN_SIDE_EFFECT EQU $45 -SPEED_DOWN_SIDE_EFFECT EQU $46 -SPECIAL_DOWN_SIDE_EFFECT EQU $47 -; unused effect EQU $48 -; unused effect EQU $49 -; unused effect EQU $4A -; unused effect EQU $4B -CONFUSION_SIDE_EFFECT EQU $4C -TWINEEDLE_EFFECT EQU $4D -; unused effect EQU $4E -SUBSTITUTE_EFFECT EQU $4F -HYPER_BEAM_EFFECT EQU $50 -RAGE_EFFECT EQU $51 -MIMIC_EFFECT EQU $52 -METRONOME_EFFECT EQU $53 -LEECH_SEED_EFFECT EQU $54 -SPLASH_EFFECT EQU $55 -DISABLE_EFFECT EQU $56 +const_value = 0 + + const NO_ADDITIONAL_EFFECT ; $00 + const UNUSED_EFFECT_01 ; $01 + const POISON_SIDE_EFFECT1 ; $02 + const DRAIN_HP_EFFECT ; $03 + const BURN_SIDE_EFFECT1 ; $04 + const FREEZE_SIDE_EFFECT ; $05 + const PARALYZE_SIDE_EFFECT1 ; $06 + const EXPLODE_EFFECT ; $07 Explosion, Self Destruct + const DREAM_EATER_EFFECT ; $08 + const MIRROR_MOVE_EFFECT ; $09 + const ATTACK_UP1_EFFECT ; $0A + const DEFENSE_UP1_EFFECT ; $0B + const SPEED_UP1_EFFECT ; $0C + const SPECIAL_UP1_EFFECT ; $0D + const ACCURACY_UP1_EFFECT ; $0E + const EVASION_UP1_EFFECT ; $0F + const PAY_DAY_EFFECT ; $10 + const SWIFT_EFFECT ; $11 + const ATTACK_DOWN1_EFFECT ; $12 + const DEFENSE_DOWN1_EFFECT ; $13 + const SPEED_DOWN1_EFFECT ; $14 + const SPECIAL_DOWN1_EFFECT ; $15 + const ACCURACY_DOWN1_EFFECT ; $16 + const EVASION_DOWN1_EFFECT ; $17 + const CONVERSION_EFFECT ; $18 + const HAZE_EFFECT ; $19 + const BIDE_EFFECT ; $1A + const THRASH_PETAL_DANCE_EFFECT ; $1B + const SWITCH_AND_TELEPORT_EFFECT ; $1C + const TWO_TO_FIVE_ATTACKS_EFFECT ; $1D + const UNUSED_EFFECT_1E ; $1E + const FLINCH_SIDE_EFFECT1 ; $1F + const SLEEP_EFFECT ; $20 + const POISON_SIDE_EFFECT2 ; $21 + const BURN_SIDE_EFFECT2 ; $22 + const UNUSED_EFFECT_23 ; $23 + const PARALYZE_SIDE_EFFECT2 ; $24 + const FLINCH_SIDE_EFFECT2 ; $25 + const OHKO_EFFECT ; $26 moves like Horn Drill + const CHARGE_EFFECT ; $27 moves like Solar Beam + const SUPER_FANG_EFFECT ; $28 + const SPECIAL_DAMAGE_EFFECT ; $29 Seismic Toss, Night Shade, Sonic Boom, Dragon Rage, Psywave + const TRAPPING_EFFECT ; $2A moves like Wrap + const FLY_EFFECT ; $2B + const ATTACK_TWICE_EFFECT ; $2C + const JUMP_KICK_EFFECT ; $2D Jump Kick and Hi Jump Kick effect + const MIST_EFFECT ; $2E + const FOCUS_ENERGY_EFFECT ; $2F + const RECOIL_EFFECT ; $30 moves like Double Edge + const CONFUSION_EFFECT ; $31 Confuse Ray, Supersonic (not the move Confusion) + const ATTACK_UP2_EFFECT ; $32 + const DEFENSE_UP2_EFFECT ; $33 + const SPEED_UP2_EFFECT ; $34 + const SPECIAL_UP2_EFFECT ; $35 + const ACCURACY_UP2_EFFECT ; $36 + const EVASION_UP2_EFFECT ; $37 + const HEAL_EFFECT ; $38 Recover, Softboiled, Rest + const TRANSFORM_EFFECT ; $39 + const ATTACK_DOWN2_EFFECT ; $3A + const DEFENSE_DOWN2_EFFECT ; $3B + const SPEED_DOWN2_EFFECT ; $3C + const SPECIAL_DOWN2_EFFECT ; $3D + const ACCURACY_DOWN2_EFFECT ; $3E + const EVASION_DOWN2_EFFECT ; $3F + const LIGHT_SCREEN_EFFECT ; $40 + const REFLECT_EFFECT ; $41 + const POISON_EFFECT ; $42 + const PARALYZE_EFFECT ; $43 + const ATTACK_DOWN_SIDE_EFFECT ; $44 + const DEFENSE_DOWN_SIDE_EFFECT ; $45 + const SPEED_DOWN_SIDE_EFFECT ; $46 + const SPECIAL_DOWN_SIDE_EFFECT ; $47 + const UNUSED_EFFECT_48 ; $48 + const UNUSED_EFFECT_49 ; $49 + const UNUSED_EFFECT_4A ; $4A + const UNUSED_EFFECT_4B ; $4B + const CONFUSION_SIDE_EFFECT ; $4C + const TWINEEDLE_EFFECT ; $4D + const UNUSED_EFFECT_4E ; $4E + const SUBSTITUTE_EFFECT ; $4F + const HYPER_BEAM_EFFECT ; $50 + const RAGE_EFFECT ; $51 + const MIMIC_EFFECT ; $52 + const METRONOME_EFFECT ; $53 + const LEECH_SEED_EFFECT ; $54 + const SPLASH_EFFECT ; $55 + const DISABLE_EFFECT ; $56 ; fixed damage constants SONICBOOM_DAMAGE EQU 20 diff --git a/constants/music_constants.asm b/constants/music_constants.asm index 30d11543..57ad230d 100644 --- a/constants/music_constants.asm +++ b/constants/music_constants.asm @@ -1,9 +1,49 @@ +; HW sound channel register base addresses +HW_CH1_BASE EQU (rNR10 % $100) +HW_CH2_BASE EQU ((rNR21 % $100) - 1) +HW_CH3_BASE EQU (rNR30 % $100) +HW_CH4_BASE EQU ((rNR41 % $100) - 1) + +; HW sound channel enable bit masks +HW_CH1_ENABLE_MASK EQU %00010001 +HW_CH2_ENABLE_MASK EQU %00100010 +HW_CH3_ENABLE_MASK EQU %01000100 +HW_CH4_ENABLE_MASK EQU %10001000 + +; HW sound channel disable bit masks +HW_CH1_DISABLE_MASK EQU (~HW_CH1_ENABLE_MASK & $ff) +HW_CH2_DISABLE_MASK EQU (~HW_CH2_ENABLE_MASK & $ff) +HW_CH3_DISABLE_MASK EQU (~HW_CH3_ENABLE_MASK & $ff) +HW_CH4_DISABLE_MASK EQU (~HW_CH4_ENABLE_MASK & $ff) + +REG_DUTY_SOUND_LEN EQU 1 +REG_VOLUME_ENVELOPE EQU 2 +REG_FREQUENCY_LO EQU 3 + +MAX_SFX_ID EQU $B9 + +CRY_SFX_START EQU $14 +CRY_SFX_END EQU $86 + +; wChannelFlags1 constants +BIT_PERFECT_PITCH EQU 0 ; controlled by toggleperfectpitch command +BIT_CHANNEL_CALL EQU 1 ; if in channel call +BIT_NOISE_OR_SFX EQU 2 ; if channel is the music noise channel or an SFX channel +BIT_VIBRATO_DIRECTION EQU 3 ; if the pitch is above or below normal (cycles) +BIT_PITCH_BEND_ON EQU 4 ; if pitch bend is active +BIT_PITCH_BEND_DECREASING EQU 5 ; if the pitch bend frequency is decreasing (instead of increasing) +BIT_ROTATE_DUTY EQU 6 ; if rotating duty + +; wChannelFlags2 constant (only has one flag) +BIT_EXECUTE_MUSIC EQU 0 ; if in execute music + ; Song ids are calculated by address to save space. music_const: MACRO -\1 EQUS "((\2 - SFX_Headers_02) / 3)" +\1 EQUS "((\2 - SFX_Headers_1) / 3)" ENDM + ; AUDIO_1 music_const MUSIC_PALLET_TOWN, Music_PalletTown music_const MUSIC_POKECENTER, Music_Pokecenter music_const MUSIC_GYM, Music_Gym @@ -25,6 +65,7 @@ ENDM music_const MUSIC_ROUTES4, Music_Routes4 music_const MUSIC_INDIGO_PLATEAU, Music_IndigoPlateau + ; AUDIO_2 music_const MUSIC_GYM_LEADER_BATTLE, Music_GymLeaderBattle music_const MUSIC_TRAINER_BATTLE, Music_TrainerBattle music_const MUSIC_WILD_BATTLE, Music_WildBattle @@ -33,6 +74,7 @@ ENDM music_const MUSIC_DEFEATED_WILD_MON, Music_DefeatedWildMon music_const MUSIC_DEFEATED_GYM_LEADER, Music_DefeatedGymLeader + ; AUDIO_3 music_const MUSIC_TITLE_SCREEN, Music_TitleScreen music_const MUSIC_CREDITS, Music_Credits music_const MUSIC_HALL_OF_FAME, Music_HallOfFame @@ -52,3 +94,176 @@ ENDM music_const MUSIC_MEET_FEMALE_TRAINER, Music_MeetFemaleTrainer music_const MUSIC_MEET_MALE_TRAINER, Music_MeetMaleTrainer + ; AUDIO_1 AUDIO_2 AUDIO_3 + music_const SFX_SNARE_1, SFX_Snare1_1 + music_const SFX_SNARE_2, SFX_Snare2_1 + music_const SFX_SNARE_3, SFX_Snare3_1 + music_const SFX_SNARE_4, SFX_Snare4_1 + music_const SFX_SNARE_5, SFX_Snare5_1 + music_const SFX_TRIANGLE_1, SFX_Triangle1_1 + music_const SFX_TRIANGLE_2, SFX_Triangle2_1 + music_const SFX_SNARE_6, SFX_Snare6_1 + music_const SFX_SNARE_7, SFX_Snare7_1 + music_const SFX_SNARE_8, SFX_Snare8_1 + music_const SFX_SNARE_9, SFX_Snare9_1 + music_const SFX_CYMBAL_1, SFX_Cymbal1_1 + music_const SFX_CYMBAL_2, SFX_Cymbal2_1 + music_const SFX_CYMBAL_3, SFX_Cymbal3_1 + music_const SFX_MUTED_SNARE_1, SFX_Muted_Snare1_1 + music_const SFX_TRIANGLE_3, SFX_Triangle3_1 + music_const SFX_MUTED_SNARE_2, SFX_Muted_Snare2_1 + music_const SFX_MUTED_SNARE_3, SFX_Muted_Snare3_1 + music_const SFX_MUTED_SNARE_4, SFX_Muted_Snare4_1 + music_const SFX_CRY_00, SFX_Cry00_1 + music_const SFX_CRY_01, SFX_Cry01_1 + music_const SFX_CRY_02, SFX_Cry02_1 + music_const SFX_CRY_03, SFX_Cry03_1 + music_const SFX_CRY_04, SFX_Cry04_1 + music_const SFX_CRY_05, SFX_Cry05_1 + music_const SFX_CRY_06, SFX_Cry06_1 + music_const SFX_CRY_07, SFX_Cry07_1 + music_const SFX_CRY_08, SFX_Cry08_1 + music_const SFX_CRY_09, SFX_Cry09_1 + music_const SFX_CRY_0A, SFX_Cry0A_1 + music_const SFX_CRY_0B, SFX_Cry0B_1 + music_const SFX_CRY_0C, SFX_Cry0C_1 + music_const SFX_CRY_0D, SFX_Cry0D_1 + music_const SFX_CRY_0E, SFX_Cry0E_1 + music_const SFX_CRY_0F, SFX_Cry0F_1 + music_const SFX_CRY_10, SFX_Cry10_1 + music_const SFX_CRY_11, SFX_Cry11_1 + music_const SFX_CRY_12, SFX_Cry12_1 + music_const SFX_CRY_13, SFX_Cry13_1 + music_const SFX_CRY_14, SFX_Cry14_1 + music_const SFX_CRY_15, SFX_Cry15_1 + music_const SFX_CRY_16, SFX_Cry16_1 + music_const SFX_CRY_17, SFX_Cry17_1 + music_const SFX_CRY_18, SFX_Cry18_1 + music_const SFX_CRY_19, SFX_Cry19_1 + music_const SFX_CRY_1A, SFX_Cry1A_1 + music_const SFX_CRY_1B, SFX_Cry1B_1 + music_const SFX_CRY_1C, SFX_Cry1C_1 + music_const SFX_CRY_1D, SFX_Cry1D_1 + music_const SFX_CRY_1E, SFX_Cry1E_1 + music_const SFX_CRY_1F, SFX_Cry1F_1 + music_const SFX_CRY_20, SFX_Cry20_1 + music_const SFX_CRY_21, SFX_Cry21_1 + music_const SFX_CRY_22, SFX_Cry22_1 + music_const SFX_CRY_23, SFX_Cry23_1 + music_const SFX_CRY_24, SFX_Cry24_1 + music_const SFX_CRY_25, SFX_Cry25_1 + + music_const SFX_GET_ITEM_2, SFX_Get_Item2_1 + music_const SFX_TINK, SFX_Tink_1 + music_const SFX_HEAL_HP, SFX_Heal_HP_1 + music_const SFX_HEAL_AILMENT, SFX_Heal_Ailment_1 + music_const SFX_START_MENU, SFX_Start_Menu_1 + music_const SFX_PRESS_AB, SFX_Press_AB_1 + + ; AUDIO_1 AUDIO_3 + music_const SFX_GET_ITEM_1, SFX_Get_Item1_1 + + music_const SFX_POKEDEX_RATING, SFX_Pokedex_Rating_1 + music_const SFX_GET_KEY_ITEM, SFX_Get_Key_Item_1 + music_const SFX_POISONED, SFX_Poisoned_1 + music_const SFX_TRADE_MACHINE, SFX_Trade_Machine_1 + music_const SFX_TURN_ON_PC, SFX_Turn_On_PC_1 + music_const SFX_TURN_OFF_PC, SFX_Turn_Off_PC_1 + music_const SFX_ENTER_PC, SFX_Enter_PC_1 + music_const SFX_SHRINK, SFX_Shrink_1 + music_const SFX_SWITCH, SFX_Switch_1 + music_const SFX_HEALING_MACHINE, SFX_Healing_Machine_1 + music_const SFX_TELEPORT_EXIT_1, SFX_Teleport_Exit1_1 + music_const SFX_TELEPORT_ENTER_1, SFX_Teleport_Enter1_1 + music_const SFX_TELEPORT_EXIT_2, SFX_Teleport_Exit2_1 + music_const SFX_LEDGE, SFX_Ledge_1 + music_const SFX_TELEPORT_ENTER_2, SFX_Teleport_Enter2_1 + music_const SFX_FLY, SFX_Fly_1 + music_const SFX_DENIED, SFX_Denied_1 + music_const SFX_ARROW_TILES, SFX_Arrow_Tiles_1 + music_const SFX_PUSH_BOULDER, SFX_Push_Boulder_1 + music_const SFX_SS_ANNE_HORN, SFX_SS_Anne_Horn_1 + music_const SFX_WITHDRAW_DEPOSIT, SFX_Withdraw_Deposit_1 + music_const SFX_CUT, SFX_Cut_1 + music_const SFX_GO_INSIDE, SFX_Go_Inside_1 + music_const SFX_SWAP, SFX_Swap_1 + music_const SFX_59, SFX_59_1 ; unused, sounds similar to SFX_SLOTS_STOP_WHEEL + music_const SFX_PURCHASE, SFX_Purchase_1 + music_const SFX_COLLISION, SFX_Collision_1 + music_const SFX_GO_OUTSIDE, SFX_Go_Outside_1 + music_const SFX_SAVE, SFX_Save_1 + + ; AUDIO_1 + music_const SFX_POKEFLUE, SFX_Pokeflute + music_const SFX_SAFARI_ZONE_PA, SFX_Safari_Zone_PA + + ; AUDIO_2 + music_const SFX_LEVEL_UP, SFX_Level_Up + + music_const SFX_BALL_TOSS, SFX_Ball_Toss + music_const SFX_BALL_POOF, SFX_Ball_Poof + music_const SFX_FAINT_THUD, SFX_Faint_Thud + music_const SFX_RUN, SFX_Run + music_const SFX_DEX_PAGE_ADDED, SFX_Dex_Page_Added + music_const SFX_CAUGHT_MON, SFX_Caught_Mon + music_const SFX_PECK, SFX_Peck + music_const SFX_FAINT_FALL, SFX_Faint_Fall + music_const SFX_BATTLE_09, SFX_Battle_09 + music_const SFX_POUND, SFX_Pound + music_const SFX_BATTLE_0B, SFX_Battle_0B + music_const SFX_BATTLE_0C, SFX_Battle_0C + music_const SFX_BATTLE_0D, SFX_Battle_0D + music_const SFX_BATTLE_0E, SFX_Battle_0E + music_const SFX_BATTLE_0F, SFX_Battle_0F + music_const SFX_DAMAGE, SFX_Damage + music_const SFX_NOT_VERY_EFFECTIVE, SFX_Not_Very_Effective + music_const SFX_BATTLE_12, SFX_Battle_12 + music_const SFX_BATTLE_13, SFX_Battle_13 + music_const SFX_BATTLE_14, SFX_Battle_14 + music_const SFX_VINE_WHIP, SFX_Vine_Whip + music_const SFX_BATTLE_16, SFX_Battle_16 ; unused? + music_const SFX_BATTLE_17, SFX_Battle_17 + music_const SFX_BATTLE_18, SFX_Battle_18 + music_const SFX_BATTLE_19, SFX_Battle_19 + music_const SFX_SUPER_EFFECTIVE, SFX_Super_Effective + music_const SFX_BATTLE_1B, SFX_Battle_1B + music_const SFX_BATTLE_1C, SFX_Battle_1C + music_const SFX_DOUBLESLAP, SFX_Doubleslap + music_const SFX_BATTLE_1E, SFX_Battle_1E + music_const SFX_HORN_DRILL, SFX_Horn_Drill + music_const SFX_BATTLE_20, SFX_Battle_20 + music_const SFX_BATTLE_21, SFX_Battle_21 + music_const SFX_BATTLE_22, SFX_Battle_22 + music_const SFX_BATTLE_23, SFX_Battle_23 + music_const SFX_BATTLE_24, SFX_Battle_24 + music_const SFX_BATTLE_25, SFX_Battle_25 + music_const SFX_BATTLE_26, SFX_Battle_26 + music_const SFX_BATTLE_27, SFX_Battle_27 + music_const SFX_BATTLE_28, SFX_Battle_28 + music_const SFX_BATTLE_29, SFX_Battle_29 + music_const SFX_BATTLE_2A, SFX_Battle_2A + music_const SFX_BATTLE_2B, SFX_Battle_2B + music_const SFX_BATTLE_2C, SFX_Battle_2C + music_const SFX_PSYBEAM, SFX_Psybeam + music_const SFX_BATTLE_2E, SFX_Battle_2E + music_const SFX_BATTLE_2F, SFX_Battle_2F + music_const SFX_PSYCHIC_M, SFX_Psychic_M + music_const SFX_BATTLE_31, SFX_Battle_31 + music_const SFX_BATTLE_32, SFX_Battle_32 + music_const SFX_BATTLE_33, SFX_Battle_33 + music_const SFX_BATTLE_34, SFX_Battle_34 + music_const SFX_BATTLE_35, SFX_Battle_35 + music_const SFX_BATTLE_36, SFX_Battle_36 + music_const SFX_SILPH_SCOPE, SFX_Silph_Scope + + ; AUDIO_3 + music_const SFX_INTRO_LUNGE, SFX_Intro_Lunge + music_const SFX_INTRO_HIP, SFX_Intro_Hip + music_const SFX_INTRO_HOP, SFX_Intro_Hop + music_const SFX_INTRO_RAISE, SFX_Intro_Raise + music_const SFX_INTRO_CRASH, SFX_Intro_Crash + music_const SFX_INTRO_WHOOSH, SFX_Intro_Whoosh + music_const SFX_SLOTS_STOP_WHEEL, SFX_Slots_Stop_Wheel + music_const SFX_SLOTS_REWARD, SFX_Slots_Reward + music_const SFX_SLOTS_NEW_SPIN, SFX_Slots_New_Spin + music_const SFX_SHOOTING_STAR, SFX_Shooting_Star 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..ca2e103a 100644..100755 --- a/constants/palette_constants.asm +++ b/constants/palette_constants.asm @@ -1,38 +1,56 @@ +SET_PAL_BATTLE_BLACK EQU $00 +SET_PAL_BATTLE EQU $01 +SET_PAL_TOWN_MAP EQU $02 +SET_PAL_STATUS_SCREEN EQU $03 +SET_PAL_POKEDEX EQU $04 +SET_PAL_SLOTS EQU $05 +SET_PAL_TITLE_SCREEN EQU $06 +SET_PAL_NIDORINO_INTRO EQU $07 +SET_PAL_GENERIC EQU $08 +SET_PAL_OVERWORLD EQU $09 +SET_PAL_PARTY_MENU EQU $0A +SET_PAL_POKEMON_WHOLE_SCREEN EQU $0B +SET_PAL_GAME_FREAK_INTRO EQU $0C +SET_PAL_TRAINER_CARD EQU $0D +UPDATE_PARTY_MENU_BLK_PACKET EQU $FC + ; super game boy palettes -PAL_ROUTE EQU $00 -PAL_PALLET EQU $01 -PAL_VIRIDIAN EQU $02 -PAL_PEWTER EQU $03 -PAL_CERULEAN EQU $04 -PAL_LAVENDER EQU $05 -PAL_VERMILION EQU $06 -PAL_CELADON EQU $07 -PAL_FUCHSIA EQU $08 -PAL_CINNABAR EQU $09 -PAL_INDIGO EQU $0A -PAL_SAFFRON EQU $0B -PAL_TOWNMAP EQU $0C -PAL_LOGO1 EQU $0D -PAL_LOGO2 EQU $0E -;PAL_0F EQU $0F -PAL_MEWMON EQU $10 -PAL_BLUEMON EQU $11 -PAL_REDMON EQU $12 -PAL_CYANMON EQU $13 -PAL_PURPLEMON EQU $14 -PAL_BROWNMON EQU $15 -PAL_GREENMON EQU $16 -PAL_PINKMON EQU $17 -PAL_YELLOWMON EQU $18 -PAL_GREYMON EQU $19 -PAL_SLOTS1 EQU $1A -PAL_SLOTS2 EQU $1B -PAL_SLOTS3 EQU $1C -PAL_SLOTS4 EQU $1D -PAL_BLACK EQU $1E -PAL_GREENBAR EQU $1F -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 +const_value = 0 + + const PAL_ROUTE ; $00 + const PAL_PALLET ; $01 + const PAL_VIRIDIAN ; $02 + const PAL_PEWTER ; $03 + const PAL_CERULEAN ; $04 + const PAL_LAVENDER ; $05 + const PAL_VERMILION ; $06 + const PAL_CELADON ; $07 + const PAL_FUCHSIA ; $08 + const PAL_CINNABAR ; $09 + const PAL_INDIGO ; $0A + const PAL_SAFFRON ; $0B + const PAL_TOWNMAP ; $0C + const PAL_LOGO1 ; $0D + const PAL_LOGO2 ; $0E + const PAL_0F ; $0F + const PAL_MEWMON ; $10 + const PAL_BLUEMON ; $11 + const PAL_REDMON ; $12 + const PAL_CYANMON ; $13 + const PAL_PURPLEMON ; $14 + const PAL_BROWNMON ; $15 + const PAL_GREENMON ; $16 + const PAL_PINKMON ; $17 + const PAL_YELLOWMON ; $18 + const PAL_GREYMON ; $19 + const PAL_SLOTS1 ; $1A + const PAL_SLOTS2 ; $1B + const PAL_SLOTS3 ; $1C + const PAL_SLOTS4 ; $1D + const PAL_BLACK ; $1E + const PAL_GREENBAR ; $1F + const PAL_YELLOWBAR ; $20 + const PAL_REDBAR ; $21 + const PAL_BADGE ; $22 + const PAL_CAVE ; $23 + const PAL_GAMEFREAK ; $24 diff --git a/constants/pokedex_constants.asm b/constants/pokedex_constants.asm index c8fa56e3..360fbb4c 100644 --- a/constants/pokedex_constants.asm +++ b/constants/pokedex_constants.asm @@ -1,153 +1,155 @@ -DEX_BULBASAUR EQU 1 -DEX_IVYSAUR EQU 2 -DEX_VENUSAUR EQU 3 -DEX_CHARMANDER EQU 4 -DEX_CHARMELEON EQU 5 -DEX_CHARIZARD EQU 6 -DEX_SQUIRTLE EQU 7 -DEX_WARTORTLE EQU 8 -DEX_BLASTOISE EQU 9 -DEX_CATERPIE EQU 10 -DEX_METAPOD EQU 11 -DEX_BUTTERFREE EQU 12 -DEX_WEEDLE EQU 13 -DEX_KAKUNA EQU 14 -DEX_BEEDRILL EQU 15 -DEX_PIDGEY EQU 16 -DEX_PIDGEOTTO EQU 17 -DEX_PIDGEOT EQU 18 -DEX_RATTATA EQU 19 -DEX_RATICATE EQU 20 -DEX_SPEAROW EQU 21 -DEX_FEAROW EQU 22 -DEX_EKANS EQU 23 -DEX_ARBOK EQU 24 -DEX_PIKACHU EQU 25 -DEX_RAICHU EQU 26 -DEX_SANDSHREW EQU 27 -DEX_SANDSLASH EQU 28 -DEX_NIDORAN_F EQU 29 -DEX_NIDORINA EQU 30 -DEX_NIDOQUEEN EQU 31 -DEX_NIDORAN_M EQU 32 -DEX_NIDORINO EQU 33 -DEX_NIDOKING EQU 34 -DEX_CLEFAIRY EQU 35 -DEX_CLEFABLE EQU 36 -DEX_VULPIX EQU 37 -DEX_NINETALES EQU 38 -DEX_JIGGLYPUFF EQU 39 -DEX_WIGGLYTUFF EQU 40 -DEX_ZUBAT EQU 41 -DEX_GOLBAT EQU 42 -DEX_ODDISH EQU 43 -DEX_GLOOM EQU 44 -DEX_VILEPLUME EQU 45 -DEX_PARAS EQU 46 -DEX_PARASECT EQU 47 -DEX_VENONAT EQU 48 -DEX_VENOMOTH EQU 49 -DEX_DIGLETT EQU 50 -DEX_DUGTRIO EQU 51 -DEX_MEOWTH EQU 52 -DEX_PERSIAN EQU 53 -DEX_PSYDUCK EQU 54 -DEX_GOLDUCK EQU 55 -DEX_MANKEY EQU 56 -DEX_PRIMEAPE EQU 57 -DEX_GROWLITHE EQU 58 -DEX_ARCANINE EQU 59 -DEX_POLIWAG EQU 60 -DEX_POLIWHIRL EQU 61 -DEX_POLIWRATH EQU 62 -DEX_ABRA EQU 63 -DEX_KADABRA EQU 64 -DEX_ALAKAZAM EQU 65 -DEX_MACHOP EQU 66 -DEX_MACHOKE EQU 67 -DEX_MACHAMP EQU 68 -DEX_BELLSPROUT EQU 69 -DEX_WEEPINBELL EQU 70 -DEX_VICTREEBEL EQU 71 -DEX_TENTACOOL EQU 72 -DEX_TENTACRUEL EQU 73 -DEX_GEODUDE EQU 74 -DEX_GRAVELER EQU 75 -DEX_GOLEM EQU 76 -DEX_PONYTA EQU 77 -DEX_RAPIDASH EQU 78 -DEX_SLOWPOKE EQU 79 -DEX_SLOWBRO EQU 80 -DEX_MAGNEMITE EQU 81 -DEX_MAGNETON EQU 82 -DEX_FARFETCH_D EQU 83 -DEX_DODUO EQU 84 -DEX_DODRIO EQU 85 -DEX_SEEL EQU 86 -DEX_DEWGONG EQU 87 -DEX_GRIMER EQU 88 -DEX_MUK EQU 89 -DEX_SHELLDER EQU 90 -DEX_CLOYSTER EQU 91 -DEX_GASTLY EQU 92 -DEX_HAUNTER EQU 93 -DEX_GENGAR EQU 94 -DEX_ONIX EQU 95 -DEX_DROWZEE EQU 96 -DEX_HYPNO EQU 97 -DEX_KRABBY EQU 98 -DEX_KINGLER EQU 99 -DEX_VOLTORB EQU 100 -DEX_ELECTRODE EQU 101 -DEX_EXEGGCUTE EQU 102 -DEX_EXEGGUTOR EQU 103 -DEX_CUBONE EQU 104 -DEX_MAROWAK EQU 105 -DEX_HITMONLEE EQU 106 -DEX_HITMONCHAN EQU 107 -DEX_LICKITUNG EQU 108 -DEX_KOFFING EQU 109 -DEX_WEEZING EQU 110 -DEX_RHYHORN EQU 111 -DEX_RHYDON EQU 112 -DEX_CHANSEY EQU 113 -DEX_TANGELA EQU 114 -DEX_KANGASKHAN EQU 115 -DEX_HORSEA EQU 116 -DEX_SEADRA EQU 117 -DEX_GOLDEEN EQU 118 -DEX_SEAKING EQU 119 -DEX_STARYU EQU 120 -DEX_STARMIE EQU 121 -DEX_MR_MIME EQU 122 -DEX_SCYTHER EQU 123 -DEX_JYNX EQU 124 -DEX_ELECTABUZZ EQU 125 -DEX_MAGMAR EQU 126 -DEX_PINSIR EQU 127 -DEX_TAUROS EQU 128 -DEX_MAGIKARP EQU 129 -DEX_GYARADOS EQU 130 -DEX_LAPRAS EQU 131 -DEX_DITTO EQU 132 -DEX_EEVEE EQU 133 -DEX_VAPOREON EQU 134 -DEX_JOLTEON EQU 135 -DEX_FLAREON EQU 136 -DEX_PORYGON EQU 137 -DEX_OMANYTE EQU 138 -DEX_OMASTAR EQU 139 -DEX_KABUTO EQU 140 -DEX_KABUTOPS EQU 141 -DEX_AERODACTYL EQU 142 -DEX_SNORLAX EQU 143 -DEX_ARTICUNO EQU 144 -DEX_ZAPDOS EQU 145 -DEX_MOLTRES EQU 146 -DEX_DRATINI EQU 147 -DEX_DRAGONAIR EQU 148 -DEX_DRAGONITE EQU 149 -DEX_MEWTWO EQU 150 -DEX_MEW EQU 151 +const_value = 1 + + const DEX_BULBASAUR ; 1 + const DEX_IVYSAUR ; 2 + const DEX_VENUSAUR ; 3 + const DEX_CHARMANDER ; 4 + const DEX_CHARMELEON ; 5 + const DEX_CHARIZARD ; 6 + const DEX_SQUIRTLE ; 7 + const DEX_WARTORTLE ; 8 + const DEX_BLASTOISE ; 9 + const DEX_CATERPIE ; 10 + const DEX_METAPOD ; 11 + const DEX_BUTTERFREE ; 12 + const DEX_WEEDLE ; 13 + const DEX_KAKUNA ; 14 + const DEX_BEEDRILL ; 15 + const DEX_PIDGEY ; 16 + const DEX_PIDGEOTTO ; 17 + const DEX_PIDGEOT ; 18 + const DEX_RATTATA ; 19 + const DEX_RATICATE ; 20 + const DEX_SPEAROW ; 21 + const DEX_FEAROW ; 22 + const DEX_EKANS ; 23 + const DEX_ARBOK ; 24 + const DEX_PIKACHU ; 25 + const DEX_RAICHU ; 26 + const DEX_SANDSHREW ; 27 + const DEX_SANDSLASH ; 28 + const DEX_NIDORAN_F ; 29 + const DEX_NIDORINA ; 30 + const DEX_NIDOQUEEN ; 31 + const DEX_NIDORAN_M ; 32 + const DEX_NIDORINO ; 33 + const DEX_NIDOKING ; 34 + const DEX_CLEFAIRY ; 35 + const DEX_CLEFABLE ; 36 + const DEX_VULPIX ; 37 + const DEX_NINETALES ; 38 + const DEX_JIGGLYPUFF ; 39 + const DEX_WIGGLYTUFF ; 40 + const DEX_ZUBAT ; 41 + const DEX_GOLBAT ; 42 + const DEX_ODDISH ; 43 + const DEX_GLOOM ; 44 + const DEX_VILEPLUME ; 45 + const DEX_PARAS ; 46 + const DEX_PARASECT ; 47 + const DEX_VENONAT ; 48 + const DEX_VENOMOTH ; 49 + const DEX_DIGLETT ; 50 + const DEX_DUGTRIO ; 51 + const DEX_MEOWTH ; 52 + const DEX_PERSIAN ; 53 + const DEX_PSYDUCK ; 54 + const DEX_GOLDUCK ; 55 + const DEX_MANKEY ; 56 + const DEX_PRIMEAPE ; 57 + const DEX_GROWLITHE ; 58 + const DEX_ARCANINE ; 59 + const DEX_POLIWAG ; 60 + const DEX_POLIWHIRL ; 61 + const DEX_POLIWRATH ; 62 + const DEX_ABRA ; 63 + const DEX_KADABRA ; 64 + const DEX_ALAKAZAM ; 65 + const DEX_MACHOP ; 66 + const DEX_MACHOKE ; 67 + const DEX_MACHAMP ; 68 + const DEX_BELLSPROUT ; 69 + const DEX_WEEPINBELL ; 70 + const DEX_VICTREEBEL ; 71 + const DEX_TENTACOOL ; 72 + const DEX_TENTACRUEL ; 73 + const DEX_GEODUDE ; 74 + const DEX_GRAVELER ; 75 + const DEX_GOLEM ; 76 + const DEX_PONYTA ; 77 + const DEX_RAPIDASH ; 78 + const DEX_SLOWPOKE ; 79 + const DEX_SLOWBRO ; 80 + const DEX_MAGNEMITE ; 81 + const DEX_MAGNETON ; 82 + const DEX_FARFETCHD ; 83 + const DEX_DODUO ; 84 + const DEX_DODRIO ; 85 + const DEX_SEEL ; 86 + const DEX_DEWGONG ; 87 + const DEX_GRIMER ; 88 + const DEX_MUK ; 89 + const DEX_SHELLDER ; 90 + const DEX_CLOYSTER ; 91 + const DEX_GASTLY ; 92 + const DEX_HAUNTER ; 93 + const DEX_GENGAR ; 94 + const DEX_ONIX ; 95 + const DEX_DROWZEE ; 96 + const DEX_HYPNO ; 97 + const DEX_KRABBY ; 98 + const DEX_KINGLER ; 99 + const DEX_VOLTORB ; 100 + const DEX_ELECTRODE ; 101 + const DEX_EXEGGCUTE ; 102 + const DEX_EXEGGUTOR ; 103 + const DEX_CUBONE ; 104 + const DEX_MAROWAK ; 105 + const DEX_HITMONLEE ; 106 + const DEX_HITMONCHAN ; 107 + const DEX_LICKITUNG ; 108 + const DEX_KOFFING ; 109 + const DEX_WEEZING ; 110 + const DEX_RHYHORN ; 111 + const DEX_RHYDON ; 112 + const DEX_CHANSEY ; 113 + const DEX_TANGELA ; 114 + const DEX_KANGASKHAN ; 115 + const DEX_HORSEA ; 116 + const DEX_SEADRA ; 117 + const DEX_GOLDEEN ; 118 + const DEX_SEAKING ; 119 + const DEX_STARYU ; 120 + const DEX_STARMIE ; 121 + const DEX_MR_MIME ; 122 + const DEX_SCYTHER ; 123 + const DEX_JYNX ; 124 + const DEX_ELECTABUZZ ; 125 + const DEX_MAGMAR ; 126 + const DEX_PINSIR ; 127 + const DEX_TAUROS ; 128 + const DEX_MAGIKARP ; 129 + const DEX_GYARADOS ; 130 + const DEX_LAPRAS ; 131 + const DEX_DITTO ; 132 + const DEX_EEVEE ; 133 + const DEX_VAPOREON ; 134 + const DEX_JOLTEON ; 135 + const DEX_FLAREON ; 136 + const DEX_PORYGON ; 137 + const DEX_OMANYTE ; 138 + const DEX_OMASTAR ; 139 + const DEX_KABUTO ; 140 + const DEX_KABUTOPS ; 141 + const DEX_AERODACTYL ; 142 + const DEX_SNORLAX ; 143 + const DEX_ARTICUNO ; 144 + const DEX_ZAPDOS ; 145 + const DEX_MOLTRES ; 146 + const DEX_DRATINI ; 147 + const DEX_DRAGONAIR ; 148 + const DEX_DRAGONITE ; 149 + const DEX_MEWTWO ; 150 + const DEX_MEW ; 151 NUM_POKEMON EQU 151 diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm index 2ed03338..96d44ef5 100644 --- a/constants/pokemon_constants.asm +++ b/constants/pokemon_constants.asm @@ -1,190 +1,192 @@ -RHYDON EQU $01 -KANGASKHAN EQU $02 -NIDORAN_M EQU $03 -CLEFAIRY EQU $04 -SPEAROW EQU $05 -VOLTORB EQU $06 -NIDOKING EQU $07 -SLOWBRO EQU $08 -IVYSAUR EQU $09 -EXEGGUTOR EQU $0A -LICKITUNG EQU $0B -EXEGGCUTE EQU $0C -GRIMER EQU $0D -GENGAR EQU $0E -NIDORAN_F EQU $0F -NIDOQUEEN EQU $10 -CUBONE EQU $11 -RHYHORN EQU $12 -LAPRAS EQU $13 -ARCANINE EQU $14 -MEW EQU $15 -GYARADOS EQU $16 -SHELLDER EQU $17 -TENTACOOL EQU $18 -GASTLY EQU $19 -SCYTHER EQU $1A -STARYU EQU $1B -BLASTOISE EQU $1C -PINSIR EQU $1D -TANGELA EQU $1E - - -GROWLITHE EQU $21 -ONIX EQU $22 -FEAROW EQU $23 -PIDGEY EQU $24 -SLOWPOKE EQU $25 -KADABRA EQU $26 -GRAVELER EQU $27 -CHANSEY EQU $28 -MACHOKE EQU $29 -MR_MIME EQU $2A -HITMONLEE EQU $2B -HITMONCHAN EQU $2C -ARBOK EQU $2D -PARASECT EQU $2E -PSYDUCK EQU $2F -DROWZEE EQU $30 -GOLEM EQU $31 - -MAGMAR EQU $33 - -ELECTABUZZ EQU $35 -MAGNETON EQU $36 -KOFFING EQU $37 - -MANKEY EQU $39 -SEEL EQU $3A -DIGLETT EQU $3B -TAUROS EQU $3C - - - -FARFETCH_D EQU $40 -VENONAT EQU $41 -DRAGONITE EQU $42 - - - -DODUO EQU $46 -POLIWAG EQU $47 -JYNX EQU $48 -MOLTRES EQU $49 -ARTICUNO EQU $4A -ZAPDOS EQU $4B -DITTO EQU $4C -MEOWTH EQU $4D -KRABBY EQU $4E - - - -VULPIX EQU $52 -NINETALES EQU $53 -PIKACHU EQU $54 -RAICHU EQU $55 - - -DRATINI EQU $58 -DRAGONAIR EQU $59 -KABUTO EQU $5A -KABUTOPS EQU $5B -HORSEA EQU $5C -SEADRA EQU $5D - - -SANDSHREW EQU $60 -SANDSLASH EQU $61 -OMANYTE EQU $62 -OMASTAR EQU $63 -JIGGLYPUFF EQU $64 -WIGGLYTUFF EQU $65 -EEVEE EQU $66 -FLAREON EQU $67 -JOLTEON EQU $68 -VAPOREON EQU $69 -MACHOP EQU $6A -ZUBAT EQU $6B -EKANS EQU $6C -PARAS EQU $6D -POLIWHIRL EQU $6E -POLIWRATH EQU $6F -WEEDLE EQU $70 -KAKUNA EQU $71 -BEEDRILL EQU $72 - -DODRIO EQU $74 -PRIMEAPE EQU $75 -DUGTRIO EQU $76 -VENOMOTH EQU $77 -DEWGONG EQU $78 - - -CATERPIE EQU $7B -METAPOD EQU $7C -BUTTERFREE EQU $7D -MACHAMP EQU $7E - -GOLDUCK EQU $80 -HYPNO EQU $81 -GOLBAT EQU $82 -MEWTWO EQU $83 -SNORLAX EQU $84 -MAGIKARP EQU $85 - - -MUK EQU $88 - -KINGLER EQU $8A -CLOYSTER EQU $8B - -ELECTRODE EQU $8D -CLEFABLE EQU $8E -WEEZING EQU $8F -PERSIAN EQU $90 -MAROWAK EQU $91 - -HAUNTER EQU $93 -ABRA EQU $94 -ALAKAZAM EQU $95 -PIDGEOTTO EQU $96 -PIDGEOT EQU $97 -STARMIE EQU $98 -BULBASAUR EQU $99 -VENUSAUR EQU $9A -TENTACRUEL EQU $9B - -GOLDEEN EQU $9D -SEAKING EQU $9E - - - - -PONYTA EQU $A3 -RAPIDASH EQU $A4 -RATTATA EQU $A5 -RATICATE EQU $A6 -NIDORINO EQU $A7 -NIDORINA EQU $A8 -GEODUDE EQU $A9 -PORYGON EQU $AA -AERODACTYL EQU $AB - -MAGNEMITE EQU $AD - - -CHARMANDER EQU $B0 -SQUIRTLE EQU $B1 -CHARMELEON EQU $B2 -WARTORTLE EQU $B3 -CHARIZARD EQU $B4 - -FOSSIL_KABUTOPS EQU $B6 -FOSSIL_AERODACTYL EQU $B7 -MON_GHOST EQU $B8 -ODDISH EQU $B9 -GLOOM EQU $BA -VILEPLUME EQU $BB -BELLSPROUT EQU $BC -WEEPINBELL EQU $BD -VICTREEBEL EQU $BE +const_value = 1 + + const RHYDON ; $01 + const KANGASKHAN ; $02 + const NIDORAN_M ; $03 + const CLEFAIRY ; $04 + const SPEAROW ; $05 + const VOLTORB ; $06 + const NIDOKING ; $07 + const SLOWBRO ; $08 + const IVYSAUR ; $09 + const EXEGGUTOR ; $0A + const LICKITUNG ; $0B + const EXEGGCUTE ; $0C + const GRIMER ; $0D + const GENGAR ; $0E + const NIDORAN_F ; $0F + const NIDOQUEEN ; $10 + const CUBONE ; $11 + const RHYHORN ; $12 + const LAPRAS ; $13 + const ARCANINE ; $14 + const MEW ; $15 + const GYARADOS ; $16 + const SHELLDER ; $17 + const TENTACOOL ; $18 + const GASTLY ; $19 + const SCYTHER ; $1A + const STARYU ; $1B + const BLASTOISE ; $1C + const PINSIR ; $1D + const TANGELA ; $1E + const MISSINGNO_1F ; $1F + const MISSINGNO_20 ; $20 + const GROWLITHE ; $21 + const ONIX ; $22 + const FEAROW ; $23 + const PIDGEY ; $24 + const SLOWPOKE ; $25 + const KADABRA ; $26 + const GRAVELER ; $27 + const CHANSEY ; $28 + const MACHOKE ; $29 + const MR_MIME ; $2A + const HITMONLEE ; $2B + const HITMONCHAN ; $2C + const ARBOK ; $2D + const PARASECT ; $2E + const PSYDUCK ; $2F + const DROWZEE ; $30 + const GOLEM ; $31 + const MISSINGNO_32 ; $32 + const MAGMAR ; $33 + const MISSINGNO_34 ; $34 + const ELECTABUZZ ; $35 + const MAGNETON ; $36 + const KOFFING ; $37 + const MISSINGNO_38 ; $38 + const MANKEY ; $39 + const SEEL ; $3A + const DIGLETT ; $3B + const TAUROS ; $3C + const MISSINGNO_3D ; $3D + const MISSINGNO_3E ; $3E + const MISSINGNO_3F ; $3F + const FARFETCHD ; $40 + const VENONAT ; $41 + const DRAGONITE ; $42 + const MISSINGNO_43 ; $43 + const MISSINGNO_44 ; $44 + const MISSINGNO_45 ; $45 + const DODUO ; $46 + const POLIWAG ; $47 + const JYNX ; $48 + const MOLTRES ; $49 + const ARTICUNO ; $4A + const ZAPDOS ; $4B + const DITTO ; $4C + const MEOWTH ; $4D + const KRABBY ; $4E + const MISSINGNO_4F ; $4F + const MISSINGNO_50 ; $50 + const MISSINGNO_51 ; $51 + const VULPIX ; $52 + const NINETALES ; $53 + const PIKACHU ; $54 + const RAICHU ; $55 + const MISSINGNO_56 ; $56 + const MISSINGNO_57 ; $57 + const DRATINI ; $58 + const DRAGONAIR ; $59 + const KABUTO ; $5A + const KABUTOPS ; $5B + const HORSEA ; $5C + const SEADRA ; $5D + const MISSINGNO_5E ; $5E + const MISSINGNO_5F ; $5F + const SANDSHREW ; $60 + const SANDSLASH ; $61 + const OMANYTE ; $62 + const OMASTAR ; $63 + const JIGGLYPUFF ; $64 + const WIGGLYTUFF ; $65 + const EEVEE ; $66 + const FLAREON ; $67 + const JOLTEON ; $68 + const VAPOREON ; $69 + const MACHOP ; $6A + const ZUBAT ; $6B + const EKANS ; $6C + const PARAS ; $6D + const POLIWHIRL ; $6E + const POLIWRATH ; $6F + const WEEDLE ; $70 + const KAKUNA ; $71 + const BEEDRILL ; $72 + const MISSINGNO_73 ; $73 + const DODRIO ; $74 + const PRIMEAPE ; $75 + const DUGTRIO ; $76 + const VENOMOTH ; $77 + const DEWGONG ; $78 + const MISSINGNO_79 ; $79 + const MISSINGNO_7A ; $7A + const CATERPIE ; $7B + const METAPOD ; $7C + const BUTTERFREE ; $7D + const MACHAMP ; $7E + const MISSINGNO_7F ; $7F + const GOLDUCK ; $80 + const HYPNO ; $81 + const GOLBAT ; $82 + const MEWTWO ; $83 + const SNORLAX ; $84 + const MAGIKARP ; $85 + const MISSINGNO_86 ; $86 + const MISSINGNO_87 ; $87 + const MUK ; $88 + const MISSINGNO_8A ; $8A + const KINGLER ; $8A + const CLOYSTER ; $8B + const MISSINGNO_8C ; $8C + const ELECTRODE ; $8D + const CLEFABLE ; $8E + const WEEZING ; $8F + const PERSIAN ; $90 + const MAROWAK ; $91 + const MISSINGNO_92 ; $92 + const HAUNTER ; $93 + const ABRA ; $94 + const ALAKAZAM ; $95 + const PIDGEOTTO ; $96 + const PIDGEOT ; $97 + const STARMIE ; $98 + const BULBASAUR ; $99 + const VENUSAUR ; $9A + const TENTACRUEL ; $9B + const MISSINGNO_9C ; $9C + const GOLDEEN ; $9D + const SEAKING ; $9E + const MISSINGNO_9F ; $9F + const MISSINGNO_A0 ; $A0 + const MISSINGNO_A1 ; $A1 + const MISSINGNO_A2 ; $A2 + const PONYTA ; $A3 + const RAPIDASH ; $A4 + const RATTATA ; $A5 + const RATICATE ; $A6 + const NIDORINO ; $A7 + const NIDORINA ; $A8 + const GEODUDE ; $A9 + const PORYGON ; $AA + const AERODACTYL ; $AB + const MISSINGNO_AC ; $AC + const MAGNEMITE ; $AD + const MISSINGNO_AE ; $AE + const MISSINGNO_AF ; $AF + const CHARMANDER ; $B0 + const SQUIRTLE ; $B1 + const CHARMELEON ; $B2 + const WARTORTLE ; $B3 + const CHARIZARD ; $B4 + const MISSINGNO_B5 ; $B5 + const FOSSIL_KABUTOPS ; $B6 + const FOSSIL_AERODACTYL ; $B7 + const MON_GHOST ; $B8 + const ODDISH ; $B9 + const GLOOM ; $BA + const VILEPLUME ; $BB + const BELLSPROUT ; $BC + const WEEPINBELL ; $BD + const VICTREEBEL ; $BE diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm index b3ae8e21..11973648 100755 --- a/constants/sprite_constants.asm +++ b/constants/sprite_constants.asm @@ -1,97 +1,101 @@ -; 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 +const_value = 0 + + const SPRITE_MON ; $0 + const SPRITE_BALL_M ; $1 + const SPRITE_HELIX ; $2 + const SPRITE_FAIRY ; $3 + const SPRITE_BIRD_M ; $4 + const SPRITE_WATER ; $5 + const SPRITE_BUG ; $6 + const SPRITE_GRASS ; $7 + const SPRITE_SNAKE ; $8 + const SPRITE_QUADRUPED ; $9 + +; overworld sprites +const_value = 1 + + const SPRITE_RED ; $01 + const SPRITE_BLUE ; $02 + const SPRITE_OAK ; $03 + const SPRITE_BUG_CATCHER ; $04 + const SPRITE_SLOWBRO ; $05 + const SPRITE_LASS ; $06 + const SPRITE_BLACK_HAIR_BOY_1 ; $07 + const SPRITE_LITTLE_GIRL ; $08 + const SPRITE_BIRD ; $09 + const SPRITE_FAT_BALD_GUY ; $0a + const SPRITE_GAMBLER ; $0b + const SPRITE_BLACK_HAIR_BOY_2 ; $0c + const SPRITE_GIRL ; $0d + const SPRITE_HIKER ; $0e + const SPRITE_FOULARD_WOMAN ; $0f + const SPRITE_GENTLEMAN ; $10 + const SPRITE_DAISY ; $11 + const SPRITE_BIKER ; $12 + const SPRITE_SAILOR ; $13 + const SPRITE_COOK ; $14 + const SPRITE_BIKE_SHOP_GUY ; $15 + const SPRITE_MR_FUJI ; $16 + const SPRITE_GIOVANNI ; $17 + const SPRITE_ROCKET ; $18 + const SPRITE_MEDIUM ; $19 + const SPRITE_WAITER ; $1a + const SPRITE_ERIKA ; $1b + const SPRITE_MOM_GEISHA ; $1c + const SPRITE_BRUNETTE_GIRL ; $1d + const SPRITE_LANCE ; $1e + const SPRITE_OAK_SCIENTIST_AIDE ; $1f + const SPRITE_OAK_AIDE ; $20 + const SPRITE_ROCKER ; $21 + const SPRITE_SWIMMER ; $22 + const SPRITE_WHITE_PLAYER ; $23 + const SPRITE_GYM_HELPER ; $24 + const SPRITE_OLD_PERSON ; $25 + const SPRITE_MART_GUY ; $26 + const SPRITE_FISHER ; $27 + const SPRITE_OLD_MEDIUM_WOMAN ; $28 + const SPRITE_NURSE ; $29 + const SPRITE_CABLE_CLUB_WOMAN ; $2a + const SPRITE_MR_MASTERBALL ; $2b + const SPRITE_LAPRAS_GIVER ; $2c + const SPRITE_WARDEN ; $2d + const SPRITE_SS_CAPTAIN ; $2e + const SPRITE_FISHER2 ; $2f + const SPRITE_BLACKBELT ; $30 + const SPRITE_GUARD ; $31 + const SPRITE_COP_GUARD ; $32 + const SPRITE_MOM ; $33 + const SPRITE_BALDING_GUY ; $34 + const SPRITE_YOUNG_BOY ; $35 + const SPRITE_GAMEBOY_KID ; $36 + const SPRITE_GAMEBOY_KID_COPY ; $37 + const SPRITE_CLEFAIRY ; $38 + const SPRITE_AGATHA ; $39 + const SPRITE_BRUNO ; $3a + const SPRITE_LORELEI ; $3b + const SPRITE_SEEL ; $3c + const SPRITE_BALL ; $3d + const SPRITE_OMANYTE ; $3e + const SPRITE_BOULDER ; $3f + const SPRITE_PAPER_SHEET ; $40 + const SPRITE_BOOK_MAP_DEX ; $41 + const SPRITE_CLIPBOARD ; $42 + const SPRITE_SNORLAX ; $43 + const SPRITE_OLD_AMBER_COPY ; $44 + const SPRITE_OLD_AMBER ; $45 + const SPRITE_LYING_OLD_MAN_UNUSED_1 ; $46 + const SPRITE_LYING_OLD_MAN_UNUSED_2 ; $47 + const SPRITE_LYING_OLD_MAN ; $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/text_constants.asm b/constants/text_constants.asm new file mode 100644 index 00000000..3cddce26 --- /dev/null +++ b/constants/text_constants.asm @@ -0,0 +1,14 @@ +; special text IDs +TEXT_MON_FAINTED EQU $d0 +TEXT_BLACKED_OUT EQU $d1 +TEXT_REPEL_WORE_OFF EQU $d2 +TEXT_SAFARI_GAME_OVER EQU $d3 + +; PrintNumber +BIT_MONEY_SIGN EQU 5 +BIT_LEFT_ALIGN EQU 6 +BIT_LEADING_ZEROES EQU 7 + +MONEY_SIGN EQU (1 << BIT_MONEY_SIGN) +LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN) +LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES) diff --git a/constants/tilesets.asm b/constants/tilesets.asm index bf15f24e..f10e4d92 100644 --- a/constants/tilesets.asm +++ b/constants/tilesets.asm @@ -1,27 +1,26 @@ -OVERWORLD EQU 0 -REDS_HOUSE_1 EQU 1 -MART EQU 2 -FOREST EQU 3 -REDS_HOUSE_2 EQU 4 -DOJO EQU 5 -POKECENTER EQU 6 -GYM EQU 7 -HOUSE EQU 8 -FOREST_GATE EQU 9 -MUSEUM EQU 10 -UNDERGROUND EQU 11 -GATE EQU 12 -SHIP EQU 13 -SHIP_PORT EQU 14 -CEMETERY EQU 15 -INTERIOR EQU 16 -CAVERN EQU 17 -LOBBY EQU 18 -MANSION EQU 19 -LAB EQU 20 -CLUB EQU 21 -FACILITY EQU 22 -PLATEAU EQU 23 -IF DEF(_OPTION_BEACH_HOUSE) -BEACH_HOUSE_TILESET EQU 24 -ENDC +const_value = 0 + + const OVERWORLD ; 0 + const REDS_HOUSE_1 ; 1 + const MART ; 2 + const FOREST ; 3 + const REDS_HOUSE_2 ; 4 + const DOJO ; 5 + const POKECENTER ; 6 + const GYM ; 7 + const HOUSE ; 8 + const FOREST_GATE ; 9 + const MUSEUM ; 10 + const UNDERGROUND ; 11 + const GATE ; 12 + const SHIP ; 13 + const SHIP_PORT ; 14 + const CEMETERY ; 15 + const INTERIOR ; 16 + const CAVERN ; 17 + const LOBBY ; 18 + const MANSION ; 19 + const LAB ; 20 + const CLUB ; 21 + const FACILITY ; 22 + const PLATEAU ; 23 diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm index 37a51376..ee890282 100644..100755 --- a/constants/trainer_constants.asm +++ b/constants/trainer_constants.asm @@ -1,48 +1,55 @@ -; sometimes it's necessary to add $C8 to these values -YOUNGSTER EQU $01 -BUG_CATCHER EQU $02 -LASS EQU $03 -SAILOR EQU $04 -JR__TRAINER_M EQU $05 -JR__TRAINER_F EQU $06 -POKEMANIAC EQU $07 -SUPER_NERD EQU $08 -HIKER EQU $09 -BIKER EQU $0A -BURGLAR EQU $0B -ENGINEER EQU $0C -JUGGLER_X EQU $0D -FISHER EQU $0E -SWIMMER EQU $0F -CUE_BALL EQU $10 -GAMBLER EQU $11 -BEAUTY EQU $12 -PSYCHIC_TR EQU $13 -ROCKER EQU $14 -JUGGLER EQU $15 -TAMER EQU $16 -BIRD_KEEPER EQU $17 -BLACKBELT EQU $18 -SONY1 EQU $19 -PROF_OAK EQU $1A -CHIEF EQU $1B -SCIENTIST EQU $1C -GIOVANNI EQU $1D -ROCKET EQU $1E -COOLTRAINER_M EQU $1F -COOLTRAINER_F EQU $20 -BRUNO EQU $21 -BROCK EQU $22 -MISTY EQU $23 -LT__SURGE EQU $24 -ERIKA EQU $25 -KOGA EQU $26 -BLAINE EQU $27 -SABRINA EQU $28 -GENTLEMAN EQU $29 -SONY2 EQU $2A -SONY3 EQU $2B -LORELEI EQU $2C -CHANNELER EQU $2D -AGATHA EQU $2E -LANCE EQU $2F
\ No newline at end of file +trainer_const: MACRO +\1 EQU const_value +OPP_\1 EQU const_value + 200 +const_value = const_value + 1 +ENDM + +const_value = 1 + + trainer_const YOUNGSTER ; $01 + trainer_const BUG_CATCHER ; $02 + trainer_const LASS ; $03 + trainer_const SAILOR ; $04 + trainer_const JR_TRAINER_M ; $05 + trainer_const JR_TRAINER_F ; $06 + trainer_const POKEMANIAC ; $07 + trainer_const SUPER_NERD ; $08 + trainer_const HIKER ; $09 + trainer_const BIKER ; $0A + trainer_const BURGLAR ; $0B + trainer_const ENGINEER ; $0C + trainer_const JUGGLER_X ; $0D + trainer_const FISHER ; $0E + trainer_const SWIMMER ; $0F + trainer_const CUE_BALL ; $10 + trainer_const GAMBLER ; $11 + trainer_const BEAUTY ; $12 + trainer_const PSYCHIC_TR ; $13 + trainer_const ROCKER ; $14 + trainer_const JUGGLER ; $15 + trainer_const TAMER ; $16 + trainer_const BIRD_KEEPER ; $17 + trainer_const BLACKBELT ; $18 + trainer_const SONY1 ; $19 + trainer_const PROF_OAK ; $1A + trainer_const CHIEF ; $1B + trainer_const SCIENTIST ; $1C + trainer_const GIOVANNI ; $1D + trainer_const ROCKET ; $1E + trainer_const COOLTRAINER_M ; $1F + trainer_const COOLTRAINER_F ; $20 + trainer_const BRUNO ; $21 + trainer_const BROCK ; $22 + trainer_const MISTY ; $23 + trainer_const LT_SURGE ; $24 + trainer_const ERIKA ; $25 + trainer_const KOGA ; $26 + trainer_const BLAINE ; $27 + trainer_const SABRINA ; $28 + trainer_const GENTLEMAN ; $29 + trainer_const SONY2 ; $2A + trainer_const SONY3 ; $2B + trainer_const LORELEI ; $2C + trainer_const CHANNELER ; $2D + trainer_const AGATHA ; $2E + trainer_const LANCE ; $2F diff --git a/constants/type_constants.asm b/constants/type_constants.asm index 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/constants/wram_constants.asm b/constants/wram_constants.asm deleted file mode 100644 index 067c8707..00000000 --- a/constants/wram_constants.asm +++ /dev/null @@ -1,10 +0,0 @@ - -SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile) - -; Overload W_GRASSMONS -wSerialEnemyDataBlock EQU $d893 ; W_GRASSMONS + 11 - -; Overload enemy party data -W_WATERRATE EQU $d8a4 ; wEnemyMon1Species -W_WATERMONS EQU $d8a5 ; wEnemyMon1Species + 1 - diff --git a/data/animations.asm b/data/animations.asm index a9d22e54..8c388afd 100755 --- a/data/animations.asm +++ b/data/animations.asm @@ -1,4 +1,4 @@ -AttackAnimationPointers: ; 7a07d (1e:607d) +AttackAnimationPointers: dw PoundAnim dw KarateChopAnim dw DoubleSlapAnim @@ -209,156 +209,156 @@ AttackAnimationPointers: ; 7a07d (1e:607d) ; if first byte >= $D8 ; db special_effect_id, sound_id ; $FF terminated -ZigZagScreenAnim: ; 7a213 (1e:6213) +ZigZagScreenAnim: db SE_WAVY_SCREEN, $FF db $FF -PoundAnim: ; 7a216 (1e:6216) -StruggleAnim: ; 7a216 (1e:6216) +PoundAnim: +StruggleAnim: db $08,$00,$01 db $FF -KarateChopAnim: ; 7a21a (1e:621a) +KarateChopAnim: db $08,$01,$03 db $FF -DoubleSlapAnim: ; 7a21e (1e:621e) +DoubleSlapAnim: db $05,$02,$01 db $05,$02,$01 db $FF -CometPunchAnim: ; 7a225 (1e:6225) +CometPunchAnim: db $04,$03,$02 db $04,$03,$02 db $FF -MegaPunchAnim: ; 7a22c (1e:622c) +MegaPunchAnim: db $46,$04,$04 db $FF -PayDayAnim: ; 7a230 (1e:6230) +PayDayAnim: db $08,$00,$01 db $04,$05,$52 db $FF -FirePunchAnim: ; 7a237 (1e:6237) +FirePunchAnim: db $06,$06,$02 db $46,$FF,$11 db $FF -IcePunchAnim: ; 7a23e (1e:623e) +IcePunchAnim: db $06,$07,$02 db $10,$FF,$2F db $FF -ThunderPunchAnim: ; 7a245 (1e:6245) +ThunderPunchAnim: db $06,$08,$02 db SE_DARK_SCREEN_PALETTE, $FF db $46,$FF,$2B db SE_RESET_SCREEN_PALETTE, $FF db $FF -ScratchAnim: ; 7a250 (1e:6250) +ScratchAnim: db $06,$09,$0F db $FF -VicegripAnim: ; 7a254 (1e:6254) +VicegripAnim: db $08,$0A,$2A db $FF -GuillotineAnim: ; 7a258 (1e:6258) +GuillotineAnim: db $06,$0B,$2A db $FF -RazorWindAnim: ; 7a25c (1e:625c) +RazorWindAnim: db $04,$0C,$16 db $FF -SwordsDanceAnim: ; 7a260 (1e:6260) +SwordsDanceAnim: db $46,$0D,$18 db $46,$0D,$18 db $46,$0D,$18 db $FF -CutAnim: ; 7a26a (1e:626a) +CutAnim: db SE_DARK_SCREEN_FLASH, $0E db $04,$FF,$16 db $FF -GustAnim: ; 7a270 (1e:6270) +GustAnim: db $46,$0F,$10 db $06,$FF,$02 db $FF -WingAttackAnim: ; 7a277 (1e:6277) +WingAttackAnim: db $46,$10,$04 db $FF -WhirlwindAnim: ; 7a27b (1e:627b) +WhirlwindAnim: db $46,$11,$10 - db SE_SLIDE_ENEMY_MON_OUT, $FF + db SE_SLIDE_ENEMY_MON_OFF, $FF db $FF -FlyAnim: ; 7a281 (1e:6281) +FlyAnim: db $46,$12,$04 db SE_SHOW_MON_PIC, $FF db $FF -BindAnim: ; 7a287 (1e:6287) +BindAnim: db $04,$13,$23 db $04,$13,$23 db $FF -SlamAnim: ; 7a28e (1e:628e) +SlamAnim: db $06,$14,$02 db $FF -VineWhipAnim: ; 7a292 (1e:6292) +VineWhipAnim: db $01,$15,$16 db $08,$FF,$01 db $FF -StompAnim: ; 7a299 (1e:6299) +StompAnim: db $48,$16,$05 db $FF -DoubleKickAnim: ; 7a29d (1e:629d) +DoubleKickAnim: db $08,$17,$01 db $08,$17,$01 db $FF -MegaKickAnim: ; 7a2a4 (1e:62a4) +MegaKickAnim: db $46,$18,$04 db $FF -JumpKickAnim: ; 7a2a8 (1e:62a8) +JumpKickAnim: db $46,$19,$04 db $FF -RollingKickAnim: ; 7a2ac (1e:62ac) +RollingKickAnim: db SE_DARK_SCREEN_FLASH, $1A db $46,$FF,$04 db $FF -SandAttackAnim: ; 7a2b2 (1e:62b2) +SandAttackAnim: db $46,$1B,$28 db $FF -HeatButtAnim: ; 7a2b6 (1e:62b6) +HeatButtAnim: db $46,$1C,$05 db $FF -HornAttackAnim: ; 7a2ba (1e:62ba) +HornAttackAnim: db $06,$1D,$45 db $46,$FF,$05 db $FF -FuryAttackAnim: ; 7a2c1 (1e:62c1) +FuryAttackAnim: db $02,$1E,$46 db $02,$FF,$46 db $FF -HornDrillAnim: ; 7a2c8 (1e:62c8) +HornDrillAnim: db $42,$1F,$05 db $42,$FF,$05 db $42,$FF,$05 @@ -366,35 +366,35 @@ HornDrillAnim: ; 7a2c8 (1e:62c8) db $42,$FF,$05 db $FF -TackleAnim: ; 7a2d8 (1e:62d8) +TackleAnim: db SE_MOVE_MON_HORIZONTALLY, $48 db SE_RESET_MON_POSITION, $FF db $FF -BodySlamAnim: ; 7a2dd (1e:62dd) +BodySlamAnim: db SE_MOVE_MON_HORIZONTALLY, $48 db SE_DARK_SCREEN_FLASH, $FF db SE_DARK_SCREEN_FLASH, $FF db SE_RESET_MON_POSITION, $FF db $FF -WrapAnim: ; 7a2e6 (1e:62e6) +WrapAnim: db $04,$22,$23 db $04,$22,$23 db $04,$22,$23 db $FF -TakeDownAnim: ; 7a2f0 (1e:62f0) +TakeDownAnim: db SE_MOVE_MON_HORIZONTALLY, $48 db SE_DARK_SCREEN_FLASH, $23 db SE_RESET_MON_POSITION, $FF db $FF -ThrashAnim: ; 7a2f7 (1e:62f7) +ThrashAnim: db $46,$24,$04 db $FF -DoubleEdgeAnim: ; 7a2fb (1e:62fb) +DoubleEdgeAnim: db SE_LIGHT_SCREEN_PALETTE, $48 db $06,$FF,$2D db SE_RESET_SCREEN_PALETTE, $FF @@ -403,7 +403,7 @@ DoubleEdgeAnim: ; 7a2fb (1e:62fb) db SE_RESET_MON_POSITION, $FF db $FF -TailWhipAnim: ; 7a309 (1e:6309) +TailWhipAnim: db SE_MOVE_MON_HORIZONTALLY, $84 db SE_DELAY_ANIMATION_10, $FF db SE_RESET_MON_POSITION, $84 @@ -413,125 +413,125 @@ TailWhipAnim: ; 7a309 (1e:6309) db SE_RESET_MON_POSITION, $84 db $FF -PoisonStingAnim: ; 7a318 (1e:6318) +PoisonStingAnim: db $06,$27,$00 db $FF -TwineedleAnim: ; 7a31c (1e:631c) +TwineedleAnim: db $05,$28,$01 db $05,$28,$01 db $FF -PinMissileAnim: ; 7a323 (1e:6323) +PinMissileAnim: db $03,$29,$01 db $FF -LeerAnim: ; 7a327 (1e:6327) +LeerAnim: db SE_DARK_SCREEN_PALETTE, $48 db SE_DARK_SCREEN_FLASH, $2A db SE_DARK_SCREEN_FLASH, $2A db SE_RESET_SCREEN_PALETTE, $FF db $FF -BiteAnim: ; 7a330 (1e:6330) +BiteAnim: db $08,$2B,$02 db $FF -GrowlAnim: ; 7a334 (1e:6334) +GrowlAnim: db $46,$2C,$12 db $FF -RoarAnim: ; 7a338 (1e:6338) +RoarAnim: db $46,$2D,$15 db $46,$2D,$15 db $46,$2D,$15 db $FF -SingAnim: ; 7a342 (1e:6342) +SingAnim: db $46,$2E,$12 db $50,$FF,$40 db $50,$FF,$40 db $FF -SupersonicAnim: ; 7a34c (1e:634c) +SupersonicAnim: db $06,$2F,$31 db $FF -SonicBoomAnim: ; 7a350 (1e:6350) +SonicBoomAnim: db $46,$2D,$15 db $46,$2D,$15 db $46,$0F,$10 db $46,$FF,$05 db $FF -DisableAnim: ; 7a35d (1e:635d) +DisableAnim: db SE_DARK_SCREEN_PALETTE, $48 db SE_DARK_SCREEN_FLASH, $2A db SE_DARK_SCREEN_FLASH, $2A db SE_RESET_SCREEN_PALETTE, $FF db $FF -AcidAnim: ; 7a366 (1e:6366) +AcidAnim: db $46,$32,$13 db $46,$32,$14 db $FF -EmberAnim: ; 7a36d (1e:636d) +EmberAnim: db $46,$33,$11 db $FF -FlamethrowerAnim: ; 7a371 (1e:6371) +FlamethrowerAnim: db $46,$34,$1F db $46,$34,$0C db $46,$34,$0D db $FF -MistAnim: ; 7a37b (1e:637b) +MistAnim: db SE_LIGHT_SCREEN_PALETTE, $FF db SE_WATER_DROPLETS_EVERYWHERE, $38 db SE_RESET_SCREEN_PALETTE, $FF db $FF -WaterGunAnim: ; 7a382 (1e:6382) +WaterGunAnim: db $06,$36,$2C db $FF -HydroPumpAnim: ; 7a386 (1e:6386) +HydroPumpAnim: db $06,$37,$1A db $06,$37,$1A db $FF -SurfAnim: ; 7a38d (1e:638d) +SurfAnim: db SE_WATER_DROPLETS_EVERYWHERE, $38 db $06,$37,$1A db $FF -IceBeamAnim: ; 7a393 (1e:6393) +IceBeamAnim: db $03,$39,$2E db $10,$FF,$2F db $FF -BlizzardAnim: ; 7a39a (1e:639a) +BlizzardAnim: db $04,$3A,$38 db $04,$37,$38 db $FF -PsyBeamAnim: ; 7a3a1 (1e:63a1) +PsyBeamAnim: db $03,$3B,$2E db SE_FLASH_SCREEN_LONG, $FF db $FF -BubbleBeamAnim: ; 7a3a7 (1e:63a7) +BubbleBeamAnim: db $12,$3C,$35 db $FF -AuroraBeamAnim: ; 7a3ab (1e:63ab) +AuroraBeamAnim: db $03,$3D,$2E db SE_DELAY_ANIMATION_10, $FF db SE_DELAY_ANIMATION_10, $FF db $FF -HyperBeamAnim: ; 7a3b3 (1e:63b3) +HyperBeamAnim: db SE_DARK_SCREEN_PALETTE, $48 db SE_SPIRAL_BALLS_INWARD, $FF db $02,$3E,$2E @@ -541,37 +541,37 @@ HyperBeamAnim: ; 7a3b3 (1e:63b3) db SE_RESET_SCREEN_PALETTE, $FF db $FF -PeckAnim: ; 7a3c4 (1e:63c4) +PeckAnim: db $08,$3F,$01 db $FF -DrillPeckAnim: ; 7a3c8 (1e:63c8) +DrillPeckAnim: db $46,$40,$04 db $FF -SubmissionAnim: ; 7a3cc (1e:63cc) - db SE_SLIDE_MON_OUT, $41 +SubmissionAnim: + db SE_SLIDE_MON_OFF, $41 db $06,$FF,$01 db SE_SHOW_MON_PIC, $FF db $FF -LowKickAnim: ; 7a3d4 (1e:63d4) - db SE_SLIDE_MON_OUT, $42 +LowKickAnim: + db SE_SLIDE_MON_OFF, $42 db $46,$FF,$04 db SE_SHOW_MON_PIC, $FF db $FF -CounterAnim: ; 7a3dc (1e:63dc) - db SE_SLIDE_MON_OUT, $43 +CounterAnim: + db SE_SLIDE_MON_OFF, $43 db $46,$FF,$04 db SE_SHOW_MON_PIC, $FF db $FF -SeismicTossAnim: ; 7a3e4 (1e:63e4) +SeismicTossAnim: db SE_BLINK_ENEMY_MON, $FF db $41,$8B,$4E db SE_HIDE_ENEMY_MON_PIC, $FF - db SE_SLIDE_MON_OUT, $FF + db SE_SLIDE_MON_OFF, $FF db $42,$44,$4F db SE_DELAY_ANIMATION_10, $FF db SE_DELAY_ANIMATION_10, $FF @@ -581,20 +581,20 @@ SeismicTossAnim: ; 7a3e4 (1e:63e4) db SE_SHAKE_SCREEN, $FF db $FF -StrengthAnim: ; 7a3fe (1e:63fe) +StrengthAnim: db SE_MOVE_MON_HORIZONTALLY, $48 db SE_RESET_MON_POSITION, $FF db $46,$06,$04 db $FF -AbsorbAnim: ; 7a406 (1e:6406) +AbsorbAnim: db SE_LIGHT_SCREEN_PALETTE, $46 db $06,$FF,$21 db $06,$FF,$22 db SE_RESET_SCREEN_PALETTE, $FF db $FF -MegaDrainAnim: ; 7a411 (1e:6411) +MegaDrainAnim: db SE_LIGHT_SCREEN_PALETTE, $47 db SE_DARK_SCREEN_FLASH, $FF db $06,$FF,$21 @@ -603,79 +603,79 @@ MegaDrainAnim: ; 7a411 (1e:6411) db SE_RESET_SCREEN_PALETTE, $FF db $FF -LeechSeedAnim: ; 7a420 (1e:6420) +LeechSeedAnim: db $46,$48,$1B db $55,$4D,$1C db $FF -GrowthAnim: ; 7a427 (1e:6427) +GrowthAnim: db SE_LIGHT_SCREEN_PALETTE, $49 db SE_SPIRAL_BALLS_INWARD, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -RazorLeafAnim: ; 7a42e (1e:642e) +RazorLeafAnim: db SE_LEAVES_FALLING, $4A db $41,$80,$44 db $01,$0C,$16 db $FF -SolarBeamAnim: ; 7a437 (1e:6437) +SolarBeamAnim: db $06,$4B,$2E db $06,$FF,$01 db $FF -PoisonPowderAnim: ; 7a43e (1e:643e) +PoisonPowderAnim: db $06,$4C,$36 db $FF -StunSporeAnim: ; 7a442 (1e:6442) +StunSporeAnim: db $06,$4D,$36 db $FF -SleepPowderAnim: ; 7a446 (1e:6446) +SleepPowderAnim: db $06,$4E,$36 db $FF -PedalDanceAnim: ; 7a44a (1e:644a) +PedalDanceAnim: db SE_LIGHT_SCREEN_PALETTE, $4F db SE_PETALS_FALLING, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -StringShotAnim: ; 7a451 (1e:6451) +StringShotAnim: db $08,$50,$37 db $FF -DragonRageAnim: ; 7a455 (1e:6455) +DragonRageAnim: db $46,$51,$1F db $46,$FF,$0C db $46,$FF,$0D db $46,$FF,$0E db $FF -FireSpinAnim: ; 7a462 (1e:6462) +FireSpinAnim: db $46,$52,$0C db $46,$FF,$0D db $46,$FF,$0E db $FF -ThunderShockAnim: ; 7a46c (1e:646c) +ThunderShockAnim: db $42,$53,$29 db $FF -ThunderBoltAnim: ; 7a470 (1e:6470) +ThunderBoltAnim: db $41,$54,$29 db $41,$54,$29 db $FF -ThunderWaveAnim: ; 7a477 (1e:6477) +ThunderWaveAnim: db $42,$55,$29 db $02,$FF,$23 db $04,$FF,$23 db $FF -ThunderAnim: ; 7a481 (1e:6481) +ThunderAnim: db SE_DARK_SCREEN_PALETTE, $56 db SE_DARK_SCREEN_FLASH, $FF db $46,$FF,$2B @@ -684,87 +684,87 @@ ThunderAnim: ; 7a481 (1e:6481) db SE_RESET_SCREEN_PALETTE, $FF db $FF -RockThrowAnim: ; 7a490 (1e:6490) +RockThrowAnim: db $04,$57,$30 db $FF -EarthquakeAnim: ; 7a494 (1e:6494) +EarthquakeAnim: db SE_SHAKE_SCREEN, $58 db SE_SHAKE_SCREEN, $58 db $FF -FissureAnim: ; 7a499 (1e:6499) +FissureAnim: db SE_DARK_SCREEN_FLASH, $59 db SE_SHAKE_SCREEN, $FF db SE_DARK_SCREEN_FLASH, $59 db SE_SHAKE_SCREEN, $FF db $FF -DigAnim: ; 7a4a2 (1e:64a2) +DigAnim: db $46,$5A,$04 db SE_SLIDE_MON_UP, $FF db $FF -ToxicAnim: ; 7a4a8 (1e:64a8) +ToxicAnim: db SE_WATER_DROPLETS_EVERYWHERE, $38 db $46,$5B,$14 db $FF -ConfusionAnim: ; 7a4ae (1e:64ae) +ConfusionAnim: db SE_FLASH_SCREEN_LONG, $5C db $FF -PsychicAnim: ; 7a4b1 (1e:64b1) +PsychicAnim: db SE_FLASH_SCREEN_LONG, $5D db SE_WAVY_SCREEN, $FF db $FF -HypnosisAnim: ; 7a4b6 (1e:64b6) +HypnosisAnim: db SE_FLASH_SCREEN_LONG, $5E db $FF -MeditateAnim: ; 7a4b9 (1e:64b9) +MeditateAnim: db SE_LIGHT_SCREEN_PALETTE, $5F db $46,$FF,$43 db SE_DARK_SCREEN_FLASH, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -AgilityAnim: ; 7a4c3 (1e:64c3) +AgilityAnim: db SE_LIGHT_SCREEN_PALETTE, $60 db SE_RESET_SCREEN_PALETTE, $FF db $FF -QuickAttackAnim: ; 7a4c8 (1e:64c8) - db SE_SLIDE_MON_OUT, $61 +QuickAttackAnim: + db SE_SLIDE_MON_OFF, $61 db $46,$FF,$04 db SE_SHOW_MON_PIC, $FF db $FF -RageAnim: ; 7a4d0 (1e:64d0) +RageAnim: db $06,$62,$01 db $FF -TeleportAnim: ; 7a4d4 (1e:64d4) +TeleportAnim: db SE_SQUISH_MON_PIC, $63 db SE_SHOOT_BALLS_UPWARD, $FF db $FF -NightShadeAnim: ; 7a4d9 (1e:64d9) +NightShadeAnim: db SE_FLASH_SCREEN_LONG, $5C db SE_WAVY_SCREEN, $FF db $FF -MimicAnim: ; 7a4de (1e:64de) +MimicAnim: db $46,$65,$21 db $46,$65,$22 db $FF -ScreechAnim: ; 7a4e5 (1e:64e5) +ScreechAnim: db $46,$66,$12 db $FF -DoubleTeamAnim: ; 7a4e9 (1e:64e9) +DoubleTeamAnim: db SE_DARK_SCREEN_PALETTE, $FF db SE_DELAY_ANIMATION_10, $FF db SE_DELAY_ANIMATION_10, $FF @@ -776,28 +776,28 @@ DoubleTeamAnim: ; 7a4e9 (1e:64e9) db $46,$6F,$33 db $FF -RecoverAnim: ; 7a4fd (1e:64fd) +RecoverAnim: db SE_BLINK_MON, $68 db SE_LIGHT_SCREEN_PALETTE, $FF db SE_SPIRAL_BALLS_INWARD, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -HardenAnim: ; 7a506 (1e:6506) +HardenAnim: db SE_LIGHT_SCREEN_PALETTE, $69 db $46,$FF,$43 db SE_DARK_SCREEN_FLASH, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -MinimizeAnim: ; 7a510 (1e:6510) +MinimizeAnim: db SE_LIGHT_SCREEN_PALETTE, $6A db SE_SPIRAL_BALLS_INWARD, $FF db SE_MINIMIZE_MON, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -SmokeScreenAnim: ; 7a519 (1e:6519) +SmokeScreenAnim: db $46,$6B,$28 db $04,$FF,$0A db SE_DARKEN_MON_PALETTE, $FF @@ -815,13 +815,13 @@ SmokeScreenAnim: ; 7a519 (1e:6519) db SE_RESET_SCREEN_PALETTE, $FF db $FF -ConfuseRayAnim: ; 7a53a (1e:653a) +ConfuseRayAnim: db SE_DARK_SCREEN_PALETTE, $6C db $46,$FF,$3E db SE_RESET_SCREEN_PALETTE, $FF db $FF -WithdrawAnim: ; 7a542 (1e:6542) +WithdrawAnim: db SE_LIGHT_SCREEN_PALETTE, $6E db SE_SLIDE_MON_DOWN, $FF db $06,$FF,$51 @@ -829,47 +829,47 @@ WithdrawAnim: ; 7a542 (1e:6542) db SE_SHOW_MON_PIC, $FF db $FF -DefenseCurlAnim: ; 7a54e (1e:654e) +DefenseCurlAnim: db SE_LIGHT_SCREEN_PALETTE, $6E db $06,$FF,$43 db SE_DARK_SCREEN_FLASH, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -BarrierAnim: ; 7a558 (1e:6558) +BarrierAnim: db $46,$6F,$33 db $46,$6F,$33 db $FF -LightScreenAnim: ; 7a55f (1e:655f) +LightScreenAnim: db SE_LIGHT_SCREEN_PALETTE, $FF db $46,$70,$33 db $46,$70,$33 db SE_RESET_SCREEN_PALETTE, $FF db $FF -HazeAnim: ; 7a56a (1e:656a) +HazeAnim: db SE_DARKEN_MON_PALETTE, $FF db SE_WATER_DROPLETS_EVERYWHERE, $38 db SE_RESET_SCREEN_PALETTE, $FF db $FF -ReflectAnim: ; 7a571 (1e:6571) +ReflectAnim: db SE_DARK_SCREEN_PALETTE, $FF db $46,$72,$33 db $46,$72,$33 db SE_RESET_SCREEN_PALETTE, $FF db $FF -FocusEnergyAnim: ; 7a57c (1e:657c) +FocusEnergyAnim: db SE_SPIRAL_BALLS_INWARD, $73 db $FF -BideAnim: ; 7a57f (1e:657f) +BideAnim: db $46,$74,$04 db $FF -MetronomeAnim: ; 7a583 (1e:6583) +MetronomeAnim: db SE_MOVE_MON_HORIZONTALLY, $84 db SE_DELAY_ANIMATION_10, $FF db SE_RESET_MON_POSITION, $84 @@ -879,39 +879,39 @@ MetronomeAnim: ; 7a583 (1e:6583) db SE_RESET_MON_POSITION, $84 db $FF -MirrorMoveAnim: ; 7a592 (1e:6592) +MirrorMoveAnim: db $08,$76,$01 db $FF -SelfdestructAnim: ; 7a596 (1e:6596) +SelfdestructAnim: db $43,$77,$34 db $FF -EggBombAnim: ; 7a59a (1e:659a) +EggBombAnim: db $44,$78,$41 db $44,$78,$42 db $FF -LickAnim: ; 7a5a1 (1e:65a1) +LickAnim: db $46,$7B,$14 db $FF -SmogAnim: ; 7a5a5 (1e:65a5) +SmogAnim: db SE_DARKEN_MON_PALETTE, $48 db $46,$7A,$19 db SE_RESET_SCREEN_PALETTE, $FF db $FF -SludgeAnim: ; 7a5ad (1e:65ad) +SludgeAnim: db $46,$7B,$13 db $46,$7B,$14 db $FF -BoneClubAnim: ; 7a5b4 (1e:65b4) +BoneClubAnim: db $08,$7C,$02 db $FF -FireBlastAnim: ; 7a5b8 (1e:65b8) +FireBlastAnim: db $46,$7D,$1F db $46,$FF,$20 db $46,$FF,$20 @@ -919,48 +919,48 @@ FireBlastAnim: ; 7a5b8 (1e:65b8) db $46,$FF,$0D db $FF -WaterfallAnim: ; 7a5c8 (1e:65c8) +WaterfallAnim: db SE_SLIDE_MON_DOWN, $48 db $06,$37,$1A db $08,$FF,$02 db SE_SLIDE_MON_UP, $FF db $FF -ClampAnim: ; 7a5d3 (1e:65d3) +ClampAnim: db $08,$7F,$2A db $06,$83,$23 db $06,$83,$23 db $FF -SwiftAnim: ; 7a5dd (1e:65dd) +SwiftAnim: db $43,$80,$3F db $FF -SkullBashAnim: ; 7a5e1 (1e:65e1) +SkullBashAnim: db $46,$81,$05 db $FF -SpikeCannonAnim: ; 7a5e5 (1e:65e5) +SpikeCannonAnim: db $44,$82,$04 db $FF -ConstrictAnim: ; 7a5e9 (1e:65e9) +ConstrictAnim: db $06,$83,$23 db $06,$83,$23 db $06,$83,$23 db $FF -AmnesiaAnim: ; 7a5f3 (1e:65f3) +AmnesiaAnim: db $08,$84,$25 db $08,$84,$25 db $FF -KinesisAnim: ; 7a5fa (1e:65fa) +KinesisAnim: db $08,$85,$01 db $FF -SoftboiledAnim: ; 7a5fe (1e:65fe) - db SE_SLIDE_MON_HALF_LEFT, $48 +SoftboiledAnim: + db SE_SLIDE_MON_HALF_OFF, $48 db $08,$86,$4C db SE_LIGHT_SCREEN_PALETTE, $FF db SE_SPIRAL_BALLS_INWARD, $FF @@ -968,34 +968,34 @@ SoftboiledAnim: ; 7a5fe (1e:65fe) db SE_SHOW_MON_PIC, $FF db $FF -HiJumpKickAnim: ; 7a6 (1e:660c) +HiJumpKickAnim: db $46,$87,$04 db $FF -GlareAnim: ; 7a610 (1e:6610) +GlareAnim: db SE_DARK_SCREEN_PALETTE, $48 db SE_DARK_SCREEN_FLASH, $88 db SE_DARK_SCREEN_FLASH, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -DreamEaterAnim: ; 7a619 (1e:6619) +DreamEaterAnim: db SE_FLASH_SCREEN_LONG, $89 db SE_DARK_SCREEN_PALETTE, $89 db $08,$89,$02 db SE_RESET_SCREEN_PALETTE, $FF db $FF -PoisonGasAnim: ; 7a623 (1e:6623) +PoisonGasAnim: db $46,$8A,$19 db $FF -BarrageAnim: ; 7a627 (1e:6627) +BarrageAnim: db $43,$8B,$41 db $05,$FF,$55 db $FF -LeechLifeAnim: ; 7a62e (1e:662e) +LeechLifeAnim: db $08,$8C,$02 db SE_DARK_SCREEN_FLASH, $FF db $06,$FF,$21 @@ -1003,264 +1003,264 @@ LeechLifeAnim: ; 7a62e (1e:662e) db SE_DARK_SCREEN_FLASH, $FF db $FF -LovelyKissAnim: ; 7a63c (1e:663c) +LovelyKissAnim: db $06,$8D,$12 db $FF -SkyAttackAnim: ; 7a640 (1e:6640) +SkyAttackAnim: db SE_SQUISH_MON_PIC, $8E db SE_SHOOT_BALLS_UPWARD, $FF db $46,$87,$04 db SE_SHOW_MON_PIC, $FF db $FF -TransformAnim: ; 7a64a (1e:664a) +TransformAnim: db $46,$8F,$21 db $44,$8F,$22 db $08,$FF,$47 db SE_TRANSFORM_MON, $FF db $FF -BubbleAnim: ; 7a656 (1e:6656) +BubbleAnim: db $16,$90,$35 db $FF -DizzyPunchAnim: ; 7a65a (1e:665a) +DizzyPunchAnim: db $06,$91,$17 db $06,$91,$17 db $06,$91,$17 db $06,$02,$02 db $FF -SporeAnim: ; 7a667 (1e:6667) +SporeAnim: db $06,$92,$36 db $FF -FlashAnim: ; 7a66b (1e:666b) +FlashAnim: db SE_LIGHT_SCREEN_PALETTE, $48 db SE_DARK_SCREEN_FLASH, $88 db SE_DARK_SCREEN_FLASH, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -PsywaveAnim: ; 7a674 (1e:6674) +PsywaveAnim: db $06,$2F,$31 db SE_WAVY_SCREEN, $5C db $FF -SplashAnim: ; 7a67a (1e:667a) +SplashAnim: db SE_BOUNCE_UP_AND_DOWN, $95 db $FF -AcidArmorAnim: ; 7a67d (1e:667d) +AcidArmorAnim: db SE_SLIDE_MON_DOWN_AND_HIDE, $96 db $FF -CrabHammerAnim: ; 7a680 (1e:6680) +CrabHammerAnim: db $46,$97,$05 db $06,$FF,$2A db $FF -ExplosionAnim: ; 7a687 (1e:6687) +ExplosionAnim: db $43,$98,$34 db $FF -FurySwipesAnim: ; 7a68b (1e:668b) +FurySwipesAnim: db $04,$99,$0F db $FF -BonemerangAnim: ; 7a68f (1e:668f) +BonemerangAnim: db $06,$9A,$02 db $FF -RestAnim: ; 7a693 (1e:6693) +RestAnim: db $10,$9B,$3A db $10,$9B,$3A db $FF -RockSlideAnim: ; 7a69a (1e:669a) +RockSlideAnim: db $04,$9C,$1D db $03,$9C,$1E db $46,$9D,$04 db $FF -HyperFangAnim: ; 7a6a4 (1e:66a4) +HyperFangAnim: db $06,$9D,$02 db $FF -SharpenAnim: ; 7a6a8 (1e:66a8) +SharpenAnim: db SE_LIGHT_SCREEN_PALETTE, $9E db $46,$FF,$43 db SE_DARK_SCREEN_FLASH, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -ConversionAnim: ; 7a6b2 (1e:66b2) +ConversionAnim: db SE_DARK_SCREEN_FLASH, $9F db $46,$FF,$21 db $46,$FF,$22 db SE_DARK_SCREEN_FLASH, $FF db $FF -TriAttackAnim: ; 7a6bd (1e:66bd) +TriAttackAnim: db SE_DARK_SCREEN_FLASH, $A0 db $46,$FF,$4D db SE_DARK_SCREEN_FLASH, $FF db $FF -SuperFangAnim: ; 7a6c5 (1e:66c5) +SuperFangAnim: db SE_DARK_SCREEN_PALETTE, $48 db $46,$A1,$04 db SE_RESET_SCREEN_PALETTE, $FF db $FF -SlashAnim: ; 7a6cd (1e:66cd) +SlashAnim: db $06,$A2,$0F db $FF -SubstituteAnim: ; 7a6d1 (1e:66d1) - db SE_SLIDE_MON_OUT, $A3 +SubstituteAnim: + db SE_SLIDE_MON_OFF, $A3 db $08,$FF,$47 db SE_SUBSTITUTE_MON, $FF db $FF -BallTossAnim: ; 7a6d9 (1e:66d9) +BallTossAnim: db $03,$FF,$06 db $FF -GreatTossAnim: ; 7a6dd (1e:66dd) +GreatTossAnim: db $03,$FF,$07 db $FF -UltraTossAnim: ; 7a6e1 (1e:66e1) +UltraTossAnim: db $02,$FF,$08 db $FF -BallShakeAnim: ; 7a6e5 (1e:66e5) +BallShakeAnim: db $04,$FF,$09 db $FF -BallPoofAnim: ; 7a6e9 (1e:66e9) +BallPoofAnim: db $04,$FF,$0A db $FF -ShowPicAnim: ; 7a6ed (1e:66ed) +ShowPicAnim: db SE_SHOW_ENEMY_MON_PIC, $FF db $FF -HidePicAnim: ; 7a6f0 (1e:66f0) +HidePicAnim: db SE_HIDE_ENEMY_MON_PIC, $FF db $FF -EnemyFlashAnim: ; 7a6f3 (1e:66f3) +EnemyFlashAnim: db SE_SHOW_MON_PIC, $FF db $FF -PlayerFlashAnim: ; 7a6f6 (1e:66f6) +PlayerFlashAnim: db SE_FLASH_MON_PIC, $FF db $FF -EnemyHUDShakeAnim: ; 7a6f9 (1e:66f9) +EnemyHUDShakeAnim: db SE_SHAKE_ENEMY_HUD, $FF db $FF -TradeBallDropAnim: ; 7a6fc (1e:66fc) +TradeBallDropAnim: db $86,$FF,$48 db $FF -TradeBallAppear1Anim: ; 7a700 (1e:6700) +TradeBallAppear1Anim: db $84,$FF,$49 db $FF -TradeBallAppear2Anim: ; 7a704 (1e:6704) +TradeBallAppear2Anim: db $86,$FF,$4A db $FF -TradeBallPoofAnim: ; 7a708 (1e:6708) +TradeBallPoofAnim: db $86,$FF,$4B db $FF -XStatItemAnim: ; 7a7c0 (1e:670c) +XStatItemAnim: db SE_LIGHT_SCREEN_PALETTE, $FF db SE_SPIRAL_BALLS_INWARD, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -ShrinkingSquareAnim: ; 7a713 (1e:6713) +ShrinkingSquareAnim: db SE_LIGHT_SCREEN_PALETTE, $FF db $46,$FF,$43 db SE_RESET_SCREEN_PALETTE, $FF db $FF -XStatItemBlackAnim: ; 7a71b (1e:671b) +XStatItemBlackAnim: db SE_DARKEN_MON_PALETTE, $FF db SE_SPIRAL_BALLS_INWARD, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -ShrinkingSquareBlackAnim: ; 7a722 (1e:6722) +ShrinkingSquareBlackAnim: db SE_DARKEN_MON_PALETTE, $FF db $46,$FF,$43 db SE_RESET_SCREEN_PALETTE, $FF db $FF -UnusedAnim: ; 7a72a (1e:672a) +UnusedAnim: db SE_LIGHT_SCREEN_PALETTE, $FF db SE_SHOOT_MANY_BALLS_UPWARD, $FF db SE_RESET_SCREEN_PALETTE, $FF db $FF -ParalyzeAnim: ; 7a731 (1e:6731) +ParalyzeAnim: db $04,$13,$24 db $04,$13,$24 db $FF -PoisonAnim: ; 7a738 (1e:6738) +PoisonAnim: db $08,$13,$27 db $08,$13,$27 db $FF -SleepPlayerAnim: ; 7a73f (1e:673f) +SleepPlayerAnim: db $10,$9B,$3A db $10,$9B,$3A db $FF -SleepEnemyAnim: ; 7a746 (1e:6746) +SleepEnemyAnim: db $10,$9B,$3B db $10,$9B,$3B db $FF -ConfusedPlayerAnim: ; 7a74d (1e:674d) +ConfusedPlayerAnim: db $08,$84,$25 db $08,$84,$25 db $FF -ConfusedEnemyAnim: ; 7a754 (1e:6754) +ConfusedEnemyAnim: db $08,$84,$26 db $08,$84,$26 db $FF -BallBlockAnim: ; 7a75b (1e:675b) +BallBlockAnim: db $03,$FF,$0B db $FF -FaintAnim: ; 7a75f (1e:675f) +FaintAnim: db SE_SLIDE_MON_DOWN, $5A db $FF -ShakeScreenAnim: ; 7a762 (1e:6762) +ShakeScreenAnim: db SE_SHAKE_SCREEN, $FF db $FF -ThrowRockAnim: ; 7a765 (1e:6765) +ThrowRockAnim: db $03,$8B,$53 db $FF -ThrowBaitAnim: ; 7a769 (1e:6769) +ThrowBaitAnim: db $03,$8B,$54 db $FF -SubanimationPointers: ; 7a76d (1e:676d) +SubanimationPointers: dw Subanimation00 dw Subanimation01 dw Subanimation02 @@ -1348,17 +1348,17 @@ SubanimationPointers: ; 7a76d (1e:676d) dw Subanimation54 dw Subanimation55 -Subanimation04: ; 7a819 (1e:6819) +Subanimation04: db $43 db $02,$1a,$00 db $02,$10,$00 db $02,$03,$00 -Subanimation05: ; 7a823 (1e:6823) +Subanimation05: db $41 db $02,$10,$00 -Subanimation08: ; 7a827 (1e:6827) +Subanimation08: db $0b db $03,$30,$00 db $03,$44,$00 @@ -1372,7 +1372,7 @@ Subanimation08: ; 7a827 (1e:6827) db $03,$a1,$00 db $03,$34,$00 -Subanimation07: ; 7a849 (1e:6849) +Subanimation07: db $0b db $03,$30,$00 db $03,$a2,$00 @@ -1386,7 +1386,7 @@ Subanimation07: ; 7a849 (1e:6849) db $03,$a6,$00 db $03,$34,$00 -Subanimation06: ; 7a86b (1e:686b) +Subanimation06: db $0b db $03,$30,$00 db $03,$a2,$00 @@ -1400,14 +1400,14 @@ Subanimation06: ; 7a86b (1e:686b) db $03,$a9,$00 db $03,$34,$00 -Subanimation09: ; 7a88d (1e:688d) +Subanimation09: db $04 db $03,$21,$04 db $04,$21,$04 db $03,$21,$04 db $05,$21,$04 -Subanimation0a: ; 7a89a (1e:689a) +Subanimation0a: db $46 db $06,$1b,$00 db $07,$1b,$00 @@ -1416,18 +1416,18 @@ Subanimation0a: ; 7a89a (1e:689a) db $0a,$15,$00 db $0a,$15,$00 -Subanimation0b: ; 7a8ad (1e:68ad) +Subanimation0b: db $04 db $01,$2d,$00 db $03,$2f,$00 db $03,$35,$00 db $03,$4d,$00 -Subanimation55: ; 7a8ba (1e:68ba) +Subanimation55: db $41 db $01,$9d,$00 -Subanimation11: ; 7a8be (1e:68be) +Subanimation11: db $4c db $0b,$26,$00 db $0c,$26,$00 @@ -1442,7 +1442,7 @@ Subanimation11: ; 7a8be (1e:68be) db $0b,$27,$00 db $0c,$27,$00 -Subanimation2b: ; 7a8e3 (1e:68e3) +Subanimation2b: db $4b db $0d,$03,$03 db $0e,$03,$03 @@ -1456,7 +1456,7 @@ Subanimation2b: ; 7a8e3 (1e:68e3) db $11,$1b,$00 db $11,$1b,$00 -Subanimation2c: ; 7a905 (1e:6905) +Subanimation2c: db $4c db $12,$01,$00 db $12,$0f,$00 @@ -1471,7 +1471,7 @@ Subanimation2c: ; 7a905 (1e:6905) db $16,$38,$00 db $16,$38,$00 -Subanimation12: ; 7a92a (1e:692a) +Subanimation12: db $69 db $17,$30,$00 db $17,$39,$00 @@ -1483,35 +1483,35 @@ Subanimation12: ; 7a92a (1e:692a) db $17,$3f,$00 db $17,$1f,$00 -Subanimation00: ; 7a946 (1e:6946) +Subanimation00: db $41 db $01,$17,$00 -Subanimation01: ; 7a94a (1e:694a) +Subanimation01: db $42 db $01,$0f,$00 db $01,$1d,$00 -Subanimation02: ; 7a951 (1e:6951) +Subanimation02: db $43 db $01,$12,$00 db $01,$15,$00 db $01,$1c,$00 -Subanimation03: ; 7a95b (1e:695b) +Subanimation03: db $44 db $01,$0b,$00 db $01,$11,$00 db $01,$18,$00 db $01,$1d,$00 -Subanimation0c: ; 7a968 (1e:6968) +Subanimation0c: db $43 db $0c,$20,$00 db $0c,$21,$00 db $0c,$23,$00 -Subanimation0d: ; 7a972 (1e:6972) +Subanimation0d: db $46 db $0c,$20,$02 db $0c,$15,$00 @@ -1520,7 +1520,7 @@ Subanimation0d: ; 7a972 (1e:6972) db $0c,$23,$02 db $0c,$19,$00 -Subanimation0e: ; 7a985 (1e:6985) +Subanimation0e: db $49 db $0c,$20,$02 db $0c,$15,$02 @@ -1532,7 +1532,7 @@ Subanimation0e: ; 7a985 (1e:6985) db $0c,$19,$02 db $0c,$0c,$00 -Subanimation1f: ; 7a9a1 (1e:69a1) +Subanimation1f: db $85 db $0c,$30,$03 db $0c,$40,$03 @@ -1540,7 +1540,7 @@ Subanimation1f: ; 7a9a1 (1e:69a1) db $0c,$42,$03 db $0c,$21,$00 -Subanimation2e: ; 7a9b1 (1e:69b1) +Subanimation2e: db $2e db $18,$43,$02 db $75,$52,$04 @@ -1557,14 +1557,14 @@ Subanimation2e: ; 7a9b1 (1e:69b1) db $1e,$43,$02 db $75,$1b,$00 -Subanimation2f: ; 7a9dc (1e:69dc) +Subanimation2f: db $44 db $1f,$24,$00 db $20,$20,$00 db $21,$1a,$00 db $22,$15,$00 -Subanimation30: ; 7a9e9 (1e:69e9) +Subanimation30: db $52 db $23,$00,$02 db $23,$02,$02 @@ -1585,7 +1585,7 @@ Subanimation30: ; 7a9e9 (1e:69e9) db $24,$28,$00 db $24,$28,$00 -Subanimation0f: ; 7aa20 (1e:6a20) +Subanimation0f: db $4c db $26,$0e,$02 db $26,$16,$02 @@ -1600,7 +1600,7 @@ Subanimation0f: ; 7aa20 (1e:6a20) db $29,$16,$02 db $29,$1c,$00 -Subanimation16: ; 7aa45 (1e:6a45) +Subanimation16: db $4c db $2a,$05,$00 db $2b,$05,$02 @@ -1615,7 +1615,7 @@ Subanimation16: ; 7aa45 (1e:6a45) db $2c,$00,$02 db $2c,$00,$00 -Subanimation10: ; 7aa6a (1e:6a6a) +Subanimation10: db $88 db $2d,$44,$00 db $2e,$45,$00 @@ -1626,7 +1626,7 @@ Subanimation10: ; 7aa6a (1e:6a6a) db $2d,$2f,$00 db $2e,$1a,$00 -Subanimation31: ; 7aa83 (1e:6a83) +Subanimation31: db $2a db $2f,$46,$00 db $2f,$4a,$00 @@ -1639,7 +1639,7 @@ Subanimation31: ; 7aa83 (1e:6a83) db $2f,$2e,$00 db $2f,$51,$00 -Subanimation13: ; 7aaa2 (1e:6aa2) +Subanimation13: db $86 db $30,$31,$00 db $30,$32,$00 @@ -1648,7 +1648,7 @@ Subanimation13: ; 7aaa2 (1e:6aa2) db $30,$0f,$00 db $30,$10,$00 -Subanimation14: ; 7aab5 (1e:6ab5) +Subanimation14: db $49 db $30,$10,$00 db $30,$10,$03 @@ -1660,7 +1660,7 @@ Subanimation14: ; 7aab5 (1e:6ab5) db $31,$22,$04 db $31,$27,$00 -Subanimation41: ; 7aad1 (1e:6ad1) +Subanimation41: db $85 db $03,$31,$00 db $03,$32,$00 @@ -1668,32 +1668,32 @@ Subanimation41: ; 7aad1 (1e:6ad1) db $03,$0e,$00 db $03,$10,$00 -Subanimation42: ; 7aae1 (1e:6ae1) +Subanimation42: db $43 db $48,$08,$00 db $49,$08,$00 db $5a,$08,$00 -Subanimation15: ; 7aaeb (1e:6aeb) +Subanimation15: db $22 db $35,$52,$00 db $35,$53,$00 -Subanimation17: ; 7aaf2 (1e:6af2) +Subanimation17: db $44 db $36,$54,$00 db $36,$55,$00 db $37,$56,$00 db $37,$57,$00 -Subanimation18: ; 7aaff (1e:6aff) +Subanimation18: db $a4 db $36,$54,$00 db $36,$55,$00 db $37,$56,$00 db $37,$57,$00 -Subanimation40: ; 7ab0c (1e:6b0c) +Subanimation40: db $46 db $17,$54,$00 db $17,$55,$00 @@ -1702,7 +1702,7 @@ Subanimation40: ; 7ab0c (1e:6b0c) db $17,$57,$00 db $17,$13,$00 -Subanimation19: ; 7ab1f (1e:6b1f) +Subanimation19: db $8c db $38,$31,$00 db $39,$31,$00 @@ -1717,7 +1717,7 @@ Subanimation19: ; 7ab1f (1e:6b1f) db $38,$10,$00 db $39,$10,$00 -Subanimation1a: ; 7ab44 (1e:6b44) +Subanimation1a: db $50 db $3a,$08,$00 db $3b,$08,$00 @@ -1736,20 +1736,20 @@ Subanimation1a: ; 7ab44 (1e:6b44) db $3e,$0b,$00 db $3f,$0b,$00 -Subanimation1b: ; 7ab75 (1e:6b75) +Subanimation1b: db $84 db $40,$31,$00 db $40,$32,$00 db $40,$92,$00 db $40,$15,$00 -Subanimation1c: ; 7ab82 (1e:6b82) +Subanimation1c: db $43 db $41,$58,$00 db $41,$59,$00 db $41,$21,$00 -Subanimation1d: ; 7ab8c (1e:6b8c) +Subanimation1d: db $af db $24,$9a,$00 db $23,$1b,$02 @@ -1767,22 +1767,22 @@ Subanimation1d: ; 7ab8c (1e:6b8c) db $25,$62,$04 db $25,$99,$03 -Subanimation1e: ; 7abba (1e:6bba) +Subanimation1e: db $01 db $25,$75,$00 -Subanimation20: ; 7abbe (1e:6bbe) +Subanimation20: db $42 db $42,$07,$00 db $43,$07,$00 -Subanimation21: ; 7abc5 (1e:6bc5) +Subanimation21: db $43 db $44,$00,$00 db $45,$08,$00 db $46,$10,$02 -Subanimation22: ; 7abcf (1e:6bcf) +Subanimation22: db $8b db $47,$10,$00 db $47,$56,$00 @@ -1796,7 +1796,7 @@ Subanimation22: ; 7abcf (1e:6bcf) db $47,$89,$00 db $47,$b0,$00 -Subanimation2d: ; 7abf1 (1e:6bf1) +Subanimation2d: db $66 db $44,$64,$00 db $45,$65,$00 @@ -1805,15 +1805,15 @@ Subanimation2d: ; 7abf1 (1e:6bf1) db $47,$66,$00 db $47,$66,$00 -Subanimation39: ; 7ac04 (1e:6c04) +Subanimation39: db $61 db $47,$67,$00 -Subanimation4e: ; 7ac08 (1e:6c08) +Subanimation4e: db $41 db $71,$0f,$03 -Subanimation4f: ; 7ac0c (1e:6c0c) +Subanimation4f: db $47 db $71,$0f,$00 db $71,$08,$00 @@ -1823,7 +1823,7 @@ Subanimation4f: ; 7ac0c (1e:6c0c) db $73,$95,$00 db $74,$95,$00 -Subanimation50: ; 7ac22 (1e:6c22) +Subanimation50: db $48 db $74,$95,$00 db $73,$95,$00 @@ -1834,7 +1834,7 @@ Subanimation50: ; 7ac22 (1e:6c22) db $71,$0f,$00 db $71,$16,$00 -Subanimation29: ; 7ac3b (1e:6c3b) +Subanimation29: db $5d db $48,$0f,$00 db $4a,$68,$03 @@ -1866,63 +1866,63 @@ Subanimation29: ; 7ac3b (1e:6c3b) db $4d,$2a,$03 db $49,$6b,$00 -Subanimation2a: ; 7ac93 (1e:6c93) +Subanimation2a: db $44 db $4e,$2b,$00 db $4f,$2b,$00 db $50,$2b,$00 db $50,$2b,$00 -Subanimation23: ; 7aca0 (1e:6ca0) +Subanimation23: db $42 db $51,$2d,$00 db $51,$6e,$00 -Subanimation24: ; 7aca7 (1e:6ca7) +Subanimation24: db $a2 db $51,$2d,$00 db $51,$6e,$00 -Subanimation25: ; 7acae (1e:6cae) +Subanimation25: db $62 db $52,$71,$00 db $52,$72,$00 -Subanimation26: ; 7acb5 (1e:6cb5) +Subanimation26: db $02 db $52,$01,$00 db $52,$2c,$00 -Subanimation3a: ; 7acbc (1e:6cbc) +Subanimation3a: db $63 db $53,$71,$00 db $53,$7f,$00 db $53,$81,$00 -Subanimation3b: ; 7acc6 (1e:6cc6) +Subanimation3b: db $03 db $53,$01,$00 db $53,$15,$00 db $53,$2c,$00 -Subanimation27: ; 7acd0 (1e:6cd0) +Subanimation27: db $a2 db $54,$01,$00 db $54,$2c,$00 -Subanimation28: ; 7acd7 (1e:6cd7) +Subanimation28: db $23 db $55,$73,$03 db $56,$73,$03 db $57,$73,$00 -Subanimation32: ; 7ace1 (1e:6ce1) +Subanimation32: db $63 db $47,$74,$00 db $47,$43,$00 db $47,$75,$00 -Subanimation33: ; 7aceb (1e:6ceb) +Subanimation33: db $26 db $58,$76,$00 db $34,$76,$00 @@ -1931,7 +1931,7 @@ Subanimation33: ; 7aceb (1e:6ceb) db $58,$76,$00 db $34,$76,$00 -Subanimation3c: ; 7acfe (1e:6cfe) +Subanimation3c: db $67 db $59,$79,$03 db $59,$7b,$03 @@ -1941,7 +1941,7 @@ Subanimation3c: ; 7acfe (1e:6cfe) db $59,$7c,$03 db $59,$76,$00 -Subanimation3d: ; 7ad14 (1e:6d14) +Subanimation3d: db $08 db $3a,$4d,$00 db $3b,$4d,$00 @@ -1952,7 +1952,7 @@ Subanimation3d: ; 7ad14 (1e:6d14) db $3e,$4d,$00 db $3f,$4d,$00 -Subanimation34: ; 7ad2d (1e:6d2d) +Subanimation34: db $35 db $48,$7d,$00 db $49,$7d,$00 @@ -1976,14 +1976,14 @@ Subanimation34: ; 7ad2d (1e:6d2d) db $49,$82,$00 db $5a,$82,$00 -Subanimation35: ; 7ad6d (1e:6d6d) +Subanimation35: db $24 db $5b,$83,$03 db $5c,$84,$03 db $5d,$85,$03 db $5e,$09,$00 -Subanimation36: ; 7ad7a (1e:6d7a) +Subanimation36: db $48 db $5f,$2a,$00 db $5f,$00,$00 @@ -1994,7 +1994,7 @@ Subanimation36: ; 7ad7a (1e:6d7a) db $62,$2a,$00 db $62,$00,$00 -Subanimation37: ; 7ad93 (1e:6d93) +Subanimation37: db $2a db $63,$89,$00 db $64,$75,$00 @@ -2007,7 +2007,7 @@ Subanimation37: ; 7ad93 (1e:6d93) db $65,$88,$00 db $65,$1a,$00 -Subanimation38: ; 7adb2 (1e:6db2) +Subanimation38: db $50 db $66,$8a,$00 db $66,$33,$00 @@ -2026,7 +2026,7 @@ Subanimation38: ; 7adb2 (1e:6db2) db $66,$1e,$04 db $67,$29,$00 -Subanimation3e: ; 7ade3 (1e:6de3) +Subanimation3e: db $92 db $02,$31,$00 db $34,$31,$00 @@ -2047,7 +2047,7 @@ Subanimation3e: ; 7ade3 (1e:6de3) db $34,$10,$00 db $02,$10,$00 -Subanimation3f: ; 7ae1a (1e:6e1a) +Subanimation3f: db $72 db $68,$4b,$00 db $68,$8c,$00 @@ -2068,7 +2068,7 @@ Subanimation3f: ; 7ae1a (1e:6e1a) db $68,$23,$00 db $68,$1f,$00 -Subanimation44: ; 7ae51 (1e:6e51) +Subanimation44: db $2c db $69,$4b,$00 db $69,$8c,$00 @@ -2083,20 +2083,20 @@ Subanimation44: ; 7ae51 (1e:6e51) db $69,$0c,$00 db $69,$06,$00 -Subanimation43: ; 7ae76 (1e:6e76) +Subanimation43: db $a3 db $6a,$07,$00 db $6b,$0f,$00 db $6c,$17,$00 -Subanimation45: ; 7ae80 (1e:6e80) +Subanimation45: db $24 db $6d,$8b,$00 db $6d,$84,$00 db $6d,$63,$00 db $6d,$8c,$00 -Subanimation46: ; 7ae8d (1e:6e8d) +Subanimation46: db $26 db $6d,$8b,$00 db $6d,$84,$00 @@ -2105,13 +2105,13 @@ Subanimation46: ; 7ae8d (1e:6e8d) db $6d,$0a,$00 db $6d,$89,$00 -Subanimation47: ; 7aea0 (1e:6ea0) +Subanimation47: db $23 db $06,$82,$00 db $07,$82,$00 db $08,$96,$00 -Subanimation48: ; 7aeaa (1e:6eaa) +Subanimation48: db $06 db $03,$41,$04 db $03,$48,$04 @@ -2120,24 +2120,24 @@ Subanimation48: ; 7aeaa (1e:6eaa) db $05,$48,$04 db $03,$48,$03 -Subanimation49: ; 7aebd (1e:6ebd) +Subanimation49: db $04 db $04,$48,$04 db $03,$48,$04 db $05,$48,$04 db $03,$48,$03 -Subanimation4a: ; 7aeca (1e:6eca) +Subanimation4a: db $01 db $04,$84,$03 -Subanimation4b: ; 7aece (1e:6ece) +Subanimation4b: db $03 db $06,$72,$00 db $07,$72,$00 db $08,$72,$00 -Subanimation4c: ; 7aed8 (1e:6ed8) +Subanimation4c: db $68 db $6f,$30,$00 db $6e,$30,$00 @@ -2148,7 +2148,7 @@ Subanimation4c: ; 7aed8 (1e:6ed8) db $70,$30,$00 db $6e,$30,$00 -Subanimation4d: ; 7aef1 (1e:6ef1) +Subanimation4d: db $26 db $32,$4b,$00 db $33,$4f,$00 @@ -2157,7 +2157,7 @@ Subanimation4d: ; 7aef1 (1e:6ef1) db $32,$19,$00 db $33,$0d,$00 -Subanimation51: ; 7af04 (1e:6f04) +Subanimation51: db $a6 db $76,$1b,$00 db $34,$1b,$00 @@ -2166,7 +2166,7 @@ Subanimation51: ; 7af04 (1e:6f04) db $76,$1b,$00 db $34,$1b,$00 -Subanimation52: ; 7af17 (1e:6f17) +Subanimation52: db $47 db $77,$25,$00 db $77,$9b,$00 @@ -2176,7 +2176,7 @@ Subanimation52: ; 7af17 (1e:6f17) db $77,$50,$00 db $77,$8c,$00 -Subanimation53: ; 7af2d (1e:6f2d) +Subanimation53: db $0c db $78,$30,$00 db $78,$a2,$00 @@ -2191,7 +2191,7 @@ Subanimation53: ; 7af2d (1e:6f2d) db $78,$34,$00 db $01,$9e,$00 -Subanimation54: ; 7af52 (1e:6f52) +Subanimation54: db $0b db $79,$30,$00 db $79,$a2,$00 @@ -2205,7 +2205,7 @@ Subanimation54: ; 7af52 (1e:6f52) db $79,$a9,$00 db $79,$34,$00 -FrameBlockPointers: ; 7af74 (1e:6f74) +FrameBlockPointers: dw FrameBlock00 dw FrameBlock01 dw FrameBlock02 @@ -2337,7 +2337,7 @@ FrameBlockPointers: ; 7af74 (1e:6f74) ; second byte = x offset ; third byte = tile id (it's actually tile id - $31) ; fourth byte = tile properties (xflip/yflip/etc.) -FrameBlock01: ; 7b068 (1e:7068) +FrameBlock01: db $09 db $00,$00,$2c,$00 db $00,$08,$2d,$00 @@ -2349,7 +2349,7 @@ FrameBlock01: ; 7b068 (1e:7068) db $10,$08,$2d,$40 db $10,$10,$2c,$60 -FrameBlock02: ; 7b08d (1e:708d) +FrameBlock02: db $10 db $00,$00,$20,$00 db $00,$08,$21,$00 @@ -2368,28 +2368,28 @@ FrameBlock02: ; 7b08d (1e:708d) db $18,$10,$21,$60 db $18,$18,$20,$60 -FrameBlock03: ; 7b0ce (1e:70ce) +FrameBlock03: db $04 db $00,$00,$02,$00 db $00,$08,$02,$20 db $08,$00,$12,$00 db $08,$08,$12,$20 -FrameBlock04: ; 7b0df (1e:70df) +FrameBlock04: db $04 db $00,$00,$06,$00 db $00,$08,$07,$00 db $08,$00,$16,$00 db $08,$08,$17,$00 -FrameBlock05: ; 7b0f0 (1e:70f0) +FrameBlock05: db $04 db $00,$00,$07,$20 db $00,$08,$06,$20 db $08,$00,$17,$20 db $08,$08,$16,$20 -FrameBlock06: ; 7b101 (1e:7101) +FrameBlock06: db $0c db $00,$08,$23,$00 db $08,$00,$32,$00 @@ -2404,7 +2404,7 @@ FrameBlock06: ; 7b101 (1e:7101) db $10,$18,$32,$60 db $18,$10,$23,$60 -FrameBlock07: ; 7b132 (1e:7132) +FrameBlock07: db $10 db $00,$00,$20,$00 db $00,$08,$21,$00 @@ -2423,7 +2423,7 @@ FrameBlock07: ; 7b132 (1e:7132) db $18,$10,$21,$60 db $18,$18,$20,$60 -FrameBlock08: ; 7b173 (1e:7173) +FrameBlock08: db $10 db $00,$00,$20,$00 db $00,$08,$21,$00 @@ -2442,7 +2442,7 @@ FrameBlock08: ; 7b173 (1e:7173) db $20,$18,$21,$60 db $20,$20,$20,$60 -FrameBlock09: ; 7b1b4 (1e:71b4) +FrameBlock09: db $0c db $00,$00,$24,$00 db $00,$08,$25,$00 @@ -2457,7 +2457,7 @@ FrameBlock09: ; 7b1b4 (1e:71b4) db $20,$18,$25,$60 db $20,$20,$24,$60 -FrameBlock0a: ; 7b1e5 (1e:71e5) +FrameBlock0a: db $0c db $00,$00,$24,$00 db $00,$08,$25,$00 @@ -2472,21 +2472,21 @@ FrameBlock0a: ; 7b1e5 (1e:71e5) db $28,$20,$25,$60 db $28,$28,$24,$60 -FrameBlock0b: ; 7b216 (1e:7216) +FrameBlock0b: db $04 db $00,$00,$05,$00 db $00,$08,$05,$20 db $08,$00,$15,$00 db $08,$08,$15,$20 -FrameBlock0c: ; 7b227 (1e:7227) +FrameBlock0c: db $04 db $00,$00,$04,$00 db $00,$08,$04,$20 db $08,$00,$14,$00 db $08,$08,$14,$20 -FrameBlock0d: ; 7b238 (1e:7238) +FrameBlock0d: db $08 db $00,$00,$0c,$00 db $00,$08,$0d,$00 @@ -2497,21 +2497,21 @@ FrameBlock0d: ; 7b238 (1e:7238) db $18,$00,$0d,$60 db $18,$08,$0c,$60 -FrameBlock0e: ; 7b259 (1e:7259) +FrameBlock0e: db $04 db $20,$00,$0c,$00 db $20,$08,$0d,$00 db $28,$00,$1c,$00 db $28,$08,$1d,$00 -FrameBlock0f: ; 7b26a (1e:726a) +FrameBlock0f: db $04 db $30,$00,$1d,$60 db $30,$08,$1c,$60 db $38,$00,$0d,$60 db $38,$08,$0c,$60 -FrameBlock10: ; 7b27b (1e:727b) +FrameBlock10: db $08 db $00,$00,$0e,$00 db $00,$08,$0f,$00 @@ -2522,7 +2522,7 @@ FrameBlock10: ; 7b27b (1e:727b) db $08,$10,$1f,$20 db $08,$18,$1e,$20 -FrameBlock11: ; 7b29c (1e:729c) +FrameBlock11: db $08 db $00,$00,$0e,$00 db $00,$08,$0f,$00 @@ -2533,20 +2533,20 @@ FrameBlock11: ; 7b29c (1e:729c) db $08,$20,$1f,$20 db $08,$28,$1e,$20 -FrameBlock12: ; 7b2bd (1e:72bd) +FrameBlock12: db $03 db $00,$00,$37,$00 db $08,$10,$37,$00 db $00,$20,$37,$00 -FrameBlock13: ; 7b2ca (1e:72ca) +FrameBlock13: db $04 db $00,$00,$36,$00 db $00,$08,$36,$20 db $08,$00,$36,$40 db $08,$08,$36,$60 -FrameBlock14: ; 7b2db (1e:72db) +FrameBlock14: db $08 db $00,$10,$28,$00 db $00,$18,$28,$20 @@ -2557,7 +2557,7 @@ FrameBlock14: ; 7b2db (1e:72db) db $08,$20,$36,$40 db $08,$28,$36,$60 -FrameBlock15: ; 7b2fc (1e:72fc) +FrameBlock15: db $0c db $00,$00,$28,$00 db $00,$08,$28,$20 @@ -2572,7 +2572,7 @@ FrameBlock15: ; 7b2fc (1e:72fc) db $08,$20,$38,$00 db $08,$28,$38,$20 -FrameBlock16: ; 7b32d (1e:732d) +FrameBlock16: db $08 db $00,$00,$29,$00 db $00,$08,$29,$20 @@ -2583,60 +2583,60 @@ FrameBlock16: ; 7b32d (1e:732d) db $08,$20,$39,$00 db $08,$28,$39,$20 -FrameBlock17: ; 7b34e (1e:734e) +FrameBlock17: db $04 db $00,$00,$08,$00 db $00,$08,$09,$00 db $08,$00,$18,$00 db $08,$08,$19,$00 -FrameBlock18: ; 7b35f (1e:735f) +FrameBlock18: db $01 db $18,$00,$45,$60 -FrameBlock19: ; 7b364 (1e:7364) +FrameBlock19: db $02 db $18,$08,$45,$00 db $10,$08,$46,$60 -FrameBlock1a: ; 7b36d (1e:736d) +FrameBlock1a: db $02 db $10,$10,$45,$60 db $18,$10,$46,$00 -FrameBlock1b: ; 7b376 (1e:7376) +FrameBlock1b: db $02 db $10,$18,$45,$00 db $08,$18,$46,$60 -FrameBlock1c: ; 7b37f (1e:737f) +FrameBlock1c: db $02 db $08,$20,$45,$60 db $10,$20,$46,$00 -FrameBlock1d: ; 7b388 (1e:7388) +FrameBlock1d: db $02 db $08,$28,$45,$00 db $00,$28,$46,$60 -FrameBlock1e: ; 7b391 (1e:7391) +FrameBlock1e: db $02 db $00,$30,$45,$60 db $08,$30,$46,$00 -FrameBlock75: ; 7b39a (1e:739a) +FrameBlock75: db $04 db $00,$00,$43,$00 db $00,$08,$43,$20 db $08,$00,$22,$00 db $08,$08,$43,$60 -FrameBlock1f: ; 7b3ab (1e:73ab) +FrameBlock1f: db $02 db $00,$00,$03,$00 db $00,$30,$03,$20 -FrameBlock20: ; 7b3b4 (1e:73b4) +FrameBlock20: db $06 db $00,$00,$03,$00 db $00,$30,$03,$20 @@ -2645,7 +2645,7 @@ FrameBlock20: ; 7b3b4 (1e:73b4) db $08,$00,$13,$00 db $08,$30,$13,$20 -FrameBlock21: ; 7b3cd (1e:73cd) +FrameBlock21: db $0c db $00,$00,$03,$00 db $00,$30,$03,$20 @@ -2660,7 +2660,7 @@ FrameBlock21: ; 7b3cd (1e:73cd) db $10,$00,$03,$00 db $10,$30,$03,$20 -FrameBlock22: ; 7b3fe (1e:73fe) +FrameBlock22: db $13 db $00,$00,$03,$00 db $08,$00,$13,$00 @@ -2682,19 +2682,19 @@ FrameBlock22: ; 7b3fe (1e:73fe) db $10,$30,$03,$20 db $18,$30,$13,$20 -FrameBlock23: ; 7b44b (1e:744b) +FrameBlock23: db $04 db $00,$00,$0a,$00 db $00,$08,$0b,$00 db $08,$00,$1a,$00 db $08,$08,$1b,$00 -FrameBlock24: ; 7b45c (1e:745c) +FrameBlock24: db $02 db $08,$00,$0a,$00 db $08,$08,$0b,$00 -FrameBlock25: ; 7b465 (1e:7465) +FrameBlock25: db $0c db $10,$00,$0a,$00 db $10,$08,$0b,$00 @@ -2709,14 +2709,14 @@ FrameBlock25: ; 7b465 (1e:7465) db $10,$20,$1a,$00 db $10,$28,$1b,$00 -FrameBlock26: ; 7b496 (1e:7496) +FrameBlock26: db $04 db $00,$10,$44,$00 db $00,$18,$44,$20 db $08,$10,$44,$40 db $08,$18,$44,$60 -FrameBlock27: ; 7b4a7 (1e:74a7) +FrameBlock27: db $05 db $08,$08,$44,$00 db $08,$10,$44,$20 @@ -2724,7 +2724,7 @@ FrameBlock27: ; 7b4a7 (1e:74a7) db $10,$10,$44,$60 db $00,$18,$47,$00 -FrameBlock28: ; 7b4bc (1e:74bc) +FrameBlock28: db $06 db $10,$00,$44,$00 db $10,$08,$44,$20 @@ -2733,30 +2733,30 @@ FrameBlock28: ; 7b4bc (1e:74bc) db $08,$10,$47,$00 db $02,$16,$47,$00 -FrameBlock29: ; 7b4d5 (1e:74d5) +FrameBlock29: db $04 db $18,$00,$47,$00 db $12,$06,$47,$00 db $0c,$0c,$47,$00 db $06,$12,$47,$00 -FrameBlock2a: ; 7b4e6 (1e:74e6) +FrameBlock2a: db $04 db $00,$00,$44,$00 db $00,$08,$44,$20 db $08,$00,$44,$40 db $08,$08,$44,$60 -FrameBlock2b: ; 7b4f7 (1e:74f7) +FrameBlock2b: db $02 db $06,$02,$47,$00 db $00,$08,$47,$00 -FrameBlock2c: ; 7b500 (1e:7500) +FrameBlock2c: db $01 db $a0,$00,$4d,$00 -FrameBlock2d: ; 7b505 (1e:7505) +FrameBlock2d: db $08 db $00,$00,$26,$00 db $00,$08,$27,$00 @@ -2767,7 +2767,7 @@ FrameBlock2d: ; 7b505 (1e:7505) db $18,$00,$38,$00 db $18,$08,$39,$00 -FrameBlock2e: ; 7b526 (1e:7526) +FrameBlock2e: db $08 db $00,$00,$27,$20 db $00,$08,$26,$20 @@ -2778,25 +2778,25 @@ FrameBlock2e: ; 7b526 (1e:7526) db $18,$00,$39,$20 db $18,$08,$38,$20 -FrameBlock2f: ; 7b547 (1e:7547) +FrameBlock2f: db $04 db $00,$00,$0c,$00 db $00,$08,$0d,$00 db $08,$00,$0c,$40 db $08,$08,$0d,$40 -FrameBlock30: ; 7b558 (1e:7558) +FrameBlock30: db $04 db $00,$00,$44,$00 db $00,$08,$44,$20 db $08,$00,$44,$40 db $08,$08,$44,$60 -FrameBlock31: ; 7b569 (1e:7569) +FrameBlock31: db $01 db $00,$00,$45,$00 -FrameBlock32: ; 7b56e (1e:756e) +FrameBlock32: db $07 db $00,$00,$4d,$00 db $00,$08,$2f,$00 @@ -2806,7 +2806,7 @@ FrameBlock32: ; 7b56e (1e:756e) db $08,$10,$4e,$20 db $10,$08,$3f,$00 -FrameBlock33: ; 7b58b (1e:758b) +FrameBlock33: db $07 db $00,$08,$3f,$40 db $08,$00,$4e,$40 @@ -2816,11 +2816,11 @@ FrameBlock33: ; 7b58b (1e:758b) db $10,$08,$2f,$40 db $10,$10,$4d,$60 -FrameBlock34: ; 7b5a8 (1e:75a8) +FrameBlock34: db $01 db $a0,$00,$00,$10 -FrameBlock35: ; 7b5ad (1e:75ad) +FrameBlock35: db $06 db $00,$00,$2a,$00 db $00,$08,$2b,$00 @@ -2829,42 +2829,42 @@ FrameBlock35: ; 7b5ad (1e:75ad) db $18,$00,$2a,$40 db $18,$08,$2b,$40 -FrameBlock36: ; 7b5c6 (1e:75c6) +FrameBlock36: db $04 db $00,$00,$00,$00 db $00,$08,$01,$00 db $08,$00,$10,$00 db $08,$08,$11,$00 -FrameBlock37: ; 7b5d7 (1e:75d7) +FrameBlock37: db $04 db $00,$00,$01,$a0 db $00,$08,$00,$a0 db $08,$00,$11,$a0 db $08,$08,$10,$a0 -FrameBlock38: ; 7b5e8 (1e:75e8) +FrameBlock38: db $04 db $00,$00,$0a,$00 db $00,$08,$0b,$00 db $08,$00,$1a,$00 db $08,$08,$1b,$00 -FrameBlock39: ; 7b5f9 (1e:75f9) +FrameBlock39: db $04 db $00,$00,$0b,$20 db $00,$08,$0a,$20 db $08,$00,$1b,$20 db $08,$08,$1a,$20 -FrameBlock3a: ; 7b60a (1e:760a) +FrameBlock3a: db $04 db $20,$00,$05,$00 db $20,$08,$05,$20 db $28,$00,$15,$00 db $28,$08,$15,$20 -FrameBlock3b: ; 7b61b (1e:761b) +FrameBlock3b: db $05 db $18,$00,$04,$00 db $18,$08,$04,$20 @@ -2872,7 +2872,7 @@ FrameBlock3b: ; 7b61b (1e:761b) db $20,$08,$14,$20 db $28,$04,$41,$00 -FrameBlock3c: ; 7b630 (1e:7630) +FrameBlock3c: db $06 db $10,$00,$05,$00 db $10,$08,$05,$20 @@ -2881,7 +2881,7 @@ FrameBlock3c: ; 7b630 (1e:7630) db $20,$04,$42,$00 db $28,$04,$42,$00 -FrameBlock3d: ; 7b649 (1e:7649) +FrameBlock3d: db $07 db $08,$00,$04,$00 db $08,$08,$04,$20 @@ -2891,7 +2891,7 @@ FrameBlock3d: ; 7b649 (1e:7649) db $20,$04,$41,$00 db $28,$04,$41,$00 -FrameBlock3e: ; 7b666 (1e:7666) +FrameBlock3e: db $08 db $00,$00,$05,$00 db $00,$08,$05,$20 @@ -2902,7 +2902,7 @@ FrameBlock3e: ; 7b666 (1e:7666) db $20,$04,$42,$00 db $28,$04,$42,$00 -FrameBlock3f: ; 7b687 (1e:7687) +FrameBlock3f: db $08 db $00,$00,$04,$00 db $00,$08,$04,$20 @@ -2913,20 +2913,20 @@ FrameBlock3f: ; 7b687 (1e:7687) db $20,$04,$41,$00 db $28,$04,$41,$00 -FrameBlock40: ; 7b6a8 (1e:76a8) +FrameBlock40: db $03 db $00,$00,$3d,$00 db $00,$08,$3d,$00 db $08,$08,$3d,$00 -FrameBlock41: ; 7b6b5 (1e:76b5) +FrameBlock41: db $04 db $00,$00,$06,$00 db $00,$08,$06,$20 db $08,$00,$16,$00 db $08,$08,$17,$00 -FrameBlock42: ; 7b6c6 (1e:76c6) +FrameBlock42: db $0b db $00,$10,$42,$00 db $08,$00,$42,$00 @@ -2940,7 +2940,7 @@ FrameBlock42: ; 7b6c6 (1e:76c6) db $20,$00,$42,$00 db $20,$20,$42,$00 -FrameBlock43: ; 7b6f3 (1e:76f3) +FrameBlock43: db $0b db $00,$10,$41,$00 db $08,$00,$41,$00 @@ -2954,42 +2954,42 @@ FrameBlock43: ; 7b6f3 (1e:76f3) db $20,$00,$41,$00 db $20,$20,$41,$00 -FrameBlock44: ; 7b720 (1e:7720) +FrameBlock44: db $04 db $00,$00,$49,$00 db $00,$28,$49,$00 db $28,$00,$49,$00 db $28,$28,$49,$00 -FrameBlock45: ; 7b731 (1e:7731) +FrameBlock45: db $04 db $00,$00,$49,$00 db $00,$18,$49,$00 db $18,$00,$49,$00 db $18,$18,$49,$00 -FrameBlock46: ; 7b742 (1e:7742) +FrameBlock46: db $04 db $00,$00,$49,$00 db $00,$08,$49,$00 db $08,$00,$49,$00 db $08,$08,$49,$00 -FrameBlock47: ; 7b753 (1e:7753) +FrameBlock47: db $04 db $00,$00,$43,$00 db $00,$08,$43,$20 db $08,$00,$43,$40 db $08,$08,$43,$60 -SmallBlackCircleFrameBlock: ; 7b764 (1e:7764) +SmallBlackCircleFrameBlock: db $04 db $08,$08,$33,$00 db $08,$10,$33,$20 db $10,$08,$33,$40 db $10,$10,$33,$60 -LargeBlockCircleFrameBlock: ; 7b775 (1e:7775) +LargeBlockCircleFrameBlock: db $10 db $00,$00,$22,$00 db $00,$08,$23,$00 @@ -3008,7 +3008,7 @@ LargeBlockCircleFrameBlock: ; 7b775 (1e:7775) db $18,$10,$23,$60 db $18,$18,$22,$60 -FrameBlock71: ; 7b7b6 (1e:77b6) +FrameBlock71: db $10 db $00,$00,$22,$00 db $00,$08,$3b,$00 @@ -3027,7 +3027,7 @@ FrameBlock71: ; 7b7b6 (1e:77b6) db $18,$10,$23,$60 db $18,$18,$22,$60 -FrameBlock72: ; 7b7f7 (1e:77f7) +FrameBlock72: db $0c db $00,$00,$32,$00 db $00,$08,$43,$00 @@ -3042,7 +3042,7 @@ FrameBlock72: ; 7b7f7 (1e:77f7) db $10,$10,$23,$60 db $10,$18,$22,$60 -FrameBlock73: ; 7b828 (1e:7828) +FrameBlock73: db $08 db $00,$00,$32,$40 db $00,$08,$43,$40 @@ -3053,42 +3053,42 @@ FrameBlock73: ; 7b828 (1e:7828) db $08,$10,$23,$60 db $08,$18,$22,$60 -FrameBlock74: ; 7b849 (1e:7849) +FrameBlock74: db $04 db $00,$00,$22,$40 db $00,$08,$23,$40 db $00,$10,$23,$60 db $00,$18,$22,$60 -FrameBlock4a: ; 7b85a (1e:785a) +FrameBlock4a: db $04 db $08,$18,$4c,$20 db $20,$08,$4b,$00 db $30,$20,$4c,$00 db $18,$30,$4b,$40 -FrameBlock4b: ; 7b86b (1e:786b) +FrameBlock4b: db $04 db $00,$18,$4c,$00 db $20,$00,$4b,$40 db $38,$20,$4c,$20 db $18,$38,$4b,$00 -FrameBlock4c: ; 7b87c (1e:787c) +FrameBlock4c: db $04 db $10,$08,$4a,$40 db $30,$10,$4a,$00 db $28,$30,$4a,$20 db $08,$28,$4a,$60 -FrameBlock4d: ; 7b88d (1e:788d) +FrameBlock4d: db $04 db $08,$00,$4a,$20 db $38,$08,$4a,$60 db $30,$38,$4a,$40 db $00,$30,$4a,$00 -FrameBlock4e: ; 7b89e (1e:789e) +FrameBlock4e: db $08 db $00,$30,$44,$00 db $00,$38,$44,$20 @@ -3099,7 +3099,7 @@ FrameBlock4e: ; 7b89e (1e:789e) db $2e,$0a,$44,$40 db $2e,$12,$44,$60 -FrameBlock4f: ; 7b8bf (1e:78bf) +FrameBlock4f: db $0c db $0e,$22,$44,$00 db $0e,$2a,$44,$20 @@ -3114,7 +3114,7 @@ FrameBlock4f: ; 7b8bf (1e:78bf) db $30,$08,$47,$00 db $2a,$0e,$47,$00 -FrameBlock50: ; 7b8f0 (1e:78f0) +FrameBlock50: db $08 db $06,$32,$47,$00 db $00,$38,$47,$00 @@ -3125,7 +3125,7 @@ FrameBlock50: ; 7b8f0 (1e:78f0) db $2a,$0e,$47,$00 db $24,$14,$47,$00 -FrameBlock51: ; 7b911 (1e:7911) +FrameBlock51: db $08 db $00,$00,$35,$20 db $08,$00,$35,$40 @@ -3136,33 +3136,33 @@ FrameBlock51: ; 7b911 (1e:7911) db $10,$40,$35,$20 db $18,$40,$35,$40 -FrameBlock52: ; 7b932 (1e:7932) +FrameBlock52: db $04 db $00,$00,$2a,$00 db $00,$08,$2b,$00 db $08,$00,$3a,$00 db $08,$08,$3b,$00 -FrameBlock53: ; 7b943 (1e:7943) +FrameBlock53: db $03 db $00,$00,$3f,$00 db $00,$08,$3f,$00 db $08,$06,$3f,$00 -FrameBlock54: ; 7b950 (1e:7950) +FrameBlock54: db $04 db $00,$00,$0e,$00 db $00,$08,$0e,$20 db $08,$00,$0f,$00 db $08,$08,$0f,$20 -FrameBlock55: ; 7b961 (1e:7961) +FrameBlock55: db $03 db $10,$00,$2c,$00 db $10,$08,$3c,$00 db $10,$10,$2d,$00 -FrameBlock56: ; 7b96e (1e:796e) +FrameBlock56: db $06 db $10,$10,$31,$00 db $10,$18,$31,$00 @@ -3171,7 +3171,7 @@ FrameBlock56: ; 7b96e (1e:796e) db $08,$20,$2d,$00 db $10,$20,$2d,$00 -FrameBlock57: ; 7b987 (1e:7987) +FrameBlock57: db $09 db $08,$20,$31,$00 db $10,$20,$31,$00 @@ -3183,7 +3183,7 @@ FrameBlock57: ; 7b987 (1e:7987) db $08,$30,$2d,$00 db $10,$30,$2d,$00 -FrameBlock58: ; 7b9ac (1e:79ac) +FrameBlock58: db $07 db $00,$00,$46,$00 db $08,$02,$47,$00 @@ -3193,11 +3193,11 @@ FrameBlock58: ; 7b9ac (1e:79ac) db $28,$05,$48,$00 db $30,$05,$48,$00 -FrameBlock59: ; 7b9c9 (1e:79c9) +FrameBlock59: db $01 db $00,$00,$42,$00 -FrameBlock5a: ; 7b9ce (1e:79ce) +FrameBlock5a: db $0c db $00,$00,$24,$00 db $00,$08,$25,$00 @@ -3212,14 +3212,14 @@ FrameBlock5a: ; 7b9ce (1e:79ce) db $18,$10,$25,$60 db $18,$18,$24,$60 -FrameBlock5b: ; 7b9ff (1e:79ff) +FrameBlock5b: db $04 db $00,$00,$43,$00 db $00,$08,$43,$20 db $08,$00,$43,$40 db $08,$08,$43,$60 -FrameBlock5c: ; 7ba10 (1e:7a10) +FrameBlock5c: db $08 db $00,$00,$49,$00 db $02,$08,$49,$00 @@ -3230,7 +3230,7 @@ FrameBlock5c: ; 7ba10 (1e:7a10) db $10,$00,$43,$40 db $10,$08,$43,$60 -FrameBlock5d: ; 7ba31 (1e:7a31) +FrameBlock5d: db $0b db $00,$00,$49,$00 db $18,$02,$49,$00 @@ -3244,7 +3244,7 @@ FrameBlock5d: ; 7ba31 (1e:7a31) db $0c,$08,$43,$40 db $0c,$10,$43,$60 -FrameBlock5e: ; 7ba5e (1e:7a5e) +FrameBlock5e: db $0f db $00,$08,$49,$00 db $08,$10,$49,$00 @@ -3262,14 +3262,14 @@ FrameBlock5e: ; 7ba5e (1e:7a5e) db $28,$08,$43,$40 db $28,$10,$43,$60 -FrameBlock5f: ; 7ba9b (1e:7a9b) +FrameBlock5f: db $04 db $00,$00,$49,$00 db $00,$10,$49,$00 db $00,$20,$49,$00 db $00,$30,$49,$00 -FrameBlock60: ; 7baac (1e:7aac) +FrameBlock60: db $08 db $00,$00,$49,$00 db $00,$10,$49,$00 @@ -3280,7 +3280,7 @@ FrameBlock60: ; 7baac (1e:7aac) db $08,$28,$49,$00 db $08,$38,$49,$00 -FrameBlock61: ; 7bacd (1e:7acd) +FrameBlock61: db $0c db $00,$00,$49,$00 db $00,$10,$49,$00 @@ -3295,7 +3295,7 @@ FrameBlock61: ; 7bacd (1e:7acd) db $10,$20,$49,$00 db $10,$30,$49,$00 -FrameBlock62: ; 7bafe (1e:7afe) +FrameBlock62: db $0f db $00,$00,$49,$00 db $00,$10,$49,$00 @@ -3314,7 +3314,7 @@ FrameBlock62: ; 7bafe (1e:7afe) db $18,$28,$49,$00 db $18,$38,$49,$00 ; unused -FrameBlock63: ; 7bb3f (1e:7b3f) +FrameBlock63: db $06 db $10,$00,$26,$00 db $10,$08,$27,$00 @@ -3323,7 +3323,7 @@ FrameBlock63: ; 7bb3f (1e:7b3f) db $00,$20,$26,$00 db $00,$28,$27,$00 -FrameBlock64: ; 7bb58 (1e:7b58) +FrameBlock64: db $06 db $18,$00,$27,$00 db $10,$08,$26,$00 @@ -3332,7 +3332,7 @@ FrameBlock64: ; 7bb58 (1e:7b58) db $08,$20,$27,$00 db $00,$28,$26,$00 -FrameBlock65: ; 7bb71 (1e:7b71) +FrameBlock65: db $06 db $00,$00,$1c,$00 db $00,$08,$1d,$00 @@ -3341,27 +3341,27 @@ FrameBlock65: ; 7bb71 (1e:7b71) db $20,$00,$1c,$00 db $20,$08,$1d,$00 -FrameBlock66: ; 7bb8a (1e:7b8a) +FrameBlock66: db $02 db $00,$00,$03,$00 db $08,$00,$13,$00 -FrameBlock67: ; 7bb93 (1e:7b93) +FrameBlock67: db $01 db $00,$00,$03,$00 -FrameBlock68: ; 7bb98 (1e:7b98) +FrameBlock68: db $04 db $00,$00,$03,$00 db $00,$08,$03,$20 db $08,$00,$13,$00 db $08,$08,$13,$20 -FrameBlock69: ; 7bba9 (1e:7ba9) +FrameBlock69: db $01 db $00,$00,$06,$00 -FrameBlock6a: ; 7bbae (1e:7bae) +FrameBlock6a: db $08 db $00,$00,$2e,$00 db $00,$30,$2e,$20 @@ -3372,7 +3372,7 @@ FrameBlock6a: ; 7bbae (1e:7bae) db $18,$00,$3e,$00 db $18,$30,$3e,$20 -FrameBlock6b: ; 7bbcf (1e:7bcf) +FrameBlock6b: db $08 db $00,$00,$2e,$00 db $00,$20,$2e,$20 @@ -3383,7 +3383,7 @@ FrameBlock6b: ; 7bbcf (1e:7bcf) db $10,$00,$3e,$00 db $10,$20,$3e,$20 -FrameBlock6c: ; 7bbf0 (1e:7bf0) +FrameBlock6c: db $08 db $00,$00,$2e,$00 db $00,$10,$2e,$20 @@ -3394,33 +3394,33 @@ FrameBlock6c: ; 7bbf0 (1e:7bf0) db $08,$00,$3e,$00 db $08,$10,$3e,$20 -FrameBlock6d: ; 7bc11 (1e:7c11) +FrameBlock6d: db $02 db $00,$00,$1e,$00 db $00,$08,$1f,$00 -FrameBlock6e: ; 7bc1a (1e:7c1a) +FrameBlock6e: db $04 db $00,$00,$48,$00 db $00,$08,$48,$20 db $08,$00,$12,$00 db $08,$08,$12,$20 -FrameBlock6f: ; 7bc2b (1e:7c2b) +FrameBlock6f: db $04 db $00,$00,$4a,$00 db $00,$08,$07,$00 db $08,$00,$16,$00 db $08,$08,$17,$00 -FrameBlock70: ; 7bc3c (1e:7c3c) +FrameBlock70: db $04 db $00,$00,$07,$20 db $00,$08,$4a,$20 db $08,$00,$17,$20 db $08,$08,$16,$20 -FrameBlock76: ; 7bc4d (1e:7c4d) +FrameBlock76: db $07 db $00,$10,$2f,$00 db $01,$08,$2f,$00 @@ -3430,22 +3430,22 @@ FrameBlock76: ; 7bc4d (1e:7c4d) db $0a,$00,$3e,$00 db $0a,$20,$3e,$20 -FrameBlock77: ; 7bc6a (1e:7c6a) +FrameBlock77: db $04 db $00,$02,$4b,$00 db $00,$0a,$4c,$00 db $08,$00,$4c,$60 db $08,$08,$4b,$60 -FrameBlock78: ; 7bc7b (1e:7c7b) +FrameBlock78: db $01 db $00,$00,$4d,$00 -FrameBlock79: ; 7bc80 (1e:7c80) +FrameBlock79: db $01 db $00,$00,$4e,$00 -FrameBlockBaseCoords: ; 7bc85 (1e:7c85) +FrameBlockBaseCoords: db $10,$68 db $10,$70 db $10,$78 @@ -3624,5 +3624,5 @@ FrameBlockBaseCoords: ; 7bc85 (1e:7c85) db $1C,$48 db $48,$28 -FrameBlock00: ; 7bde7 (1e:7de7) +FrameBlock00: db $00,$00 diff --git a/data/baseStats/abra.asm b/data/baseStats/abra.asm index 80ee9e06..1a41bb5c 100755..100644 --- a/data/baseStats/abra.asm +++ b/data/baseStats/abra.asm @@ -1,4 +1,3 @@ -AbraBaseStats: ; 38aa6 (e:4aa6) db DEX_ABRA ; pokedex id db 25 ; base hp db 20 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10110001 -db %00000011 -db %00001111 -db %11110000 -db %10000111 -db %00111000 -db %01000011 + tmlearn 1,5,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20 + tmlearn 29,30,31,32 + tmlearn 33,34,35,40 + tmlearn 44,45,46 + tmlearn 49,50,55 db 0 ; padding diff --git a/data/baseStats/aerodactyl.asm b/data/baseStats/aerodactyl.asm index 75067ad3..874dd57d 100755..100644 --- a/data/baseStats/aerodactyl.asm +++ b/data/baseStats/aerodactyl.asm @@ -1,4 +1,3 @@ -AerodactylBaseStats: ; 3934a (e:534a) db DEX_AERODACTYL ; pokedex id db 80 ; base hp db 105 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00101010 -db %01000011 -db %01001000 -db %11000000 -db %01100011 -db %00001100 -db %00001010 + tmlearn 2,4,6 + tmlearn 9,10,15 + tmlearn 20,23 + tmlearn 31,32 + tmlearn 33,34,38,39 + tmlearn 43,44 + tmlearn 50,52 db 0 ; padding diff --git a/data/baseStats/alakazam.asm b/data/baseStats/alakazam.asm index 2ee79e6f..c20b6c41 100755..100644 --- a/data/baseStats/alakazam.asm +++ b/data/baseStats/alakazam.asm @@ -1,4 +1,3 @@ -AlakazamBaseStats: ; 38ade (e:4ade) db DEX_ALAKAZAM ; pokedex id db 55 ; base hp db 50 ; base attack @@ -14,21 +13,16 @@ dw AlakazamPicFront dw AlakazamPicBack ; attacks known at lvl 0 db TELEPORT -IF DEF(_YELLOW) - db KINESIS - db 0 -ELSE - db CONFUSION - db DISABLE -ENDC +db CONFUSION +db DISABLE db 0 db 3 ; growth rate ; learnset -db %10110001 -db %01000011 -db %00001111 -db %11111000 -db %10000111 -db %00111000 -db %01000011 + tmlearn 1,5,6,8 + tmlearn 9,10,15 + tmlearn 17,18,19,20 + tmlearn 28,29,30,31,32 + tmlearn 33,34,35,40 + tmlearn 44,45,46 + tmlearn 49,50,55 db 0 ; padding diff --git a/data/baseStats/arbok.asm b/data/baseStats/arbok.asm index bddcab5b..6beee569 100755..100644 --- a/data/baseStats/arbok.asm +++ b/data/baseStats/arbok.asm @@ -1,4 +1,3 @@ -ArbokBaseStats: ; 38662 (e:4662) db DEX_ARBOK ; pokedex id db 60 ; base hp db 85 ; base attack @@ -19,11 +18,11 @@ db POISON_STING db 0 db 0 ; growth rate ; learnset -db %10100000 -db %01000011 -db %00011000 -db %11001110 -db %10000010 -db %10001000 -db %00100010 + tmlearn 6,8 + tmlearn 9,10,15 + tmlearn 20,21 + tmlearn 26,27,28,31,32 + tmlearn 34,40 + tmlearn 44,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/arcanine.asm b/data/baseStats/arcanine.asm index 065edb6d..2a2dda3b 100755..100644 --- a/data/baseStats/arcanine.asm +++ b/data/baseStats/arcanine.asm @@ -1,4 +1,3 @@ -ArcanineBaseStats: ; 38a36 (e:4a36) db DEX_ARCANINE ; pokedex id db 90 ; base hp db 110 ; base attack @@ -19,11 +18,11 @@ db LEER db TAKE_DOWN db 5 ; growth rate ; learnset -db %10100000 -db %01000011 -db %01001000 -db %11101000 -db %11100011 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10,15 + tmlearn 20,23 + tmlearn 28,30,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/articuno.asm b/data/baseStats/articuno.asm index 811bb884..ef791055 100755..100644 --- a/data/baseStats/articuno.asm +++ b/data/baseStats/articuno.asm @@ -1,4 +1,3 @@ -ArticunoBaseStats: ; 39382 (e:5382) db DEX_ARTICUNO ; pokedex id db 90 ; base hp db 85 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00101010 -db %01111111 -db %00001000 -db %11000000 -db %01000011 -db %00001100 -db %00001010 + tmlearn 2,4,6 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,39 + tmlearn 43,44 + tmlearn 50,52 db 0 ; padding diff --git a/data/baseStats/beedrill.asm b/data/baseStats/beedrill.asm index 9381a63a..6bf091b8 100755..100644 --- a/data/baseStats/beedrill.asm +++ b/data/baseStats/beedrill.asm @@ -1,4 +1,3 @@ -BeedrillBaseStats: ; 38566 (e:4566) db DEX_BEEDRILL ; pokedex id db 65 ; base hp db 80 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00100100 -db %01000011 -db %00011000 -db %11000000 -db %11000011 -db %00001000 -db %00000110 + tmlearn 3,6 + tmlearn 9,10,15 + tmlearn 20,21 + tmlearn 31,32 + tmlearn 33,34,39,40 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/bellsprout.asm b/data/baseStats/bellsprout.asm index e8b7d97a..1c908bbb 100755..100644 --- a/data/baseStats/bellsprout.asm +++ b/data/baseStats/bellsprout.asm @@ -1,4 +1,3 @@ -BellsproutBaseStats: ; 38b4e (e:4b4e) db DEX_BELLSPROUT ; pokedex id db 50 ; base hp db 75 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %00100100 -db %00000011 -db %00111000 -db %11000000 -db %00000011 -db %00001000 -db %00000110 + tmlearn 3,6 + tmlearn 9,10 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/blastoise.asm b/data/baseStats/blastoise.asm index 1ab81327..eaf18b41 100755..100644 --- a/data/baseStats/blastoise.asm +++ b/data/baseStats/blastoise.asm @@ -1,4 +1,3 @@ -BlastoiseBaseStats: ; 384be (e:44be) db DEX_BLASTOISE ; pokedex id db 79 ; base hp db 83 ; base attack @@ -19,11 +18,11 @@ db BUBBLE db WATER_GUN db 3 ; growth rate ; learnset -db %10110001 -db %01111111 -db %00001111 -db %11001110 -db %10000011 -db %00001000 -db %00110010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,18,19,20 + tmlearn 26,27,28,31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/bulbasaur.asm b/data/baseStats/bulbasaur.asm index 5bf8a184..7b3567b5 100755..100644 --- a/data/baseStats/bulbasaur.asm +++ b/data/baseStats/bulbasaur.asm @@ -1,4 +1,4 @@ -BulbasaurBaseStats: ; 383de (e:43de) +MonBaseStats: db DEX_BULBASAUR ; pokedex id db 45 ; base hp db 49 ; base attack @@ -19,11 +19,12 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10100100 -db %00000011 -db %00111000 -db %11000000 -db %00000011 -db %00001000 -db %00000110 + tmlearn 3,6,8 + tmlearn 9,10 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,51 db 0 ; padding +MonBaseStatsEnd: diff --git a/data/baseStats/butterfree.asm b/data/baseStats/butterfree.asm index 593d5f78..c0fb5f6c 100755..100644 --- a/data/baseStats/butterfree.asm +++ b/data/baseStats/butterfree.asm @@ -1,4 +1,3 @@ -ButterfreeBaseStats: ; 38512 (e:4512) db DEX_BUTTERFREE ; pokedex id db 60 ; base hp db 45 ; base attack @@ -19,15 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00101010 -db %01000011 -db %00111000 -db %11110000 -db %01000011 -db %00101000 -IF DEF(_YELLOW) - db %01000010 -ELSE - db %00000010 -ENDC + tmlearn 2,4,6 + tmlearn 9,10,15 + tmlearn 20,21,22 + tmlearn 29,30,31,32 + tmlearn 33,34,39 + tmlearn 44,46 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/caterpie.asm b/data/baseStats/caterpie.asm index 0dab990b..d26bc5d9 100755..100644 --- a/data/baseStats/caterpie.asm +++ b/data/baseStats/caterpie.asm @@ -1,4 +1,3 @@ -CaterpieBaseStats: ; 384da (e:44da) db DEX_CATERPIE ; pokedex id db 45 ; base hp db 30 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 db 0 ; padding diff --git a/data/baseStats/chansey.asm b/data/baseStats/chansey.asm index 130a3d00..434b1c26 100755..100644 --- a/data/baseStats/chansey.asm +++ b/data/baseStats/chansey.asm @@ -1,4 +1,3 @@ -ChanseyBaseStats: ; 3901e (e:501e) db DEX_CHANSEY ; pokedex id db 250 ; base hp db 5 ; base attack @@ -14,20 +13,16 @@ dw ChanseyPicFront dw ChanseyPicBack ; attacks known at lvl 0 db POUND -IF DEF(_YELLOW) - db TAIL_WHIP -ELSE - db DOUBLESLAP -ENDC +db DOUBLESLAP db 0 db 0 db 4 ; growth rate ; learnset -db %10110001 -db %01111111 -db %10101111 -db %11110001 -db %10110111 -db %00111001 -db %01100011 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,18,19,20,22,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,35,37,38,40 + tmlearn 41,44,45,46 + tmlearn 49,50,54,55 db 0 ; padding diff --git a/data/baseStats/charizard.asm b/data/baseStats/charizard.asm index 5cbecb91..2479a60c 100755..100644 --- a/data/baseStats/charizard.asm +++ b/data/baseStats/charizard.asm @@ -1,4 +1,3 @@ -CharizardBaseStats: ; 3846a (e:446a) db DEX_CHARIZARD ; pokedex id db 78 ; base hp db 84 ; base attack @@ -19,15 +18,11 @@ db EMBER db LEER db 3 ; growth rate ; learnset -db %10110101 -db %01000011 -db %01001111 -db %11001110 -db %11100011 -db %00001000 -IF DEF(_YELLOW) - db %00101110 -ELSE - db %00100110 -ENDC + tmlearn 1,3,5,6,8 + tmlearn 9,10,15 + tmlearn 17,18,19,20,23 + tmlearn 26,27,28,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50,51,54 db 0 ; padding diff --git a/data/baseStats/charmander.asm b/data/baseStats/charmander.asm index c9deed08..ccd53458 100755..100644 --- a/data/baseStats/charmander.asm +++ b/data/baseStats/charmander.asm @@ -1,4 +1,3 @@ -CharmanderBaseStats: ; 38432 (e:4432) db DEX_CHARMANDER ; pokedex id db 39 ; base hp db 52 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10110101 -db %00000011 -db %01001111 -db %11001000 -db %11100011 -db %00001000 -db %00100110 + tmlearn 1,3,5,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20,23 + tmlearn 28,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50,51,54 db 0 ; padding diff --git a/data/baseStats/charmeleon.asm b/data/baseStats/charmeleon.asm index 6b2b9ba9..80aa2bca 100755..100644 --- a/data/baseStats/charmeleon.asm +++ b/data/baseStats/charmeleon.asm @@ -1,4 +1,3 @@ -CharmeleonBaseStats: ; 3844e (e:444e) db DEX_CHARMELEON ; pokedex id db 58 ; base hp db 64 ; base attack @@ -19,11 +18,11 @@ db EMBER db 0 db 3 ; growth rate ; learnset -db %10110101 -db %00000011 -db %01001111 -db %11001000 -db %11100011 -db %00001000 -db %00100110 + tmlearn 1,3,5,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20,23 + tmlearn 28,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50,51,54 db 0 ; padding diff --git a/data/baseStats/clefable.asm b/data/baseStats/clefable.asm index 8fee3ec6..17837da4 100755..100644 --- a/data/baseStats/clefable.asm +++ b/data/baseStats/clefable.asm @@ -1,4 +1,3 @@ -ClefableBaseStats: ; 387b2 (e:47b2) db DEX_CLEFABLE ; pokedex id db 95 ; base hp db 70 ; base attack @@ -19,11 +18,11 @@ db MINIMIZE db METRONOME db 4 ; growth rate ; learnset -db %10110001 -db %01111111 -db %10101111 -db %11110001 -db %10100111 -db %00111000 -db %01100011 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,18,19,20,22,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,35,38,40 + tmlearn 44,45,46 + tmlearn 49,50,54,55 db 0 ; padding diff --git a/data/baseStats/clefairy.asm b/data/baseStats/clefairy.asm index bea2ffec..952391c7 100755..100644 --- a/data/baseStats/clefairy.asm +++ b/data/baseStats/clefairy.asm @@ -1,4 +1,3 @@ -ClefairyBaseStats: ; 38796 (e:4796) db DEX_CLEFAIRY ; pokedex id db 70 ; base hp db 45 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 4 ; growth rate ; learnset -db %10110001 -db %00111111 -db %10101111 -db %11110001 -db %10100111 -db %00111000 -db %01100011 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 17,18,19,20,22,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,35,38,40 + tmlearn 44,45,46 + tmlearn 49,50,54,55 db 0 ; padding diff --git a/data/baseStats/cloyster.asm b/data/baseStats/cloyster.asm index d57b651a..10f38bdb 100755..100644 --- a/data/baseStats/cloyster.asm +++ b/data/baseStats/cloyster.asm @@ -1,4 +1,3 @@ -CloysterBaseStats: ; 38db6 (e:4db6) db DEX_CLOYSTER ; pokedex id db 50 ; base hp db 95 ; base attack @@ -19,11 +18,11 @@ db CLAMP db AURORA_BEAM db 5 ; growth rate ; learnset -db %00100000 -db %01111111 -db %00001000 -db %11100000 -db %01001011 -db %01001000 -db %00010011 + tmlearn 6 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20 + tmlearn 30,31,32 + tmlearn 33,34,36,39 + tmlearn 44,47 + tmlearn 49,50,53 db 0 ; padding diff --git a/data/baseStats/cubone.asm b/data/baseStats/cubone.asm index 42bb717c..b1222d98 100755..100644 --- a/data/baseStats/cubone.asm +++ b/data/baseStats/cubone.asm @@ -1,4 +1,3 @@ -CuboneBaseStats: ; 38f22 (e:4f22) db DEX_CUBONE ; pokedex id db 50 ; base hp db 50 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %00111111 -db %00001111 -db %11001110 -db %10100010 -db %00001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 17,18,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,38,40 + tmlearn 44 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/dewgong.asm b/data/baseStats/dewgong.asm index 5246189e..fb0cf2c2 100755..100644 --- a/data/baseStats/dewgong.asm +++ b/data/baseStats/dewgong.asm @@ -1,4 +1,3 @@ -DewgongBaseStats: ; 38d46 (e:4d46) db DEX_DEWGONG ; pokedex id db 90 ; base hp db 70 ; base attack @@ -19,11 +18,11 @@ db AURORA_BEAM db 0 db 0 ; growth rate ; learnset -db %11100000 -db %11111111 -db %00001000 -db %11000000 -db %10000010 -db %00001000 -db %00110010 + tmlearn 6,7,8 + tmlearn 9,10,11,12,13,14,15,16 + tmlearn 20 + tmlearn 31,32 + tmlearn 34,40 + tmlearn 44 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/diglett.asm b/data/baseStats/diglett.asm index 4944572b..8ef6e381 100755..100644 --- a/data/baseStats/diglett.asm +++ b/data/baseStats/diglett.asm @@ -1,4 +1,3 @@ -DiglettBaseStats: ; 3893a (e:493a) db DEX_DIGLETT ; pokedex id db 10 ; base hp db 55 ; base attack @@ -19,15 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %00000011 -db %00001000 -db %11001110 -db %00000010 -db %10001000 -IF DEF(_YELLOW) - db %00000110 -ELSE - db %00000010 -ENDC + tmlearn 6,8 + tmlearn 9,10 + tmlearn 20 + tmlearn 26,27,28,31,32 + tmlearn 34 + tmlearn 44,48 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/ditto.asm b/data/baseStats/ditto.asm index 0a35bf55..90ea4c5e 100755..100644 --- a/data/baseStats/ditto.asm +++ b/data/baseStats/ditto.asm @@ -1,4 +1,3 @@ -DittoBaseStats: ; 39232 (e:5232) db DEX_DITTO ; pokedex id db 48 ; base hp db 48 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 db 0 ; padding diff --git a/data/baseStats/dodrio.asm b/data/baseStats/dodrio.asm index b872ba47..99608f48 100755..100644 --- a/data/baseStats/dodrio.asm +++ b/data/baseStats/dodrio.asm @@ -1,4 +1,3 @@ -DodrioBaseStats: ; 38d0e (e:4d0e) db DEX_DODRIO ; pokedex id db 60 ; base hp db 110 ; base attack @@ -19,11 +18,11 @@ db FURY_ATTACK db 0 db 0 ; growth rate ; learnset -db %10101000 -db %01000011 -db %00001000 -db %11000000 -db %10000011 -db %00001100 -db %00001011 + tmlearn 4,6,8 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,40 + tmlearn 43,44 + tmlearn 49,50,52 db 0 ; padding diff --git a/data/baseStats/doduo.asm b/data/baseStats/doduo.asm index 8070ba33..760c258b 100755..100644 --- a/data/baseStats/doduo.asm +++ b/data/baseStats/doduo.asm @@ -1,4 +1,3 @@ -DoduoBaseStats: ; 38cf2 (e:4cf2) db DEX_DODUO ; pokedex id db 35 ; base hp db 85 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10101000 -db %00000011 -db %00001000 -db %11000000 -db %10000011 -db %00001100 -db %00001011 + tmlearn 4,6,8 + tmlearn 9,10 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,40 + tmlearn 43,44 + tmlearn 49,50,52 db 0 ; padding diff --git a/data/baseStats/dragonair.asm b/data/baseStats/dragonair.asm index 89ff2eef..041300e0 100755..100644 --- a/data/baseStats/dragonair.asm +++ b/data/baseStats/dragonair.asm @@ -1,4 +1,3 @@ -DragonairBaseStats: ; 393f2 (e:53f2) db DEX_DRAGONAIR ; pokedex id db 61 ; base hp db 84 ; base attack @@ -19,11 +18,11 @@ db THUNDER_WAVE db 0 db 5 ; growth rate ; learnset -db %11100000 -db %00111111 -db %11001000 -db %11000001 -db %11100011 -db %00011000 -db %00010010 + tmlearn 6,7,8 + tmlearn 9,10,11,12,13,14 + tmlearn 20,23,24 + tmlearn 25,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44,45 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/dragonite.asm b/data/baseStats/dragonite.asm index 3699955b..442275b2 100755..100644 --- a/data/baseStats/dragonite.asm +++ b/data/baseStats/dragonite.asm @@ -1,4 +1,3 @@ -DragoniteBaseStats: ; 3940e (e:540e) db DEX_DRAGONITE ; pokedex id db 91 ; base hp db 134 ; base attack @@ -19,11 +18,11 @@ db THUNDER_WAVE db AGILITY db 5 ; growth rate ; learnset -db %11100010 -db %01111111 -db %11001000 -db %11000001 -db %11100011 -db %00011000 -db %00110010 + tmlearn 2,6,7,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20,23,24 + tmlearn 25,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44,45 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/dratini.asm b/data/baseStats/dratini.asm index 4837e4a5..5fb5c75d 100755..100644 --- a/data/baseStats/dratini.asm +++ b/data/baseStats/dratini.asm @@ -1,4 +1,3 @@ -DratiniBaseStats: ; 393d6 (e:53d6) db DEX_DRATINI ; pokedex id db 41 ; base hp db 64 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %10100000 -db %00111111 -db %11001000 -db %11000001 -db %11100011 -db %00011000 -db %00010010 + tmlearn 6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 20,23,24 + tmlearn 25,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44,45 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/drowzee.asm b/data/baseStats/drowzee.asm index dfa591bd..452db1bc 100755..100644 --- a/data/baseStats/drowzee.asm +++ b/data/baseStats/drowzee.asm @@ -1,4 +1,3 @@ -DrowzeeBaseStats: ; 38e42 (e:4e42) db DEX_DROWZEE ; pokedex id db 60 ; base hp db 48 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %00000011 -db %00001111 -db %11110000 -db %10000111 -db %00111010 -db %01000011 + tmlearn 1,5,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20 + tmlearn 29,30,31,32 + tmlearn 33,34,35,40 + tmlearn 42,44,45,46 + tmlearn 49,50,55 db 0 ; padding diff --git a/data/baseStats/dugtrio.asm b/data/baseStats/dugtrio.asm index 0c4bad3b..c763680f 100755..100644 --- a/data/baseStats/dugtrio.asm +++ b/data/baseStats/dugtrio.asm @@ -1,4 +1,3 @@ -DugtrioBaseStats: ; 38956 (e:4956) db DEX_DUGTRIO ; pokedex id db 35 ; base hp db 80 ; base attack @@ -19,15 +18,11 @@ db DIG db 0 db 0 ; growth rate ; learnset -db %10100000 -db %01000011 -db %00001000 -db %11001110 -db %00000010 -db %10001000 -IF DEF(_YELLOW) - db %00000110 -ELSE - db %00000010 -ENDC + tmlearn 6,8 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 26,27,28,31,32 + tmlearn 34 + tmlearn 44,48 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/eevee.asm b/data/baseStats/eevee.asm index 978aa4bb..51e36621 100755..100644 --- a/data/baseStats/eevee.asm +++ b/data/baseStats/eevee.asm @@ -1,4 +1,3 @@ -EeveeBaseStats: ; 3924e (e:524e) db DEX_EEVEE ; pokedex id db 55 ; base hp db 55 ; base attack @@ -14,20 +13,16 @@ dw EeveePicFront dw EeveePicBack ; attacks known at lvl 0 db TACKLE -IF DEF(_YELLOW) - db TAIL_WHIP -ELSE - db SAND_ATTACK -ENDC +db SAND_ATTACK db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %00000011 -db %00001000 -db %11000000 -db %11000011 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/ekans.asm b/data/baseStats/ekans.asm index 79dbcbf5..b029a67c 100755..100644 --- a/data/baseStats/ekans.asm +++ b/data/baseStats/ekans.asm @@ -1,4 +1,3 @@ -EkansBaseStats: ; 38646 (e:4646) db DEX_EKANS ; pokedex id db 35 ; base hp db 60 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %00000011 -db %00011000 -db %11001110 -db %10000010 -db %10001000 -db %00100010 + tmlearn 6,8 + tmlearn 9,10 + tmlearn 20,21 + tmlearn 26,27,28,31,32 + tmlearn 34,40 + tmlearn 44,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/electabuzz.asm b/data/baseStats/electabuzz.asm index ac692436..4b44604e 100755..100644 --- a/data/baseStats/electabuzz.asm +++ b/data/baseStats/electabuzz.asm @@ -1,4 +1,3 @@ -ElectabuzzBaseStats: ; 3916e (e:516e) db DEX_ELECTABUZZ ; pokedex id db 65 ; base hp db 83 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %01000011 -db %10001111 -db %11110001 -db %11000111 -db %00111000 -db %01100010 + tmlearn 1,5,6,8 + tmlearn 9,10,15 + tmlearn 17,18,19,20,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,35,39,40 + tmlearn 44,45,46 + tmlearn 50,54,55 db 0 ; padding diff --git a/data/baseStats/electrode.asm b/data/baseStats/electrode.asm index 7ce93e8d..1b292f2f 100755..100644 --- a/data/baseStats/electrode.asm +++ b/data/baseStats/electrode.asm @@ -1,4 +1,3 @@ -ElectrodeBaseStats: ; 38ece (e:4ece) db DEX_ELECTRODE ; pokedex id db 60 ; base hp db 50 ; base attack @@ -19,11 +18,11 @@ db SONICBOOM db 0 db 0 ; growth rate ; learnset -db %00100000 -db %01000001 -db %10001000 -db %11100001 -db %11001011 -db %01011000 -db %01000010 + tmlearn 6 + tmlearn 9,15 + tmlearn 20,24 + tmlearn 25,30,31,32 + tmlearn 33,34,36,39,40 + tmlearn 44,45,47 + tmlearn 50,55 db 0 ; padding diff --git a/data/baseStats/exeggcute.asm b/data/baseStats/exeggcute.asm index ded05789..8503889b 100755..100644 --- a/data/baseStats/exeggcute.asm +++ b/data/baseStats/exeggcute.asm @@ -1,4 +1,3 @@ -ExeggcuteBaseStats: ; 38eea (e:4eea) db DEX_EXEGGCUTE ; pokedex id db 60 ; base hp db 40 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00100000 -db %00000011 -db %00001000 -db %11110000 -db %00011011 -db %01101000 -db %00000010 + tmlearn 6 + tmlearn 9,10 + tmlearn 20 + tmlearn 29,30,31,32 + tmlearn 33,34,36,37 + tmlearn 44,46,47 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/exeggutor.asm b/data/baseStats/exeggutor.asm index e28fb8c8..4d739430 100755..100644 --- a/data/baseStats/exeggutor.asm +++ b/data/baseStats/exeggutor.asm @@ -1,4 +1,3 @@ -ExeggutorBaseStats: ; 38f06 (e:4f06) db DEX_EXEGGUTOR ; pokedex id db 95 ; base hp db 95 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00100000 -db %01000011 -db %00111000 -db %11110000 -db %00011011 -db %01101000 -db %00100010 + tmlearn 6 + tmlearn 9,10,15 + tmlearn 20,21,22 + tmlearn 29,30,31,32 + tmlearn 33,34,36,37 + tmlearn 44,46,47 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/farfetchd.asm b/data/baseStats/farfetchd.asm index 51648c46..2aa7eca0 100755..100644 --- a/data/baseStats/farfetchd.asm +++ b/data/baseStats/farfetchd.asm @@ -1,5 +1,4 @@ -FarfetchdBaseStats: ; 38cd6 (e:4cd6) -db DEX_FARFETCH_D ; pokedex id +db DEX_FARFETCHD ; pokedex id db 52 ; base hp db 65 ; base attack db 55 ; base defense @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10101110 -db %00000011 -db %00001000 -db %11000000 -db %11000011 -db %00001000 -db %00001110 + tmlearn 2,3,4,6,8 + tmlearn 9,10 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,39,40 + tmlearn 44 + tmlearn 50,51,52 db 0 ; padding diff --git a/data/baseStats/fearow.asm b/data/baseStats/fearow.asm index 0a5d0c48..4ad88723 100755..100644 --- a/data/baseStats/fearow.asm +++ b/data/baseStats/fearow.asm @@ -1,4 +1,3 @@ -FearowBaseStats: ; 3862a (e:462a) db DEX_FEAROW ; pokedex id db 65 ; base hp db 90 ; base attack @@ -19,11 +18,11 @@ db LEER db 0 db 0 ; growth rate ; learnset -db %00101010 -db %01000011 -db %00001000 -db %11000000 -db %01000010 -db %00001100 -db %00001010 + tmlearn 2,4,6 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 34,39 + tmlearn 43,44 + tmlearn 50,52 db 0 ; padding diff --git a/data/baseStats/flareon.asm b/data/baseStats/flareon.asm index ce4a8f0a..70621a6a 100755..100644 --- a/data/baseStats/flareon.asm +++ b/data/baseStats/flareon.asm @@ -1,4 +1,3 @@ -FlareonBaseStats: ; 392a2 (e:52a2) db DEX_FLAREON ; pokedex id db 65 ; base hp db 130 ; base attack @@ -14,20 +13,16 @@ dw FlareonPicFront dw FlareonPicBack ; attacks known at lvl 0 db TACKLE -IF DEF(_YELLOW) - db TAIL_WHIP -ELSE - db SAND_ATTACK -ENDC +db SAND_ATTACK db QUICK_ATTACK db EMBER db 0 ; growth rate ; learnset -db %10100000 -db %01000011 -db %00001000 -db %11000000 -db %11100011 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/gastly.asm b/data/baseStats/gastly.asm index ca6c2285..fdcaaa71 100755..100644 --- a/data/baseStats/gastly.asm +++ b/data/baseStats/gastly.asm @@ -1,4 +1,3 @@ -GastlyBaseStats: ; 38dd2 (e:4dd2) db DEX_GASTLY ; pokedex id db 30 ; base hp db 35 ; base attack @@ -19,11 +18,11 @@ db NIGHT_SHADE db 0 db 3 ; growth rate ; learnset -db %00100000 -db %00000000 -db %10011000 -db %11010001 -db %00001010 -db %01101010 -db %00000010 + tmlearn 6 + tmlearn 0 + tmlearn 20,21,24 + tmlearn 25,29,31,32 + tmlearn 34,36 + tmlearn 42,44,46,47 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/gengar.asm b/data/baseStats/gengar.asm index a5881476..0e3e877c 100755..100644 --- a/data/baseStats/gengar.asm +++ b/data/baseStats/gengar.asm @@ -1,4 +1,3 @@ -GengarBaseStats: ; 38e0a (e:4e0a) db DEX_GENGAR ; pokedex id db 60 ; base hp db 65 ; base attack @@ -19,11 +18,11 @@ db NIGHT_SHADE db 0 db 3 ; growth rate ; learnset -db %10110001 -db %01000011 -db %10011111 -db %11010001 -db %10001110 -db %01101010 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10,15 + tmlearn 17,18,19,20,21,24 + tmlearn 25,29,31,32 + tmlearn 34,35,36,40 + tmlearn 42,44,46,47 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/geodude.asm b/data/baseStats/geodude.asm index 52d3553d..a47a993a 100755..100644 --- a/data/baseStats/geodude.asm +++ b/data/baseStats/geodude.asm @@ -1,4 +1,3 @@ -GeodudeBaseStats: ; 38bda (e:4bda) db DEX_GEODUDE ; pokedex id db 40 ; base hp db 80 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10100001 -db %00000011 -db %00001111 -db %11001110 -db %00101110 -db %11001000 -db %00100010 + tmlearn 1,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,35,36,38 + tmlearn 44,47,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/gloom.asm b/data/baseStats/gloom.asm index e2c854d4..f2153e5c 100755..100644 --- a/data/baseStats/gloom.asm +++ b/data/baseStats/gloom.asm @@ -1,4 +1,3 @@ -GloomBaseStats: ; 38892 (e:4892) db DEX_GLOOM ; pokedex id db 60 ; base hp db 65 ; base attack @@ -19,11 +18,11 @@ db STUN_SPORE db 0 db 3 ; growth rate ; learnset -db %00100100 -db %00000011 -db %00111000 -db %11000000 -db %00000011 -db %00001000 -db %00000110 + tmlearn 3,6 + tmlearn 9,10 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/golbat.asm b/data/baseStats/golbat.asm index d89dcb1e..845adf4b 100755..100644 --- a/data/baseStats/golbat.asm +++ b/data/baseStats/golbat.asm @@ -1,4 +1,3 @@ -GolbatBaseStats: ; 3885a (e:485a) db DEX_GOLBAT ; pokedex id db 75 ; base hp db 80 ; base attack @@ -19,11 +18,11 @@ db BITE db 0 db 0 ; growth rate ; learnset -db %00101010 -db %01000011 -db %00011000 -db %11000000 -db %01000010 -db %00001000 -db %00000010 + tmlearn 2,4,6 + tmlearn 9,10,15 + tmlearn 20,21 + tmlearn 31,32 + tmlearn 34,39 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/goldeen.asm b/data/baseStats/goldeen.asm index 17afd3c2..ed3a4fdb 100755..100644 --- a/data/baseStats/goldeen.asm +++ b/data/baseStats/goldeen.asm @@ -1,4 +1,3 @@ -GoldeenBaseStats: ; 390aa (e:50aa) db DEX_GOLDEEN ; pokedex id db 45 ; base hp db 67 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %01100000 -db %00111111 -db %00001000 -db %11000000 -db %11000010 -db %00001000 -db %00010010 + tmlearn 6,7 + tmlearn 9,10,11,12,13,14 + tmlearn 20 + tmlearn 31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/golduck.asm b/data/baseStats/golduck.asm index f3797f73..cce89da7 100755..100644 --- a/data/baseStats/golduck.asm +++ b/data/baseStats/golduck.asm @@ -1,4 +1,3 @@ -GolduckBaseStats: ; 389c6 (e:49c6) db DEX_GOLDUCK ; pokedex id db 80 ; base hp db 82 ; base attack @@ -19,11 +18,11 @@ db DISABLE db 0 db 0 ; growth rate ; learnset -db %10110001 -db %11111111 -db %00001111 -db %11001000 -db %11000010 -db %00001000 -db %00110010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15,16 + tmlearn 17,18,19,20 + tmlearn 28,31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/golem.asm b/data/baseStats/golem.asm index deebb1d1..28f2a326 100755..100644 --- a/data/baseStats/golem.asm +++ b/data/baseStats/golem.asm @@ -1,4 +1,3 @@ -GolemBaseStats: ; 38c12 (e:4c12) db DEX_GOLEM ; pokedex id db 80 ; base hp db 110 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10110001 -db %01000011 -db %00001111 -db %11001110 -db %00101110 -db %11001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10,15 + tmlearn 17,18,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,35,36,38 + tmlearn 44,47,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/graveler.asm b/data/baseStats/graveler.asm index 586afc2c..08776ab1 100755..100644 --- a/data/baseStats/graveler.asm +++ b/data/baseStats/graveler.asm @@ -1,4 +1,3 @@ -GravelerBaseStats: ; 38bf6 (e:4bf6) db DEX_GRAVELER ; pokedex id db 55 ; base hp db 95 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10100001 -db %00000011 -db %00001111 -db %11001110 -db %00101110 -db %11001000 -db %00100010 + tmlearn 1,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,35,36,38 + tmlearn 44,47,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/grimer.asm b/data/baseStats/grimer.asm index dd17fb05..5f7a64a7 100755..100644 --- a/data/baseStats/grimer.asm +++ b/data/baseStats/grimer.asm @@ -1,4 +1,3 @@ -GrimerBaseStats: ; 38d62 (e:4d62) db DEX_GRIMER ; pokedex id db 80 ; base hp db 80 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %00000000 -db %10011000 -db %11000001 -db %00101010 -db %01001000 -db %00000010 + tmlearn 6,8 + tmlearn 0 + tmlearn 20,21,24 + tmlearn 25,31,32 + tmlearn 34,36,38 + tmlearn 44,47 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/growlithe.asm b/data/baseStats/growlithe.asm index ec48b605..df305636 100755..100644 --- a/data/baseStats/growlithe.asm +++ b/data/baseStats/growlithe.asm @@ -1,4 +1,3 @@ -GrowlitheBaseStats: ; 38a1a (e:4a1a) db DEX_GROWLITHE ; pokedex id db 55 ; base hp db 70 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %10100000 -db %00000011 -db %01001000 -db %11001000 -db %11100011 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10 + tmlearn 20,23 + tmlearn 28,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/gyarados.asm b/data/baseStats/gyarados.asm index c9e6dc31..6bfc34a0 100755..100644 --- a/data/baseStats/gyarados.asm +++ b/data/baseStats/gyarados.asm @@ -1,4 +1,3 @@ -GyaradosBaseStats: ; 391fa (e:51fa) db DEX_GYARADOS ; pokedex id db 95 ; base hp db 125 ; base attack @@ -13,24 +12,17 @@ INCBIN "pic/bmon/gyarados.pic",0,1 ; 77, sprite dimensions dw GyaradosPicFront dw GyaradosPicBack ; attacks known at lvl 0 -IF DEF(_YELLOW) -db TACKLE -db 0 -db 0 -db 0 -ELSE db BITE db DRAGON_RAGE db LEER db HYDRO_PUMP -ENDC db 5 ; growth rate ; learnset -db %10100000 -db %01111111 -db %11001000 -db %11000001 -db %10100011 -db %00001000 -db %00110010 + tmlearn 6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20,23,24 + tmlearn 25,31,32 + tmlearn 33,34,38,40 + tmlearn 44 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/haunter.asm b/data/baseStats/haunter.asm index 6ac7db99..bd39eaf4 100755..100644 --- a/data/baseStats/haunter.asm +++ b/data/baseStats/haunter.asm @@ -1,4 +1,3 @@ -HaunterBaseStats: ; 38dee (e:4dee) db DEX_HAUNTER ; pokedex id db 45 ; base hp db 50 ; base attack @@ -19,11 +18,11 @@ db NIGHT_SHADE db 0 db 3 ; growth rate ; learnset -db %00100000 -db %00000000 -db %10011000 -db %11010001 -db %00001010 -db %01101010 -db %00000010 + tmlearn 6 + tmlearn 0 + tmlearn 20,21,24 + tmlearn 25,29,31,32 + tmlearn 34,36 + tmlearn 42,44,46,47 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/hitmonchan.asm b/data/baseStats/hitmonchan.asm index 9cb0d566..37021f65 100755..100644 --- a/data/baseStats/hitmonchan.asm +++ b/data/baseStats/hitmonchan.asm @@ -1,4 +1,3 @@ -HitmonchanBaseStats: ; 38f76 (e:4f76) db DEX_HITMONCHAN ; pokedex id db 50 ; base hp db 105 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %00000011 -db %00001111 -db %11000000 -db %11000110 -db %00001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20 + tmlearn 31,32 + tmlearn 34,35,39,40 + tmlearn 44 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/hitmonlee.asm b/data/baseStats/hitmonlee.asm index 126f528b..d16db130 100755..100644 --- a/data/baseStats/hitmonlee.asm +++ b/data/baseStats/hitmonlee.asm @@ -1,4 +1,3 @@ -HitmonleeBaseStats: ; 38f5a (e:4f5a) db DEX_HITMONLEE ; pokedex id db 50 ; base hp db 120 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %00000011 -db %00001111 -db %11000000 -db %11000110 -db %00001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20 + tmlearn 31,32 + tmlearn 34,35,39,40 + tmlearn 44 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/horsea.asm b/data/baseStats/horsea.asm index f59bee0c..01de3ff6 100755..100644 --- a/data/baseStats/horsea.asm +++ b/data/baseStats/horsea.asm @@ -1,4 +1,3 @@ -HorseaBaseStats: ; 39072 (e:5072) db DEX_HORSEA ; pokedex id db 30 ; base hp db 40 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00100000 -db %00111111 -db %00001000 -db %11000000 -db %11000010 -db %00001000 -db %00010010 + tmlearn 6 + tmlearn 9,10,11,12,13,14 + tmlearn 20 + tmlearn 31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/hypno.asm b/data/baseStats/hypno.asm index 022e3134..4e4959b4 100755..100644 --- a/data/baseStats/hypno.asm +++ b/data/baseStats/hypno.asm @@ -1,4 +1,3 @@ -HypnoBaseStats: ; 38e5e (e:4e5e) db DEX_HYPNO ; pokedex id db 85 ; base hp db 73 ; base attack @@ -19,11 +18,11 @@ db DISABLE db CONFUSION db 0 ; growth rate ; learnset -db %10110001 -db %01000011 -db %00001111 -db %11110000 -db %10000111 -db %00111010 -db %01000011 + tmlearn 1,5,6,8 + tmlearn 9,10,15 + tmlearn 17,18,19,20 + tmlearn 29,30,31,32 + tmlearn 33,34,35,40 + tmlearn 42,44,45,46 + tmlearn 49,50,55 db 0 ; padding diff --git a/data/baseStats/ivysaur.asm b/data/baseStats/ivysaur.asm index 78aec210..3e19f2a1 100755..100644 --- a/data/baseStats/ivysaur.asm +++ b/data/baseStats/ivysaur.asm @@ -1,4 +1,3 @@ -IvysaurBaseStats: ; 383fa (e:43fa) db DEX_IVYSAUR ; pokedex id db 60 ; base hp db 62 ; base attack @@ -19,11 +18,11 @@ db LEECH_SEED db 0 db 3 ; growth rate ; learnset -db %10100100 -db %00000011 -db %00111000 -db %11000000 -db %00000011 -db %00001000 -db %00000110 + tmlearn 3,6,8 + tmlearn 9,10 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/jigglypuff.asm b/data/baseStats/jigglypuff.asm index 0252880f..fac03fc9 100755..100644 --- a/data/baseStats/jigglypuff.asm +++ b/data/baseStats/jigglypuff.asm @@ -1,4 +1,3 @@ -JigglypuffBaseStats: ; 38806 (e:4806) db DEX_JIGGLYPUFF ; pokedex id db 115 ; base hp db 45 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 4 ; growth rate ; learnset -db %10110001 -db %00111111 -db %10101111 -db %11110001 -db %10100011 -db %00111000 -db %01100011 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 17,18,19,20,22,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,38,40 + tmlearn 44,45,46 + tmlearn 49,50,54,55 db 0 ; padding diff --git a/data/baseStats/jolteon.asm b/data/baseStats/jolteon.asm index 5dc3532a..b33d6327 100755..100644 --- a/data/baseStats/jolteon.asm +++ b/data/baseStats/jolteon.asm @@ -1,4 +1,3 @@ -JolteonBaseStats: ; 39286 (e:5286) db DEX_JOLTEON ; pokedex id db 65 ; base hp db 65 ; base attack @@ -14,20 +13,16 @@ dw JolteonPicFront dw JolteonPicBack ; attacks known at lvl 0 db TACKLE -IF DEF(_YELLOW) - db TAIL_WHIP -ELSE - db SAND_ATTACK -ENDC +db SAND_ATTACK db QUICK_ATTACK db THUNDERSHOCK db 0 ; growth rate ; learnset -db %10100000 -db %01000011 -db %10001000 -db %11000001 -db %11000011 -db %00011000 -db %01000010 + tmlearn 6,8 + tmlearn 9,10,15 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 33,34,39,40 + tmlearn 44,45 + tmlearn 50,55 db 0 ; padding diff --git a/data/baseStats/jynx.asm b/data/baseStats/jynx.asm index 6299f545..e69b87b9 100755..100644 --- a/data/baseStats/jynx.asm +++ b/data/baseStats/jynx.asm @@ -1,4 +1,3 @@ -JynxBaseStats: ; 39152 (e:5152) db DEX_JYNX ; pokedex id db 65 ; base hp db 50 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %01111111 -db %00001111 -db %11110000 -db %10000111 -db %00101000 -db %00000010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,18,19,20 + tmlearn 29,30,31,32 + tmlearn 33,34,35,40 + tmlearn 44,46 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/kabuto.asm b/data/baseStats/kabuto.asm index 8a9899c7..60f3e959 100755..100644 --- a/data/baseStats/kabuto.asm +++ b/data/baseStats/kabuto.asm @@ -1,4 +1,3 @@ -KabutoBaseStats: ; 39312 (e:5312) db DEX_KABUTO ; pokedex id db 30 ; base hp db 80 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %00111111 -db %00001000 -db %11000000 -db %00000011 -db %00001000 -db %00010010 + tmlearn 6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/kabutops.asm b/data/baseStats/kabutops.asm index 7c80a8c0..dbddab2e 100755..100644 --- a/data/baseStats/kabutops.asm +++ b/data/baseStats/kabutops.asm @@ -1,4 +1,3 @@ -KabutopsBaseStats: ; 3932e (e:532e) db DEX_KABUTOPS ; pokedex id db 60 ; base hp db 115 ; base attack @@ -19,11 +18,11 @@ db ABSORB db 0 db 0 ; growth rate ; learnset -db %10110110 -db %01111111 -db %00001101 -db %11000000 -db %10000011 -db %00001000 -db %00010010 + tmlearn 2,3,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,19,20 + tmlearn 31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/kadabra.asm b/data/baseStats/kadabra.asm index 85ee8a35..472cc4c5 100755..100644 --- a/data/baseStats/kadabra.asm +++ b/data/baseStats/kadabra.asm @@ -1,4 +1,3 @@ -KadabraBaseStats: ; 38ac2 (e:4ac2) db DEX_KADABRA ; pokedex id db 40 ; base hp db 35 ; base attack @@ -14,21 +13,16 @@ dw KadabraPicFront dw KadabraPicBack ; attacks known at lvl 0 db TELEPORT -IF DEF(_YELLOW) - DB KINESIS - db 0 -ELSE - db CONFUSION - db DISABLE -ENDC +db CONFUSION +db DISABLE db 0 db 3 ; growth rate ; learnset -db %10110001 -db %00000011 -db %00001111 -db %11111000 -db %10000111 -db %00111000 -db %01000011 + tmlearn 1,5,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20 + tmlearn 28,29,30,31,32 + tmlearn 33,34,35,40 + tmlearn 44,45,46 + tmlearn 49,50,55 db 0 ; padding diff --git a/data/baseStats/kakuna.asm b/data/baseStats/kakuna.asm index 62e9c225..ec593f91 100755..100644 --- a/data/baseStats/kakuna.asm +++ b/data/baseStats/kakuna.asm @@ -1,4 +1,3 @@ -KakunaBaseStats: ; 3854a (e:454a) db DEX_KAKUNA ; pokedex id db 45 ; base hp db 25 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 db 0 ; padding diff --git a/data/baseStats/kangaskhan.asm b/data/baseStats/kangaskhan.asm index 3d30b78a..6dcd1e3c 100755..100644 --- a/data/baseStats/kangaskhan.asm +++ b/data/baseStats/kangaskhan.asm @@ -1,4 +1,3 @@ -KangaskhanBaseStats: ; 39056 (e:5056) db DEX_KANGASKHAN ; pokedex id db 105 ; base hp db 95 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %01111111 -db %10001111 -db %11000111 -db %10100010 -db %10001000 -db %00110010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,18,19,20,24 + tmlearn 25,26,27,31,32 + tmlearn 34,38,40 + tmlearn 44,48 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/kingler.asm b/data/baseStats/kingler.asm index 8a5b0f98..8708d5cf 100755..100644 --- a/data/baseStats/kingler.asm +++ b/data/baseStats/kingler.asm @@ -1,4 +1,3 @@ -KinglerBaseStats: ; 38e96 (e:4e96) db DEX_KINGLER ; pokedex id db 55 ; base hp db 130 ; base attack @@ -19,11 +18,11 @@ db VICEGRIP db 0 db 0 ; growth rate ; learnset -db %10100100 -db %01111111 -db %00001000 -db %11000000 -db %00000010 -db %00001000 -db %00110110 + tmlearn 3,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 34 + tmlearn 44 + tmlearn 50,51,53,54 db 0 ; padding diff --git a/data/baseStats/koffing.asm b/data/baseStats/koffing.asm index d50e5bcf..fced6246 100755..100644 --- a/data/baseStats/koffing.asm +++ b/data/baseStats/koffing.asm @@ -1,4 +1,3 @@ -KoffingBaseStats: ; 38fae (e:4fae) db DEX_KOFFING ; pokedex id db 40 ; base hp db 65 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00100000 -db %00000000 -db %10001000 -db %11000001 -db %00101010 -db %01001000 -db %00000010 + tmlearn 6 + tmlearn 0 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 34,36,38 + tmlearn 44,47 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/krabby.asm b/data/baseStats/krabby.asm index 37bbaa0b..88d690b6 100755..100644 --- a/data/baseStats/krabby.asm +++ b/data/baseStats/krabby.asm @@ -1,4 +1,3 @@ -KrabbyBaseStats: ; 38e7a (e:4e7a) db DEX_KRABBY ; pokedex id db 30 ; base hp db 105 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100100 -db %00111111 -db %00001000 -db %11000000 -db %00000010 -db %00001000 -db %00110110 + tmlearn 3,6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 20 + tmlearn 31,32 + tmlearn 34 + tmlearn 44 + tmlearn 50,51,53,54 db 0 ; padding diff --git a/data/baseStats/lapras.asm b/data/baseStats/lapras.asm index cd4ea5b1..3a897525 100755..100644 --- a/data/baseStats/lapras.asm +++ b/data/baseStats/lapras.asm @@ -1,4 +1,3 @@ -LaprasBaseStats: ; 39216 (e:5216) db DEX_LAPRAS ; pokedex id db 130 ; base hp db 85 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %11100000 -db %01111111 -db %11101000 -db %11010001 -db %10000011 -db %00101000 -db %00110010 + tmlearn 6,7,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20,22,23,24 + tmlearn 25,29,31,32 + tmlearn 33,34,40 + tmlearn 44,46 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/lickitung.asm b/data/baseStats/lickitung.asm index 8ada934e..05020627 100755..100644 --- a/data/baseStats/lickitung.asm +++ b/data/baseStats/lickitung.asm @@ -1,4 +1,3 @@ -LickitungBaseStats: ; 38f92 (e:4f92) db DEX_LICKITUNG ; pokedex id db 90 ; base hp db 55 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110101 -db %01111111 -db %10001111 -db %11000111 -db %10100010 -db %00001000 -db %00110110 + tmlearn 1,3,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,18,19,20,24 + tmlearn 25,26,27,31,32 + tmlearn 34,38,40 + tmlearn 44 + tmlearn 50,51,53,54 db 0 ; padding diff --git a/data/baseStats/machamp.asm b/data/baseStats/machamp.asm index 1c10c96e..b461d45a 100755..100644 --- a/data/baseStats/machamp.asm +++ b/data/baseStats/machamp.asm @@ -1,4 +1,3 @@ -MachampBaseStats: ; 38b32 (e:4b32) db DEX_MACHAMP ; pokedex id db 90 ; base hp db 130 ; base attack @@ -19,11 +18,11 @@ db LEER db 0 db 3 ; growth rate ; learnset -db %10110001 -db %01000011 -db %00001111 -db %11001110 -db %10100110 -db %10001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10,15 + tmlearn 17,18,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,35,38,40 + tmlearn 44,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/machoke.asm b/data/baseStats/machoke.asm index 7b491641..b8a41efd 100755..100644 --- a/data/baseStats/machoke.asm +++ b/data/baseStats/machoke.asm @@ -1,4 +1,3 @@ -MachokeBaseStats: ; 38b16 (e:4b16) db DEX_MACHOKE ; pokedex id db 80 ; base hp db 100 ; base attack @@ -19,11 +18,11 @@ db LEER db 0 db 3 ; growth rate ; learnset -db %10110001 -db %00000011 -db %00001111 -db %11001110 -db %10100110 -db %10001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,35,38,40 + tmlearn 44,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/machop.asm b/data/baseStats/machop.asm index c951163f..9ed22dc2 100755..100644 --- a/data/baseStats/machop.asm +++ b/data/baseStats/machop.asm @@ -1,4 +1,3 @@ -MachopBaseStats: ; 38afa (e:4afa) db DEX_MACHOP ; pokedex id db 70 ; base hp db 80 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10110001 -db %00000011 -db %00001111 -db %11001110 -db %10100110 -db %10001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10 + tmlearn 17,18,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,35,38,40 + tmlearn 44,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/magikarp.asm b/data/baseStats/magikarp.asm index 606bf755..50cc651c 100755..100644 --- a/data/baseStats/magikarp.asm +++ b/data/baseStats/magikarp.asm @@ -1,4 +1,3 @@ -MagikarpBaseStats: ; 391de (e:51de) db DEX_MAGIKARP ; pokedex id db 20 ; base hp db 10 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 db 0 ; padding diff --git a/data/baseStats/magmar.asm b/data/baseStats/magmar.asm index a360fe9d..379e91df 100755..100644 --- a/data/baseStats/magmar.asm +++ b/data/baseStats/magmar.asm @@ -1,4 +1,3 @@ -MagmarBaseStats: ; 3918a (e:518a) db DEX_MAGMAR ; pokedex id db 65 ; base hp db 95 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %01000011 -db %00001111 -db %11110000 -db %10100110 -db %00101000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10,15 + tmlearn 17,18,19,20 + tmlearn 29,30,31,32 + tmlearn 34,35,38,40 + tmlearn 44,46 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/magnemite.asm b/data/baseStats/magnemite.asm index 166e2fb0..ce042457 100755..100644 --- a/data/baseStats/magnemite.asm +++ b/data/baseStats/magnemite.asm @@ -1,4 +1,3 @@ -MagnemiteBaseStats: ; 38c9e (e:4c9e) db DEX_MAGNEMITE ; pokedex id db 25 ; base hp db 35 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00100000 -db %00000011 -db %10001000 -db %11100001 -db %01000011 -db %00011000 -db %01000010 + tmlearn 6 + tmlearn 9,10 + tmlearn 20,24 + tmlearn 25,30,31,32 + tmlearn 33,34,39 + tmlearn 44,45 + tmlearn 50,55 db 0 ; padding diff --git a/data/baseStats/magneton.asm b/data/baseStats/magneton.asm index 92ae9760..a2890bbd 100755..100644 --- a/data/baseStats/magneton.asm +++ b/data/baseStats/magneton.asm @@ -1,4 +1,3 @@ -MagnetonBaseStats: ; 38cba (e:4cba) db DEX_MAGNETON ; pokedex id db 50 ; base hp db 60 ; base attack @@ -19,11 +18,11 @@ db THUNDERSHOCK db 0 db 0 ; growth rate ; learnset -db %00100000 -db %01000011 -db %10001000 -db %11100001 -db %01000011 -db %00011000 -db %01000010 + tmlearn 6 + tmlearn 9,10,15 + tmlearn 20,24 + tmlearn 25,30,31,32 + tmlearn 33,34,39 + tmlearn 44,45 + tmlearn 50,55 db 0 ; padding diff --git a/data/baseStats/mankey.asm b/data/baseStats/mankey.asm index 13e77c5c..406a1364 100755..100644 --- a/data/baseStats/mankey.asm +++ b/data/baseStats/mankey.asm @@ -1,4 +1,3 @@ -MankeyBaseStats: ; 389e2 (e:49e2) db DEX_MANKEY ; pokedex id db 40 ; base hp db 80 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %10000011 -db %10001111 -db %11001001 -db %11000110 -db %10001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10,16 + tmlearn 17,18,19,20,24 + tmlearn 25,28,31,32 + tmlearn 34,35,39,40 + tmlearn 44,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/marowak.asm b/data/baseStats/marowak.asm index 64bfb0d6..3b90dbb1 100755..100644 --- a/data/baseStats/marowak.asm +++ b/data/baseStats/marowak.asm @@ -1,4 +1,3 @@ -MarowakBaseStats: ; 38f3e (e:4f3e) db DEX_MAROWAK ; pokedex id db 60 ; base hp db 80 ; base attack @@ -14,22 +13,16 @@ dw MarowakPicFront dw MarowakPicBack ; attacks known at lvl 0 db BONE_CLUB -IF DEF(_YELLOW) - db TAIL_WHIP - db 0 - db 0 -ELSE - db GROWL - db LEER - db FOCUS_ENERGY -ENDC +db GROWL +db LEER +db FOCUS_ENERGY db 0 ; growth rate ; learnset -db %10110001 -db %01111111 -db %00001111 -db %11001110 -db %10100010 -db %00001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,18,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,38,40 + tmlearn 44 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/meowth.asm b/data/baseStats/meowth.asm index dc404d20..dc146cf3 100755..100644 --- a/data/baseStats/meowth.asm +++ b/data/baseStats/meowth.asm @@ -1,4 +1,3 @@ -MeowthBaseStats: ; 38972 (e:4972) db DEX_MEOWTH ; pokedex id db 40 ; base hp db 45 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %10001111 -db %10001000 -db %11000001 -db %11000010 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10,11,12,16 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/metapod.asm b/data/baseStats/metapod.asm index 71a2be28..9da351ad 100755..100644 --- a/data/baseStats/metapod.asm +++ b/data/baseStats/metapod.asm @@ -1,4 +1,3 @@ -MetapodBaseStats: ; 384f6 (e:44f6) db DEX_METAPOD ; pokedex id db 50 ; base hp db 20 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 db 0 ; padding diff --git a/data/baseStats/mew.asm b/data/baseStats/mew.asm index 16634430..6919fd0e 100755..100644 --- a/data/baseStats/mew.asm +++ b/data/baseStats/mew.asm @@ -1,4 +1,4 @@ -MewBaseStats: ; 425b (1:425b) +MewBaseStats: db DEX_MEW ; pokedex id db 100 ; base hp db 100 ; base attack @@ -18,12 +18,12 @@ db 0 db 0 db 0 db 3 ; growth rate -; include learnset directly -db %11111111 -db %11111111 -db %11111111 -db %11111111 -db %11111111 -db %11111111 -db %11111111 +; learnset + tmlearn 1,2,3,4,5,6,7,8 + tmlearn 9,10,11,12,13,14,15,16 + tmlearn 17,18,19,20,21,22,23,24 + tmlearn 25,26,27,28,29,30,31,32 + tmlearn 33,34,35,36,37,38,39,40 + tmlearn 41,42,43,44,45,46,47,48 + tmlearn 49,50,51,52,53,54,55,56 db %11111111 ; usually spacing diff --git a/data/baseStats/mewtwo.asm b/data/baseStats/mewtwo.asm index 29b0b61b..dc597345 100755..100644 --- a/data/baseStats/mewtwo.asm +++ b/data/baseStats/mewtwo.asm @@ -1,4 +1,3 @@ -MewtwoBaseStats: ; 3942a (e:542a) db DEX_MEWTWO ; pokedex id db 106 ; base hp db 110 ; base attack @@ -19,11 +18,11 @@ db SWIFT db PSYCHIC_M db 5 ; growth rate ; learnset -db %10110001 -db %11111111 -db %10101111 -db %11110001 -db %10101111 -db %00111000 -db %01100011 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15,16 + tmlearn 17,18,19,20,22,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,35,36,38,40 + tmlearn 44,45,46 + tmlearn 49,50,54,55 db 0 ; padding diff --git a/data/baseStats/moltres.asm b/data/baseStats/moltres.asm index eeeb5367..e9437405 100755..100644 --- a/data/baseStats/moltres.asm +++ b/data/baseStats/moltres.asm @@ -1,4 +1,3 @@ -MoltresBaseStats: ; 393ba (e:53ba) db DEX_MOLTRES ; pokedex id db 90 ; base hp db 100 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00101010 -db %01000011 -db %00001000 -db %11000000 -db %01100011 -db %00001100 -db %00001010 + tmlearn 2,4,6 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,38,39 + tmlearn 43,44 + tmlearn 50,52 db 0 ; padding diff --git a/data/baseStats/mrmime.asm b/data/baseStats/mrmime.asm index 93a6fcf7..8640e340 100755..100644 --- a/data/baseStats/mrmime.asm +++ b/data/baseStats/mrmime.asm @@ -1,4 +1,3 @@ -MrMimeBaseStats: ; 3911a (e:511a) db DEX_MR_MIME ; pokedex id db 40 ; base hp db 45 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %01000011 -db %10101111 -db %11110001 -db %10000111 -db %00111000 -db %01000010 + tmlearn 1,5,6,8 + tmlearn 9,10,15 + tmlearn 17,18,19,20,22,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,35,40 + tmlearn 44,45,46 + tmlearn 50,55 db 0 ; padding diff --git a/data/baseStats/muk.asm b/data/baseStats/muk.asm index 465c6012..cb15563e 100755..100644 --- a/data/baseStats/muk.asm +++ b/data/baseStats/muk.asm @@ -1,4 +1,3 @@ -MukBaseStats: ; 38d7e (e:4d7e) db DEX_MUK ; pokedex id db 105 ; base hp db 105 ; base attack @@ -19,11 +18,11 @@ db POISON_GAS db 0 db 0 ; growth rate ; learnset -db %10100000 -db %01000000 -db %10011000 -db %11000001 -db %00101010 -db %01001000 -db %00000010 + tmlearn 6,8 + tmlearn 15 + tmlearn 20,21,24 + tmlearn 25,31,32 + tmlearn 34,36,38 + tmlearn 44,47 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/nidoking.asm b/data/baseStats/nidoking.asm index c283821b..ebef0965 100755..100644 --- a/data/baseStats/nidoking.asm +++ b/data/baseStats/nidoking.asm @@ -1,4 +1,3 @@ -NidokingBaseStats: ; 3877a (e:477a) db DEX_NIDOKING ; pokedex id db 81 ; base hp db 92 ; base attack @@ -19,11 +18,11 @@ db POISON_STING db THRASH db 3 ; growth rate ; learnset -db %11110001 -db %11111111 -db %10001111 -db %11000111 -db %10100011 -db %10001000 -db %00110010 + tmlearn 1,5,6,7,8 + tmlearn 9,10,11,12,13,14,15,16 + tmlearn 17,18,19,20,24 + tmlearn 25,26,27,31,32 + tmlearn 33,34,38,40 + tmlearn 44,48 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/nidoqueen.asm b/data/baseStats/nidoqueen.asm index 5f3f91a3..9ea29a31 100755..100644 --- a/data/baseStats/nidoqueen.asm +++ b/data/baseStats/nidoqueen.asm @@ -1,4 +1,3 @@ -NidoqueenBaseStats: ; 38726 (e:4726) db DEX_NIDOQUEEN ; pokedex id db 90 ; base hp db 82 ; base attack @@ -19,11 +18,11 @@ db TAIL_WHIP db BODY_SLAM db 3 ; growth rate ; learnset -db %11110001 -db %11111111 -db %10001111 -db %11000111 -db %10100011 -db %10001000 -db %00110010 + tmlearn 1,5,6,7,8 + tmlearn 9,10,11,12,13,14,15,16 + tmlearn 17,18,19,20,24 + tmlearn 25,26,27,31,32 + tmlearn 33,34,38,40 + tmlearn 44,48 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/nidoranf.asm b/data/baseStats/nidoranf.asm index 24caa7ab..67832f18 100755..100644 --- a/data/baseStats/nidoranf.asm +++ b/data/baseStats/nidoranf.asm @@ -1,4 +1,3 @@ -NidoranFBaseStats: ; 386ee (e:46ee) db DEX_NIDORAN_F ; pokedex id db 55 ; base hp db 47 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10100000 -db %00100011 -db %10001000 -db %11000001 -db %10000011 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10,14 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/nidoranm.asm b/data/baseStats/nidoranm.asm index 1b33b61c..a7882766 100755..100644 --- a/data/baseStats/nidoranm.asm +++ b/data/baseStats/nidoranm.asm @@ -1,4 +1,3 @@ -NidoranMBaseStats: ; 38742 (e:4742) db DEX_NIDORAN_M ; pokedex id db 46 ; base hp db 57 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %11100000 -db %00100011 -db %10001000 -db %11000001 -db %10000011 -db %00001000 -db %00000010 + tmlearn 6,7,8 + tmlearn 9,10,14 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/nidorina.asm b/data/baseStats/nidorina.asm index b2ab3ce8..0ddecf70 100755..100644 --- a/data/baseStats/nidorina.asm +++ b/data/baseStats/nidorina.asm @@ -1,4 +1,3 @@ -NidorinaBaseStats: ; 3870a (e:470a) db DEX_NIDORINA ; pokedex id db 70 ; base hp db 62 ; base attack @@ -19,11 +18,11 @@ db SCRATCH db 0 db 3 ; growth rate ; learnset -db %11100000 -db %00111111 -db %10001000 -db %11000001 -db %10000011 -db %00001000 -db %00000010 + tmlearn 6,7,8 + tmlearn 9,10,11,12,13,14 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/nidorino.asm b/data/baseStats/nidorino.asm index 06957afd..fc435fc4 100755..100644 --- a/data/baseStats/nidorino.asm +++ b/data/baseStats/nidorino.asm @@ -1,4 +1,3 @@ -NidorinoBaseStats: ; 3875e (e:475e) db DEX_NIDORINO ; pokedex id db 61 ; base hp db 72 ; base attack @@ -19,11 +18,11 @@ db HORN_ATTACK db 0 db 3 ; growth rate ; learnset -db %11100000 -db %00111111 -db %10001000 -db %11000001 -db %10000011 -db %00001000 -db %00000010 + tmlearn 6,7,8 + tmlearn 9,10,11,12,13,14 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/ninetails.asm b/data/baseStats/ninetales.asm index 8141b627..e98028dc 100755..100644 --- a/data/baseStats/ninetails.asm +++ b/data/baseStats/ninetales.asm @@ -1,4 +1,3 @@ -NinetalesBaseStats: ; 387ea (e:47ea) db DEX_NINETALES ; pokedex id db 73 ; base hp db 76 ; base attack @@ -19,11 +18,11 @@ db QUICK_ATTACK db ROAR db 0 ; growth rate ; learnset -db %10100000 -db %01000011 -db %00001000 -db %11001000 -db %11100011 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 28,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/oddish.asm b/data/baseStats/oddish.asm index 31e376a6..c91c5138 100755..100644 --- a/data/baseStats/oddish.asm +++ b/data/baseStats/oddish.asm @@ -1,4 +1,3 @@ -OddishBaseStats: ; 38876 (e:4876) db DEX_ODDISH ; pokedex id db 45 ; base hp db 50 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %00100100 -db %00000011 -db %00111000 -db %11000000 -db %00000011 -db %00001000 -db %00000110 + tmlearn 3,6 + tmlearn 9,10 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/omanyte.asm b/data/baseStats/omanyte.asm index d4b5f534..3c461876 100755..100644 --- a/data/baseStats/omanyte.asm +++ b/data/baseStats/omanyte.asm @@ -1,4 +1,3 @@ -OmanyteBaseStats: ; 392da (e:52da) db DEX_OMANYTE ; pokedex id db 35 ; base hp db 40 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %00111111 -db %00001000 -db %11000000 -db %00000011 -db %00001000 -db %00010010 + tmlearn 6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/omastar.asm b/data/baseStats/omastar.asm index f39c8f2d..09a2ae77 100755..100644 --- a/data/baseStats/omastar.asm +++ b/data/baseStats/omastar.asm @@ -1,4 +1,3 @@ -OmastarBaseStats: ; 392f6 (e:52f6) db DEX_OMASTAR ; pokedex id db 70 ; base hp db 60 ; base attack @@ -19,11 +18,11 @@ db HORN_ATTACK db 0 db 0 ; growth rate ; learnset -db %11100000 -db %01111111 -db %00001101 -db %11000000 -db %10000011 -db %00001000 -db %00010010 + tmlearn 6,7,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,19,20 + tmlearn 31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/onix.asm b/data/baseStats/onix.asm index ce4375f7..6f3be4df 100755..100644 --- a/data/baseStats/onix.asm +++ b/data/baseStats/onix.asm @@ -1,4 +1,3 @@ -OnixBaseStats: ; 38e26 (e:4e26) db DEX_ONIX ; pokedex id db 35 ; base hp db 45 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %00000011 -db %00001000 -db %11001110 -db %10001010 -db %11001000 -db %00100010 + tmlearn 6,8 + tmlearn 9,10 + tmlearn 20 + tmlearn 26,27,28,31,32 + tmlearn 34,36,40 + tmlearn 44,47,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/paras.asm b/data/baseStats/paras.asm index c1f9dbdd..2c918e68 100755..100644 --- a/data/baseStats/paras.asm +++ b/data/baseStats/paras.asm @@ -1,4 +1,3 @@ -ParasBaseStats: ; 388ca (e:48ca) db DEX_PARAS ; pokedex id db 35 ; base hp db 70 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100100 -db %00000011 -db %00111000 -db %11001000 -db %10000011 -db %00001000 -db %00000110 + tmlearn 3,6,8 + tmlearn 9,10 + tmlearn 20,21,22 + tmlearn 28,31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/parasect.asm b/data/baseStats/parasect.asm index e53fec0e..dfa0c73e 100755..100644 --- a/data/baseStats/parasect.asm +++ b/data/baseStats/parasect.asm @@ -1,4 +1,3 @@ -ParasectBaseStats: ; 388e6 (e:48e6) db DEX_PARASECT ; pokedex id db 60 ; base hp db 95 ; base attack @@ -19,11 +18,11 @@ db LEECH_LIFE db 0 db 0 ; growth rate ; learnset -db %10100100 -db %01000011 -db %00111000 -db %11001000 -db %10000011 -db %00001000 -db %00000110 + tmlearn 3,6,8 + tmlearn 9,10,15 + tmlearn 20,21,22 + tmlearn 28,31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/persian.asm b/data/baseStats/persian.asm index c72ac802..2f5ef125 100755..100644 --- a/data/baseStats/persian.asm +++ b/data/baseStats/persian.asm @@ -1,4 +1,3 @@ -PersianBaseStats: ; 3898e (e:498e) db DEX_PERSIAN ; pokedex id db 65 ; base hp db 70 ; base attack @@ -19,11 +18,11 @@ db BITE db SCREECH db 0 ; growth rate ; learnset -db %10100000 -db %11001111 -db %10001000 -db %11000001 -db %11000010 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10,11,12,15,16 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/pidgeot.asm b/data/baseStats/pidgeot.asm index 47fafc3e..05350d07 100755..100644 --- a/data/baseStats/pidgeot.asm +++ b/data/baseStats/pidgeot.asm @@ -1,4 +1,3 @@ -PidgeotBaseStats: ; 385ba (e:45ba) db DEX_PIDGEOT ; pokedex id db 83 ; base hp db 80 ; base attack @@ -19,11 +18,11 @@ db QUICK_ATTACK db 0 db 3 ; growth rate ; learnset -db %00101010 -db %01000011 -db %00001000 -db %11000000 -db %01000011 -db %00001100 -db %00001010 + tmlearn 2,4,6 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,39 + tmlearn 43,44 + tmlearn 50,52 db 0 ; padding diff --git a/data/baseStats/pidgeotto.asm b/data/baseStats/pidgeotto.asm index c996b671..74440fcc 100755..100644 --- a/data/baseStats/pidgeotto.asm +++ b/data/baseStats/pidgeotto.asm @@ -1,4 +1,3 @@ -PidgeottoBaseStats: ; 3859e (e:459e) db DEX_PIDGEOTTO ; pokedex id db 63 ; base hp db 60 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %00101010 -db %00000011 -db %00001000 -db %11000000 -db %01000011 -db %00001100 -db %00001010 + tmlearn 2,4,6 + tmlearn 9,10 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,39 + tmlearn 43,44 + tmlearn 50,52 db 0 ; padding diff --git a/data/baseStats/pidgey.asm b/data/baseStats/pidgey.asm index 21259582..ec032d6b 100755..100644 --- a/data/baseStats/pidgey.asm +++ b/data/baseStats/pidgey.asm @@ -1,4 +1,3 @@ -PidgeyBaseStats: ; 38582 (e:4582) db DEX_PIDGEY ; pokedex id db 40 ; base hp db 45 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %00101010 -db %00000011 -db %00001000 -db %11000000 -db %01000011 -db %00001100 -db %00001010 + tmlearn 2,4,6 + tmlearn 9,10 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,39 + tmlearn 43,44 + tmlearn 50,52 db 0 ; padding diff --git a/data/baseStats/pikachu.asm b/data/baseStats/pikachu.asm index f3b224c8..09971b79 100755..100644 --- a/data/baseStats/pikachu.asm +++ b/data/baseStats/pikachu.asm @@ -1,4 +1,3 @@ -PikachuBaseStats: ; 3867e (e:467e) db DEX_PIKACHU ; pokedex id db 35 ; base hp db 55 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %10000011 -db %10001101 -db %11000001 -db %11000011 -db %00011000 -db %01000010 + tmlearn 1,5,6,8 + tmlearn 9,10,16 + tmlearn 17,19,20,24 + tmlearn 25,31,32 + tmlearn 33,34,39,40 + tmlearn 44,45 + tmlearn 50,55 db 0 ; padding diff --git a/data/baseStats/pinsir.asm b/data/baseStats/pinsir.asm index d9c73ea0..08c0e95a 100755..100644 --- a/data/baseStats/pinsir.asm +++ b/data/baseStats/pinsir.asm @@ -1,4 +1,3 @@ -PinsirBaseStats: ; 391a6 (e:51a6) db DEX_PINSIR ; pokedex id db 65 ; base hp db 125 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %10100100 -db %01000011 -db %00001101 -db %11000000 -db %00000010 -db %00001000 -db %00100110 + tmlearn 3,6,8 + tmlearn 9,10,15 + tmlearn 17,19,20 + tmlearn 31,32 + tmlearn 34 + tmlearn 44 + tmlearn 50,51,54 db 0 ; padding diff --git a/data/baseStats/poliwag.asm b/data/baseStats/poliwag.asm index 6be8587d..8014811e 100755..100644 --- a/data/baseStats/poliwag.asm +++ b/data/baseStats/poliwag.asm @@ -1,4 +1,3 @@ -PoliwagBaseStats: ; 38a52 (e:4a52) db DEX_POLIWAG ; pokedex id db 40 ; base hp db 50 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10100000 -db %00111111 -db %00001000 -db %11010000 -db %10000010 -db %00101000 -db %00010010 + tmlearn 6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 20 + tmlearn 29,31,32 + tmlearn 34,40 + tmlearn 44,46 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/poliwhirl.asm b/data/baseStats/poliwhirl.asm index b59d6415..6209da68 100755..100644 --- a/data/baseStats/poliwhirl.asm +++ b/data/baseStats/poliwhirl.asm @@ -1,4 +1,3 @@ -PoliwhirlBaseStats: ; 38a6e (e:4a6e) db DEX_POLIWHIRL ; pokedex id db 65 ; base hp db 65 ; base attack @@ -19,11 +18,11 @@ db WATER_GUN db 0 db 3 ; growth rate ; learnset -db %10110001 -db %00111111 -db %00001111 -db %11010110 -db %10000110 -db %00101000 -db %00110010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 17,18,19,20 + tmlearn 26,27,29,31,32 + tmlearn 34,35,40 + tmlearn 44,46 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/poliwrath.asm b/data/baseStats/poliwrath.asm index d326a909..9489a6a3 100755..100644 --- a/data/baseStats/poliwrath.asm +++ b/data/baseStats/poliwrath.asm @@ -1,4 +1,3 @@ -PoliwrathBaseStats: ; 38a8a (e:4a8a) db DEX_POLIWRATH ; pokedex id db 90 ; base hp db 85 ; base attack @@ -19,11 +18,11 @@ db DOUBLESLAP db BODY_SLAM db 3 ; growth rate ; learnset -db %10110001 -db %01111111 -db %00001111 -db %11010110 -db %10000110 -db %00101000 -db %00110010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,18,19,20 + tmlearn 26,27,29,31,32 + tmlearn 34,35,40 + tmlearn 44,46 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/ponyta.asm b/data/baseStats/ponyta.asm index 3f22d6dd..a6ff9e4b 100755..100644 --- a/data/baseStats/ponyta.asm +++ b/data/baseStats/ponyta.asm @@ -1,4 +1,3 @@ -PonytaBaseStats: ; 38c2e (e:4c2e) db DEX_PONYTA ; pokedex id db 50 ; base hp db 85 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %11100000 -db %00000011 -db %00001000 -db %11000000 -db %11100011 -db %00001000 -db %00000010 + tmlearn 6,7,8 + tmlearn 9,10 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/porygon.asm b/data/baseStats/porygon.asm index 0c8a6b33..a049fa7f 100755..100644 --- a/data/baseStats/porygon.asm +++ b/data/baseStats/porygon.asm @@ -1,4 +1,3 @@ -PorygonBaseStats: ; 392be (e:52be) db DEX_PORYGON ; pokedex id db 65 ; base hp db 60 ; base attack @@ -19,11 +18,11 @@ db CONVERSION db 0 db 0 ; growth rate ; learnset -db %00100000 -db %01110011 -db %10001000 -db %11110001 -db %11000011 -db %00111000 -db %01000011 + tmlearn 6 + tmlearn 9,10,13,14,15 + tmlearn 20,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,39,40 + tmlearn 44,45,46 + tmlearn 49,50,55 db 0 ; padding diff --git a/data/baseStats/primeape.asm b/data/baseStats/primeape.asm index eeab800b..659edefd 100755..100644 --- a/data/baseStats/primeape.asm +++ b/data/baseStats/primeape.asm @@ -1,4 +1,3 @@ -PrimeapeBaseStats: ; 389fe (e:49fe) db DEX_PRIMEAPE ; pokedex id db 65 ; base hp db 105 ; base attack @@ -14,21 +13,16 @@ dw PrimeapePicFront dw PrimeapePicBack ; attacks known at lvl 0 db SCRATCH -IF !DEF(_YELLOW) - db LEER -ENDC +db LEER db KARATE_CHOP db FURY_SWIPES -IF DEF(_YELLOW) - db LOW_KICK -ENDC db 0 ; growth rate ; learnset -db %10110001 -db %11000011 -db %10001111 -db %11001001 -db %11000110 -db %10001000 -db %00100010 + tmlearn 1,5,6,8 + tmlearn 9,10,15,16 + tmlearn 17,18,19,20,24 + tmlearn 25,28,31,32 + tmlearn 34,35,39,40 + tmlearn 44,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/psyduck.asm b/data/baseStats/psyduck.asm index bc435c57..db3ac79f 100755..100644 --- a/data/baseStats/psyduck.asm +++ b/data/baseStats/psyduck.asm @@ -1,4 +1,3 @@ -PsyduckBaseStats: ; 389aa (e:49aa) db DEX_PSYDUCK ; pokedex id db 50 ; base hp db 52 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10110001 -db %10111111 -db %00001111 -db %11001000 -db %11000010 -db %00001000 -db %00110010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,16 + tmlearn 17,18,19,20 + tmlearn 28,31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/raichu.asm b/data/baseStats/raichu.asm index 6324d57d..c830483c 100755..100644 --- a/data/baseStats/raichu.asm +++ b/data/baseStats/raichu.asm @@ -1,4 +1,3 @@ -RaichuBaseStats: ; 3869a (e:469a) db DEX_RAICHU ; pokedex id db 60 ; base hp db 90 ; base attack @@ -19,11 +18,11 @@ db THUNDER_WAVE db 0 db 0 ; growth rate ; learnset -db %10110001 -db %11000011 -db %10001101 -db %11000001 -db %11000011 -db %00011000 -db %01000010 + tmlearn 1,5,6,8 + tmlearn 9,10,15,16 + tmlearn 17,19,20,24 + tmlearn 25,31,32 + tmlearn 33,34,39,40 + tmlearn 44,45 + tmlearn 50,55 db 0 ; padding diff --git a/data/baseStats/rapidash.asm b/data/baseStats/rapidash.asm index f5088b6e..c452159e 100755..100644 --- a/data/baseStats/rapidash.asm +++ b/data/baseStats/rapidash.asm @@ -1,4 +1,3 @@ -RapidashBaseStats: ; 38c4a (e:4c4a) db DEX_RAPIDASH ; pokedex id db 65 ; base hp db 100 ; base attack @@ -19,11 +18,11 @@ db STOMP db GROWL db 0 ; growth rate ; learnset -db %11100000 -db %01000011 -db %00001000 -db %11000000 -db %11100011 -db %00001000 -db %00000010 + tmlearn 6,7,8 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/raticate.asm b/data/baseStats/raticate.asm index 1bc92090..ff8373d5 100755..100644 --- a/data/baseStats/raticate.asm +++ b/data/baseStats/raticate.asm @@ -1,4 +1,3 @@ -RaticateBaseStats: ; 385f2 (e:45f2) db DEX_RATICATE ; pokedex id db 55 ; base hp db 81 ; base attack @@ -19,11 +18,11 @@ db QUICK_ATTACK db 0 db 0 ; growth rate ; learnset -db %10100000 -db %01111111 -db %10001000 -db %11001001 -db %11000010 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20,24 + tmlearn 25,28,31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/rattata.asm b/data/baseStats/rattata.asm index 192f8f26..7edfb626 100755..100644 --- a/data/baseStats/rattata.asm +++ b/data/baseStats/rattata.asm @@ -1,4 +1,3 @@ -RattataBaseStats: ; 385d6 (e:45d6) db DEX_RATTATA ; pokedex id db 30 ; base hp db 56 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %00101111 -db %10001000 -db %11001001 -db %11000010 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10,11,12,14 + tmlearn 20,24 + tmlearn 25,28,31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/rhydon.asm b/data/baseStats/rhydon.asm index 9f005b84..d7066906 100755..100644 --- a/data/baseStats/rhydon.asm +++ b/data/baseStats/rhydon.asm @@ -1,4 +1,3 @@ -RhydonBaseStats: ; 39002 (e:5002) db DEX_RHYDON ; pokedex id db 105 ; base hp db 130 ; base attack @@ -19,11 +18,11 @@ db TAIL_WHIP db FURY_ATTACK db 5 ; growth rate ; learnset -db %11110001 -db %11111111 -db %10001111 -db %11001111 -db %10100010 -db %10001000 -db %00110010 + tmlearn 1,5,6,7,8 + tmlearn 9,10,11,12,13,14,15,16 + tmlearn 17,18,19,20,24 + tmlearn 25,26,27,28,31,32 + tmlearn 34,38,40 + tmlearn 44,48 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/rhyhorn.asm b/data/baseStats/rhyhorn.asm index 5521f37a..a6491bd5 100755..100644 --- a/data/baseStats/rhyhorn.asm +++ b/data/baseStats/rhyhorn.asm @@ -1,4 +1,3 @@ -RhyhornBaseStats: ; 38fe6 (e:4fe6) db DEX_RHYHORN ; pokedex id db 80 ; base hp db 85 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %11100000 -db %00000011 -db %10001000 -db %11001111 -db %10100010 -db %10001000 -db %00100010 + tmlearn 6,7,8 + tmlearn 9,10 + tmlearn 20,24 + tmlearn 25,26,27,28,31,32 + tmlearn 34,38,40 + tmlearn 44,48 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/sandshrew.asm b/data/baseStats/sandshrew.asm index 28016ab9..a9875a8e 100755..100644 --- a/data/baseStats/sandshrew.asm +++ b/data/baseStats/sandshrew.asm @@ -1,4 +1,3 @@ -SandshrewBaseStats: ; 386b6 (e:46b6) db DEX_SANDSHREW ; pokedex id db 50 ; base hp db 75 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100100 -db %00000011 -db %00001101 -db %11001110 -db %11000010 -db %10001000 -db %00100110 + tmlearn 3,6,8 + tmlearn 9,10 + tmlearn 17,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,39,40 + tmlearn 44,48 + tmlearn 50,51,54 db 0 ; padding diff --git a/data/baseStats/sandslash.asm b/data/baseStats/sandslash.asm index f613a517..30477eb4 100755..100644 --- a/data/baseStats/sandslash.asm +++ b/data/baseStats/sandslash.asm @@ -1,4 +1,3 @@ -SandslashBaseStats: ; 386d2 (e:46d2) db DEX_SANDSLASH ; pokedex id db 75 ; base hp db 100 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100100 -db %01000011 -db %00001101 -db %11001110 -db %11000010 -db %10001000 -db %00100110 + tmlearn 3,6,8 + tmlearn 9,10,15 + tmlearn 17,19,20 + tmlearn 26,27,28,31,32 + tmlearn 34,39,40 + tmlearn 44,48 + tmlearn 50,51,54 db 0 ; padding diff --git a/data/baseStats/scyther.asm b/data/baseStats/scyther.asm index 6e20cddc..13de0d2b 100755..100644 --- a/data/baseStats/scyther.asm +++ b/data/baseStats/scyther.asm @@ -1,4 +1,3 @@ -ScytherBaseStats: ; 39136 (e:5136) db DEX_SCYTHER ; pokedex id db 70 ; base hp db 110 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00100100 -db %01000011 -db %00001000 -db %11000000 -db %11000010 -db %00001000 -db %00000110 + tmlearn 3,6 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/seadra.asm b/data/baseStats/seadra.asm index 67cc26e1..9f28001b 100755..100644 --- a/data/baseStats/seadra.asm +++ b/data/baseStats/seadra.asm @@ -1,4 +1,3 @@ -SeadraBaseStats: ; 3908e (e:508e) db DEX_SEADRA ; pokedex id db 55 ; base hp db 65 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00100000 -db %01111111 -db %00001000 -db %11000000 -db %11000010 -db %00001000 -db %00010010 + tmlearn 6 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/seaking.asm b/data/baseStats/seaking.asm index c122d946..d4fbe8ea 100755..100644 --- a/data/baseStats/seaking.asm +++ b/data/baseStats/seaking.asm @@ -1,4 +1,3 @@ -SeakingBaseStats: ; 390c6 (e:50c6) db DEX_SEAKING ; pokedex id db 80 ; base hp db 92 ; base attack @@ -19,11 +18,11 @@ db SUPERSONIC db 0 db 0 ; growth rate ; learnset -db %01100000 -db %01111111 -db %00001000 -db %11000000 -db %11000010 -db %00001000 -db %00010010 + tmlearn 6,7 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 34,39,40 + tmlearn 44 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/seel.asm b/data/baseStats/seel.asm index 63a57b98..ef9c2898 100755..100644 --- a/data/baseStats/seel.asm +++ b/data/baseStats/seel.asm @@ -1,4 +1,3 @@ -SeelBaseStats: ; 38d2a (e:4d2a) db DEX_SEEL ; pokedex id db 65 ; base hp db 45 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %11100000 -db %10111111 -db %00001000 -db %11000000 -db %10000010 -db %00001000 -db %00110010 + tmlearn 6,7,8 + tmlearn 9,10,11,12,13,14,16 + tmlearn 20 + tmlearn 31,32 + tmlearn 34,40 + tmlearn 44 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/shellder.asm b/data/baseStats/shellder.asm index 06525091..7c2cdf9d 100755..100644 --- a/data/baseStats/shellder.asm +++ b/data/baseStats/shellder.asm @@ -1,4 +1,3 @@ -ShellderBaseStats: ; 38d9a (e:4d9a) db DEX_SHELLDER ; pokedex id db 30 ; base hp db 65 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00100000 -db %00111111 -db %00001000 -db %11100000 -db %01001011 -db %01001000 -db %00010011 + tmlearn 6 + tmlearn 9,10,11,12,13,14 + tmlearn 20 + tmlearn 30,31,32 + tmlearn 33,34,36,39 + tmlearn 44,47 + tmlearn 49,50,53 db 0 ; padding diff --git a/data/baseStats/slowbro.asm b/data/baseStats/slowbro.asm index dd271485..ffeda79e 100755..100644 --- a/data/baseStats/slowbro.asm +++ b/data/baseStats/slowbro.asm @@ -1,4 +1,3 @@ -SlowbroBaseStats: ; 38c82 (e:4c82) db DEX_SLOWBRO ; pokedex id db 95 ; base hp db 75 ; base attack @@ -19,11 +18,11 @@ db HEADBUTT db 0 db 0 ; growth rate ; learnset -db %10110001 -db %11111111 -db %00001111 -db %11111110 -db %11100011 -db %00111000 -db %01110011 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15,16 + tmlearn 17,18,19,20 + tmlearn 26,27,28,29,30,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44,45,46 + tmlearn 49,50,53,54,55 db 0 ; padding diff --git a/data/baseStats/slowpoke.asm b/data/baseStats/slowpoke.asm index 41e0a586..ea238a6e 100755..100644 --- a/data/baseStats/slowpoke.asm +++ b/data/baseStats/slowpoke.asm @@ -1,4 +1,3 @@ -SlowpokeBaseStats: ; 38c66 (e:4c66) db DEX_SLOWPOKE ; pokedex id db 90 ; base hp db 65 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %10111111 -db %00001000 -db %11111110 -db %11100011 -db %00111000 -db %01110011 + tmlearn 6,8 + tmlearn 9,10,11,12,13,14,16 + tmlearn 20 + tmlearn 26,27,28,29,30,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44,45,46 + tmlearn 49,50,53,54,55 db 0 ; padding diff --git a/data/baseStats/snorlax.asm b/data/baseStats/snorlax.asm index 0ada7fa3..2d1fd6e3 100755..100644 --- a/data/baseStats/snorlax.asm +++ b/data/baseStats/snorlax.asm @@ -1,4 +1,3 @@ -SnorlaxBaseStats: ; 39366 (e:5366) db DEX_SNORLAX ; pokedex id db 160 ; base hp db 110 ; base attack @@ -19,11 +18,11 @@ db REST db 0 db 5 ; growth rate ; learnset -db %10110001 -db %11111111 -db %10101111 -db %11010111 -db %10101111 -db %10101000 -db %00110010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15,16 + tmlearn 17,18,19,20,22,24 + tmlearn 25,26,27,29,31,32 + tmlearn 33,34,35,36,38,40 + tmlearn 44,46,48 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/spearow.asm b/data/baseStats/spearow.asm index 818ec039..eb8ab1ec 100755..100644 --- a/data/baseStats/spearow.asm +++ b/data/baseStats/spearow.asm @@ -1,4 +1,3 @@ -SpearowBaseStats: ; 3860e (e:460e) db DEX_SPEAROW ; pokedex id db 40 ; base hp db 60 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00101010 -db %00000011 -db %00001000 -db %11000000 -db %01000010 -db %00001100 -db %00001010 + tmlearn 2,4,6 + tmlearn 9,10 + tmlearn 20 + tmlearn 31,32 + tmlearn 34,39 + tmlearn 43,44 + tmlearn 50,52 db 0 ; padding diff --git a/data/baseStats/squirtle.asm b/data/baseStats/squirtle.asm index d79a79e3..f8dcd0a1 100755..100644 --- a/data/baseStats/squirtle.asm +++ b/data/baseStats/squirtle.asm @@ -1,4 +1,3 @@ -SquirtleBaseStats: ; 38486 (e:4486) db DEX_SQUIRTLE ; pokedex id db 44 ; base hp db 48 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 3 ; growth rate ; learnset -db %10110001 -db %00111111 -db %00001111 -db %11001000 -db %10000011 -db %00001000 -db %00110010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 17,18,19,20 + tmlearn 28,31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/starmie.asm b/data/baseStats/starmie.asm index 671666cc..686dfa57 100755..100644 --- a/data/baseStats/starmie.asm +++ b/data/baseStats/starmie.asm @@ -1,4 +1,3 @@ -StarmieBaseStats: ; 390fe (e:50fe) db DEX_STARMIE ; pokedex id db 60 ; base hp db 75 ; base attack @@ -19,11 +18,11 @@ db HARDEN db 0 db 5 ; growth rate ; learnset -db %00100000 -db %01111111 -db %10001000 -db %11110001 -db %11000011 -db %00111000 -db %01010011 + tmlearn 6 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,39,40 + tmlearn 44,45,46 + tmlearn 49,50,53,55 db 0 ; padding diff --git a/data/baseStats/staryu.asm b/data/baseStats/staryu.asm index 031fe9f5..35f51a6a 100755..100644 --- a/data/baseStats/staryu.asm +++ b/data/baseStats/staryu.asm @@ -1,4 +1,3 @@ -StaryuBaseStats: ; 390e2 (e:50e2) db DEX_STARYU ; pokedex id db 30 ; base hp db 45 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00100000 -db %00111111 -db %10001000 -db %11110001 -db %11000011 -db %00111000 -db %01010011 + tmlearn 6 + tmlearn 9,10,11,12,13,14 + tmlearn 20,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,39,40 + tmlearn 44,45,46 + tmlearn 49,50,53,55 db 0 ; padding diff --git a/data/baseStats/tangela.asm b/data/baseStats/tangela.asm index 3e899c05..b50a57bc 100755..100644 --- a/data/baseStats/tangela.asm +++ b/data/baseStats/tangela.asm @@ -1,4 +1,3 @@ -TangelaBaseStats: ; 3903a (e:503a) db DEX_TANGELA ; pokedex id db 65 ; base hp db 55 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100100 -db %01000011 -db %00111000 -db %11000000 -db %10000010 -db %00001000 -db %00000110 + tmlearn 3,6,8 + tmlearn 9,10,15 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 34,40 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/tauros.asm b/data/baseStats/tauros.asm index 16020b09..87f28ec6 100755..100644 --- a/data/baseStats/tauros.asm +++ b/data/baseStats/tauros.asm @@ -1,4 +1,3 @@ -TaurosBaseStats: ; 391c2 (e:51c2) db DEX_TAUROS ; pokedex id db 75 ; base hp db 100 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %11100000 -db %01110011 -db %10001000 -db %11000111 -db %10100010 -db %00001000 -db %00100010 + tmlearn 6,7,8 + tmlearn 9,10,13,14,15 + tmlearn 20,24 + tmlearn 25,26,27,31,32 + tmlearn 34,38,40 + tmlearn 44 + tmlearn 50,54 db 0 ; padding diff --git a/data/baseStats/tentacool.asm b/data/baseStats/tentacool.asm index f7569d65..7237f083 100755..100644 --- a/data/baseStats/tentacool.asm +++ b/data/baseStats/tentacool.asm @@ -1,4 +1,3 @@ -TentacoolBaseStats: ; 38ba2 (e:4ba2) db DEX_TENTACOOL ; pokedex id db 40 ; base hp db 40 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00100100 -db %00111111 -db %00011000 -db %11000000 -db %10000011 -db %00001000 -db %00010110 + tmlearn 3,6 + tmlearn 9,10,11,12,13,14 + tmlearn 20,21 + tmlearn 31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50,51,53 db 0 ; padding diff --git a/data/baseStats/tentacruel.asm b/data/baseStats/tentacruel.asm index d7115059..d3d93919 100755..100644 --- a/data/baseStats/tentacruel.asm +++ b/data/baseStats/tentacruel.asm @@ -1,4 +1,3 @@ -TentacruelBaseStats: ; 38bbe (e:4bbe) db DEX_TENTACRUEL ; pokedex id db 80 ; base hp db 70 ; base attack @@ -19,11 +18,11 @@ db WRAP db 0 db 5 ; growth rate ; learnset -db %00100100 -db %01111111 -db %00011000 -db %11000000 -db %10000011 -db %00001000 -db %00010110 + tmlearn 3,6 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20,21 + tmlearn 31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50,51,53 db 0 ; padding diff --git a/data/baseStats/vaporeon.asm b/data/baseStats/vaporeon.asm index ed4b7a1e..e22b3185 100755..100644 --- a/data/baseStats/vaporeon.asm +++ b/data/baseStats/vaporeon.asm @@ -1,4 +1,3 @@ -VaporeonBaseStats: ; 3926a (e:526a) db DEX_VAPOREON ; pokedex id db 130 ; base hp db 65 ; base attack @@ -14,20 +13,16 @@ dw VaporeonPicFront dw VaporeonPicBack ; attacks known at lvl 0 db TACKLE -IF DEF(_YELLOW) - db TAIL_WHIP -ELSE - db SAND_ATTACK -ENDC +db SAND_ATTACK db QUICK_ATTACK db WATER_GUN db 0 ; growth rate ; learnset -db %10100000 -db %01111111 -db %00001000 -db %11000000 -db %11000011 -db %00001000 -db %00010010 + tmlearn 6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 20 + tmlearn 31,32 + tmlearn 33,34,39,40 + tmlearn 44 + tmlearn 50,53 db 0 ; padding diff --git a/data/baseStats/venomoth.asm b/data/baseStats/venomoth.asm index f38be71c..7a5bd981 100755..100644 --- a/data/baseStats/venomoth.asm +++ b/data/baseStats/venomoth.asm @@ -1,4 +1,3 @@ -VenomothBaseStats: ; 3891e (e:491e) db DEX_VENOMOTH ; pokedex id db 70 ; base hp db 65 ; base attack @@ -15,20 +14,15 @@ dw VenomothPicBack ; attacks known at lvl 0 db TACKLE db DISABLE -IF DEF(_YELLOW) - db SUPERSONIC - db CONFUSION -ELSE - db POISONPOWDER - db LEECH_LIFE -ENDC +db POISONPOWDER +db LEECH_LIFE db 0 ; growth rate ; learnset -db %00101010 -db %01000011 -db %00111000 -db %11110000 -db %01000011 -db %00101000 -db %00000010 + tmlearn 2,4,6 + tmlearn 9,10,15 + tmlearn 20,21,22 + tmlearn 29,30,31,32 + tmlearn 33,34,39 + tmlearn 44,46 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/venonat.asm b/data/baseStats/venonat.asm index 62e8aaef..aeadc6cd 100755..100644 --- a/data/baseStats/venonat.asm +++ b/data/baseStats/venonat.asm @@ -1,4 +1,3 @@ -VenonatBaseStats: ; 38902 (e:4902) db DEX_VENONAT ; pokedex id db 60 ; base hp db 55 ; base attack @@ -19,19 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00100000 -db %00000011 -db %00111000 -IF DEF(_YELLOW) - db %11110000 - db %01000011 - db %00101000 - db %00100010 -ELSE - db %11010000 - db %00000011 - db %00101000 - db %00000010 -ENDC - + tmlearn 6 + tmlearn 9,10 + tmlearn 20,21,22 + tmlearn 29,31,32 + tmlearn 33,34 + tmlearn 44,46 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/venusaur.asm b/data/baseStats/venusaur.asm index 426d18ac..0a457321 100755..100644 --- a/data/baseStats/venusaur.asm +++ b/data/baseStats/venusaur.asm @@ -1,4 +1,3 @@ -VenusaurBaseStats: ; 38416 (e:4416) db DEX_VENUSAUR ; pokedex id db 80 ; base hp db 82 ; base attack @@ -19,11 +18,11 @@ db LEECH_SEED db VINE_WHIP db 3 ; growth rate ; learnset -db %10100100 -db %01000011 -db %00111000 -db %11000000 -db %00000011 -db %00001000 -db %00000110 + tmlearn 3,6,8 + tmlearn 9,10,15 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/victreebel.asm b/data/baseStats/victreebel.asm index 4f544b8d..7a82c86e 100755..100644 --- a/data/baseStats/victreebel.asm +++ b/data/baseStats/victreebel.asm @@ -1,5 +1,4 @@ -VictreebelBaseStats: ; 38b86 (e:4b86) -db DEX_VICTREEBEL ; pokedex id +db DEX_VICTREEBEL ; pokedex id db 80 ; base hp db 105 ; base attack db 65 ; base defense @@ -19,11 +18,11 @@ db ACID db RAZOR_LEAF db 3 ; growth rate ; learnset -db %10100100 -db %01000011 -db %00111000 -db %11000000 -db %00000011 -db %00001000 -db %00000110 + tmlearn 3,6,8 + tmlearn 9,10,15 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/vileplume.asm b/data/baseStats/vileplume.asm index df44be35..17bb9739 100755..100644 --- a/data/baseStats/vileplume.asm +++ b/data/baseStats/vileplume.asm @@ -1,4 +1,3 @@ -VileplumeBaseStats: ; 388ae (e:48ae) db DEX_VILEPLUME ; pokedex id db 75 ; base hp db 80 ; base attack @@ -19,11 +18,11 @@ db ACID db PETAL_DANCE db 3 ; growth rate ; learnset -db %10100100 -db %01000011 -db %00111000 -db %11000000 -db %00000011 -db %00001000 -db %00000110 + tmlearn 3,6,8 + tmlearn 9,10,15 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/voltorb.asm b/data/baseStats/voltorb.asm index f85fc165..92d2ccb3 100755..100644 --- a/data/baseStats/voltorb.asm +++ b/data/baseStats/voltorb.asm @@ -1,4 +1,3 @@ -VoltorbBaseStats: ; 38eb2 (e:4eb2) db DEX_VOLTORB ; pokedex id db 40 ; base hp db 30 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00100000 -db %00000001 -db %10001000 -db %11100001 -db %01001011 -db %01011000 -db %01000010 + tmlearn 6 + tmlearn 9 + tmlearn 20,24 + tmlearn 25,30,31,32 + tmlearn 33,34,36,39 + tmlearn 44,45,47 + tmlearn 50,55 db 0 ; padding diff --git a/data/baseStats/vulpix.asm b/data/baseStats/vulpix.asm index 5b9bc47c..9577ae30 100755..100644 --- a/data/baseStats/vulpix.asm +++ b/data/baseStats/vulpix.asm @@ -1,4 +1,3 @@ -VulpixBaseStats: ; 387ce (e:47ce) db DEX_VULPIX ; pokedex id db 38 ; base hp db 41 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %10100000 -db %00000011 -db %00001000 -db %11001000 -db %11100011 -db %00001000 -db %00000010 + tmlearn 6,8 + tmlearn 9,10 + tmlearn 20 + tmlearn 28,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/wartortle.asm b/data/baseStats/wartortle.asm index 4d77ea7b..bc86bd6f 100755..100644 --- a/data/baseStats/wartortle.asm +++ b/data/baseStats/wartortle.asm @@ -1,4 +1,3 @@ -WartortleBaseStats: ; 384a2 (e:44a2) db DEX_WARTORTLE ; pokedex id db 59 ; base hp db 63 ; base attack @@ -19,11 +18,11 @@ db BUBBLE db 0 db 3 ; growth rate ; learnset -db %10110001 -db %00111111 -db %00001111 -db %11001000 -db %10000011 -db %00001000 -db %00110010 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14 + tmlearn 17,18,19,20 + tmlearn 28,31,32 + tmlearn 33,34,40 + tmlearn 44 + tmlearn 50,53,54 db 0 ; padding diff --git a/data/baseStats/weedle.asm b/data/baseStats/weedle.asm index 8e501f0b..8370dc41 100755..100644 --- a/data/baseStats/weedle.asm +++ b/data/baseStats/weedle.asm @@ -1,4 +1,3 @@ -WeedleBaseStats: ; 3852e (e:452e) db DEX_WEEDLE ; pokedex id db 40 ; base hp db 35 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 -db %00000000 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 + tmlearn 0 db 0 ; padding diff --git a/data/baseStats/weepinbell.asm b/data/baseStats/weepinbell.asm index 1a974e20..735a453f 100755..100644 --- a/data/baseStats/weepinbell.asm +++ b/data/baseStats/weepinbell.asm @@ -1,4 +1,3 @@ -WeepinbellBaseStats: ; 38b6a (e:4b6a) db DEX_WEEPINBELL ; pokedex id db 65 ; base hp db 90 ; base attack @@ -19,11 +18,11 @@ db WRAP db 0 db 3 ; growth rate ; learnset -db %00100100 -db %00000011 -db %00111000 -db %11000000 -db %00000011 -db %00001000 -db %00000110 + tmlearn 3,6 + tmlearn 9,10 + tmlearn 20,21,22 + tmlearn 31,32 + tmlearn 33,34 + tmlearn 44 + tmlearn 50,51 db 0 ; padding diff --git a/data/baseStats/weezing.asm b/data/baseStats/weezing.asm index bd526ecb..0dd09dfe 100755..100644 --- a/data/baseStats/weezing.asm +++ b/data/baseStats/weezing.asm @@ -1,4 +1,3 @@ -WeezingBaseStats: ; 38fca (e:4fca) db DEX_WEEZING ; pokedex id db 65 ; base hp db 90 ; base attack @@ -19,11 +18,11 @@ db SLUDGE db 0 db 0 ; growth rate ; learnset -db %00100000 -db %01000000 -db %10001000 -db %11000001 -db %00101010 -db %01001000 -db %00000010 + tmlearn 6 + tmlearn 15 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 34,36,38 + tmlearn 44,47 + tmlearn 50 db 0 ; padding diff --git a/data/baseStats/wigglytuff.asm b/data/baseStats/wigglytuff.asm index 1a403c3e..d5fd08e2 100755..100644 --- a/data/baseStats/wigglytuff.asm +++ b/data/baseStats/wigglytuff.asm @@ -1,4 +1,3 @@ -WigglytuffBaseStats: ; 38822 (e:4822) db DEX_WIGGLYTUFF ; pokedex id db 140 ; base hp db 70 ; base attack @@ -19,11 +18,11 @@ db DEFENSE_CURL db DOUBLESLAP db 4 ; growth rate ; learnset -db %10110001 -db %01111111 -db %10101111 -db %11110001 -db %10100011 -db %00111000 -db %01100011 + tmlearn 1,5,6,8 + tmlearn 9,10,11,12,13,14,15 + tmlearn 17,18,19,20,22,24 + tmlearn 25,29,30,31,32 + tmlearn 33,34,38,40 + tmlearn 44,45,46 + tmlearn 49,50,54,55 db 0 ; padding diff --git a/data/baseStats/zapdos.asm b/data/baseStats/zapdos.asm index 257bb859..487052ba 100755..100644 --- a/data/baseStats/zapdos.asm +++ b/data/baseStats/zapdos.asm @@ -1,4 +1,3 @@ -ZapdosBaseStats: ; 3939e (e:539e) db DEX_ZAPDOS ; pokedex id db 90 ; base hp db 90 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 5 ; growth rate ; learnset -db %00101010 -db %01000011 -db %10001000 -db %11000001 -db %01000011 -db %00011100 -db %01001010 + tmlearn 2,4,6 + tmlearn 9,10,15 + tmlearn 20,24 + tmlearn 25,31,32 + tmlearn 33,34,39 + tmlearn 43,44,45 + tmlearn 50,52,55 db 0 ; padding diff --git a/data/baseStats/zubat.asm b/data/baseStats/zubat.asm index b2197c13..1caa4259 100755..100644 --- a/data/baseStats/zubat.asm +++ b/data/baseStats/zubat.asm @@ -1,4 +1,3 @@ -ZubatBaseStats: ; 3883e (e:483e) db DEX_ZUBAT ; pokedex id db 40 ; base hp db 45 ; base attack @@ -19,11 +18,11 @@ db 0 db 0 db 0 ; growth rate ; learnset -db %00101010 -db %00000011 -db %00011000 -db %11000000 -db %01000010 -db %00001000 -db %00000010 + tmlearn 2,4,6 + tmlearn 9,10 + tmlearn 20,21 + tmlearn 31,32 + tmlearn 34,39 + tmlearn 44 + tmlearn 50 db 0 ; padding diff --git a/data/base_stats.asm b/data/base_stats.asm index d7d26533..a84693a4 100755 --- a/data/base_stats.asm +++ b/data/base_stats.asm @@ -35,7 +35,7 @@ INCLUDE "data/baseStats/nidoking.asm" INCLUDE "data/baseStats/clefairy.asm" INCLUDE "data/baseStats/clefable.asm" INCLUDE "data/baseStats/vulpix.asm" -INCLUDE "data/baseStats/ninetails.asm" +INCLUDE "data/baseStats/ninetales.asm" INCLUDE "data/baseStats/jigglypuff.asm" INCLUDE "data/baseStats/wigglytuff.asm" INCLUDE "data/baseStats/zubat.asm" diff --git a/data/bike_riding_tilesets.asm b/data/bike_riding_tilesets.asm index f0fc922d..48c2cee6 100755 --- a/data/bike_riding_tilesets.asm +++ b/data/bike_riding_tilesets.asm @@ -1,2 +1,2 @@ -BikeRidingTilesets:: ; 09e2 (0:09e2) +BikeRidingTilesets:: db OVERWORLD, FOREST, UNDERGROUND, SHIP_PORT, CAVERN, $FF diff --git a/data/collision.asm b/data/collision.asm index 46d5ddc6..78579242 100644 --- a/data/collision.asm +++ b/data/collision.asm @@ -22,6 +22,3 @@ Lab_Coll:: INCBIN "gfx/tilesets/lab.tilecoll" Club_Coll:: INCBIN "gfx/tilesets/club.tilecoll" Facility_Coll:: INCBIN "gfx/tilesets/facility.tilecoll" Plateau_Coll:: INCBIN "gfx/tilesets/plateau.tilecoll" -IF DEF(_OPTION_BEACH_HOUSE) -BeachHouse_Coll:: INCBIN "gfx/tilesets/beachhouse.tilecoll" -ENDC diff --git a/data/credit_mons.asm b/data/credit_mons.asm index 6a8bb416..23142f9f 100755 --- a/data/credit_mons.asm +++ b/data/credit_mons.asm @@ -1,4 +1,4 @@ -CreditsMons: ; 74131 (1d:4131) +CreditsMons: db VENUSAUR db ARBOK db RHYHORN diff --git a/data/credits_order.asm b/data/credits_order.asm index 5a71a26a..20b9137f 100755 --- a/data/credits_order.asm +++ b/data/credits_order.asm @@ -1,4 +1,4 @@ -CreditsOrder: ; 74243 (1d:4243) +CreditsOrder: ; subsequent credits elements will be displayed on separate lines. ; $FF, $FE, $FD, $FC, $FB, and $FA are commands that are used ; to go to the next set of credits texts. diff --git a/data/cries.asm b/data/cries.asm index 7d03b831..7031536e 100755 --- a/data/cries.asm +++ b/data/cries.asm @@ -1,4 +1,4 @@ -CryData: ; 39446 (e:5446) +CryData: ;$BaseCry, $Pitch, $Length db $11, $00, $80; Rhydon db $03, $00, $80; Kangaskhan diff --git a/data/dungeon_tilesets.asm b/data/dungeon_tilesets.asm index 3501f2b9..01e86714 100755 --- a/data/dungeon_tilesets.asm +++ b/data/dungeon_tilesets.asm @@ -1,2 +1,2 @@ -DungeonTilesets: ; c7b2 (3:47b2) +DungeonTilesets: db FOREST, MUSEUM, SHIP, CAVERN, LOBBY, MANSION, GATE, LAB, FACILITY, CEMETERY, GYM, $FF diff --git a/data/evos_moves.asm b/data/evos_moves.asm index cdbec0d8..2371fb83 100755 --- a/data/evos_moves.asm +++ b/data/evos_moves.asm @@ -1,4 +1,4 @@ -EvosMovesPointerTable: ; 3b05c (e:705c) +EvosMovesPointerTable: dw Mon112_EvosMoves dw Mon115_EvosMoves dw Mon032_EvosMoves @@ -29,8 +29,8 @@ EvosMovesPointerTable: ; 3b05c (e:705c) dw Mon009_EvosMoves dw Mon127_EvosMoves dw Mon114_EvosMoves - dw Mon152_EvosMoves ;MissingNo - dw Mon153_EvosMoves ;MissingNo + dw Mon152_EvosMoves ;MissingNo + dw Mon153_EvosMoves ;MissingNo dw Mon058_EvosMoves dw Mon095_EvosMoves dw Mon022_EvosMoves @@ -48,26 +48,26 @@ EvosMovesPointerTable: ; 3b05c (e:705c) dw Mon054_EvosMoves dw Mon096_EvosMoves dw Mon076_EvosMoves - dw Mon154_EvosMoves ;MissingNo + dw Mon154_EvosMoves ;MissingNo dw Mon126_EvosMoves - dw Mon155_EvosMoves ;MissingNo + dw Mon155_EvosMoves ;MissingNo dw Mon125_EvosMoves dw Mon082_EvosMoves dw Mon109_EvosMoves - dw Mon156_EvosMoves ;MissingNo + dw Mon156_EvosMoves ;MissingNo dw Mon056_EvosMoves dw Mon086_EvosMoves dw Mon050_EvosMoves dw Mon128_EvosMoves - dw Mon157_EvosMoves ;MissingNo - dw Mon158_EvosMoves ;MissingNo - dw Mon159_EvosMoves ;MissingNo + dw Mon157_EvosMoves ;MissingNo + dw Mon158_EvosMoves ;MissingNo + dw Mon159_EvosMoves ;MissingNo dw Mon083_EvosMoves dw Mon048_EvosMoves dw Mon149_EvosMoves - dw Mon160_EvosMoves ;MissingNo - dw Mon161_EvosMoves ;MissingNo - dw Mon162_EvosMoves ;MissingNo + dw Mon160_EvosMoves ;MissingNo + dw Mon161_EvosMoves ;MissingNo + dw Mon162_EvosMoves ;MissingNo dw Mon084_EvosMoves dw Mon060_EvosMoves dw Mon124_EvosMoves @@ -77,23 +77,23 @@ EvosMovesPointerTable: ; 3b05c (e:705c) dw Mon132_EvosMoves dw Mon052_EvosMoves dw Mon098_EvosMoves - dw Mon163_EvosMoves ;MissingNo - dw Mon164_EvosMoves ;MissingNo - dw Mon165_EvosMoves ;MissingNo + dw Mon163_EvosMoves ;MissingNo + dw Mon164_EvosMoves ;MissingNo + dw Mon165_EvosMoves ;MissingNo dw Mon037_EvosMoves dw Mon038_EvosMoves dw Mon025_EvosMoves dw Mon026_EvosMoves - dw Mon166_EvosMoves ;MissingNo - dw Mon167_EvosMoves ;MissingNo + dw Mon166_EvosMoves ;MissingNo + dw Mon167_EvosMoves ;MissingNo dw Mon147_EvosMoves dw Mon148_EvosMoves dw Mon140_EvosMoves dw Mon141_EvosMoves dw Mon116_EvosMoves dw Mon117_EvosMoves - dw Mon168_EvosMoves ;MissingNo - dw Mon169_EvosMoves ;MissingNo + dw Mon168_EvosMoves ;MissingNo + dw Mon169_EvosMoves ;MissingNo dw Mon027_EvosMoves dw Mon028_EvosMoves dw Mon138_EvosMoves @@ -113,38 +113,38 @@ EvosMovesPointerTable: ; 3b05c (e:705c) dw Mon013_EvosMoves dw Mon014_EvosMoves dw Mon015_EvosMoves - dw Mon170_EvosMoves ;MissingNo + dw Mon170_EvosMoves ;MissingNo dw Mon085_EvosMoves dw Mon057_EvosMoves dw Mon051_EvosMoves dw Mon049_EvosMoves dw Mon087_EvosMoves - dw Mon171_EvosMoves ;MissingNo - dw Mon172_EvosMoves ;MissingNo + dw Mon171_EvosMoves ;MissingNo + dw Mon172_EvosMoves ;MissingNo dw Mon010_EvosMoves dw Mon011_EvosMoves dw Mon012_EvosMoves dw Mon068_EvosMoves - dw Mon173_EvosMoves ;MissingNo + dw Mon173_EvosMoves ;MissingNo dw Mon055_EvosMoves dw Mon097_EvosMoves dw Mon042_EvosMoves dw Mon150_EvosMoves dw Mon143_EvosMoves dw Mon129_EvosMoves - dw Mon174_EvosMoves ;MissingNo - dw Mon175_EvosMoves ;MissingNo + dw Mon174_EvosMoves ;MissingNo + dw Mon175_EvosMoves ;MissingNo dw Mon089_EvosMoves - dw Mon176_EvosMoves ;MissingNo + dw Mon176_EvosMoves ;MissingNo dw Mon099_EvosMoves dw Mon091_EvosMoves - dw Mon177_EvosMoves ;MissingNo + dw Mon177_EvosMoves ;MissingNo dw Mon101_EvosMoves dw Mon036_EvosMoves dw Mon110_EvosMoves dw Mon053_EvosMoves dw Mon105_EvosMoves - dw Mon178_EvosMoves ;MissingNo + dw Mon178_EvosMoves ;MissingNo dw Mon093_EvosMoves dw Mon063_EvosMoves dw Mon065_EvosMoves @@ -154,13 +154,13 @@ EvosMovesPointerTable: ; 3b05c (e:705c) dw Mon001_EvosMoves dw Mon003_EvosMoves dw Mon073_EvosMoves - dw Mon179_EvosMoves ;MissingNo + dw Mon179_EvosMoves ;MissingNo dw Mon118_EvosMoves dw Mon119_EvosMoves - dw Mon180_EvosMoves ;MissingNo - dw Mon181_EvosMoves ;MissingNo - dw Mon182_EvosMoves ;MissingNo - dw Mon183_EvosMoves ;MissingNo + dw Mon180_EvosMoves ;MissingNo + dw Mon181_EvosMoves ;MissingNo + dw Mon182_EvosMoves ;MissingNo + dw Mon183_EvosMoves ;MissingNo dw Mon077_EvosMoves dw Mon078_EvosMoves dw Mon019_EvosMoves @@ -170,19 +170,19 @@ EvosMovesPointerTable: ; 3b05c (e:705c) dw Mon074_EvosMoves dw Mon137_EvosMoves dw Mon142_EvosMoves - dw Mon184_EvosMoves ;MissingNo + dw Mon184_EvosMoves ;MissingNo dw Mon081_EvosMoves - dw Mon185_EvosMoves ;MissingNo - dw Mon186_EvosMoves ;MissingNo + dw Mon185_EvosMoves ;MissingNo + dw Mon186_EvosMoves ;MissingNo dw Mon004_EvosMoves dw Mon007_EvosMoves dw Mon005_EvosMoves dw Mon008_EvosMoves dw Mon006_EvosMoves - dw Mon187_EvosMoves ;MissingNo - dw Mon188_EvosMoves ;MissingNo - dw Mon189_EvosMoves ;MissingNo - dw Mon190_EvosMoves ;MissingNo + dw Mon187_EvosMoves ;MissingNo + dw Mon188_EvosMoves ;MissingNo + dw Mon189_EvosMoves ;MissingNo + dw Mon190_EvosMoves ;MissingNo dw Mon043_EvosMoves dw Mon044_EvosMoves dw Mon045_EvosMoves @@ -190,7 +190,7 @@ EvosMovesPointerTable: ; 3b05c (e:705c) dw Mon070_EvosMoves dw Mon071_EvosMoves -Mon112_EvosMoves: ; 3b1d8 (e:71d8) +Mon112_EvosMoves: ;RHYDON ;Evolutions db 0 @@ -202,7 +202,8 @@ Mon112_EvosMoves: ; 3b1d8 (e:71d8) db 55,LEER db 64,TAKE_DOWN db 0 -Mon115_EvosMoves: ; 3b1e6 (e:71e6) + +Mon115_EvosMoves: ;KANGASKHAN ;Evolutions db 0 @@ -213,7 +214,8 @@ Mon115_EvosMoves: ; 3b1e6 (e:71e6) db 41,LEER db 46,DIZZY_PUNCH db 0 -Mon032_EvosMoves: ; 3b1f2 (e:71f2) + +Mon032_EvosMoves: ;NIDORAN_M ;Evolutions db EV_LEVEL,16,NIDORINO @@ -226,7 +228,8 @@ Mon032_EvosMoves: ; 3b1f2 (e:71f2) db 36,HORN_DRILL db 43,DOUBLE_KICK db 0 -Mon035_EvosMoves: ; 3b203 (e:7203) + +Mon035_EvosMoves: ;CLEFAIRY ;Evolutions db EV_ITEM,MOON_STONE,1,CLEFABLE @@ -239,7 +242,8 @@ Mon035_EvosMoves: ; 3b203 (e:7203) db 39,DEFENSE_CURL db 48,LIGHT_SCREEN db 0 -Mon021_EvosMoves: ; 3b215 (e:7215) + +Mon021_EvosMoves: ;SPEAROW ;Evolutions db EV_LEVEL,20,FEAROW @@ -251,7 +255,8 @@ Mon021_EvosMoves: ; 3b215 (e:7215) db 29,DRILL_PECK db 36,AGILITY db 0 -Mon100_EvosMoves: ; 3b224 (e:7224) + +Mon100_EvosMoves: ;VOLTORB ;Evolutions db EV_LEVEL,30,ELECTRODE @@ -263,7 +268,8 @@ Mon100_EvosMoves: ; 3b224 (e:7224) db 36,SWIFT db 43,EXPLOSION db 0 -Mon034_EvosMoves: ; 3b233 (e:7233) + +Mon034_EvosMoves: ;NIDOKING ;Evolutions db 0 @@ -272,7 +278,8 @@ Mon034_EvosMoves: ; 3b233 (e:7233) db 14,POISON_STING db 23,THRASH db 0 -Mon080_EvosMoves: ; 3b23b (e:723b) + +Mon080_EvosMoves: ;SLOWBRO ;Evolutions db 0 @@ -285,7 +292,8 @@ Mon080_EvosMoves: ; 3b23b (e:723b) db 44,AMNESIA db 55,PSYCHIC_M db 0 -Mon002_EvosMoves: ; 3b24b (e:724b) + +Mon002_EvosMoves: ;IVYSAUR ;Evolutions db EV_LEVEL,32,VENUSAUR @@ -299,14 +307,16 @@ Mon002_EvosMoves: ; 3b24b (e:724b) db 46,SLEEP_POWDER db 54,SOLARBEAM db 0 -Mon103_EvosMoves: ; 3b25e (e:725e) + +Mon103_EvosMoves: ;EXEGGUTOR ;Evolutions db 0 ;Learnset db 28,STOMP db 0 -Mon108_EvosMoves: ; 3b262 (e:7262) + +Mon108_EvosMoves: ;LICKITUNG ;Evolutions db 0 @@ -317,10 +327,11 @@ Mon108_EvosMoves: ; 3b262 (e:7262) db 31,SLAM db 39,SCREECH db 0 -Mon102_EvosMoves: ; 3b26e (e:726e) + +Mon102_EvosMoves: ;EXEGGCUTE ;Evolutions - db EV_ITEM,LEAF_STONE ,1,EXEGGUTOR + db EV_ITEM,LEAF_STONE,1,EXEGGUTOR db 0 ;Learnset db 25,REFLECT @@ -330,7 +341,8 @@ Mon102_EvosMoves: ; 3b26e (e:726e) db 42,SOLARBEAM db 48,SLEEP_POWDER db 0 -Mon088_EvosMoves: ; 3b280 (e:7280) + +Mon088_EvosMoves: ;GRIMER ;Evolutions db EV_LEVEL,38,MUK @@ -343,7 +355,8 @@ Mon088_EvosMoves: ; 3b280 (e:7280) db 48,SCREECH db 55,ACID_ARMOR db 0 -Mon094_EvosMoves: ; 3b291 (e:7291) + +Mon094_EvosMoves: ;GENGAR ;Evolutions db 0 @@ -351,7 +364,8 @@ Mon094_EvosMoves: ; 3b291 (e:7291) db 29,HYPNOSIS db 38,DREAM_EATER db 0 -Mon029_EvosMoves: ; 3b297 (e:7297) + +Mon029_EvosMoves: ;NIDORAN_F ;Evolutions db EV_LEVEL,16,NIDORINA @@ -364,7 +378,8 @@ Mon029_EvosMoves: ; 3b297 (e:7297) db 36,FURY_SWIPES db 43,DOUBLE_KICK db 0 -Mon031_EvosMoves: ; 3b2a8 (e:72a8) + +Mon031_EvosMoves: ;NIDOQUEEN ;Evolutions db 0 @@ -373,7 +388,8 @@ Mon031_EvosMoves: ; 3b2a8 (e:72a8) db 14,POISON_STING db 23,BODY_SLAM db 0 -Mon104_EvosMoves: ; 3b2b0 (e:72b0) + +Mon104_EvosMoves: ;CUBONE ;Evolutions db EV_LEVEL,28,MAROWAK @@ -385,7 +401,8 @@ Mon104_EvosMoves: ; 3b2b0 (e:72b0) db 43,BONEMERANG db 46,RAGE db 0 -Mon111_EvosMoves: ; 3b2bf (e:72bf) + +Mon111_EvosMoves: ;RHYHORN ;Evolutions db EV_LEVEL,42,RHYDON @@ -398,7 +415,8 @@ Mon111_EvosMoves: ; 3b2bf (e:72bf) db 50,LEER db 55,TAKE_DOWN db 0 -Mon131_EvosMoves: ; 3b2d0 (e:72d0) + +Mon131_EvosMoves: ;LAPRAS ;Evolutions db 0 @@ -410,13 +428,15 @@ Mon131_EvosMoves: ; 3b2d0 (e:72d0) db 38,ICE_BEAM db 46,HYDRO_PUMP db 0 -Mon059_EvosMoves: ; 3b2de (e:72de) + +Mon059_EvosMoves: ;ARCANINE ;Evolutions db 0 ;Learnset db 0 -Mon151_EvosMoves: ; 3b2e0 (e:72e0) + +Mon151_EvosMoves: ;MEW ;Evolutions db 0 @@ -426,7 +446,8 @@ Mon151_EvosMoves: ; 3b2e0 (e:72e0) db 30,METRONOME db 40,PSYCHIC_M db 0 -Mon130_EvosMoves: ; 3b2ea (e:72ea) + +Mon130_EvosMoves: ;GYARADOS ;Evolutions db 0 @@ -437,10 +458,11 @@ Mon130_EvosMoves: ; 3b2ea (e:72ea) db 41,HYDRO_PUMP db 52,HYPER_BEAM db 0 -Mon090_EvosMoves: ; 3b2f6 (e:72f6) + +Mon090_EvosMoves: ;SHELLDER ;Evolutions - db EV_ITEM,WATER_STONE ,1,CLOYSTER + db EV_ITEM,WATER_STONE,1,CLOYSTER db 0 ;Learnset db 18,SUPERSONIC @@ -449,7 +471,8 @@ Mon090_EvosMoves: ; 3b2f6 (e:72f6) db 39,LEER db 50,ICE_BEAM db 0 -Mon072_EvosMoves: ; 3b306 (e:7306) + +Mon072_EvosMoves: ;TENTACOOL ;Evolutions db EV_LEVEL,30,TENTACRUEL @@ -464,7 +487,8 @@ Mon072_EvosMoves: ; 3b306 (e:7306) db 40,SCREECH db 48,HYDRO_PUMP db 0 -Mon092_EvosMoves: ; 3b31b (e:731b) + +Mon092_EvosMoves: ;GASTLY ;Evolutions db EV_LEVEL,25,HAUNTER @@ -473,7 +497,8 @@ Mon092_EvosMoves: ; 3b31b (e:731b) db 27,HYPNOSIS db 35,DREAM_EATER db 0 -Mon123_EvosMoves: ; 3b324 (e:7324) + +Mon123_EvosMoves: ;SCYTHER ;Evolutions db 0 @@ -485,10 +510,11 @@ Mon123_EvosMoves: ; 3b324 (e:7324) db 35,SWORDS_DANCE db 42,AGILITY db 0 -Mon120_EvosMoves: ; 3b332 (e:7332) + +Mon120_EvosMoves: ;STARYU ;Evolutions - db EV_ITEM,WATER_STONE ,1,STARMIE + db EV_ITEM,WATER_STONE,1,STARMIE db 0 ;Learnset db 17,WATER_GUN @@ -499,7 +525,8 @@ Mon120_EvosMoves: ; 3b332 (e:7332) db 42,LIGHT_SCREEN db 47,HYDRO_PUMP db 0 -Mon009_EvosMoves: ; 3b346 (e:7346) + +Mon009_EvosMoves: ;BLASTOISE ;Evolutions db 0 @@ -511,7 +538,8 @@ Mon009_EvosMoves: ; 3b346 (e:7346) db 42,SKULL_BASH db 52,HYDRO_PUMP db 0 -Mon127_EvosMoves: ; 3b354 (e:7354) + +Mon127_EvosMoves: ;PINSIR ;Evolutions db 0 @@ -523,7 +551,8 @@ Mon127_EvosMoves: ; 3b354 (e:7354) db 49,SLASH db 54,SWORDS_DANCE db 0 -Mon114_EvosMoves: ; 3b362 (e:7362) + +Mon114_EvosMoves: ;TANGELA ;Evolutions db 0 @@ -536,20 +565,21 @@ Mon114_EvosMoves: ; 3b362 (e:7362) db 49,GROWTH db 0 -Mon152_EvosMoves: ; 3b370 (e:7370) +Mon152_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon153_EvosMoves: ; 3b372 (e:7372) +Mon153_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon058_EvosMoves: ; 3b374 (e:7374) + +Mon058_EvosMoves: ;GROWLITHE ;Evolutions db EV_ITEM,FIRE_STONE,1,ARCANINE @@ -561,7 +591,8 @@ Mon058_EvosMoves: ; 3b374 (e:7374) db 39,AGILITY db 50,FLAMETHROWER db 0 -Mon095_EvosMoves: ; 3b384 (e:7384) + +Mon095_EvosMoves: ;ONIX ;Evolutions db 0 @@ -572,7 +603,8 @@ Mon095_EvosMoves: ; 3b384 (e:7384) db 33,SLAM db 43,HARDEN db 0 -Mon022_EvosMoves: ; 3b390 (e:7390) + +Mon022_EvosMoves: ;FEAROW ;Evolutions db 0 @@ -583,7 +615,8 @@ Mon022_EvosMoves: ; 3b390 (e:7390) db 34,DRILL_PECK db 43,AGILITY db 0 -Mon016_EvosMoves: ; 3b39c (e:739c) + +Mon016_EvosMoves: ;PIDGEY ;Evolutions db EV_LEVEL,18,PIDGEOTTO @@ -596,7 +629,8 @@ Mon016_EvosMoves: ; 3b39c (e:739c) db 36,AGILITY db 44,MIRROR_MOVE db 0 -Mon079_EvosMoves: ; 3b3ad (e:73ad) + +Mon079_EvosMoves: ;SLOWPOKE ;Evolutions db EV_LEVEL,37,SLOWBRO @@ -609,7 +643,8 @@ Mon079_EvosMoves: ; 3b3ad (e:73ad) db 40,AMNESIA db 48,PSYCHIC_M db 0 -Mon064_EvosMoves: ; 3b3be (e:73be) + +Mon064_EvosMoves: ;KADABRA ;Evolutions db EV_TRADE,1,ALAKAZAM @@ -622,7 +657,8 @@ Mon064_EvosMoves: ; 3b3be (e:73be) db 38,PSYCHIC_M db 42,REFLECT db 0 -Mon075_EvosMoves: ; 3b3cf (e:73cf) + +Mon075_EvosMoves: ;GRAVELER ;Evolutions db EV_TRADE,1,GOLEM @@ -635,7 +671,8 @@ Mon075_EvosMoves: ; 3b3cf (e:73cf) db 36,EARTHQUAKE db 43,EXPLOSION db 0 -Mon113_EvosMoves: ; 3b3e0 (e:73e0) + +Mon113_EvosMoves: ;CHANSEY ;Evolutions db 0 @@ -647,7 +684,8 @@ Mon113_EvosMoves: ; 3b3e0 (e:73e0) db 48,LIGHT_SCREEN db 54,DOUBLE_EDGE db 0 -Mon067_EvosMoves: ; 3b3ee (e:73ee) + +Mon067_EvosMoves: ;MACHOKE ;Evolutions db EV_TRADE,1,MACHAMP @@ -659,7 +697,8 @@ Mon067_EvosMoves: ; 3b3ee (e:73ee) db 44,SEISMIC_TOSS db 52,SUBMISSION db 0 -Mon122_EvosMoves: ; 3b3fd (e:73fd) + +Mon122_EvosMoves: ;MR_MIME ;Evolutions db 0 @@ -670,7 +709,8 @@ Mon122_EvosMoves: ; 3b3fd (e:73fd) db 39,MEDITATE db 47,SUBSTITUTE db 0 -Mon106_EvosMoves: ; 3b409 (e:7409) + +Mon106_EvosMoves: ;HITMONLEE ;Evolutions db 0 @@ -681,7 +721,8 @@ Mon106_EvosMoves: ; 3b409 (e:7409) db 48,HI_JUMP_KICK db 53,MEGA_KICK db 0 -Mon107_EvosMoves: ; 3b415 (e:7415) + +Mon107_EvosMoves: ;HITMONCHAN ;Evolutions db 0 @@ -692,7 +733,8 @@ Mon107_EvosMoves: ; 3b415 (e:7415) db 48,MEGA_PUNCH db 53,COUNTER db 0 -Mon024_EvosMoves: ; 3b421 (e:7421) + +Mon024_EvosMoves: ;ARBOK ;Evolutions db 0 @@ -703,7 +745,8 @@ Mon024_EvosMoves: ; 3b421 (e:7421) db 36,SCREECH db 47,ACID db 0 -Mon047_EvosMoves: ; 3b42d (e:742d) + +Mon047_EvosMoves: ;PARASECT ;Evolutions db 0 @@ -714,7 +757,8 @@ Mon047_EvosMoves: ; 3b42d (e:742d) db 39,SLASH db 48,GROWTH db 0 -Mon054_EvosMoves: ; 3b439 (e:7439) + +Mon054_EvosMoves: ;PSYDUCK ;Evolutions db EV_LEVEL,33,GOLDUCK @@ -726,7 +770,8 @@ Mon054_EvosMoves: ; 3b439 (e:7439) db 43,FURY_SWIPES db 52,HYDRO_PUMP db 0 -Mon096_EvosMoves: ; 3b448 (e:7448) + +Mon096_EvosMoves: ;DROWZEE ;Evolutions db EV_LEVEL,26,HYPNO @@ -739,7 +784,8 @@ Mon096_EvosMoves: ; 3b448 (e:7448) db 32,PSYCHIC_M db 37,MEDITATE db 0 -Mon076_EvosMoves: ; 3b459 (e:7459) + +Mon076_EvosMoves: ;GOLEM ;Evolutions db 0 @@ -752,13 +798,14 @@ Mon076_EvosMoves: ; 3b459 (e:7459) db 43,EXPLOSION db 0 -Mon154_EvosMoves: ; 3b467 (e:7467) +Mon154_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon126_EvosMoves: ; 3b469 (e:7469) + +Mon126_EvosMoves: ;MAGMAR ;Evolutions db 0 @@ -771,13 +818,14 @@ Mon126_EvosMoves: ; 3b469 (e:7469) db 55,FLAMETHROWER db 0 -Mon155_EvosMoves: ; 3b477 (e:7477) +Mon155_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon125_EvosMoves: ; 3b479 (e:7479) + +Mon125_EvosMoves: ;ELECTABUZZ ;Evolutions db 0 @@ -788,7 +836,8 @@ Mon125_EvosMoves: ; 3b479 (e:7479) db 49,LIGHT_SCREEN db 54,THUNDER db 0 -Mon082_EvosMoves: ; 3b485 (e:7485) + +Mon082_EvosMoves: ;MAGNETON ;Evolutions db 0 @@ -800,7 +849,8 @@ Mon082_EvosMoves: ; 3b485 (e:7485) db 46,SWIFT db 54,SCREECH db 0 -Mon109_EvosMoves: ; 3b493 (e:7493) + +Mon109_EvosMoves: ;KOFFING ;Evolutions db EV_LEVEL,35,WEEZING @@ -813,13 +863,14 @@ Mon109_EvosMoves: ; 3b493 (e:7493) db 48,EXPLOSION db 0 -Mon156_EvosMoves: ; 3b4a2 (e:74a2) +Mon156_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon056_EvosMoves: ; 3b4a4 (e:74a4) + +Mon056_EvosMoves: ;MANKEY ;Evolutions db EV_LEVEL,28,PRIMEAPE @@ -831,7 +882,8 @@ Mon056_EvosMoves: ; 3b4a4 (e:74a4) db 33,SEISMIC_TOSS db 39,THRASH db 0 -Mon086_EvosMoves: ; 3b4b3 (e:74b3) + +Mon086_EvosMoves: ;SEEL ;Evolutions db EV_LEVEL,34,DEWGONG @@ -843,7 +895,8 @@ Mon086_EvosMoves: ; 3b4b3 (e:74b3) db 45,TAKE_DOWN db 50,ICE_BEAM db 0 -Mon050_EvosMoves: ; 3b4c2 (e:74c2) + +Mon050_EvosMoves: ;DIGLETT ;Evolutions db EV_LEVEL,26,DUGTRIO @@ -855,7 +908,8 @@ Mon050_EvosMoves: ; 3b4c2 (e:74c2) db 31,SLASH db 40,EARTHQUAKE db 0 -Mon128_EvosMoves: ; 3b4d1 (e:74d1) + +Mon128_EvosMoves: ;TAUROS ;Evolutions db 0 @@ -867,28 +921,29 @@ Mon128_EvosMoves: ; 3b4d1 (e:74d1) db 51,TAKE_DOWN db 0 -Mon157_EvosMoves: ; 3b4dd (e:74dd) +Mon157_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon158_EvosMoves: ; 3b4df (e:74df) +Mon158_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon159_EvosMoves: ; 3b4e1 (e:74e1) +Mon159_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon083_EvosMoves: ; 3b4e3 (e:74e3) -;FARFETCH_D + +Mon083_EvosMoves: +;FARFETCHD ;Evolutions db 0 ;Learnset @@ -898,7 +953,8 @@ Mon083_EvosMoves: ; 3b4e3 (e:74e3) db 31,AGILITY db 39,SLASH db 0 -Mon048_EvosMoves: ; 3b4ef (e:74ef) + +Mon048_EvosMoves: ;VENONAT ;Evolutions db EV_LEVEL,31,VENOMOTH @@ -911,7 +967,8 @@ Mon048_EvosMoves: ; 3b4ef (e:74ef) db 38,SLEEP_POWDER db 43,PSYCHIC_M db 0 -Mon149_EvosMoves: ; 3b500 (e:7500) + +Mon149_EvosMoves: ;DRAGONITE ;Evolutions db 0 @@ -923,27 +980,28 @@ Mon149_EvosMoves: ; 3b500 (e:7500) db 60,HYPER_BEAM db 0 -Mon160_EvosMoves: ; 3b50c (e:750c) +Mon160_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon161_EvosMoves: ; 3b50e (e:750e) +Mon161_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon162_EvosMoves: ; 3b510 (e:7510) +Mon162_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon084_EvosMoves: ; 3b512 (e:7512) + +Mon084_EvosMoves: ;DODUO ;Evolutions db EV_LEVEL,31,DODRIO @@ -956,7 +1014,8 @@ Mon084_EvosMoves: ; 3b512 (e:7512) db 40,TRI_ATTACK db 44,AGILITY db 0 -Mon060_EvosMoves: ; 3b523 (e:7523) + +Mon060_EvosMoves: ;POLIWAG ;Evolutions db EV_LEVEL,25,POLIWHIRL @@ -969,7 +1028,8 @@ Mon060_EvosMoves: ; 3b523 (e:7523) db 38,AMNESIA db 45,HYDRO_PUMP db 0 -Mon124_EvosMoves: ; 3b534 (e:7534) + +Mon124_EvosMoves: ;JYNX ;Evolutions db 0 @@ -981,7 +1041,8 @@ Mon124_EvosMoves: ; 3b534 (e:7534) db 47,THRASH db 58,BLIZZARD db 0 -Mon146_EvosMoves: ; 3b542 (e:7542) + +Mon146_EvosMoves: ;MOLTRES ;Evolutions db 0 @@ -990,7 +1051,8 @@ Mon146_EvosMoves: ; 3b542 (e:7542) db 55,AGILITY db 60,SKY_ATTACK db 0 -Mon144_EvosMoves: ; 3b54a (e:754a) + +Mon144_EvosMoves: ;ARTICUNO ;Evolutions db 0 @@ -999,7 +1061,8 @@ Mon144_EvosMoves: ; 3b54a (e:754a) db 55,AGILITY db 60,MIST db 0 -Mon145_EvosMoves: ; 3b552 (e:7552) + +Mon145_EvosMoves: ;ZAPDOS ;Evolutions db 0 @@ -1008,13 +1071,15 @@ Mon145_EvosMoves: ; 3b552 (e:7552) db 55,AGILITY db 60,LIGHT_SCREEN db 0 -Mon132_EvosMoves: ; 3b55a (e:755a) + +Mon132_EvosMoves: ;DITTO ;Evolutions db 0 ;Learnset db 0 -Mon052_EvosMoves: ; 3b55c (e:755c) + +Mon052_EvosMoves: ;MEOWTH ;Evolutions db EV_LEVEL,28,PERSIAN @@ -1026,7 +1091,8 @@ Mon052_EvosMoves: ; 3b55c (e:755c) db 33,FURY_SWIPES db 44,SLASH db 0 -Mon098_EvosMoves: ; 3b56b (e:756b) + +Mon098_EvosMoves: ;KRABBY ;Evolutions db EV_LEVEL,28,KINGLER @@ -1039,27 +1105,28 @@ Mon098_EvosMoves: ; 3b56b (e:756b) db 40,HARDEN db 0 -Mon163_EvosMoves: ; 3b57a (e:757a) +Mon163_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon164_EvosMoves: ; 3b57c (e:757c) +Mon164_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon165_EvosMoves: ; 3b57e (e:757e) +Mon165_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon037_EvosMoves: ; 3b580 (e:7580) + +Mon037_EvosMoves: ;VULPIX ;Evolutions db EV_ITEM,FIRE_STONE,1,NINETALES @@ -1071,16 +1138,18 @@ Mon037_EvosMoves: ; 3b580 (e:7580) db 35,FLAMETHROWER db 42,FIRE_SPIN db 0 -Mon038_EvosMoves: ; 3b590 (e:7590) + +Mon038_EvosMoves: ;NINETALES ;Evolutions db 0 ;Learnset db 0 -Mon025_EvosMoves: ; 3b592 (e:7592) + +Mon025_EvosMoves: ;PIKACHU ;Evolutions - db EV_ITEM,THUNDER_STONE ,1,RAICHU + db EV_ITEM,THUNDER_STONE,1,RAICHU db 0 ;Learnset db 9,THUNDER_WAVE @@ -1089,27 +1158,29 @@ Mon025_EvosMoves: ; 3b592 (e:7592) db 33,AGILITY db 43,THUNDER db 0 -Mon026_EvosMoves: ; 3b5a2 (e:75a2) + +Mon026_EvosMoves: ;RAICHU ;Evolutions db 0 ;Learnset db 0 -Mon166_EvosMoves: ; 3b5a4 (e:75a4) +Mon166_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon167_EvosMoves: ; 3b5a6 (e:75a6) +Mon167_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon147_EvosMoves: ; 3b5a8 (e:75a8) + +Mon147_EvosMoves: ;DRATINI ;Evolutions db EV_LEVEL,30,DRAGONAIR @@ -1121,7 +1192,8 @@ Mon147_EvosMoves: ; 3b5a8 (e:75a8) db 40,DRAGON_RAGE db 50,HYPER_BEAM db 0 -Mon148_EvosMoves: ; 3b5b7 (e:75b7) + +Mon148_EvosMoves: ;DRAGONAIR ;Evolutions db EV_LEVEL,55,DRAGONITE @@ -1133,7 +1205,8 @@ Mon148_EvosMoves: ; 3b5b7 (e:75b7) db 45,DRAGON_RAGE db 55,HYPER_BEAM db 0 -Mon140_EvosMoves: ; 3b5c6 (e:75c6) + +Mon140_EvosMoves: ;KABUTO ;Evolutions db EV_LEVEL,40,KABUTOPS @@ -1144,7 +1217,8 @@ Mon140_EvosMoves: ; 3b5c6 (e:75c6) db 44,LEER db 49,HYDRO_PUMP db 0 -Mon141_EvosMoves: ; 3b5d3 (e:75d3) + +Mon141_EvosMoves: ;KABUTOPS ;Evolutions db 0 @@ -1154,7 +1228,8 @@ Mon141_EvosMoves: ; 3b5d3 (e:75d3) db 46,LEER db 53,HYDRO_PUMP db 0 -Mon116_EvosMoves: ; 3b5dd (e:75dd) + +Mon116_EvosMoves: ;HORSEA ;Evolutions db EV_LEVEL,32,SEADRA @@ -1166,7 +1241,8 @@ Mon116_EvosMoves: ; 3b5dd (e:75dd) db 37,AGILITY db 45,HYDRO_PUMP db 0 -Mon117_EvosMoves: ; 3b5ec (e:75ec) + +Mon117_EvosMoves: ;SEADRA ;Evolutions db 0 @@ -1178,20 +1254,21 @@ Mon117_EvosMoves: ; 3b5ec (e:75ec) db 52,HYDRO_PUMP db 0 -Mon168_EvosMoves: ; 3b5f8 (e:75f8) +Mon168_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon169_EvosMoves: ; 3b5fa (e:75fa) +Mon169_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon027_EvosMoves: ; 3b5fc (e:75fc) + +Mon027_EvosMoves: ;SANDSHREW ;Evolutions db EV_LEVEL,22,SANDSLASH @@ -1203,7 +1280,8 @@ Mon027_EvosMoves: ; 3b5fc (e:75fc) db 31,SWIFT db 38,FURY_SWIPES db 0 -Mon028_EvosMoves: ; 3b60b (e:760b) + +Mon028_EvosMoves: ;SANDSLASH ;Evolutions db 0 @@ -1214,7 +1292,8 @@ Mon028_EvosMoves: ; 3b60b (e:760b) db 36,SWIFT db 47,FURY_SWIPES db 0 -Mon138_EvosMoves: ; 3b617 (e:7617) + +Mon138_EvosMoves: ;OMANYTE ;Evolutions db EV_LEVEL,40,OMASTAR @@ -1225,7 +1304,8 @@ Mon138_EvosMoves: ; 3b617 (e:7617) db 46,SPIKE_CANNON db 53,HYDRO_PUMP db 0 -Mon139_EvosMoves: ; 3b624 (e:7624) + +Mon139_EvosMoves: ;OMASTAR ;Evolutions db 0 @@ -1235,7 +1315,8 @@ Mon139_EvosMoves: ; 3b624 (e:7624) db 44,SPIKE_CANNON db 49,HYDRO_PUMP db 0 -Mon039_EvosMoves: ; 3b62e (e:762e) + +Mon039_EvosMoves: ;JIGGLYPUFF ;Evolutions db EV_ITEM,MOON_STONE,1,WIGGLYTUFF @@ -1249,26 +1330,30 @@ Mon039_EvosMoves: ; 3b62e (e:762e) db 34,BODY_SLAM db 39,DOUBLE_EDGE db 0 -Mon040_EvosMoves: ; 3b642 (e:7642) + +Mon040_EvosMoves: ;WIGGLYTUFF ;Evolutions db 0 ;Learnset db 0 -Mon133_EvosMoves: ; 3b644 (e:7644) + +Mon133_EvosMoves: ;EEVEE ;Evolutions db EV_ITEM,FIRE_STONE,1,FLAREON - db EV_ITEM,THUNDER_STONE ,1,JOLTEON - db EV_ITEM,WATER_STONE ,1,VAPOREON + db EV_ITEM,THUNDER_STONE,1,JOLTEON + db EV_ITEM,WATER_STONE,1,VAPOREON db 0 +Mon133_EvosEnd: ;Learnset db 27,QUICK_ATTACK db 31,TAIL_WHIP db 37,BITE db 45,TAKE_DOWN db 0 -Mon136_EvosMoves: ; 3b65a (e:765a) + +Mon136_EvosMoves: ;FLAREON ;Evolutions db 0 @@ -1282,7 +1367,8 @@ Mon136_EvosMoves: ; 3b65a (e:765a) db 48,RAGE db 54,FLAMETHROWER db 0 -Mon135_EvosMoves: ; 3b66c (e:766c) + +Mon135_EvosMoves: ;JOLTEON ;Evolutions db 0 @@ -1296,7 +1382,8 @@ Mon135_EvosMoves: ; 3b66c (e:766c) db 48,PIN_MISSILE db 54,THUNDER db 0 -Mon134_EvosMoves: ; 3b67e (e:767e) + +Mon134_EvosMoves: ;VAPOREON ;Evolutions db 0 @@ -1310,7 +1397,8 @@ Mon134_EvosMoves: ; 3b67e (e:767e) db 48,MIST db 54,HYDRO_PUMP db 0 -Mon066_EvosMoves: ; 3b690 (e:7690) + +Mon066_EvosMoves: ;MACHOP ;Evolutions db EV_LEVEL,28,MACHOKE @@ -1322,7 +1410,8 @@ Mon066_EvosMoves: ; 3b690 (e:7690) db 39,SEISMIC_TOSS db 46,SUBMISSION db 0 -Mon041_EvosMoves: ; 3b69f (e:769f) + +Mon041_EvosMoves: ;ZUBAT ;Evolutions db EV_LEVEL,22,GOLBAT @@ -1334,7 +1423,8 @@ Mon041_EvosMoves: ; 3b69f (e:769f) db 28,WING_ATTACK db 36,HAZE db 0 -Mon023_EvosMoves: ; 3b6ae (e:76ae) + +Mon023_EvosMoves: ;EKANS ;Evolutions db EV_LEVEL,22,ARBOK @@ -1346,7 +1436,8 @@ Mon023_EvosMoves: ; 3b6ae (e:76ae) db 31,SCREECH db 38,ACID db 0 -Mon046_EvosMoves: ; 3b6bd (e:76bd) + +Mon046_EvosMoves: ;PARAS ;Evolutions db EV_LEVEL,24,PARASECT @@ -1358,10 +1449,11 @@ Mon046_EvosMoves: ; 3b6bd (e:76bd) db 34,SLASH db 41,GROWTH db 0 -Mon061_EvosMoves: ; 3b6cc (e:76cc) + +Mon061_EvosMoves: ;POLIWHIRL ;Evolutions - db EV_ITEM,WATER_STONE ,1,POLIWRATH + db EV_ITEM,WATER_STONE,1,POLIWRATH db 0 ;Learnset db 16,HYPNOSIS @@ -1371,7 +1463,8 @@ Mon061_EvosMoves: ; 3b6cc (e:76cc) db 41,AMNESIA db 49,HYDRO_PUMP db 0 -Mon062_EvosMoves: ; 3b6de (e:76de) + +Mon062_EvosMoves: ;POLIWRATH ;Evolutions db 0 @@ -1379,21 +1472,24 @@ Mon062_EvosMoves: ; 3b6de (e:76de) db 16,HYPNOSIS db 19,WATER_GUN db 0 -Mon013_EvosMoves: ; 3b6e4 (e:76e4) + +Mon013_EvosMoves: ;WEEDLE ;Evolutions db EV_LEVEL,7,KAKUNA db 0 ;Learnset db 0 -Mon014_EvosMoves: ; 3b6e9 (e:76e9) + +Mon014_EvosMoves: ;KAKUNA ;Evolutions db EV_LEVEL,10,BEEDRILL db 0 ;Learnset db 0 -Mon015_EvosMoves: ; 3b6ee (e:76ee) + +Mon015_EvosMoves: ;BEEDRILL ;Evolutions db 0 @@ -1406,13 +1502,14 @@ Mon015_EvosMoves: ; 3b6ee (e:76ee) db 35,AGILITY db 0 -Mon170_EvosMoves: ; 3b6fc (e:76fc) +Mon170_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon085_EvosMoves: ; 3b6fe (e:76fe) + +Mon085_EvosMoves: ;DODRIO ;Evolutions db 0 @@ -1424,7 +1521,8 @@ Mon085_EvosMoves: ; 3b6fe (e:76fe) db 45,TRI_ATTACK db 51,AGILITY db 0 -Mon057_EvosMoves: ; 3b70c (e:770c) + +Mon057_EvosMoves: ;PRIMEAPE ;Evolutions db 0 @@ -1435,7 +1533,8 @@ Mon057_EvosMoves: ; 3b70c (e:770c) db 37,SEISMIC_TOSS db 46,THRASH db 0 -Mon051_EvosMoves: ; 3b718 (e:7718) + +Mon051_EvosMoves: ;DUGTRIO ;Evolutions db 0 @@ -1446,7 +1545,8 @@ Mon051_EvosMoves: ; 3b718 (e:7718) db 35,SLASH db 47,EARTHQUAKE db 0 -Mon049_EvosMoves: ; 3b724 (e:7724) + +Mon049_EvosMoves: ;VENOMOTH ;Evolutions db 0 @@ -1458,7 +1558,8 @@ Mon049_EvosMoves: ; 3b724 (e:7724) db 43,SLEEP_POWDER db 50,PSYCHIC_M db 0 -Mon087_EvosMoves: ; 3b732 (e:7732) + +Mon087_EvosMoves: ;DEWGONG ;Evolutions db 0 @@ -1470,34 +1571,37 @@ Mon087_EvosMoves: ; 3b732 (e:7732) db 56,ICE_BEAM db 0 -Mon171_EvosMoves: ; 3b73e (e:773e) +Mon171_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon172_EvosMoves: ; 3b740 (e:7740) +Mon172_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon010_EvosMoves: ; 3b742 (e:7742) + +Mon010_EvosMoves: ;CATERPIE ;Evolutions db EV_LEVEL,7,METAPOD db 0 ;Learnset db 0 -Mon011_EvosMoves: ; 3b747 (e:7747) + +Mon011_EvosMoves: ;METAPOD ;Evolutions db EV_LEVEL,10,BUTTERFREE db 0 ;Learnset db 0 -Mon012_EvosMoves: ; 3b74c (e:774c) + +Mon012_EvosMoves: ;BUTTERFREE ;Evolutions db 0 @@ -1510,7 +1614,8 @@ Mon012_EvosMoves: ; 3b74c (e:774c) db 26,WHIRLWIND db 32,PSYBEAM db 0 -Mon068_EvosMoves: ; 3b75c (e:775c) + +Mon068_EvosMoves: ;MACHAMP ;Evolutions db 0 @@ -1522,13 +1627,14 @@ Mon068_EvosMoves: ; 3b75c (e:775c) db 52,SUBMISSION db 0 -Mon173_EvosMoves: ; 3b768 (e:7768) +Mon173_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon055_EvosMoves: ; 3b76a (e:776a) + +Mon055_EvosMoves: ;GOLDUCK ;Evolutions db 0 @@ -1539,7 +1645,8 @@ Mon055_EvosMoves: ; 3b76a (e:776a) db 48,FURY_SWIPES db 59,HYDRO_PUMP db 0 -Mon097_EvosMoves: ; 3b776 (e:7776) + +Mon097_EvosMoves: ;HYPNO ;Evolutions db 0 @@ -1551,7 +1658,8 @@ Mon097_EvosMoves: ; 3b776 (e:7776) db 37,PSYCHIC_M db 43,MEDITATE db 0 -Mon042_EvosMoves: ; 3b784 (e:7784) + +Mon042_EvosMoves: ;GOLBAT ;Evolutions db 0 @@ -1562,7 +1670,8 @@ Mon042_EvosMoves: ; 3b784 (e:7784) db 32,WING_ATTACK db 43,HAZE db 0 -Mon150_EvosMoves: ; 3b790 (e:7790) + +Mon150_EvosMoves: ;MEWTWO ;Evolutions db 0 @@ -1573,7 +1682,8 @@ Mon150_EvosMoves: ; 3b790 (e:7790) db 75,MIST db 81,AMNESIA db 0 -Mon143_EvosMoves: ; 3b79c (e:779c) + +Mon143_EvosMoves: ;SNORLAX ;Evolutions db 0 @@ -1583,7 +1693,8 @@ Mon143_EvosMoves: ; 3b79c (e:779c) db 48,DOUBLE_EDGE db 56,HYPER_BEAM db 0 -Mon129_EvosMoves: ; 3b7a6 (e:77a6) + +Mon129_EvosMoves: ;MAGIKARP ;Evolutions db EV_LEVEL,20,GYARADOS @@ -1592,20 +1703,21 @@ Mon129_EvosMoves: ; 3b7a6 (e:77a6) db 15,TACKLE db 0 -Mon174_EvosMoves: ; 3b7ad (e:77ad) +Mon174_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon175_EvosMoves: ; 3b7af (e:77af) +Mon175_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon089_EvosMoves: ; 3b7b1 (e:77b1) + +Mon089_EvosMoves: ;MUK ;Evolutions db 0 @@ -1618,13 +1730,14 @@ Mon089_EvosMoves: ; 3b7b1 (e:77b1) db 60,ACID_ARMOR db 0 -Mon176_EvosMoves: ; 3b7bf (e:77bf) +Mon176_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon099_EvosMoves: ; 3b7c1 (e:77c1) + +Mon099_EvosMoves: ;KINGLER ;Evolutions db 0 @@ -1635,7 +1748,8 @@ Mon099_EvosMoves: ; 3b7c1 (e:77c1) db 42,CRABHAMMER db 49,HARDEN db 0 -Mon091_EvosMoves: ; 3b7cd (e:77cd) + +Mon091_EvosMoves: ;CLOYSTER ;Evolutions db 0 @@ -1643,13 +1757,14 @@ Mon091_EvosMoves: ; 3b7cd (e:77cd) db 50,SPIKE_CANNON db 0 -Mon177_EvosMoves: ; 3b7d1 (e:77d1) +Mon177_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon101_EvosMoves: ; 3b7d3 (e:77d3) + +Mon101_EvosMoves: ;ELECTRODE ;Evolutions db 0 @@ -1660,13 +1775,15 @@ Mon101_EvosMoves: ; 3b7d3 (e:77d3) db 40,SWIFT db 50,EXPLOSION db 0 -Mon036_EvosMoves: ; 3b7df (e:77df) + +Mon036_EvosMoves: ;CLEFABLE ;Evolutions db 0 ;Learnset db 0 -Mon110_EvosMoves: ; 3b7e1 (e:77e1) + +Mon110_EvosMoves: ;WEEZING ;Evolutions db 0 @@ -1677,7 +1794,8 @@ Mon110_EvosMoves: ; 3b7e1 (e:77e1) db 49,HAZE db 53,EXPLOSION db 0 -Mon053_EvosMoves: ; 3b7ed (e:77ed) + +Mon053_EvosMoves: ;PERSIAN ;Evolutions db 0 @@ -1688,7 +1806,8 @@ Mon053_EvosMoves: ; 3b7ed (e:77ed) db 37,FURY_SWIPES db 51,SLASH db 0 -Mon105_EvosMoves: ; 3b7f9 (e:77f9) + +Mon105_EvosMoves: ;MAROWAK ;Evolutions db 0 @@ -1700,13 +1819,14 @@ Mon105_EvosMoves: ; 3b7f9 (e:77f9) db 55,RAGE db 0 -Mon178_EvosMoves: ; 3b805 (e:7805) +Mon178_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon093_EvosMoves: ; 3b807 (e:7807) + +Mon093_EvosMoves: ;HAUNTER ;Evolutions db EV_TRADE,1,GENGAR @@ -1715,14 +1835,16 @@ Mon093_EvosMoves: ; 3b807 (e:7807) db 29,HYPNOSIS db 38,DREAM_EATER db 0 -Mon063_EvosMoves: ; 3b810 (e:7810) + +Mon063_EvosMoves: ;ABRA ;Evolutions db EV_LEVEL,16,KADABRA db 0 ;Learnset db 0 -Mon065_EvosMoves: ; 3b815 (e:7815) + +Mon065_EvosMoves: ;ALAKAZAM ;Evolutions db 0 @@ -1734,7 +1856,8 @@ Mon065_EvosMoves: ; 3b815 (e:7815) db 38,PSYCHIC_M db 42,REFLECT db 0 -Mon017_EvosMoves: ; 3b823 (e:7823) + +Mon017_EvosMoves: ;PIDGEOTTO ;Evolutions db EV_LEVEL,36,PIDGEOT @@ -1747,7 +1870,8 @@ Mon017_EvosMoves: ; 3b823 (e:7823) db 40,AGILITY db 49,MIRROR_MOVE db 0 -Mon018_EvosMoves: ; 3b834 (e:7834) + +Mon018_EvosMoves: ;PIDGEOT ;Evolutions db 0 @@ -1759,13 +1883,15 @@ Mon018_EvosMoves: ; 3b834 (e:7834) db 44,AGILITY db 54,MIRROR_MOVE db 0 -Mon121_EvosMoves: ; 3b842 (e:7842) + +Mon121_EvosMoves: ;STARMIE ;Evolutions db 0 ;Learnset db 0 -Mon001_EvosMoves: ; 3b844 (e:7844) + +Mon001_EvosMoves: ;BULBASAUR ;Evolutions db EV_LEVEL,16,IVYSAUR @@ -1779,7 +1905,8 @@ Mon001_EvosMoves: ; 3b844 (e:7844) db 41,SLEEP_POWDER db 48,SOLARBEAM db 0 -Mon003_EvosMoves: ; 3b857 (e:7857) + +Mon003_EvosMoves: ;VENUSAUR ;Evolutions db 0 @@ -1792,7 +1919,8 @@ Mon003_EvosMoves: ; 3b857 (e:7857) db 55,SLEEP_POWDER db 65,SOLARBEAM db 0 -Mon073_EvosMoves: ; 3b867 (e:7867) + +Mon073_EvosMoves: ;TENTACRUEL ;Evolutions db 0 @@ -1807,13 +1935,14 @@ Mon073_EvosMoves: ; 3b867 (e:7867) db 50,HYDRO_PUMP db 0 -Mon179_EvosMoves: ; 3b879 (e:7879) +Mon179_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon118_EvosMoves: ; 3b87b (e:787b) + +Mon118_EvosMoves: ;GOLDEEN ;Evolutions db EV_LEVEL,33,SEAKING @@ -1826,7 +1955,8 @@ Mon118_EvosMoves: ; 3b87b (e:787b) db 45,HORN_DRILL db 54,AGILITY db 0 -Mon119_EvosMoves: ; 3b88c (e:788c) + +Mon119_EvosMoves: ;SEAKING ;Evolutions db 0 @@ -1839,34 +1969,35 @@ Mon119_EvosMoves: ; 3b88c (e:788c) db 54,AGILITY db 0 -Mon180_EvosMoves: ; 3b89a (e:789a) +Mon180_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon181_EvosMoves: ; 3b89c (e:789c) +Mon181_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon182_EvosMoves: ; 3b89e (e:789e) +Mon182_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon183_EvosMoves: ; 3b8a0 (e:78a0) +Mon183_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon077_EvosMoves: ; 3b8a2 (e:78a2) + +Mon077_EvosMoves: ;PONYTA ;Evolutions db EV_LEVEL,40,RAPIDASH @@ -1879,7 +2010,8 @@ Mon077_EvosMoves: ; 3b8a2 (e:78a2) db 43,TAKE_DOWN db 48,AGILITY db 0 -Mon078_EvosMoves: ; 3b8b3 (e:78b3) + +Mon078_EvosMoves: ;RAPIDASH ;Evolutions db 0 @@ -1891,7 +2023,8 @@ Mon078_EvosMoves: ; 3b8b3 (e:78b3) db 47,TAKE_DOWN db 55,AGILITY db 0 -Mon019_EvosMoves: ; 3b8c1 (e:78c1) + +Mon019_EvosMoves: ;RATTATA ;Evolutions db EV_LEVEL,20,RATICATE @@ -1902,7 +2035,8 @@ Mon019_EvosMoves: ; 3b8c1 (e:78c1) db 23,FOCUS_ENERGY db 34,SUPER_FANG db 0 -Mon020_EvosMoves: ; 3b8ce (e:78ce) + +Mon020_EvosMoves: ;RATICATE ;Evolutions db 0 @@ -1912,7 +2046,8 @@ Mon020_EvosMoves: ; 3b8ce (e:78ce) db 27,FOCUS_ENERGY db 41,SUPER_FANG db 0 -Mon033_EvosMoves: ; 3b8d8 (e:78d8) + +Mon033_EvosMoves: ;NIDORINO ;Evolutions db EV_ITEM,MOON_STONE,1,NIDOKING @@ -1925,7 +2060,8 @@ Mon033_EvosMoves: ; 3b8d8 (e:78d8) db 41,HORN_DRILL db 50,DOUBLE_KICK db 0 -Mon030_EvosMoves: ; 3b8ea (e:78ea) + +Mon030_EvosMoves: ;NIDORINA ;Evolutions db EV_ITEM,MOON_STONE,1,NIDOQUEEN @@ -1938,7 +2074,8 @@ Mon030_EvosMoves: ; 3b8ea (e:78ea) db 41,FURY_SWIPES db 50,DOUBLE_KICK db 0 -Mon074_EvosMoves: ; 3b8fc (e:78fc) + +Mon074_EvosMoves: ;GEODUDE ;Evolutions db EV_LEVEL,25,GRAVELER @@ -1951,7 +2088,8 @@ Mon074_EvosMoves: ; 3b8fc (e:78fc) db 31,EARTHQUAKE db 36,EXPLOSION db 0 -Mon137_EvosMoves: ; 3b90d (e:790d) + +Mon137_EvosMoves: ;PORYGON ;Evolutions db 0 @@ -1961,7 +2099,8 @@ Mon137_EvosMoves: ; 3b90d (e:790d) db 35,AGILITY db 42,TRI_ATTACK db 0 -Mon142_EvosMoves: ; 3b917 (e:7917) + +Mon142_EvosMoves: ;AERODACTYL ;Evolutions db 0 @@ -1972,13 +2111,14 @@ Mon142_EvosMoves: ; 3b917 (e:7917) db 54,HYPER_BEAM db 0 -Mon184_EvosMoves: ; 3b921 (e:7921) +Mon184_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon081_EvosMoves: ; 3b923 (e:7923) + +Mon081_EvosMoves: ;MAGNEMITE ;Evolutions db EV_LEVEL,30,MAGNETON @@ -1992,20 +2132,21 @@ Mon081_EvosMoves: ; 3b923 (e:7923) db 47,SCREECH db 0 -Mon185_EvosMoves: ; 3b934 (e:7934) +Mon185_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon186_EvosMoves: ; 3b936 (e:7936) +Mon186_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon004_EvosMoves: ; 3b938 (e:7938) + +Mon004_EvosMoves: ;CHARMANDER ;Evolutions db EV_LEVEL,16,CHARMELEON @@ -2018,7 +2159,8 @@ Mon004_EvosMoves: ; 3b938 (e:7938) db 38,FLAMETHROWER db 46,FIRE_SPIN db 0 -Mon007_EvosMoves: ; 3b949 (e:7949) + +Mon007_EvosMoves: ;SQUIRTLE ;Evolutions db EV_LEVEL,16,WARTORTLE @@ -2031,7 +2173,8 @@ Mon007_EvosMoves: ; 3b949 (e:7949) db 35,SKULL_BASH db 42,HYDRO_PUMP db 0 -Mon005_EvosMoves: ; 3b95a (e:795a) + +Mon005_EvosMoves: ;CHARMELEON ;Evolutions db EV_LEVEL,36,CHARIZARD @@ -2044,7 +2187,8 @@ Mon005_EvosMoves: ; 3b95a (e:795a) db 42,FLAMETHROWER db 56,FIRE_SPIN db 0 -Mon008_EvosMoves: ; 3b96b (e:796b) + +Mon008_EvosMoves: ;WARTORTLE ;Evolutions db EV_LEVEL,36,BLASTOISE @@ -2057,7 +2201,8 @@ Mon008_EvosMoves: ; 3b96b (e:796b) db 39,SKULL_BASH db 47,HYDRO_PUMP db 0 -Mon006_EvosMoves: ; 3b97c (e:797c) + +Mon006_EvosMoves: ;CHARIZARD ;Evolutions db 0 @@ -2070,34 +2215,35 @@ Mon006_EvosMoves: ; 3b97c (e:797c) db 55,FIRE_SPIN db 0 -Mon187_EvosMoves: ; 3b98a (e:798a) +Mon187_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon188_EvosMoves: ; 3b98c (e:798c) +Mon188_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon189_EvosMoves: ; 3b98e (e:798e) +Mon189_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon190_EvosMoves: ; 3b990 (e:7990) +Mon190_EvosMoves: ;MISSINGNO ;Evolutions db 0 ;Learnset db 0 -Mon043_EvosMoves: ; 3b992 (e:7992) + +Mon043_EvosMoves: ;ODDISH ;Evolutions db EV_LEVEL,21,GLOOM @@ -2110,10 +2256,11 @@ Mon043_EvosMoves: ; 3b992 (e:7992) db 33,PETAL_DANCE db 46,SOLARBEAM db 0 -Mon044_EvosMoves: ; 3b9a3 (e:79a3) + +Mon044_EvosMoves: ;GLOOM ;Evolutions - db EV_ITEM,LEAF_STONE ,1,VILEPLUME + db EV_ITEM,LEAF_STONE,1,VILEPLUME db 0 ;Learnset db 15,POISONPOWDER @@ -2123,7 +2270,8 @@ Mon044_EvosMoves: ; 3b9a3 (e:79a3) db 38,PETAL_DANCE db 52,SOLARBEAM db 0 -Mon045_EvosMoves: ; 3b9b5 (e:79b5) + +Mon045_EvosMoves: ;VILEPLUME ;Evolutions db 0 @@ -2132,7 +2280,8 @@ Mon045_EvosMoves: ; 3b9b5 (e:79b5) db 17,STUN_SPORE db 19,SLEEP_POWDER db 0 -Mon069_EvosMoves: ; 3b9bd (e:79bd) + +Mon069_EvosMoves: ;BELLSPROUT ;Evolutions db EV_LEVEL,21,WEEPINBELL @@ -2146,10 +2295,11 @@ Mon069_EvosMoves: ; 3b9bd (e:79bd) db 33,RAZOR_LEAF db 42,SLAM db 0 -Mon070_EvosMoves: ; 3b9d0 (e:79d0) + +Mon070_EvosMoves: ;WEEPINBELL ;Evolutions - db EV_ITEM,LEAF_STONE ,1,VICTREEBEL + db EV_ITEM,LEAF_STONE,1,VICTREEBEL db 0 ;Learnset db 13,WRAP @@ -2160,7 +2310,8 @@ Mon070_EvosMoves: ; 3b9d0 (e:79d0) db 38,RAZOR_LEAF db 49,SLAM db 0 -Mon071_EvosMoves: ; 3b9e4 (e:79e4) + +Mon071_EvosMoves: ;VICTREEBEL ;Evolutions db 0 diff --git a/data/facing.asm b/data/facing.asm index 6906002e..c412247a 100644 --- a/data/facing.asm +++ b/data/facing.asm @@ -1,4 +1,4 @@ -SpriteFacingAndAnimationTable: ; 4000 (1:4000) +SpriteFacingAndAnimationTable: dw SpriteFacingDownAndStanding, SpriteOAMParameters ; facing down, walk animation frame 0 dw SpriteFacingDownAndWalking, SpriteOAMParameters ; facing down, walk animation frame 1 dw SpriteFacingDownAndStanding, SpriteOAMParameters ; facing down, walk animation frame 2 @@ -32,25 +32,25 @@ SpriteFacingAndAnimationTable: ; 4000 (1:4000) dw SpriteFacingDownAndStanding, SpriteOAMParameters dw SpriteFacingDownAndStanding, SpriteOAMParameters -SpriteFacingDownAndStanding: ; 4080 (1:4080) +SpriteFacingDownAndStanding: db $00,$01,$02,$03 -SpriteFacingDownAndWalking: ; 4084 (1:4084) +SpriteFacingDownAndWalking: db $80,$81,$82,$83 -SpriteFacingUpAndStanding: ; 4088 (1:4088) +SpriteFacingUpAndStanding: db $04,$05,$06,$07 -SpriteFacingUpAndWalking: ; 408c (1:408c) +SpriteFacingUpAndWalking: db $84,$85,$86,$87 -SpriteFacingLeftAndStanding: ; 4090 (1:4090) +SpriteFacingLeftAndStanding: db $08,$09,$0a,$0b -SpriteFacingLeftAndWalking: ; 4094 (1:4094) +SpriteFacingLeftAndWalking: db $88,$89,$8a,$8b -SpriteOAMParameters: ; 4098 (1:4098) +SpriteOAMParameters: db $00,$00, $00 ; top left db $00,$08, $00 ; top right db $08,$00, OAMFLAG_CANBEMASKED ; bottom left db $08,$08, OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right -SpriteOAMParametersFlipped: ; 40a4 (1:40a4) +SpriteOAMParametersFlipped: db $00,$08, OAMFLAG_VFLIPPED db $00,$00, OAMFLAG_VFLIPPED db $08,$08, OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED diff --git a/data/force_bike_surf.asm b/data/force_bike_surf.asm index 66cae0a4..926db476 100755 --- a/data/force_bike_surf.asm +++ b/data/force_bike_surf.asm @@ -1,4 +1,4 @@ -ForcedBikeOrSurfMaps: ; c3e6 (3:43e6) +ForcedBikeOrSurfMaps: ; map id, y, x db ROUTE_16,$0A,$11 db ROUTE_16,$0B,$11 diff --git a/data/good_rod.asm b/data/good_rod.asm index f1785737..6c23f402 100755 --- a/data/good_rod.asm +++ b/data/good_rod.asm @@ -1,3 +1,3 @@ -GoodRodMons: ; e27f (3:627f) +GoodRodMons: db 10,GOLDEEN db 10,POLIWAG diff --git a/data/hidden_coins.asm b/data/hidden_coins.asm index e444bf28..b7358572 100755 --- a/data/hidden_coins.asm +++ b/data/hidden_coins.asm @@ -1,4 +1,4 @@ -HiddenCoinCoords: ; 76822 (1d:6822) +HiddenCoinCoords: db GAME_CORNER,$08,$00 db GAME_CORNER,$10,$01 db GAME_CORNER,$0b,$03 diff --git a/data/hidden_item_coords.asm b/data/hidden_item_coords.asm index 54c785f5..96c4a07b 100755 --- a/data/hidden_item_coords.asm +++ b/data/hidden_item_coords.asm @@ -1,4 +1,4 @@ -HiddenItemCoords: ; 766b8 (1d:66b8) +HiddenItemCoords: ; map ID, then coords db VIRIDIAN_FOREST,$12,$01 db VIRIDIAN_FOREST,$2a,$10 @@ -34,7 +34,7 @@ HiddenItemCoords: ; 766b8 (1d:66b8) db ROUTE_23,$5a,$08 db VICTORY_ROAD_2,$02,$05 db VICTORY_ROAD_2,$07,$1a - db $6f,$0b,$0e + db UNUSED_MAP_6F,$0b,$0e db VIRIDIAN_CITY,$04,$0e db ROUTE_11,$05,$30 db ROUTE_12,$3f,$02 diff --git a/data/hidden_objects.asm b/data/hidden_objects.asm index 74d053bb..43627bfc 100755 --- a/data/hidden_objects.asm +++ b/data/hidden_objects.asm @@ -1,4 +1,4 @@ -HiddenObjectMaps: ; 46a40 (11:6a40) +HiddenObjectMaps: db REDS_HOUSE_2F db BLUES_HOUSE db OAKS_LAB @@ -28,8 +28,8 @@ HiddenObjectMaps: ; 46a40 (11:6a40) db SAFFRON_GYM db MT_MOON_POKECENTER db ROCK_TUNNEL_POKECENTER - db BATTLE_CENTER db TRADE_CENTER + db COLOSSEUM db VIRIDIAN_FOREST db MT_MOON_3 db INDIGO_PLATEAU @@ -86,7 +86,7 @@ HiddenObjectMaps: ; 46a40 (11:6a40) db ROUTE_4 db $FF -HiddenObjectPointers: ; 46a96 (11:6a96) +HiddenObjectPointers: ; each of these pointers is for the corresponding map in HiddenObjectMaps dw RedsHouse2FHiddenObjects dw BluesHouseHiddenObjects @@ -117,8 +117,8 @@ HiddenObjectPointers: ; 46a96 (11:6a96) dw SaffronGymHiddenObjects dw MtMoonPokecenterHiddenObjects dw RockTunnelPokecenterHiddenObjects - dw BattleCenterHiddenObjects dw TradeCenterHiddenObjects + dw ColosseumHiddenObjects dw ViridianForestHiddenObjects dw MtMoon3HiddenObjects dw IndigoPlateauHiddenObjects @@ -175,7 +175,7 @@ HiddenObjectPointers: ; 46a96 (11:6a96) dw Route4HiddenObjects ; format: y-coord, x-coord, text id/item id, object routine -BattleCenterHiddenObjects: ; 46b40 (11:6b40) +TradeCenterHiddenObjects: db $04,$05,$d0 db BANK(CableClubRightGameboy) dw CableClubRightGameboy @@ -183,7 +183,7 @@ BattleCenterHiddenObjects: ; 46b40 (11:6b40) db BANK(CableClubLeftGameboy) dw CableClubLeftGameboy db $FF -TradeCenterHiddenObjects: ; 46b4d (11:6b4d) +ColosseumHiddenObjects: db $04,$05,$d0 db BANK(CableClubRightGameboy) dw CableClubRightGameboy @@ -191,13 +191,13 @@ TradeCenterHiddenObjects: ; 46b4d (11:6b4d) db BANK(CableClubLeftGameboy) dw CableClubLeftGameboy db $FF -RedsHouse2FHiddenObjects: ; 46b5a (11:6b5a) +RedsHouse2FHiddenObjects: db $01,$00,$04 dbw BANK(OpenRedsPC), OpenRedsPC db $05,$03,$d0 - dbw BANK(PrintRedsNESText), PrintRedsNESText + dbw BANK(PrintRedSNESText), PrintRedSNESText db $FF -BluesHouseHiddenObjects: ; 46b67 (11:6b67) +BluesHouseHiddenObjects: db $01,$00,$04 db BANK(PrintBookcaseText) dw PrintBookcaseText @@ -208,7 +208,7 @@ BluesHouseHiddenObjects: ; 46b67 (11:6b67) db BANK(PrintBookcaseText) dw PrintBookcaseText db $FF -OaksLabHiddenObjects: ; 46b7a (11:6b7a) +OaksLabHiddenObjects: db $00,$04,$04 db BANK(DisplayOakLabLeftPoster) dw DisplayOakLabLeftPoster @@ -222,7 +222,7 @@ OaksLabHiddenObjects: ; 46b7a (11:6b7a) db BANK(DisplayOakLabEmailText) dw DisplayOakLabEmailText db $FF -ViridianPokecenterHiddenObjects: ; 46b93 (11:6b93) +ViridianPokecenterHiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -230,37 +230,37 @@ ViridianPokecenterHiddenObjects: ; 46b93 (11:6b93) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -ViridianMartHiddenObjects: ; 46ba0 (11:6ba0) +ViridianMartHiddenObjects: db $FF -ViridianSchoolHiddenObjects: ; 46ba1 (11:6ba1) - db $04,$03,$20 ; ViridianSchoolNotebook +ViridianSchoolHiddenObjects: + 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 -ViridianGymHiddenObjects: ; 46bae (11:6bae) +ViridianGymHiddenObjects: db $0f,$0f,$04 dbw BANK(GymStatues),GymStatues db $0f,$12,$04 dbw BANK(GymStatues),GymStatues db $FF -Museum1FHiddenObjects: ; 46bbb (11:6bbb) +Museum1FHiddenObjects: db $03,$02,$04 dbw BANK(AerodactylFossil), AerodactylFossil db $06,$02,$04 dbw BANK(KabutopsFossil), KabutopsFossil db $FF -PewterGymHiddenObjects: ; 46bc8 (11:6bc8) +PewterGymHiddenObjects: db $0a,$03,$04 dbw BANK(GymStatues),GymStatues db $0a,$06,$04 dbw BANK(GymStatues),GymStatues db $FF -PewterMartHiddenObjects: ; 46bd5 (11:6bd5) +PewterMartHiddenObjects: db $FF -PewterPokecenterHiddenObjects: ; 46bd6 (11:6bd6) +PewterPokecenterHiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -268,7 +268,7 @@ PewterPokecenterHiddenObjects: ; 46bd6 (11:6bd6) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -CeruleanPokecenterHiddenObjects: ; 46be3 (11:6be3) +CeruleanPokecenterHiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -276,15 +276,15 @@ CeruleanPokecenterHiddenObjects: ; 46be3 (11:6be3) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -CeruleanGymHiddenObjects: ; 46bf0 (11:6bf0) +CeruleanGymHiddenObjects: db $0b,$03,$04 dbw BANK(GymStatues),GymStatues db $0b,$06,$04 dbw BANK(GymStatues),GymStatues db $FF -CeruleanMartHiddenObjects: ; 46bfd (11:6bfd) +CeruleanMartHiddenObjects: db $FF -LavenderPokecenterHiddenObjects: ; 46bfe (11:6bfe) +LavenderPokecenterHiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -292,7 +292,7 @@ LavenderPokecenterHiddenObjects: ; 46bfe (11:6bfe) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -VermilionPokecenterHiddenObjects: ; 46c0b (11:6c0b) +VermilionPokecenterHiddenObjects: db $03,$0d,$04 db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC @@ -300,7 +300,7 @@ VermilionPokecenterHiddenObjects: ; 46c0b (11:6c0b) db Bank(PrintBenchGuyText) dw PrintBenchGuyText db $FF -VermilionGymHiddenObjects: ; 46c18 (11:6c18) +VermilionGymHiddenObjects: db $0e,$03,$04 dbw BANK(GymStatues), GymStatues db $0e,$06,$04 @@ -338,12 +338,12 @@ VermilionGymHiddenObjects: ; 46c18 (11:6c18) db $0b,$09,$0e dbw BANK(GymTrashScript), GymTrashScript db $FF -CeladonMansion2HiddenObjects: ; 46c85 (11:6c85) +CeladonMansion2HiddenObjects: db $05,$00,$04 db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -CeladonPokecenterHiddenObjects: ; 46c8c (11:6c8c) +CeladonPokecenterHiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -351,13 +351,13 @@ CeladonPokecenterHiddenObjects: ; 46c8c (11:6c8c) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -CeladonGymHiddenObjects: ; 46c99 (11:6c99) +CeladonGymHiddenObjects: db $0f,$03,$04 dbw BANK(GymStatues),GymStatues db $0f,$06,$04 dbw BANK(GymStatues),GymStatues db $FF -GameCornerHiddenObjects: ; 46ca6 (11:6ca6) +GameCornerHiddenObjects: db $0f,$12,$d0 dbw BANK(StartSlotMachine), StartSlotMachine db $0e,$12,$d0 @@ -455,7 +455,7 @@ GameCornerHiddenObjects: ; 46ca6 (11:6ca6) db $0f,$0c,COIN+10 dbw BANK(HiddenCoins),HiddenCoins db $FF -CeladonHotelHiddenObjects: ; 46dc7 (11:6dc7) +CeladonHotelHiddenObjects: db $03,$0d,$04 db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC @@ -463,7 +463,7 @@ CeladonHotelHiddenObjects: ; 46dc7 (11:6dc7) db Bank(PrintBenchGuyText) dw PrintBenchGuyText db $FF -FuchsiaPokecenterHiddenObjects: ; 46dd4 (11:6dd4) +FuchsiaPokecenterHiddenObjects: db $03,$0d,$04 db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC @@ -471,13 +471,13 @@ FuchsiaPokecenterHiddenObjects: ; 46dd4 (11:6dd4) db Bank(PrintBenchGuyText) dw PrintBenchGuyText db $FF -FuchsiaGymHiddenObjects: ; 46de1 (11:6de1) +FuchsiaGymHiddenObjects: db $0f,$03,$04 dbw BANK(GymStatues),GymStatues db $0f,$06,$04 dbw BANK(GymStatues),GymStatues db $FF -CinnabarGymHiddenObjects: ; 46dee (11:6dee) +CinnabarGymHiddenObjects: db $0d,$11,$04 dbw BANK(GymStatues),GymStatues db $07,$0f,$01 @@ -499,7 +499,7 @@ CinnabarGymHiddenObjects: ; 46dee (11:6dee) db Bank(PrintCinnabarQuiz) dw PrintCinnabarQuiz db $FF -CinnabarPokecenterHiddenObjects: ; 46e19 (11:6e19) +CinnabarPokecenterHiddenObjects: db $04,$00,$04 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -507,11 +507,11 @@ CinnabarPokecenterHiddenObjects: ; 46e19 (11:6e19) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -SaffronGymHiddenObjects: ; 46e26 (11:6e26) +SaffronGymHiddenObjects: db $0f,$09,$04 dbw BANK(GymStatues),GymStatues db $FF -MtMoonPokecenterHiddenObjects: ; 46e2d (11:6e2d) +MtMoonPokecenterHiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -519,7 +519,7 @@ MtMoonPokecenterHiddenObjects: ; 46e2d (11:6e2d) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -RockTunnelPokecenterHiddenObjects: ; 46e3a (11:6e3a) +RockTunnelPokecenterHiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -527,19 +527,19 @@ RockTunnelPokecenterHiddenObjects: ; 46e3a (11:6e3a) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -ViridianForestHiddenObjects: ; 46e47 (11:6e47) +ViridianForestHiddenObjects: db $12,$01,POTION dbw BANK(HiddenItems),HiddenItems db $2a,$10,ANTIDOTE dbw BANK(HiddenItems),HiddenItems db $FF -MtMoon3HiddenObjects: ; 46e54 (11:6e54) +MtMoon3HiddenObjects: db $0c,$12,MOON_STONE dbw BANK(HiddenItems),HiddenItems db $09,$21,ETHER dbw BANK(HiddenItems),HiddenItems db $FF -IndigoPlateauHiddenObjects: ; 46e61 (11:6e61) +IndigoPlateauHiddenObjects: db $0d,$08,$ff db BANK(PrintIndigoPlateauHQText) dw PrintIndigoPlateauHQText @@ -547,17 +547,17 @@ IndigoPlateauHiddenObjects: ; 46e61 (11:6e61) db BANK(PrintIndigoPlateauHQText) dw PrintIndigoPlateauHQText db $FF -Route25HiddenObjects: ; 46e6e (11:6e6e) +Route25HiddenObjects: db $03,$26,ETHER dbw BANK(HiddenItems),HiddenItems db $01,$0a,ELIXER dbw BANK(HiddenItems),HiddenItems db $FF -Route9HiddenObjects: ; 46e7b (11:6e7b) +Route9HiddenObjects: db $07,$0e,ETHER dbw BANK(HiddenItems),HiddenItems db $FF -SSAnne6HiddenObjects: ; 46e82 (11:6e82) +SSAnne6HiddenObjects: db $05,$0d,$00 dbw BANK(PrintTrashText), PrintTrashText db $07,$0d,$00 @@ -565,29 +565,29 @@ SSAnne6HiddenObjects: ; 46e82 (11:6e82) db $09,$0d,GREAT_BALL dbw BANK(HiddenItems),HiddenItems db $FF -SSAnne10HiddenObjects: ; 46e95 (11:6e95) +SSAnne10HiddenObjects: db $01,$03,HYPER_POTION dbw BANK(HiddenItems),HiddenItems db $FF -Route10HiddenObjects: ; 46e9c (11:6e9c) +Route10HiddenObjects: db $11,$09,SUPER_POTION dbw BANK(HiddenItems),HiddenItems db $35,$10,MAX_ETHER dbw BANK(HiddenItems),HiddenItems db $FF -RocketHideout1HiddenObjects: ; 46ea9 (11:6ea9) +RocketHideout1HiddenObjects: db $0f,$15,PP_UP dbw BANK(HiddenItems),HiddenItems db $FF -RocketHideout3HiddenObjects: ; 46eb0 (11:6eb0) +RocketHideout3HiddenObjects: db $11,$1b,NUGGET dbw BANK(HiddenItems),HiddenItems db $FF -RocketHideout4HiddenObjects: ; 46eb7 (11:6eb7) +RocketHideout4HiddenObjects: db $01,$19,SUPER_POTION dbw BANK(HiddenItems),HiddenItems db $FF -SaffronPokecenterHiddenObjects: ; 46ebe (11:6ebe) +SaffronPokecenterHiddenObjects: db $04,$00,$04 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -595,78 +595,78 @@ SaffronPokecenterHiddenObjects: ; 46ebe (11:6ebe) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -PokemonTower5HiddenObjects: ; 46ecb (11:6ecb) +PokemonTower5HiddenObjects: db $0c,$04,ELIXER dbw BANK(HiddenItems),HiddenItems db $FF -Route13HiddenObjects: ; 46ed2 (11:6ed2) +Route13HiddenObjects: db $0e,$01,PP_UP dbw BANK(HiddenItems),HiddenItems db $0d,$10,CALCIUM dbw BANK(HiddenItems),HiddenItems db $FF -SafariZoneEntranceHiddenObjects: ; 46edf (11:6edf) +SafariZoneEntranceHiddenObjects: db $01,$0a,NUGGET dbw BANK(HiddenItems),HiddenItems db $FF -SafariZoneWestHiddenObjects: ; 46ee6 (11:6ee6) +SafariZoneWestHiddenObjects: db $05,$06,REVIVE dbw BANK(HiddenItems),HiddenItems db $FF -SilphCo5FHiddenObjects: ; 46eed (11:6eed) +SilphCo5FHiddenObjects: db $03,$0c,ELIXER dbw BANK(HiddenItems),HiddenItems db $FF -SilphCo9FHiddenObjects: ; 46ef4 (11:6ef4) +SilphCo9FHiddenObjects: db $0f,$02,MAX_POTION dbw BANK(HiddenItems),HiddenItems db $FF -CopycatsHouse2FHiddenObjects: ; 46efb (11:6efb) +CopycatsHouse2FHiddenObjects: db $01,$01,NUGGET dbw BANK(HiddenItems),HiddenItems db $FF -UnknownDungeon1HiddenObjects: ; 46f02 (11:6f02) +UnknownDungeon1HiddenObjects: db $0b,$0e,RARE_CANDY dbw BANK(HiddenItems),HiddenItems db $FF -UnknownDungeon3HiddenObjects: ; 46f09 (11:6f09) +UnknownDungeon3HiddenObjects: db $03,$1b,ULTRA_BALL dbw BANK(HiddenItems),HiddenItems db $FF -PowerPlantHiddenObjects: ; 46f10 (11:6f10) +PowerPlantHiddenObjects: db $10,$11,MAX_ELIXER dbw BANK(HiddenItems),HiddenItems db $01,$0c,PP_UP dbw BANK(HiddenItems),HiddenItems db $FF -SeafoamIslands3HiddenObjects: ; 46f1d (11:6f1d) +SeafoamIslands3HiddenObjects: db $0f,$0f,NUGGET dbw BANK(HiddenItems),HiddenItems db $FF -SeafoamIslands5HiddenObjects: ; 46f24 (11:6f24) +SeafoamIslands5HiddenObjects: db $11,$19,ULTRA_BALL dbw BANK(HiddenItems),HiddenItems db $FF -Mansion1HiddenObjects: ; 46f2b (11:6f2b) +Mansion1HiddenObjects: db $10,$08,MOON_STONE dbw BANK(HiddenItems),HiddenItems db $05,$02,$04 db BANK(Mansion1Script_Switches) dw Mansion1Script_Switches db $FF -Mansion2HiddenObjects: ; 46f38 (11:6f38) +Mansion2HiddenObjects: db $0b,$02,$04 db BANK(Mansion2Script_Switches) dw Mansion2Script_Switches db $FF -Mansion3HiddenObjects: ; 46f3f (11:6f3f) +Mansion3HiddenObjects: db $09,$01,MAX_REVIVE dbw BANK(HiddenItems),HiddenItems db $05,$0a,$04 db BANK(Mansion3Script_Switches) dw Mansion3Script_Switches db $FF -Mansion4HiddenObjects: ; 46f4c (11:6f4c) +Mansion4HiddenObjects: db $09,$01,RARE_CANDY dbw BANK(HiddenItems),HiddenItems db $03,$14,$04 @@ -676,7 +676,7 @@ Mansion4HiddenObjects: ; 46f4c (11:6f4c) db BANK(Mansion4Script_Switches) dw Mansion4Script_Switches db $FF -Route23HiddenObjects: ; 46f5f (11:6f5f) +Route23HiddenObjects: db $2c,$09,FULL_RESTORE dbw BANK(HiddenItems),HiddenItems db $46,$13,ULTRA_BALL @@ -684,25 +684,25 @@ Route23HiddenObjects: ; 46f5f (11:6f5f) db $5a,$08,MAX_ETHER dbw BANK(HiddenItems),HiddenItems db $FF -VictoryRoad2HiddenObjects: ; 46f72 (11:6f72) +VictoryRoad2HiddenObjects: db $02,$05,ULTRA_BALL dbw BANK(HiddenItems),HiddenItems db $07,$1a,FULL_RESTORE dbw BANK(HiddenItems),HiddenItems db $FF -Unused6FHiddenObjects: ; 46f7f (11:6f7f) +Unused6FHiddenObjects: db $0b,$0e,MAX_ELIXER dbw BANK(HiddenItems),HiddenItems db $FF -BillsHouseHiddenObjects: ; 46f86 (11:6f86) +BillsHouseHiddenObjects: db $04,$01,$04 dbw BANK(BillsHousePC), BillsHousePC db $FF -ViridianCityHiddenObjects: ; 46f8d (11:6f8d) +ViridianCityHiddenObjects: db $04,$0e,POTION dbw BANK(HiddenItems),HiddenItems db $FF -SafariZoneRestHouse2HiddenObjects: ; 46f94 (11:6f94) +SafariZoneRestHouse2HiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -710,7 +710,7 @@ SafariZoneRestHouse2HiddenObjects: ; 46f94 (11:6f94) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -SafariZoneRestHouse3HiddenObjects: ; 46fa1 (11:6fa1) +SafariZoneRestHouse3HiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -718,7 +718,7 @@ SafariZoneRestHouse3HiddenObjects: ; 46fa1 (11:6fa1) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -SafariZoneRestHouse4HiddenObjects: ; 46fae (11:6fae) +SafariZoneRestHouse4HiddenObjects: db $04,$00,$08 db Bank(PrintBenchGuyText) dw PrintBenchGuyText @@ -726,12 +726,12 @@ SafariZoneRestHouse4HiddenObjects: ; 46fae (11:6fae) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -Route15GateUpstairsHiddenObjects: ; 46fbb (11:6fbb) +Route15GateUpstairsHiddenObjects: db $02,$01,$04 db BANK(Route15GateLeftBinoculars) dw Route15GateLeftBinoculars db $FF -LavenderHouse1HiddenObjects: ; 46fc2 (11:6fc2) +LavenderHouse1HiddenObjects: db $01,$00,$00 db BANK(PrintMagazinesText) dw PrintMagazinesText @@ -742,18 +742,18 @@ LavenderHouse1HiddenObjects: ; 46fc2 (11:6fc2) db BANK(PrintMagazinesText) dw PrintMagazinesText db $FF -CeladonMansion5HiddenObjects: ; 46fd5 (11:6fd5) - db $00,$03,$34 ; LinkCableHelp +CeladonMansion5HiddenObjects: + 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 -FightingDojoHiddenObjects: ; 46fe8 (11:6fe8) +FightingDojoHiddenObjects: db $09,$03,$04 db BANK(PrintFightingDojoText) dw PrintFightingDojoText @@ -767,12 +767,12 @@ FightingDojoHiddenObjects: ; 46fe8 (11:6fe8) db BANK(PrintFightingDojoText3) dw PrintFightingDojoText3 db $FF -IndigoPlateauLobbyHiddenObjects: ; 47001 (11:7001) +IndigoPlateauLobbyHiddenObjects: db $07,$0f,$04 db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -CinnabarLab4HiddenObjects: ; 47008 (11:7008) +CinnabarLab4HiddenObjects: db $04,$00,$04 db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC @@ -780,7 +780,7 @@ CinnabarLab4HiddenObjects: ; 47008 (11:7008) db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -BikeShopHiddenObjects: ; 47015 (11:7015) +BikeShopHiddenObjects: db $00,$01,$d0 dbw BANK(PrintNewBikeText), PrintNewBikeText db $01,$02,$d0 @@ -794,20 +794,20 @@ BikeShopHiddenObjects: ; 47015 (11:7015) db $05,$01,$d0 dbw BANK(PrintNewBikeText), PrintNewBikeText db $FF -Route11HiddenObjects: ; 4703a (11:703a) +Route11HiddenObjects: db $05,$30,ESCAPE_ROPE dbw BANK(HiddenItems),HiddenItems db $FF -Route12HiddenObjects: ; 47041 (11:7041) +Route12HiddenObjects: db $3f,$02,HYPER_POTION dbw BANK(HiddenItems),HiddenItems db $FF -SilphCo11FHiddenObjects: ; 47048 (11:7048) +SilphCo11FHiddenObjects: db $0c,$0a,$04 db BANK(OpenPokemonCenterPC) dw OpenPokemonCenterPC db $FF -Route17HiddenObjects: ; 4704f (11:704f) +Route17HiddenObjects: db $0e,$0f,RARE_CANDY dbw BANK(HiddenItems),HiddenItems db $2d,$08,FULL_RESTORE @@ -819,35 +819,35 @@ Route17HiddenObjects: ; 4704f (11:704f) db $79,$08,MAX_ELIXER dbw BANK(HiddenItems),HiddenItems db $FF -UndergroundPathNsHiddenObjects: ; 4706e (11:706e) +UndergroundPathNsHiddenObjects: db $04,$03,FULL_RESTORE dbw BANK(HiddenItems),HiddenItems db $22,$04,X_SPECIAL dbw BANK(HiddenItems),HiddenItems db $FF -UndergroundPathWeHiddenObjects: ; 4707b (11:707b) +UndergroundPathWeHiddenObjects: db $02,$0c,NUGGET dbw BANK(HiddenItems),HiddenItems db $05,$15,ELIXER dbw BANK(HiddenItems),HiddenItems db $FF -CeladonCityHiddenObjects: ; 47088 (11:7088) +CeladonCityHiddenObjects: db $0f,$30,PP_UP dbw BANK(HiddenItems),HiddenItems db $FF -SeafoamIslands4HiddenObjects: ; 4708f (11:708f) +SeafoamIslands4HiddenObjects: db $10,$09,MAX_ELIXER dbw BANK(HiddenItems),HiddenItems db $FF -VermilionCityHiddenObjects: ; 47096 (11:7096) +VermilionCityHiddenObjects: db $0b,$0e,MAX_ETHER dbw BANK(HiddenItems),HiddenItems db $FF -CeruleanCityHiddenObjects: ; 4709d (11:709d) +CeruleanCityHiddenObjects: db $08,$0f,RARE_CANDY dbw BANK(HiddenItems),HiddenItems db $FF -Route4HiddenObjects: ; 470a4 (11:70a4) +Route4HiddenObjects: db $03,$28,GREAT_BALL dbw BANK(HiddenItems),HiddenItems db $FF diff --git a/data/hide_show_data.asm b/data/hide_show_data.asm index c8d89102..1fa4b64a 100755 --- a/data/hide_show_data.asm +++ b/data/hide_show_data.asm @@ -4,7 +4,7 @@ ; Table of 2-Byte pointers, one pointer per map, ; goes up to Map_F7, ends with $FFFF. ; points to table listing all missable object in the area -MapHSPointers: ; c8f5 (3:48f5) +MapHSPointers: dw MapHS00 dw MapHS01 dw MapHS02 @@ -263,29 +263,29 @@ MapHSPointers: ; c8f5 (3:48f5) ; a) Map_ID = $FF ; b) Map_ID ≠ currentMapID ; -; This Data is loaded into RAM at wd5ce-$D5F?. (W_MISSABLEOBJECTLIST) +; This Data is loaded into RAM at wd5ce-$D5F?. (wMissableObjectList) ; These constants come from the bytes for Predef functions: -Hide equ $11 -Show equ $15 +Hide equ $11 +Show equ $15 -MapHSXX: ; cae7 (3:4ae7) +MapHSXX: db $FF,$FF,$FF -MapHS00: ; caea (3:4aea) +MapHS00: db PALLET_TOWN,$01,Hide -MapHS01: ; caed (3:4aed) +MapHS01: db VIRIDIAN_CITY,$05,Show db VIRIDIAN_CITY,$07,Hide -MapHS02: ; caf3 (3:4af3) +MapHS02: db PEWTER_CITY,$03,Show db PEWTER_CITY,$05,Show -MapHS03: ; caf9 (3:4af9) +MapHS03: db CERULEAN_CITY,$01,Hide db CERULEAN_CITY,$02,Show db CERULEAN_CITY,$06,Hide db CERULEAN_CITY,$0A,Show db CERULEAN_CITY,$0B,Show -MapHS0A: ; cb08 (3:4b08) +MapHS0A: db SAFFRON_CITY,$01,Show db SAFFRON_CITY,$02,Show db SAFFRON_CITY,$03,Show @@ -301,34 +301,34 @@ MapHS0A: ; cb08 (3:4b08) db SAFFRON_CITY,$0D,Hide db SAFFRON_CITY,$0E,Show db SAFFRON_CITY,$0F,Hide -MapHS0D: ; cb35 (3:4b35) +MapHS0D: db ROUTE_2,$01,Show db ROUTE_2,$02,Show -MapHS0F: ; cb3b (3:4b3b) +MapHS0F: db ROUTE_4,$03,Show -MapHS14: ; cb3e (3:4b3e) +MapHS14: db ROUTE_9,$0A,Show -MapHS17: ; cb41 (3:4b41) +MapHS17: db ROUTE_12,$01,Show db ROUTE_12,$09,Show db ROUTE_12,$0A,Show -MapHS1A: ; cb4a (3:4b4a) +MapHS1A: db ROUTE_15,$0B,Show -MapHS1B: ; cb4d (3:4b4d) +MapHS1B: db ROUTE_16,$07,Show -MapHS21: ; cb50 (3:4b50) +MapHS21: db ROUTE_22,$01,Hide db ROUTE_22,$02,Hide -MapHS23: ; cb56 (3:4b56) +MapHS23: db ROUTE_24,$01,Show db ROUTE_24,$08,Show -MapHS24: ; cb5c (3:4b5c) +MapHS24: db ROUTE_25,$0A,Show -MapHS27: ; cb5f (3:4b5f) +MapHS27: db BLUES_HOUSE,$01,Show db BLUES_HOUSE,$02,Hide db BLUES_HOUSE,$03,Show -MapHS28: ; cb68 (3:4b68) +MapHS28: db OAKS_LAB,$01,Show db OAKS_LAB,$02,Show db OAKS_LAB,$03,Show @@ -337,50 +337,50 @@ MapHS28: ; cb68 (3:4b68) db OAKS_LAB,$06,Show db OAKS_LAB,$07,Show db OAKS_LAB,$08,Hide -MapHS2D: ; cb80 (3:4b80) +MapHS2D: db VIRIDIAN_GYM,$01,Show db VIRIDIAN_GYM,$0B,Show -MapHS34: ; cb86 (3:4b86) +MapHS34: db MUSEUM_1F,$05,Show -MapHSE4: ; cb89 (3:4b89) +MapHSE4: db UNKNOWN_DUNGEON_1,$01,Show db UNKNOWN_DUNGEON_1,$02,Show db UNKNOWN_DUNGEON_1,$03,Show -MapHS8F: ; cb92 (3:4b92) +MapHS8F: db POKEMONTOWER_2,$01,Show -MapHS90: ; cb95 (3:4b95) +MapHS90: db POKEMONTOWER_3,$04,Show -MapHS91: ; cb98 (3:4b98) +MapHS91: db POKEMONTOWER_4,$04,Show db POKEMONTOWER_4,$05,Show db POKEMONTOWER_4,$06,Show -MapHS92: ; cba1 (3:4ba1) +MapHS92: db POKEMONTOWER_5,$06,Show -MapHS93: ; cba4 (3:4ba4) +MapHS93: db POKEMONTOWER_6,$04,Show db POKEMONTOWER_6,$05,Show -MapHS94: ; cbaa (3:4baa) +MapHS94: db POKEMONTOWER_7,$01,Show db POKEMONTOWER_7,$02,Show db POKEMONTOWER_7,$03,Show db POKEMONTOWER_7,$04,Show -MapHS95: ; cbb6 (3:4bb6) +MapHS95: db LAVENDER_HOUSE_1,$05,Hide -MapHS84: ; cbb9 (3:4bb9) +MapHS84: db CELADON_MANSION_5,$02,Show -MapHS87: ; cbbc (3:4bbc) +MapHS87: db GAME_CORNER,$0B,Show -MapHS9B: ; cbbf (3:4bbf) +MapHS9B: db FUCHSIA_HOUSE_2,$02,Show -MapHSA5: ; cbc2 (3:4bc2) +MapHSA5: db MANSION_1,$02,Show db MANSION_1,$03,Show -MapHSB1: ; cbc8 (3:4bc8) +MapHSB1: db FIGHTING_DOJO,$06,Show db FIGHTING_DOJO,$07,Show -MapHSB5: ; cbce (3:4bce) +MapHSB5: db SILPH_CO_1F,$01,Hide -MapHS53: ; cbd1 (3:4bd1) +MapHS53: db POWER_PLANT,$01,Show db POWER_PLANT,$02,Show db POWER_PLANT,$03,Show @@ -395,84 +395,84 @@ MapHS53: ; cbd1 (3:4bd1) db POWER_PLANT,$0C,Show db POWER_PLANT,$0D,Show db POWER_PLANT,$0E,Show -MapHSC2: ; cbfb (3:4bfb) +MapHSC2: db VICTORY_ROAD_2,$06,Show db VICTORY_ROAD_2,$07,Show db VICTORY_ROAD_2,$08,Show db VICTORY_ROAD_2,$09,Show db VICTORY_ROAD_2,$0A,Show db VICTORY_ROAD_2,$0D,Show -MapHS58: ; cc0d (3:4c0d) +MapHS58: db BILLS_HOUSE,$01,Show db BILLS_HOUSE,$02,Hide db BILLS_HOUSE,$03,Hide -MapHS33: ; cc16 (3:4c16) +MapHS33: db VIRIDIAN_FOREST,$05,Show db VIRIDIAN_FOREST,$06,Show db VIRIDIAN_FOREST,$07,Show -MapHS3B: ; cc1f (3:4c1f) +MapHS3B: db MT_MOON_1,$08,Show db MT_MOON_1,$09,Show db MT_MOON_1,$0A,Show db MT_MOON_1,$0B,Show db MT_MOON_1,$0C,Show db MT_MOON_1,$0D,Show -MapHS3D: ; cc31 (3:4c31) +MapHS3D: db MT_MOON_3,$06,Show db MT_MOON_3,$07,Show db MT_MOON_3,$08,Show db MT_MOON_3,$09,Show -MapHS60: ; cc3d (3:4c3d) +MapHS60: db SS_ANNE_2,$02,Hide -MapHS66: ; cc40 (3:4c40) +MapHS66: db SS_ANNE_8,$0A,Show -MapHS67: ; cc43 (3:4c43) +MapHS67: db SS_ANNE_9,$06,Show db SS_ANNE_9,$09,Show -MapHS68: ; cc49 (3:4c49) +MapHS68: db SS_ANNE_10,$09,Show db SS_ANNE_10,$0A,Show db SS_ANNE_10,$0B,Show -MapHSC6: ; cc52 (3:4c52) +MapHSC6: db VICTORY_ROAD_3,$05,Show db VICTORY_ROAD_3,$06,Show db VICTORY_ROAD_3,$0A,Show -MapHSC7: ; cc5b (3:4c5b) +MapHSC7: db ROCKET_HIDEOUT_1,$06,Show db ROCKET_HIDEOUT_1,$07,Show -MapHSC8: ; cc61 (3:4c61) +MapHSC8: db ROCKET_HIDEOUT_2,$02,Show db ROCKET_HIDEOUT_2,$03,Show db ROCKET_HIDEOUT_2,$04,Show db ROCKET_HIDEOUT_2,$05,Show -MapHSC9: ; cc6d (3:4c6d) +MapHSC9: db ROCKET_HIDEOUT_3,$03,Show db ROCKET_HIDEOUT_3,$04,Show -MapHSCA: ; cc73 (3:4c73) +MapHSCA: db ROCKET_HIDEOUT_4,$01,Show db ROCKET_HIDEOUT_4,$05,Show db ROCKET_HIDEOUT_4,$06,Show db ROCKET_HIDEOUT_4,$07,Show db ROCKET_HIDEOUT_4,$08,Hide db ROCKET_HIDEOUT_4,$09,Hide -MapHSCF: ; cc85 (3:4c85) +MapHSCF: db SILPH_CO_2F,$01,Show db SILPH_CO_2F,$02,Show db SILPH_CO_2F,$03,Show db SILPH_CO_2F,$04,Show db SILPH_CO_2F,$05,Show -MapHSD0: ; cc94 (3:4c94) +MapHSD0: db SILPH_CO_3F,$02,Show db SILPH_CO_3F,$03,Show db SILPH_CO_3F,$04,Show -MapHSD1: ; cc9d (3:4c9d) +MapHSD1: db SILPH_CO_4F,$02,Show db SILPH_CO_4F,$03,Show db SILPH_CO_4F,$04,Show db SILPH_CO_4F,$05,Show db SILPH_CO_4F,$06,Show db SILPH_CO_4F,$07,Show -MapHSD2: ; ccaf (3:4caf) +MapHSD2: db SILPH_CO_5F,$02,Show db SILPH_CO_5F,$03,Show db SILPH_CO_5F,$04,Show @@ -480,13 +480,13 @@ MapHSD2: ; ccaf (3:4caf) db SILPH_CO_5F,$06,Show db SILPH_CO_5F,$07,Show db SILPH_CO_5F,$08,Show -MapHSD3: ; ccc4 (3:4cc4) +MapHSD3: db SILPH_CO_6F,$06,Show db SILPH_CO_6F,$07,Show db SILPH_CO_6F,$08,Show db SILPH_CO_6F,$09,Show db SILPH_CO_6F,$0A,Show -MapHSD4: ; ccd3 (3:4cd3) +MapHSD4: db SILPH_CO_7F,$05,Show db SILPH_CO_7F,$06,Show db SILPH_CO_7F,$07,Show @@ -495,81 +495,81 @@ MapHSD4: ; ccd3 (3:4cd3) db SILPH_CO_7F,$0A,Show db SILPH_CO_7F,$0B,Show db SILPH_CO_7F,$0C,Show -MapHSD5: ; cceb (3:4ceb) +MapHSD5: db SILPH_CO_8F,$02,Show db SILPH_CO_8F,$03,Show db SILPH_CO_8F,$04,Show -MapHSE9: ; ccf4 (3:4cf4) +MapHSE9: db SILPH_CO_9F,$02,Show db SILPH_CO_9F,$03,Show db SILPH_CO_9F,$04,Show -MapHSEA: ; ccfd (3:4cfd) +MapHSEA: db SILPH_CO_10F,$01,Show db SILPH_CO_10F,$02,Show db SILPH_CO_10F,$03,Show db SILPH_CO_10F,$04,Show db SILPH_CO_10F,$05,Show db SILPH_CO_10F,$06,Show -MapHSEB: ; cd0f (3:4d0f) +MapHSEB: db SILPH_CO_11F,$03,Show db SILPH_CO_11F,$04,Show db SILPH_CO_11F,$05,Show -MapHSF4: ; cd18 (3:4d18) +MapHSF4: db $F4,$02,Show -MapHSD6: ; cd1b (3:4d1b) +MapHSD6: db MANSION_2,$02,Show -MapHSD7: ; cd1e (3:4d1e) +MapHSD7: db MANSION_3,$03,Show db MANSION_3,$04,Show -MapHSD8: ; cd24 (3:4d24) +MapHSD8: db MANSION_4,$03,Show db MANSION_4,$04,Show db MANSION_4,$05,Show db MANSION_4,$06,Show db MANSION_4,$08,Show -MapHSD9: ; cd33 (3:4d33) +MapHSD9: db SAFARI_ZONE_EAST,$01,Show db SAFARI_ZONE_EAST,$02,Show db SAFARI_ZONE_EAST,$03,Show db SAFARI_ZONE_EAST,$04,Show -MapHSDA: ; cd3f (3:4d3f) +MapHSDA: db SAFARI_ZONE_NORTH,$01,Show db SAFARI_ZONE_NORTH,$02,Show -MapHSDB: ; cd45 (3:4d45) +MapHSDB: db SAFARI_ZONE_WEST,$01,Show db SAFARI_ZONE_WEST,$02,Show db SAFARI_ZONE_WEST,$03,Show db SAFARI_ZONE_WEST,$04,Show -MapHSDC: ; cd51 (3:4d51) +MapHSDC: db SAFARI_ZONE_CENTER,$01,Show -MapHSE2: ; cd54 (3:4d54) +MapHSE2: db UNKNOWN_DUNGEON_2,$01,Show db UNKNOWN_DUNGEON_2,$02,Show db UNKNOWN_DUNGEON_2,$03,Show -MapHSE3: ; cd5d (3:4d5d) +MapHSE3: db UNKNOWN_DUNGEON_3,$01,Show db UNKNOWN_DUNGEON_3,$02,Show db UNKNOWN_DUNGEON_3,$03,Show -MapHS6C: ; cd66 (3:4d66) +MapHS6C: db VICTORY_ROAD_1,$03,Show db VICTORY_ROAD_1,$04,Show -MapHS78: ; cd6c (3:4d6c) +MapHS78: db CHAMPIONS_ROOM,$02,Hide -MapHSC0: ; cd6f (3:4d6f) +MapHSC0: db SEAFOAM_ISLANDS_1,$01,Show db SEAFOAM_ISLANDS_1,$02,Show -MapHS9F: ; cd75 (3:4d75) +MapHS9F: db SEAFOAM_ISLANDS_2,$01,Hide db SEAFOAM_ISLANDS_2,$02,Hide -MapHSA0: ; cd7b (3:4d7b) +MapHSA0: db SEAFOAM_ISLANDS_3,$01,Hide db SEAFOAM_ISLANDS_3,$02,Hide -MapHSA1: ; cd81 (3:4d81) +MapHSA1: db SEAFOAM_ISLANDS_4,$02,Show db SEAFOAM_ISLANDS_4,$03,Show db SEAFOAM_ISLANDS_4,$05,Hide db SEAFOAM_ISLANDS_4,$06,Hide -MapHSA2: ; cd8d (3:4d8d) +MapHSA2: db SEAFOAM_ISLANDS_5,$01,Hide db SEAFOAM_ISLANDS_5,$02,Hide db SEAFOAM_ISLANDS_5,$03,Show diff --git a/data/item_prices.asm b/data/item_prices.asm index f6882fd0..15a1bd34 100755 --- a/data/item_prices.asm +++ b/data/item_prices.asm @@ -1,4 +1,4 @@ -ItemPrices: ; 4608 (1:4608) +ItemPrices: money 0 ; MASTER_BALL money 1200 ; ULTRA_BALL money 600 ; GREAT_BALL @@ -53,7 +53,7 @@ ItemPrices: ; 4608 (1:4608) money 600 ; FULL_HEAL money 1500 ; REVIVE money 4000 ; MAX_REVIVE - money 700 ; GUARD_SPEC_ + money 700 ; GUARD_SPEC money 500 ; SUPER_REPEL money 700 ; MAX_REPEL money 650 ; DIRE_HIT @@ -61,7 +61,7 @@ ItemPrices: ; 4608 (1:4608) money 200 ; FRESH_WATER money 300 ; SODA_POP money 350 ; LEMONADE - money 0 ; S_S__TICKET + money 0 ; S_S_TICKET money 0 ; GOLD_TEETH money 500 ; X_ATTACK money 550 ; X_DEFEND @@ -73,7 +73,7 @@ ItemPrices: ; 4608 (1:4608) money 0 ; SILPH_SCOPE money 0 ; POKE_FLUTE money 0 ; LIFT_KEY - money 0 ; EXP__ALL + money 0 ; EXP_ALL money 0 ; OLD_ROD money 0 ; GOOD_ROD money 0 ; SUPER_ROD @@ -82,17 +82,17 @@ ItemPrices: ; 4608 (1:4608) money 0 ; MAX_ETHER money 0 ; ELIXER money 0 ; MAX_ELIXER - money 0 ; B2F - money 0 ; B1F - money 0 ; 1F - money 0 ; 2F - money 0 ; 3F - money 0 ; 4F - money 0 ; 5F - money 0 ; 6F - money 0 ; 7F - money 0 ; 8F - money 0 ; 9F - money 0 ; 10F - money 0 ; 11F - money 0 ; B4F + money 0 ; FLOOR_B2F + money 0 ; FLOOR_B1F + money 0 ; FLOOR_1F + money 0 ; FLOOR_2F + money 0 ; FLOOR_3F + money 0 ; FLOOR_4F + money 0 ; FLOOR_5F + money 0 ; FLOOR_6F + money 0 ; FLOOR_7F + money 0 ; FLOOR_8F + money 0 ; FLOOR_9F + money 0 ; FLOOR_10F + money 0 ; FLOOR_11F + money 0 ; FLOOR_B4F diff --git a/data/key_items.asm b/data/key_items.asm index 9e2d16fe..afa586af 100755 --- a/data/key_items.asm +++ b/data/key_items.asm @@ -1,4 +1,4 @@ -KeyItemBitfield: ; e799 (3:6799) +KeyItemBitfield: db %11110000 db %00000001 db %11110000 diff --git a/data/mapHeaders/agatha.asm b/data/mapHeaders/agatha.asm index dcfe0231..f3389579 100755 --- a/data/mapHeaders/agatha.asm +++ b/data/mapHeaders/agatha.asm @@ -1,4 +1,4 @@ -Agatha_h: ; 0x76421 to 0x7642d (12 bytes) (id=247) +Agatha_h: db CEMETERY ; tileset db AGATHAS_ROOM_HEIGHT, AGATHAS_ROOM_WIDTH ; dimensions (y, x) dw AgathaBlocks, AgathaTextPointers, AgathaScript ; blocks, texts, scripts diff --git a/data/mapHeaders/battlecenterm.asm b/data/mapHeaders/battlecenterm.asm deleted file mode 100755 index 984f7e38..00000000 --- a/data/mapHeaders/battlecenterm.asm +++ /dev/null @@ -1,6 +0,0 @@ -BattleCenterM_h: ; 0x4fd04 to 0x4fd10 (12 bytes) (id=239) - db CLUB ; tileset - db BATTLE_CENTER_HEIGHT, BATTLE_CENTER_WIDTH ; dimensions (y, x) - dw BattleCenterMBlocks, BattleCenterMTextPointers, BattleCenterMScript ; blocks, texts, scripts - db $00 ; connections - dw BattleCenterMObject ; objects diff --git a/data/mapHeaders/beach_house.asm b/data/mapHeaders/beach_house.asm deleted file mode 100644 index 99d237f6..00000000 --- a/data/mapHeaders/beach_house.asm +++ /dev/null @@ -1,7 +0,0 @@ -BeachHouse_h: - - db BEACH_HOUSE_TILESET - db BEACH_HOUSE_HEIGHT, BEACH_HOUSE_WIDTH ; dimensions (y, x) - dw BeachHouseBlockdata,BeachHouseTextPointers,BeachHouseScript ; blocks, texts, scripts - db 0 ; connections - dw BeachHouseObjects ; objects diff --git a/data/mapHeaders/bikeshop.asm b/data/mapHeaders/bikeshop.asm index 958e9fd4..b63b03df 100755 --- a/data/mapHeaders/bikeshop.asm +++ b/data/mapHeaders/bikeshop.asm @@ -1,4 +1,4 @@ -BikeShop_h: ; 0x1d730 to 0x1d73c (12 bytes) (bank=7) (id=66) +BikeShop_h: db CLUB ; tileset db BIKE_SHOP_HEIGHT, BIKE_SHOP_WIDTH ; dimensions (y, x) dw BikeShopBlocks, BikeShopTextPointers, BikeShopScript ; blocks, texts, scripts diff --git a/data/mapHeaders/billshouse.asm b/data/mapHeaders/billshouse.asm index 5218c5f3..735f8d62 100755 --- a/data/mapHeaders/billshouse.asm +++ b/data/mapHeaders/billshouse.asm @@ -1,4 +1,4 @@ -BillsHouse_h: ; 0x1e75e to 0x1e76a (12 bytes) (bank=7) (id=88) +BillsHouse_h: db INTERIOR ; tileset db BILLS_HOUSE_HEIGHT, BILLS_HOUSE_WIDTH ; dimensions (y, x) dw BillsHouseBlocks, BillsHouseTextPointers, BillsHouseScript ; blocks, texts, scripts diff --git a/data/mapHeaders/blueshouse.asm b/data/mapHeaders/blueshouse.asm index 24564da5..47e5c5b4 100755 --- a/data/mapHeaders/blueshouse.asm +++ b/data/mapHeaders/blueshouse.asm @@ -1,4 +1,4 @@ -BluesHouse_h: ; 0x19b2f id=39 +BluesHouse_h: db HOUSE ; tileset db BLUES_HOUSE_HEIGHT, BLUES_HOUSE_WIDTH ; dimensions dw BluesHouseBlocks, BluesHouseTextPointers, BluesHouseScript diff --git a/data/mapHeaders/bruno.asm b/data/mapHeaders/bruno.asm index 19536501..1267ebe2 100755 --- a/data/mapHeaders/bruno.asm +++ b/data/mapHeaders/bruno.asm @@ -1,4 +1,4 @@ -Bruno_h: ; 0x762ca to 0x762d6 (12 bytes) (id=246) +Bruno_h: db GYM ; tileset db BRUNOS_ROOM_HEIGHT, BRUNOS_ROOM_WIDTH ; dimensions (y, x) dw BrunoBlocks, BrunoTextPointers, BrunoScript ; blocks, texts, scripts diff --git a/data/mapHeaders/celadoncity.asm b/data/mapHeaders/celadoncity.asm index 12a1731a..7f94cad5 100755 --- a/data/mapHeaders/celadoncity.asm +++ b/data/mapHeaders/celadoncity.asm @@ -1,8 +1,8 @@ -CeladonCity_h: ; 18000 (6:4000) +CeladonCity_h: db OVERWORLD ; tileset db CELADON_CITY_HEIGHT, CELADON_CITY_WIDTH ; dimensions (y, x) dw CeladonCityBlocks, CeladonCityTextPointers, CeladonCityScript ; blocks, texts, scripts db WEST | EAST ; connections - WEST_MAP_CONNECTION ROUTE_16, ROUTE_16_WIDTH, 4, 0, ROUTE_16_HEIGHT, Route16Blocks, CELADON_CITY_WIDTH - EAST_MAP_CONNECTION ROUTE_7, ROUTE_7_WIDTH, 4, 0, ROUTE_7_HEIGHT, Route7Blocks, CELADON_CITY_WIDTH + WEST_MAP_CONNECTION CELADON_CITY, ROUTE_16, 4, 0, Route16Blocks + EAST_MAP_CONNECTION CELADON_CITY, ROUTE_7, 4, 0, Route7Blocks, 1 dw CeladonCityObject ; objects diff --git a/data/mapHeaders/celadondiner.asm b/data/mapHeaders/celadondiner.asm index cc2b6075..9520d76e 100755 --- a/data/mapHeaders/celadondiner.asm +++ b/data/mapHeaders/celadondiner.asm @@ -1,4 +1,4 @@ -CeladonDiner_h: ; 0x49145 to 0x49151 (12 bytes) (bank=12) (id=138) +CeladonDiner_h: db LOBBY ; tileset db CELADON_DINER_HEIGHT, CELADON_DINER_WIDTH ; dimensions (y, x) dw CeladonDinerBlocks, CeladonDinerTextPointers, CeladonDinerScript ; blocks, texts, scripts diff --git a/data/mapHeaders/celadongamecorner.asm b/data/mapHeaders/celadongamecorner.asm index f211b930..3c5674a7 100755 --- a/data/mapHeaders/celadongamecorner.asm +++ b/data/mapHeaders/celadongamecorner.asm @@ -1,4 +1,4 @@ -CeladonGameCorner_h: ; 0x48bb1 to 0x48bbd (12 bytes) (bank=12) (id=135) +CeladonGameCorner_h: db LOBBY ; tileset db GAME_CORNER_HEIGHT, GAME_CORNER_WIDTH ; dimensions (y, x) dw CeladonGameCornerBlocks, CeladonGameCornerTextPointers, CeladonGameCornerScript ; blocks, texts, scripts diff --git a/data/mapHeaders/celadongym.asm b/data/mapHeaders/celadongym.asm index b54aa76c..c0dcf162 100755 --- a/data/mapHeaders/celadongym.asm +++ b/data/mapHeaders/celadongym.asm @@ -1,4 +1,4 @@ -CeladonGym_h: ; 0x488fe to 0x4890a (12 bytes) (bank=12) (id=134) +CeladonGym_h: db GYM ; tileset db CELADON_GYM_HEIGHT, CELADON_GYM_WIDTH ; dimensions (y, x) dw CeladonGymBlocks, CeladonGymTextPointers, CeladonGymScript ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonhotel.asm b/data/mapHeaders/celadonhotel.asm index 6bb908fb..019c3cc3 100755 --- a/data/mapHeaders/celadonhotel.asm +++ b/data/mapHeaders/celadonhotel.asm @@ -1,4 +1,4 @@ -CeladonHotel_h: ; 0x4925d to 0x49269 (12 bytes) (bank=12) (id=140) +CeladonHotel_h: db POKECENTER ; tileset db CELADON_HOTEL_HEIGHT, CELADON_HOTEL_WIDTH ; dimensions (y, x) dw CeladonHotelBlocks, CeladonHotelTextPointers, CeladonHotelScript ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonhouse.asm b/data/mapHeaders/celadonhouse.asm index fee3fa15..ba510282 100755 --- a/data/mapHeaders/celadonhouse.asm +++ b/data/mapHeaders/celadonhouse.asm @@ -1,4 +1,4 @@ -CeladonHouse_h: ; 0x49202 to 0x4920e (12 bytes) (bank=12) (id=139) +CeladonHouse_h: db MANSION ; tileset db CELADON_HOUSE_HEIGHT, CELADON_HOUSE_WIDTH ; dimensions (y, x) dw CeladonHouseBlocks, CeladonHouseTextPointers, CeladonHouseScript ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmansion1.asm b/data/mapHeaders/celadonmansion1.asm index 8b2d9856..8c94cc63 100755 --- a/data/mapHeaders/celadonmansion1.asm +++ b/data/mapHeaders/celadonmansion1.asm @@ -1,4 +1,4 @@ -CeladonMansion1_h: ; 0x48688 to 0x48694 (12 bytes) (bank=12) (id=128) +CeladonMansion1_h: db MANSION ; tileset db CELADON_MANSION_1_HEIGHT, CELADON_MANSION_1_WIDTH ; dimensions (y, x) dw CeladonMansion1Blocks, CeladonMansion1TextPointers, CeladonMansion1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmansion2.asm b/data/mapHeaders/celadonmansion2.asm index e5afd96e..462dfdf3 100755 --- a/data/mapHeaders/celadonmansion2.asm +++ b/data/mapHeaders/celadonmansion2.asm @@ -1,4 +1,4 @@ -CeladonMansion2_h: ; 0x4872e to 0x4873a (12 bytes) (bank=12) (id=129) +CeladonMansion2_h: db MANSION ; tileset db CELADON_MANSION_2_HEIGHT, CELADON_MANSION_2_WIDTH ; dimensions (y, x) dw CeladonMansion2Blocks, CeladonMansion2TextPointers, CeladonMansion2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmansion3.asm b/data/mapHeaders/celadonmansion3.asm index 8b290e42..81b3f2e2 100755 --- a/data/mapHeaders/celadonmansion3.asm +++ b/data/mapHeaders/celadonmansion3.asm @@ -1,4 +1,4 @@ -CeladonMansion3_h: ; 0x48784 to 0x48790 (12 bytes) (bank=12) (id=130) +CeladonMansion3_h: db MANSION ; tileset db CELADON_MANSION_3_HEIGHT, CELADON_MANSION_3_WIDTH ; dimensions (y, x) dw CeladonMansion3Blocks, CeladonMansion3TextPointers, CeladonMansion3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmansion4.asm b/data/mapHeaders/celadonmansion4.asm index e7277d66..c5cf2da9 100755 --- a/data/mapHeaders/celadonmansion4.asm +++ b/data/mapHeaders/celadonmansion4.asm @@ -1,4 +1,4 @@ -CeladonMansion4_h: ; 0x4885f to 0x4886b (12 bytes) (bank=12) (id=131) +CeladonMansion4_h: db MANSION ; tileset db CELADON_MANSION_4_HEIGHT, CELADON_MANSION_4_WIDTH ; dimensions (y, x) dw CeladonMansion4Blocks, CeladonMansion4TextPointers, CeladonMansion4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmansion5.asm b/data/mapHeaders/celadonmansion5.asm index 06c5ce09..d26faccf 100755 --- a/data/mapHeaders/celadonmansion5.asm +++ b/data/mapHeaders/celadonmansion5.asm @@ -1,4 +1,4 @@ -CeladonMansion5_h: ; 0x1dd2e to 0x1dd3a (12 bytes) (bank=7) (id=132) +CeladonMansion5_h: db HOUSE ; tileset db CELADON_MANSION_5_HEIGHT, CELADON_MANSION_5_WIDTH ; dimensions (y, x) dw CeladonMansion5Blocks, CeladonMansion5TextPointers, CeladonMansion5Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmart1.asm b/data/mapHeaders/celadonmart1.asm index 2a5dc6ad..50d171bc 100755 --- a/data/mapHeaders/celadonmart1.asm +++ b/data/mapHeaders/celadonmart1.asm @@ -1,4 +1,4 @@ -CeladonMart1_h: ; 0x60f7a to 0x60f86 (12 bytes) (id=122) +CeladonMart1_h: db LOBBY ; tileset db CELADON_MART_1_HEIGHT, CELADON_MART_1_WIDTH ; dimensions (y, x) dw CeladonMart1Blocks, CeladonMart1TextPointers, CeladonMart1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmart2.asm b/data/mapHeaders/celadonmart2.asm index 9bcd63bf..ecd609cb 100755 --- a/data/mapHeaders/celadonmart2.asm +++ b/data/mapHeaders/celadonmart2.asm @@ -1,4 +1,4 @@ -CeladonMart2_h: ; 0x560e9 to 0x560f5 (12 bytes) (id=123) +CeladonMart2_h: db LOBBY ; tileset db CELADON_MART_2_HEIGHT, CELADON_MART_2_WIDTH ; dimensions (y, x) dw CeladonMart2Blocks, CeladonMart2TextPointers, CeladonMart2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmart3.asm b/data/mapHeaders/celadonmart3.asm index bb847159..af109528 100755 --- a/data/mapHeaders/celadonmart3.asm +++ b/data/mapHeaders/celadonmart3.asm @@ -1,4 +1,4 @@ -CeladonMart3_h: ; 0x48219 to 0x48225 (12 bytes) (bank=12) (id=124) +CeladonMart3_h: db LOBBY ; tileset db CELADON_MART_3_HEIGHT, CELADON_MART_3_WIDTH ; dimensions (y, x) dw CeladonMart3Blocks, CeladonMart3TextPointers, CeladonMart3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmart4.asm b/data/mapHeaders/celadonmart4.asm index 12e7cc12..4ae820d9 100755 --- a/data/mapHeaders/celadonmart4.asm +++ b/data/mapHeaders/celadonmart4.asm @@ -1,4 +1,4 @@ -CeladonMart4_h: ; 0x4834a to 0x48356 (12 bytes) (bank=12) (id=125) +CeladonMart4_h: db LOBBY ; tileset db CELADON_MART_4_HEIGHT, CELADON_MART_4_WIDTH ; dimensions (y, x) dw CeladonMart4Blocks, CeladonMart4TextPointers, CeladonMart4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmart5.asm b/data/mapHeaders/celadonmart5.asm index c16207ca..0d28464f 100755 --- a/data/mapHeaders/celadonmart5.asm +++ b/data/mapHeaders/celadonmart5.asm @@ -1,4 +1,4 @@ -CeladonMart5_h: ; 0x4905d to 0x49069 (12 bytes) (bank=12) (id=136) +CeladonMart5_h: db LOBBY ; tileset db CELADON_MART_5_HEIGHT, CELADON_MART_5_WIDTH ; dimensions (y, x) dw CeladonMart5Blocks, CeladonMart5TextPointers, CeladonMart5Script ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmartelevator.asm b/data/mapHeaders/celadonmartelevator.asm index 1e51a262..498587c6 100755 --- a/data/mapHeaders/celadonmartelevator.asm +++ b/data/mapHeaders/celadonmartelevator.asm @@ -1,4 +1,4 @@ -CeladonMartElevator_h: ; 0x485f4 to 0x48600 (12 bytes) (bank=12) (id=127) +CeladonMartElevator_h: db LOBBY ; tileset db CELADON_MART_ELEVATOR_HEIGHT, CELADON_MART_ELEVATOR_WIDTH ; dimensions (y, x) dw CeladonMartElevatorBlocks, CeladonMartElevatorTextPointers, CeladonMartElevatorScript ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonmartroof.asm b/data/mapHeaders/celadonmartroof.asm index 9654ef3d..8814092b 100755 --- a/data/mapHeaders/celadonmartroof.asm +++ b/data/mapHeaders/celadonmartroof.asm @@ -1,4 +1,4 @@ -CeladonMartRoof_h: ; 0x483c9 to 0x483d5 (12 bytes) (bank=12) (id=126) +CeladonMartRoof_h: db LOBBY ; tileset db CELADON_MART_ROOF_HEIGHT, CELADON_MART_ROOF_WIDTH ; dimensions (y, x) dw CeladonMartRoofBlocks, CeladonMartRoofTextPointers, CeladonMartRoofScript ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonpokecenter.asm b/data/mapHeaders/celadonpokecenter.asm index e2164223..b9464c68 100755 --- a/data/mapHeaders/celadonpokecenter.asm +++ b/data/mapHeaders/celadonpokecenter.asm @@ -1,4 +1,4 @@ -CeladonPokecenter_h: ; 0x488ac to 0x488b8 (12 bytes) (bank=12) (id=133) +CeladonPokecenter_h: db POKECENTER ; tileset db CELADON_POKECENTER_HEIGHT, CELADON_POKECENTER_WIDTH ; dimensions (y, x) dw CeladonPokecenterBlocks, CeladonPokecenterTextPointers, CeladonPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/celadonprizeroom.asm b/data/mapHeaders/celadonprizeroom.asm index 96951df0..f7a5dc12 100755 --- a/data/mapHeaders/celadonprizeroom.asm +++ b/data/mapHeaders/celadonprizeroom.asm @@ -1,4 +1,4 @@ -CeladonPrizeRoom_h: ; 0x490e4 to 0x490f0 (12 bytes) (bank=12) (id=137) +CeladonPrizeRoom_h: db LOBBY ; tileset db CELADON_PRIZE_ROOM_HEIGHT, CELADON_PRIZE_ROOM_WIDTH ; dimensions (y, x) dw CeladonPrizeRoomBlocks, CeladonPrizeRoomTextPointers, CeladonPrizeRoomScript ; blocks, texts, scripts diff --git a/data/mapHeaders/ceruleancity.asm b/data/mapHeaders/ceruleancity.asm index 61b04719..be6dc5b2 100755 --- a/data/mapHeaders/ceruleancity.asm +++ b/data/mapHeaders/ceruleancity.asm @@ -1,10 +1,10 @@ -CeruleanCity_h: ; 0x1874e to 0x18786 (56 bytes) (bank=6) (id=3) +CeruleanCity_h: db OVERWORLD ; tileset db CERULEAN_CITY_HEIGHT, CERULEAN_CITY_WIDTH ; dimensions (y, x) dw CeruleanCityBlocks, CeruleanCityTextPointers, CeruleanCityScript ; blocks, texts, scripts db NORTH | SOUTH | WEST | EAST ; connections - NORTH_MAP_CONNECTION ROUTE_24, ROUTE_24_WIDTH, ROUTE_24_HEIGHT, 5, 0, ROUTE_24_WIDTH, Route24Blocks - SOUTH_MAP_CONNECTION ROUTE_5, ROUTE_5_WIDTH, 5, 0, ROUTE_5_WIDTH, Route5Blocks, CERULEAN_CITY_WIDTH, CERULEAN_CITY_HEIGHT - WEST_MAP_CONNECTION ROUTE_4, ROUTE_4_WIDTH, 4, 0, ROUTE_4_HEIGHT, Route4Blocks, CERULEAN_CITY_WIDTH - EAST_MAP_CONNECTION ROUTE_9, ROUTE_9_WIDTH, 4, 0, ROUTE_9_HEIGHT, Route9Blocks, CERULEAN_CITY_WIDTH + NORTH_MAP_CONNECTION CERULEAN_CITY, ROUTE_24, 5, 0, Route24Blocks + SOUTH_MAP_CONNECTION CERULEAN_CITY, ROUTE_5, 5, 0, Route5Blocks, 1 + WEST_MAP_CONNECTION CERULEAN_CITY, ROUTE_4, 4, 0, Route4Blocks + EAST_MAP_CONNECTION CERULEAN_CITY, ROUTE_9, 4, 0, Route9Blocks dw CeruleanCityObject ; objects diff --git a/data/mapHeaders/ceruleangym.asm b/data/mapHeaders/ceruleangym.asm index 7296a2a7..f95e1a79 100755 --- a/data/mapHeaders/ceruleangym.asm +++ b/data/mapHeaders/ceruleangym.asm @@ -1,4 +1,4 @@ -CeruleanGym_h: ; 0x5c6a7 to 0x5c6b3 (12 bytes) (id=65) +CeruleanGym_h: db GYM ; tileset db CERULEAN_GYM_HEIGHT, CERULEAN_GYM_WIDTH ; dimensions (y, x) dw CeruleanGymBlocks, CeruleanGymTextPointers, CeruleanGymScript ; blocks, texts, scripts diff --git a/data/mapHeaders/ceruleanhouse1.asm b/data/mapHeaders/ceruleanhouse1.asm index 879ceb23..2a8c9197 100755 --- a/data/mapHeaders/ceruleanhouse1.asm +++ b/data/mapHeaders/ceruleanhouse1.asm @@ -1,4 +1,4 @@ -CeruleanHouse1_h: ; 0x1d6ea to 0x1d6f6 (12 bytes) (bank=7) (id=63) +CeruleanHouse1_h: db HOUSE ; tileset db CERULEAN_HOUSE_1_HEIGHT, CERULEAN_HOUSE_1_WIDTH ; dimensions (y, x) dw CeruleanHouse1Blocks, CeruleanHouse1TextPointers, CeruleanHouse1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ceruleanhouse2.asm b/data/mapHeaders/ceruleanhouse2.asm index d2c44a47..1e040ffd 100755 --- a/data/mapHeaders/ceruleanhouse2.asm +++ b/data/mapHeaders/ceruleanhouse2.asm @@ -1,4 +1,4 @@ -CeruleanHouse2_h: ; 0x74dfd to 0x74e09 (12 bytes) (id=230) +CeruleanHouse2_h: db SHIP ; tileset db CERULEAN_HOUSE_2_HEIGHT, CERULEAN_HOUSE_2_WIDTH ; dimensions (y, x) dw CeruleanHouse2Blocks, CeruleanHouse2TextPointers, CeruleanHouse2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ceruleanhousetrashed.asm b/data/mapHeaders/ceruleanhousetrashed.asm index 60c6dc94..90119dc5 100755 --- a/data/mapHeaders/ceruleanhousetrashed.asm +++ b/data/mapHeaders/ceruleanhousetrashed.asm @@ -1,4 +1,4 @@ -CeruleanHouseTrashed_h: ; 0x1d679 to 0x1d685 (12 bytes) (bank=7) (id=62) +CeruleanHouseTrashed_h: db HOUSE ; tileset db TRASHED_HOUSE_HEIGHT, TRASHED_HOUSE_WIDTH ; dimensions (y, x) dw CeruleanHouseTrashedBlocks, CeruleanHouseTrashedTextPointers, CeruleanHouseTrashedScript ; blocks, texts, scripts diff --git a/data/mapHeaders/ceruleanmart.asm b/data/mapHeaders/ceruleanmart.asm index a2e112fd..3f3231e8 100755 --- a/data/mapHeaders/ceruleanmart.asm +++ b/data/mapHeaders/ceruleanmart.asm @@ -1,4 +1,4 @@ -CeruleanMart_h: ; 0x5c889 to 0x5c895 (12 bytes) (id=67) +CeruleanMart_h: db MART ; tileset db CERULEAN_MART_HEIGHT, CERULEAN_MART_WIDTH ; dimensions (y, x) dw CeruleanMartBlocks, CeruleanMartTextPointers, CeruleanMartScript ; blocks, texts, scripts diff --git a/data/mapHeaders/ceruleanpokecenter.asm b/data/mapHeaders/ceruleanpokecenter.asm index 908229fe..636a89ae 100755 --- a/data/mapHeaders/ceruleanpokecenter.asm +++ b/data/mapHeaders/ceruleanpokecenter.asm @@ -1,4 +1,4 @@ -CeruleanPokecenter_h: ; 0x5c639 to 0x5c645 (12 bytes) (id=64) +CeruleanPokecenter_h: db POKECENTER ; tileset db CERULEAN_POKECENTER_HEIGHT, CERULEAN_POKECENTER_WIDTH ; dimensions (y, x) dw CeruleanPokecenterBlocks, CeruleanPokecenterTextPointers, CeruleanPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/cinnabargym.asm b/data/mapHeaders/cinnabargym.asm index 1902fe5d..3f05790c 100755 --- a/data/mapHeaders/cinnabargym.asm +++ b/data/mapHeaders/cinnabargym.asm @@ -1,4 +1,4 @@ -CinnabarGym_h: ; 0x7573e to 0x7574a (12 bytes) (id=166) +CinnabarGym_h: db FACILITY ; tileset db CINNABAR_GYM_HEIGHT, CINNABAR_GYM_WIDTH ; dimensions (y, x) dw CinnabarGymBlocks, CinnabarGymTextPointers, CinnabarGymScript ; blocks, texts, scripts diff --git a/data/mapHeaders/cinnabarisland.asm b/data/mapHeaders/cinnabarisland.asm index f0da170f..6ae6424d 100755 --- a/data/mapHeaders/cinnabarisland.asm +++ b/data/mapHeaders/cinnabarisland.asm @@ -1,8 +1,8 @@ -CinnabarIsland_h: ; 0x1c000 to 0x1c022 (34 bytes) (bank=7) (id=8) +CinnabarIsland_h: db OVERWORLD ; tileset db CINNABAR_ISLAND_HEIGHT, CINNABAR_ISLAND_WIDTH ; dimensions (y, x) dw CinnabarIslandBlocks, CinnabarIslandTextPointers, CinnabarIslandScript ; blocks, texts, scripts db NORTH | EAST ; connections - NORTH_MAP_CONNECTION ROUTE_21, ROUTE_21_WIDTH, ROUTE_21_HEIGHT, 0, 0, ROUTE_21_WIDTH, Route21Blocks - EAST_MAP_CONNECTION ROUTE_20, ROUTE_20_WIDTH, 0, 0, ROUTE_20_HEIGHT, Route20Blocks, CINNABAR_ISLAND_WIDTH + NORTH_MAP_CONNECTION CINNABAR_ISLAND, ROUTE_21, 0, 0, Route21Blocks + EAST_MAP_CONNECTION CINNABAR_ISLAND, ROUTE_20, 0, 0, Route20Blocks dw CinnabarIslandObject ; objects diff --git a/data/mapHeaders/cinnabarmart.asm b/data/mapHeaders/cinnabarmart.asm index dd9fc116..b686713f 100755 --- a/data/mapHeaders/cinnabarmart.asm +++ b/data/mapHeaders/cinnabarmart.asm @@ -1,4 +1,4 @@ -CinnabarMart_h: ; 0x75e72 to 0x75e7e (12 bytes) (id=172) +CinnabarMart_h: db MART ; tileset db CINNABAR_MART_HEIGHT, CINNABAR_MART_WIDTH ; dimensions (y, x) dw CinnabarMartBlocks, CinnabarMartTextPointers, CinnabarMartScript ; blocks, texts, scripts diff --git a/data/mapHeaders/cinnabarpokecenter.asm b/data/mapHeaders/cinnabarpokecenter.asm index 2d00d498..b1f002bd 100755 --- a/data/mapHeaders/cinnabarpokecenter.asm +++ b/data/mapHeaders/cinnabarpokecenter.asm @@ -1,4 +1,4 @@ -CinnabarPokecenter_h: ; 0x75e20 to 0x75e2c (12 bytes) (id=171) +CinnabarPokecenter_h: db POKECENTER ; tileset db CINNABAR_POKECENTER_HEIGHT, CINNABAR_POKECENTER_WIDTH ; dimensions (y, x) dw CinnabarPokecenterBlocks, CinnabarPokecenterTextPointers, CinnabarPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/colosseum.asm b/data/mapHeaders/colosseum.asm new file mode 100755 index 00000000..67e1188b --- /dev/null +++ b/data/mapHeaders/colosseum.asm @@ -0,0 +1,6 @@ +Colosseum_h: + db CLUB ; tileset + db COLOSSEUM_HEIGHT, COLOSSEUM_WIDTH ; dimensions (y, x) + dw ColosseumBlocks, ColosseumTextPointers, ColosseumScript ; blocks, texts, scripts + db $00 ; connections + dw ColosseumObject ; objects diff --git a/data/mapHeaders/copycatshouse1f.asm b/data/mapHeaders/copycatshouse1f.asm index a8d171d7..bdca2189 100755 --- a/data/mapHeaders/copycatshouse1f.asm +++ b/data/mapHeaders/copycatshouse1f.asm @@ -1,4 +1,4 @@ -CopycatsHouse1F_h: ; 0x75eb7 to 0x75ec3 (12 bytes) (id=175) +CopycatsHouse1F_h: db REDS_HOUSE_1 ; tileset db COPYCATS_HOUSE_1F_HEIGHT, COPYCATS_HOUSE_1F_WIDTH ; dimensions (y, x) dw CopycatsHouse1FBlocks, CopycatsHouse1FTextPointers, CopycatsHouse1FScript ; blocks, texts, scripts diff --git a/data/mapHeaders/copycatshouse2f.asm b/data/mapHeaders/copycatshouse2f.asm index 46be1f54..3eecf718 100755 --- a/data/mapHeaders/copycatshouse2f.asm +++ b/data/mapHeaders/copycatshouse2f.asm @@ -1,4 +1,4 @@ -CopycatsHouse2F_h: ; 0x5cc65 to 0x5cc71 (12 bytes) (id=176) +CopycatsHouse2F_h: db REDS_HOUSE_2 ; tileset db COPYCATS_HOUSE_2F_HEIGHT, COPYCATS_HOUSE_2F_WIDTH ; dimensions (y, x) dw CopycatsHouse2FBlocks, CopycatsHouse2FTextPointers, CopycatsHouse2FScript ; blocks, texts, scripts diff --git a/data/mapHeaders/daycarem.asm b/data/mapHeaders/daycarem.asm index 2677b51c..1b8d4c1c 100755 --- a/data/mapHeaders/daycarem.asm +++ b/data/mapHeaders/daycarem.asm @@ -1,4 +1,4 @@ -DayCareM_h: ; 0x56243 to 0x5624f (12 bytes) (id=72) +DayCareM_h: db HOUSE ; tileset db DAYCAREM_HEIGHT, DAYCAREM_WIDTH ; dimensions (y, x) dw DayCareMBlocks, DayCareMTextPointers, DayCareMScript ; blocks, texts, scripts diff --git a/data/mapHeaders/diglettscave.asm b/data/mapHeaders/diglettscave.asm index 3cd5a651..0e68a55c 100755 --- a/data/mapHeaders/diglettscave.asm +++ b/data/mapHeaders/diglettscave.asm @@ -1,4 +1,4 @@ -DiglettsCave_h: ; 0x61f62 to 0x61f6e (12 bytes) (id=197) +DiglettsCave_h: db CAVERN ; tileset db DIGLETTS_CAVE_HEIGHT, DIGLETTS_CAVE_WIDTH ; dimensions (y, x) dw DiglettsCaveBlocks, DiglettsCaveTextPointers, DiglettsCaveScript ; blocks, texts, scripts diff --git a/data/mapHeaders/diglettscaveroute11.asm b/data/mapHeaders/diglettscaveroute11.asm index 8d9acd49..7670c83f 100755 --- a/data/mapHeaders/diglettscaveroute11.asm +++ b/data/mapHeaders/diglettscaveroute11.asm @@ -1,4 +1,4 @@ -DiglettsCaveEntranceRoute11_h: ; 0x1e5ae to 0x1e5ba (12 bytes) (bank=7) (id=85) +DiglettsCaveEntranceRoute11_h: db CAVERN ; tileset db DIGLETTS_CAVE_ENTRANCE_HEIGHT, DIGLETTS_CAVE_ENTRANCE_WIDTH ; dimensions (y, x) dw DiglettsCaveEntranceRoute11Blocks, DiglettsCaveEntranceRoute11TextPointers, DiglettsCaveEntranceRoute11Script ; blocks, texts, scripts diff --git a/data/mapHeaders/diglettscaveroute2.asm b/data/mapHeaders/diglettscaveroute2.asm index b81d48a6..0499b4c3 100755 --- a/data/mapHeaders/diglettscaveroute2.asm +++ b/data/mapHeaders/diglettscaveroute2.asm @@ -1,4 +1,4 @@ -DiglettsCaveRoute2_h: ; 0x1dea4 to 0x1deb0 (12 bytes) (bank=7) (id=46) +DiglettsCaveRoute2_h: db CAVERN ; tileset db DIGLETTS_CAVE_EXIT_HEIGHT, DIGLETTS_CAVE_EXIT_WIDTH ; dimensions (y, x) dw DiglettsCaveRoute2Blocks, DiglettsCaveRoute2TextPointers, DiglettsCaveRoute2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/fanclub.asm b/data/mapHeaders/fanclub.asm index 603ec53b..8e8205b4 100755 --- a/data/mapHeaders/fanclub.asm +++ b/data/mapHeaders/fanclub.asm @@ -1,4 +1,4 @@ -FanClub_h: ; 0x59b64 to 0x59b70 (12 bytes) (id=90) +FanClub_h: db INTERIOR ; tileset db POKEMON_FAN_CLUB_HEIGHT, POKEMON_FAN_CLUB_WIDTH ; dimensions (y, x) dw FanClubBlocks, FanClubTextPointers, FanClubScript ; blocks, texts, scripts diff --git a/data/mapHeaders/fightingdojo.asm b/data/mapHeaders/fightingdojo.asm index d981d816..cb0a2fdb 100755 --- a/data/mapHeaders/fightingdojo.asm +++ b/data/mapHeaders/fightingdojo.asm @@ -1,4 +1,4 @@ -FightingDojo_h: ; 0x5cd51 to 0x5cd5d (12 bytes) (id=177) +FightingDojo_h: db DOJO ; tileset db FIGHTING_DOJO_HEIGHT, FIGHTING_DOJO_WIDTH ; dimensions (y, x) dw FightingDojoBlocks, FightingDojoTextPointers, FightingDojoScript ; blocks, texts, scripts diff --git a/data/mapHeaders/fuchsiacity.asm b/data/mapHeaders/fuchsiacity.asm index 7a3e4f66..2bfd2793 100755 --- a/data/mapHeaders/fuchsiacity.asm +++ b/data/mapHeaders/fuchsiacity.asm @@ -1,9 +1,9 @@ -FuchsiaCity_h: ; 0x18ba7 to 0x18bd4 (45 bytes) (bank=6) (id=7) +FuchsiaCity_h: db OVERWORLD ; tileset db FUCHSIA_CITY_HEIGHT, FUCHSIA_CITY_WIDTH ; dimensions (y, x) dw FuchsiaCityBlocks, FuchsiaCityTextPointers, FuchsiaCityScript ; blocks, texts, scripts db SOUTH | WEST | EAST ; connections - SOUTH_MAP_CONNECTION ROUTE_19, ROUTE_19_WIDTH, 5, 0, ROUTE_19_WIDTH, Route19Blocks, FUCHSIA_CITY_WIDTH, FUCHSIA_CITY_HEIGHT - WEST_MAP_CONNECTION ROUTE_18, ROUTE_18_WIDTH, 4, 0, ROUTE_18_HEIGHT, Route18Blocks, FUCHSIA_CITY_WIDTH - EAST_MAP_CONNECTION ROUTE_15, ROUTE_15_WIDTH, 4, 0, ROUTE_15_HEIGHT, Route15Blocks, FUCHSIA_CITY_WIDTH + SOUTH_MAP_CONNECTION FUCHSIA_CITY, ROUTE_19, 5, 0, Route19Blocks + WEST_MAP_CONNECTION FUCHSIA_CITY, ROUTE_18, 4, 0, Route18Blocks + EAST_MAP_CONNECTION FUCHSIA_CITY, ROUTE_15, 4, 0, Route15Blocks dw FuchsiaCityObject ; objects diff --git a/data/mapHeaders/fuchsiagym.asm b/data/mapHeaders/fuchsiagym.asm index 4c6f083f..9d16f178 100755 --- a/data/mapHeaders/fuchsiagym.asm +++ b/data/mapHeaders/fuchsiagym.asm @@ -1,4 +1,4 @@ -FuchsiaGym_h: ; 0x75431 to 0x7543d (12 bytes) (id=157) +FuchsiaGym_h: db GYM ; tileset db FUCHSIA_GYM_HEIGHT, FUCHSIA_GYM_WIDTH ; dimensions (y, x) dw FuchsiaGymBlocks, FuchsiaGymTextPointers, FuchsiaGymScript ; blocks, texts, scripts diff --git a/data/mapHeaders/fuchsiahouse1.asm b/data/mapHeaders/fuchsiahouse1.asm index 98974fee..c4ab2c95 100755 --- a/data/mapHeaders/fuchsiahouse1.asm +++ b/data/mapHeaders/fuchsiahouse1.asm @@ -1,4 +1,4 @@ -FuchsiaHouse1_h: ; 0x7500c to 0x75018 (12 bytes) (id=153) +FuchsiaHouse1_h: db HOUSE ; tileset db FUCHSIA_HOUSE_1_HEIGHT, FUCHSIA_HOUSE_1_WIDTH ; dimensions (y, x) dw FuchsiaHouse1Blocks, FuchsiaHouse1TextPointers, FuchsiaHouse1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/fuchsiahouse2.asm b/data/mapHeaders/fuchsiahouse2.asm index f4d05eeb..530f44b6 100755 --- a/data/mapHeaders/fuchsiahouse2.asm +++ b/data/mapHeaders/fuchsiahouse2.asm @@ -1,4 +1,4 @@ -FuchsiaHouse2_h: ; 0x750a9 to 0x750b5 (12 bytes) (id=155) +FuchsiaHouse2_h: db LAB ; tileset db FUCHSIA_HOUSE_2_HEIGHT, FUCHSIA_HOUSE_2_WIDTH ; dimensions (y, x) dw FuchsiaHouse2Blocks, FuchsiaHouse2TextPointers, FuchsiaHouse2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/fuchsiahouse3.asm b/data/mapHeaders/fuchsiahouse3.asm index 92b4d96d..e52b6b8a 100755 --- a/data/mapHeaders/fuchsiahouse3.asm +++ b/data/mapHeaders/fuchsiahouse3.asm @@ -1,4 +1,4 @@ -FuchsiaHouse3_h: ; 0x56170 to 0x5617c (12 bytes) (id=164) +FuchsiaHouse3_h: db SHIP ; tileset db FUCHSIA_HOUSE_3_HEIGHT, FUCHSIA_HOUSE_3_WIDTH ; dimensions (y, x) dw FuchsiaHouse3Blocks, FuchsiaHouse3TextPointers, FuchsiaHouse3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/fuchsiamart.asm b/data/mapHeaders/fuchsiamart.asm index a9f00150..dcdfe8c7 100755 --- a/data/mapHeaders/fuchsiamart.asm +++ b/data/mapHeaders/fuchsiamart.asm @@ -1,4 +1,4 @@ -FuchsiaMart_h: ; 0x1dd7c to 0x1dd88 (12 bytes) (bank=7) (id=152) +FuchsiaMart_h: db MART ; tileset db FUCHSIA_MART_HEIGHT, FUCHSIA_MART_WIDTH ; dimensions (y, x) dw FuchsiaMartBlocks, FuchsiaMartTextPointers, FuchsiaMartScript ; blocks, texts, scripts diff --git a/data/mapHeaders/fuchsiameetingroom.asm b/data/mapHeaders/fuchsiameetingroom.asm index 48d4c7fc..b44acf29 100755 --- a/data/mapHeaders/fuchsiameetingroom.asm +++ b/data/mapHeaders/fuchsiameetingroom.asm @@ -1,4 +1,4 @@ -FuchsiaMeetingRoom_h: ; 0x756d7 to 0x756e3 (12 bytes) (id=158) +FuchsiaMeetingRoom_h: db LAB ; tileset db FUCHSIA_MEETING_ROOM_HEIGHT, FUCHSIA_MEETING_ROOM_WIDTH ; dimensions (y, x) dw FuchsiaMeetingRoomBlocks, FuchsiaMeetingRoomTextPointers, FuchsiaMeetingRoomScript ; blocks, texts, scripts diff --git a/data/mapHeaders/fuchsiapokecenter.asm b/data/mapHeaders/fuchsiapokecenter.asm index aec7f455..dc6f1e6b 100755 --- a/data/mapHeaders/fuchsiapokecenter.asm +++ b/data/mapHeaders/fuchsiapokecenter.asm @@ -1,4 +1,4 @@ -FuchsiaPokecenter_h: ; 0x75057 to 0x75063 (12 bytes) (id=154) +FuchsiaPokecenter_h: db POKECENTER ; tileset db FUCHSIA_POKECENTER_HEIGHT, FUCHSIA_POKECENTER_WIDTH ; dimensions (y, x) dw FuchsiaPokecenterBlocks, FuchsiaPokecenterTextPointers, FuchsiaPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/gary.asm b/data/mapHeaders/gary.asm index 5b1a1f98..792c4b32 100755 --- a/data/mapHeaders/gary.asm +++ b/data/mapHeaders/gary.asm @@ -1,4 +1,4 @@ -Gary_h: ; 75f11 (1d:5f11) +Gary_h: db GYM ;tileset db CHAMPIONS_ROOM_HEIGHT, CHAMPIONS_ROOM_WIDTH ; Height, Width dw GaryBlocks, GaryTextPointers, GaryScript diff --git a/data/mapHeaders/halloffameroom.asm b/data/mapHeaders/halloffameroom.asm index 63cd6419..a90464a8 100755 --- a/data/mapHeaders/halloffameroom.asm +++ b/data/mapHeaders/halloffameroom.asm @@ -1,4 +1,4 @@ -HallofFameRoom_h: ; 0x5a492 to 0x5a49e (12 bytes) (id=118) +HallofFameRoom_h: db GYM ; tileset db HALL_OF_FAME_HEIGHT, HALL_OF_FAME_WIDTH ; dimensions (y, x) dw HallofFameRoomBlocks, HallofFameRoomTextPointers, HallofFameRoomScript ; blocks, texts, scripts diff --git a/data/mapHeaders/indigoplateau.asm b/data/mapHeaders/indigoplateau.asm index 9705e3ee..deaf5041 100755 --- a/data/mapHeaders/indigoplateau.asm +++ b/data/mapHeaders/indigoplateau.asm @@ -1,7 +1,7 @@ -IndigoPlateau_h: ; 0x5091e to 0x50935 (23 bytes) (id=9) +IndigoPlateau_h: db PLATEAU ; tileset db INDIGO_PLATEAU_HEIGHT, INDIGO_PLATEAU_WIDTH ; dimensions (y, x) dw IndigoPlateauBlocks, IndigoPlateauTextPointers, IndigoPlateauScript ; blocks, texts, scripts db SOUTH ; connections - SOUTH_MAP_CONNECTION ROUTE_23, ROUTE_23_WIDTH, 0, 0, ROUTE_23_WIDTH, Route23Blocks, INDIGO_PLATEAU_WIDTH, INDIGO_PLATEAU_HEIGHT + SOUTH_MAP_CONNECTION INDIGO_PLATEAU, ROUTE_23, 0, 0, Route23Blocks dw IndigoPlateauObject ; objects diff --git a/data/mapHeaders/indigoplateaulobby.asm b/data/mapHeaders/indigoplateaulobby.asm index d0e056ac..4cf92d82 100755 --- a/data/mapHeaders/indigoplateaulobby.asm +++ b/data/mapHeaders/indigoplateaulobby.asm @@ -1,4 +1,4 @@ -IndigoPlateauLobby_h: ; 0x19c4f to 0x19c5b (12 bytes) (bank=6) (id=174) +IndigoPlateauLobby_h: db MART ; tileset db INDIGO_PLATEAU_LOBBY_HEIGHT, INDIGO_PLATEAU_LOBBY_WIDTH ; dimensions (y, x) dw IndigoPlateauLobbyBlocks, IndigoPlateauLobbyTextPointers, IndigoPlateauLobbyScript ; blocks, texts, scripts diff --git a/data/mapHeaders/lab1.asm b/data/mapHeaders/lab1.asm index 512373c4..d0e976e7 100755 --- a/data/mapHeaders/lab1.asm +++ b/data/mapHeaders/lab1.asm @@ -1,4 +1,4 @@ -Lab1_h: ; 0x75b80 to 0x75b8c (12 bytes) (id=167) +Lab1_h: db LAB ; tileset db CINNABAR_LAB_1_HEIGHT, CINNABAR_LAB_1_WIDTH ; dimensions (y, x) dw Lab1Blocks, Lab1TextPointers, Lab1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/lab2.asm b/data/mapHeaders/lab2.asm index a3c2ccf6..75cbcf1f 100755 --- a/data/mapHeaders/lab2.asm +++ b/data/mapHeaders/lab2.asm @@ -1,4 +1,4 @@ -Lab2_h: ; 0x75c15 to 0x75c21 (12 bytes) (id=168) +Lab2_h: db LAB ; tileset db CINNABAR_LAB_2_HEIGHT, CINNABAR_LAB_2_WIDTH ; dimensions (y, x) dw Lab2Blocks, Lab2TextPointers, Lab2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/lab3.asm b/data/mapHeaders/lab3.asm index c9709e83..9af39022 100755 --- a/data/mapHeaders/lab3.asm +++ b/data/mapHeaders/lab3.asm @@ -1,4 +1,4 @@ -Lab3_h: ; 0x75c7b to 0x75c87 (12 bytes) (id=169) +Lab3_h: db LAB ; tileset db CINNABAR_LAB_3_HEIGHT, CINNABAR_LAB_3_WIDTH ; dimensions (y, x) dw Lab3Blocks, Lab3TextPointers, Lab3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/lab4.asm b/data/mapHeaders/lab4.asm index 82ced4a3..e0b23c7d 100755 --- a/data/mapHeaders/lab4.asm +++ b/data/mapHeaders/lab4.asm @@ -1,4 +1,4 @@ -Lab4_h: ; 0x75d25 to 0x75d31 (12 bytes) (id=170) +Lab4_h: db LAB ; tileset db CINNABAR_LAB_4_HEIGHT, CINNABAR_LAB_4_WIDTH ; dimensions (y, x) dw Lab4Blocks, Lab4TextPointers, Lab4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/lance.asm b/data/mapHeaders/lance.asm index 464fd0d7..13b2a343 100755 --- a/data/mapHeaders/lance.asm +++ b/data/mapHeaders/lance.asm @@ -1,4 +1,4 @@ -Lance_h: ; 0x5a2a2 to 0x5a2ae (12 bytes) (id=113) +Lance_h: db DOJO ; tileset db LANCES_ROOM_HEIGHT, LANCES_ROOM_WIDTH ; dimensions (y, x) dw LanceBlocks, LanceTextPointers, LanceScript ; blocks, texts, scripts diff --git a/data/mapHeaders/lavenderhouse1.asm b/data/mapHeaders/lavenderhouse1.asm index e9531fff..f1750dc0 100755 --- a/data/mapHeaders/lavenderhouse1.asm +++ b/data/mapHeaders/lavenderhouse1.asm @@ -1,4 +1,4 @@ -LavenderHouse1_h: ; 0x1d89c to 0x1d8a8 (12 bytes) (bank=7) (id=149) +LavenderHouse1_h: db HOUSE ; tileset db LAVENDER_HOUSE_1_HEIGHT, LAVENDER_HOUSE_1_WIDTH ; dimensions (y, x) dw LavenderHouse1Blocks, LavenderHouse1TextPointers, LavenderHouse1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/lavenderhouse2.asm b/data/mapHeaders/lavenderhouse2.asm index ea6c00c1..449ccf07 100755 --- a/data/mapHeaders/lavenderhouse2.asm +++ b/data/mapHeaders/lavenderhouse2.asm @@ -1,4 +1,4 @@ -LavenderHouse2_h: ; 0x1d9a2 to 0x1d9ae (12 bytes) (bank=7) (id=151) +LavenderHouse2_h: db HOUSE ; tileset db LAVENDER_HOUSE_2_HEIGHT, LAVENDER_HOUSE_2_WIDTH ; dimensions (y, x) dw LavenderHouse2Blocks, LavenderHouse2TextPointers, LavenderHouse2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/lavendermart.asm b/data/mapHeaders/lavendermart.asm index 95f448e5..e2bd0c9c 100755 --- a/data/mapHeaders/lavendermart.asm +++ b/data/mapHeaders/lavendermart.asm @@ -1,4 +1,4 @@ -LavenderMart_h: ; 0x5c920 to 0x5c92c (12 bytes) (id=150) +LavenderMart_h: db MART ; tileset db LAVENDER_MART_HEIGHT, LAVENDER_MART_WIDTH ; dimensions (y, x) dw LavenderMartBlocks, LavenderMartTextPointers, LavenderMartScript ; blocks, texts, scripts diff --git a/data/mapHeaders/lavenderpokecenter.asm b/data/mapHeaders/lavenderpokecenter.asm index ce6630bf..c0d41294 100755 --- a/data/mapHeaders/lavenderpokecenter.asm +++ b/data/mapHeaders/lavenderpokecenter.asm @@ -1,4 +1,4 @@ -LavenderPokecenter_h: ; 0x5c8ce to 0x5c8da (12 bytes) (id=141) +LavenderPokecenter_h: db POKECENTER ; tileset db LAVENDER_POKECENTER_HEIGHT, LAVENDER_POKECENTER_WIDTH ; dimensions (y, x) dw LavenderPokecenterBlocks, LavenderPokecenterTextPointers, LavenderPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/lavendertown.asm b/data/mapHeaders/lavendertown.asm index 2880dc60..74bbd7a8 100755 --- a/data/mapHeaders/lavendertown.asm +++ b/data/mapHeaders/lavendertown.asm @@ -1,9 +1,9 @@ -LavenderTown_h: ; 0x44000 to 0x4402d (45 bytes) (bank=11) (id=4) +LavenderTown_h: db OVERWORLD ; tileset db LAVENDER_TOWN_HEIGHT, LAVENDER_TOWN_WIDTH ; dimensions (y, x) dw LavenderTownBlocks, LavenderTownTextPointers, LavenderTownScript ; blocks, texts, scripts db NORTH | SOUTH | WEST ; connections - NORTH_MAP_CONNECTION ROUTE_10, ROUTE_10_WIDTH, ROUTE_10_HEIGHT, 0, 0, ROUTE_10_WIDTH, Route10Blocks - SOUTH_MAP_CONNECTION ROUTE_12, ROUTE_12_WIDTH, 0, 0, ROUTE_12_WIDTH, Route12Blocks, LAVENDER_TOWN_WIDTH, LAVENDER_TOWN_HEIGHT - WEST_MAP_CONNECTION ROUTE_8, ROUTE_8_WIDTH, 0, 0, ROUTE_8_HEIGHT, Route8Blocks, LAVENDER_TOWN_WIDTH + NORTH_MAP_CONNECTION LAVENDER_TOWN, ROUTE_10, 0, 0, Route10Blocks + SOUTH_MAP_CONNECTION LAVENDER_TOWN, ROUTE_12, 0, 0, Route12Blocks, 1 + WEST_MAP_CONNECTION LAVENDER_TOWN, ROUTE_8, 0, 0, Route8Blocks dw LavenderTownObject ; objects diff --git a/data/mapHeaders/lorelei.asm b/data/mapHeaders/lorelei.asm index e1261c3e..634435d3 100755 --- a/data/mapHeaders/lorelei.asm +++ b/data/mapHeaders/lorelei.asm @@ -1,4 +1,4 @@ -Lorelei_h: ; 0x7616f to 0x7617b (12 bytes) (id=245) +Lorelei_h: db GYM ; tileset db LORELEIS_ROOM_HEIGHT, LORELEIS_ROOM_WIDTH ; dimensions (y, x) dw LoreleiBlocks, LoreleiTextPointers, LoreleiScript ; blocks, texts, scripts diff --git a/data/mapHeaders/mansion1.asm b/data/mapHeaders/mansion1.asm index e7110698..46b0a83e 100755 --- a/data/mapHeaders/mansion1.asm +++ b/data/mapHeaders/mansion1.asm @@ -1,4 +1,4 @@ -Mansion1_h: ; 0x442a3 to 0x442af (12 bytes) (bank=11) (id=165) +Mansion1_h: db FACILITY ; tileset db MANSION_1_HEIGHT, MANSION_1_WIDTH ; dimensions (y, x) dw Mansion1Blocks, Mansion1TextPointers, Mansion1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/mansion2.asm b/data/mapHeaders/mansion2.asm index e888b243..ee4b570c 100755 --- a/data/mapHeaders/mansion2.asm +++ b/data/mapHeaders/mansion2.asm @@ -1,4 +1,4 @@ -Mansion2_h: ; 0x51fcc to 0x51fd8 (12 bytes) (id=214) +Mansion2_h: db FACILITY ; tileset db MANSION_2_HEIGHT, MANSION_2_WIDTH ; dimensions (y, x) dw Mansion2Blocks, Mansion2TextPointers, Mansion2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/mansion3.asm b/data/mapHeaders/mansion3.asm index a1b6c95f..97074347 100755 --- a/data/mapHeaders/mansion3.asm +++ b/data/mapHeaders/mansion3.asm @@ -1,4 +1,4 @@ -Mansion3_h: ; 0x521e2 to 0x521ee (12 bytes) (id=215) +Mansion3_h: db FACILITY ; tileset db MANSION_3_HEIGHT, MANSION_3_WIDTH ; dimensions (y, x) dw Mansion3Blocks, Mansion3TextPointers, Mansion3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/mansion4.asm b/data/mapHeaders/mansion4.asm index 63f138e7..45b1636a 100755 --- a/data/mapHeaders/mansion4.asm +++ b/data/mapHeaders/mansion4.asm @@ -1,4 +1,4 @@ -Mansion4_h: ; 0x523ad to 0x523b9 (12 bytes) (id=216) +Mansion4_h: db FACILITY ; tileset db MANSION_4_HEIGHT, MANSION_4_WIDTH ; dimensions (y, x) dw Mansion4Blocks, Mansion4TextPointers, Mansion4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/mtmoon1.asm b/data/mapHeaders/mtmoon1.asm index f5b52f37..da64b667 100755 --- a/data/mapHeaders/mtmoon1.asm +++ b/data/mapHeaders/mtmoon1.asm @@ -1,4 +1,4 @@ -MtMoon1_h: ; 0x499bc to 0x499c8 (12 bytes) (id=59) +MtMoon1_h: db CAVERN ; tileset db MT_MOON_1_HEIGHT, MT_MOON_1_WIDTH ; dimensions (y, x) dw MtMoon1Blocks, MtMoon1TextPointers, MtMoon1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/mtmoon2.asm b/data/mapHeaders/mtmoon2.asm index 5e53bc20..7121c33e 100755 --- a/data/mapHeaders/mtmoon2.asm +++ b/data/mapHeaders/mtmoon2.asm @@ -1,4 +1,4 @@ -MtMoon2_h: ; 0x51a36 to 0x51a42 (12 bytes) (id=60) +MtMoon2_h: db CAVERN ; tileset db MT_MOON_2_HEIGHT, MT_MOON_2_WIDTH ; dimensions (y, x) dw MtMoon2Blocks, MtMoon2TextPointers, MtMoon2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/mtmoon3.asm b/data/mapHeaders/mtmoon3.asm index 95331007..643eb95d 100755 --- a/data/mapHeaders/mtmoon3.asm +++ b/data/mapHeaders/mtmoon3.asm @@ -1,4 +1,4 @@ -MtMoon3_h: ; 0x49cff to 0x49d0b (12 bytes) (id=61) +MtMoon3_h: db CAVERN ; tileset db MT_MOON_3_HEIGHT, MT_MOON_3_WIDTH ; dimensions (y, x) dw MtMoon3Blocks, MtMoon3TextPointers, MtMoon3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/mtmoonpokecenter.asm b/data/mapHeaders/mtmoonpokecenter.asm index 52f002cc..ba82c478 100755 --- a/data/mapHeaders/mtmoonpokecenter.asm +++ b/data/mapHeaders/mtmoonpokecenter.asm @@ -1,4 +1,4 @@ -MtMoonPokecenter_h: ; 0x492c3 to 0x492cf (12 bytes) (bank=12) (id=68) +MtMoonPokecenter_h: db POKECENTER ; tileset db MT_MOON_POKECENTER_HEIGHT, MT_MOON_POKECENTER_WIDTH ; dimensions (y, x) dw MtMoonPokecenterBlocks, MtMoonPokecenterTextPointers, MtMoonPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/museum1f.asm b/data/mapHeaders/museum1f.asm index dacdb50e..10611513 100755 --- a/data/mapHeaders/museum1f.asm +++ b/data/mapHeaders/museum1f.asm @@ -1,4 +1,4 @@ -Museum1F_h: ; 0x5c0eb to 0x5c0f7 (12 bytes) (id=52) +Museum1F_h: db MUSEUM ; tileset db MUSEUM_1F_HEIGHT, MUSEUM_1F_WIDTH ; dimensions (y, x) dw Museum1FBlocks, Museum1FTextPointers, Museum1FScript ; blocks, texts, scripts diff --git a/data/mapHeaders/museum2f.asm b/data/mapHeaders/museum2f.asm index 15997573..62f9f7ca 100755 --- a/data/mapHeaders/museum2f.asm +++ b/data/mapHeaders/museum2f.asm @@ -1,4 +1,4 @@ -Museum2F_h: ; 0x5c30b to 0x5c317 (12 bytes) (id=53) +Museum2F_h: db MUSEUM ; tileset db MUSEUM_2F_HEIGHT, MUSEUM_2F_WIDTH ; dimensions (y, x) dw Museum2FBlocks, Museum2FTextPointers, Museum2FScript ; blocks, texts, scripts diff --git a/data/mapHeaders/namerater.asm b/data/mapHeaders/namerater.asm index f43493d4..3fdef0d7 100755 --- a/data/mapHeaders/namerater.asm +++ b/data/mapHeaders/namerater.asm @@ -1,4 +1,4 @@ -NameRater_h: ; 0x1da06 to 0x1da12 (12 bytes) (bank=7) (id=229) +NameRater_h: db HOUSE ; tileset db NAME_RATERS_HOUSE_HEIGHT, NAME_RATERS_HOUSE_WIDTH ; dimensions (y, x) dw NameRaterBlocks, NameRaterTextPointers, NameRaterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/oakslab.asm b/data/mapHeaders/oakslab.asm index ab41ef4d..ba2c9d22 100755 --- a/data/mapHeaders/oakslab.asm +++ b/data/mapHeaders/oakslab.asm @@ -1,4 +1,4 @@ -OaksLab_h: ; 0x1cb02 to 0x1cb0e (12 bytes) (bank=7) (id=40) +OaksLab_h: db DOJO ; tileset db OAKS_LAB_HEIGHT, OAKS_LAB_WIDTH ; dimensions (y, x) dw OaksLabBlocks, OaksLabTextPointers, OaksLabScript ; blocks, texts, scripts diff --git a/data/mapHeaders/pallettown.asm b/data/mapHeaders/pallettown.asm index 248c49b4..a957314c 100755 --- a/data/mapHeaders/pallettown.asm +++ b/data/mapHeaders/pallettown.asm @@ -1,8 +1,8 @@ -PalletTown_h: ; 182a1 (6:42a1) +PalletTown_h: db OVERWORLD ; tileset db PALLET_TOWN_HEIGHT, PALLET_TOWN_WIDTH ; dimensions dw PalletTownBlocks, PalletTownTextPointers, PalletTownScript db NORTH | SOUTH ; connections - NORTH_MAP_CONNECTION ROUTE_1, ROUTE_1_WIDTH, ROUTE_1_HEIGHT, 0, 0, ROUTE_1_WIDTH, Route1Blocks - SOUTH_MAP_CONNECTION ROUTE_21, ROUTE_21_WIDTH, 0, 0, ROUTE_21_WIDTH, Route21Blocks, PALLET_TOWN_WIDTH, PALLET_TOWN_HEIGHT + NORTH_MAP_CONNECTION PALLET_TOWN, ROUTE_1, 0, 0, Route1Blocks + SOUTH_MAP_CONNECTION PALLET_TOWN, ROUTE_21, 0, 0, Route21Blocks, 1 dw PalletTownObject diff --git a/data/mapHeaders/pewtercity.asm b/data/mapHeaders/pewtercity.asm index b5e68adc..ff5bd7b9 100755 --- a/data/mapHeaders/pewtercity.asm +++ b/data/mapHeaders/pewtercity.asm @@ -1,10 +1,10 @@ -PewterCity_h: ; 0x18554 to 0x18576 (34 bytes) (bank=6) (id=2) +PewterCity_h: db OVERWORLD ; tileset db PEWTER_CITY_HEIGHT, PEWTER_CITY_WIDTH ; dimensions (y, x) dw PewterCityBlocks, PewterCityTextPointers, PewterCityScript ; blocks, texts, scripts db SOUTH | EAST ; connections - SOUTH_MAP_CONNECTION ROUTE_2, ROUTE_2_WIDTH, 5, 0, ROUTE_2_WIDTH, Route2Blocks, PEWTER_CITY_WIDTH, PEWTER_CITY_HEIGHT - EAST_MAP_CONNECTION ROUTE_3, ROUTE_3_WIDTH, 4, 0, ROUTE_3_HEIGHT, Route3Blocks, PEWTER_CITY_WIDTH + SOUTH_MAP_CONNECTION PEWTER_CITY, ROUTE_2, 5, 0, Route2Blocks + EAST_MAP_CONNECTION PEWTER_CITY, ROUTE_3, 4, 0, Route3Blocks dw PewterCityObject ; objects db $0 diff --git a/data/mapHeaders/pewtergym.asm b/data/mapHeaders/pewtergym.asm index ac159b16..8eee73b3 100755 --- a/data/mapHeaders/pewtergym.asm +++ b/data/mapHeaders/pewtergym.asm @@ -1,4 +1,4 @@ -PewterGym_h: ; 0x5c37b to 0x5c387 (12 bytes) (id=54) +PewterGym_h: db GYM ; tileset db PEWTER_GYM_HEIGHT, PEWTER_GYM_WIDTH ; dimensions (y, x) dw PewterGymBlocks, PewterGymTextPointers, PewterGymScript ; blocks, texts, scripts diff --git a/data/mapHeaders/pewterhouse1.asm b/data/mapHeaders/pewterhouse1.asm index b9d11d98..40209926 100755 --- a/data/mapHeaders/pewterhouse1.asm +++ b/data/mapHeaders/pewterhouse1.asm @@ -1,4 +1,4 @@ -PewterHouse1_h: ; 0x1d5e7 to 0x1d5f3 (12 bytes) (bank=7) (id=55) +PewterHouse1_h: db HOUSE ; tileset db PEWTER_HOUSE_1_HEIGHT, PEWTER_HOUSE_1_WIDTH ; dimensions (y, x) dw PewterHouse1Blocks, PewterHouse1TextPointers, PewterHouse1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/pewterhouse2.asm b/data/mapHeaders/pewterhouse2.asm index abcb409b..25fc3e9d 100755 --- a/data/mapHeaders/pewterhouse2.asm +++ b/data/mapHeaders/pewterhouse2.asm @@ -1,4 +1,4 @@ -PewterHouse2_h: ; 0x1d63c to 0x1d648 (12 bytes) (bank=7) (id=57) +PewterHouse2_h: db HOUSE ; tileset db PEWTER_HOUSE_2_HEIGHT, PEWTER_HOUSE_2_WIDTH ; dimensions (y, x) dw PewterHouse2Blocks, PewterHouse2TextPointers, PewterHouse2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/pewtermart.asm b/data/mapHeaders/pewtermart.asm index 673dc1cf..02481bfc 100755 --- a/data/mapHeaders/pewtermart.asm +++ b/data/mapHeaders/pewtermart.asm @@ -1,4 +1,4 @@ -PewterMart_h: ; 0x74ca1 to 0x74cad (12 bytes) (id=56) +PewterMart_h: db MART ; tileset db PEWTER_MART_HEIGHT, PEWTER_MART_WIDTH ; dimensions (y, x) dw PewterMartBlocks, PewterMartTextPointers, PewterMartScript ; blocks, texts, scripts diff --git a/data/mapHeaders/pewterpokecenter.asm b/data/mapHeaders/pewterpokecenter.asm index 4fd426c5..f3abc838 100755 --- a/data/mapHeaders/pewterpokecenter.asm +++ b/data/mapHeaders/pewterpokecenter.asm @@ -1,4 +1,4 @@ -PewterPokecenter_h: ; 0x5c57b to 0x5c587 (12 bytes) (id=58) +PewterPokecenter_h: db POKECENTER ; tileset db PEWTER_POKECENTER_HEIGHT, PEWTER_POKECENTER_WIDTH ; dimensions (y, x) dw PewterPokecenterBlocks, PewterPokecenterTextPointers, PewterPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/pokemontower1.asm b/data/mapHeaders/pokemontower1.asm index d7c2849e..9a799d73 100755 --- a/data/mapHeaders/pokemontower1.asm +++ b/data/mapHeaders/pokemontower1.asm @@ -1,4 +1,4 @@ -PokemonTower1_h: ; 0x60420 to 0x6042c (12 bytes) (id=142) +PokemonTower1_h: db CEMETERY ; tileset db POKEMONTOWER_1_HEIGHT, POKEMONTOWER_1_WIDTH ; dimensions (y, x) dw PokemonTower1Blocks, PokemonTower1TextPointers, PokemonTower1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/pokemontower2.asm b/data/mapHeaders/pokemontower2.asm index 30493d08..a2c395c9 100755 --- a/data/mapHeaders/pokemontower2.asm +++ b/data/mapHeaders/pokemontower2.asm @@ -1,4 +1,4 @@ -PokemonTower2_h: ; 0x604e6 to 0x604f2 (12 bytes) (id=143) +PokemonTower2_h: db CEMETERY ; tileset db POKEMONTOWER_2_HEIGHT, POKEMONTOWER_2_WIDTH ; dimensions (y, x) dw PokemonTower2Blocks, PokemonTower2TextPointers, PokemonTower2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/pokemontower3.asm b/data/mapHeaders/pokemontower3.asm index bb3f2318..af81c9e6 100755 --- a/data/mapHeaders/pokemontower3.asm +++ b/data/mapHeaders/pokemontower3.asm @@ -1,4 +1,4 @@ -PokemonTower3_h: ; 0x606c0 to 0x606cc (12 bytes) (id=144) +PokemonTower3_h: db CEMETERY ; tileset db POKEMONTOWER_3_HEIGHT, POKEMONTOWER_3_WIDTH ; dimensions (y, x) dw PokemonTower3Blocks, PokemonTower3TextPointers, PokemonTower3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/pokemontower4.asm b/data/mapHeaders/pokemontower4.asm index bf405a76..073c34c0 100755 --- a/data/mapHeaders/pokemontower4.asm +++ b/data/mapHeaders/pokemontower4.asm @@ -1,4 +1,4 @@ -PokemonTower4_h: ; 0x607ea to 0x607f6 (12 bytes) (id=145) +PokemonTower4_h: db CEMETERY ; tileset db POKEMONTOWER_4_HEIGHT, POKEMONTOWER_4_WIDTH ; dimensions (y, x) dw PokemonTower4Blocks, PokemonTower4TextPointers, PokemonTower4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/pokemontower5.asm b/data/mapHeaders/pokemontower5.asm index 662c32d2..a7636534 100755 --- a/data/mapHeaders/pokemontower5.asm +++ b/data/mapHeaders/pokemontower5.asm @@ -1,4 +1,4 @@ -PokemonTower5_h: ; 0x60926 to 0x60932 (12 bytes) (id=146) +PokemonTower5_h: db CEMETERY ; tileset db POKEMONTOWER_5_HEIGHT, POKEMONTOWER_5_WIDTH ; dimensions (y, x) dw PokemonTower5Blocks, PokemonTower5TextPointers, PokemonTower5Script ; blocks, texts, scripts diff --git a/data/mapHeaders/pokemontower6.asm b/data/mapHeaders/pokemontower6.asm index a6d0ff9d..a83ae0ba 100755 --- a/data/mapHeaders/pokemontower6.asm +++ b/data/mapHeaders/pokemontower6.asm @@ -1,4 +1,4 @@ -PokemonTower6_h: ; 0x60ae3 to 0x60aef (12 bytes) (id=147) +PokemonTower6_h: db CEMETERY ; tileset db POKEMONTOWER_6_HEIGHT, POKEMONTOWER_6_WIDTH ; dimensions (y, x) dw PokemonTower6Blocks, PokemonTower6TextPointers, PokemonTower6Script ; blocks, texts, scripts diff --git a/data/mapHeaders/pokemontower7.asm b/data/mapHeaders/pokemontower7.asm index c366006b..4e13bcee 100755 --- a/data/mapHeaders/pokemontower7.asm +++ b/data/mapHeaders/pokemontower7.asm @@ -1,4 +1,4 @@ -PokemonTower7_h: ; 0x60cf9 to 0x60d05 (12 bytes) (id=148) +PokemonTower7_h: db CEMETERY ; tileset db POKEMONTOWER_7_HEIGHT, POKEMONTOWER_7_WIDTH ; dimensions (y, x) dw PokemonTower7Blocks, PokemonTower7TextPointers, PokemonTower7Script ; blocks, texts, scripts diff --git a/data/mapHeaders/powerplant.asm b/data/mapHeaders/powerplant.asm index 36c07d3f..9c78311d 100755 --- a/data/mapHeaders/powerplant.asm +++ b/data/mapHeaders/powerplant.asm @@ -1,4 +1,4 @@ -PowerPlant_h: ; 0x1e2ba to 0x1e2c6 (12 bytes) (bank=7) (id=83) +PowerPlant_h: db FACILITY ; tileset db POWER_PLANT_HEIGHT, POWER_PLANT_WIDTH ; dimensions (y, x) dw PowerPlantBlocks, PowerPlantTextPointers, PowerPlantScript ; blocks, texts, scripts diff --git a/data/mapHeaders/redshouse1f.asm b/data/mapHeaders/redshouse1f.asm index 02dcc082..82d83042 100755 --- a/data/mapHeaders/redshouse1f.asm +++ b/data/mapHeaders/redshouse1f.asm @@ -1,4 +1,4 @@ -RedsHouse1F_h: ; 4815c (12:415c) +RedsHouse1F_h: db REDS_HOUSE_1 ; tileset db REDS_HOUSE_1F_HEIGHT, REDS_HOUSE_1F_WIDTH ; dimensions dw RedsHouse1FBlocks, RedsHouse1FTextPointers, RedsHouse1FScript diff --git a/data/mapHeaders/redshouse2f.asm b/data/mapHeaders/redshouse2f.asm index 6b72d7db..c4b0969c 100755 --- a/data/mapHeaders/redshouse2f.asm +++ b/data/mapHeaders/redshouse2f.asm @@ -1,4 +1,4 @@ -RedsHouse2F_h: ; 5c0a4 (17:40a4) +RedsHouse2F_h: db REDS_HOUSE_2 ; tileset db REDS_HOUSE_2F_HEIGHT, REDS_HOUSE_2F_WIDTH ; dimensions dw RedsHouse2FBlocks, RedsHouse2FTextPointers, RedsHouse2FScript diff --git a/data/mapHeaders/rockethideout1.asm b/data/mapHeaders/rockethideout1.asm index 9af33f1d..a9dcf424 100755 --- a/data/mapHeaders/rockethideout1.asm +++ b/data/mapHeaders/rockethideout1.asm @@ -1,4 +1,4 @@ -RocketHideout1_h: ; 0x44bbe to 0x44bca (12 bytes) (bank=11) (id=199) +RocketHideout1_h: db FACILITY ; tileset db ROCKET_HIDEOUT_1_HEIGHT, ROCKET_HIDEOUT_1_WIDTH ; dimensions (y, x) dw RocketHideout1Blocks, RocketHideout1TextPointers, RocketHideout1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/rockethideout2.asm b/data/mapHeaders/rockethideout2.asm index b4629ccb..8f034360 100755 --- a/data/mapHeaders/rockethideout2.asm +++ b/data/mapHeaders/rockethideout2.asm @@ -1,4 +1,4 @@ -RocketHideout2_h: ; 0x44e1b to 0x44e27 (12 bytes) (bank=11) (id=200) +RocketHideout2_h: db FACILITY ; tileset db ROCKET_HIDEOUT_2_HEIGHT, ROCKET_HIDEOUT_2_WIDTH ; dimensions (y, x) dw RocketHideout2Blocks, RocketHideout2TextPointers, RocketHideout2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/rockethideout3.asm b/data/mapHeaders/rockethideout3.asm index 1ec94195..5fc9fb95 100755 --- a/data/mapHeaders/rockethideout3.asm +++ b/data/mapHeaders/rockethideout3.asm @@ -1,4 +1,4 @@ -RocketHideout3_h: ; 0x45219 to 0x45225 (12 bytes) (bank=11) (id=201) +RocketHideout3_h: db FACILITY ; tileset db ROCKET_HIDEOUT_3_HEIGHT, ROCKET_HIDEOUT_3_WIDTH ; dimensions (y, x) dw RocketHideout3Blocks, RocketHideout3TextPointers, RocketHideout3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/rockethideout4.asm b/data/mapHeaders/rockethideout4.asm index 9ee9ec58..0cde5bee 100755 --- a/data/mapHeaders/rockethideout4.asm +++ b/data/mapHeaders/rockethideout4.asm @@ -1,4 +1,4 @@ -RocketHideout4_h: ; 0x45451 to 0x4545d (12 bytes) (bank=11) (id=202) +RocketHideout4_h: db FACILITY ; tileset db ROCKET_HIDEOUT_4_HEIGHT, ROCKET_HIDEOUT_4_WIDTH ; dimensions (y, x) dw RocketHideout4Blocks, RocketHideout4TextPointers, RocketHideout4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/rockethideoutelevator.asm b/data/mapHeaders/rockethideoutelevator.asm index 209c2ba8..d4917812 100755 --- a/data/mapHeaders/rockethideoutelevator.asm +++ b/data/mapHeaders/rockethideoutelevator.asm @@ -1,4 +1,4 @@ -RocketHideoutElevator_h: ; 0x45704 to 0x45710 (12 bytes) (bank=11) (id=203) +RocketHideoutElevator_h: db LOBBY ; tileset db ROCKET_HIDEOUT_ELEVATOR_HEIGHT, ROCKET_HIDEOUT_ELEVATOR_WIDTH ; dimensions (y, x) dw RocketHideoutElevatorBlocks, RocketHideoutElevatorTextPointers, RocketHideoutElevatorScript ; blocks, texts, scripts diff --git a/data/mapHeaders/rocktunnel1.asm b/data/mapHeaders/rocktunnel1.asm index cc734b28..db67517d 100755 --- a/data/mapHeaders/rocktunnel1.asm +++ b/data/mapHeaders/rocktunnel1.asm @@ -1,4 +1,4 @@ -RockTunnel1_h: ; 0x444d0 to 0x444dc (12 bytes) (bank=11) (id=82) +RockTunnel1_h: db CAVERN ; tileset db ROCK_TUNNEL_1_HEIGHT, ROCK_TUNNEL_1_WIDTH ; dimensions (y, x) dw RockTunnel1Blocks, RockTunnel1TextPointers, RockTunnel1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/rocktunnel2.asm b/data/mapHeaders/rocktunnel2.asm index ec43cddc..5b85701b 100755 --- a/data/mapHeaders/rocktunnel2.asm +++ b/data/mapHeaders/rocktunnel2.asm @@ -1,4 +1,4 @@ -RockTunnel2_h: ; 0x45fdf to 0x45feb (12 bytes) (bank=11) (id=232) +RockTunnel2_h: db CAVERN ; tileset db ROCK_TUNNEL_2_HEIGHT, ROCK_TUNNEL_2_WIDTH ; dimensions (y, x) dw RockTunnel2Blocks, RockTunnel2TextPointers, RockTunnel2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/rocktunnelpokecenter.asm b/data/mapHeaders/rocktunnelpokecenter.asm index 390cc20e..e1bad3bd 100755 --- a/data/mapHeaders/rocktunnelpokecenter.asm +++ b/data/mapHeaders/rocktunnelpokecenter.asm @@ -1,4 +1,4 @@ -RockTunnelPokecenter_h: ; 0x493ae to 0x493ba (12 bytes) (id=81) +RockTunnelPokecenter_h: db POKECENTER ; tileset db ROCK_TUNNEL_POKECENTER_HEIGHT, ROCK_TUNNEL_POKECENTER_WIDTH ; dimensions (y, x) dw RockTunnelPokecenterBlocks, RockTunnelPokecenterTextPointers, RockTunnelPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route1.asm b/data/mapHeaders/route1.asm index cd849504..5f6a858e 100755 --- a/data/mapHeaders/route1.asm +++ b/data/mapHeaders/route1.asm @@ -1,8 +1,8 @@ -Route1_h: ; 0x1c0c3 to 0x1c0e5 (34 bytes) (bank=7) (id=12) +Route1_h: db OVERWORLD ; tileset db ROUTE_1_HEIGHT, ROUTE_1_WIDTH ; dimensions (y, x) dw Route1Blocks, Route1TextPointers, Route1Script ; blocks, texts, scripts db NORTH | SOUTH ; connections - NORTH_MAP_CONNECTION VIRIDIAN_CITY, VIRIDIAN_CITY_WIDTH, VIRIDIAN_CITY_HEIGHT, -3, 2, VIRIDIAN_CITY_WIDTH - 4, ViridianCityBlocks - SOUTH_MAP_CONNECTION PALLET_TOWN, PALLET_TOWN_WIDTH, 0, 0, PALLET_TOWN_WIDTH, PalletTownBlocks, ROUTE_1_WIDTH, ROUTE_1_HEIGHT + NORTH_MAP_CONNECTION ROUTE_1, VIRIDIAN_CITY, -3, 2, ViridianCityBlocks + SOUTH_MAP_CONNECTION ROUTE_1, PALLET_TOWN, 0, 0, PalletTownBlocks, 1 dw Route1Object ; objects diff --git a/data/mapHeaders/route10.asm b/data/mapHeaders/route10.asm index 9d41ff76..7ee588cf 100755 --- a/data/mapHeaders/route10.asm +++ b/data/mapHeaders/route10.asm @@ -1,8 +1,8 @@ -Route10_h: ; 0x582d4 to 0x582f6 (34 bytes) (id=21) +Route10_h: db OVERWORLD ; tileset db ROUTE_10_HEIGHT, ROUTE_10_WIDTH ; dimensions (y, x) dw Route10Blocks, Route10TextPointers, Route10Script ; blocks, texts, scripts db SOUTH | WEST ; connections - SOUTH_MAP_CONNECTION LAVENDER_TOWN, LAVENDER_TOWN_WIDTH, 0, 0, LAVENDER_TOWN_WIDTH, LavenderTownBlocks, ROUTE_10_WIDTH, ROUTE_10_HEIGHT - WEST_MAP_CONNECTION ROUTE_9, ROUTE_9_WIDTH, 0, 0, ROUTE_9_HEIGHT, Route9Blocks, ROUTE_10_WIDTH + SOUTH_MAP_CONNECTION ROUTE_10, LAVENDER_TOWN, 0, 0, LavenderTownBlocks + WEST_MAP_CONNECTION ROUTE_10, ROUTE_9, 0, 0, Route9Blocks dw Route10Object ; objects diff --git a/data/mapHeaders/route11.asm b/data/mapHeaders/route11.asm index 7ab3a478..04ae8f24 100755 --- a/data/mapHeaders/route11.asm +++ b/data/mapHeaders/route11.asm @@ -1,8 +1,8 @@ -Route11_h: ; 0x584be to 0x584e0 (34 bytes) (id=22) +Route11_h: db OVERWORLD ; tileset db ROUTE_11_HEIGHT, ROUTE_11_WIDTH ; dimensions (y, x) dw Route11Blocks, Route11TextPointers, Route11Script ; blocks, texts, scripts db WEST | EAST ; connections - WEST_MAP_CONNECTION VERMILION_CITY, VERMILION_CITY_WIDTH, -3, 1, VERMILION_CITY_HEIGHT - 3, VermilionCityBlocks, ROUTE_11_WIDTH - EAST_MAP_CONNECTION ROUTE_12, ROUTE_12_WIDTH, -3, 24, ROUTE_12_HEIGHT - 39, Route12Blocks, ROUTE_11_WIDTH + WEST_MAP_CONNECTION ROUTE_11, VERMILION_CITY, -3, 1, VermilionCityBlocks + EAST_MAP_CONNECTION ROUTE_11, ROUTE_12, -3, 24, Route12Blocks, 1 dw Route11Object ; objects diff --git a/data/mapHeaders/route11gate.asm b/data/mapHeaders/route11gate.asm index 56b9381c..26539a19 100755 --- a/data/mapHeaders/route11gate.asm +++ b/data/mapHeaders/route11gate.asm @@ -1,4 +1,4 @@ -Route11Gate_h: ; 0x49400 to 0x4940c (12 bytes) (id=84) +Route11Gate_h: db GATE ; tileset db ROUTE_11_GATE_1F_HEIGHT, ROUTE_11_GATE_1F_WIDTH ; dimensions (y, x) dw Route11GateBlocks, Route11GateTextPointers, Route11GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route11gateupstairs.asm b/data/mapHeaders/route11gateupstairs.asm index 3428de6a..ac556804 100755 --- a/data/mapHeaders/route11gateupstairs.asm +++ b/data/mapHeaders/route11gateupstairs.asm @@ -1,4 +1,4 @@ -Route11GateUpstairs_h: ; 0x49448 to 0x49454 (12 bytes) (id=86) +Route11GateUpstairs_h: db GATE ; tileset db ROUTE_11_GATE_2F_HEIGHT, ROUTE_11_GATE_2F_WIDTH ; dimensions (y, x) dw Route11GateUpstairsBlocks, Route11GateUpstairsTextPointers, Route11GateUpstairsScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route12.asm b/data/mapHeaders/route12.asm index 44e9e731..b11e0128 100755 --- a/data/mapHeaders/route12.asm +++ b/data/mapHeaders/route12.asm @@ -1,9 +1,9 @@ -Route12_h: ; 0x5866d to 0x5869a (45 bytes) (id=23) +Route12_h: db OVERWORLD ; tileset db ROUTE_12_HEIGHT, ROUTE_12_WIDTH ; dimensions (y, x) dw Route12Blocks, Route12TextPointers, Route12Script ; blocks, texts, scripts db NORTH | SOUTH | WEST ; connections - NORTH_MAP_CONNECTION LAVENDER_TOWN, LAVENDER_TOWN_WIDTH, LAVENDER_TOWN_HEIGHT, 0, 0, LAVENDER_TOWN_WIDTH, LavenderTownBlocks - SOUTH_MAP_CONNECTION ROUTE_13, ROUTE_13_WIDTH, -3, 17, ROUTE_13_WIDTH - 17, Route13Blocks, ROUTE_12_WIDTH, ROUTE_12_HEIGHT - WEST_MAP_CONNECTION ROUTE_11, ROUTE_11_WIDTH, 27, 0, ROUTE_11_HEIGHT, Route11Blocks, ROUTE_12_WIDTH + NORTH_MAP_CONNECTION ROUTE_12, LAVENDER_TOWN, 0, 0, LavenderTownBlocks + SOUTH_MAP_CONNECTION ROUTE_12, ROUTE_13, -3, 17, Route13Blocks + WEST_MAP_CONNECTION ROUTE_12, ROUTE_11, 27, 0, Route11Blocks dw Route12Object ; objects diff --git a/data/mapHeaders/route12gate.asm b/data/mapHeaders/route12gate.asm index 0afcf06b..bcd36d73 100755 --- a/data/mapHeaders/route12gate.asm +++ b/data/mapHeaders/route12gate.asm @@ -1,4 +1,4 @@ -Route12Gate_h: ; 0x494f8 to 0x49504 (12 bytes) (id=87) +Route12Gate_h: db GATE ; tileset db ROUTE_12_GATE_1F_HEIGHT, ROUTE_12_GATE_1F_WIDTH ; dimensions (y, x) dw Route12GateBlocks, Route12GateTextPointers, Route12GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route12gateupstairs.asm b/data/mapHeaders/route12gateupstairs.asm index acad7e9f..96109a38 100755 --- a/data/mapHeaders/route12gateupstairs.asm +++ b/data/mapHeaders/route12gateupstairs.asm @@ -1,4 +1,4 @@ -Route12GateUpstairs_h: ; 0x49554 to 0x49560 (12 bytes) (id=195) +Route12GateUpstairs_h: db GATE ; tileset db ROUTE_12_GATE_2F_HEIGHT, ROUTE_12_GATE_2F_WIDTH ; dimensions (y, x) dw Route12GateUpstairsBlocks, Route12GateUpstairsTextPointers, Route12GateUpstairsScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route12house.asm b/data/mapHeaders/route12house.asm index 0116270c..11f45d24 100755 --- a/data/mapHeaders/route12house.asm +++ b/data/mapHeaders/route12house.asm @@ -1,4 +1,4 @@ -Route12House_h: ; 0x56473 to 0x5647f (12 bytes) (id=189) +Route12House_h: db HOUSE ; tileset db ROUTE_12_HOUSE_HEIGHT, ROUTE_12_HOUSE_WIDTH ; dimensions (y, x) dw Route12HouseBlocks, Route12HouseTextPointers, Route12HouseScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route13.asm b/data/mapHeaders/route13.asm index 7720e9b7..53a88633 100755 --- a/data/mapHeaders/route13.asm +++ b/data/mapHeaders/route13.asm @@ -1,8 +1,8 @@ -Route13_h: ; 0x5480c to 0x5482e (34 bytes) (id=24) +Route13_h: db OVERWORLD ; tileset db ROUTE_13_HEIGHT, ROUTE_13_WIDTH ; dimensions (y, x) dw Route13Blocks, Route13TextPointers, Route13Script ; blocks, texts, scripts db NORTH | WEST ; connections - NORTH_MAP_CONNECTION ROUTE_12, ROUTE_12_WIDTH, ROUTE_12_HEIGHT, 20, 0, ROUTE_12_WIDTH, Route12Blocks - WEST_MAP_CONNECTION ROUTE_14, ROUTE_14_WIDTH, 0, 0, ROUTE_14_HEIGHT - 15, Route14Blocks, ROUTE_13_WIDTH + NORTH_MAP_CONNECTION ROUTE_13, ROUTE_12, 20, 0, Route12Blocks + WEST_MAP_CONNECTION ROUTE_13, ROUTE_14, 0, 0, Route14Blocks dw Route13Object ; objects diff --git a/data/mapHeaders/route14.asm b/data/mapHeaders/route14.asm index 1ae75932..f860d332 100755 --- a/data/mapHeaders/route14.asm +++ b/data/mapHeaders/route14.asm @@ -1,8 +1,8 @@ -Route14_h: ; 0x54999 to 0x549bb (34 bytes) (id=25) +Route14_h: db OVERWORLD ; tileset db ROUTE_14_HEIGHT, ROUTE_14_WIDTH ; dimensions (y, x) dw Route14Blocks, Route14TextPointers, Route14Script ; blocks, texts, scripts db WEST | EAST ; connections - WEST_MAP_CONNECTION ROUTE_15, ROUTE_15_WIDTH, 18, 0, ROUTE_15_HEIGHT, Route15Blocks, ROUTE_14_WIDTH - EAST_MAP_CONNECTION ROUTE_13, ROUTE_13_WIDTH, 0, 0, ROUTE_13_HEIGHT, Route13Blocks, ROUTE_14_WIDTH + WEST_MAP_CONNECTION ROUTE_14, ROUTE_15, 18, 0, Route15Blocks + EAST_MAP_CONNECTION ROUTE_14, ROUTE_13, 0, 0, Route13Blocks dw Route14Object ; objects diff --git a/data/mapHeaders/route15.asm b/data/mapHeaders/route15.asm index 579dada0..48d5ff20 100755 --- a/data/mapHeaders/route15.asm +++ b/data/mapHeaders/route15.asm @@ -1,8 +1,8 @@ -Route15_h: ; 0x5892c to 0x5894e (34 bytes) (id=26) +Route15_h: db OVERWORLD ; tileset db ROUTE_15_HEIGHT, ROUTE_15_WIDTH ; dimensions (y, x) dw Route15Blocks, Route15TextPointers, Route15Script ; blocks, texts, scripts db WEST | EAST ; connections - WEST_MAP_CONNECTION FUCHSIA_CITY, FUCHSIA_CITY_WIDTH, -3, 1, FUCHSIA_CITY_HEIGHT - 3, FuchsiaCityBlocks, ROUTE_15_WIDTH - EAST_MAP_CONNECTION ROUTE_14, ROUTE_14_WIDTH, -3, 15, ROUTE_14_HEIGHT - 15, Route14Blocks, ROUTE_15_WIDTH + WEST_MAP_CONNECTION ROUTE_15, FUCHSIA_CITY, -3, 1, FuchsiaCityBlocks + EAST_MAP_CONNECTION ROUTE_15, ROUTE_14, -3, 15, Route14Blocks dw Route15Object ; objects diff --git a/data/mapHeaders/route15gate.asm b/data/mapHeaders/route15gate.asm index 55ee5cc9..072d8f72 100755 --- a/data/mapHeaders/route15gate.asm +++ b/data/mapHeaders/route15gate.asm @@ -1,4 +1,4 @@ -Route15Gate_h: ; 0x495f6 to 0x49602 (12 bytes) (id=184) +Route15Gate_h: db GATE ; tileset db ROUTE_15_GATE_1F_HEIGHT, ROUTE_15_GATE_1F_WIDTH ; dimensions (y, x) dw Route15GateBlocks, Route15GateTextPointers, Route15GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route15gateupstairs.asm b/data/mapHeaders/route15gateupstairs.asm index 0687ab28..96e7e2ca 100755 --- a/data/mapHeaders/route15gateupstairs.asm +++ b/data/mapHeaders/route15gateupstairs.asm @@ -1,4 +1,4 @@ -Route15GateUpstairs_h: ; 4963e (12:563e) +Route15GateUpstairs_h: db GATE ; tileset db ROUTE_15_GATE_2F_HEIGHT, ROUTE_15_GATE_2F_WIDTH ; dimensions (y, x) dw Route15GateUpstairsBlocks, Route15GateUpstairsTextPointers, Route15GateUpstairsScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route16.asm b/data/mapHeaders/route16.asm index 4f1d8325..eee71ba2 100755 --- a/data/mapHeaders/route16.asm +++ b/data/mapHeaders/route16.asm @@ -1,8 +1,8 @@ -Route16_h: ; 0x58ada to 0x58afc (34 bytes) (id=27) +Route16_h: db OVERWORLD ; tileset db ROUTE_16_HEIGHT, ROUTE_16_WIDTH ; dimensions (y, x) dw Route16Blocks, Route16TextPointers, Route16Script ; blocks, texts, scripts db SOUTH | EAST ; connections - SOUTH_MAP_CONNECTION ROUTE_17, ROUTE_17_WIDTH, 0, 0, ROUTE_17_WIDTH, Route17Blocks, ROUTE_16_WIDTH, ROUTE_16_HEIGHT - EAST_MAP_CONNECTION CELADON_CITY, CELADON_CITY_WIDTH, -3, 1, CELADON_CITY_HEIGHT - 3, CeladonCityBlocks, ROUTE_16_WIDTH + SOUTH_MAP_CONNECTION ROUTE_16, ROUTE_17, 0, 0, Route17Blocks + EAST_MAP_CONNECTION ROUTE_16, CELADON_CITY, -3, 1, CeladonCityBlocks, 1 dw Route16Object ; objects diff --git a/data/mapHeaders/route16gate.asm b/data/mapHeaders/route16gate.asm index a155125e..b3381258 100755 --- a/data/mapHeaders/route16gate.asm +++ b/data/mapHeaders/route16gate.asm @@ -1,4 +1,4 @@ -Route16Gate_h: ; 0x496b2 to 0x496be (12 bytes) (id=186) +Route16Gate_h: db GATE ; tileset db ROUTE_16_GATE_1F_HEIGHT, ROUTE_16_GATE_1F_WIDTH ; dimensions (y, x) dw Route16GateBlocks, Route16GateTextPointers, Route16GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route16gateupstairs.asm b/data/mapHeaders/route16gateupstairs.asm index 878c4eca..e8dd7d45 100755 --- a/data/mapHeaders/route16gateupstairs.asm +++ b/data/mapHeaders/route16gateupstairs.asm @@ -1,4 +1,4 @@ -Route16GateUpstairs_h: ; 0x497ff to 0x4980b (12 bytes) (id=187) +Route16GateUpstairs_h: db GATE ; tileset db ROUTE_16_GATE_2F_HEIGHT, ROUTE_16_GATE_2F_WIDTH ; dimensions (y, x) dw Route16GateUpstairsBlocks, Route16GateUpstairsTextPointers, Route16GateUpstairsScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route16house.asm b/data/mapHeaders/route16house.asm index c3649b84..5945e11b 100755 --- a/data/mapHeaders/route16house.asm +++ b/data/mapHeaders/route16house.asm @@ -1,4 +1,4 @@ -Route16House_h: ; 0x1e5ec to 0x1e5f8 (12 bytes) (bank=7) (id=188) +Route16House_h: db HOUSE ; tileset db ROUTE_16_HOUSE_HEIGHT, ROUTE_16_HOUSE_WIDTH ; dimensions (y, x) dw Route16HouseBlocks, Route16HouseTextPointers, Route16HouseScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route17.asm b/data/mapHeaders/route17.asm index 4f7f2d33..82a5d0f4 100755 --- a/data/mapHeaders/route17.asm +++ b/data/mapHeaders/route17.asm @@ -1,8 +1,8 @@ -Route17_h: ; 0x54b20 to 0x54b42 (34 bytes) (id=28) +Route17_h: db OVERWORLD ; tileset db ROUTE_17_HEIGHT, ROUTE_17_WIDTH ; dimensions (y, x) dw Route17Blocks, Route17TextPointers, Route17Script ; blocks, texts, scripts db NORTH | SOUTH ; connections - NORTH_MAP_CONNECTION ROUTE_16, ROUTE_16_WIDTH, ROUTE_16_HEIGHT, 0, 0, ROUTE_16_WIDTH - 7, Route16Blocks - SOUTH_MAP_CONNECTION ROUTE_18, ROUTE_18_WIDTH, 0, 0, ROUTE_18_WIDTH - 12, Route18Blocks, ROUTE_17_WIDTH, ROUTE_17_HEIGHT + NORTH_MAP_CONNECTION ROUTE_17, ROUTE_16, 0, 0, Route16Blocks + SOUTH_MAP_CONNECTION ROUTE_17, ROUTE_18, 0, 0, Route18Blocks, 1 dw Route17Object ; objects diff --git a/data/mapHeaders/route18.asm b/data/mapHeaders/route18.asm index d37ebcf9..180111b5 100755 --- a/data/mapHeaders/route18.asm +++ b/data/mapHeaders/route18.asm @@ -1,8 +1,8 @@ -Route18_h: ; 0x58c38 to 0x58c5a (34 bytes) (id=29) +Route18_h: db OVERWORLD ; tileset db ROUTE_18_HEIGHT, ROUTE_18_WIDTH ; dimensions (y, x) dw Route18Blocks, Route18TextPointers, Route18Script ; blocks, texts, scripts db NORTH | EAST ; connections - NORTH_MAP_CONNECTION ROUTE_17, ROUTE_17_WIDTH, ROUTE_17_HEIGHT, 0, 0, ROUTE_17_WIDTH, Route17Blocks - EAST_MAP_CONNECTION FUCHSIA_CITY, FUCHSIA_CITY_WIDTH, -3, 1, FUCHSIA_CITY_HEIGHT - 3, FuchsiaCityBlocks, ROUTE_18_WIDTH + NORTH_MAP_CONNECTION ROUTE_18, ROUTE_17, 0, 0, Route17Blocks + EAST_MAP_CONNECTION ROUTE_18, FUCHSIA_CITY, -3, 1, FuchsiaCityBlocks, 1 dw Route18Object ; objects diff --git a/data/mapHeaders/route18gate.asm b/data/mapHeaders/route18gate.asm index a0e463e8..090d43df 100755 --- a/data/mapHeaders/route18gate.asm +++ b/data/mapHeaders/route18gate.asm @@ -1,4 +1,4 @@ -Route18Gate_h: ; 0x4986a to 0x49876 (12 bytes) (id=190) +Route18Gate_h: db GATE ; tileset db ROUTE_18_GATE_1F_HEIGHT, ROUTE_18_GATE_1F_WIDTH ; dimensions (y, x) dw Route18GateBlocks, Route18GateTextPointers, Route18GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route18gateupstairs.asm b/data/mapHeaders/route18gateupstairs.asm index 2043c2ef..ac9e3d0a 100755 --- a/data/mapHeaders/route18gateupstairs.asm +++ b/data/mapHeaders/route18gateupstairs.asm @@ -1,4 +1,4 @@ -Route18GateUpstairs_h: ; 0x49969 to 0x49975 (12 bytes) (id=191) +Route18GateUpstairs_h: db GATE ; tileset db ROUTE_18_GATE_2F_HEIGHT, ROUTE_18_GATE_2F_WIDTH ; dimensions (y, x) dw Route18GateUpstairsBlocks, Route18GateUpstairsTextPointers, Route18GateUpstairsScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route19.asm b/data/mapHeaders/route19.asm index f1185425..1de353f8 100755 --- a/data/mapHeaders/route19.asm +++ b/data/mapHeaders/route19.asm @@ -1,8 +1,8 @@ -Route19_h: ; 0x54e78 to 0x54e9a (34 bytes) (id=30) +Route19_h: db OVERWORLD ; tileset db ROUTE_19_HEIGHT, ROUTE_19_WIDTH ; dimensions (y, x) dw Route19Blocks, Route19TextPointers, Route19Script ; blocks, texts, scripts db NORTH | WEST ; connections - NORTH_MAP_CONNECTION FUCHSIA_CITY, FUCHSIA_CITY_WIDTH, FUCHSIA_CITY_HEIGHT, -3, 2, FUCHSIA_CITY_WIDTH - 4, FuchsiaCityBlocks - WEST_MAP_CONNECTION ROUTE_20, ROUTE_20_WIDTH, 18, 0, ROUTE_20_HEIGHT, Route20Blocks, ROUTE_19_WIDTH + NORTH_MAP_CONNECTION ROUTE_19, FUCHSIA_CITY, -3, 2, FuchsiaCityBlocks + WEST_MAP_CONNECTION ROUTE_19, ROUTE_20, 18, 0, Route20Blocks dw Route19Object ; objects diff --git a/data/mapHeaders/route2.asm b/data/mapHeaders/route2.asm index 28db1a1b..38e80842 100755 --- a/data/mapHeaders/route2.asm +++ b/data/mapHeaders/route2.asm @@ -1,8 +1,8 @@ -Route2_h: ; 54000 (15:4000) +Route2_h: db 00 ; Tileset db ROUTE_2_HEIGHT,ROUTE_2_WIDTH ;Height,Width blocks (1 block = 4x4 tiles) dw Route2Blocks, Route2TextPointers, Route2Script db NORTH | SOUTH ;Connection Byte - NORTH_MAP_CONNECTION PEWTER_CITY, PEWTER_CITY_WIDTH, PEWTER_CITY_HEIGHT, -3, 2, PEWTER_CITY_WIDTH - 4, PewterCityBlocks - SOUTH_MAP_CONNECTION VIRIDIAN_CITY, VIRIDIAN_CITY_WIDTH, -3, 2, VIRIDIAN_CITY_WIDTH - 4, ViridianCityBlocks, ROUTE_2_WIDTH, ROUTE_2_HEIGHT + NORTH_MAP_CONNECTION ROUTE_2, PEWTER_CITY, -3, 2, PewterCityBlocks + SOUTH_MAP_CONNECTION ROUTE_2, VIRIDIAN_CITY, -3, 2, ViridianCityBlocks, 1 dw Route2Object ;Object Data Pointer diff --git a/data/mapHeaders/route20.asm b/data/mapHeaders/route20.asm index 4f96906f..f871179f 100755 --- a/data/mapHeaders/route20.asm +++ b/data/mapHeaders/route20.asm @@ -1,8 +1,8 @@ -Route20_h: ; 0x500f1 to 0x50113 (34 bytes) (id=31) +Route20_h: db OVERWORLD ; tileset db ROUTE_20_HEIGHT, ROUTE_20_WIDTH ; dimensions (y, x) dw Route20Blocks, Route20TextPointers, Route20Script ; blocks, texts, scripts db WEST | EAST ; connections - WEST_MAP_CONNECTION CINNABAR_ISLAND, CINNABAR_ISLAND_WIDTH, 0, 0, CINNABAR_ISLAND_HEIGHT, CinnabarIslandBlocks, ROUTE_20_WIDTH - EAST_MAP_CONNECTION ROUTE_19, ROUTE_19_WIDTH, -3, 15, ROUTE_19_HEIGHT - 15, Route19Blocks, ROUTE_20_WIDTH + WEST_MAP_CONNECTION ROUTE_20, CINNABAR_ISLAND, 0, 0, CinnabarIslandBlocks + EAST_MAP_CONNECTION ROUTE_20, ROUTE_19, -3, 15, Route19Blocks dw Route20Object ; objects diff --git a/data/mapHeaders/route21.asm b/data/mapHeaders/route21.asm index f3160814..a2c06868 100755 --- a/data/mapHeaders/route21.asm +++ b/data/mapHeaders/route21.asm @@ -1,8 +1,8 @@ -Route21_h: ; 0x54fff to 0x55021 (34 bytes) (id=32) +Route21_h: db OVERWORLD ; tileset db ROUTE_21_HEIGHT, ROUTE_21_WIDTH ; dimensions (y, x) dw Route21Blocks, Route21TextPointers, Route21Script ; blocks, texts, scripts db NORTH | SOUTH ; connections - NORTH_MAP_CONNECTION PALLET_TOWN, PALLET_TOWN_WIDTH, PALLET_TOWN_HEIGHT, 0, 0, PALLET_TOWN_WIDTH, PalletTownBlocks - SOUTH_MAP_CONNECTION CINNABAR_ISLAND, CINNABAR_ISLAND_WIDTH, 0, 0, CINNABAR_ISLAND_WIDTH, CinnabarIslandBlocks, ROUTE_21_WIDTH, ROUTE_21_HEIGHT + NORTH_MAP_CONNECTION ROUTE_21, PALLET_TOWN, 0, 0, PalletTownBlocks + SOUTH_MAP_CONNECTION ROUTE_21, CINNABAR_ISLAND, 0, 0, CinnabarIslandBlocks, 1 dw Route21Object ; objects diff --git a/data/mapHeaders/route22.asm b/data/mapHeaders/route22.asm index 566a5cbe..c227d433 100755 --- a/data/mapHeaders/route22.asm +++ b/data/mapHeaders/route22.asm @@ -1,8 +1,8 @@ -Route22_h: ; 0x50000 to 0x50022 (34 bytes) (id=33) +Route22_h: db OVERWORLD ; tileset db ROUTE_22_HEIGHT, ROUTE_22_WIDTH ; dimensions (y, x) dw Route22Blocks, Route22TextPointers, Route22Script ; blocks, texts, scripts db NORTH | EAST ; connections - NORTH_MAP_CONNECTION ROUTE_23, ROUTE_23_WIDTH, ROUTE_23_HEIGHT, 0, 0, ROUTE_23_WIDTH, Route23Blocks - EAST_MAP_CONNECTION VIRIDIAN_CITY, VIRIDIAN_CITY_WIDTH, -3, 1, VIRIDIAN_CITY_HEIGHT - 3, ViridianCityBlocks, ROUTE_22_WIDTH + NORTH_MAP_CONNECTION ROUTE_22, ROUTE_23, 0, 0, Route23Blocks + EAST_MAP_CONNECTION ROUTE_22, VIRIDIAN_CITY, -3, 1, ViridianCityBlocks, 1 dw Route22Object ; objects diff --git a/data/mapHeaders/route22gate.asm b/data/mapHeaders/route22gate.asm index 3daa30a3..7b8963ba 100755 --- a/data/mapHeaders/route22gate.asm +++ b/data/mapHeaders/route22gate.asm @@ -1,4 +1,4 @@ -Route22Gate_h: ; 0x1e677 to 0x1e683 (12 bytes) (bank=7) (id=193) +Route22Gate_h: db GATE ; tileset db ROUTE_22_GATE_HEIGHT, ROUTE_22_GATE_WIDTH ; dimensions (y, x) dw Route22GateBlocks, Route22GateTextPointers, Route22GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route23.asm b/data/mapHeaders/route23.asm index 2e469096..bec192c2 100755 --- a/data/mapHeaders/route23.asm +++ b/data/mapHeaders/route23.asm @@ -1,8 +1,8 @@ -Route23_h: ; 0x5033f to 0x50361 (34 bytes) (id=34) +Route23_h: db PLATEAU ; tileset db ROUTE_23_HEIGHT, ROUTE_23_WIDTH ; dimensions (y, x) dw Route23Blocks, Route23TextPointers, Route23Script ; blocks, texts, scripts db NORTH | SOUTH ; connections - NORTH_MAP_CONNECTION INDIGO_PLATEAU, INDIGO_PLATEAU_WIDTH, INDIGO_PLATEAU_HEIGHT, 0, 0, INDIGO_PLATEAU_WIDTH, IndigoPlateauBlocks - SOUTH_MAP_CONNECTION ROUTE_22, ROUTE_22_WIDTH, 0, 0, ROUTE_22_WIDTH - 7, Route22Blocks, ROUTE_23_WIDTH, ROUTE_23_HEIGHT + NORTH_MAP_CONNECTION ROUTE_23, INDIGO_PLATEAU, 0, 0, IndigoPlateauBlocks + SOUTH_MAP_CONNECTION ROUTE_23, ROUTE_22, 0, 0, Route22Blocks, 1 dw Route23Object ; objects diff --git a/data/mapHeaders/route24.asm b/data/mapHeaders/route24.asm index 3194be91..9a313aba 100755 --- a/data/mapHeaders/route24.asm +++ b/data/mapHeaders/route24.asm @@ -1,8 +1,8 @@ -Route24_h: ; 0x50682 to 0x506a4 (34 bytes) (id=35) +Route24_h: db OVERWORLD ; tileset db ROUTE_24_HEIGHT, ROUTE_24_WIDTH ; dimensions (y, x) dw Route24Blocks, Route24TextPointers, Route24Script ; blocks, texts, scripts db SOUTH | EAST ; connections - SOUTH_MAP_CONNECTION CERULEAN_CITY, CERULEAN_CITY_WIDTH, -3, 2, CERULEAN_CITY_WIDTH - 4, CeruleanCityBlocks, ROUTE_24_WIDTH, ROUTE_24_HEIGHT - EAST_MAP_CONNECTION ROUTE_25, ROUTE_25_WIDTH, 0, 0, ROUTE_25_HEIGHT, Route25Blocks, ROUTE_24_WIDTH + SOUTH_MAP_CONNECTION ROUTE_24, CERULEAN_CITY, -3, 2, CeruleanCityBlocks, 1 + EAST_MAP_CONNECTION ROUTE_24, ROUTE_25, 0, 0, Route25Blocks dw Route24Object ; objects diff --git a/data/mapHeaders/route25.asm b/data/mapHeaders/route25.asm index 2e86f6d5..39ffa45d 100755 --- a/data/mapHeaders/route25.asm +++ b/data/mapHeaders/route25.asm @@ -1,7 +1,7 @@ -Route25_h: ; 0x5079b to 0x507b2 (23 bytes) (id=36) +Route25_h: db OVERWORLD ; tileset db ROUTE_25_HEIGHT, ROUTE_25_WIDTH ; dimensions (y, x) dw Route25Blocks, Route25TextPointers, Route25Script ; blocks, texts, scripts db WEST ; connections - WEST_MAP_CONNECTION ROUTE_24, ROUTE_24_WIDTH, 0, 0, ROUTE_24_HEIGHT - 6, Route24Blocks, ROUTE_25_WIDTH + WEST_MAP_CONNECTION ROUTE_25, ROUTE_24, 0, 0, Route24Blocks dw Route25Object ; objects diff --git a/data/mapHeaders/route2gate.asm b/data/mapHeaders/route2gate.asm index 343c0f09..5cb7bcbc 100755 --- a/data/mapHeaders/route2gate.asm +++ b/data/mapHeaders/route2gate.asm @@ -1,4 +1,4 @@ -Route2Gate_h: ; 0x5d5c8 to 0x5d5d4 (12 bytes) (id=49) +Route2Gate_h: db GATE ; tileset db ROUTE_2_GATE_HEIGHT, ROUTE_2_GATE_WIDTH ; dimensions (y, x) dw Route2GateBlocks, Route2GateTextPointers, Route2GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route2house.asm b/data/mapHeaders/route2house.asm index f99a365d..c7c140f6 100755 --- a/data/mapHeaders/route2house.asm +++ b/data/mapHeaders/route2house.asm @@ -1,4 +1,4 @@ -Route2House_h: ; 0x1dee1 to 0x1deed (12 bytes) (bank=7) (id=48) +Route2House_h: db HOUSE ; tileset db ROUTE_2_HOUSE_HEIGHT, ROUTE_2_HOUSE_WIDTH ; dimensions (y, x) dw Route2HouseBlocks, Route2HouseTextPointers, Route2HouseScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route3.asm b/data/mapHeaders/route3.asm index 942e9e54..19adfea8 100755 --- a/data/mapHeaders/route3.asm +++ b/data/mapHeaders/route3.asm @@ -1,8 +1,8 @@ -Route3_h: ; 0x541e6 to 0x54208 (34 bytes) (id=14) +Route3_h: db OVERWORLD ; tileset db ROUTE_3_HEIGHT, ROUTE_3_WIDTH ; dimensions (y, x) dw Route3Blocks, Route3TextPointers, Route3Script ; blocks, texts, scripts db NORTH | WEST ; connections - NORTH_MAP_CONNECTION ROUTE_4, ROUTE_4_WIDTH, ROUTE_4_HEIGHT, 25, 0, ROUTE_4_WIDTH - 32, Route4Blocks - WEST_MAP_CONNECTION PEWTER_CITY, PEWTER_CITY_WIDTH, -3, 1, PEWTER_CITY_HEIGHT - 3, PewterCityBlocks, ROUTE_3_WIDTH + NORTH_MAP_CONNECTION ROUTE_3, ROUTE_4, 25, 0, Route4Blocks + WEST_MAP_CONNECTION ROUTE_3, PEWTER_CITY, -3, 1, PewterCityBlocks dw Route3Object ; objects diff --git a/data/mapHeaders/route4.asm b/data/mapHeaders/route4.asm index c2fe6379..a322f23c 100755 --- a/data/mapHeaders/route4.asm +++ b/data/mapHeaders/route4.asm @@ -1,8 +1,8 @@ -Route4_h: ; 0x54390 to 0x543b2 (34 bytes) (id=15) +Route4_h: db OVERWORLD ; tileset db ROUTE_4_HEIGHT, ROUTE_4_WIDTH ; dimensions (y, x) dw Route4Blocks, Route4TextPointers, Route4Script; blocks, texts, scripts db SOUTH | EAST ; connections - SOUTH_MAP_CONNECTION ROUTE_3, ROUTE_3_WIDTH, -3, 22, ROUTE_3_WIDTH - 22, Route3Blocks, ROUTE_4_WIDTH, ROUTE_4_HEIGHT - EAST_MAP_CONNECTION CERULEAN_CITY, CERULEAN_CITY_WIDTH, -3, 1, CERULEAN_CITY_HEIGHT - 3, CeruleanCityBlocks, ROUTE_4_WIDTH + SOUTH_MAP_CONNECTION ROUTE_4, ROUTE_3, -3, 22, Route3Blocks + EAST_MAP_CONNECTION ROUTE_4, CERULEAN_CITY, -3, 1, CeruleanCityBlocks, 1 dw Route4Object ; objects diff --git a/data/mapHeaders/route5.asm b/data/mapHeaders/route5.asm index 148eeb8d..b982c02d 100755 --- a/data/mapHeaders/route5.asm +++ b/data/mapHeaders/route5.asm @@ -1,8 +1,8 @@ -Route5_h: ; 0x54581 to 0x545a3 (34 bytes) (id=16) +Route5_h: db OVERWORLD ; tileset db ROUTE_5_HEIGHT, ROUTE_5_WIDTH ; dimensions (y, x) dw Route5Blocks, Route5TextPointers, Route5Script ; blocks, texts, scripts db NORTH | SOUTH ; connections - NORTH_MAP_CONNECTION CERULEAN_CITY, CERULEAN_CITY_WIDTH, CERULEAN_CITY_HEIGHT, -3, 2, CERULEAN_CITY_WIDTH - 4, CeruleanCityBlocks - SOUTH_MAP_CONNECTION SAFFRON_CITY, SAFFRON_CITY_WIDTH, -3, 2, SAFFRON_CITY_WIDTH - 4, SaffronCityBlocks, ROUTE_5_WIDTH, ROUTE_5_HEIGHT + NORTH_MAP_CONNECTION ROUTE_5, CERULEAN_CITY, -3, 2, CeruleanCityBlocks + SOUTH_MAP_CONNECTION ROUTE_5, SAFFRON_CITY, -3, 2, SaffronCityBlocks, 1 dw Route5Object ; objects diff --git a/data/mapHeaders/route5gate.asm b/data/mapHeaders/route5gate.asm index 79a44874..68810da1 100755 --- a/data/mapHeaders/route5gate.asm +++ b/data/mapHeaders/route5gate.asm @@ -1,4 +1,4 @@ -Route5Gate_h: ; 0x1df27 to 0x1df33 (12 bytes) (bank=7) (id=70) +Route5Gate_h: db GATE ; tileset db ROUTE_5_GATE_HEIGHT, ROUTE_5_GATE_WIDTH ; dimensions (y, x) dw Route5GateBlocks, Route5GateTextPointers, Route5GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route6.asm b/data/mapHeaders/route6.asm index b6f5fe70..6ed13d4e 100755 --- a/data/mapHeaders/route6.asm +++ b/data/mapHeaders/route6.asm @@ -1,8 +1,8 @@ -Route6_h: ; 0x58000 to 0x58022 (34 bytes) (id=17) +Route6_h: db OVERWORLD ; tileset db ROUTE_6_HEIGHT, ROUTE_6_WIDTH ; dimensions (y, x) dw Route6Blocks, Route6TextPointers, Route6Script ; blocks, texts, scripts db NORTH | SOUTH ; connections - NORTH_MAP_CONNECTION SAFFRON_CITY, SAFFRON_CITY_WIDTH, SAFFRON_CITY_HEIGHT, -3, 2, SAFFRON_CITY_WIDTH - 4, SaffronCityBlocks - SOUTH_MAP_CONNECTION VERMILION_CITY, VERMILION_CITY_WIDTH, -3, 2, VERMILION_CITY_WIDTH - 4, VermilionCityBlocks, ROUTE_6_WIDTH, ROUTE_6_HEIGHT + NORTH_MAP_CONNECTION ROUTE_6, SAFFRON_CITY, -3, 2, SaffronCityBlocks + SOUTH_MAP_CONNECTION ROUTE_6, VERMILION_CITY, -3, 2, VermilionCityBlocks, 1 dw Route6Object ; objects diff --git a/data/mapHeaders/route6gate.asm b/data/mapHeaders/route6gate.asm index 3bafb448..f689240c 100755 --- a/data/mapHeaders/route6gate.asm +++ b/data/mapHeaders/route6gate.asm @@ -1,4 +1,4 @@ -Route6Gate_h: ; 0x1e031 to 0x1e03d (12 bytes) (bank=7) (id=73) +Route6Gate_h: db GATE ; tileset db ROUTE_6_GATE_HEIGHT, ROUTE_6_GATE_WIDTH ; dimensions (y, x) dw Route6GateBlocks, Route6GateTextPointers, Route6GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route7.asm b/data/mapHeaders/route7.asm index b90004e6..62f3bedf 100755 --- a/data/mapHeaders/route7.asm +++ b/data/mapHeaders/route7.asm @@ -1,8 +1,8 @@ -Route7_h: ; 0x48000 to 0x48022 (34 bytes) (bank=12) (id=18) +Route7_h: db OVERWORLD ; tileset db ROUTE_7_HEIGHT, ROUTE_7_WIDTH ; dimensions (y, x) dw Route7Blocks, Route7TextPointers, Route7Script ; blocks, texts, scripts db WEST | EAST ; connections - WEST_MAP_CONNECTION CELADON_CITY, CELADON_CITY_WIDTH, -3, 1, CELADON_CITY_HEIGHT - 3, CeladonCityBlocks, ROUTE_7_WIDTH - EAST_MAP_CONNECTION SAFFRON_CITY, SAFFRON_CITY_WIDTH, -3, 1, SAFFRON_CITY_HEIGHT - 3, SaffronCityBlocks, ROUTE_7_WIDTH + WEST_MAP_CONNECTION ROUTE_7, CELADON_CITY, -3, 1, CeladonCityBlocks + EAST_MAP_CONNECTION ROUTE_7, SAFFRON_CITY, -3, 1, SaffronCityBlocks, 1 dw Route7Object ; objects diff --git a/data/mapHeaders/route7gate.asm b/data/mapHeaders/route7gate.asm index b5d26672..9e01914f 100755 --- a/data/mapHeaders/route7gate.asm +++ b/data/mapHeaders/route7gate.asm @@ -1,4 +1,4 @@ -Route7Gate_h: ; 0x1e0f4 to 0x1e100 (12 bytes) (bank=7) (id=76) +Route7Gate_h: db GATE ; tileset db ROUTE_7_GATE_HEIGHT, ROUTE_7_GATE_WIDTH ; dimensions (y, x) dw Route7GateBlocks, Route7GateTextPointers, Route7GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route8.asm b/data/mapHeaders/route8.asm index dd9a717b..5187fd8f 100755 --- a/data/mapHeaders/route8.asm +++ b/data/mapHeaders/route8.asm @@ -1,8 +1,8 @@ -Route8_h: ; 0x5812d to 0x5814f (34 bytes) (id=19) +Route8_h: db OVERWORLD ; tileset db ROUTE_8_HEIGHT, ROUTE_8_WIDTH ; dimensions (y, x) dw Route8Blocks, Route8TextPointers, Route8Script ; blocks, texts, scripts db WEST | EAST ; connections - WEST_MAP_CONNECTION SAFFRON_CITY, SAFFRON_CITY_WIDTH, -3, 1, SAFFRON_CITY_HEIGHT - 3, SaffronCityBlocks, ROUTE_8_WIDTH - EAST_MAP_CONNECTION LAVENDER_TOWN, LAVENDER_TOWN_WIDTH, 0, 0, LAVENDER_TOWN_HEIGHT, LavenderTownBlocks, ROUTE_8_WIDTH + WEST_MAP_CONNECTION ROUTE_8, SAFFRON_CITY, -3, 1, SaffronCityBlocks + EAST_MAP_CONNECTION ROUTE_8, LAVENDER_TOWN, 0, 0, LavenderTownBlocks dw Route8Object ; objects diff --git a/data/mapHeaders/route8gate.asm b/data/mapHeaders/route8gate.asm index 2bd505a2..d206e978 100755 --- a/data/mapHeaders/route8gate.asm +++ b/data/mapHeaders/route8gate.asm @@ -1,4 +1,4 @@ -Route8Gate_h: ; 0x1e1bb to 0x1e1c7 (12 bytes) (bank=7) (id=79) +Route8Gate_h: db GATE ; tileset db ROUTE_8_GATE_HEIGHT, ROUTE_8_GATE_WIDTH ; dimensions (y, x) dw Route8GateBlocks, Route8GateTextPointers, Route8GateScript ; blocks, texts, scripts diff --git a/data/mapHeaders/route9.asm b/data/mapHeaders/route9.asm index f6cbd9af..044a4ec0 100755 --- a/data/mapHeaders/route9.asm +++ b/data/mapHeaders/route9.asm @@ -1,8 +1,8 @@ -Route9_h: ; 0x54686 to 0x546a8 (34 bytes) (id=20) +Route9_h: db OVERWORLD ; tileset db ROUTE_9_HEIGHT, ROUTE_9_WIDTH ; dimensions (y, x) dw Route9Blocks, Route9TextPointers, Route9Script ; blocks, texts, scripts db WEST | EAST ; connections - WEST_MAP_CONNECTION CERULEAN_CITY, CERULEAN_CITY_WIDTH, -3, 1, CERULEAN_CITY_HEIGHT - 3, CeruleanCityBlocks, ROUTE_9_WIDTH - EAST_MAP_CONNECTION ROUTE_10, ROUTE_10_WIDTH, 0, 0, ROUTE_10_HEIGHT - 24, Route10Blocks, ROUTE_9_WIDTH + WEST_MAP_CONNECTION ROUTE_9, CERULEAN_CITY, -3, 1, CeruleanCityBlocks + EAST_MAP_CONNECTION ROUTE_9, ROUTE_10, 0, 0, Route10Blocks, 1 dw Route9Object ; objects diff --git a/data/mapHeaders/safarizonecenter.asm b/data/mapHeaders/safarizonecenter.asm index a1388fa1..6da27c12 100755 --- a/data/mapHeaders/safarizonecenter.asm +++ b/data/mapHeaders/safarizonecenter.asm @@ -1,4 +1,4 @@ -SafariZoneCenter_h: ; 0x45ba6 to 0x45bb2 (12 bytes) (bank=11) (id=220) +SafariZoneCenter_h: db FOREST ; tileset db SAFARI_ZONE_CENTER_HEIGHT, SAFARI_ZONE_CENTER_WIDTH ; dimensions (y, x) dw SafariZoneCenterBlocks, SafariZoneCenterTextPointers, SafariZoneCenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/safarizoneeast.asm b/data/mapHeaders/safarizoneeast.asm index dec95d2a..089620dc 100755 --- a/data/mapHeaders/safarizoneeast.asm +++ b/data/mapHeaders/safarizoneeast.asm @@ -1,4 +1,4 @@ -SafariZoneEast_h: ; 0x4585f to 0x4586b (12 bytes) (bank=11) (id=217) +SafariZoneEast_h: db FOREST ; tileset db SAFARI_ZONE_EAST_HEIGHT, SAFARI_ZONE_EAST_WIDTH ; dimensions (y, x) dw SafariZoneEastBlocks, SafariZoneEastTextPointers, SafariZoneEastScript ; blocks, texts, scripts diff --git a/data/mapHeaders/safarizoneentrance.asm b/data/mapHeaders/safarizoneentrance.asm index e7340c4a..1122d5a3 100755 --- a/data/mapHeaders/safarizoneentrance.asm +++ b/data/mapHeaders/safarizoneentrance.asm @@ -1,4 +1,4 @@ -SafariZoneEntrance_h: ; 0x751c1 to 0x751cd (12 bytes) (id=156) +SafariZoneEntrance_h: db GATE ; tileset db SAFARI_ZONE_ENTRANCE_HEIGHT, SAFARI_ZONE_ENTRANCE_WIDTH ; dimensions (y, x) dw SafariZoneEntranceBlocks, SafariZoneEntranceTextPointers, SafariZoneEntranceScript ; blocks, texts, scripts diff --git a/data/mapHeaders/safarizonenorth.asm b/data/mapHeaders/safarizonenorth.asm index 310ead4c..a3a46769 100755 --- a/data/mapHeaders/safarizonenorth.asm +++ b/data/mapHeaders/safarizonenorth.asm @@ -1,4 +1,4 @@ -SafariZoneNorth_h: ; 0x4599f to 0x459ab (12 bytes) (bank=11) (id=218) +SafariZoneNorth_h: db FOREST ; tileset db SAFARI_ZONE_NORTH_HEIGHT, SAFARI_ZONE_NORTH_WIDTH ; dimensions (y, x) dw SafariZoneNorthBlocks, SafariZoneNorthTextPointers, SafariZoneNorthScript ; blocks, texts, scripts diff --git a/data/mapHeaders/safarizoneresthouse1.asm b/data/mapHeaders/safarizoneresthouse1.asm index f788b6c4..b2988b47 100755 --- a/data/mapHeaders/safarizoneresthouse1.asm +++ b/data/mapHeaders/safarizoneresthouse1.asm @@ -1,4 +1,4 @@ -SafariZoneRestHouse1_h: ; 0x45ce1 to 0x45ced (12 bytes) (bank=11) (id=221) +SafariZoneRestHouse1_h: db GATE ; tileset db SAFARI_ZONE_REST_HOUSE_1_HEIGHT, SAFARI_ZONE_REST_HOUSE_1_WIDTH ; dimensions (y, x) dw SafariZoneRestHouse1Blocks, SafariZoneRestHouse1TextPointers, SafariZoneRestHouse1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/safarizoneresthouse2.asm b/data/mapHeaders/safarizoneresthouse2.asm index 5ccdb947..589d9850 100755 --- a/data/mapHeaders/safarizoneresthouse2.asm +++ b/data/mapHeaders/safarizoneresthouse2.asm @@ -1,4 +1,4 @@ -SafariZoneRestHouse2_h: ; 0x45d1e to 0x45d2a (12 bytes) (bank=11) (id=223) +SafariZoneRestHouse2_h: db GATE ; tileset db SAFARI_ZONE_REST_HOUSE_2_HEIGHT, SAFARI_ZONE_REST_HOUSE_2_WIDTH ; dimensions (y, x) dw SafariZoneRestHouse2Blocks, SafariZoneRestHouse2TextPointers, SafariZoneRestHouse2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/safarizoneresthouse3.asm b/data/mapHeaders/safarizoneresthouse3.asm index acf87854..21ffd3b6 100755 --- a/data/mapHeaders/safarizoneresthouse3.asm +++ b/data/mapHeaders/safarizoneresthouse3.asm @@ -1,4 +1,4 @@ -SafariZoneRestHouse3_h: ; 0x45d69 to 0x45d75 (12 bytes) (bank=11) (id=224) +SafariZoneRestHouse3_h: db GATE ; tileset db SAFARI_ZONE_REST_HOUSE_3_HEIGHT, SAFARI_ZONE_REST_HOUSE_3_WIDTH ; dimensions (y, x) dw SafariZoneRestHouse3Blocks, SafariZoneRestHouse3TextPointers, SafariZoneRestHouse3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/safarizoneresthouse4.asm b/data/mapHeaders/safarizoneresthouse4.asm index 8a1ad30f..fa7de7ad 100755 --- a/data/mapHeaders/safarizoneresthouse4.asm +++ b/data/mapHeaders/safarizoneresthouse4.asm @@ -1,4 +1,4 @@ -SafariZoneRestHouse4_h: ; 0x45db4 to 0x45dc0 (12 bytes) (bank=11) (id=225) +SafariZoneRestHouse4_h: db GATE ; tileset db SAFARI_ZONE_REST_HOUSE_4_HEIGHT, SAFARI_ZONE_REST_HOUSE_4_WIDTH ; dimensions (y, x) dw SafariZoneRestHouse4Blocks, SafariZoneRestHouse4TextPointers, SafariZoneRestHouse4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/safarizonesecrethouse.asm b/data/mapHeaders/safarizonesecrethouse.asm index 7fa71fe4..6b081b1a 100755 --- a/data/mapHeaders/safarizonesecrethouse.asm +++ b/data/mapHeaders/safarizonesecrethouse.asm @@ -1,4 +1,4 @@ -SafariZoneSecretHouse_h: ; 0x4a30b to 0x4a317 (12 bytes) (id=222) +SafariZoneSecretHouse_h: db LAB ; tileset db SAFARI_ZONE_SECRET_HOUSE_HEIGHT, SAFARI_ZONE_SECRET_HOUSE_WIDTH ; dimensions (y, x) dw SafariZoneSecretHouseBlocks, SafariZoneSecretHouseTextPointers, SafariZoneSecretHouseScript ; blocks, texts, scripts diff --git a/data/mapHeaders/safarizonewest.asm b/data/mapHeaders/safarizonewest.asm index 590ae21d..c1c54d13 100755 --- a/data/mapHeaders/safarizonewest.asm +++ b/data/mapHeaders/safarizonewest.asm @@ -1,4 +1,4 @@ -SafariZoneWest_h: ; 0x4a1a9 to 0x4a1b5 (12 bytes) (id=219) +SafariZoneWest_h: db FOREST ; tileset db SAFARI_ZONE_WEST_HEIGHT, SAFARI_ZONE_WEST_WIDTH ; dimensions (y, x) dw SafariZoneWestBlocks, SafariZoneWestTextPointers, SafariZoneWestScript ; blocks, texts, scripts diff --git a/data/mapHeaders/saffroncity.asm b/data/mapHeaders/saffroncity.asm index 4c1d2d61..8f4ea922 100755 --- a/data/mapHeaders/saffroncity.asm +++ b/data/mapHeaders/saffroncity.asm @@ -1,10 +1,10 @@ -SaffronCity_h: ; 0x509a4 to 0x509dc (56 bytes) (id=10) +SaffronCity_h: db OVERWORLD ; tileset db SAFFRON_CITY_HEIGHT, SAFFRON_CITY_WIDTH ; dimensions (y, x) dw SaffronCityBlocks, SaffronCityTextPointers, SaffronCityScript ; blocks, texts, scripts db NORTH | SOUTH | WEST | EAST ; connections - NORTH_MAP_CONNECTION ROUTE_5, ROUTE_5_WIDTH, ROUTE_5_HEIGHT, 5, 0, ROUTE_5_WIDTH, Route5Blocks - SOUTH_MAP_CONNECTION ROUTE_6, ROUTE_6_WIDTH, 5, 0, ROUTE_6_WIDTH, Route6Blocks, SAFFRON_CITY_WIDTH, SAFFRON_CITY_HEIGHT - WEST_MAP_CONNECTION ROUTE_7, ROUTE_7_WIDTH, 4, 0, ROUTE_7_HEIGHT, Route7Blocks, SAFFRON_CITY_WIDTH - EAST_MAP_CONNECTION ROUTE_8, ROUTE_8_WIDTH, 4, 0, ROUTE_8_HEIGHT, Route8Blocks, SAFFRON_CITY_WIDTH + NORTH_MAP_CONNECTION SAFFRON_CITY, ROUTE_5, 5, 0, Route5Blocks + SOUTH_MAP_CONNECTION SAFFRON_CITY, ROUTE_6, 5, 0, Route6Blocks, 1 + WEST_MAP_CONNECTION SAFFRON_CITY, ROUTE_7, 4, 0, Route7Blocks + EAST_MAP_CONNECTION SAFFRON_CITY, ROUTE_8, 4, 0, Route8Blocks dw SaffronCityObject ; objects diff --git a/data/mapHeaders/saffrongym.asm b/data/mapHeaders/saffrongym.asm index 23601c75..da3b4c04 100755 --- a/data/mapHeaders/saffrongym.asm +++ b/data/mapHeaders/saffrongym.asm @@ -1,4 +1,4 @@ -SaffronGym_h: ; 0x5d001 to 0x5d00d (12 bytes) (id=178) +SaffronGym_h: db FACILITY ; tileset db SAFFRON_GYM_HEIGHT, SAFFRON_GYM_WIDTH ; dimensions (y, x) dw SaffronGymBlocks, SaffronGymTextPointers, SaffronGymScript ; blocks, texts, scripts diff --git a/data/mapHeaders/saffronhouse1.asm b/data/mapHeaders/saffronhouse1.asm index 71cd5395..9e22b03b 100755 --- a/data/mapHeaders/saffronhouse1.asm +++ b/data/mapHeaders/saffronhouse1.asm @@ -1,4 +1,4 @@ -SaffronHouse1_h: ; 0x1ddd1 to 0x1dddd (12 bytes) (bank=7) (id=179) +SaffronHouse1_h: db HOUSE ; tileset db SAFFRON_HOUSE_1_HEIGHT, SAFFRON_HOUSE_1_WIDTH ; dimensions (y, x) dw SaffronHouse1Blocks, SaffronHouse1TextPointers, SaffronHouse1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/saffronhouse2.asm b/data/mapHeaders/saffronhouse2.asm index a91bcaec..c38d0231 100755 --- a/data/mapHeaders/saffronhouse2.asm +++ b/data/mapHeaders/saffronhouse2.asm @@ -1,4 +1,4 @@ -SaffronHouse2_h: ; 0x1de30 to 0x1de3c (12 bytes) (bank=7) (id=183) +SaffronHouse2_h: db HOUSE ; tileset db SAFFRON_HOUSE_2_HEIGHT, SAFFRON_HOUSE_2_WIDTH ; dimensions (y, x) dw SaffronHouse2Blocks, SaffronHouse2TextPointers, SaffronHouse2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/saffronmart.asm b/data/mapHeaders/saffronmart.asm index 0c6fc1d8..747e4da9 100755 --- a/data/mapHeaders/saffronmart.asm +++ b/data/mapHeaders/saffronmart.asm @@ -1,4 +1,4 @@ -SaffronMart_h: ; 0x5d3fd to 0x5d409 (12 bytes) (id=180) +SaffronMart_h: db MART ; tileset db SAFFRON_MART_HEIGHT, SAFFRON_MART_WIDTH ; dimensions (y, x) dw SaffronMartBlocks, SaffronMartTextPointers, SaffronMartScript ; blocks, texts, scripts diff --git a/data/mapHeaders/saffronpokecenter.asm b/data/mapHeaders/saffronpokecenter.asm index 341b415a..aa972289 100755 --- a/data/mapHeaders/saffronpokecenter.asm +++ b/data/mapHeaders/saffronpokecenter.asm @@ -1,4 +1,4 @@ -SaffronPokecenter_h: ; 0x5d529 to 0x5d535 (12 bytes) (id=182) +SaffronPokecenter_h: db POKECENTER ; tileset db SAFFRON_POKECENTER_HEIGHT, SAFFRON_POKECENTER_WIDTH ; dimensions (y, x) dw SaffronPokecenterBlocks, SaffronPokecenterTextPointers, SaffronPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/school.asm b/data/mapHeaders/school.asm index 336ce26e..8ace4fba 100755 --- a/data/mapHeaders/school.asm +++ b/data/mapHeaders/school.asm @@ -1,4 +1,4 @@ -School_h: ; 0x1d540 to 0x1d54c (12 bytes) (bank=7) (id=43) +School_h: db HOUSE ; tileset db VIRIDIAN_SCHOOL_HEIGHT, VIRIDIAN_SCHOOL_WIDTH ; dimensions (y, x) dw SchoolBlocks, SchoolTextPointers, SchoolScript ; blocks, texts, scripts diff --git a/data/mapHeaders/seafoamislands1.asm b/data/mapHeaders/seafoamislands1.asm index 8cb1c847..f52a65a8 100755 --- a/data/mapHeaders/seafoamislands1.asm +++ b/data/mapHeaders/seafoamislands1.asm @@ -1,4 +1,4 @@ -SeafoamIslands1_h: ; 0x447dd to 0x447e9 (12 bytes) (bank=11) (id=192) +SeafoamIslands1_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_1_HEIGHT, SEAFOAM_ISLANDS_1_WIDTH ; dimensions (y, x) dw SeafoamIslands1Blocks, SeafoamIslands1TextPointers, SeafoamIslands1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/seafoamislands2.asm b/data/mapHeaders/seafoamislands2.asm index 9edbcc72..08ec4bfa 100755 --- a/data/mapHeaders/seafoamislands2.asm +++ b/data/mapHeaders/seafoamislands2.asm @@ -1,4 +1,4 @@ -SeafoamIslands2_h: ; 0x46309 to 0x46315 (12 bytes) (bank=11) (id=159) +SeafoamIslands2_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_2_HEIGHT, SEAFOAM_ISLANDS_2_WIDTH ; dimensions (y, x) dw SeafoamIslands2Blocks, SeafoamIslands2TextPointers, SeafoamIslands2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/seafoamislands3.asm b/data/mapHeaders/seafoamislands3.asm index 6ff1d8ff..4050cd71 100755 --- a/data/mapHeaders/seafoamislands3.asm +++ b/data/mapHeaders/seafoamislands3.asm @@ -1,4 +1,4 @@ -SeafoamIslands3_h: ; 0x46445 to 0x46451 (12 bytes) (bank=11) (id=160) +SeafoamIslands3_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_3_HEIGHT, SEAFOAM_ISLANDS_3_WIDTH ; dimensions (y, x) dw SeafoamIslands3Blocks, SeafoamIslands3TextPointers, SeafoamIslands3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/seafoamislands4.asm b/data/mapHeaders/seafoamislands4.asm index d3b6fca0..d3912ce0 100755 --- a/data/mapHeaders/seafoamislands4.asm +++ b/data/mapHeaders/seafoamislands4.asm @@ -1,4 +1,4 @@ -SeafoamIslands4_h: ; 0x46581 to 0x4658d (12 bytes) (bank=11) (id=161) +SeafoamIslands4_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_4_HEIGHT, SEAFOAM_ISLANDS_4_WIDTH ; dimensions (y, x) dw SeafoamIslands4Blocks, SeafoamIslands4TextPointers, SeafoamIslands4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/seafoamislands5.asm b/data/mapHeaders/seafoamislands5.asm index 330b1d0e..2ae6d4b7 100755 --- a/data/mapHeaders/seafoamislands5.asm +++ b/data/mapHeaders/seafoamislands5.asm @@ -1,4 +1,4 @@ -SeafoamIslands5_h: ; 0x4678d to 0x46799 (12 bytes) (bank=11) (id=162) +SeafoamIslands5_h: db CAVERN ; tileset db SEAFOAM_ISLANDS_5_HEIGHT, SEAFOAM_ISLANDS_5_WIDTH ; dimensions (y, x) dw SeafoamIslands5Blocks, SeafoamIslands5TextPointers, SeafoamIslands5Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco1.asm b/data/mapHeaders/silphco1.asm index eecb49b6..203f08b7 100755 --- a/data/mapHeaders/silphco1.asm +++ b/data/mapHeaders/silphco1.asm @@ -1,4 +1,4 @@ -SilphCo1_h: ; 0x5d442 to 0x5d44e (12 bytes) (id=181) +SilphCo1_h: db FACILITY ; tileset db SILPH_CO_1F_HEIGHT, SILPH_CO_1F_WIDTH ; dimensions (y, x) dw SilphCo1Blocks, SilphCo1TextPointers, SilphCo1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco10.asm b/data/mapHeaders/silphco10.asm index efef2235..a16a6323 100755 --- a/data/mapHeaders/silphco10.asm +++ b/data/mapHeaders/silphco10.asm @@ -1,4 +1,4 @@ -SilphCo10_h: ; 0x5a12d to 0x5a139 (12 bytes) (id=234) +SilphCo10_h: db FACILITY ; tileset db SILPH_CO_10F_HEIGHT, SILPH_CO_10F_WIDTH ; dimensions (y, x) dw SilphCo10Blocks, SilphCo10TextPointers, SilphCo10Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco11.asm b/data/mapHeaders/silphco11.asm index 829fc9de..a5d2f1b0 100755 --- a/data/mapHeaders/silphco11.asm +++ b/data/mapHeaders/silphco11.asm @@ -1,4 +1,4 @@ -SilphCo11_h: ; 0x620ee to 0x620fa (12 bytes) (id=235) +SilphCo11_h: db INTERIOR ; tileset db SILPH_CO_11F_HEIGHT, SILPH_CO_11F_WIDTH ; dimensions (y, x) dw SilphCo11Blocks, SilphCo11TextPointers, SilphCo11Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco2.asm b/data/mapHeaders/silphco2.asm index 1f345127..f0783e98 100755 --- a/data/mapHeaders/silphco2.asm +++ b/data/mapHeaders/silphco2.asm @@ -1,4 +1,4 @@ -SilphCo2_h: ; 0x59ce5 to 0x59cf1 (12 bytes) (id=207) +SilphCo2_h: db FACILITY ; tileset db SILPH_CO_2F_HEIGHT, SILPH_CO_2F_WIDTH ; dimensions (y, x) dw SilphCo2Blocks, SilphCo2TextPointers, SilphCo2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco3.asm b/data/mapHeaders/silphco3.asm index 56119f41..b89a3802 100755 --- a/data/mapHeaders/silphco3.asm +++ b/data/mapHeaders/silphco3.asm @@ -1,4 +1,4 @@ -SilphCo3_h: ; 0x59f4f to 0x59f5b (12 bytes) (id=208) +SilphCo3_h: db FACILITY ; tileset db SILPH_CO_3F_HEIGHT, SILPH_CO_3F_WIDTH ; dimensions (y, x) dw SilphCo3Blocks, SilphCo3TextPointers, SilphCo3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco4.asm b/data/mapHeaders/silphco4.asm index 3d6289cf..3c03a771 100755 --- a/data/mapHeaders/silphco4.asm +++ b/data/mapHeaders/silphco4.asm @@ -1,4 +1,4 @@ -SilphCo4_h: ; 0x19cff to 0x19d0b (12 bytes) (bank=6) (id=209) +SilphCo4_h: db FACILITY ; tileset db SILPH_CO_4F_HEIGHT, SILPH_CO_4F_WIDTH ; dimensions (y, x) dw SilphCo4Blocks, SilphCo4TextPointers, SilphCo4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco5.asm b/data/mapHeaders/silphco5.asm index aa40ca2f..42704025 100755 --- a/data/mapHeaders/silphco5.asm +++ b/data/mapHeaders/silphco5.asm @@ -1,4 +1,4 @@ -SilphCo5_h: ; 0x19f2b to 0x19f37 (12 bytes) (bank=6) (id=210) +SilphCo5_h: db FACILITY ; tileset db SILPH_CO_5F_HEIGHT, SILPH_CO_5F_WIDTH ; dimensions (y, x) dw SilphCo5Blocks, SilphCo5TextPointers, SilphCo5Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco6.asm b/data/mapHeaders/silphco6.asm index af9b3d6b..c204360a 100755 --- a/data/mapHeaders/silphco6.asm +++ b/data/mapHeaders/silphco6.asm @@ -1,4 +1,4 @@ -SilphCo6_h: ; 0x1a19d to 0x1a1a9 (12 bytes) (bank=6) (id=211) +SilphCo6_h: db FACILITY ; tileset db SILPH_CO_6F_HEIGHT, SILPH_CO_6F_WIDTH ; dimensions (y, x) dw SilphCo6Blocks, SilphCo6TextPointers, SilphCo6Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco7.asm b/data/mapHeaders/silphco7.asm index 335d3b6b..bc31b335 100755 --- a/data/mapHeaders/silphco7.asm +++ b/data/mapHeaders/silphco7.asm @@ -1,4 +1,4 @@ -SilphCo7_h: ; 0x51b55 to 0x51b61 (12 bytes) (id=212) +SilphCo7_h: db FACILITY ; tileset db SILPH_CO_7F_HEIGHT, SILPH_CO_7F_WIDTH ; dimensions (y, x) dw SilphCo7Blocks, SilphCo7TextPointers, SilphCo7Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco8.asm b/data/mapHeaders/silphco8.asm index 31c9617c..aa3e0317 100755 --- a/data/mapHeaders/silphco8.asm +++ b/data/mapHeaders/silphco8.asm @@ -1,4 +1,4 @@ -SilphCo8_h: ; 0x564f8 to 0x56504 (12 bytes) (id=213) +SilphCo8_h: db FACILITY ; tileset db SILPH_CO_8F_HEIGHT, SILPH_CO_8F_WIDTH ; dimensions (y, x) dw SilphCo8Blocks, SilphCo8TextPointers, SilphCo8Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphco9.asm b/data/mapHeaders/silphco9.asm index 1cc8b3f2..97427fa3 100755 --- a/data/mapHeaders/silphco9.asm +++ b/data/mapHeaders/silphco9.asm @@ -1,4 +1,4 @@ -SilphCo9_h: ; 0x5d7af to 0x5d7bb (12 bytes) (id=233) +SilphCo9_h: db FACILITY ; tileset db SILPH_CO_9F_HEIGHT, SILPH_CO_9F_WIDTH ; dimensions (y, x) dw SilphCo9Blocks, SilphCo9TextPointers, SilphCo9Script ; blocks, texts, scripts diff --git a/data/mapHeaders/silphcoelevator.asm b/data/mapHeaders/silphcoelevator.asm index b8a59b7a..8a6ae1ca 100755 --- a/data/mapHeaders/silphcoelevator.asm +++ b/data/mapHeaders/silphcoelevator.asm @@ -1,4 +1,4 @@ -SilphCoElevator_h: ; 0x457b4 to 0x457c0 (12 bytes) (bank=11) (id=236) +SilphCoElevator_h: db LOBBY ; tileset db SILPH_CO_ELEVATOR_HEIGHT, SILPH_CO_ELEVATOR_WIDTH ; dimensions (y, x) dw SilphCoElevatorBlocks, SilphCoElevatorTextPointers, SilphCoElevatorScript ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne1.asm b/data/mapHeaders/ssanne1.asm index c31de5d4..e6b48564 100755 --- a/data/mapHeaders/ssanne1.asm +++ b/data/mapHeaders/ssanne1.asm @@ -1,4 +1,4 @@ -SSAnne1_h: ; 0x61259 to 0x61265 (12 bytes) (id=95) +SSAnne1_h: db SHIP ; tileset db SS_ANNE_1_HEIGHT, SS_ANNE_1_WIDTH ; dimensions (y, x) dw SSAnne1Blocks, SSAnne1TextPointers, SSAnne1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne10.asm b/data/mapHeaders/ssanne10.asm index e0e5c6a7..ef07424b 100755 --- a/data/mapHeaders/ssanne10.asm +++ b/data/mapHeaders/ssanne10.asm @@ -1,4 +1,4 @@ -SSAnne10_h: ; 0x61d49 to 0x61d55 (12 bytes) (id=104) +SSAnne10_h: db SHIP ; tileset db SS_ANNE_10_HEIGHT, SS_ANNE_10_WIDTH ; dimensions (y, x) dw SSAnne10Blocks, SSAnne10TextPointers, SSAnne10Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne2.asm b/data/mapHeaders/ssanne2.asm index 50ca0562..cd5f3aa4 100755 --- a/data/mapHeaders/ssanne2.asm +++ b/data/mapHeaders/ssanne2.asm @@ -1,4 +1,4 @@ -SSAnne2_h: ; 0x61393 to 0x6139f (12 bytes) (id=96) +SSAnne2_h: db SHIP ; tileset db SS_ANNE_2_HEIGHT, SS_ANNE_2_WIDTH ; dimensions (y, x) dw SSAnne2Blocks, SSAnne2TextPointers, SSAnne2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne3.asm b/data/mapHeaders/ssanne3.asm index acde90a2..ffa57ddd 100755 --- a/data/mapHeaders/ssanne3.asm +++ b/data/mapHeaders/ssanne3.asm @@ -1,4 +1,4 @@ -SSAnne3_h: ; 0x44926 to 0x44932 (12 bytes) (bank=11) (id=97) +SSAnne3_h: db SHIP ; tileset db SS_ANNE_3_HEIGHT, SS_ANNE_3_WIDTH ; dimensions (y, x) dw SSAnne3Blocks, SSAnne3TextPointers, SSAnne3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne4.asm b/data/mapHeaders/ssanne4.asm index 7f3e9ab2..492b4b8d 100755 --- a/data/mapHeaders/ssanne4.asm +++ b/data/mapHeaders/ssanne4.asm @@ -1,4 +1,4 @@ -SSAnne4_h: ; 0x61622 to 0x6162e (12 bytes) (id=98) +SSAnne4_h: db SHIP ; tileset db SS_ANNE_4_HEIGHT, SS_ANNE_4_WIDTH ; dimensions (y, x) dw SSAnne4Blocks, SSAnne4TextPointers, SSAnne4Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne5.asm b/data/mapHeaders/ssanne5.asm index 7da4a6bf..29ffb6b9 100755 --- a/data/mapHeaders/ssanne5.asm +++ b/data/mapHeaders/ssanne5.asm @@ -1,4 +1,4 @@ -SSAnne5_h: ; 0x616a2 to 0x616ae (12 bytes) (id=99) +SSAnne5_h: db SHIP ; tileset db SS_ANNE_5_HEIGHT, SS_ANNE_5_WIDTH ; dimensions (y, x) dw SSAnne5Blocks, SSAnne5TextPointers, SSAnne5Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne6.asm b/data/mapHeaders/ssanne6.asm index 6d27509e..e347528a 100755 --- a/data/mapHeaders/ssanne6.asm +++ b/data/mapHeaders/ssanne6.asm @@ -1,4 +1,4 @@ -SSAnne6_h: ; 0x617a7 to 0x617b3 (12 bytes) (id=100) +SSAnne6_h: db SHIP ; tileset db SS_ANNE_6_HEIGHT, SS_ANNE_6_WIDTH ; dimensions (y, x) dw SSAnne6Blocks, SSAnne6TextPointers, SSAnne6Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne7.asm b/data/mapHeaders/ssanne7.asm index 66da59c0..9b437688 100755 --- a/data/mapHeaders/ssanne7.asm +++ b/data/mapHeaders/ssanne7.asm @@ -1,4 +1,4 @@ -SSAnne7_h: ; 0x61889 to 0x61895 (12 bytes) (id=101) +SSAnne7_h: db SHIP ; tileset db SS_ANNE_7_HEIGHT, SS_ANNE_7_WIDTH ; dimensions (y, x) dw SSAnne7Blocks, SSAnne7TextPointers, SSAnne7Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne8.asm b/data/mapHeaders/ssanne8.asm index dcb12993..64b5c565 100755 --- a/data/mapHeaders/ssanne8.asm +++ b/data/mapHeaders/ssanne8.asm @@ -1,4 +1,4 @@ -SSAnne8_h: ; 0x6196a to 0x61976 (12 bytes) (id=102) +SSAnne8_h: db SHIP ; tileset db SS_ANNE_8_HEIGHT, SS_ANNE_8_WIDTH ; dimensions (y, x) dw SSAnne8Blocks, SSAnne8TextPointers, SSAnne8Script ; blocks, texts, scripts diff --git a/data/mapHeaders/ssanne9.asm b/data/mapHeaders/ssanne9.asm index 5a293576..c8e6e16f 100755 --- a/data/mapHeaders/ssanne9.asm +++ b/data/mapHeaders/ssanne9.asm @@ -1,4 +1,4 @@ -SSAnne9_h: ; 0x61b3f to 0x61b4b (12 bytes) (id=103) +SSAnne9_h: db SHIP ; tileset db SS_ANNE_9_HEIGHT, SS_ANNE_9_WIDTH ; dimensions (y, x) dw SSAnne9Blocks, SSAnne9TextPointers, SSAnne9Script ; blocks, texts, scripts diff --git a/data/mapHeaders/tradecenter.asm b/data/mapHeaders/tradecenter.asm new file mode 100755 index 00000000..09217ff0 --- /dev/null +++ b/data/mapHeaders/tradecenter.asm @@ -0,0 +1,6 @@ +TradeCenter_h: + db CLUB ; tileset + db TRADE_CENTER_HEIGHT, TRADE_CENTER_WIDTH ; dimensions (y, x) + dw TradeCenterBlocks, TradeCenterTextPointers, TradeCenterScript ; blocks, texts, scripts + db $00 ; connections + dw TradeCenterObject ; objects diff --git a/data/mapHeaders/tradecenterm.asm b/data/mapHeaders/tradecenterm.asm deleted file mode 100755 index 59eb5095..00000000 --- a/data/mapHeaders/tradecenterm.asm +++ /dev/null @@ -1,6 +0,0 @@ -TradeCenterM_h: ; 0x4fd71 to 0x4fd7d (12 bytes) (id=240) - db CLUB ; tileset - db TRADE_CENTER_HEIGHT, TRADE_CENTER_WIDTH ; dimensions (y, x) - dw TradeCenterMBlocks, TradeCenterMTextPointers, TradeCenterMScript ; blocks, texts, scripts - db $00 ; connections - dw TradeCenterMObject ; objects diff --git a/data/mapHeaders/undergroundpathentranceroute5.asm b/data/mapHeaders/undergroundpathentranceroute5.asm index 75e881ba..6e2c5727 100755 --- a/data/mapHeaders/undergroundpathentranceroute5.asm +++ b/data/mapHeaders/undergroundpathentranceroute5.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute5_h: ; 0x5d69d to 0x5d6a9 (12 bytes) (id=71) +UndergroundPathEntranceRoute5_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_5_HEIGHT, PATH_ENTRANCE_ROUTE_5_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute5Blocks, UndergroundPathEntranceRoute5TextPointers, UndergroundPathEntranceRoute5Script ; blocks, texts, scripts diff --git a/data/mapHeaders/undergroundpathentranceroute6.asm b/data/mapHeaders/undergroundpathentranceroute6.asm index 91835507..bb22e93e 100755 --- a/data/mapHeaders/undergroundpathentranceroute6.asm +++ b/data/mapHeaders/undergroundpathentranceroute6.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute6_h: ; 0x5d6e3 to 0x5d6ef (12 bytes) (id=74) +UndergroundPathEntranceRoute6_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_6_HEIGHT, PATH_ENTRANCE_ROUTE_6_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute6Blocks, UndergroundPathEntranceRoute6TextPointers, UndergroundPathEntranceRoute6Script ; blocks, texts, scripts diff --git a/data/mapHeaders/undergroundpathentranceroute7.asm b/data/mapHeaders/undergroundpathentranceroute7.asm index 1ad53899..49b03415 100755 --- a/data/mapHeaders/undergroundpathentranceroute7.asm +++ b/data/mapHeaders/undergroundpathentranceroute7.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute7_h: ; 0x5d720 to 0x5d72c (12 bytes) (id=77) +UndergroundPathEntranceRoute7_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_7_HEIGHT, PATH_ENTRANCE_ROUTE_7_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute7Blocks, UndergroundPathEntranceRoute7TextPointers, UndergroundPathEntranceRoute7Script ; blocks, texts, scripts diff --git a/data/mapHeaders/undergroundpathentranceroute7copy.asm b/data/mapHeaders/undergroundpathentranceroute7copy.asm index e5e6cfa0..e12ee454 100755 --- a/data/mapHeaders/undergroundpathentranceroute7copy.asm +++ b/data/mapHeaders/undergroundpathentranceroute7copy.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute7Copy_h: ; 5d75d (17:575d) +UndergroundPathEntranceRoute7Copy_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_7_HEIGHT, PATH_ENTRANCE_ROUTE_7_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute7CopyBlocks, UndergroundPathEntranceRoute7CopyTextPointers, UndergroundPathEntranceRoute7CopyScript ; blocks, texts, scripts diff --git a/data/mapHeaders/undergroundpathentranceroute8.asm b/data/mapHeaders/undergroundpathentranceroute8.asm index ac6fd87d..c70cb697 100755 --- a/data/mapHeaders/undergroundpathentranceroute8.asm +++ b/data/mapHeaders/undergroundpathentranceroute8.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute8_h: ; 0x1e27d to 0x1e289 (12 bytes) (bank=7) (id=80) +UndergroundPathEntranceRoute8_h: db GATE ; tileset db PATH_ENTRANCE_ROUTE_8_HEIGHT, PATH_ENTRANCE_ROUTE_8_WIDTH ; dimensions (y, x) dw UndergroundPathEntranceRoute8Blocks, UndergroundPathEntranceRoute8TextPointers, UndergroundPathEntranceRoute8Script ; blocks, texts, scripts diff --git a/data/mapHeaders/undergroundpathns.asm b/data/mapHeaders/undergroundpathns.asm index 78a02053..4dc86647 100755 --- a/data/mapHeaders/undergroundpathns.asm +++ b/data/mapHeaders/undergroundpathns.asm @@ -1,4 +1,4 @@ -UndergroundPathNS_h: ; 0x61f1a to 0x61f26 (12 bytes) (id=119) +UndergroundPathNS_h: db UNDERGROUND ; tileset db UNDERGROUND_PATH_NS_HEIGHT, UNDERGROUND_PATH_NS_WIDTH ; dimensions (y, x) dw UndergroundPathNSBlocks, UndergroundPathNSTextPointers, UndergroundPathNSScript ; blocks, texts, scripts diff --git a/data/mapHeaders/undergroundpathwe.asm b/data/mapHeaders/undergroundpathwe.asm index e5561767..df2f98e1 100755 --- a/data/mapHeaders/undergroundpathwe.asm +++ b/data/mapHeaders/undergroundpathwe.asm @@ -1,4 +1,4 @@ -UndergroundPathWE_h: ; 0x61f3e to 0x61f4a (12 bytes) (id=121) +UndergroundPathWE_h: db UNDERGROUND ; tileset db UNDERGROUND_PATH_WE_HEIGHT, UNDERGROUND_PATH_WE_WIDTH ; dimensions (y, x) dw UndergroundPathWEBlocks, UndergroundPathWETextPointers, UndergroundPathWEScript ; blocks, texts, scripts diff --git a/data/mapHeaders/unknowndungeon1.asm b/data/mapHeaders/unknowndungeon1.asm index 8bac389a..e784ffac 100755 --- a/data/mapHeaders/unknowndungeon1.asm +++ b/data/mapHeaders/unknowndungeon1.asm @@ -1,4 +1,4 @@ -UnknownDungeon1_h: ; 0x74d00 to 0x74d0c (12 bytes) (id=228) +UnknownDungeon1_h: db CAVERN ; tileset db UNKNOWN_DUNGEON_1_HEIGHT, UNKNOWN_DUNGEON_1_WIDTH ; dimensions (y, x) dw UnknownDungeon1Blocks, UnknownDungeon1TextPointers, UnknownDungeon1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/unknowndungeon2.asm b/data/mapHeaders/unknowndungeon2.asm index 0bea5b16..3c4c8d4e 100755 --- a/data/mapHeaders/unknowndungeon2.asm +++ b/data/mapHeaders/unknowndungeon2.asm @@ -1,4 +1,4 @@ -UnknownDungeon2_h: ; 0x45dff to 0x45e0b (12 bytes) (bank=11) (id=226) +UnknownDungeon2_h: db CAVERN ; tileset db UNKNOWN_DUNGEON_2_HEIGHT, UNKNOWN_DUNGEON_2_WIDTH ; dimensions (y, x) dw UnknownDungeon2Blocks, UnknownDungeon2TextPointers, UnknownDungeon2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/unknowndungeon3.asm b/data/mapHeaders/unknowndungeon3.asm index a29d39dd..2e01c079 100755 --- a/data/mapHeaders/unknowndungeon3.asm +++ b/data/mapHeaders/unknowndungeon3.asm @@ -1,4 +1,4 @@ -UnknownDungeon3_h: ; 0x45ee4 to 0x45ef0 (12 bytes) (bank=11) (id=227) +UnknownDungeon3_h: db CAVERN ; tileset db UNKNOWN_DUNGEON_3_HEIGHT, UNKNOWN_DUNGEON_3_WIDTH ; dimensions (y, x) dw UnknownDungeon3Blocks, UnknownDungeon3TextPointers, UnknownDungeon3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/vermilioncity.asm b/data/mapHeaders/vermilioncity.asm index b7a41967..c162ab24 100755 --- a/data/mapHeaders/vermilioncity.asm +++ b/data/mapHeaders/vermilioncity.asm @@ -1,8 +1,8 @@ -VermilionCity_h: ; 0x18998 to 0x189ba (34 bytes) (bank=6) (id=5) +VermilionCity_h: db OVERWORLD ; tileset db VERMILION_CITY_HEIGHT, VERMILION_CITY_WIDTH ; dimensions (y, x) dw VermilionCityBlocks, VermilionCityTextPointers, VermilionCityScript ; blocks, texts, scripts db NORTH | EAST ; connections - NORTH_MAP_CONNECTION ROUTE_6, ROUTE_6_WIDTH, ROUTE_6_HEIGHT, 5, 0, ROUTE_6_WIDTH, Route6Blocks - EAST_MAP_CONNECTION ROUTE_11, ROUTE_11_WIDTH, 4, 0, ROUTE_11_HEIGHT, Route11Blocks, VERMILION_CITY_WIDTH + NORTH_MAP_CONNECTION VERMILION_CITY, ROUTE_6, 5, 0, Route6Blocks + EAST_MAP_CONNECTION VERMILION_CITY, ROUTE_11, 4, 0, Route11Blocks dw VermilionCityObject ; objects diff --git a/data/mapHeaders/vermiliondock.asm b/data/mapHeaders/vermiliondock.asm index d8d2993c..16b1c7d8 100755 --- a/data/mapHeaders/vermiliondock.asm +++ b/data/mapHeaders/vermiliondock.asm @@ -1,4 +1,4 @@ -VermilionDock_h: ; 0x1db46 to 0x1db52 (12 bytes) (bank=7) (id=94) +VermilionDock_h: db SHIP_PORT ; tileset db VERMILION_DOCK_HEIGHT, VERMILION_DOCK_WIDTH ; dimensions (y, x) dw VermilionDockBlocks, VermilionDockTextPointers, VermilionDockScript ; blocks, texts, scripts diff --git a/data/mapHeaders/vermiliongym.asm b/data/mapHeaders/vermiliongym.asm index 5627257e..7624ed75 100755 --- a/data/mapHeaders/vermiliongym.asm +++ b/data/mapHeaders/vermiliongym.asm @@ -1,4 +1,4 @@ -VermilionGym_h: ; 0x5ca1a to 0x5ca26 (12 bytes) (id=92) +VermilionGym_h: db GYM ; tileset db VERMILION_GYM_HEIGHT, VERMILION_GYM_WIDTH ; dimensions (y, x) dw VermilionGymBlocks, VermilionGymTextPointers, VermilionGymScript ; blocks, texts, scripts diff --git a/data/mapHeaders/vermilionhouse1.asm b/data/mapHeaders/vermilionhouse1.asm index 34f99023..94aac1d0 100755 --- a/data/mapHeaders/vermilionhouse1.asm +++ b/data/mapHeaders/vermilionhouse1.asm @@ -1,4 +1,4 @@ -VermilionHouse1_h: ; 0x1daf0 to 0x1dafc (12 bytes) (bank=7) (id=93) +VermilionHouse1_h: db HOUSE ; tileset db VERMILION_HOUSE_1_HEIGHT, VERMILION_HOUSE_1_WIDTH ; dimensions (y, x) dw VermilionHouse1Blocks, VermilionHouse1TextPointers, VermilionHouse1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/vermilionhouse2.asm b/data/mapHeaders/vermilionhouse2.asm index ce810bb4..b4124088 100755 --- a/data/mapHeaders/vermilionhouse2.asm +++ b/data/mapHeaders/vermilionhouse2.asm @@ -1,4 +1,4 @@ -VermilionHouse2_h: ; 0x56064 to 0x56070 (12 bytes) (id=163) +VermilionHouse2_h: db HOUSE ; tileset db VERMILION_HOUSE_2_HEIGHT, VERMILION_HOUSE_2_WIDTH ; dimensions (y, x) dw VermilionHouse2Blocks, VermilionHouse2TextPointers, VermilionHouse2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/vermilionhouse3.asm b/data/mapHeaders/vermilionhouse3.asm index 62651a4f..01683532 100755 --- a/data/mapHeaders/vermilionhouse3.asm +++ b/data/mapHeaders/vermilionhouse3.asm @@ -1,4 +1,4 @@ -VermilionHouse3_h: ; 0x19c06 to 0x19c12 (12 bytes) (bank=6) (id=196) +VermilionHouse3_h: db HOUSE ; tileset db VERMILION_HOUSE_3_HEIGHT, VERMILION_HOUSE_3_WIDTH ; dimensions (y, x) dw VermilionHouse3Blocks, VermilionHouse3TextPointers, VermilionHouse3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/vermilionmart.asm b/data/mapHeaders/vermilionmart.asm index ecf71946..97fccc4d 100755 --- a/data/mapHeaders/vermilionmart.asm +++ b/data/mapHeaders/vermilionmart.asm @@ -1,4 +1,4 @@ -VermilionMart_h: ; 0x5c9d5 to 0x5c9e1 (12 bytes) (id=91) +VermilionMart_h: db MART ; tileset db VERMILION_MART_HEIGHT, VERMILION_MART_WIDTH ; dimensions (y, x) dw VermilionMartBlocks, VermilionMartTextPointers, VermilionMartScript ; blocks, texts, scripts diff --git a/data/mapHeaders/vermilionpokecenter.asm b/data/mapHeaders/vermilionpokecenter.asm index 6033585f..e1a63f9e 100755 --- a/data/mapHeaders/vermilionpokecenter.asm +++ b/data/mapHeaders/vermilionpokecenter.asm @@ -1,4 +1,4 @@ -VermilionPokecenter_h: ; 0x5c983 to 0x5c98f (12 bytes) (id=89) +VermilionPokecenter_h: db POKECENTER ; tileset db VERMILION_POKECENTER_HEIGHT, VERMILION_POKECENTER_WIDTH ; dimensions (y, x) dw VermilionPokecenterBlocks, VermilionPokecenterTextPointers, VermilionPokecenterScript ; blocks, texts, scripts diff --git a/data/mapHeaders/victoryroad1.asm b/data/mapHeaders/victoryroad1.asm index 972d3866..6d2f4338 100755 --- a/data/mapHeaders/victoryroad1.asm +++ b/data/mapHeaders/victoryroad1.asm @@ -1,4 +1,4 @@ -VictoryRoad1_h: ; 0x5d9fe to 0x5da0a (12 bytes) (id=108) +VictoryRoad1_h: db CAVERN ; tileset db VICTORY_ROAD_1_HEIGHT, VICTORY_ROAD_1_WIDTH ; dimensions (y, x) dw VictoryRoad1Blocks, VictoryRoad1TextPointers, VictoryRoad1Script ; blocks, texts, scripts diff --git a/data/mapHeaders/victoryroad2.asm b/data/mapHeaders/victoryroad2.asm index 3fb24eee..fa9803b2 100755 --- a/data/mapHeaders/victoryroad2.asm +++ b/data/mapHeaders/victoryroad2.asm @@ -1,4 +1,4 @@ -VictoryRoad2_h: ; 0x51791 to 0x5179d (12 bytes) (id=194) +VictoryRoad2_h: db CAVERN ; tileset db VICTORY_ROAD_2_HEIGHT, VICTORY_ROAD_2_WIDTH ; dimensions (y, x) dw VictoryRoad2Blocks, VictoryRoad2TextPointers, VictoryRoad2Script ; blocks, texts, scripts diff --git a/data/mapHeaders/victoryroad3.asm b/data/mapHeaders/victoryroad3.asm index e35c32c1..4202bfb6 100755 --- a/data/mapHeaders/victoryroad3.asm +++ b/data/mapHeaders/victoryroad3.asm @@ -1,4 +1,4 @@ -VictoryRoad3_h: ; 0x44974 to 0x44980 (12 bytes) (bank=11) (id=198) +VictoryRoad3_h: db CAVERN ; tileset db VICTORY_ROAD_3_HEIGHT, VICTORY_ROAD_3_WIDTH ; dimensions (y, x) dw VictoryRoad3Blocks, VictoryRoad3TextPointers, VictoryRoad3Script ; blocks, texts, scripts diff --git a/data/mapHeaders/viridiancity.asm b/data/mapHeaders/viridiancity.asm index 96aac7ca..79b19368 100755 --- a/data/mapHeaders/viridiancity.asm +++ b/data/mapHeaders/viridiancity.asm @@ -1,9 +1,9 @@ -ViridianCity_h: ; 0x18357 to 0x18384 (45 bytes) (bank=6) (id=1) +ViridianCity_h: db OVERWORLD ; tileset db VIRIDIAN_CITY_HEIGHT, VIRIDIAN_CITY_WIDTH ; dimensions (y, x) dw ViridianCityBlocks, ViridianCityTextPointers, ViridianCityScript ; blocks, texts, scripts db NORTH | SOUTH | WEST ; connections - NORTH_MAP_CONNECTION ROUTE_2, ROUTE_2_WIDTH, ROUTE_2_HEIGHT, 5, 0, ROUTE_2_WIDTH, Route2Blocks - SOUTH_MAP_CONNECTION ROUTE_1, ROUTE_1_WIDTH, 5, 0, ROUTE_1_WIDTH, Route1Blocks, VIRIDIAN_CITY_WIDTH, VIRIDIAN_CITY_HEIGHT - WEST_MAP_CONNECTION ROUTE_22, ROUTE_22_WIDTH, 4, 0, ROUTE_22_HEIGHT, Route22Blocks, VIRIDIAN_CITY_WIDTH + NORTH_MAP_CONNECTION VIRIDIAN_CITY, ROUTE_2, 5, 0, Route2Blocks + SOUTH_MAP_CONNECTION VIRIDIAN_CITY, ROUTE_1, 5, 0, Route1Blocks, 1 + WEST_MAP_CONNECTION VIRIDIAN_CITY, ROUTE_22, 4, 0, Route22Blocks dw ViridianCityObject ; objects diff --git a/data/mapHeaders/viridianforest.asm b/data/mapHeaders/viridianforest.asm index 43433c9e..ef7905b0 100755 --- a/data/mapHeaders/viridianforest.asm +++ b/data/mapHeaders/viridianforest.asm @@ -1,4 +1,4 @@ -ViridianForest_h: ; 0x61101 to 0x6110d (12 bytes) (id=51) +ViridianForest_h: db FOREST ; tileset db VIRIDIAN_FOREST_HEIGHT, VIRIDIAN_FOREST_WIDTH ; dimensions (y, x) dw ViridianForestBlocks, ViridianForestTextPointers, ViridianForestScript ; blocks, texts, scripts diff --git a/data/mapHeaders/viridianforestentrance.asm b/data/mapHeaders/viridianforestentrance.asm index 21fdc56b..6e861c58 100755 --- a/data/mapHeaders/viridianforestentrance.asm +++ b/data/mapHeaders/viridianforestentrance.asm @@ -1,4 +1,4 @@ -ViridianForestEntrance_h: ; 0x5d650 to 0x5d65c (12 bytes) (id=50) +ViridianForestEntrance_h: db FOREST_GATE ; tileset db VIRIDIAN_FOREST_ENTRANCE_HEIGHT, VIRIDIAN_FOREST_ENTRANCE_WIDTH ; dimensions (y, x) dw ViridianForestEntranceBlocks, ViridianForestEntranceTextPointers, ViridianForestEntranceScript ; blocks, texts, scripts diff --git a/data/mapHeaders/viridianforestexit.asm b/data/mapHeaders/viridianforestexit.asm index 285e6416..8e1dd25e 100755 --- a/data/mapHeaders/viridianforestexit.asm +++ b/data/mapHeaders/viridianforestexit.asm @@ -1,4 +1,4 @@ -ViridianForestExit_h: ; 0x5d57b to 0x5d587 (12 bytes) (id=47) +ViridianForestExit_h: db FOREST_GATE ; tileset db VIRIDIAN_FOREST_EXIT_HEIGHT, VIRIDIAN_FOREST_EXIT_WIDTH ; dimensions (y, x) dw ViridianForestExitBlocks, ViridianForestExitTextPointers, ViridianForestExitScript ; blocks, texts, scripts diff --git a/data/mapHeaders/viridiangym.asm b/data/mapHeaders/viridiangym.asm index c983ab71..40b0d69f 100755 --- a/data/mapHeaders/viridiangym.asm +++ b/data/mapHeaders/viridiangym.asm @@ -1,4 +1,4 @@ -ViridianGym_h: ; 0x74897 to 0x748a3 (12 bytes) (id=45) +ViridianGym_h: db GYM ; tileset db VIRIDIAN_GYM_HEIGHT, VIRIDIAN_GYM_WIDTH ; dimensions (y, x) dw ViridianGymBlocks, ViridianGymTextPointers, ViridianGymScript ; blocks, texts, scripts diff --git a/data/mapHeaders/viridianhouse.asm b/data/mapHeaders/viridianhouse.asm index 392c6a20..c8724b4e 100755 --- a/data/mapHeaders/viridianhouse.asm +++ b/data/mapHeaders/viridianhouse.asm @@ -1,4 +1,4 @@ -ViridianHouse_h: ; 0x1d57d to 0x1d589 (12 bytes) (bank=7) (id=44) +ViridianHouse_h: db HOUSE ; tileset db VIRIDIAN_HOUSE_HEIGHT, VIRIDIAN_HOUSE_WIDTH ; dimensions (y, x) dw ViridianHouseBlocks, ViridianHouseTextPointers, ViridianHouseScript ; blocks, texts, scripts diff --git a/data/mapHeaders/viridianmart.asm b/data/mapHeaders/viridianmart.asm index 1bbe80f0..3d799a5b 100755 --- a/data/mapHeaders/viridianmart.asm +++ b/data/mapHeaders/viridianmart.asm @@ -1,4 +1,4 @@ -ViridianMart_h: ; 0x1d462 to 0x1d46e (12 bytes) (bank=7) (id=42) +ViridianMart_h: db MART ; tileset db VIRIDIAN_MART_HEIGHT, VIRIDIAN_MART_WIDTH ; dimensions (y, x) dw ViridianMartBlocks, ViridianMartTextPointers, ViridianMartScript ; blocks, texts, scripts diff --git a/data/mapHeaders/viridianpokecenter.asm b/data/mapHeaders/viridianpokecenter.asm index 673be44e..3218e89d 100755 --- a/data/mapHeaders/viridianpokecenter.asm +++ b/data/mapHeaders/viridianpokecenter.asm @@ -1,4 +1,4 @@ -ViridianPokecenter_h: ; 0x44251 to 0x4425d (12 bytes) (bank=11) (id=41) +ViridianPokecenter_h: db POKECENTER ; tileset db VIRIDIAN_POKECENTER_HEIGHT, VIRIDIAN_POKECENTER_WIDTH ; dimensions (y, x) dw ViridianPokecenterBlocks, ViridianPokecenterTextPointers, ViridianPokeCenterScript ; blocks, texts, scripts diff --git a/data/mapObjects/agatha.asm b/data/mapObjects/agatha.asm index 4b434885..22000dde 100755 --- a/data/mapObjects/agatha.asm +++ b/data/mapObjects/agatha.asm @@ -1,4 +1,4 @@ -AgathaObject: ; 0x76534 (size=44) +AgathaObject: db $0 ; border block db $4 ; warps @@ -9,8 +9,8 @@ AgathaObject: ; 0x76534 (size=44) db $0 ; signs - db $1 ; people - db SPRITE_AGATHA, $2 + 4, $5 + 4, $ff, $d0, TRAINER | $1, AGATHA + $C8, $1 + db $1 ; objects + object SPRITE_AGATHA, $5, $2, STAY, DOWN, $1, OPP_AGATHA, $1 ; warp-to EVENT_DISP AGATHAS_ROOM_WIDTH, $b, $4 ; BRUNOS_ROOM diff --git a/data/mapObjects/battlecenterm.asm b/data/mapObjects/battlecenterm.asm deleted file mode 100755 index 45d88590..00000000 --- a/data/mapObjects/battlecenterm.asm +++ /dev/null @@ -1,9 +0,0 @@ -BattleCenterMObject: ; 0x4fd53 (size=10) - db $e ; border block - - db $0 ; warps - - db $0 ; signs - - db $1 ; people - db SPRITE_RED, $2 + 4, $2 + 4, $ff, $0, $1 ; person diff --git a/data/mapObjects/beach_house.asm b/data/mapObjects/beach_house.asm deleted file mode 100644 index ad648931..00000000 --- a/data/mapObjects/beach_house.asm +++ /dev/null @@ -1,20 +0,0 @@ -BeachHouseObjects: ; 0xf23a4 - db $a ; border block - - db 2 ; warps - db 7,2,0,$ff - db 7,3,0,$ff - - db 4 ; signs - db 0,3,3 - db 0,7,4 - db 0,$b,5 - db 1,$d,6 - - db 2 ; people - db SPRITE_FISHER, 3+4, 2+4, $ff, $d0, 1 ; surfin' dude - db $3d, 3+4, 5+4, $fe, $01, 2 ; pikachu - - ; warp-to - EVENT_DISP BEACH_HOUSE_WIDTH,7,2 - EVENT_DISP BEACH_HOUSE_WIDTH,7,3 diff --git a/data/mapObjects/bikeshop.asm b/data/mapObjects/bikeshop.asm index 5803e3fb..5a7e832c 100755 --- a/data/mapObjects/bikeshop.asm +++ b/data/mapObjects/bikeshop.asm @@ -1,4 +1,4 @@ -BikeShopObject: ; 0x1d866 (size=38) +BikeShopObject: db $e ; border block db $2 ; warps @@ -7,10 +7,10 @@ BikeShopObject: ; 0x1d866 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_BIKE_SHOP_GUY, $2 + 4, $6 + 4, $ff, $ff, $1 ; person - db SPRITE_MOM_GEISHA, $6 + 4, $5 + 4, $fe, $1, $2 ; person - db SPRITE_BUG_CATCHER, $3 + 4, $1 + 4, $ff, $d1, $3 ; person + db $3 ; objects + object SPRITE_BIKE_SHOP_GUY, $6, $2, STAY, NONE, $1 ; person + object SPRITE_MOM_GEISHA, $5, $6, WALK, $1, $2 ; person + object SPRITE_BUG_CATCHER, $1, $3, STAY, UP, $3 ; person ; warp-to EVENT_DISP BIKE_SHOP_WIDTH, $7, $2 diff --git a/data/mapObjects/billshouse.asm b/data/mapObjects/billshouse.asm index 2c032bf2..ef52e1dd 100755 --- a/data/mapObjects/billshouse.asm +++ b/data/mapObjects/billshouse.asm @@ -1,4 +1,4 @@ -BillsHouseObject: ; 0x1e8df (size=38) +BillsHouseObject: db $d ; border block db $2 ; warps @@ -7,10 +7,10 @@ BillsHouseObject: ; 0x1e8df (size=38) db $0 ; signs - db $3 ; people - db SPRITE_SLOWBRO, $5 + 4, $6 + 4, $ff, $ff, $1 ; person - db SPRITE_BLACK_HAIR_BOY_2, $4 + 4, $4 + 4, $ff, $ff, $2 ; person - db SPRITE_BLACK_HAIR_BOY_2, $5 + 4, $6 + 4, $ff, $ff, $3 ; person + db $3 ; objects + object SPRITE_SLOWBRO, $6, $5, STAY, NONE, $1 ; person + object SPRITE_BLACK_HAIR_BOY_2, $4, $4, STAY, NONE, $2 ; person + object SPRITE_BLACK_HAIR_BOY_2, $6, $5, STAY, NONE, $3 ; person ; warp-to EVENT_DISP BILLS_HOUSE_WIDTH, $7, $2 diff --git a/data/mapObjects/blueshouse.asm b/data/mapObjects/blueshouse.asm index 582733c0..231e852d 100755 --- a/data/mapObjects/blueshouse.asm +++ b/data/mapObjects/blueshouse.asm @@ -1,4 +1,4 @@ -BluesHouseObject: ; 19bce (6:5bce) +BluesHouseObject: db $0A ; border block db $2 ; warps @@ -7,10 +7,10 @@ BluesHouseObject: ; 19bce (6:5bce) db $0 ; signs - db $3 ; people - db SPRITE_DAISY, $3 + 4, $2 + 4, $FF, $D3, $1 ; Daisy, sitting by map - db SPRITE_DAISY, $4 + 4, $6 + 4, $FE, $1, ITEM | $2, $0 ; Daisy, walking around - db SPRITE_BOOK_MAP_DEX, $3 + 4, $3 + 4, $FF, $FF, ITEM | $3, $0 ; map on table + db $3 ; objects + object SPRITE_DAISY, $2, $3, STAY, RIGHT, $1 ; Daisy, sitting by map + object SPRITE_DAISY, $6, $4, WALK, $1, $2, $0 ; Daisy, walking around + object SPRITE_BOOK_MAP_DEX, $3, $3, STAY, NONE, $3, $0 ; map on table ; warp-to EVENT_DISP BLUES_HOUSE_WIDTH, $7, $2 diff --git a/data/mapObjects/bruno.asm b/data/mapObjects/bruno.asm index 8cbd9411..a734b07b 100755 --- a/data/mapObjects/bruno.asm +++ b/data/mapObjects/bruno.asm @@ -1,4 +1,4 @@ -BrunoObject: ; 0x763d7 (size=44) +BrunoObject: db $3 ; border block db $4 ; warps @@ -9,8 +9,8 @@ BrunoObject: ; 0x763d7 (size=44) db $0 ; signs - db $1 ; people - db SPRITE_BRUNO, $2 + 4, $5 + 4, $ff, $d0, TRAINER | $1, BRUNO + $C8, $1 + db $1 ; objects + object SPRITE_BRUNO, $5, $2, STAY, DOWN, $1, OPP_BRUNO, $1 ; warp-to EVENT_DISP BRUNOS_ROOM_WIDTH, $b, $4 ; LORELEIS_ROOM diff --git a/data/mapObjects/celadoncity.asm b/data/mapObjects/celadoncity.asm index b19e2f87..c2a7fd78 100755 --- a/data/mapObjects/celadoncity.asm +++ b/data/mapObjects/celadoncity.asm @@ -1,4 +1,4 @@ -CeladonCityObject: ; 0x18022 (size=189) +CeladonCityObject: db $f ; border block db $d ; warps @@ -27,16 +27,16 @@ CeladonCityObject: ; 0x18022 (size=189) db $15, $21, $11 ; CeladonCityText17 db $15, $1b, $12 ; CeladonCityText18 - db $9 ; people - db SPRITE_LITTLE_GIRL, $11 + 4, $8 + 4, $fe, $0, $1 ; person - db SPRITE_OLD_PERSON, $1c + 4, $b + 4, $ff, $d1, $2 ; person - db SPRITE_GIRL, $13 + 4, $e + 4, $fe, $1, $3 ; person - db SPRITE_OLD_PERSON, $16 + 4, $19 + 4, $ff, $d0, $4 ; person - db SPRITE_OLD_PERSON, $10 + 4, $16 + 4, $ff, $d0, $5 ; person - db SPRITE_FISHER2, $c + 4, $20 + 4, $ff, $d2, $6 ; person - db SPRITE_SLOWBRO, $c + 4, $1e + 4, $ff, $d3, $7 ; person - db SPRITE_ROCKET, $1d + 4, $20 + 4, $fe, $2, $8 ; person - db SPRITE_ROCKET, $e + 4, $2a + 4, $fe, $2, $9 ; person + db $9 ; objects + object SPRITE_LITTLE_GIRL, $8, $11, WALK, $0, $1 ; person + object SPRITE_OLD_PERSON, $b, $1c, STAY, UP, $2 ; person + object SPRITE_GIRL, $e, $13, WALK, $1, $3 ; person + object SPRITE_OLD_PERSON, $19, $16, STAY, DOWN, $4 ; person + object SPRITE_OLD_PERSON, $16, $10, STAY, DOWN, $5 ; person + object SPRITE_FISHER2, $20, $c, STAY, LEFT, $6 ; person + object SPRITE_SLOWBRO, $1e, $c, STAY, RIGHT, $7 ; person + object SPRITE_ROCKET, $20, $1d, WALK, $2, $8 ; person + object SPRITE_ROCKET, $2a, $e, WALK, $2, $9 ; person ; warp-to EVENT_DISP CELADON_CITY_WIDTH, $d, $8 ; CELADON_MART_1 diff --git a/data/mapObjects/celadondiner.asm b/data/mapObjects/celadondiner.asm index ffb47d50..fd202a96 100755 --- a/data/mapObjects/celadondiner.asm +++ b/data/mapObjects/celadondiner.asm @@ -1,4 +1,4 @@ -CeladonDinerObject: ; 0x491bc (size=50) +CeladonDinerObject: db $f ; border block db $2 ; warps @@ -7,12 +7,12 @@ CeladonDinerObject: ; 0x491bc (size=50) db $0 ; signs - db $5 ; people - db SPRITE_COOK, $5 + 4, $8 + 4, $fe, $2, $1 ; person - db SPRITE_MOM_GEISHA, $2 + 4, $7 + 4, $ff, $ff, $2 ; person - db SPRITE_FAT_BALD_GUY, $4 + 4, $1 + 4, $ff, $d0, $3 ; person - db SPRITE_FISHER2, $3 + 4, $5 + 4, $ff, $d3, $4 ; person - db SPRITE_GYM_HELPER, $1 + 4, $0 + 4, $ff, $d0, $5 ; person + db $5 ; objects + object SPRITE_COOK, $8, $5, WALK, $2, $1 ; person + object SPRITE_MOM_GEISHA, $7, $2, STAY, NONE, $2 ; person + object SPRITE_FAT_BALD_GUY, $1, $4, STAY, DOWN, $3 ; person + object SPRITE_FISHER2, $5, $3, STAY, RIGHT, $4 ; person + object SPRITE_GYM_HELPER, $0, $1, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP CELADON_DINER_WIDTH, $7, $3 diff --git a/data/mapObjects/celadongamecorner.asm b/data/mapObjects/celadongamecorner.asm index 50f85ed0..46b1c906 100755 --- a/data/mapObjects/celadongamecorner.asm +++ b/data/mapObjects/celadongamecorner.asm @@ -1,4 +1,4 @@ -CeladonGameCornerObject: ; 0x48fa0 (size=99) +CeladonGameCornerObject: db $f ; border block db $3 ; warps @@ -9,18 +9,18 @@ CeladonGameCornerObject: ; 0x48fa0 (size=99) db $1 ; signs db $4, $9, $c ; CeladonGameCornerText12 - db $b ; people - db SPRITE_FOULARD_WOMAN, $6 + 4, $2 + 4, $ff, $d0, $1 ; person - db SPRITE_MART_GUY, $6 + 4, $5 + 4, $ff, $d0, $2 ; person - db SPRITE_FAT_BALD_GUY, $a + 4, $2 + 4, $ff, $d2, $3 ; person - db SPRITE_FOULARD_WOMAN, $d + 4, $2 + 4, $ff, $d2, $4 ; person - db SPRITE_FISHER, $b + 4, $5 + 4, $ff, $d3, $5 ; person - db SPRITE_MOM_GEISHA, $b + 4, $8 + 4, $ff, $d2, $6 ; person - db SPRITE_GYM_HELPER, $e + 4, $8 + 4, $ff, $d2, $7 ; person - db SPRITE_GAMBLER, $f + 4, $b + 4, $ff, $d3, $8 ; person - db SPRITE_MART_GUY, $b + 4, $e + 4, $ff, $d2, $9 ; person - db SPRITE_GENTLEMAN, $d + 4, $11 + 4, $ff, $d3, $a ; person - db SPRITE_ROCKET, $5 + 4, $9 + 4, $ff, $d1, TRAINER | $b, ROCKET + $C8, $7 + db $b ; objects + object SPRITE_FOULARD_WOMAN, $2, $6, STAY, DOWN, $1 ; person + object SPRITE_MART_GUY, $5, $6, STAY, DOWN, $2 ; person + object SPRITE_FAT_BALD_GUY, $2, $a, STAY, LEFT, $3 ; person + object SPRITE_FOULARD_WOMAN, $2, $d, STAY, LEFT, $4 ; person + object SPRITE_FISHER, $5, $b, STAY, RIGHT, $5 ; person + object SPRITE_MOM_GEISHA, $8, $b, STAY, LEFT, $6 ; person + object SPRITE_GYM_HELPER, $8, $e, STAY, LEFT, $7 ; person + object SPRITE_GAMBLER, $b, $f, STAY, RIGHT, $8 ; person + object SPRITE_MART_GUY, $e, $b, STAY, LEFT, $9 ; person + object SPRITE_GENTLEMAN, $11, $d, STAY, RIGHT, $a ; person + object SPRITE_ROCKET, $9, $5, STAY, UP, $b, OPP_ROCKET, $7 ; warp-to EVENT_DISP GAME_CORNER_WIDTH, $11, $f diff --git a/data/mapObjects/celadongym.asm b/data/mapObjects/celadongym.asm index 7b90d159..212c389e 100755 --- a/data/mapObjects/celadongym.asm +++ b/data/mapObjects/celadongym.asm @@ -1,4 +1,4 @@ -CeladonGymObject: ; 0x48b30 (size=84) +CeladonGymObject: db $3 ; border block db $2 ; warps @@ -7,15 +7,15 @@ CeladonGymObject: ; 0x48b30 (size=84) db $0 ; signs - db $8 ; people - db SPRITE_ERIKA, $3 + 4, $4 + 4, $ff, $d0, TRAINER | $1, ERIKA + $C8, $1 - db SPRITE_LASS, $b + 4, $2 + 4, $ff, $d3, TRAINER | $2, LASS + $C8, $11 - db SPRITE_FOULARD_WOMAN, $a + 4, $7 + 4, $ff, $d2, TRAINER | $3, BEAUTY + $C8, $1 - db SPRITE_LASS, $5 + 4, $9 + 4, $ff, $d0, TRAINER | $4, JR__TRAINER_F + $C8, $b - db SPRITE_FOULARD_WOMAN, $5 + 4, $1 + 4, $ff, $d0, TRAINER | $5, BEAUTY + $C8, $2 - db SPRITE_LASS, $3 + 4, $6 + 4, $ff, $d0, TRAINER | $6, LASS + $C8, $12 - db SPRITE_FOULARD_WOMAN, $3 + 4, $3 + 4, $ff, $d0, TRAINER | $7, BEAUTY + $C8, $3 - db SPRITE_LASS, $3 + 4, $5 + 4, $ff, $d0, TRAINER | $8, COOLTRAINER_F + $C8, $1 + db $8 ; objects + object SPRITE_ERIKA, $4, $3, STAY, DOWN, $1, OPP_ERIKA, $1 + object SPRITE_LASS, $2, $b, STAY, RIGHT, $2, OPP_LASS, $11 + object SPRITE_FOULARD_WOMAN, $7, $a, STAY, LEFT, $3, OPP_BEAUTY, $1 + object SPRITE_LASS, $9, $5, STAY, DOWN, $4, OPP_JR_TRAINER_F, $b + object SPRITE_FOULARD_WOMAN, $1, $5, STAY, DOWN, $5, OPP_BEAUTY, $2 + object SPRITE_LASS, $6, $3, STAY, DOWN, $6, OPP_LASS, $12 + object SPRITE_FOULARD_WOMAN, $3, $3, STAY, DOWN, $7, OPP_BEAUTY, $3 + object SPRITE_LASS, $5, $3, STAY, DOWN, $8, OPP_COOLTRAINER_F, $1 ; warp-to EVENT_DISP CELADON_GYM_WIDTH, $11, $4 diff --git a/data/mapObjects/celadonhotel.asm b/data/mapObjects/celadonhotel.asm index b1052def..8d7dcb03 100755 --- a/data/mapObjects/celadonhotel.asm +++ b/data/mapObjects/celadonhotel.asm @@ -1,4 +1,4 @@ -CeladonHotelObject: ; 0x49281 (size=38) +CeladonHotelObject: db $0 ; border block db $2 ; warps @@ -7,10 +7,10 @@ CeladonHotelObject: ; 0x49281 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_OLD_MEDIUM_WOMAN, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_FOULARD_WOMAN, $4 + 4, $2 + 4, $ff, $ff, $2 ; person - db SPRITE_BLACK_HAIR_BOY_2, $4 + 4, $8 + 4, $fe, $2, $3 ; person + db $3 ; objects + object SPRITE_OLD_MEDIUM_WOMAN, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_FOULARD_WOMAN, $2, $4, STAY, NONE, $2 ; person + object SPRITE_BLACK_HAIR_BOY_2, $8, $4, WALK, $2, $3 ; person ; warp-to EVENT_DISP CELADON_HOTEL_WIDTH, $7, $3 diff --git a/data/mapObjects/celadonhouse.asm b/data/mapObjects/celadonhouse.asm index 19be473b..6bd847a4 100755 --- a/data/mapObjects/celadonhouse.asm +++ b/data/mapObjects/celadonhouse.asm @@ -1,4 +1,4 @@ -CeladonHouseObject: ; 0x49227 (size=38) +CeladonHouseObject: db $f ; border block db $2 ; warps @@ -7,10 +7,10 @@ CeladonHouseObject: ; 0x49227 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_OLD_PERSON, $2 + 4, $4 + 4, $ff, $d0, $1 ; person - db SPRITE_ROCKET, $4 + 4, $1 + 4, $fe, $0, $2 ; person - db SPRITE_SAILOR, $6 + 4, $5 + 4, $ff, $d2, $3 ; person + db $3 ; objects + object SPRITE_OLD_PERSON, $4, $2, STAY, DOWN, $1 ; person + object SPRITE_ROCKET, $1, $4, WALK, $0, $2 ; person + object SPRITE_SAILOR, $5, $6, STAY, LEFT, $3 ; person ; warp-to EVENT_DISP CELADON_HOUSE_WIDTH, $7, $2 diff --git a/data/mapObjects/celadonmansion1.asm b/data/mapObjects/celadonmansion1.asm index decb14e7..47fbb0e5 100755 --- a/data/mapObjects/celadonmansion1.asm +++ b/data/mapObjects/celadonmansion1.asm @@ -1,4 +1,4 @@ -CeladonMansion1Object: ; 0x486cf (size=71) +CeladonMansion1Object: db $f ; border block db $5 ; warps @@ -11,11 +11,11 @@ CeladonMansion1Object: ; 0x486cf (size=71) db $1 ; signs db $9, $4, $5 ; CeladonMansion1Text5 - db $4 ; people - db SPRITE_SLOWBRO, $5 + 4, $0 + 4, $ff, $d3, $1 ; person - db SPRITE_OLD_MEDIUM_WOMAN, $5 + 4, $1 + 4, $ff, $d0, $2 ; person - db SPRITE_CLEFAIRY, $8 + 4, $1 + 4, $fe, $2, $3 ; person - db SPRITE_SLOWBRO, $4 + 4, $4 + 4, $fe, $1, $4 ; person + db $4 ; objects + object SPRITE_SLOWBRO, $0, $5, STAY, RIGHT, $1 ; person + object SPRITE_OLD_MEDIUM_WOMAN, $1, $5, STAY, DOWN, $2 ; person + object SPRITE_CLEFAIRY, $1, $8, WALK, $2, $3 ; person + object SPRITE_SLOWBRO, $4, $4, WALK, $1, $4 ; person ; warp-to EVENT_DISP CELADON_MANSION_1_WIDTH, $b, $4 diff --git a/data/mapObjects/celadonmansion2.asm b/data/mapObjects/celadonmansion2.asm index 3ed15a66..883cae36 100755 --- a/data/mapObjects/celadonmansion2.asm +++ b/data/mapObjects/celadonmansion2.asm @@ -1,4 +1,4 @@ -CeladonMansion2Object: ; 0x48745 (size=39) +CeladonMansion2Object: db $f ; border block db $4 ; warps @@ -10,7 +10,7 @@ CeladonMansion2Object: ; 0x48745 (size=39) db $1 ; signs db $9, $4, $1 ; CeladonMansion2Text1 - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP CELADON_MANSION_2_WIDTH, $1, $6 ; CELADON_MANSION_3 diff --git a/data/mapObjects/celadonmansion3.asm b/data/mapObjects/celadonmansion3.asm index e64bac61..0564b1cb 100755 --- a/data/mapObjects/celadonmansion3.asm +++ b/data/mapObjects/celadonmansion3.asm @@ -1,4 +1,4 @@ -CeladonMansion3Object: ; 0x487ff (size=72) +CeladonMansion3Object: db $f ; border block db $4 ; warps @@ -13,11 +13,11 @@ CeladonMansion3Object: ; 0x487ff (size=72) db $6, $1, $7 ; CeladonMansion3Text7 db $9, $4, $8 ; CeladonMansion3Text8 - db $4 ; people - db SPRITE_BIKE_SHOP_GUY, $4 + 4, $0 + 4, $ff, $d1, $1 ; person - db SPRITE_MART_GUY, $4 + 4, $3 + 4, $ff, $d1, $2 ; person - db SPRITE_BLACK_HAIR_BOY_2, $7 + 4, $0 + 4, $ff, $d1, $3 ; person - db SPRITE_LAPRAS_GIVER, $3 + 4, $2 + 4, $ff, $ff, $4 ; person + db $4 ; objects + object SPRITE_BIKE_SHOP_GUY, $0, $4, STAY, UP, $1 ; person + object SPRITE_MART_GUY, $3, $4, STAY, UP, $2 ; person + object SPRITE_BLACK_HAIR_BOY_2, $0, $7, STAY, UP, $3 ; person + object SPRITE_LAPRAS_GIVER, $2, $3, STAY, NONE, $4 ; person ; warp-to EVENT_DISP CELADON_MANSION_3_WIDTH, $1, $6 ; CELADON_MANSION_2 diff --git a/data/mapObjects/celadonmansion4.asm b/data/mapObjects/celadonmansion4.asm index 4181bd17..c4f667fa 100755 --- a/data/mapObjects/celadonmansion4.asm +++ b/data/mapObjects/celadonmansion4.asm @@ -1,4 +1,4 @@ -CeladonMansion4Object: ; 0x48875 (size=31) +CeladonMansion4Object: db $9 ; border block db $3 ; warps @@ -9,7 +9,7 @@ CeladonMansion4Object: ; 0x48875 (size=31) db $1 ; signs db $7, $3, $1 ; CeladonMansion4Text1 - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP CELADON_MANSION_4_WIDTH, $1, $6 ; CELADON_MANSION_3 diff --git a/data/mapObjects/celadonmansion5.asm b/data/mapObjects/celadonmansion5.asm index efc74275..243e345b 100755 --- a/data/mapObjects/celadonmansion5.asm +++ b/data/mapObjects/celadonmansion5.asm @@ -1,4 +1,4 @@ -CeladonMansion5Object: ; 0x1dd5c (size=32) +CeladonMansion5Object: db $a ; border block db $2 ; warps @@ -7,9 +7,9 @@ CeladonMansion5Object: ; 0x1dd5c (size=32) db $0 ; signs - db $2 ; people - db SPRITE_HIKER, $2 + 4, $2 + 4, $ff, $d0, $1 ; person - db SPRITE_BALL, $3 + 4, $4 + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_HIKER, $2, $2, STAY, DOWN, $1 ; person + object SPRITE_BALL, $4, $3, STAY, NONE, $2 ; person ; warp-to EVENT_DISP CELADON_MANSION_5_WIDTH, $7, $2 ; CELADON_MANSION_4 diff --git a/data/mapObjects/celadonmart1.asm b/data/mapObjects/celadonmart1.asm index 10593f46..af647cf2 100755 --- a/data/mapObjects/celadonmart1.asm +++ b/data/mapObjects/celadonmart1.asm @@ -1,4 +1,4 @@ -CeladonMart1Object: ; 0x60f9e (size=64) +CeladonMart1Object: db $f ; border block db $6 ; warps @@ -13,8 +13,8 @@ CeladonMart1Object: ; 0x60f9e (size=64) db $4, $b, $2 ; CeladonMart1Text2 db $1, $e, $3 ; CeladonMart1Text3 - db $1 ; people - db SPRITE_CABLE_CLUB_WOMAN, $3 + 4, $8 + 4, $ff, $d0, $1 ; person + db $1 ; objects + object SPRITE_CABLE_CLUB_WOMAN, $8, $3, STAY, DOWN, $1 ; person ; warp-to EVENT_DISP CELADON_MART_1_WIDTH, $7, $2 diff --git a/data/mapObjects/celadonmart2.asm b/data/mapObjects/celadonmart2.asm index 6b40ed11..a6c9af59 100755 --- a/data/mapObjects/celadonmart2.asm +++ b/data/mapObjects/celadonmart2.asm @@ -1,4 +1,4 @@ -CeladonMart2Object: ; 0x56111 (size=55) +CeladonMart2Object: db $f ; border block db $3 ; warps @@ -9,11 +9,11 @@ CeladonMart2Object: ; 0x56111 (size=55) db $1 ; signs db $1, $e, $5 ; CeladonMart2Text5 - db $4 ; people - db SPRITE_MART_GUY, $3 + 4, $5 + 4, $ff, $d0, $1 ; person - db SPRITE_MART_GUY, $3 + 4, $6 + 4, $ff, $d0, $2 ; person - db SPRITE_FAT_BALD_GUY, $5 + 4, $13 + 4, $ff, $ff, $3 ; person - db SPRITE_GIRL, $4 + 4, $e + 4, $fe, $1, $4 ; person + db $4 ; objects + object SPRITE_MART_GUY, $5, $3, STAY, DOWN, $1 ; person + object SPRITE_MART_GUY, $6, $3, STAY, DOWN, $2 ; person + object SPRITE_FAT_BALD_GUY, $13, $5, STAY, NONE, $3 ; person + object SPRITE_GIRL, $e, $4, WALK, $1, $4 ; person ; warp-to EVENT_DISP CELADON_MART_2_WIDTH, $1, $c ; CELADON_MART_1 diff --git a/data/mapObjects/celadonmart3.asm b/data/mapObjects/celadonmart3.asm index 8ffbf823..41054371 100755 --- a/data/mapObjects/celadonmart3.asm +++ b/data/mapObjects/celadonmart3.asm @@ -1,4 +1,4 @@ -CeladonMart3Object: ; 0x482c4 (size=94) +CeladonMart3Object: db $f ; border block db $3 ; warps @@ -20,12 +20,12 @@ CeladonMart3Object: ; 0x482c4 (size=94) db $1, $6, $10 ; CeladonMart3Text16 db $1, $a, $11 ; CeladonMart3Text17 - db $5 ; people - db SPRITE_MART_GUY, $5 + 4, $10 + 4, $ff, $ff, $1 ; person - db SPRITE_GAMEBOY_KID_COPY, $6 + 4, $b + 4, $ff, $d3, $2 ; person - db SPRITE_GAMEBOY_KID_COPY, $2 + 4, $7 + 4, $ff, $d0, $3 ; person - db SPRITE_GAMEBOY_KID_COPY, $2 + 4, $8 + 4, $ff, $d0, $4 ; person - db SPRITE_YOUNG_BOY, $5 + 4, $2 + 4, $ff, $d1, $5 ; person + db $5 ; objects + object SPRITE_MART_GUY, $10, $5, STAY, NONE, $1 ; person + object SPRITE_GAMEBOY_KID_COPY, $b, $6, STAY, RIGHT, $2 ; person + object SPRITE_GAMEBOY_KID_COPY, $7, $2, STAY, DOWN, $3 ; person + object SPRITE_GAMEBOY_KID_COPY, $8, $2, STAY, DOWN, $4 ; person + object SPRITE_YOUNG_BOY, $2, $5, STAY, UP, $5 ; person ; warp-to EVENT_DISP CELADON_MART_3_WIDTH, $1, $c ; CELADON_MART_4 diff --git a/data/mapObjects/celadonmart4.asm b/data/mapObjects/celadonmart4.asm index 5bdbbf4a..386dba8c 100755 --- a/data/mapObjects/celadonmart4.asm +++ b/data/mapObjects/celadonmart4.asm @@ -1,4 +1,4 @@ -CeladonMart4Object: ; 0x48370 (size=49) +CeladonMart4Object: db $f ; border block db $3 ; warps @@ -9,10 +9,10 @@ CeladonMart4Object: ; 0x48370 (size=49) db $1 ; signs db $1, $e, $4 ; CeladonMart4Text4 - db $3 ; people - db SPRITE_MART_GUY, $7 + 4, $5 + 4, $ff, $ff, $1 ; person - db SPRITE_BLACK_HAIR_BOY_2, $5 + 4, $f + 4, $fe, $2, $2 ; person - db SPRITE_BUG_CATCHER, $2 + 4, $5 + 4, $fe, $2, $3 ; person + db $3 ; objects + object SPRITE_MART_GUY, $5, $7, STAY, NONE, $1 ; person + object SPRITE_BLACK_HAIR_BOY_2, $f, $5, WALK, $2, $2 ; person + object SPRITE_BUG_CATCHER, $5, $2, WALK, $2, $3 ; person ; warp-to EVENT_DISP CELADON_MART_4_WIDTH, $1, $c ; CELADON_MART_3 diff --git a/data/mapObjects/celadonmart5.asm b/data/mapObjects/celadonmart5.asm index 9914d51b..df47a70d 100755 --- a/data/mapObjects/celadonmart5.asm +++ b/data/mapObjects/celadonmart5.asm @@ -1,4 +1,4 @@ -CeladonMart5Object: ; 0x49085 (size=55) +CeladonMart5Object: db $f ; border block db $3 ; warps @@ -9,11 +9,11 @@ CeladonMart5Object: ; 0x49085 (size=55) db $1 ; signs db $1, $e, $5 ; CeladonMart5Text5 - db $4 ; people - db SPRITE_GENTLEMAN, $5 + 4, $e + 4, $fe, $1, $1 ; person - db SPRITE_SAILOR, $6 + 4, $2 + 4, $ff, $ff, $2 ; person - db SPRITE_MART_GUY, $3 + 4, $5 + 4, $ff, $d0, $3 ; person - db SPRITE_MART_GUY, $3 + 4, $6 + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_GENTLEMAN, $e, $5, WALK, $1, $1 ; person + object SPRITE_SAILOR, $2, $6, STAY, NONE, $2 ; person + object SPRITE_MART_GUY, $5, $3, STAY, DOWN, $3 ; person + object SPRITE_MART_GUY, $6, $3, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP CELADON_MART_5_WIDTH, $1, $c ; CELADON_MART_ROOF diff --git a/data/mapObjects/celadonmartelevator.asm b/data/mapObjects/celadonmartelevator.asm index ca9a8f08..2db8635a 100755 --- a/data/mapObjects/celadonmartelevator.asm +++ b/data/mapObjects/celadonmartelevator.asm @@ -1,4 +1,4 @@ -CeladonMartElevatorObject: ; 0x4866d (size=23) +CeladonMartElevatorObject: db $f ; border block db $2 ; warps @@ -8,7 +8,7 @@ CeladonMartElevatorObject: ; 0x4866d (size=23) db $1 ; signs db $0, $3, $1 ; CeladonMartElevatorText1 - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP CELADON_MART_ELEVATOR_WIDTH, $3, $1 ; CELADON_MART_1 diff --git a/data/mapObjects/celadonmartroof.asm b/data/mapObjects/celadonmartroof.asm index 119eb4f8..63a1b4d7 100755 --- a/data/mapObjects/celadonmartroof.asm +++ b/data/mapObjects/celadonmartroof.asm @@ -1,4 +1,4 @@ -CeladonMartRoofObject: ; 0x485a8 (size=36) +CeladonMartRoofObject: db $42 ; border block db $1 ; warps @@ -10,9 +10,9 @@ CeladonMartRoofObject: ; 0x485a8 (size=36) db $2, $c, $5 ; CeladonMartRoofText5 db $2, $d, $6 ; CeladonMartRoofText6 - db $2 ; people - db SPRITE_BLACK_HAIR_BOY_2, $4 + 4, $a + 4, $ff, $d2, $1 ; person - db SPRITE_LITTLE_GIRL, $5 + 4, $5 + 4, $fe, $0, $2 ; person + db $2 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $a, $4, STAY, LEFT, $1 ; person + object SPRITE_LITTLE_GIRL, $5, $5, WALK, $0, $2 ; person ; warp-to EVENT_DISP CELADON_MART_ROOF_WIDTH, $2, $f ; CELADON_MART_5 diff --git a/data/mapObjects/celadonpokecenter.asm b/data/mapObjects/celadonpokecenter.asm index dcfeceb7..c4ce1700 100755 --- a/data/mapObjects/celadonpokecenter.asm +++ b/data/mapObjects/celadonpokecenter.asm @@ -1,4 +1,4 @@ -CeladonPokecenterObject: ; 0x488d2 (size=44) +CeladonPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ CeladonPokecenterObject: ; 0x488d2 (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_GENTLEMAN, $3 + 4, $7 + 4, $fe, $2, $2 ; person - db SPRITE_FOULARD_WOMAN, $5 + 4, $a + 4, $fe, $0, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_GENTLEMAN, $7, $3, WALK, $2, $2 ; person + object SPRITE_FOULARD_WOMAN, $a, $5, WALK, $0, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP CELADON_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/celadonprizeroom.asm b/data/mapObjects/celadonprizeroom.asm index f280b050..c440bad5 100755 --- a/data/mapObjects/celadonprizeroom.asm +++ b/data/mapObjects/celadonprizeroom.asm @@ -1,4 +1,4 @@ -CeladonPrizeRoomObject: ; 0x49108 (size=41) +CeladonPrizeRoomObject: db $f ; border block db $2 ; warps @@ -10,9 +10,9 @@ CeladonPrizeRoomObject: ; 0x49108 (size=41) db $2, $4, $4 ; CeladonPrizeRoomText4 db $2, $6, $5 ; CeladonPrizeRoomText5 - db $2 ; people - db SPRITE_BALDING_GUY, $4 + 4, $1 + 4, $ff, $ff, $1 ; person - db SPRITE_GAMBLER, $3 + 4, $7 + 4, $fe, $2, $2 ; person + db $2 ; objects + object SPRITE_BALDING_GUY, $1, $4, STAY, NONE, $1 ; person + object SPRITE_GAMBLER, $7, $3, WALK, $2, $2 ; person ; warp-to EVENT_DISP CELADON_PRIZE_ROOM_WIDTH, $7, $4 diff --git a/data/mapObjects/ceruleancity.asm b/data/mapObjects/ceruleancity.asm index 3f57457b..b6317e2c 100755 --- a/data/mapObjects/ceruleancity.asm +++ b/data/mapObjects/ceruleancity.asm @@ -1,17 +1,17 @@ -CeruleanCityObject: ; 0x18786 (size=170) +CeruleanCityObject: db $f ; border block db $a ; warps db $b, $1b, $0, TRASHED_HOUSE - db $f, $d, $0, CERULEAN_HOUSE + db $f, $d, $0, CERULEAN_HOUSE_1 db $11, $13, $0, CERULEAN_POKECENTER db $13, $1e, $0, CERULEAN_GYM db $19, $d, $0, BIKE_SHOP db $19, $19, $0, CERULEAN_MART db $b, $4, $0, UNKNOWN_DUNGEON_1 db $9, $1b, $2, TRASHED_HOUSE - db $b, $9, $1, CERULEAN_HOUSE_3 - db $9, $9, $0, CERULEAN_HOUSE_3 + db $b, $9, $1, CERULEAN_HOUSE_2 + db $9, $9, $0, CERULEAN_HOUSE_2 db $6 ; signs db $13, $17, $c ; CeruleanCityText12 @@ -21,27 +21,27 @@ CeruleanCityObject: ; 0x18786 (size=170) db $19, $b, $10 ; CeruleanCityText16 db $15, $1b, $11 ; CeruleanCityText17 - db $b ; people - db SPRITE_BLUE, $2 + 4, $14 + 4, $ff, $d0, $1 ; person - db SPRITE_ROCKET, $8 + 4, $1e + 4, $ff, $ff, TRAINER | $2, ROCKET + $C8, $5 - db SPRITE_BLACK_HAIR_BOY_1, $14 + 4, $1f + 4, $ff, $d0, $3 ; person - db SPRITE_BLACK_HAIR_BOY_2, $12 + 4, $f + 4, $fe, $1, $4 ; person - db SPRITE_BLACK_HAIR_BOY_2, $15 + 4, $9 + 4, $fe, $2, $5 ; person - db SPRITE_GUARD, $c + 4, $1c + 4, $ff, $d0, $6 ; person - db SPRITE_LASS, $1a + 4, $1d + 4, $ff, $d2, $7 ; person - db SPRITE_SLOWBRO, $1a + 4, $1c + 4, $ff, $d0, $8 ; person - db SPRITE_LASS, $1b + 4, $9 + 4, $fe, $2, $9 ; person - db SPRITE_BLACK_HAIR_BOY_2, $c + 4, $4 + 4, $ff, $d0, $a ; person - db SPRITE_GUARD, $c + 4, $1b + 4, $ff, $d0, $b ; person + db $b ; objects + object SPRITE_BLUE, $14, $2, STAY, DOWN, $1 ; person + object SPRITE_ROCKET, $1e, $8, STAY, NONE, $2, OPP_ROCKET, $5 + object SPRITE_BLACK_HAIR_BOY_1, $1f, $14, STAY, DOWN, $3 ; person + object SPRITE_BLACK_HAIR_BOY_2, $f, $12, WALK, $1, $4 ; person + object SPRITE_BLACK_HAIR_BOY_2, $9, $15, WALK, $2, $5 ; person + object SPRITE_GUARD, $1c, $c, STAY, DOWN, $6 ; person + object SPRITE_LASS, $1d, $1a, STAY, LEFT, $7 ; person + object SPRITE_SLOWBRO, $1c, $1a, STAY, DOWN, $8 ; person + object SPRITE_LASS, $9, $1b, WALK, $2, $9 ; person + object SPRITE_BLACK_HAIR_BOY_2, $4, $c, STAY, DOWN, $a ; person + object SPRITE_GUARD, $1b, $c, STAY, DOWN, $b ; person ; warp-to EVENT_DISP CERULEAN_CITY_WIDTH, $b, $1b ; TRASHED_HOUSE - EVENT_DISP CERULEAN_CITY_WIDTH, $f, $d ; CERULEAN_HOUSE + EVENT_DISP CERULEAN_CITY_WIDTH, $f, $d ; CERULEAN_HOUSE_1 EVENT_DISP CERULEAN_CITY_WIDTH, $11, $13 ; CERULEAN_POKECENTER EVENT_DISP CERULEAN_CITY_WIDTH, $13, $1e ; CERULEAN_GYM EVENT_DISP CERULEAN_CITY_WIDTH, $19, $d ; BIKE_SHOP EVENT_DISP CERULEAN_CITY_WIDTH, $19, $19 ; CERULEAN_MART EVENT_DISP CERULEAN_CITY_WIDTH, $b, $4 ; UNKNOWN_DUNGEON_1 EVENT_DISP CERULEAN_CITY_WIDTH, $9, $1b ; TRASHED_HOUSE - EVENT_DISP CERULEAN_CITY_WIDTH, $b, $9 ; CERULEAN_HOUSE_3 - EVENT_DISP CERULEAN_CITY_WIDTH, $9, $9 ; CERULEAN_HOUSE_3 + EVENT_DISP CERULEAN_CITY_WIDTH, $b, $9 ; CERULEAN_HOUSE_2 + EVENT_DISP CERULEAN_CITY_WIDTH, $9, $9 ; CERULEAN_HOUSE_2 diff --git a/data/mapObjects/ceruleangym.asm b/data/mapObjects/ceruleangym.asm index 87128c5b..66d22260 100755 --- a/data/mapObjects/ceruleangym.asm +++ b/data/mapObjects/ceruleangym.asm @@ -1,4 +1,4 @@ -CeruleanGymObject: ; 0x5c834 (size=50) +CeruleanGymObject: db $3 ; border block db $2 ; warps @@ -7,11 +7,11 @@ CeruleanGymObject: ; 0x5c834 (size=50) db $0 ; signs - db $4 ; people - db SPRITE_BRUNETTE_GIRL, $2 + 4, $4 + 4, $ff, $d0, TRAINER | $1, MISTY + $C8, $1 - db SPRITE_LASS, $3 + 4, $2 + 4, $ff, $d3, TRAINER | $2, JR__TRAINER_F + $C8, $1 - db SPRITE_SWIMMER, $7 + 4, $8 + 4, $ff, $d2, TRAINER | $3, SWIMMER + $C8, $1 - db SPRITE_GYM_HELPER, $a + 4, $7 + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_BRUNETTE_GIRL, $4, $2, STAY, DOWN, $1, OPP_MISTY, $1 + object SPRITE_LASS, $2, $3, STAY, RIGHT, $2, OPP_JR_TRAINER_F, $1 + object SPRITE_SWIMMER, $8, $7, STAY, LEFT, $3, OPP_SWIMMER, $1 + object SPRITE_GYM_HELPER, $7, $a, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP CERULEAN_GYM_WIDTH, $d, $4 diff --git a/data/mapObjects/ceruleanhouse1.asm b/data/mapObjects/ceruleanhouse1.asm index a5d10033..27373825 100755 --- a/data/mapObjects/ceruleanhouse1.asm +++ b/data/mapObjects/ceruleanhouse1.asm @@ -1,4 +1,4 @@ -CeruleanHouse1Object: ; 0x1d710 (size=32) +CeruleanHouse1Object: db $a ; border block db $2 ; warps @@ -7,9 +7,9 @@ CeruleanHouse1Object: ; 0x1d710 (size=32) db $0 ; signs - db $2 ; people - db SPRITE_OLD_MEDIUM_WOMAN, $4 + 4, $5 + 4, $ff, $d2, $1 ; person - db SPRITE_GAMBLER, $2 + 4, $1 + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_OLD_MEDIUM_WOMAN, $5, $4, STAY, LEFT, $1 ; person + object SPRITE_GAMBLER, $1, $2, STAY, NONE, $2 ; person ; warp-to EVENT_DISP CERULEAN_HOUSE_1_WIDTH, $7, $2 diff --git a/data/mapObjects/ceruleanhouse2.asm b/data/mapObjects/ceruleanhouse2.asm index c8c4ee51..669cd098 100755 --- a/data/mapObjects/ceruleanhouse2.asm +++ b/data/mapObjects/ceruleanhouse2.asm @@ -1,4 +1,4 @@ -CeruleanHouse2Object: ; 0x74ebe (size=34) +CeruleanHouse2Object: db $c ; border block db $3 ; warps @@ -8,8 +8,8 @@ CeruleanHouse2Object: ; 0x74ebe (size=34) db $0 ; signs - db $1 ; people - db SPRITE_FAT_BALD_GUY, $3 + 4, $5 + 4, $ff, $d3, $1 ; person + db $1 ; objects + object SPRITE_FAT_BALD_GUY, $5, $3, STAY, RIGHT, $1 ; person ; warp-to EVENT_DISP CERULEAN_HOUSE_2_WIDTH, $0, $2 diff --git a/data/mapObjects/ceruleanhousetrashed.asm b/data/mapObjects/ceruleanhousetrashed.asm index ce5e0e69..4f154191 100755 --- a/data/mapObjects/ceruleanhousetrashed.asm +++ b/data/mapObjects/ceruleanhousetrashed.asm @@ -1,4 +1,4 @@ -CeruleanHouseTrashedObject: ; 0x1d6bf (size=43) +CeruleanHouseTrashedObject: db $a ; border block db $3 ; warps @@ -9,9 +9,9 @@ CeruleanHouseTrashedObject: ; 0x1d6bf (size=43) db $1 ; signs db $0, $3, $3 ; CeruleanHouseTrashedText3 - db $2 ; people - db SPRITE_FISHER, $1 + 4, $2 + 4, $ff, $d0, $1 ; person - db SPRITE_GIRL, $6 + 4, $5 + 4, $fe, $2, $2 ; person + db $2 ; objects + object SPRITE_FISHER, $2, $1, STAY, DOWN, $1 ; person + object SPRITE_GIRL, $5, $6, WALK, $2, $2 ; person ; warp-to EVENT_DISP TRASHED_HOUSE_WIDTH, $7, $2 diff --git a/data/mapObjects/ceruleanmart.asm b/data/mapObjects/ceruleanmart.asm index bc8c4818..301d11a2 100755 --- a/data/mapObjects/ceruleanmart.asm +++ b/data/mapObjects/ceruleanmart.asm @@ -1,4 +1,4 @@ -CeruleanMartObject: ; 0x5c8a8 (size=38) +CeruleanMartObject: db $0 ; border block db $2 ; warps @@ -7,10 +7,10 @@ CeruleanMartObject: ; 0x5c8a8 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_MART_GUY, $5 + 4, $0 + 4, $ff, $d3, $1 ; person - db SPRITE_BLACK_HAIR_BOY_1, $4 + 4, $3 + 4, $fe, $1, $2 ; person - db SPRITE_LASS, $2 + 4, $6 + 4, $fe, $2, $3 ; person + db $3 ; objects + object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person + object SPRITE_BLACK_HAIR_BOY_1, $3, $4, WALK, $1, $2 ; person + object SPRITE_LASS, $6, $2, WALK, $2, $3 ; person ; warp-to EVENT_DISP CERULEAN_MART_WIDTH, $7, $3 diff --git a/data/mapObjects/ceruleanpokecenter.asm b/data/mapObjects/ceruleanpokecenter.asm index c7e8cb8b..1e92ec07 100755 --- a/data/mapObjects/ceruleanpokecenter.asm +++ b/data/mapObjects/ceruleanpokecenter.asm @@ -1,4 +1,4 @@ -CeruleanPokecenterObject: ; 0x5c65f (size=44) +CeruleanPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ CeruleanPokecenterObject: ; 0x5c65f (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_BLACK_HAIR_BOY_2, $5 + 4, $a + 4, $fe, $0, $2 ; person - db SPRITE_GENTLEMAN, $3 + 4, $4 + 4, $ff, $d0, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_BLACK_HAIR_BOY_2, $a, $5, WALK, $0, $2 ; person + object SPRITE_GENTLEMAN, $4, $3, STAY, DOWN, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP CERULEAN_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/cinnabargym.asm b/data/mapObjects/cinnabargym.asm index ba18fdc6..24bdba3d 100755 --- a/data/mapObjects/cinnabargym.asm +++ b/data/mapObjects/cinnabargym.asm @@ -1,4 +1,4 @@ -CinnabarGymObject: ; 0x75acc (size=90) +CinnabarGymObject: db $2e ; border block db $2 ; warps @@ -7,16 +7,16 @@ CinnabarGymObject: ; 0x75acc (size=90) db $0 ; signs - db $9 ; people - db SPRITE_FAT_BALD_GUY, $3 + 4, $3 + 4, $ff, $d0, TRAINER | $1, BLAINE + $C8, $1 - db SPRITE_BLACK_HAIR_BOY_2, $2 + 4, $11 + 4, $ff, $d0, TRAINER | $2, SUPER_NERD + $C8, $9 - db SPRITE_BLACK_HAIR_BOY_2, $8 + 4, $11 + 4, $ff, $d0, TRAINER | $3, BURGLAR + $C8, $4 - db SPRITE_BLACK_HAIR_BOY_2, $4 + 4, $b + 4, $ff, $d0, TRAINER | $4, SUPER_NERD + $C8, $a - db SPRITE_BLACK_HAIR_BOY_2, $8 + 4, $b + 4, $ff, $d0, TRAINER | $5, BURGLAR + $C8, $5 - db SPRITE_BLACK_HAIR_BOY_2, $e + 4, $b + 4, $ff, $d0, TRAINER | $6, SUPER_NERD + $C8, $b - db SPRITE_BLACK_HAIR_BOY_2, $e + 4, $3 + 4, $ff, $d0, TRAINER | $7, BURGLAR + $C8, $6 - db SPRITE_BLACK_HAIR_BOY_2, $8 + 4, $3 + 4, $ff, $d0, TRAINER | $8, SUPER_NERD + $C8, $c - db SPRITE_GYM_HELPER, $d + 4, $10 + 4, $ff, $d0, $9 ; person + db $9 ; objects + object SPRITE_FAT_BALD_GUY, $3, $3, STAY, DOWN, $1, OPP_BLAINE, $1 + object SPRITE_BLACK_HAIR_BOY_2, $11, $2, STAY, DOWN, $2, OPP_SUPER_NERD, $9 + object SPRITE_BLACK_HAIR_BOY_2, $11, $8, STAY, DOWN, $3, OPP_BURGLAR, $4 + object SPRITE_BLACK_HAIR_BOY_2, $b, $4, STAY, DOWN, $4, OPP_SUPER_NERD, $a + object SPRITE_BLACK_HAIR_BOY_2, $b, $8, STAY, DOWN, $5, OPP_BURGLAR, $5 + object SPRITE_BLACK_HAIR_BOY_2, $b, $e, STAY, DOWN, $6, OPP_SUPER_NERD, $b + object SPRITE_BLACK_HAIR_BOY_2, $3, $e, STAY, DOWN, $7, OPP_BURGLAR, $6 + object SPRITE_BLACK_HAIR_BOY_2, $3, $8, STAY, DOWN, $8, OPP_SUPER_NERD, $c + object SPRITE_GYM_HELPER, $10, $d, STAY, DOWN, $9 ; person ; warp-to EVENT_DISP CINNABAR_GYM_WIDTH, $11, $10 diff --git a/data/mapObjects/cinnabarisland.asm b/data/mapObjects/cinnabarisland.asm index f2a53d7c..05f4c06c 100755 --- a/data/mapObjects/cinnabarisland.asm +++ b/data/mapObjects/cinnabarisland.asm @@ -1,4 +1,4 @@ -CinnabarIslandObject: ; 0x1c022 (size=71) +CinnabarIslandObject: db $43 ; border block db $5 ; warps @@ -15,9 +15,9 @@ CinnabarIslandObject: ; 0x1c022 (size=71) db $b, $9, $6 ; CinnabarIslandText6 db $3, $d, $7 ; CinnabarIslandText7 - db $2 ; people - db SPRITE_GIRL, $5 + 4, $c + 4, $fe, $2, $1 ; person - db SPRITE_GAMBLER, $6 + 4, $e + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_GIRL, $c, $5, WALK, $2, $1 ; person + object SPRITE_GAMBLER, $e, $6, STAY, NONE, $2 ; person ; warp-to EVENT_DISP CINNABAR_ISLAND_WIDTH, $3, $6 ; MANSION_1 diff --git a/data/mapObjects/cinnabarmart.asm b/data/mapObjects/cinnabarmart.asm index b976d0be..79494686 100755 --- a/data/mapObjects/cinnabarmart.asm +++ b/data/mapObjects/cinnabarmart.asm @@ -1,4 +1,4 @@ -CinnabarMartObject: ; 0x75e91 (size=38) +CinnabarMartObject: db $0 ; border block db $2 ; warps @@ -7,10 +7,10 @@ CinnabarMartObject: ; 0x75e91 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_MART_GUY, $5 + 4, $0 + 4, $ff, $d3, $1 ; person - db SPRITE_ERIKA, $2 + 4, $6 + 4, $ff, $ff, $2 ; person - db SPRITE_OAK_AIDE, $4 + 4, $3 + 4, $ff, $ff, $3 ; person + db $3 ; objects + object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person + object SPRITE_ERIKA, $6, $2, STAY, NONE, $2 ; person + object SPRITE_OAK_AIDE, $3, $4, STAY, NONE, $3 ; person ; warp-to EVENT_DISP CINNABAR_MART_WIDTH, $7, $3 diff --git a/data/mapObjects/cinnabarpokecenter.asm b/data/mapObjects/cinnabarpokecenter.asm index 35a344e2..7d15f050 100755 --- a/data/mapObjects/cinnabarpokecenter.asm +++ b/data/mapObjects/cinnabarpokecenter.asm @@ -1,4 +1,4 @@ -CinnabarPokecenterObject: ; 0x75e46 (size=44) +CinnabarPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ CinnabarPokecenterObject: ; 0x75e46 (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_LASS, $4 + 4, $9 + 4, $fe, $0, $2 ; person - db SPRITE_GENTLEMAN, $6 + 4, $2 + 4, $ff, $ff, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_LASS, $9, $4, WALK, $0, $2 ; person + object SPRITE_GENTLEMAN, $2, $6, STAY, NONE, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP CINNABAR_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/colosseum.asm b/data/mapObjects/colosseum.asm new file mode 100755 index 00000000..91fea6b9 --- /dev/null +++ b/data/mapObjects/colosseum.asm @@ -0,0 +1,9 @@ +ColosseumObject: + db $e ; border block + + db $0 ; warps + + db $0 ; signs + + db $1 ; objects + object SPRITE_RED, $2, $2, STAY, $0, $1 ; person diff --git a/data/mapObjects/copycatshouse1f.asm b/data/mapObjects/copycatshouse1f.asm index ccd839f8..7d842cad 100755 --- a/data/mapObjects/copycatshouse1f.asm +++ b/data/mapObjects/copycatshouse1f.asm @@ -1,4 +1,4 @@ -CopycatsHouse1FObject: ; 0x75ee3 (size=46) +CopycatsHouse1FObject: db $a ; border block db $3 ; warps @@ -8,10 +8,10 @@ CopycatsHouse1FObject: ; 0x75ee3 (size=46) db $0 ; signs - db $3 ; people - db SPRITE_MOM_GEISHA, $2 + 4, $2 + 4, $ff, $d0, $1 ; person - db SPRITE_FAT_BALD_GUY, $4 + 4, $5 + 4, $ff, $d2, $2 ; person - db SPRITE_CLEFAIRY, $4 + 4, $1 + 4, $fe, $1, $3 ; person + db $3 ; objects + object SPRITE_MOM_GEISHA, $2, $2, STAY, DOWN, $1 ; person + object SPRITE_FAT_BALD_GUY, $5, $4, STAY, LEFT, $2 ; person + object SPRITE_CLEFAIRY, $1, $4, WALK, $1, $3 ; person ; warp-to EVENT_DISP COPYCATS_HOUSE_1F_WIDTH, $7, $2 diff --git a/data/mapObjects/copycatshouse2f.asm b/data/mapObjects/copycatshouse2f.asm index 3d0432c6..0d53965a 100755 --- a/data/mapObjects/copycatshouse2f.asm +++ b/data/mapObjects/copycatshouse2f.asm @@ -1,4 +1,4 @@ -CopycatsHouse2FObject: ; 0x5cd21 (size=48) +CopycatsHouse2FObject: db $a ; border block db $1 ; warps @@ -8,12 +8,12 @@ CopycatsHouse2FObject: ; 0x5cd21 (size=48) db $5, $3, $6 ; CopycatsHouse2FText6 db $1, $0, $7 ; CopycatsHouse2FText7 - db $5 ; people - db SPRITE_BRUNETTE_GIRL, $3 + 4, $4 + 4, $fe, $0, $1 ; person - db SPRITE_BIRD, $6 + 4, $4 + 4, $fe, $2, $2 ; person - db SPRITE_SLOWBRO, $1 + 4, $5 + 4, $ff, $d0, $3 ; person - db SPRITE_BIRD, $0 + 4, $2 + 4, $ff, $d0, $4 ; person - db SPRITE_CLEFAIRY, $6 + 4, $1 + 4, $ff, $d3, $5 ; person + db $5 ; objects + object SPRITE_BRUNETTE_GIRL, $4, $3, WALK, $0, $1 ; person + object SPRITE_BIRD, $4, $6, WALK, $2, $2 ; person + object SPRITE_SLOWBRO, $5, $1, STAY, DOWN, $3 ; person + object SPRITE_BIRD, $2, $0, STAY, DOWN, $4 ; person + object SPRITE_CLEFAIRY, $1, $6, STAY, RIGHT, $5 ; person ; warp-to EVENT_DISP COPYCATS_HOUSE_2F_WIDTH, $1, $7 ; COPYCATS_HOUSE_1F diff --git a/data/mapObjects/daycarem.asm b/data/mapObjects/daycarem.asm index 8311853a..98d4c184 100755 --- a/data/mapObjects/daycarem.asm +++ b/data/mapObjects/daycarem.asm @@ -1,4 +1,4 @@ -DayCareMObject: ; 0x56459 (size=26) +DayCareMObject: db $a ; border block db $2 ; warps @@ -7,8 +7,8 @@ DayCareMObject: ; 0x56459 (size=26) db $0 ; signs - db $1 ; people - db SPRITE_GENTLEMAN, $3 + 4, $2 + 4, $ff, $d3, $1 ; person + db $1 ; objects + object SPRITE_GENTLEMAN, $2, $3, STAY, RIGHT, $1 ; person ; warp-to EVENT_DISP DAYCAREM_WIDTH, $7, $2 diff --git a/data/mapObjects/diglettscave.asm b/data/mapObjects/diglettscave.asm index 858005ce..cdcffce0 100755 --- a/data/mapObjects/diglettscave.asm +++ b/data/mapObjects/diglettscave.asm @@ -1,4 +1,4 @@ -DiglettsCaveObject: ; 0x61f72 (size=20) +DiglettsCaveObject: db $19 ; border block db $2 ; warps @@ -7,7 +7,7 @@ DiglettsCaveObject: ; 0x61f72 (size=20) db $0 ; signs - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP DIGLETTS_CAVE_WIDTH, $5, $5 ; DIGLETTS_CAVE_EXIT diff --git a/data/mapObjects/diglettscaveroute11.asm b/data/mapObjects/diglettscaveroute11.asm index e232b1cc..e5d6b69f 100755 --- a/data/mapObjects/diglettscaveroute11.asm +++ b/data/mapObjects/diglettscaveroute11.asm @@ -1,4 +1,4 @@ -DiglettsCaveEntranceRoute11Object: ; 0x1e5ca (size=34) +DiglettsCaveEntranceRoute11Object: db $7d ; border block db $3 ; warps @@ -8,8 +8,8 @@ DiglettsCaveEntranceRoute11Object: ; 0x1e5ca (size=34) db $0 ; signs - db $1 ; people - db SPRITE_GAMBLER, $3 + 4, $2 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_GAMBLER, $2, $3, STAY, NONE, $1 ; person ; warp-to EVENT_DISP DIGLETTS_CAVE_ENTRANCE_WIDTH, $7, $2 diff --git a/data/mapObjects/diglettscaveroute2.asm b/data/mapObjects/diglettscaveroute2.asm index 2e86600f..f1310cce 100755 --- a/data/mapObjects/diglettscaveroute2.asm +++ b/data/mapObjects/diglettscaveroute2.asm @@ -1,4 +1,4 @@ -DiglettsCaveRoute2Object: ; 0x1debf (size=34) +DiglettsCaveRoute2Object: db $7d ; border block db $3 ; warps @@ -8,8 +8,8 @@ DiglettsCaveRoute2Object: ; 0x1debf (size=34) db $0 ; signs - db $1 ; people - db SPRITE_FISHER, $3 + 4, $3 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_FISHER, $3, $3, STAY, NONE, $1 ; person ; warp-to EVENT_DISP DIGLETTS_CAVE_EXIT_WIDTH, $7, $2 diff --git a/data/mapObjects/fanclub.asm b/data/mapObjects/fanclub.asm index 15b9a89f..f0f544ef 100755 --- a/data/mapObjects/fanclub.asm +++ b/data/mapObjects/fanclub.asm @@ -1,4 +1,4 @@ -FanClubObject: ; 0x59c97 (size=62) +FanClubObject: db $d ; border block db $2 ; warps @@ -9,13 +9,13 @@ FanClubObject: ; 0x59c97 (size=62) db $0, $1, $7 ; FanClubText7 db $0, $6, $8 ; FanClubText8 - db $6 ; people - db SPRITE_FISHER2, $3 + 4, $6 + 4, $ff, $d2, $1 ; person - db SPRITE_GIRL, $3 + 4, $1 + 4, $ff, $d3, $2 ; person - db SPRITE_CLEFAIRY, $4 + 4, $6 + 4, $ff, $d2, $3 ; person - db SPRITE_SEEL, $4 + 4, $1 + 4, $ff, $d3, $4 ; person - db SPRITE_GENTLEMAN, $1 + 4, $3 + 4, $ff, $d0, $5 ; person - db SPRITE_CABLE_CLUB_WOMAN, $1 + 4, $5 + 4, $ff, $d0, $6 ; person + db $6 ; objects + object SPRITE_FISHER2, $6, $3, STAY, LEFT, $1 ; person + object SPRITE_GIRL, $1, $3, STAY, RIGHT, $2 ; person + object SPRITE_CLEFAIRY, $6, $4, STAY, LEFT, $3 ; person + object SPRITE_SEEL, $1, $4, STAY, RIGHT, $4 ; person + object SPRITE_GENTLEMAN, $3, $1, STAY, DOWN, $5 ; person + object SPRITE_CABLE_CLUB_WOMAN, $5, $1, STAY, DOWN, $6 ; person ; warp-to EVENT_DISP POKEMON_FAN_CLUB_WIDTH, $7, $2 diff --git a/data/mapObjects/fightingdojo.asm b/data/mapObjects/fightingdojo.asm index f84f3ee7..44fed88f 100755 --- a/data/mapObjects/fightingdojo.asm +++ b/data/mapObjects/fightingdojo.asm @@ -1,4 +1,4 @@ -FightingDojoObject: ; 0x5cf9b (size=72) +FightingDojoObject: db $3 ; border block db $2 ; warps @@ -7,14 +7,14 @@ FightingDojoObject: ; 0x5cf9b (size=72) db $0 ; signs - db $7 ; people - db SPRITE_HIKER, $3 + 4, $5 + 4, $ff, $d0, TRAINER | $1, BLACKBELT + $C8, $1 - db SPRITE_HIKER, $4 + 4, $3 + 4, $ff, $d3, TRAINER | $2, BLACKBELT + $C8, $2 - db SPRITE_HIKER, $6 + 4, $3 + 4, $ff, $d3, TRAINER | $3, BLACKBELT + $C8, $3 - db SPRITE_HIKER, $5 + 4, $5 + 4, $ff, $d2, TRAINER | $4, BLACKBELT + $C8, $4 - db SPRITE_HIKER, $7 + 4, $5 + 4, $ff, $d2, TRAINER | $5, BLACKBELT + $C8, $5 - db SPRITE_BALL, $1 + 4, $4 + 4, $ff, $ff, $6 ; person - db SPRITE_BALL, $1 + 4, $5 + 4, $ff, $ff, $7 ; person + db $7 ; objects + object SPRITE_HIKER, $5, $3, STAY, DOWN, $1, OPP_BLACKBELT, $1 + object SPRITE_HIKER, $3, $4, STAY, RIGHT, $2, OPP_BLACKBELT, $2 + object SPRITE_HIKER, $3, $6, STAY, RIGHT, $3, OPP_BLACKBELT, $3 + object SPRITE_HIKER, $5, $5, STAY, LEFT, $4, OPP_BLACKBELT, $4 + object SPRITE_HIKER, $5, $7, STAY, LEFT, $5, OPP_BLACKBELT, $5 + object SPRITE_BALL, $4, $1, STAY, NONE, $6 ; person + object SPRITE_BALL, $5, $1, STAY, NONE, $7 ; person ; warp-to EVENT_DISP FIGHTING_DOJO_WIDTH, $b, $4 diff --git a/data/mapObjects/fuchsiacity.asm b/data/mapObjects/fuchsiacity.asm index f6ce2ec3..bcca4004 100755 --- a/data/mapObjects/fuchsiacity.asm +++ b/data/mapObjects/fuchsiacity.asm @@ -1,4 +1,4 @@ -FuchsiaCityObject: ; 0x18bd4 (size=178) +FuchsiaCityObject: db $f ; border block db $9 ; warps @@ -28,17 +28,17 @@ FuchsiaCityObject: ; 0x18bd4 (size=178) db $f, $d, $17 ; FuchsiaCityText23 db $7, $7, $18 ; FuchsiaCityText24 - db $a ; people - db SPRITE_BUG_CATCHER, $c + 4, $a + 4, $fe, $2, $1 ; person - db SPRITE_GAMBLER, $11 + 4, $1c + 4, $fe, $2, $2 ; person - db SPRITE_FISHER2, $e + 4, $1e + 4, $ff, $d0, $3 ; person - db SPRITE_BUG_CATCHER, $8 + 4, $18 + 4, $ff, $d1, $4 ; person - db SPRITE_CLEFAIRY, $5 + 4, $1f + 4, $fe, $0, $5 ; person - db SPRITE_BALL, $6 + 4, $19 + 4, $ff, $ff, $6 ; person - db SPRITE_SLOWBRO, $6 + 4, $c + 4, $fe, $2, $7 ; person - db SPRITE_SLOWBRO, $c + 4, $1e + 4, $fe, $2, $8 ; person - db SPRITE_SEEL, $11 + 4, $8 + 4, $fe, $0, $9 ; person - db SPRITE_OMANYTE, $5 + 4, $6 + 4, $ff, $ff, $a ; person + db $a ; objects + object SPRITE_BUG_CATCHER, $a, $c, WALK, $2, $1 ; person + object SPRITE_GAMBLER, $1c, $11, WALK, $2, $2 ; person + object SPRITE_FISHER2, $1e, $e, STAY, DOWN, $3 ; person + object SPRITE_BUG_CATCHER, $18, $8, STAY, UP, $4 ; person + object SPRITE_CLEFAIRY, $1f, $5, WALK, $0, $5 ; person + object SPRITE_BALL, $19, $6, STAY, NONE, $6 ; person + object SPRITE_SLOWBRO, $c, $6, WALK, $2, $7 ; person + object SPRITE_SLOWBRO, $1e, $c, WALK, $2, $8 ; person + object SPRITE_SEEL, $8, $11, WALK, $0, $9 ; person + object SPRITE_OMANYTE, $6, $5, STAY, NONE, $a ; person ; warp-to EVENT_DISP FUCHSIA_CITY_WIDTH, $d, $5 ; FUCHSIA_MART diff --git a/data/mapObjects/fuchsiagym.asm b/data/mapObjects/fuchsiagym.asm index e48c597c..023c23d3 100755 --- a/data/mapObjects/fuchsiagym.asm +++ b/data/mapObjects/fuchsiagym.asm @@ -1,4 +1,4 @@ -FuchsiaGymObject: ; 0x75658 (size=82) +FuchsiaGymObject: db $3 ; border block db $2 ; warps @@ -7,15 +7,15 @@ FuchsiaGymObject: ; 0x75658 (size=82) db $0 ; signs - db $8 ; people - db SPRITE_BLACKBELT, $a + 4, $4 + 4, $ff, $d0, TRAINER | $1, KOGA + $C8, $1 - db SPRITE_ROCKER, $d + 4, $8 + 4, $ff, $d0, TRAINER | $2, JUGGLER + $C8, $7 - db SPRITE_ROCKER, $8 + 4, $7 + 4, $ff, $d3, TRAINER | $3, JUGGLER + $C8, $3 - db SPRITE_ROCKER, $c + 4, $1 + 4, $ff, $d0, TRAINER | $4, JUGGLER + $C8, $8 - db SPRITE_ROCKER, $5 + 4, $3 + 4, $ff, $d1, TRAINER | $5, TAMER + $C8, $1 - db SPRITE_ROCKER, $2 + 4, $8 + 4, $ff, $d0, TRAINER | $6, TAMER + $C8, $2 - db SPRITE_ROCKER, $7 + 4, $2 + 4, $ff, $d2, TRAINER | $7, JUGGLER + $C8, $4 - db SPRITE_GYM_HELPER, $f + 4, $7 + 4, $ff, $d0, $8 ; person + db $8 ; objects + object SPRITE_BLACKBELT, $4, $a, STAY, DOWN, $1, OPP_KOGA, $1 + object SPRITE_ROCKER, $8, $d, STAY, DOWN, $2, OPP_JUGGLER, $7 + object SPRITE_ROCKER, $7, $8, STAY, RIGHT, $3, OPP_JUGGLER, $3 + object SPRITE_ROCKER, $1, $c, STAY, DOWN, $4, OPP_JUGGLER, $8 + object SPRITE_ROCKER, $3, $5, STAY, UP, $5, OPP_TAMER, $1 + object SPRITE_ROCKER, $8, $2, STAY, DOWN, $6, OPP_TAMER, $2 + object SPRITE_ROCKER, $2, $7, STAY, LEFT, $7, OPP_JUGGLER, $4 + object SPRITE_GYM_HELPER, $7, $f, STAY, DOWN, $8 ; person ; warp-to EVENT_DISP FUCHSIA_GYM_WIDTH, $11, $4 diff --git a/data/mapObjects/fuchsiahouse1.asm b/data/mapObjects/fuchsiahouse1.asm index 4e3ec676..4d3c3b6e 100755 --- a/data/mapObjects/fuchsiahouse1.asm +++ b/data/mapObjects/fuchsiahouse1.asm @@ -1,4 +1,4 @@ -FuchsiaHouse1Object: ; 0x75031 (size=38) +FuchsiaHouse1Object: db $a ; border block db $2 ; warps @@ -7,10 +7,10 @@ FuchsiaHouse1Object: ; 0x75031 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_MOM_GEISHA, $3 + 4, $2 + 4, $ff, $d3, $1 ; person - db SPRITE_GAMBLER, $2 + 4, $7 + 4, $ff, $d1, $2 ; person - db SPRITE_BUG_CATCHER, $5 + 4, $5 + 4, $ff, $ff, $3 ; person + db $3 ; objects + object SPRITE_MOM_GEISHA, $2, $3, STAY, RIGHT, $1 ; person + object SPRITE_GAMBLER, $7, $2, STAY, UP, $2 ; person + object SPRITE_BUG_CATCHER, $5, $5, STAY, NONE, $3 ; person ; warp-to EVENT_DISP FUCHSIA_HOUSE_1_WIDTH, $7, $2 diff --git a/data/mapObjects/fuchsiahouse2.asm b/data/mapObjects/fuchsiahouse2.asm index f2958f02..3a3d07c3 100755 --- a/data/mapObjects/fuchsiahouse2.asm +++ b/data/mapObjects/fuchsiahouse2.asm @@ -1,4 +1,4 @@ -FuchsiaHouse2Object: ; 0x75180 (size=45) +FuchsiaHouse2Object: db $17 ; border block db $2 ; warps @@ -9,10 +9,10 @@ FuchsiaHouse2Object: ; 0x75180 (size=45) db $3, $4, $4 ; FuchsiaHouse2Text4 db $3, $5, $5 ; FuchsiaHouse2Text5 - db $3 ; people - db SPRITE_WARDEN, $3 + 4, $2 + 4, $ff, $ff, $1 ; person - db SPRITE_BALL, $3 + 4, $8 + 4, $ff, $ff, ITEM | $2, RARE_CANDY - db SPRITE_BOULDER, $4 + 4, $8 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $3 ; person + db $3 ; objects + object SPRITE_WARDEN, $2, $3, STAY, NONE, $1 ; person + object SPRITE_BALL, $8, $3, STAY, NONE, $2, RARE_CANDY + object SPRITE_BOULDER, $8, $4, STAY, BOULDER_MOVEMENT_BYTE_2, $3 ; person ; warp-to EVENT_DISP FUCHSIA_HOUSE_2_WIDTH, $7, $4 diff --git a/data/mapObjects/fuchsiahouse3.asm b/data/mapObjects/fuchsiahouse3.asm index 141f895f..aaf05bd6 100755 --- a/data/mapObjects/fuchsiahouse3.asm +++ b/data/mapObjects/fuchsiahouse3.asm @@ -1,4 +1,4 @@ -FuchsiaHouse3Object: ; 0x56221 (size=34) +FuchsiaHouse3Object: db $c ; border block db $3 ; warps @@ -8,8 +8,8 @@ FuchsiaHouse3Object: ; 0x56221 (size=34) db $0 ; signs - db $1 ; people - db SPRITE_FISHER, $3 + 4, $5 + 4, $ff, $d3, $1 ; person + db $1 ; objects + object SPRITE_FISHER, $5, $3, STAY, RIGHT, $1 ; person ; warp-to EVENT_DISP FUCHSIA_HOUSE_3_WIDTH, $0, $2 diff --git a/data/mapObjects/fuchsiamart.asm b/data/mapObjects/fuchsiamart.asm index cb859734..431e7c2f 100755 --- a/data/mapObjects/fuchsiamart.asm +++ b/data/mapObjects/fuchsiamart.asm @@ -1,4 +1,4 @@ -FuchsiaMartObject: ; 0x1dd9b (size=38) +FuchsiaMartObject: db $0 ; border block db $2 ; warps @@ -7,10 +7,10 @@ FuchsiaMartObject: ; 0x1dd9b (size=38) db $0 ; signs - db $3 ; people - db SPRITE_MART_GUY, $5 + 4, $0 + 4, $ff, $d3, $1 ; person - db SPRITE_FAT_BALD_GUY, $2 + 4, $4 + 4, $ff, $ff, $2 ; person - db SPRITE_LASS, $5 + 4, $6 + 4, $fe, $1, $3 ; person + db $3 ; objects + object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person + object SPRITE_FAT_BALD_GUY, $4, $2, STAY, NONE, $2 ; person + object SPRITE_LASS, $6, $5, WALK, $1, $3 ; person ; warp-to EVENT_DISP FUCHSIA_MART_WIDTH, $7, $3 diff --git a/data/mapObjects/fuchsiameetingroom.asm b/data/mapObjects/fuchsiameetingroom.asm index fb243f4b..8106b9ec 100755 --- a/data/mapObjects/fuchsiameetingroom.asm +++ b/data/mapObjects/fuchsiameetingroom.asm @@ -1,4 +1,4 @@ -FuchsiaMeetingRoomObject: ; 0x756fc (size=38) +FuchsiaMeetingRoomObject: db $17 ; border block db $2 ; warps @@ -7,10 +7,10 @@ FuchsiaMeetingRoomObject: ; 0x756fc (size=38) db $0 ; signs - db $3 ; people - db SPRITE_WHITE_PLAYER, $1 + 4, $4 + 4, $ff, $d0, $1 ; person - db SPRITE_WHITE_PLAYER, $2 + 4, $0 + 4, $ff, $d1, $2 ; person - db SPRITE_WHITE_PLAYER, $1 + 4, $a + 4, $ff, $d0, $3 ; person + db $3 ; objects + object SPRITE_WHITE_PLAYER, $4, $1, STAY, DOWN, $1 ; person + object SPRITE_WHITE_PLAYER, $0, $2, STAY, UP, $2 ; person + object SPRITE_WHITE_PLAYER, $a, $1, STAY, DOWN, $3 ; person ; warp-to EVENT_DISP FUCHSIA_MEETING_ROOM_WIDTH, $7, $4 diff --git a/data/mapObjects/fuchsiapokecenter.asm b/data/mapObjects/fuchsiapokecenter.asm index 1efcd255..8cf103fa 100755 --- a/data/mapObjects/fuchsiapokecenter.asm +++ b/data/mapObjects/fuchsiapokecenter.asm @@ -1,4 +1,4 @@ -FuchsiaPokecenterObject: ; 0x7507d (size=44) +FuchsiaPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ FuchsiaPokecenterObject: ; 0x7507d (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_ROCKER, $3 + 4, $2 + 4, $ff, $ff, $2 ; person - db SPRITE_LASS, $5 + 4, $6 + 4, $fe, $2, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_ROCKER, $2, $3, STAY, NONE, $2 ; person + object SPRITE_LASS, $6, $5, WALK, $2, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP FUCHSIA_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/gary.asm b/data/mapObjects/gary.asm index e94ad9b3..e0f37b91 100755 --- a/data/mapObjects/gary.asm +++ b/data/mapObjects/gary.asm @@ -1,4 +1,4 @@ -GaryObject: ; 0x7612f (size=48) +GaryObject: db $3 ; border block db $4 ; warps @@ -9,9 +9,9 @@ GaryObject: ; 0x7612f (size=48) db $0 ; signs - db $2 ; people - db SPRITE_BLUE, $2 + 4, $4 + 4, $ff, $d0, $1 ; person - db SPRITE_OAK, $7 + 4, $3 + 4, $ff, $d1, $2 ; person + db $2 ; objects + object SPRITE_BLUE, $4, $2, STAY, DOWN, $1 ; person + object SPRITE_OAK, $3, $7, STAY, UP, $2 ; person ; warp-to EVENT_DISP CHAMPIONS_ROOM_WIDTH, $7, $3 ; LANCES_ROOM diff --git a/data/mapObjects/halloffameroom.asm b/data/mapObjects/halloffameroom.asm index 6d528135..8e245c2c 100755 --- a/data/mapObjects/halloffameroom.asm +++ b/data/mapObjects/halloffameroom.asm @@ -1,4 +1,4 @@ -HallofFameRoomObject: ; 0x5a571 (size=26) +HallofFameRoomObject: db $3 ; border block db $2 ; warps @@ -7,8 +7,8 @@ HallofFameRoomObject: ; 0x5a571 (size=26) db $0 ; signs - db $1 ; people - db SPRITE_OAK, $2 + 4, $5 + 4, $ff, $d0, $1 ; person + db $1 ; objects + object SPRITE_OAK, $5, $2, STAY, DOWN, $1 ; person ; warp-to EVENT_DISP HALL_OF_FAME_WIDTH, $7, $4 ; CHAMPIONS_ROOM diff --git a/data/mapObjects/indigoplateau.asm b/data/mapObjects/indigoplateau.asm index 6970963f..145f2f39 100755 --- a/data/mapObjects/indigoplateau.asm +++ b/data/mapObjects/indigoplateau.asm @@ -1,4 +1,4 @@ -IndigoPlateauObject: ; 0x50936 (size=20) +IndigoPlateauObject: db $e ; border block db $2 ; warps @@ -7,7 +7,7 @@ IndigoPlateauObject: ; 0x50936 (size=20) db $0 ; signs - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP INDIGO_PLATEAU_WIDTH, $5, $9 ; INDIGO_PLATEAU_LOBBY diff --git a/data/mapObjects/indigoplateaulobby.asm b/data/mapObjects/indigoplateaulobby.asm index 6b9c1e99..13438153 100755 --- a/data/mapObjects/indigoplateaulobby.asm +++ b/data/mapObjects/indigoplateaulobby.asm @@ -1,4 +1,4 @@ -IndigoPlateauLobbyObject: ; 0x19c95 (size=58) +IndigoPlateauLobbyObject: db $0 ; border block db $3 ; warps @@ -8,12 +8,12 @@ IndigoPlateauLobbyObject: ; 0x19c95 (size=58) db $0 ; signs - db $5 ; people - db SPRITE_NURSE, $5 + 4, $7 + 4, $ff, $d0, $1 ; person - db SPRITE_GYM_HELPER, $9 + 4, $4 + 4, $ff, $d3, $2 ; person - db SPRITE_LASS, $1 + 4, $5 + 4, $ff, $d0, $3 ; person - db SPRITE_MART_GUY, $5 + 4, $0 + 4, $ff, $d3, $4 ; person - db SPRITE_CABLE_CLUB_WOMAN, $6 + 4, $d + 4, $ff, $d0, $5 ; person + db $5 ; objects + object SPRITE_NURSE, $7, $5, STAY, DOWN, $1 ; person + object SPRITE_GYM_HELPER, $4, $9, STAY, RIGHT, $2 ; person + object SPRITE_LASS, $5, $1, STAY, DOWN, $3 ; person + object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $4 ; person + object SPRITE_CABLE_CLUB_WOMAN, $d, $6, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP INDIGO_PLATEAU_LOBBY_WIDTH, $b, $7 diff --git a/data/mapObjects/lab1.asm b/data/mapObjects/lab1.asm index 52db2e24..e0adaedc 100755 --- a/data/mapObjects/lab1.asm +++ b/data/mapObjects/lab1.asm @@ -1,4 +1,4 @@ -Lab1Object: ; 0x75bb3 (size=62) +Lab1Object: db $17 ; border block db $5 ; warps @@ -14,8 +14,8 @@ Lab1Object: ; 0x75bb3 (size=62) db $4, $d, $4 ; Lab1Text4 db $4, $11, $5 ; Lab1Text5 - db $1 ; people - db SPRITE_FISHER, $3 + 4, $1 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_FISHER, $1, $3, STAY, NONE, $1 ; person ; warp-to EVENT_DISP CINNABAR_LAB_1_WIDTH, $7, $2 diff --git a/data/mapObjects/lab2.asm b/data/mapObjects/lab2.asm index 52556c69..ed541ada 100755 --- a/data/mapObjects/lab2.asm +++ b/data/mapObjects/lab2.asm @@ -1,4 +1,4 @@ -Lab2Object: ; 0x75c45 (size=38) +Lab2Object: db $17 ; border block db $2 ; warps @@ -7,10 +7,10 @@ Lab2Object: ; 0x75c45 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_BLACK_HAIR_BOY_2, $2 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_OLD_PERSON, $4 + 4, $1 + 4, $ff, $ff, $2 ; person - db SPRITE_FOULARD_WOMAN, $5 + 4, $5 + 4, $ff, $d1, $3 ; person + db $3 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $3, $2, STAY, DOWN, $1 ; person + object SPRITE_OLD_PERSON, $1, $4, STAY, NONE, $2 ; person + object SPRITE_FOULARD_WOMAN, $5, $5, STAY, UP, $3 ; person ; warp-to EVENT_DISP CINNABAR_LAB_2_WIDTH, $7, $2 ; CINNABAR_LAB_1 diff --git a/data/mapObjects/lab3.asm b/data/mapObjects/lab3.asm index 8b4396cc..c5ee01c3 100755 --- a/data/mapObjects/lab3.asm +++ b/data/mapObjects/lab3.asm @@ -1,4 +1,4 @@ -Lab3Object: ; 0x75cec (size=41) +Lab3Object: db $17 ; border block db $2 ; warps @@ -10,9 +10,9 @@ Lab3Object: ; 0x75cec (size=41) db $4, $1, $4 ; Lab3Text4 db $1, $2, $5 ; Lab3Text5 - db $2 ; people - db SPRITE_OAK_AIDE, $2 + 4, $7 + 4, $ff, $d0, $1 ; person - db SPRITE_OAK_AIDE, $3 + 4, $2 + 4, $fe, $2, $2 ; person + db $2 ; objects + object SPRITE_OAK_AIDE, $7, $2, STAY, DOWN, $1 ; person + object SPRITE_OAK_AIDE, $2, $3, WALK, $2, $2 ; person ; warp-to EVENT_DISP CINNABAR_LAB_3_WIDTH, $7, $2 ; CINNABAR_LAB_1 diff --git a/data/mapObjects/lab4.asm b/data/mapObjects/lab4.asm index 66b73ebd..361f9533 100755 --- a/data/mapObjects/lab4.asm +++ b/data/mapObjects/lab4.asm @@ -1,4 +1,4 @@ -Lab4Object: ; 0x75df0 (size=32) +Lab4Object: db $17 ; border block db $2 ; warps @@ -7,9 +7,9 @@ Lab4Object: ; 0x75df0 (size=32) db $0 ; signs - db $2 ; people - db SPRITE_OAK_AIDE, $2 + 4, $5 + 4, $fe, $2, $1 ; person - db SPRITE_OAK_AIDE, $6 + 4, $7 + 4, $ff, $d1, $2 ; person + db $2 ; objects + object SPRITE_OAK_AIDE, $5, $2, WALK, $2, $1 ; person + object SPRITE_OAK_AIDE, $7, $6, STAY, UP, $2 ; person ; warp-to EVENT_DISP CINNABAR_LAB_4_WIDTH, $7, $2 ; CINNABAR_LAB_1 diff --git a/data/mapObjects/lance.asm b/data/mapObjects/lance.asm index e4ae6dfb..e7bf0ad6 100755 --- a/data/mapObjects/lance.asm +++ b/data/mapObjects/lance.asm @@ -1,4 +1,4 @@ -LanceObject: ; 0x5a3c5 (size=36) +LanceObject: db $3 ; border block db $3 ; warps @@ -8,8 +8,8 @@ LanceObject: ; 0x5a3c5 (size=36) db $0 ; signs - db $1 ; people - db SPRITE_LANCE, $1 + 4, $6 + 4, $ff, $d0, TRAINER | $1, LANCE + $C8, $1 + db $1 ; objects + object SPRITE_LANCE, $6, $1, STAY, DOWN, $1, OPP_LANCE, $1 ; warp-to EVENT_DISP LANCES_ROOM_WIDTH, $10, $18 ; AGATHAS_ROOM diff --git a/data/mapObjects/lavenderhouse1.asm b/data/mapObjects/lavenderhouse1.asm index 4472c7ed..54f57270 100755 --- a/data/mapObjects/lavenderhouse1.asm +++ b/data/mapObjects/lavenderhouse1.asm @@ -1,4 +1,4 @@ -LavenderHouse1Object: ; 0x1d96a (size=56) +LavenderHouse1Object: db $a ; border block db $2 ; warps @@ -7,13 +7,13 @@ LavenderHouse1Object: ; 0x1d96a (size=56) db $0 ; signs - db $6 ; people - db SPRITE_BLACK_HAIR_BOY_2, $5 + 4, $3 + 4, $ff, $ff, $1 ; person - db SPRITE_LITTLE_GIRL, $3 + 4, $6 + 4, $ff, $d0, $2 ; person - db SPRITE_SLOWBRO, $4 + 4, $6 + 4, $ff, $d1, $3 ; person - db SPRITE_SLOWBRO, $3 + 4, $1 + 4, $ff, $ff, $4 ; person - db SPRITE_MR_FUJI, $1 + 4, $3 + 4, $ff, $ff, $5 ; person - db SPRITE_BOOK_MAP_DEX, $3 + 4, $3 + 4, $ff, $ff, $6 ; person + db $6 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $3, $5, STAY, NONE, $1 ; person + object SPRITE_LITTLE_GIRL, $6, $3, STAY, DOWN, $2 ; person + object SPRITE_SLOWBRO, $6, $4, STAY, UP, $3 ; person + object SPRITE_SLOWBRO, $1, $3, STAY, NONE, $4 ; person + object SPRITE_MR_FUJI, $3, $1, STAY, NONE, $5 ; person + object SPRITE_BOOK_MAP_DEX, $3, $3, STAY, NONE, $6 ; person ; warp-to EVENT_DISP LAVENDER_HOUSE_1_WIDTH, $7, $2 diff --git a/data/mapObjects/lavenderhouse2.asm b/data/mapObjects/lavenderhouse2.asm index cbb7dda7..7638ff66 100755 --- a/data/mapObjects/lavenderhouse2.asm +++ b/data/mapObjects/lavenderhouse2.asm @@ -1,4 +1,4 @@ -LavenderHouse2Object: ; 0x1d9e6 (size=32) +LavenderHouse2Object: db $a ; border block db $2 ; warps @@ -7,9 +7,9 @@ LavenderHouse2Object: ; 0x1d9e6 (size=32) db $0 ; signs - db $2 ; people - db SPRITE_SLOWBRO, $5 + 4, $3 + 4, $ff, $d1, $1 ; person - db SPRITE_BRUNETTE_GIRL, $4 + 4, $2 + 4, $ff, $d3, $2 ; person + db $2 ; objects + object SPRITE_SLOWBRO, $3, $5, STAY, UP, $1 ; person + object SPRITE_BRUNETTE_GIRL, $2, $4, STAY, RIGHT, $2 ; person ; warp-to EVENT_DISP LAVENDER_HOUSE_2_WIDTH, $7, $2 diff --git a/data/mapObjects/lavendermart.asm b/data/mapObjects/lavendermart.asm index 79d80c35..2d8e7636 100755 --- a/data/mapObjects/lavendermart.asm +++ b/data/mapObjects/lavendermart.asm @@ -1,4 +1,4 @@ -LavenderMartObject: ; 0x5c95d (size=38) +LavenderMartObject: db $0 ; border block db $2 ; warps @@ -7,10 +7,10 @@ LavenderMartObject: ; 0x5c95d (size=38) db $0 ; signs - db $3 ; people - db SPRITE_MART_GUY, $5 + 4, $0 + 4, $ff, $d3, $1 ; person - db SPRITE_BALDING_GUY, $4 + 4, $3 + 4, $ff, $ff, $2 ; person - db SPRITE_BLACK_HAIR_BOY_1, $2 + 4, $7 + 4, $ff, $ff, $3 ; person + db $3 ; objects + object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person + object SPRITE_BALDING_GUY, $3, $4, STAY, NONE, $2 ; person + object SPRITE_BLACK_HAIR_BOY_1, $7, $2, STAY, NONE, $3 ; person ; warp-to EVENT_DISP LAVENDER_MART_WIDTH, $7, $3 diff --git a/data/mapObjects/lavenderpokecenter.asm b/data/mapObjects/lavenderpokecenter.asm index a35bf4dc..617e7fb8 100755 --- a/data/mapObjects/lavenderpokecenter.asm +++ b/data/mapObjects/lavenderpokecenter.asm @@ -1,4 +1,4 @@ -LavenderPokecenterObject: ; 0x5c8f4 (size=44) +LavenderPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ LavenderPokecenterObject: ; 0x5c8f4 (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_GENTLEMAN, $3 + 4, $5 + 4, $ff, $ff, $2 ; person - db SPRITE_LITTLE_GIRL, $6 + 4, $2 + 4, $fe, $1, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_GENTLEMAN, $5, $3, STAY, NONE, $2 ; person + object SPRITE_LITTLE_GIRL, $2, $6, WALK, $1, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP LAVENDER_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/lavendertown.asm b/data/mapObjects/lavendertown.asm index 7dc75512..49347aba 100755 --- a/data/mapObjects/lavendertown.asm +++ b/data/mapObjects/lavendertown.asm @@ -1,4 +1,4 @@ -LavenderTownObject: ; 0x4402d (size=88) +LavenderTownObject: db $2c ; border block db $6 ; warps @@ -17,10 +17,10 @@ LavenderTownObject: ; 0x4402d (size=88) db $9, $5, $8 ; LavenderTownText8 db $7, $11, $9 ; LavenderTownText9 - db $3 ; people - db SPRITE_LITTLE_GIRL, $9 + 4, $f + 4, $fe, $0, $1 ; person - db SPRITE_BLACK_HAIR_BOY_1, $a + 4, $9 + 4, $ff, $ff, $2 ; person - db SPRITE_BLACK_HAIR_BOY_2, $7 + 4, $8 + 4, $fe, $2, $3 ; person + db $3 ; objects + object SPRITE_LITTLE_GIRL, $f, $9, WALK, $0, $1 ; person + object SPRITE_BLACK_HAIR_BOY_1, $9, $a, STAY, NONE, $2 ; person + object SPRITE_BLACK_HAIR_BOY_2, $8, $7, WALK, $2, $3 ; person ; warp-to EVENT_DISP LAVENDER_TOWN_WIDTH, $5, $3 ; LAVENDER_POKECENTER diff --git a/data/mapObjects/lorelei.asm b/data/mapObjects/lorelei.asm index 074063bf..5b985369 100755 --- a/data/mapObjects/lorelei.asm +++ b/data/mapObjects/lorelei.asm @@ -1,4 +1,4 @@ -LoreleiObject: ; 0x76280 (size=44) +LoreleiObject: db $3 ; border block db $4 ; warps @@ -9,8 +9,8 @@ LoreleiObject: ; 0x76280 (size=44) db $0 ; signs - db $1 ; people - db SPRITE_LORELEI, $2 + 4, $5 + 4, $ff, $d0, TRAINER | $1, LORELEI + $C8, $1 + db $1 ; objects + object SPRITE_LORELEI, $5, $2, STAY, DOWN, $1, OPP_LORELEI, $1 ; warp-to EVENT_DISP LORELEIS_ROOM_WIDTH, $b, $4 ; INDIGO_PLATEAU_LOBBY diff --git a/data/mapObjects/mansion1.asm b/data/mapObjects/mansion1.asm index 89d636b8..ed6529f2 100755 --- a/data/mapObjects/mansion1.asm +++ b/data/mapObjects/mansion1.asm @@ -1,4 +1,4 @@ -Mansion1Object: ; 0x443a4 (size=90) +Mansion1Object: db $2e ; border block db $8 ; warps @@ -13,10 +13,10 @@ Mansion1Object: ; 0x443a4 (size=90) db $0 ; signs - db $3 ; people - db SPRITE_OAK_AIDE, $11 + 4, $11 + 4, $ff, $d2, TRAINER | $1, SCIENTIST + $C8, $4 - db SPRITE_BALL, $3 + 4, $e + 4, $ff, $ff, ITEM | $2, ESCAPE_ROPE - db SPRITE_BALL, $15 + 4, $12 + 4, $ff, $ff, ITEM | $3, CARBOS + db $3 ; objects + object SPRITE_OAK_AIDE, $11, $11, STAY, LEFT, $1, OPP_SCIENTIST, $4 + object SPRITE_BALL, $e, $3, STAY, NONE, $2, ESCAPE_ROPE + object SPRITE_BALL, $12, $15, STAY, NONE, $3, CARBOS ; warp-to EVENT_DISP MANSION_1_WIDTH, $1b, $4 diff --git a/data/mapObjects/mansion2.asm b/data/mapObjects/mansion2.asm index 6b2be31e..bda2ad27 100755 --- a/data/mapObjects/mansion2.asm +++ b/data/mapObjects/mansion2.asm @@ -1,4 +1,4 @@ -Mansion2Object: ; 0x520d1 (size=63) +Mansion2Object: db $1 ; border block db $4 ; warps @@ -9,11 +9,11 @@ Mansion2Object: ; 0x520d1 (size=63) db $0 ; signs - db $4 ; people - db SPRITE_BLACK_HAIR_BOY_2, $11 + 4, $3 + 4, $fe, $2, TRAINER | $1, BURGLAR + $C8, $7 - db SPRITE_BALL, $7 + 4, $1c + 4, $ff, $ff, ITEM | $2, CALCIUM - db SPRITE_BOOK_MAP_DEX, $2 + 4, $12 + 4, $ff, $ff, $3 ; person - db SPRITE_BOOK_MAP_DEX, $16 + 4, $3 + 4, $ff, $ff, $4 ; person + db $4 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $3, $11, WALK, $2, $1, OPP_BURGLAR, $7 + object SPRITE_BALL, $1c, $7, STAY, NONE, $2, CALCIUM + object SPRITE_BOOK_MAP_DEX, $12, $2, STAY, NONE, $3 ; person + object SPRITE_BOOK_MAP_DEX, $3, $16, STAY, NONE, $4 ; person ; warp-to EVENT_DISP MANSION_2_WIDTH, $a, $5 ; MANSION_1 diff --git a/data/mapObjects/mansion3.asm b/data/mapObjects/mansion3.asm index ff42bee3..72431402 100755 --- a/data/mapObjects/mansion3.asm +++ b/data/mapObjects/mansion3.asm @@ -1,4 +1,4 @@ -Mansion3Object: ; 0x522e6 (size=64) +Mansion3Object: db $1 ; border block db $3 ; warps @@ -8,12 +8,12 @@ Mansion3Object: ; 0x522e6 (size=64) db $0 ; signs - db $5 ; people - db SPRITE_BLACK_HAIR_BOY_2, $b + 4, $5 + 4, $fe, $2, TRAINER | $1, BURGLAR + $C8, $8 - db SPRITE_OAK_AIDE, $b + 4, $14 + 4, $ff, $d2, TRAINER | $2, SCIENTIST + $C8, $c - db SPRITE_BALL, $10 + 4, $1 + 4, $ff, $ff, ITEM | $3, MAX_POTION - db SPRITE_BALL, $5 + 4, $19 + 4, $ff, $ff, ITEM | $4, IRON - db SPRITE_BOOK_MAP_DEX, $c + 4, $6 + 4, $ff, $ff, $5 ; person + db $5 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $5, $b, WALK, $2, $1, OPP_BURGLAR, $8 + object SPRITE_OAK_AIDE, $14, $b, STAY, LEFT, $2, OPP_SCIENTIST, $c + object SPRITE_BALL, $1, $10, STAY, NONE, $3, MAX_POTION + object SPRITE_BALL, $19, $5, STAY, NONE, $4, IRON + object SPRITE_BOOK_MAP_DEX, $6, $c, STAY, NONE, $5 ; person ; warp-to EVENT_DISP MANSION_3_WIDTH, $a, $7 ; MANSION_2 diff --git a/data/mapObjects/mansion4.asm b/data/mapObjects/mansion4.asm index 5432f676..94a6f612 100755 --- a/data/mapObjects/mansion4.asm +++ b/data/mapObjects/mansion4.asm @@ -1,4 +1,4 @@ -Mansion4Object: ; 0x52498 (size=69) +Mansion4Object: db $1 ; border block db $1 ; warps @@ -6,15 +6,15 @@ Mansion4Object: ; 0x52498 (size=69) db $0 ; signs - db $8 ; people - db SPRITE_BLACK_HAIR_BOY_2, $17 + 4, $10 + 4, $ff, $ff, TRAINER | $1, BURGLAR + $C8, $9 - db SPRITE_OAK_AIDE, $b + 4, $1b + 4, $ff, $d0, TRAINER | $2, SCIENTIST + $C8, $d - db SPRITE_BALL, $2 + 4, $a + 4, $ff, $ff, ITEM | $3, RARE_CANDY - db SPRITE_BALL, $16 + 4, $1 + 4, $ff, $ff, ITEM | $4, FULL_RESTORE - db SPRITE_BALL, $19 + 4, $13 + 4, $ff, $ff, ITEM | $5, TM_14 - db SPRITE_BALL, $4 + 4, $5 + 4, $ff, $ff, ITEM | $6, TM_22 - db SPRITE_BOOK_MAP_DEX, $14 + 4, $10 + 4, $ff, $ff, $7 ; person - db SPRITE_BALL, $d + 4, $5 + 4, $ff, $ff, ITEM | $8, SECRET_KEY + db $8 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $10, $17, STAY, NONE, $1, OPP_BURGLAR, $9 + object SPRITE_OAK_AIDE, $1b, $b, STAY, DOWN, $2, OPP_SCIENTIST, $d + object SPRITE_BALL, $a, $2, STAY, NONE, $3, RARE_CANDY + object SPRITE_BALL, $1, $16, STAY, NONE, $4, FULL_RESTORE + object SPRITE_BALL, $13, $19, STAY, NONE, $5, TM_14 + object SPRITE_BALL, $5, $4, STAY, NONE, $6, TM_22 + object SPRITE_BOOK_MAP_DEX, $10, $14, STAY, NONE, $7 ; person + object SPRITE_BALL, $5, $d, STAY, NONE, $8, SECRET_KEY ; warp-to EVENT_DISP MANSION_4_WIDTH, $16, $17 ; MANSION_1 diff --git a/data/mapObjects/mtmoon1.asm b/data/mapObjects/mtmoon1.asm index 6f0c05e9..42c45016 100755 --- a/data/mapObjects/mtmoon1.asm +++ b/data/mapObjects/mtmoon1.asm @@ -1,4 +1,4 @@ -MtMoon1Object: ; 0x49b06 (size=145) +MtMoon1Object: db $3 ; border block db $5 ; warps @@ -11,20 +11,20 @@ MtMoon1Object: ; 0x49b06 (size=145) db $1 ; signs db $17, $f, $e ; MtMoon1Text14 - db $d ; people - db SPRITE_HIKER, $6 + 4, $5 + 4, $ff, $d0, TRAINER | $1, HIKER + $C8, $1 - db SPRITE_BUG_CATCHER, $10 + 4, $c + 4, $ff, $d3, TRAINER | $2, YOUNGSTER + $C8, $3 - db SPRITE_LASS, $4 + 4, $1e + 4, $ff, $d0, TRAINER | $3, LASS + $C8, $5 - db SPRITE_BLACK_HAIR_BOY_2, $1f + 4, $18 + 4, $ff, $d1, TRAINER | $4, SUPER_NERD + $C8, $1 - db SPRITE_LASS, $17 + 4, $10 + 4, $ff, $d0, TRAINER | $5, LASS + $C8, $6 - db SPRITE_BUG_CATCHER, $16 + 4, $7 + 4, $ff, $d0, TRAINER | $6, BUG_CATCHER + $C8, $7 - db SPRITE_BUG_CATCHER, $1b + 4, $1e + 4, $ff, $d3, TRAINER | $7, BUG_CATCHER + $C8, $8 - db SPRITE_BALL, $14 + 4, $2 + 4, $ff, $ff, ITEM | $8, POTION - db SPRITE_BALL, $2 + 4, $2 + 4, $ff, $ff, ITEM | $9, MOON_STONE - db SPRITE_BALL, $1f + 4, $23 + 4, $ff, $ff, ITEM | $a, RARE_CANDY - db SPRITE_BALL, $17 + 4, $24 + 4, $ff, $ff, ITEM | $b, ESCAPE_ROPE - db SPRITE_BALL, $21 + 4, $14 + 4, $ff, $ff, ITEM | $c, POTION - db SPRITE_BALL, $20 + 4, $5 + 4, $ff, $ff, ITEM | $d, TM_12 + db $d ; objects + object SPRITE_HIKER, $5, $6, STAY, DOWN, $1, OPP_HIKER, $1 + object SPRITE_BUG_CATCHER, $c, $10, STAY, RIGHT, $2, OPP_YOUNGSTER, $3 + object SPRITE_LASS, $1e, $4, STAY, DOWN, $3, OPP_LASS, $5 + object SPRITE_BLACK_HAIR_BOY_2, $18, $1f, STAY, UP, $4, OPP_SUPER_NERD, $1 + object SPRITE_LASS, $10, $17, STAY, DOWN, $5, OPP_LASS, $6 + object SPRITE_BUG_CATCHER, $7, $16, STAY, DOWN, $6, OPP_BUG_CATCHER, $7 + object SPRITE_BUG_CATCHER, $1e, $1b, STAY, RIGHT, $7, OPP_BUG_CATCHER, $8 + object SPRITE_BALL, $2, $14, STAY, NONE, $8, POTION + object SPRITE_BALL, $2, $2, STAY, NONE, $9, MOON_STONE + object SPRITE_BALL, $23, $1f, STAY, NONE, $a, RARE_CANDY + object SPRITE_BALL, $24, $17, STAY, NONE, $b, ESCAPE_ROPE + object SPRITE_BALL, $14, $21, STAY, NONE, $c, POTION + object SPRITE_BALL, $5, $20, STAY, NONE, $d, TM_12 ; warp-to EVENT_DISP MT_MOON_1_WIDTH, $23, $e diff --git a/data/mapObjects/mtmoon2.asm b/data/mapObjects/mtmoon2.asm index 33313f17..f39cd4a5 100755 --- a/data/mapObjects/mtmoon2.asm +++ b/data/mapObjects/mtmoon2.asm @@ -1,4 +1,4 @@ -MtMoon2Object: ; 0x51a4d (size=68) +MtMoon2Object: db $3 ; border block db $8 ; warps @@ -13,7 +13,7 @@ MtMoon2Object: ; 0x51a4d (size=68) db $0 ; signs - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP MT_MOON_2_WIDTH, $5, $5 ; MT_MOON_1 diff --git a/data/mapObjects/mtmoon3.asm b/data/mapObjects/mtmoon3.asm index e17a6a8b..7fe29180 100755 --- a/data/mapObjects/mtmoon3.asm +++ b/data/mapObjects/mtmoon3.asm @@ -1,4 +1,4 @@ -MtMoon3Object: ; 0x49fdb (size=102) +MtMoon3Object: db $3 ; border block db $4 ; warps @@ -9,16 +9,16 @@ MtMoon3Object: ; 0x49fdb (size=102) db $0 ; signs - db $9 ; people - db SPRITE_BLACK_HAIR_BOY_2, $8 + 4, $c + 4, $ff, $d3, TRAINER | $1, SUPER_NERD + $C8, $2 - db SPRITE_ROCKET, $10 + 4, $b + 4, $ff, $d0, TRAINER | $2, ROCKET + $C8, $1 - db SPRITE_ROCKET, $16 + 4, $f + 4, $ff, $d0, TRAINER | $3, ROCKET + $C8, $2 - db SPRITE_ROCKET, $b + 4, $1d + 4, $ff, $d1, TRAINER | $4, ROCKET + $C8, $3 - db SPRITE_ROCKET, $11 + 4, $1d + 4, $ff, $d2, TRAINER | $5, ROCKET + $C8, $4 - db SPRITE_OMANYTE, $6 + 4, $c + 4, $ff, $ff, $6 ; person - db SPRITE_OMANYTE, $6 + 4, $d + 4, $ff, $ff, $7 ; person - db SPRITE_BALL, $15 + 4, $19 + 4, $ff, $ff, ITEM | $8, HP_UP - db SPRITE_BALL, $5 + 4, $1d + 4, $ff, $ff, ITEM | $9, TM_01 + db $9 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $c, $8, STAY, RIGHT, $1, OPP_SUPER_NERD, $2 + object SPRITE_ROCKET, $b, $10, STAY, DOWN, $2, OPP_ROCKET, $1 + object SPRITE_ROCKET, $f, $16, STAY, DOWN, $3, OPP_ROCKET, $2 + object SPRITE_ROCKET, $1d, $b, STAY, UP, $4, OPP_ROCKET, $3 + object SPRITE_ROCKET, $1d, $11, STAY, LEFT, $5, OPP_ROCKET, $4 + object SPRITE_OMANYTE, $c, $6, STAY, NONE, $6 ; person + object SPRITE_OMANYTE, $d, $6, STAY, NONE, $7 ; person + object SPRITE_BALL, $19, $15, STAY, NONE, $8, HP_UP + object SPRITE_BALL, $1d, $5, STAY, NONE, $9, TM_01 ; warp-to EVENT_DISP MT_MOON_3_WIDTH, $9, $19 ; MT_MOON_2 diff --git a/data/mapObjects/mtmoonpokecenter.asm b/data/mapObjects/mtmoonpokecenter.asm index f5f52f65..1e168895 100755 --- a/data/mapObjects/mtmoonpokecenter.asm +++ b/data/mapObjects/mtmoonpokecenter.asm @@ -1,4 +1,4 @@ -MtMoonPokecenterObject: ; 0x49376 (size=56) +MtMoonPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,13 +7,13 @@ MtMoonPokecenterObject: ; 0x49376 (size=56) db $0 ; signs - db $6 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_BUG_CATCHER, $3 + 4, $4 + 4, $ff, $d1, $2 ; person - db SPRITE_GENTLEMAN, $3 + 4, $7 + 4, $ff, $d1, $3 ; person - db SPRITE_FAT_BALD_GUY, $6 + 4, $a + 4, $fe, $2, $4 ; person - db SPRITE_CLIPBOARD, $2 + 4, $7 + 4, $ff, $ff, $5 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $6 ; person + db $6 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_BUG_CATCHER, $4, $3, STAY, UP, $2 ; person + object SPRITE_GENTLEMAN, $7, $3, STAY, UP, $3 ; person + object SPRITE_FAT_BALD_GUY, $a, $6, WALK, $2, $4 ; person + object SPRITE_CLIPBOARD, $7, $2, STAY, NONE, $5 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $6 ; person ; warp-to EVENT_DISP MT_MOON_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/museum1f.asm b/data/mapObjects/museum1f.asm index c6fb4b5a..56932af8 100755 --- a/data/mapObjects/museum1f.asm +++ b/data/mapObjects/museum1f.asm @@ -1,4 +1,4 @@ -Museum1FObject: ; 0x5c2c1 (size=74) +Museum1FObject: db $a ; border block db $5 ; warps @@ -10,12 +10,12 @@ Museum1FObject: ; 0x5c2c1 (size=74) db $0 ; signs - db $5 ; people - db SPRITE_OAK_AIDE, $4 + 4, $c + 4, $ff, $d2, $1 ; person - db SPRITE_GAMBLER, $4 + 4, $1 + 4, $ff, $ff, $2 ; person - db SPRITE_OAK_AIDE, $2 + 4, $f + 4, $ff, $d0, $3 ; person - db SPRITE_OAK_AIDE, $4 + 4, $11 + 4, $ff, $ff, $4 ; person - db SPRITE_OLD_AMBER, $2 + 4, $10 + 4, $ff, $ff, $5 ; person + db $5 ; objects + object SPRITE_OAK_AIDE, $c, $4, STAY, LEFT, $1 ; person + object SPRITE_GAMBLER, $1, $4, STAY, NONE, $2 ; person + object SPRITE_OAK_AIDE, $f, $2, STAY, DOWN, $3 ; person + object SPRITE_OAK_AIDE, $11, $4, STAY, NONE, $4 ; person + object SPRITE_OLD_AMBER, $10, $2, STAY, NONE, $5 ; person ; warp-to EVENT_DISP MUSEUM_1F_WIDTH, $7, $a diff --git a/data/mapObjects/museum2f.asm b/data/mapObjects/museum2f.asm index 88ee827c..689391d9 100755 --- a/data/mapObjects/museum2f.asm +++ b/data/mapObjects/museum2f.asm @@ -1,4 +1,4 @@ -Museum2FObject: ; 0x5c34b (size=48) +Museum2FObject: db $a ; border block db $1 ; warps @@ -8,12 +8,12 @@ Museum2FObject: ; 0x5c34b (size=48) db $2, $b, $6 ; Museum2FText6 db $5, $2, $7 ; Museum2FText7 - db $5 ; people - db SPRITE_BUG_CATCHER, $7 + 4, $1 + 4, $fe, $2, $1 ; person - db SPRITE_OLD_PERSON, $5 + 4, $0 + 4, $ff, $d0, $2 ; person - db SPRITE_OAK_AIDE, $5 + 4, $7 + 4, $ff, $d0, $3 ; person - db SPRITE_BRUNETTE_GIRL, $5 + 4, $b + 4, $ff, $ff, $4 ; person - db SPRITE_HIKER, $5 + 4, $c + 4, $ff, $d0, $5 ; person + db $5 ; objects + object SPRITE_BUG_CATCHER, $1, $7, WALK, $2, $1 ; person + object SPRITE_OLD_PERSON, $0, $5, STAY, DOWN, $2 ; person + object SPRITE_OAK_AIDE, $7, $5, STAY, DOWN, $3 ; person + object SPRITE_BRUNETTE_GIRL, $b, $5, STAY, NONE, $4 ; person + object SPRITE_HIKER, $c, $5, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP MUSEUM_2F_WIDTH, $7, $7 ; MUSEUM_1F diff --git a/data/mapObjects/namerater.asm b/data/mapObjects/namerater.asm index b0999d61..0118b2f7 100755 --- a/data/mapObjects/namerater.asm +++ b/data/mapObjects/namerater.asm @@ -1,4 +1,4 @@ -NameRaterObject: ; 0x1dad6 (size=26) +NameRaterObject: db $a ; border block db $2 ; warps @@ -7,8 +7,8 @@ NameRaterObject: ; 0x1dad6 (size=26) db $0 ; signs - db $1 ; people - db SPRITE_MR_MASTERBALL, $3 + 4, $5 + 4, $ff, $d2, $1 ; person + db $1 ; objects + object SPRITE_MR_MASTERBALL, $5, $3, STAY, LEFT, $1 ; person ; warp-to EVENT_DISP NAME_RATERS_HOUSE_WIDTH, $7, $2 diff --git a/data/mapObjects/oakslab.asm b/data/mapObjects/oakslab.asm index 0b2717a7..3834c49a 100755 --- a/data/mapObjects/oakslab.asm +++ b/data/mapObjects/oakslab.asm @@ -1,4 +1,4 @@ -OaksLabObject: ; 0x1d40a (size=88) +OaksLabObject: db $3 ; border block db $2 ; warps @@ -7,18 +7,18 @@ OaksLabObject: ; 0x1d40a (size=88) db $0 ; signs - db $b ; people - db SPRITE_BLUE, $3 + 4, $4 + 4, $ff, $ff, TRAINER | $1, SONY1 + $C8, $1 - db SPRITE_BALL, $3 + 4, $6 + 4, $ff, $ff, $2 ; person - db SPRITE_BALL, $3 + 4, $7 + 4, $ff, $ff, $3 ; person - db SPRITE_BALL, $3 + 4, $8 + 4, $ff, $ff, $4 ; person - db SPRITE_OAK, $2 + 4, $5 + 4, $ff, $d0, $5 ; person - db SPRITE_BOOK_MAP_DEX, $1 + 4, $2 + 4, $ff, $ff, $6 ; person - db SPRITE_BOOK_MAP_DEX, $1 + 4, $3 + 4, $ff, $ff, $7 ; person - db SPRITE_OAK, $a + 4, $5 + 4, $ff, $d1, $8 ; person - db SPRITE_GIRL, $9 + 4, $1 + 4, $fe, $1, $9 ; person - db SPRITE_OAK_AIDE, $a + 4, $2 + 4, $ff, $ff, $a ; person - db SPRITE_OAK_AIDE, $a + 4, $8 + 4, $ff, $ff, $b ; person + db $b ; objects + object SPRITE_BLUE, $4, $3, STAY, NONE, $1, OPP_SONY1, $1 + object SPRITE_BALL, $6, $3, STAY, NONE, $2 ; person + object SPRITE_BALL, $7, $3, STAY, NONE, $3 ; person + object SPRITE_BALL, $8, $3, STAY, NONE, $4 ; person + object SPRITE_OAK, $5, $2, STAY, DOWN, $5 ; person + object SPRITE_BOOK_MAP_DEX, $2, $1, STAY, NONE, $6 ; person + object SPRITE_BOOK_MAP_DEX, $3, $1, STAY, NONE, $7 ; person + object SPRITE_OAK, $5, $a, STAY, UP, $8 ; person + object SPRITE_GIRL, $1, $9, WALK, $1, $9 ; person + object SPRITE_OAK_AIDE, $2, $a, STAY, NONE, $a ; person + object SPRITE_OAK_AIDE, $8, $a, STAY, NONE, $b ; person ; warp-to EVENT_DISP OAKS_LAB_WIDTH, $b, $4 diff --git a/data/mapObjects/pallettown.asm b/data/mapObjects/pallettown.asm index cef66431..d02cbae2 100755 --- a/data/mapObjects/pallettown.asm +++ b/data/mapObjects/pallettown.asm @@ -1,4 +1,4 @@ -PalletTownObject: ; 0x182c3 (size=58) +PalletTownObject: db $b ; border block db $3 ; warps @@ -12,10 +12,10 @@ PalletTownObject: ; 0x182c3 (size=58) db $5, $3, $6 ; PalletTownText6 db $5, $b, $7 ; PalletTownText7 - db $3 ; people - db SPRITE_OAK, $5 + 4, $8 + 4, $ff, $ff, $1 ; person - db SPRITE_GIRL, $8 + 4, $3 + 4, $fe, $0, $2 ; person - db SPRITE_FISHER2, $e + 4, $b + 4, $fe, $0, $3 ; person + db $3 ; objects + object SPRITE_OAK, $8, $5, STAY, NONE, $1 ; person + object SPRITE_GIRL, $3, $8, WALK, $0, $2 ; person + object SPRITE_FISHER2, $b, $e, WALK, $0, $3 ; person ; warp-to EVENT_DISP PALLET_TOWN_WIDTH, $5, $5 ; REDS_HOUSE_1F diff --git a/data/mapObjects/pewtercity.asm b/data/mapObjects/pewtercity.asm index e971ad50..7b389bd2 100755 --- a/data/mapObjects/pewtercity.asm +++ b/data/mapObjects/pewtercity.asm @@ -1,4 +1,4 @@ -PewterCityObject: ; 0x18577 (size=111) +PewterCityObject: db $a ; border block db $7 ; warps @@ -19,12 +19,12 @@ PewterCityObject: ; 0x18577 (size=111) db $11, $b, $b ; PewterCityText11 db $17, $19, $c ; PewterCityText12 - db $5 ; people - db SPRITE_LASS, $f + 4, $8 + 4, $ff, $ff, $1 ; person - db SPRITE_BLACK_HAIR_BOY_1, $19 + 4, $11 + 4, $ff, $ff, $2 ; person - db SPRITE_BLACK_HAIR_BOY_2, $11 + 4, $1b + 4, $ff, $ff, $3 ; person - db SPRITE_BLACK_HAIR_BOY_2, $19 + 4, $1a + 4, $fe, $2, $4 ; person - db SPRITE_BUG_CATCHER, $10 + 4, $23 + 4, $ff, $d0, $5 ; person + db $5 ; objects + object SPRITE_LASS, $8, $f, STAY, NONE, $1 ; person + object SPRITE_BLACK_HAIR_BOY_1, $11, $19, STAY, NONE, $2 ; person + object SPRITE_BLACK_HAIR_BOY_2, $1b, $11, STAY, NONE, $3 ; person + object SPRITE_BLACK_HAIR_BOY_2, $1a, $19, WALK, $2, $4 ; person + object SPRITE_BUG_CATCHER, $23, $10, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP PEWTER_CITY_WIDTH, $7, $e ; MUSEUM_1F diff --git a/data/mapObjects/pewtergym.asm b/data/mapObjects/pewtergym.asm index f5fa120e..280f1a7e 100755 --- a/data/mapObjects/pewtergym.asm +++ b/data/mapObjects/pewtergym.asm @@ -1,4 +1,4 @@ -PewterGymObject: ; 0x5c52e (size=42) +PewterGymObject: db $3 ; border block db $2 ; warps @@ -7,10 +7,10 @@ PewterGymObject: ; 0x5c52e (size=42) db $0 ; signs - db $3 ; people - db SPRITE_BLACK_HAIR_BOY_2, $1 + 4, $4 + 4, $ff, $d0, TRAINER | $1, BROCK + $C8, $1 - db SPRITE_BLACK_HAIR_BOY_1, $6 + 4, $3 + 4, $ff, $d3, TRAINER | $2, JR__TRAINER_M + $C8, $1 - db SPRITE_GYM_HELPER, $a + 4, $7 + 4, $ff, $d0, $3 ; person + db $3 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $4, $1, STAY, DOWN, $1, OPP_BROCK, $1 + object SPRITE_BLACK_HAIR_BOY_1, $3, $6, STAY, RIGHT, $2, OPP_JR_TRAINER_M, $1 + object SPRITE_GYM_HELPER, $7, $a, STAY, DOWN, $3 ; person ; warp-to EVENT_DISP PEWTER_GYM_WIDTH, $d, $4 diff --git a/data/mapObjects/pewterhouse1.asm b/data/mapObjects/pewterhouse1.asm index 9af4d71b..d973e53b 100755 --- a/data/mapObjects/pewterhouse1.asm +++ b/data/mapObjects/pewterhouse1.asm @@ -1,4 +1,4 @@ -PewterHouse1Object: ; 0x1d616 (size=38) +PewterHouse1Object: db $a ; border block db $2 ; warps @@ -7,10 +7,10 @@ PewterHouse1Object: ; 0x1d616 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_SLOWBRO, $5 + 4, $4 + 4, $ff, $d2, $1 ; person - db SPRITE_YOUNG_BOY, $5 + 4, $3 + 4, $ff, $d3, $2 ; person - db SPRITE_FAT_BALD_GUY, $2 + 4, $1 + 4, $ff, $ff, $3 ; person + db $3 ; objects + object SPRITE_SLOWBRO, $4, $5, STAY, LEFT, $1 ; person + object SPRITE_YOUNG_BOY, $3, $5, STAY, RIGHT, $2 ; person + object SPRITE_FAT_BALD_GUY, $1, $2, STAY, NONE, $3 ; person ; warp-to EVENT_DISP PEWTER_HOUSE_1_WIDTH, $7, $2 diff --git a/data/mapObjects/pewterhouse2.asm b/data/mapObjects/pewterhouse2.asm index aa48c5bc..6c111acb 100755 --- a/data/mapObjects/pewterhouse2.asm +++ b/data/mapObjects/pewterhouse2.asm @@ -1,4 +1,4 @@ -PewterHouse2Object: ; 0x1d659 (size=32) +PewterHouse2Object: db $a ; border block db $2 ; warps @@ -7,9 +7,9 @@ PewterHouse2Object: ; 0x1d659 (size=32) db $0 ; signs - db $2 ; people - db SPRITE_GAMBLER, $3 + 4, $2 + 4, $ff, $d3, $1 ; person - db SPRITE_BUG_CATCHER, $5 + 4, $4 + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_GAMBLER, $2, $3, STAY, RIGHT, $1 ; person + object SPRITE_BUG_CATCHER, $4, $5, STAY, NONE, $2 ; person ; warp-to EVENT_DISP PEWTER_HOUSE_2_WIDTH, $7, $2 diff --git a/data/mapObjects/pewtermart.asm b/data/mapObjects/pewtermart.asm index 343f70c1..50ccd288 100755 --- a/data/mapObjects/pewtermart.asm +++ b/data/mapObjects/pewtermart.asm @@ -1,4 +1,4 @@ -PewterMartObject: ; 0x74cda (size=38) +PewterMartObject: db $0 ; border block db $2 ; warps @@ -7,10 +7,10 @@ PewterMartObject: ; 0x74cda (size=38) db $0 ; signs - db $3 ; people - db SPRITE_MART_GUY, $5 + 4, $0 + 4, $ff, $d3, $1 ; person - db SPRITE_BUG_CATCHER, $3 + 4, $3 + 4, $fe, $1, $2 ; person - db SPRITE_BLACK_HAIR_BOY_2, $5 + 4, $5 + 4, $ff, $ff, $3 ; person + db $3 ; objects + object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person + object SPRITE_BUG_CATCHER, $3, $3, WALK, $1, $2 ; person + object SPRITE_BLACK_HAIR_BOY_2, $5, $5, STAY, NONE, $3 ; person ; warp-to EVENT_DISP PEWTER_MART_WIDTH, $7, $3 diff --git a/data/mapObjects/pewterpokecenter.asm b/data/mapObjects/pewterpokecenter.asm index a9a03272..44e10ed6 100755 --- a/data/mapObjects/pewterpokecenter.asm +++ b/data/mapObjects/pewterpokecenter.asm @@ -1,4 +1,4 @@ -PewterPokecenterObject: ; 0x5c60d (size=44) +PewterPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ PewterPokecenterObject: ; 0x5c60d (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_GENTLEMAN, $7 + 4, $b + 4, $ff, $d2, $2 ; person - db SPRITE_CLEFAIRY, $3 + 4, $1 + 4, $ff, $d0, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_GENTLEMAN, $b, $7, STAY, LEFT, $2 ; person + object SPRITE_CLEFAIRY, $1, $3, STAY, DOWN, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP PEWTER_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/pokemontower1.asm b/data/mapObjects/pokemontower1.asm index 30fb9cbc..54af9efc 100755 --- a/data/mapObjects/pokemontower1.asm +++ b/data/mapObjects/pokemontower1.asm @@ -1,4 +1,4 @@ -PokemonTower1Object: ; 0x60452 (size=58) +PokemonTower1Object: db $1 ; border block db $3 ; warps @@ -8,12 +8,12 @@ PokemonTower1Object: ; 0x60452 (size=58) db $0 ; signs - db $5 ; people - db SPRITE_CABLE_CLUB_WOMAN, $d + 4, $f + 4, $ff, $d1, $1 ; person - db SPRITE_MOM_GEISHA, $8 + 4, $6 + 4, $ff, $ff, $2 ; person - db SPRITE_BALDING_GUY, $c + 4, $8 + 4, $ff, $ff, $3 ; person - db SPRITE_GIRL, $7 + 4, $d + 4, $ff, $ff, $4 ; person - db SPRITE_MEDIUM, $7 + 4, $11 + 4, $ff, $d2, $5 ; person + db $5 ; objects + object SPRITE_CABLE_CLUB_WOMAN, $f, $d, STAY, UP, $1 ; person + object SPRITE_MOM_GEISHA, $6, $8, STAY, NONE, $2 ; person + object SPRITE_BALDING_GUY, $8, $c, STAY, NONE, $3 ; person + object SPRITE_GIRL, $d, $7, STAY, NONE, $4 ; person + object SPRITE_MEDIUM, $11, $7, STAY, LEFT, $5 ; person ; warp-to EVENT_DISP POKEMONTOWER_1_WIDTH, $11, $a diff --git a/data/mapObjects/pokemontower2.asm b/data/mapObjects/pokemontower2.asm index a255065f..33bc048d 100755 --- a/data/mapObjects/pokemontower2.asm +++ b/data/mapObjects/pokemontower2.asm @@ -1,4 +1,4 @@ -PokemonTower2Object: ; 0x60646 (size=32) +PokemonTower2Object: db $1 ; border block db $2 ; warps @@ -7,9 +7,9 @@ PokemonTower2Object: ; 0x60646 (size=32) db $0 ; signs - db $2 ; people - db SPRITE_BLUE, $5 + 4, $e + 4, $ff, $ff, $1 ; person - db SPRITE_MEDIUM, $7 + 4, $3 + 4, $ff, $d3, $2 ; person + db $2 ; objects + object SPRITE_BLUE, $e, $5, STAY, NONE, $1 ; person + object SPRITE_MEDIUM, $3, $7, STAY, RIGHT, $2 ; person ; warp-to EVENT_DISP POKEMONTOWER_2_WIDTH, $9, $3 ; POKEMONTOWER_3 diff --git a/data/mapObjects/pokemontower3.asm b/data/mapObjects/pokemontower3.asm index 3a16070a..9899276a 100755 --- a/data/mapObjects/pokemontower3.asm +++ b/data/mapObjects/pokemontower3.asm @@ -1,4 +1,4 @@ -PokemonTower3Object: ; 0x6075d (size=51) +PokemonTower3Object: db $1 ; border block db $2 ; warps @@ -7,11 +7,11 @@ PokemonTower3Object: ; 0x6075d (size=51) db $0 ; signs - db $4 ; people - db SPRITE_MEDIUM, $3 + 4, $c + 4, $ff, $d2, TRAINER | $1, CHANNELER + $C8, $5 - db SPRITE_MEDIUM, $8 + 4, $9 + 4, $ff, $d0, TRAINER | $2, CHANNELER + $C8, $6 - db SPRITE_MEDIUM, $d + 4, $a + 4, $ff, $d0, TRAINER | $3, CHANNELER + $C8, $8 - db SPRITE_BALL, $1 + 4, $c + 4, $ff, $ff, ITEM | $4, ESCAPE_ROPE + db $4 ; objects + object SPRITE_MEDIUM, $c, $3, STAY, LEFT, $1, OPP_CHANNELER, $5 + object SPRITE_MEDIUM, $9, $8, STAY, DOWN, $2, OPP_CHANNELER, $6 + object SPRITE_MEDIUM, $a, $d, STAY, DOWN, $3, OPP_CHANNELER, $8 + object SPRITE_BALL, $c, $1, STAY, NONE, $4, ESCAPE_ROPE ; warp-to EVENT_DISP POKEMONTOWER_3_WIDTH, $9, $3 ; POKEMONTOWER_2 diff --git a/data/mapObjects/pokemontower4.asm b/data/mapObjects/pokemontower4.asm index 8647f937..19f4f4e3 100755 --- a/data/mapObjects/pokemontower4.asm +++ b/data/mapObjects/pokemontower4.asm @@ -1,4 +1,4 @@ -PokemonTower4Object: ; 0x6088b (size=65) +PokemonTower4Object: db $1 ; border block db $2 ; warps @@ -7,13 +7,13 @@ PokemonTower4Object: ; 0x6088b (size=65) db $0 ; signs - db $6 ; people - db SPRITE_MEDIUM, $a + 4, $5 + 4, $ff, $d3, TRAINER | $1, CHANNELER + $C8, $9 - db SPRITE_MEDIUM, $7 + 4, $f + 4, $ff, $d0, TRAINER | $2, CHANNELER + $C8, $a - db SPRITE_MEDIUM, $c + 4, $e + 4, $ff, $d2, TRAINER | $3, CHANNELER + $C8, $c - db SPRITE_BALL, $a + 4, $c + 4, $ff, $ff, ITEM | $4, ELIXER - db SPRITE_BALL, $a + 4, $9 + 4, $ff, $ff, ITEM | $5, AWAKENING - db SPRITE_BALL, $10 + 4, $c + 4, $ff, $ff, ITEM | $6, HP_UP + db $6 ; objects + object SPRITE_MEDIUM, $5, $a, STAY, RIGHT, $1, OPP_CHANNELER, $9 + object SPRITE_MEDIUM, $f, $7, STAY, DOWN, $2, OPP_CHANNELER, $a + object SPRITE_MEDIUM, $e, $c, STAY, LEFT, $3, OPP_CHANNELER, $c + object SPRITE_BALL, $c, $a, STAY, NONE, $4, ELIXER + object SPRITE_BALL, $9, $a, STAY, NONE, $5, AWAKENING + object SPRITE_BALL, $c, $10, STAY, NONE, $6, HP_UP ; warp-to EVENT_DISP POKEMONTOWER_4_WIDTH, $9, $3 ; POKEMONTOWER_5 diff --git a/data/mapObjects/pokemontower5.asm b/data/mapObjects/pokemontower5.asm index e31a0c61..5a73825c 100755 --- a/data/mapObjects/pokemontower5.asm +++ b/data/mapObjects/pokemontower5.asm @@ -1,4 +1,4 @@ -PokemonTower5Object: ; 0x60a48 (size=65) +PokemonTower5Object: db $1 ; border block db $2 ; warps @@ -7,13 +7,13 @@ PokemonTower5Object: ; 0x60a48 (size=65) db $0 ; signs - db $6 ; people - db SPRITE_MEDIUM, $8 + 4, $c + 4, $ff, $ff, $1 ; person - db SPRITE_MEDIUM, $7 + 4, $11 + 4, $ff, $d2, TRAINER | $2, CHANNELER + $C8, $e - db SPRITE_MEDIUM, $3 + 4, $e + 4, $ff, $d2, TRAINER | $3, CHANNELER + $C8, $10 - db SPRITE_MEDIUM, $a + 4, $6 + 4, $ff, $d3, TRAINER | $4, CHANNELER + $C8, $11 - db SPRITE_MEDIUM, $10 + 4, $9 + 4, $ff, $d3, TRAINER | $5, CHANNELER + $C8, $12 - db SPRITE_BALL, $e + 4, $6 + 4, $ff, $ff, ITEM | $6, NUGGET + db $6 ; objects + object SPRITE_MEDIUM, $c, $8, STAY, NONE, $1 ; person + object SPRITE_MEDIUM, $11, $7, STAY, LEFT, $2, OPP_CHANNELER, $e + object SPRITE_MEDIUM, $e, $3, STAY, LEFT, $3, OPP_CHANNELER, $10 + object SPRITE_MEDIUM, $6, $a, STAY, RIGHT, $4, OPP_CHANNELER, $11 + object SPRITE_MEDIUM, $9, $10, STAY, RIGHT, $5, OPP_CHANNELER, $12 + object SPRITE_BALL, $6, $e, STAY, NONE, $6, NUGGET ; warp-to EVENT_DISP POKEMONTOWER_5_WIDTH, $9, $3 ; POKEMONTOWER_4 diff --git a/data/mapObjects/pokemontower6.asm b/data/mapObjects/pokemontower6.asm index d923c3d2..d0035faa 100755 --- a/data/mapObjects/pokemontower6.asm +++ b/data/mapObjects/pokemontower6.asm @@ -1,4 +1,4 @@ -PokemonTower6Object: ; 0x60c5b (size=58) +PokemonTower6Object: db $1 ; border block db $2 ; warps @@ -7,12 +7,12 @@ PokemonTower6Object: ; 0x60c5b (size=58) db $0 ; signs - db $5 ; people - db SPRITE_MEDIUM, $a + 4, $c + 4, $ff, $d3, TRAINER | $1, CHANNELER + $C8, $13 - db SPRITE_MEDIUM, $5 + 4, $9 + 4, $ff, $d0, TRAINER | $2, CHANNELER + $C8, $14 - db SPRITE_MEDIUM, $5 + 4, $10 + 4, $ff, $d2, TRAINER | $3, CHANNELER + $C8, $15 - db SPRITE_BALL, $8 + 4, $6 + 4, $ff, $ff, ITEM | $4, RARE_CANDY - db SPRITE_BALL, $e + 4, $e + 4, $ff, $ff, ITEM | $5, X_ACCURACY + db $5 ; objects + object SPRITE_MEDIUM, $c, $a, STAY, RIGHT, $1, OPP_CHANNELER, $13 + object SPRITE_MEDIUM, $9, $5, STAY, DOWN, $2, OPP_CHANNELER, $14 + object SPRITE_MEDIUM, $10, $5, STAY, LEFT, $3, OPP_CHANNELER, $15 + object SPRITE_BALL, $6, $8, STAY, NONE, $4, RARE_CANDY + object SPRITE_BALL, $e, $e, STAY, NONE, $5, X_ACCURACY ; warp-to EVENT_DISP POKEMONTOWER_6_WIDTH, $9, $12 ; POKEMONTOWER_5 diff --git a/data/mapObjects/pokemontower7.asm b/data/mapObjects/pokemontower7.asm index ca5aa669..6ee1e8fd 100755 --- a/data/mapObjects/pokemontower7.asm +++ b/data/mapObjects/pokemontower7.asm @@ -1,4 +1,4 @@ -PokemonTower7Object: ; 0x60ef6 (size=42) +PokemonTower7Object: db $1 ; border block db $1 ; warps @@ -6,18 +6,11 @@ PokemonTower7Object: ; 0x60ef6 (size=42) db $0 ; signs -IF DEF(_YELLOW) - db 3 ; people - db SPRITE_JESSIE, 8 + 4, $a + 4, $ff, $d0, 1 - db SPRITE_JAMES, 8 + 4, $b + 4, $ff, $d0, 2 - db SPRITE_MR_FUJI, 3 + 4, $a + 4, $ff, $d0, 3 -ELSE - db $4 ; people - db SPRITE_ROCKET, $b + 4, $9 + 4, $ff, $d3, TRAINER | $1, ROCKET + $C8, $13 - db SPRITE_ROCKET, $9 + 4, $c + 4, $ff, $d2, TRAINER | $2, ROCKET + $C8, $14 - db SPRITE_ROCKET, $7 + 4, $9 + 4, $ff, $d3, TRAINER | $3, ROCKET + $C8, $15 - db SPRITE_MR_FUJI, $3 + 4, $a + 4, $ff, $d0, $4 ; person -ENDC + db 4 ; objects + object SPRITE_ROCKET, $9, $b, STAY, RIGHT, $1, OPP_ROCKET, $13 + object SPRITE_ROCKET, $c, $9, STAY, LEFT, $2, OPP_ROCKET, $14 + object SPRITE_ROCKET, $9, $7, STAY, RIGHT, $3, OPP_ROCKET, $15 + object SPRITE_MR_FUJI, $a, $3, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP POKEMONTOWER_7_WIDTH, $10, $9 ; POKEMONTOWER_6 diff --git a/data/mapObjects/powerplant.asm b/data/mapObjects/powerplant.asm index 98e80ff9..a04cb657 100755 --- a/data/mapObjects/powerplant.asm +++ b/data/mapObjects/powerplant.asm @@ -1,4 +1,4 @@ -PowerPlantObject: ; 0x1e3bf (size=135) +PowerPlantObject: db $2e ; border block db $3 ; warps @@ -8,21 +8,21 @@ PowerPlantObject: ; 0x1e3bf (size=135) db $0 ; signs - db $e ; people - db SPRITE_BALL, $14 + 4, $9 + 4, $ff, $ff, TRAINER | $1, VOLTORB, 40 - db SPRITE_BALL, $12 + 4, $20 + 4, $ff, $ff, TRAINER | $2, VOLTORB, 40 - db SPRITE_BALL, $19 + 4, $15 + 4, $ff, $ff, TRAINER | $3, VOLTORB, 40 - db SPRITE_BALL, $12 + 4, $19 + 4, $ff, $ff, TRAINER | $4, ELECTRODE, 43 - db SPRITE_BALL, $22 + 4, $17 + 4, $ff, $ff, TRAINER | $5, VOLTORB, 40 - db SPRITE_BALL, $1c + 4, $1a + 4, $ff, $ff, TRAINER | $6, VOLTORB, 40 - db SPRITE_BALL, $e + 4, $15 + 4, $ff, $ff, TRAINER | $7, ELECTRODE, 43 - db SPRITE_BALL, $20 + 4, $25 + 4, $ff, $ff, TRAINER | $8, VOLTORB, 40 - db SPRITE_BIRD, $9 + 4, $4 + 4, $ff, $d1, TRAINER | $9, ZAPDOS, 50 - db SPRITE_BALL, $19 + 4, $7 + 4, $ff, $ff, ITEM | $a, CARBOS - db SPRITE_BALL, $3 + 4, $1c + 4, $ff, $ff, ITEM | $b, HP_UP - db SPRITE_BALL, $3 + 4, $22 + 4, $ff, $ff, ITEM | $c, RARE_CANDY - db SPRITE_BALL, $20 + 4, $1a + 4, $ff, $ff, ITEM | $d, TM_25 - db SPRITE_BALL, $20 + 4, $14 + 4, $ff, $ff, ITEM | $e, TM_33 + db $e ; objects + object SPRITE_BALL, $9, $14, STAY, NONE, $1, VOLTORB, 40 + object SPRITE_BALL, $20, $12, STAY, NONE, $2, VOLTORB, 40 + object SPRITE_BALL, $15, $19, STAY, NONE, $3, VOLTORB, 40 + object SPRITE_BALL, $19, $12, STAY, NONE, $4, ELECTRODE, 43 + object SPRITE_BALL, $17, $22, STAY, NONE, $5, VOLTORB, 40 + object SPRITE_BALL, $1a, $1c, STAY, NONE, $6, VOLTORB, 40 + object SPRITE_BALL, $15, $e, STAY, NONE, $7, ELECTRODE, 43 + object SPRITE_BALL, $25, $20, STAY, NONE, $8, VOLTORB, 40 + object SPRITE_BIRD, $4, $9, STAY, UP, $9, ZAPDOS, 50 + object SPRITE_BALL, $7, $19, STAY, NONE, $a, CARBOS + object SPRITE_BALL, $1c, $3, STAY, NONE, $b, HP_UP + object SPRITE_BALL, $22, $3, STAY, NONE, $c, RARE_CANDY + object SPRITE_BALL, $1a, $20, STAY, NONE, $d, TM_25 + object SPRITE_BALL, $14, $20, STAY, NONE, $e, TM_33 ; warp-to EVENT_DISP POWER_PLANT_WIDTH, $23, $4 diff --git a/data/mapObjects/redshouse1f.asm b/data/mapObjects/redshouse1f.asm index 5584320e..4d32ea3d 100755 --- a/data/mapObjects/redshouse1f.asm +++ b/data/mapObjects/redshouse1f.asm @@ -1,4 +1,4 @@ -RedsHouse1FObject: ; 481e4 (12:41e4) +RedsHouse1FObject: db $0A ; border block db $3 ; warps @@ -9,8 +9,8 @@ RedsHouse1FObject: ; 481e4 (12:41e4) db $1 ; signs db $1, $3, $2 ; TV - db $1 ; people - db $33, $4 + 4, $5 + 4, $FF, $D2, $1 ; Mom + db $1 ; objects + object SPRITE_MOM, $5, $4, STAY, LEFT, $1 ; Mom ; warp-to EVENT_DISP REDS_HOUSE_1F_WIDTH, $7, $2 diff --git a/data/mapObjects/redshouse2f.asm b/data/mapObjects/redshouse2f.asm index f8680121..ebd57e59 100755 --- a/data/mapObjects/redshouse2f.asm +++ b/data/mapObjects/redshouse2f.asm @@ -1,4 +1,4 @@ -RedsHouse2FObject: ; 0x5c0d0 ? +RedsHouse2FObject: db $0A ; border block db $1 ; warps @@ -6,7 +6,7 @@ RedsHouse2FObject: ; 0x5c0d0 ? db $0 ; signs - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP REDS_HOUSE_2F_WIDTH, $1, $7 diff --git a/data/mapObjects/rockethideout1.asm b/data/mapObjects/rockethideout1.asm index ab9b1041..0b2bf374 100755 --- a/data/mapObjects/rockethideout1.asm +++ b/data/mapObjects/rockethideout1.asm @@ -1,4 +1,4 @@ -RocketHideout1Object: ; 0x44ce7 (size=98) +RocketHideout1Object: db $2e ; border block db $5 ; warps @@ -10,14 +10,14 @@ RocketHideout1Object: ; 0x44ce7 (size=98) db $0 ; signs - db $7 ; people - db SPRITE_ROCKET, $8 + 4, $1a + 4, $ff, $d2, TRAINER | $1, ROCKET + $C8, $8 - db SPRITE_ROCKET, $6 + 4, $c + 4, $ff, $d3, TRAINER | $2, ROCKET + $C8, $9 - db SPRITE_ROCKET, $11 + 4, $12 + 4, $ff, $d0, TRAINER | $3, ROCKET + $C8, $a - db SPRITE_ROCKET, $19 + 4, $f + 4, $ff, $d3, TRAINER | $4, ROCKET + $C8, $b - db SPRITE_ROCKET, $12 + 4, $1c + 4, $ff, $d2, TRAINER | $5, ROCKET + $C8, $c - db SPRITE_BALL, $e + 4, $b + 4, $ff, $ff, ITEM | $6, ESCAPE_ROPE - db SPRITE_BALL, $11 + 4, $9 + 4, $ff, $ff, ITEM | $7, HYPER_POTION + db $7 ; objects + object SPRITE_ROCKET, $1a, $8, STAY, LEFT, $1, OPP_ROCKET, $8 + object SPRITE_ROCKET, $c, $6, STAY, RIGHT, $2, OPP_ROCKET, $9 + object SPRITE_ROCKET, $12, $11, STAY, DOWN, $3, OPP_ROCKET, $a + object SPRITE_ROCKET, $f, $19, STAY, RIGHT, $4, OPP_ROCKET, $b + object SPRITE_ROCKET, $1c, $12, STAY, LEFT, $5, OPP_ROCKET, $c + object SPRITE_BALL, $b, $e, STAY, NONE, $6, ESCAPE_ROPE + object SPRITE_BALL, $9, $11, STAY, NONE, $7, HYPER_POTION ; warp-to EVENT_DISP ROCKET_HIDEOUT_1_WIDTH, $2, $17 ; ROCKET_HIDEOUT_2 diff --git a/data/mapObjects/rockethideout2.asm b/data/mapObjects/rockethideout2.asm index 5842e5bc..6689110c 100755 --- a/data/mapObjects/rockethideout2.asm +++ b/data/mapObjects/rockethideout2.asm @@ -1,4 +1,4 @@ -RocketHideout2Object: ; 0x450f7 (size=80) +RocketHideout2Object: db $2e ; border block db $5 ; warps @@ -10,12 +10,12 @@ RocketHideout2Object: ; 0x450f7 (size=80) db $0 ; signs - db $5 ; people - db SPRITE_ROCKET, $c + 4, $14 + 4, $ff, $d0, TRAINER | $1, ROCKET + $C8, $d - db SPRITE_BALL, $b + 4, $1 + 4, $ff, $ff, ITEM | $2, MOON_STONE - db SPRITE_BALL, $8 + 4, $10 + 4, $ff, $ff, ITEM | $3, NUGGET - db SPRITE_BALL, $c + 4, $6 + 4, $ff, $ff, ITEM | $4, TM_07 - db SPRITE_BALL, $15 + 4, $3 + 4, $ff, $ff, ITEM | $5, SUPER_POTION + db $5 ; objects + object SPRITE_ROCKET, $14, $c, STAY, DOWN, $1, OPP_ROCKET, $d + object SPRITE_BALL, $1, $b, STAY, NONE, $2, MOON_STONE + object SPRITE_BALL, $10, $8, STAY, NONE, $3, NUGGET + object SPRITE_BALL, $6, $c, STAY, NONE, $4, TM_07 + object SPRITE_BALL, $3, $15, STAY, NONE, $5, SUPER_POTION ; warp-to EVENT_DISP ROCKET_HIDEOUT_2_WIDTH, $8, $1b ; ROCKET_HIDEOUT_1 diff --git a/data/mapObjects/rockethideout3.asm b/data/mapObjects/rockethideout3.asm index 0464c969..90bfbb57 100755 --- a/data/mapObjects/rockethideout3.asm +++ b/data/mapObjects/rockethideout3.asm @@ -1,4 +1,4 @@ -RocketHideout3Object: ; 0x4534d (size=50) +RocketHideout3Object: db $2e ; border block db $2 ; warps @@ -7,11 +7,11 @@ RocketHideout3Object: ; 0x4534d (size=50) db $0 ; signs - db $4 ; people - db SPRITE_ROCKET, $16 + 4, $a + 4, $ff, $d3, TRAINER | $1, ROCKET + $C8, $e - db SPRITE_ROCKET, $c + 4, $1a + 4, $ff, $d1, TRAINER | $2, ROCKET + $C8, $f - db SPRITE_BALL, $11 + 4, $1a + 4, $ff, $ff, ITEM | $3, TM_10 - db SPRITE_BALL, $e + 4, $14 + 4, $ff, $ff, ITEM | $4, RARE_CANDY + db $4 ; objects + object SPRITE_ROCKET, $a, $16, STAY, RIGHT, $1, OPP_ROCKET, $e + object SPRITE_ROCKET, $1a, $c, STAY, UP, $2, OPP_ROCKET, $f + object SPRITE_BALL, $1a, $11, STAY, NONE, $3, TM_10 + object SPRITE_BALL, $14, $e, STAY, NONE, $4, RARE_CANDY ; warp-to EVENT_DISP ROCKET_HIDEOUT_3_WIDTH, $6, $19 ; ROCKET_HIDEOUT_2 diff --git a/data/mapObjects/rockethideout4.asm b/data/mapObjects/rockethideout4.asm index c73273bb..b4e98d04 100755 --- a/data/mapObjects/rockethideout4.asm +++ b/data/mapObjects/rockethideout4.asm @@ -1,4 +1,4 @@ -RocketHideout4Object: ; 0x455f1 (size=95) +RocketHideout4Object: db $2e ; border block db $3 ; warps @@ -8,16 +8,16 @@ RocketHideout4Object: ; 0x455f1 (size=95) db $0 ; signs - db $9 ; people - db SPRITE_GIOVANNI, $3 + 4, $19 + 4, $ff, $d0, TRAINER | $1, GIOVANNI + $C8, $1 - db SPRITE_ROCKET, $c + 4, $17 + 4, $ff, $d0, TRAINER | $2, ROCKET + $C8, $10 - db SPRITE_ROCKET, $c + 4, $1a + 4, $ff, $d0, TRAINER | $3, ROCKET + $C8, $11 - db SPRITE_ROCKET, $2 + 4, $b + 4, $ff, $d0, TRAINER | $4, ROCKET + $C8, $12 - db SPRITE_BALL, $c + 4, $a + 4, $ff, $ff, ITEM | $5, HP_UP - db SPRITE_BALL, $4 + 4, $9 + 4, $ff, $ff, ITEM | $6, TM_02 - db SPRITE_BALL, $14 + 4, $c + 4, $ff, $ff, ITEM | $7, IRON - db SPRITE_BALL, $2 + 4, $19 + 4, $ff, $ff, ITEM | $8, SILPH_SCOPE - db SPRITE_BALL, $2 + 4, $a + 4, $ff, $ff, ITEM | $9, LIFT_KEY + db $9 ; objects + object SPRITE_GIOVANNI, $19, $3, STAY, DOWN, $1, OPP_GIOVANNI, $1 + object SPRITE_ROCKET, $17, $c, STAY, DOWN, $2, OPP_ROCKET, $10 + object SPRITE_ROCKET, $1a, $c, STAY, DOWN, $3, OPP_ROCKET, $11 + object SPRITE_ROCKET, $b, $2, STAY, DOWN, $4, OPP_ROCKET, $12 + object SPRITE_BALL, $a, $c, STAY, NONE, $5, HP_UP + object SPRITE_BALL, $9, $4, STAY, NONE, $6, TM_02 + object SPRITE_BALL, $c, $14, STAY, NONE, $7, IRON + object SPRITE_BALL, $19, $2, STAY, NONE, $8, SILPH_SCOPE + object SPRITE_BALL, $a, $2, STAY, NONE, $9, LIFT_KEY ; warp-to EVENT_DISP ROCKET_HIDEOUT_4_WIDTH, $a, $13 ; ROCKET_HIDEOUT_3 diff --git a/data/mapObjects/rockethideoutelevator.asm b/data/mapObjects/rockethideoutelevator.asm index e4653a4c..c1dfe961 100755 --- a/data/mapObjects/rockethideoutelevator.asm +++ b/data/mapObjects/rockethideoutelevator.asm @@ -1,4 +1,4 @@ -RocketHideoutElevatorObject: ; 0x45791 (size=23) +RocketHideoutElevatorObject: db $f ; border block db $2 ; warps @@ -8,7 +8,7 @@ RocketHideoutElevatorObject: ; 0x45791 (size=23) db $1 ; signs db $1, $1, $1 ; RocketHideoutElevatorText1 - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP ROCKET_HIDEOUT_ELEVATOR_WIDTH, $1, $2 ; ROCKET_HIDEOUT_1 diff --git a/data/mapObjects/rocktunnel1.asm b/data/mapObjects/rocktunnel1.asm index b8c8ff62..932efb87 100755 --- a/data/mapObjects/rocktunnel1.asm +++ b/data/mapObjects/rocktunnel1.asm @@ -1,4 +1,4 @@ -RockTunnel1Object: ; 0x445f6 (size=127) +RockTunnel1Object: db $3 ; border block db $8 ; warps @@ -14,14 +14,14 @@ RockTunnel1Object: ; 0x445f6 (size=127) db $1 ; signs db $1d, $b, $8 ; RockTunnel1Text8 - db $7 ; people - db SPRITE_HIKER, $5 + 4, $7 + 4, $ff, $d0, TRAINER | $1, HIKER + $C8, $c - db SPRITE_HIKER, $10 + 4, $5 + 4, $ff, $d0, TRAINER | $2, HIKER + $C8, $d - db SPRITE_HIKER, $f + 4, $11 + 4, $ff, $d2, TRAINER | $3, HIKER + $C8, $e - db SPRITE_BLACK_HAIR_BOY_2, $8 + 4, $17 + 4, $ff, $d2, TRAINER | $4, POKEMANIAC + $C8, $7 - db SPRITE_LASS, $15 + 4, $25 + 4, $ff, $d2, TRAINER | $5, JR__TRAINER_F + $C8, $11 - db SPRITE_LASS, $18 + 4, $16 + 4, $ff, $d0, TRAINER | $6, JR__TRAINER_F + $C8, $12 - db SPRITE_LASS, $18 + 4, $20 + 4, $ff, $d3, TRAINER | $7, JR__TRAINER_F + $C8, $13 + db $7 ; objects + object SPRITE_HIKER, $7, $5, STAY, DOWN, $1, OPP_HIKER, $c + object SPRITE_HIKER, $5, $10, STAY, DOWN, $2, OPP_HIKER, $d + object SPRITE_HIKER, $11, $f, STAY, LEFT, $3, OPP_HIKER, $e + object SPRITE_BLACK_HAIR_BOY_2, $17, $8, STAY, LEFT, $4, OPP_POKEMANIAC, $7 + object SPRITE_LASS, $25, $15, STAY, LEFT, $5, OPP_JR_TRAINER_F, $11 + object SPRITE_LASS, $16, $18, STAY, DOWN, $6, OPP_JR_TRAINER_F, $12 + object SPRITE_LASS, $20, $18, STAY, RIGHT, $7, OPP_JR_TRAINER_F, $13 ; warp-to EVENT_DISP ROCK_TUNNEL_1_WIDTH, $3, $f diff --git a/data/mapObjects/rocktunnel2.asm b/data/mapObjects/rocktunnel2.asm index f75add5d..3589ec60 100755 --- a/data/mapObjects/rocktunnel2.asm +++ b/data/mapObjects/rocktunnel2.asm @@ -1,4 +1,4 @@ -RockTunnel2Object: ; 0x4613d (size=100) +RockTunnel2Object: db $3 ; border block db $4 ; warps @@ -9,15 +9,15 @@ RockTunnel2Object: ; 0x4613d (size=100) db $0 ; signs - db $8 ; people - db SPRITE_LASS, $d + 4, $b + 4, $ff, $d0, TRAINER | $1, JR__TRAINER_F + $C8, $9 - db SPRITE_HIKER, $a + 4, $6 + 4, $ff, $d0, TRAINER | $2, HIKER + $C8, $9 - db SPRITE_BLACK_HAIR_BOY_2, $5 + 4, $3 + 4, $ff, $d0, TRAINER | $3, POKEMANIAC + $C8, $3 - db SPRITE_BLACK_HAIR_BOY_2, $15 + 4, $14 + 4, $ff, $d3, TRAINER | $4, POKEMANIAC + $C8, $4 - db SPRITE_HIKER, $a + 4, $1e + 4, $ff, $d0, TRAINER | $5, HIKER + $C8, $a - db SPRITE_LASS, $1c + 4, $e + 4, $ff, $d3, TRAINER | $6, JR__TRAINER_F + $C8, $a - db SPRITE_HIKER, $5 + 4, $21 + 4, $ff, $d3, TRAINER | $7, HIKER + $C8, $b - db SPRITE_BLACK_HAIR_BOY_2, $1e + 4, $1a + 4, $ff, $d0, TRAINER | $8, POKEMANIAC + $C8, $5 + db $8 ; objects + object SPRITE_LASS, $b, $d, STAY, DOWN, $1, OPP_JR_TRAINER_F, $9 + object SPRITE_HIKER, $6, $a, STAY, DOWN, $2, OPP_HIKER, $9 + object SPRITE_BLACK_HAIR_BOY_2, $3, $5, STAY, DOWN, $3, OPP_POKEMANIAC, $3 + object SPRITE_BLACK_HAIR_BOY_2, $14, $15, STAY, RIGHT, $4, OPP_POKEMANIAC, $4 + object SPRITE_HIKER, $1e, $a, STAY, DOWN, $5, OPP_HIKER, $a + object SPRITE_LASS, $e, $1c, STAY, RIGHT, $6, OPP_JR_TRAINER_F, $a + object SPRITE_HIKER, $21, $5, STAY, RIGHT, $7, OPP_HIKER, $b + object SPRITE_BLACK_HAIR_BOY_2, $1a, $1e, STAY, DOWN, $8, OPP_POKEMANIAC, $5 ; warp-to EVENT_DISP ROCK_TUNNEL_2_WIDTH, $19, $21 ; ROCK_TUNNEL_1 diff --git a/data/mapObjects/rocktunnelpokecenter.asm b/data/mapObjects/rocktunnelpokecenter.asm index 2dd7b71d..90efc3ea 100755 --- a/data/mapObjects/rocktunnelpokecenter.asm +++ b/data/mapObjects/rocktunnelpokecenter.asm @@ -1,4 +1,4 @@ -RockTunnelPokecenterObject: ; 0x493d4 (size=44) +RockTunnelPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ RockTunnelPokecenterObject: ; 0x493d4 (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_GENTLEMAN, $3 + 4, $7 + 4, $fe, $2, $2 ; person - db SPRITE_FISHER2, $5 + 4, $2 + 4, $ff, $ff, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_GENTLEMAN, $7, $3, WALK, $2, $2 ; person + object SPRITE_FISHER2, $2, $5, STAY, NONE, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP ROCK_TUNNEL_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/route1.asm b/data/mapObjects/route1.asm index c16738f3..0e6237e7 100755 --- a/data/mapObjects/route1.asm +++ b/data/mapObjects/route1.asm @@ -1,4 +1,4 @@ -Route1Object: ; 0x1c0e5 (size=19) +Route1Object: db $b ; border block db $0 ; warps @@ -6,9 +6,9 @@ Route1Object: ; 0x1c0e5 (size=19) db $1 ; signs db $1b, $9, $3 ; Route1Text3 - db $2 ; people - db SPRITE_BUG_CATCHER, $18 + 4, $5 + 4, $fe, $1, $1 ; person - db SPRITE_BUG_CATCHER, $d + 4, $f + 4, $fe, $2, $2 ; person + db $2 ; objects + object SPRITE_BUG_CATCHER, $5, $18, WALK, $1, $1 ; person + object SPRITE_BUG_CATCHER, $f, $d, WALK, $2, $2 ; person ; warp-to (unused) EVENT_DISP $4, $7, $2 diff --git a/data/mapObjects/route10.asm b/data/mapObjects/route10.asm index aa3f8a8e..a1590ded 100755 --- a/data/mapObjects/route10.asm +++ b/data/mapObjects/route10.asm @@ -1,4 +1,4 @@ -Route10Object: ; 0x582f6 (size=96) +Route10Object: db $2c ; border block db $4 ; warps @@ -13,13 +13,13 @@ Route10Object: ; 0x582f6 (size=96) db $37, $9, $9 ; Route10Text9 db $29, $5, $a ; Route10Text10 - db $6 ; people - db SPRITE_BLACK_HAIR_BOY_2, $2c + 4, $a + 4, $ff, $d2, TRAINER | $1, POKEMANIAC + $C8, $1 - db SPRITE_HIKER, $39 + 4, $3 + 4, $ff, $d1, TRAINER | $2, HIKER + $C8, $7 - db SPRITE_BLACK_HAIR_BOY_2, $40 + 4, $e + 4, $ff, $d2, TRAINER | $3, POKEMANIAC + $C8, $2 - db SPRITE_LASS, $19 + 4, $7 + 4, $ff, $d2, TRAINER | $4, JR__TRAINER_F + $C8, $7 - db SPRITE_HIKER, $3d + 4, $3 + 4, $ff, $d0, TRAINER | $5, HIKER + $C8, $8 - db SPRITE_LASS, $36 + 4, $7 + 4, $ff, $d0, TRAINER | $6, JR__TRAINER_F + $C8, $8 + db $6 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $a, $2c, STAY, LEFT, $1, OPP_POKEMANIAC, $1 + object SPRITE_HIKER, $3, $39, STAY, UP, $2, OPP_HIKER, $7 + object SPRITE_BLACK_HAIR_BOY_2, $e, $40, STAY, LEFT, $3, OPP_POKEMANIAC, $2 + object SPRITE_LASS, $7, $19, STAY, LEFT, $4, OPP_JR_TRAINER_F, $7 + object SPRITE_HIKER, $3, $3d, STAY, DOWN, $5, OPP_HIKER, $8 + object SPRITE_LASS, $7, $36, STAY, DOWN, $6, OPP_JR_TRAINER_F, $8 ; warp-to EVENT_DISP ROUTE_10_WIDTH, $13, $b ; ROCK_TUNNEL_POKECENTER diff --git a/data/mapObjects/route11.asm b/data/mapObjects/route11.asm index 167af2f8..0c7828f2 100755 --- a/data/mapObjects/route11.asm +++ b/data/mapObjects/route11.asm @@ -1,4 +1,4 @@ -Route11Object: ; 0x584e0 (size=127) +Route11Object: db $f ; border block db $5 ; warps @@ -11,17 +11,17 @@ Route11Object: ; 0x584e0 (size=127) db $1 ; signs db $5, $1, $b ; Route11Text11 - db $a ; people - db SPRITE_GAMBLER, $e + 4, $a + 4, $ff, $d0, TRAINER | $1, GAMBLER + $C8, $1 - db SPRITE_GAMBLER, $9 + 4, $1a + 4, $ff, $d0, TRAINER | $2, GAMBLER + $C8, $2 - db SPRITE_BUG_CATCHER, $5 + 4, $d + 4, $ff, $d2, TRAINER | $3, YOUNGSTER + $C8, $9 - db SPRITE_BLACK_HAIR_BOY_2, $b + 4, $24 + 4, $ff, $d0, TRAINER | $4, ENGINEER + $C8, $2 - db SPRITE_BUG_CATCHER, $4 + 4, $16 + 4, $ff, $d1, TRAINER | $5, YOUNGSTER + $C8, $a - db SPRITE_GAMBLER, $7 + 4, $2d + 4, $ff, $d0, TRAINER | $6, GAMBLER + $C8, $3 - db SPRITE_GAMBLER, $3 + 4, $21 + 4, $ff, $d1, TRAINER | $7, GAMBLER + $C8, $4 - db SPRITE_BUG_CATCHER, $5 + 4, $2b + 4, $ff, $d3, TRAINER | $8, YOUNGSTER + $C8, $b - db SPRITE_BLACK_HAIR_BOY_2, $10 + 4, $2d + 4, $ff, $d2, TRAINER | $9, ENGINEER + $C8, $3 - db SPRITE_BUG_CATCHER, $c + 4, $16 + 4, $ff, $d1, TRAINER | $a, YOUNGSTER + $C8, $c + db $a ; objects + object SPRITE_GAMBLER, $a, $e, STAY, DOWN, $1, OPP_GAMBLER, $1 + object SPRITE_GAMBLER, $1a, $9, STAY, DOWN, $2, OPP_GAMBLER, $2 + object SPRITE_BUG_CATCHER, $d, $5, STAY, LEFT, $3, OPP_YOUNGSTER, $9 + object SPRITE_BLACK_HAIR_BOY_2, $24, $b, STAY, DOWN, $4, OPP_ENGINEER, $2 + object SPRITE_BUG_CATCHER, $16, $4, STAY, UP, $5, OPP_YOUNGSTER, $a + object SPRITE_GAMBLER, $2d, $7, STAY, DOWN, $6, OPP_GAMBLER, $3 + object SPRITE_GAMBLER, $21, $3, STAY, UP, $7, OPP_GAMBLER, $4 + object SPRITE_BUG_CATCHER, $2b, $5, STAY, RIGHT, $8, OPP_YOUNGSTER, $b + object SPRITE_BLACK_HAIR_BOY_2, $2d, $10, STAY, LEFT, $9, OPP_ENGINEER, $3 + object SPRITE_BUG_CATCHER, $16, $c, STAY, UP, $a, OPP_YOUNGSTER, $c ; warp-to EVENT_DISP ROUTE_11_WIDTH, $8, $31 ; ROUTE_11_GATE_1F diff --git a/data/mapObjects/route11gate.asm b/data/mapObjects/route11gate.asm index 5ebfb13d..d8e6bff1 100755 --- a/data/mapObjects/route11gate.asm +++ b/data/mapObjects/route11gate.asm @@ -1,4 +1,4 @@ -Route11GateObject: ; 0x49416 (size=50) +Route11GateObject: db $a ; border block db $5 ; warps @@ -10,8 +10,8 @@ Route11GateObject: ; 0x49416 (size=50) db $0 ; signs - db $1 ; people - db SPRITE_GUARD, $1 + 4, $4 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_GUARD, $4, $1, STAY, NONE, $1 ; person ; warp-to EVENT_DISP ROUTE_11_GATE_1F_WIDTH, $4, $0 diff --git a/data/mapObjects/route11gateupstairs.asm b/data/mapObjects/route11gateupstairs.asm index 8ee0f8fa..6228851d 100755 --- a/data/mapObjects/route11gateupstairs.asm +++ b/data/mapObjects/route11gateupstairs.asm @@ -1,4 +1,4 @@ -Route11GateUpstairsObject: ; 0x494da (size=30) +Route11GateUpstairsObject: db $a ; border block db $1 ; warps @@ -8,9 +8,9 @@ Route11GateUpstairsObject: ; 0x494da (size=30) db $2, $1, $3 ; Route11GateUpstairsText3 db $2, $6, $4 ; Route11GateUpstairsText4 - db $2 ; people - db SPRITE_BUG_CATCHER, $2 + 4, $4 + 4, $fe, $2, $1 ; person - db SPRITE_OAK_AIDE, $6 + 4, $2 + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_BUG_CATCHER, $4, $2, WALK, $2, $1 ; person + object SPRITE_OAK_AIDE, $2, $6, STAY, NONE, $2 ; person ; warp-to EVENT_DISP ROUTE_11_GATE_2F_WIDTH, $7, $7 ; ROUTE_11_GATE_1F diff --git a/data/mapObjects/route12.asm b/data/mapObjects/route12.asm index d0aaa847..dd461e6c 100755 --- a/data/mapObjects/route12.asm +++ b/data/mapObjects/route12.asm @@ -1,4 +1,4 @@ -Route12Object: ; 0x5869a (size=118) +Route12Object: db $43 ; border block db $4 ; warps @@ -11,17 +11,17 @@ Route12Object: ; 0x5869a (size=118) db $d, $d, $b ; Route12Text11 db $3f, $b, $c ; Route12Text12 - db $a ; people - db SPRITE_SNORLAX, $3e + 4, $a + 4, $ff, $d0, $1 ; person - db SPRITE_FISHER2, $1f + 4, $e + 4, $ff, $d2, TRAINER | $2, FISHER + $C8, $3 - db SPRITE_FISHER2, $27 + 4, $5 + 4, $ff, $d1, TRAINER | $3, FISHER + $C8, $4 - db SPRITE_BLACK_HAIR_BOY_1, $5c + 4, $b + 4, $ff, $d2, TRAINER | $4, JR__TRAINER_M + $C8, $9 - db SPRITE_BLACK_HAIR_BOY_2, $4c + 4, $e + 4, $ff, $d1, TRAINER | $5, ROCKER + $C8, $2 - db SPRITE_FISHER2, $28 + 4, $c + 4, $ff, $d2, TRAINER | $6, FISHER + $C8, $5 - db SPRITE_FISHER2, $34 + 4, $9 + 4, $ff, $d3, TRAINER | $7, FISHER + $C8, $6 - db SPRITE_FISHER2, $57 + 4, $6 + 4, $ff, $d0, TRAINER | $8, FISHER + $C8, $b - db SPRITE_BALL, $23 + 4, $e + 4, $ff, $ff, ITEM | $9, TM_16 - db SPRITE_BALL, $59 + 4, $5 + 4, $ff, $ff, ITEM | $a, IRON + db $a ; objects + object SPRITE_SNORLAX, $a, $3e, STAY, DOWN, $1 ; person + object SPRITE_FISHER2, $e, $1f, STAY, LEFT, $2, OPP_FISHER, $3 + object SPRITE_FISHER2, $5, $27, STAY, UP, $3, OPP_FISHER, $4 + object SPRITE_BLACK_HAIR_BOY_1, $b, $5c, STAY, LEFT, $4, OPP_JR_TRAINER_M, $9 + object SPRITE_BLACK_HAIR_BOY_2, $e, $4c, STAY, UP, $5, OPP_ROCKER, $2 + object SPRITE_FISHER2, $c, $28, STAY, LEFT, $6, OPP_FISHER, $5 + object SPRITE_FISHER2, $9, $34, STAY, RIGHT, $7, OPP_FISHER, $6 + object SPRITE_FISHER2, $6, $57, STAY, DOWN, $8, OPP_FISHER, $b + object SPRITE_BALL, $e, $23, STAY, NONE, $9, TM_16 + object SPRITE_BALL, $5, $59, STAY, NONE, $a, IRON ; warp-to EVENT_DISP ROUTE_12_WIDTH, $f, $a ; ROUTE_12_GATE_1F diff --git a/data/mapObjects/route12gate.asm b/data/mapObjects/route12gate.asm index fc70b763..27e8532a 100755 --- a/data/mapObjects/route12gate.asm +++ b/data/mapObjects/route12gate.asm @@ -1,4 +1,4 @@ -Route12GateObject: ; 0x4950e (size=50) +Route12GateObject: db $a ; border block db $5 ; warps @@ -10,8 +10,8 @@ Route12GateObject: ; 0x4950e (size=50) db $0 ; signs - db $1 ; people - db SPRITE_GUARD, $3 + 4, $1 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_GUARD, $1, $3, STAY, NONE, $1 ; person ; warp-to EVENT_DISP ROUTE_12_GATE_1F_WIDTH, $0, $4 diff --git a/data/mapObjects/route12gateupstairs.asm b/data/mapObjects/route12gateupstairs.asm index 012dedda..f1221c44 100755 --- a/data/mapObjects/route12gateupstairs.asm +++ b/data/mapObjects/route12gateupstairs.asm @@ -1,4 +1,4 @@ -Route12GateUpstairsObject: ; 0x495de (size=24) +Route12GateUpstairsObject: db $a ; border block db $1 ; warps @@ -8,8 +8,8 @@ Route12GateUpstairsObject: ; 0x495de (size=24) db $2, $1, $2 ; Route12GateUpstairsText2 db $2, $6, $3 ; Route12GateUpstairsText3 - db $1 ; people - db SPRITE_BRUNETTE_GIRL, $4 + 4, $3 + 4, $fe, $1, $1 ; person + db $1 ; objects + object SPRITE_BRUNETTE_GIRL, $3, $4, WALK, $1, $1 ; person ; warp-to EVENT_DISP ROUTE_12_GATE_2F_WIDTH, $7, $7 ; ROUTE_12_GATE_1F diff --git a/data/mapObjects/route12house.asm b/data/mapObjects/route12house.asm index 74ae5bc7..104b01f7 100755 --- a/data/mapObjects/route12house.asm +++ b/data/mapObjects/route12house.asm @@ -1,4 +1,4 @@ -Route12HouseObject: ; 0x564de (size=26) +Route12HouseObject: db $a ; border block db $2 ; warps @@ -7,8 +7,8 @@ Route12HouseObject: ; 0x564de (size=26) db $0 ; signs - db $1 ; people - db SPRITE_FISHER, $4 + 4, $2 + 4, $ff, $d3, $1 ; person + db $1 ; objects + object SPRITE_FISHER, $2, $4, STAY, RIGHT, $1 ; person ; warp-to EVENT_DISP ROUTE_12_HOUSE_WIDTH, $7, $2 diff --git a/data/mapObjects/route13.asm b/data/mapObjects/route13.asm index 5cf6d0c2..a01e25a3 100755 --- a/data/mapObjects/route13.asm +++ b/data/mapObjects/route13.asm @@ -1,4 +1,4 @@ -Route13Object: ; 0x5482e (size=93) +Route13Object: db $43 ; border block db $0 ; warps @@ -8,14 +8,14 @@ Route13Object: ; 0x5482e (size=93) db $5, $21, $c ; Route13Text12 db $b, $1f, $d ; Route13Text13 - db $a ; people - db SPRITE_BLACK_HAIR_BOY_1, $a + 4, $31 + 4, $ff, $d3, TRAINER | $1, BIRD_KEEPER + $C8, $1 - db SPRITE_LASS, $a + 4, $30 + 4, $ff, $d0, TRAINER | $2, JR__TRAINER_F + $C8, $c - db SPRITE_LASS, $9 + 4, $1b + 4, $ff, $d0, TRAINER | $3, JR__TRAINER_F + $C8, $d - db SPRITE_LASS, $a + 4, $17 + 4, $ff, $d2, TRAINER | $4, JR__TRAINER_F + $C8, $e - db SPRITE_LASS, $5 + 4, $32 + 4, $ff, $d0, TRAINER | $5, JR__TRAINER_F + $C8, $f - db SPRITE_BLACK_HAIR_BOY_1, $4 + 4, $c + 4, $ff, $d3, TRAINER | $6, BIRD_KEEPER + $C8, $2 - db SPRITE_FOULARD_WOMAN, $6 + 4, $21 + 4, $ff, $d0, TRAINER | $7, BEAUTY + $C8, $4 - db SPRITE_FOULARD_WOMAN, $6 + 4, $20 + 4, $ff, $d0, TRAINER | $8, BEAUTY + $C8, $5 - db SPRITE_BIKER, $7 + 4, $a + 4, $ff, $d1, TRAINER | $9, BIKER + $C8, $1 - db SPRITE_BLACK_HAIR_BOY_1, $d + 4, $7 + 4, $ff, $d1, TRAINER | $a, BIRD_KEEPER + $C8, $3 + db $a ; objects + object SPRITE_BLACK_HAIR_BOY_1, $31, $a, STAY, RIGHT, $1, OPP_BIRD_KEEPER, $1 + object SPRITE_LASS, $30, $a, STAY, DOWN, $2, OPP_JR_TRAINER_F, $c + object SPRITE_LASS, $1b, $9, STAY, DOWN, $3, OPP_JR_TRAINER_F, $d + object SPRITE_LASS, $17, $a, STAY, LEFT, $4, OPP_JR_TRAINER_F, $e + object SPRITE_LASS, $32, $5, STAY, DOWN, $5, OPP_JR_TRAINER_F, $f + object SPRITE_BLACK_HAIR_BOY_1, $c, $4, STAY, RIGHT, $6, OPP_BIRD_KEEPER, $2 + object SPRITE_FOULARD_WOMAN, $21, $6, STAY, DOWN, $7, OPP_BEAUTY, $4 + object SPRITE_FOULARD_WOMAN, $20, $6, STAY, DOWN, $8, OPP_BEAUTY, $5 + object SPRITE_BIKER, $a, $7, STAY, UP, $9, OPP_BIKER, $1 + object SPRITE_BLACK_HAIR_BOY_1, $7, $d, STAY, UP, $a, OPP_BIRD_KEEPER, $3 diff --git a/data/mapObjects/route14.asm b/data/mapObjects/route14.asm index a16f83e2..48edd284 100755 --- a/data/mapObjects/route14.asm +++ b/data/mapObjects/route14.asm @@ -1,4 +1,4 @@ -Route14Object: ; 0x549bb (size=87) +Route14Object: db $43 ; border block db $0 ; warps @@ -6,14 +6,14 @@ Route14Object: ; 0x549bb (size=87) db $1 ; signs db $d, $11, $b ; Route14Text11 - db $a ; people - db SPRITE_BLACK_HAIR_BOY_1, $4 + 4, $4 + 4, $ff, $d0, TRAINER | $1, BIRD_KEEPER + $C8, $e - db SPRITE_BLACK_HAIR_BOY_1, $6 + 4, $f + 4, $ff, $d0, TRAINER | $2, BIRD_KEEPER + $C8, $f - db SPRITE_BLACK_HAIR_BOY_1, $b + 4, $c + 4, $ff, $d0, TRAINER | $3, BIRD_KEEPER + $C8, $10 - db SPRITE_BLACK_HAIR_BOY_1, $f + 4, $e + 4, $ff, $d1, TRAINER | $4, BIRD_KEEPER + $C8, $11 - db SPRITE_BLACK_HAIR_BOY_1, $1f + 4, $f + 4, $ff, $d2, TRAINER | $5, BIRD_KEEPER + $C8, $4 - db SPRITE_BLACK_HAIR_BOY_1, $31 + 4, $6 + 4, $ff, $d1, TRAINER | $6, BIRD_KEEPER + $C8, $5 - db SPRITE_BIKER, $27 + 4, $5 + 4, $ff, $d0, TRAINER | $7, BIKER + $C8, $d - db SPRITE_BIKER, $1e + 4, $4 + 4, $ff, $d3, TRAINER | $8, BIKER + $C8, $e - db SPRITE_BIKER, $1e + 4, $f + 4, $ff, $d2, TRAINER | $9, BIKER + $C8, $f - db SPRITE_BIKER, $1f + 4, $4 + 4, $ff, $d3, TRAINER | $a, BIKER + $C8, $2 + db $a ; objects + object SPRITE_BLACK_HAIR_BOY_1, $4, $4, STAY, DOWN, $1, OPP_BIRD_KEEPER, $e + object SPRITE_BLACK_HAIR_BOY_1, $f, $6, STAY, DOWN, $2, OPP_BIRD_KEEPER, $f + object SPRITE_BLACK_HAIR_BOY_1, $c, $b, STAY, DOWN, $3, OPP_BIRD_KEEPER, $10 + object SPRITE_BLACK_HAIR_BOY_1, $e, $f, STAY, UP, $4, OPP_BIRD_KEEPER, $11 + object SPRITE_BLACK_HAIR_BOY_1, $f, $1f, STAY, LEFT, $5, OPP_BIRD_KEEPER, $4 + object SPRITE_BLACK_HAIR_BOY_1, $6, $31, STAY, UP, $6, OPP_BIRD_KEEPER, $5 + object SPRITE_BIKER, $5, $27, STAY, DOWN, $7, OPP_BIKER, $d + object SPRITE_BIKER, $4, $1e, STAY, RIGHT, $8, OPP_BIKER, $e + object SPRITE_BIKER, $f, $1e, STAY, LEFT, $9, OPP_BIKER, $f + object SPRITE_BIKER, $4, $1f, STAY, RIGHT, $a, OPP_BIKER, $2 diff --git a/data/mapObjects/route15.asm b/data/mapObjects/route15.asm index a7165c6c..1d83b20d 100755 --- a/data/mapObjects/route15.asm +++ b/data/mapObjects/route15.asm @@ -1,4 +1,4 @@ -Route15Object: ; 0x5894e (size=126) +Route15Object: db $43 ; border block db $4 ; warps @@ -10,18 +10,18 @@ Route15Object: ; 0x5894e (size=126) db $1 ; signs db $9, $27, $c ; Route15Text12 - db $b ; people - db SPRITE_LASS, $b + 4, $29 + 4, $ff, $d0, TRAINER | $1, JR__TRAINER_F + $C8, $14 - db SPRITE_LASS, $a + 4, $35 + 4, $ff, $d2, TRAINER | $2, JR__TRAINER_F + $C8, $15 - db SPRITE_BLACK_HAIR_BOY_1, $d + 4, $1f + 4, $ff, $d1, TRAINER | $3, BIRD_KEEPER + $C8, $6 - db SPRITE_BLACK_HAIR_BOY_1, $d + 4, $23 + 4, $ff, $d1, TRAINER | $4, BIRD_KEEPER + $C8, $7 - db SPRITE_FOULARD_WOMAN, $b + 4, $35 + 4, $ff, $d0, TRAINER | $5, BEAUTY + $C8, $9 - db SPRITE_FOULARD_WOMAN, $a + 4, $29 + 4, $ff, $d3, TRAINER | $6, BEAUTY + $C8, $a - db SPRITE_BIKER, $a + 4, $30 + 4, $ff, $d0, TRAINER | $7, BIKER + $C8, $3 - db SPRITE_BIKER, $a + 4, $2e + 4, $ff, $d0, TRAINER | $8, BIKER + $C8, $4 - db SPRITE_LASS, $5 + 4, $25 + 4, $ff, $d3, TRAINER | $9, JR__TRAINER_F + $C8, $16 - db SPRITE_LASS, $d + 4, $12 + 4, $ff, $d1, TRAINER | $a, JR__TRAINER_F + $C8, $17 - db SPRITE_BALL, $5 + 4, $12 + 4, $ff, $ff, ITEM | $b, TM_20 + db $b ; objects + object SPRITE_LASS, $29, $b, STAY, DOWN, $1, OPP_JR_TRAINER_F, $14 + object SPRITE_LASS, $35, $a, STAY, LEFT, $2, OPP_JR_TRAINER_F, $15 + object SPRITE_BLACK_HAIR_BOY_1, $1f, $d, STAY, UP, $3, OPP_BIRD_KEEPER, $6 + object SPRITE_BLACK_HAIR_BOY_1, $23, $d, STAY, UP, $4, OPP_BIRD_KEEPER, $7 + object SPRITE_FOULARD_WOMAN, $35, $b, STAY, DOWN, $5, OPP_BEAUTY, $9 + object SPRITE_FOULARD_WOMAN, $29, $a, STAY, RIGHT, $6, OPP_BEAUTY, $a + object SPRITE_BIKER, $30, $a, STAY, DOWN, $7, OPP_BIKER, $3 + object SPRITE_BIKER, $2e, $a, STAY, DOWN, $8, OPP_BIKER, $4 + object SPRITE_LASS, $25, $5, STAY, RIGHT, $9, OPP_JR_TRAINER_F, $16 + object SPRITE_LASS, $12, $d, STAY, UP, $a, OPP_JR_TRAINER_F, $17 + object SPRITE_BALL, $12, $5, STAY, NONE, $b, TM_20 ; warp-to EVENT_DISP ROUTE_15_WIDTH, $8, $7 ; ROUTE_15_GATE_1F diff --git a/data/mapObjects/route15gate.asm b/data/mapObjects/route15gate.asm index e0278fbe..06a6790a 100755 --- a/data/mapObjects/route15gate.asm +++ b/data/mapObjects/route15gate.asm @@ -1,4 +1,4 @@ -Route15GateObject: ; 0x4960c (size=50) +Route15GateObject: db $a ; border block db $5 ; warps @@ -10,8 +10,8 @@ Route15GateObject: ; 0x4960c (size=50) db $0 ; signs - db $1 ; people - db SPRITE_GUARD, $1 + 4, $4 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_GUARD, $4, $1, STAY, NONE, $1 ; person ; warp-to EVENT_DISP ROUTE_15_GATE_1F_WIDTH, $4, $0 diff --git a/data/mapObjects/route15gateupstairs.asm b/data/mapObjects/route15gateupstairs.asm index dd7a0b2c..c4cdcea8 100755 --- a/data/mapObjects/route15gateupstairs.asm +++ b/data/mapObjects/route15gateupstairs.asm @@ -1,4 +1,4 @@ -Route15GateUpstairsObject: ; 4969d (12:569d) +Route15GateUpstairsObject: db $a ; border block db $1 ; warps @@ -7,8 +7,8 @@ Route15GateUpstairsObject: ; 4969d (12:569d) db $1 ; signs db $2, $6, $2 ; Route15GateUpstairsText2 - db $1 ; people - db SPRITE_OAK_AIDE, $2 + 4, $4 + 4, $ff, $d0, $1 + db $1 ; objects + object SPRITE_OAK_AIDE, $4, $2, STAY, DOWN, $1 ; warp-to EVENT_DISP ROUTE_15_GATE_2F_WIDTH, $7, $7 ; ROUTE_15_GATE_1F diff --git a/data/mapObjects/route16.asm b/data/mapObjects/route16.asm index 3023124e..a342d106 100755 --- a/data/mapObjects/route16.asm +++ b/data/mapObjects/route16.asm @@ -1,4 +1,4 @@ -Route16Object: ; 0x58afc (size=136) +Route16Object: db $f ; border block db $9 ; warps @@ -16,14 +16,14 @@ Route16Object: ; 0x58afc (size=136) db $b, $1b, $8 ; Route16Text8 db $11, $5, $9 ; Route16Text9 - db $7 ; people - db SPRITE_BIKER, $c + 4, $11 + 4, $ff, $d2, TRAINER | $1, BIKER + $C8, $5 - db SPRITE_BIKER, $d + 4, $e + 4, $ff, $d3, TRAINER | $2, CUE_BALL + $C8, $1 - db SPRITE_BIKER, $c + 4, $b + 4, $ff, $d1, TRAINER | $3, CUE_BALL + $C8, $2 - db SPRITE_BIKER, $b + 4, $9 + 4, $ff, $d2, TRAINER | $4, BIKER + $C8, $6 - db SPRITE_BIKER, $a + 4, $6 + 4, $ff, $d3, TRAINER | $5, CUE_BALL + $C8, $3 - db SPRITE_BIKER, $c + 4, $3 + 4, $ff, $d3, TRAINER | $6, BIKER + $C8, $7 - db SPRITE_SNORLAX, $a + 4, $1a + 4, $ff, $d0, $7 ; person + db $7 ; objects + object SPRITE_BIKER, $11, $c, STAY, LEFT, $1, OPP_BIKER, $5 + object SPRITE_BIKER, $e, $d, STAY, RIGHT, $2, OPP_CUE_BALL, $1 + object SPRITE_BIKER, $b, $c, STAY, UP, $3, OPP_CUE_BALL, $2 + object SPRITE_BIKER, $9, $b, STAY, LEFT, $4, OPP_BIKER, $6 + object SPRITE_BIKER, $6, $a, STAY, RIGHT, $5, OPP_CUE_BALL, $3 + object SPRITE_BIKER, $3, $c, STAY, RIGHT, $6, OPP_BIKER, $7 + object SPRITE_SNORLAX, $1a, $a, STAY, DOWN, $7 ; person ; warp-to EVENT_DISP ROUTE_16_WIDTH, $a, $11 ; ROUTE_16_GATE_1F diff --git a/data/mapObjects/route16gate.asm b/data/mapObjects/route16gate.asm index 3b493cca..fce6c292 100755 --- a/data/mapObjects/route16gate.asm +++ b/data/mapObjects/route16gate.asm @@ -1,4 +1,4 @@ -Route16GateObject: ; 0x4978b (size=88) +Route16GateObject: db $a ; border block db $9 ; warps @@ -14,9 +14,9 @@ Route16GateObject: ; 0x4978b (size=88) db $0 ; signs - db $2 ; people - db SPRITE_GUARD, $5 + 4, $4 + 4, $ff, $d0, $1 ; person - db SPRITE_GAMBLER, $3 + 4, $4 + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_GUARD, $4, $5, STAY, DOWN, $1 ; person + object SPRITE_GAMBLER, $4, $3, STAY, NONE, $2 ; person ; warp-to EVENT_DISP ROUTE_16_GATE_1F_WIDTH, $8, $0 diff --git a/data/mapObjects/route16gateupstairs.asm b/data/mapObjects/route16gateupstairs.asm index ee9df620..9119bf5e 100755 --- a/data/mapObjects/route16gateupstairs.asm +++ b/data/mapObjects/route16gateupstairs.asm @@ -1,4 +1,4 @@ -Route16GateUpstairsObject: ; 0x4984c (size=30) +Route16GateUpstairsObject: db $a ; border block db $1 ; warps @@ -8,9 +8,9 @@ Route16GateUpstairsObject: ; 0x4984c (size=30) db $2, $1, $3 ; Route16GateUpstairsText3 db $2, $6, $4 ; Route16GateUpstairsText4 - db $2 ; people - db SPRITE_YOUNG_BOY, $2 + 4, $4 + 4, $ff, $ff, $1 ; person - db SPRITE_LITTLE_GIRL, $5 + 4, $2 + 4, $fe, $2, $2 ; person + db $2 ; objects + object SPRITE_YOUNG_BOY, $4, $2, STAY, NONE, $1 ; person + object SPRITE_LITTLE_GIRL, $2, $5, WALK, $2, $2 ; person ; warp-to EVENT_DISP ROUTE_16_GATE_2F_WIDTH, $7, $7 ; ROUTE_16_GATE_1F diff --git a/data/mapObjects/route16house.asm b/data/mapObjects/route16house.asm index 816c0e69..e1e4244d 100755 --- a/data/mapObjects/route16house.asm +++ b/data/mapObjects/route16house.asm @@ -1,4 +1,4 @@ -Route16HouseObject: ; 0x1e657 (size=32) +Route16HouseObject: db $a ; border block db $2 ; warps @@ -7,9 +7,9 @@ Route16HouseObject: ; 0x1e657 (size=32) db $0 ; signs - db $2 ; people - db SPRITE_BRUNETTE_GIRL, $3 + 4, $2 + 4, $ff, $d3, $1 ; person - db SPRITE_BIRD, $4 + 4, $6 + 4, $fe, $0, $2 ; person + db $2 ; objects + object SPRITE_BRUNETTE_GIRL, $2, $3, STAY, RIGHT, $1 ; person + object SPRITE_BIRD, $6, $4, WALK, $0, $2 ; person ; warp-to EVENT_DISP ROUTE_16_HOUSE_WIDTH, $7, $2 diff --git a/data/mapObjects/route17.asm b/data/mapObjects/route17.asm index 06123998..3c8e3bce 100755 --- a/data/mapObjects/route17.asm +++ b/data/mapObjects/route17.asm @@ -1,4 +1,4 @@ -Route17Object: ; 0x54b42 (size=102) +Route17Object: db $43 ; border block db $0 ; warps @@ -11,14 +11,14 @@ Route17Object: ; 0x54b42 (size=102) db $6f, $9, $f ; Route17Text15 db $8d, $9, $10 ; Route17Text16 - db $a ; people - db SPRITE_BIKER, $13 + 4, $c + 4, $ff, $d2, TRAINER | $1, CUE_BALL + $C8, $4 - db SPRITE_BIKER, $10 + 4, $b + 4, $ff, $d3, TRAINER | $2, CUE_BALL + $C8, $5 - db SPRITE_BIKER, $12 + 4, $4 + 4, $ff, $d1, TRAINER | $3, BIKER + $C8, $8 - db SPRITE_BIKER, $20 + 4, $7 + 4, $ff, $d2, TRAINER | $4, BIKER + $C8, $9 - db SPRITE_BIKER, $22 + 4, $e + 4, $ff, $d3, TRAINER | $5, BIKER + $C8, $a - db SPRITE_BIKER, $3a + 4, $11 + 4, $ff, $d2, TRAINER | $6, CUE_BALL + $C8, $6 - db SPRITE_BIKER, $44 + 4, $2 + 4, $ff, $d3, TRAINER | $7, CUE_BALL + $C8, $7 - db SPRITE_BIKER, $62 + 4, $e + 4, $ff, $d3, TRAINER | $8, CUE_BALL + $C8, $8 - db SPRITE_BIKER, $62 + 4, $5 + 4, $ff, $d2, TRAINER | $9, BIKER + $C8, $b - db SPRITE_BIKER, $76 + 4, $a + 4, $ff, $d0, TRAINER | $a, BIKER + $C8, $c + db $a ; objects + object SPRITE_BIKER, $c, $13, STAY, LEFT, $1, OPP_CUE_BALL, $4 + object SPRITE_BIKER, $b, $10, STAY, RIGHT, $2, OPP_CUE_BALL, $5 + object SPRITE_BIKER, $4, $12, STAY, UP, $3, OPP_BIKER, $8 + object SPRITE_BIKER, $7, $20, STAY, LEFT, $4, OPP_BIKER, $9 + object SPRITE_BIKER, $e, $22, STAY, RIGHT, $5, OPP_BIKER, $a + object SPRITE_BIKER, $11, $3a, STAY, LEFT, $6, OPP_CUE_BALL, $6 + object SPRITE_BIKER, $2, $44, STAY, RIGHT, $7, OPP_CUE_BALL, $7 + object SPRITE_BIKER, $e, $62, STAY, RIGHT, $8, OPP_CUE_BALL, $8 + object SPRITE_BIKER, $5, $62, STAY, LEFT, $9, OPP_BIKER, $b + object SPRITE_BIKER, $a, $76, STAY, DOWN, $a, OPP_BIKER, $c diff --git a/data/mapObjects/route18.asm b/data/mapObjects/route18.asm index f4dd26f3..8b36ab7c 100755 --- a/data/mapObjects/route18.asm +++ b/data/mapObjects/route18.asm @@ -1,4 +1,4 @@ -Route18Object: ; 0x58c5a (size=66) +Route18Object: db $43 ; border block db $4 ; warps @@ -11,10 +11,10 @@ Route18Object: ; 0x58c5a (size=66) db $7, $2b, $4 ; Route18Text4 db $5, $21, $5 ; Route18Text5 - db $3 ; people - db SPRITE_BLACK_HAIR_BOY_1, $b + 4, $24 + 4, $ff, $d3, TRAINER | $1, BIRD_KEEPER + $C8, $8 - db SPRITE_BLACK_HAIR_BOY_1, $f + 4, $28 + 4, $ff, $d2, TRAINER | $2, BIRD_KEEPER + $C8, $9 - db SPRITE_BLACK_HAIR_BOY_1, $d + 4, $2a + 4, $ff, $d2, TRAINER | $3, BIRD_KEEPER + $C8, $a + db $3 ; objects + object SPRITE_BLACK_HAIR_BOY_1, $24, $b, STAY, RIGHT, $1, OPP_BIRD_KEEPER, $8 + object SPRITE_BLACK_HAIR_BOY_1, $28, $f, STAY, LEFT, $2, OPP_BIRD_KEEPER, $9 + object SPRITE_BLACK_HAIR_BOY_1, $2a, $d, STAY, LEFT, $3, OPP_BIRD_KEEPER, $a ; warp-to EVENT_DISP ROUTE_18_WIDTH, $8, $21 ; ROUTE_18_GATE_1F diff --git a/data/mapObjects/route18gate.asm b/data/mapObjects/route18gate.asm index 62816061..08b10050 100755 --- a/data/mapObjects/route18gate.asm +++ b/data/mapObjects/route18gate.asm @@ -1,4 +1,4 @@ -Route18GateObject: ; 0x49937 (size=50) +Route18GateObject: db $a ; border block db $5 ; warps @@ -10,8 +10,8 @@ Route18GateObject: ; 0x49937 (size=50) db $0 ; signs - db $1 ; people - db SPRITE_GUARD, $1 + 4, $4 + 4, $ff, $d0, $1 ; person + db $1 ; objects + object SPRITE_GUARD, $4, $1, STAY, DOWN, $1 ; person ; warp-to EVENT_DISP ROUTE_18_GATE_1F_WIDTH, $4, $0 diff --git a/data/mapObjects/route18gateupstairs.asm b/data/mapObjects/route18gateupstairs.asm index d2b55e7f..671b3215 100755 --- a/data/mapObjects/route18gateupstairs.asm +++ b/data/mapObjects/route18gateupstairs.asm @@ -1,4 +1,4 @@ -Route18GateUpstairsObject: ; 0x499a4 (size=24) +Route18GateUpstairsObject: db $a ; border block db $1 ; warps @@ -8,8 +8,8 @@ Route18GateUpstairsObject: ; 0x499a4 (size=24) db $2, $1, $2 ; Route18GateUpstairsText2 db $2, $6, $3 ; Route18GateUpstairsText3 - db $1 ; people - db SPRITE_BUG_CATCHER, $2 + 4, $4 + 4, $fe, $2, $1 ; person + db $1 ; objects + object SPRITE_BUG_CATCHER, $4, $2, WALK, $2, $1 ; person ; warp-to EVENT_DISP ROUTE_18_GATE_2F_WIDTH, $7, $7 ; ROUTE_18_GATE_1F diff --git a/data/mapObjects/route19.asm b/data/mapObjects/route19.asm index c6f80b6c..956caa6e 100755 --- a/data/mapObjects/route19.asm +++ b/data/mapObjects/route19.asm @@ -1,42 +1,21 @@ -Route19Object: ; 0x54e9a (size=87) +Route19Object: db $43 ; border block - IF DEF(_OPTION_BEACH_HOUSE) - db $1 ; warps - db $9, $5, $0, BEACH_HOUSE - ELSE - db $0 ; warps - ENDC + db $0 ; warps db $1 ; signs -IF DEF(_OPTION_BEACH_HOUSE) - db $b,$b,$b -ELSE db $9, $b, $b ; Route19Text11 -ENDC - db $a ; people -IF DEF(_OPTION_BEACH_HOUSE) - db SPRITE_BLACK_HAIR_BOY_1, $7 + 4, $9 + 4, $ff, $d3, TRAINER | 1, SWIMMER + $C8, 2 - db SPRITE_BLACK_HAIR_BOY_1, $9 + 4, $c + 4, $ff, $d2, TRAINER | 2, SWIMMER + $C8, 3 -ELSE - db SPRITE_BLACK_HAIR_BOY_1, $7 + 4, $8 + 4, $ff, $d2, TRAINER | 1, SWIMMER + $C8, 2 - db SPRITE_BLACK_HAIR_BOY_1, $7 + 4, $d + 4, $ff, $d2, TRAINER | 2, SWIMMER + $C8, 3 -ENDC - db SPRITE_SWIMMER, $19 + 4, $d + 4, $ff, $d2, TRAINER | $3, SWIMMER + $C8, $4 - db SPRITE_SWIMMER, $1b + 4, $4 + 4, $ff, $d3, TRAINER | $4, SWIMMER + $C8, $5 - db SPRITE_SWIMMER, $1f + 4, $10 + 4, $ff, $d1, TRAINER | $5, SWIMMER + $C8, $6 -IF DEF(_OPTION_BEACH_HOUSE) - db SPRITE_SWIMMER, $d + 4, $9 + 4, $ff, $d0, TRAINER | $6, SWIMMER + $C8, $7 -ELSE - db SPRITE_SWIMMER, $b + 4, $9 + 4, $ff, $d0, TRAINER | $6, SWIMMER + $C8, $7 -ENDC - db SPRITE_SWIMMER, $2b + 4, $8 + 4, $ff, $d2, TRAINER | $7, BEAUTY + $C8, $c - db SPRITE_SWIMMER, $2b + 4, $b + 4, $ff, $d3, TRAINER | $8, BEAUTY + $C8, $d - db SPRITE_SWIMMER, $2a + 4, $9 + 4, $ff, $d1, TRAINER | $9, SWIMMER + $C8, $8 - db SPRITE_SWIMMER, $2c + 4, $a + 4, $ff, $d0, TRAINER | $a, BEAUTY + $C8, $e + db $a ; objects + object SPRITE_BLACK_HAIR_BOY_1, $8, $7, STAY, LEFT, 1, OPP_SWIMMER, 2 + object SPRITE_BLACK_HAIR_BOY_1, $d, $7, STAY, LEFT, 2, OPP_SWIMMER, 3 + object SPRITE_SWIMMER, $d, $19, STAY, LEFT, $3, OPP_SWIMMER, $4 + object SPRITE_SWIMMER, $4, $1b, STAY, RIGHT, $4, OPP_SWIMMER, $5 + object SPRITE_SWIMMER, $10, $1f, STAY, UP, $5, OPP_SWIMMER, $6 + object SPRITE_SWIMMER, $9, $b, STAY, DOWN, $6, OPP_SWIMMER, $7 + object SPRITE_SWIMMER, $8, $2b, STAY, LEFT, $7, OPP_BEAUTY, $c + object SPRITE_SWIMMER, $b, $2b, STAY, RIGHT, $8, OPP_BEAUTY, $d + object SPRITE_SWIMMER, $9, $2a, STAY, UP, $9, OPP_SWIMMER, $8 + object SPRITE_SWIMMER, $a, $2c, STAY, DOWN, $a, OPP_BEAUTY, $e ; warp-to - IF DEF(_OPTION_BEACH_HOUSE) - EVENT_DISP ROUTE_19_WIDTH, $9, $5 ; BEACH_HOUSE - ENDC diff --git a/data/mapObjects/route2.asm b/data/mapObjects/route2.asm index 5587309c..7db8fe09 100755 --- a/data/mapObjects/route2.asm +++ b/data/mapObjects/route2.asm @@ -1,4 +1,4 @@ -Route2Object: ; 0x54022 (size=72) +Route2Object: db $f ; border block db $6 ; warps @@ -13,9 +13,9 @@ Route2Object: ; 0x54022 (size=72) db $41, $5, $3 ; Route2Text3 db $b, $b, $4 ; Route2Text4 - db $2 ; people - db SPRITE_BALL, $36 + 4, $d + 4, $ff, $ff, ITEM | $1, MOON_STONE - db SPRITE_BALL, $2d + 4, $d + 4, $ff, $ff, ITEM | $2, HP_UP + db $2 ; objects + object SPRITE_BALL, $d, $36, STAY, NONE, $1, MOON_STONE + object SPRITE_BALL, $d, $2d, STAY, NONE, $2, HP_UP ; warp-to EVENT_DISP ROUTE_2_WIDTH, $9, $c ; DIGLETTS_CAVE_EXIT diff --git a/data/mapObjects/route20.asm b/data/mapObjects/route20.asm index 78256699..a3527525 100755 --- a/data/mapObjects/route20.asm +++ b/data/mapObjects/route20.asm @@ -1,4 +1,4 @@ -Route20Object: ; 0x50113 (size=106) +Route20Object: db $43 ; border block db $2 ; warps @@ -9,17 +9,17 @@ Route20Object: ; 0x50113 (size=106) db $7, $33, $b ; Route20Text11 db $b, $39, $c ; Route20Text12 - db $a ; people - db SPRITE_SWIMMER, $8 + 4, $57 + 4, $ff, $d1, TRAINER | $1, SWIMMER + $C8, $9 - db SPRITE_SWIMMER, $b + 4, $44 + 4, $ff, $d1, TRAINER | $2, BEAUTY + $C8, $f - db SPRITE_SWIMMER, $a + 4, $2d + 4, $ff, $d0, TRAINER | $3, BEAUTY + $C8, $6 - db SPRITE_SWIMMER, $e + 4, $37 + 4, $ff, $d3, TRAINER | $4, JR__TRAINER_F + $C8, $18 - db SPRITE_SWIMMER, $d + 4, $26 + 4, $ff, $d0, TRAINER | $5, SWIMMER + $C8, $a - db SPRITE_SWIMMER, $d + 4, $57 + 4, $ff, $d1, TRAINER | $6, SWIMMER + $C8, $b - db SPRITE_BLACK_HAIR_BOY_1, $9 + 4, $22 + 4, $ff, $d1, TRAINER | $7, BIRD_KEEPER + $C8, $b - db SPRITE_SWIMMER, $7 + 4, $19 + 4, $ff, $d1, TRAINER | $8, BEAUTY + $C8, $7 - db SPRITE_SWIMMER, $c + 4, $18 + 4, $ff, $d0, TRAINER | $9, JR__TRAINER_F + $C8, $10 - db SPRITE_SWIMMER, $8 + 4, $f + 4, $ff, $d1, TRAINER | $a, BEAUTY + $C8, $8 + db $a ; objects + object SPRITE_SWIMMER, $57, $8, STAY, UP, $1, OPP_SWIMMER, $9 + object SPRITE_SWIMMER, $44, $b, STAY, UP, $2, OPP_BEAUTY, $f + object SPRITE_SWIMMER, $2d, $a, STAY, DOWN, $3, OPP_BEAUTY, $6 + object SPRITE_SWIMMER, $37, $e, STAY, RIGHT, $4, OPP_JR_TRAINER_F, $18 + object SPRITE_SWIMMER, $26, $d, STAY, DOWN, $5, OPP_SWIMMER, $a + object SPRITE_SWIMMER, $57, $d, STAY, UP, $6, OPP_SWIMMER, $b + object SPRITE_BLACK_HAIR_BOY_1, $22, $9, STAY, UP, $7, OPP_BIRD_KEEPER, $b + object SPRITE_SWIMMER, $19, $7, STAY, UP, $8, OPP_BEAUTY, $7 + object SPRITE_SWIMMER, $18, $c, STAY, DOWN, $9, OPP_JR_TRAINER_F, $10 + object SPRITE_SWIMMER, $f, $8, STAY, UP, $a, OPP_BEAUTY, $8 ; warp-to EVENT_DISP ROUTE_20_WIDTH, $5, $30 ; SEAFOAM_ISLANDS_1 diff --git a/data/mapObjects/route21.asm b/data/mapObjects/route21.asm index 6e9a044e..1ed7b1cb 100755 --- a/data/mapObjects/route21.asm +++ b/data/mapObjects/route21.asm @@ -1,17 +1,17 @@ -Route21Object: ; 0x55021 (size=76) +Route21Object: db $43 ; border block db $0 ; warps db $0 ; signs - db $9 ; people - db SPRITE_FISHER2, $18 + 4, $4 + 4, $ff, $d2, TRAINER | $1, FISHER + $C8, $7 - db SPRITE_FISHER2, $19 + 4, $6 + 4, $ff, $d0, TRAINER | $2, FISHER + $C8, $9 - db SPRITE_SWIMMER, $1f + 4, $a + 4, $ff, $d1, TRAINER | $3, SWIMMER + $C8, $c - db SPRITE_SWIMMER, $1e + 4, $c + 4, $ff, $d3, TRAINER | $4, CUE_BALL + $C8, $9 - db SPRITE_SWIMMER, $3f + 4, $10 + 4, $ff, $d0, TRAINER | $5, SWIMMER + $C8, $d - db SPRITE_SWIMMER, $47 + 4, $5 + 4, $ff, $d3, TRAINER | $6, SWIMMER + $C8, $e - db SPRITE_SWIMMER, $47 + 4, $f + 4, $ff, $d2, TRAINER | $7, SWIMMER + $C8, $f - db SPRITE_FISHER2, $38 + 4, $e + 4, $ff, $d2, TRAINER | $8, FISHER + $C8, $8 - db SPRITE_FISHER2, $39 + 4, $11 + 4, $ff, $d3, TRAINER | $9, FISHER + $C8, $a + db $9 ; objects + object SPRITE_FISHER2, $4, $18, STAY, LEFT, $1, OPP_FISHER, $7 + object SPRITE_FISHER2, $6, $19, STAY, DOWN, $2, OPP_FISHER, $9 + object SPRITE_SWIMMER, $a, $1f, STAY, UP, $3, OPP_SWIMMER, $c + object SPRITE_SWIMMER, $c, $1e, STAY, RIGHT, $4, OPP_CUE_BALL, $9 + object SPRITE_SWIMMER, $10, $3f, STAY, DOWN, $5, OPP_SWIMMER, $d + object SPRITE_SWIMMER, $5, $47, STAY, RIGHT, $6, OPP_SWIMMER, $e + object SPRITE_SWIMMER, $f, $47, STAY, LEFT, $7, OPP_SWIMMER, $f + object SPRITE_FISHER2, $e, $38, STAY, LEFT, $8, OPP_FISHER, $8 + object SPRITE_FISHER2, $11, $39, STAY, RIGHT, $9, OPP_FISHER, $a diff --git a/data/mapObjects/route22.asm b/data/mapObjects/route22.asm index ac67ed9f..ef568ae8 100755 --- a/data/mapObjects/route22.asm +++ b/data/mapObjects/route22.asm @@ -1,4 +1,4 @@ -Route22Object: ; 0x50022 (size=27) +Route22Object: db $2c ; border block db $1 ; warps @@ -7,9 +7,9 @@ Route22Object: ; 0x50022 (size=27) db $1 ; signs db $b, $7, $3 ; Route22FrontGateText - db $2 ; people - db SPRITE_BLUE, $5 + 4, $19 + 4, $ff, $ff, $1 ; person - db SPRITE_BLUE, $5 + 4, $19 + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_BLUE, $19, $5, STAY, NONE, $1 ; person + object SPRITE_BLUE, $19, $5, STAY, NONE, $2 ; person ; warp-to EVENT_DISP ROUTE_22_WIDTH, $5, $8 ; ROUTE_22_GATE diff --git a/data/mapObjects/route22gate.asm b/data/mapObjects/route22gate.asm index cafc47ce..2798311b 100755 --- a/data/mapObjects/route22gate.asm +++ b/data/mapObjects/route22gate.asm @@ -1,4 +1,4 @@ -Route22GateObject: ; 0x1e720 (size=42) +Route22GateObject: db $a ; border block db $4 ; warps @@ -9,8 +9,8 @@ Route22GateObject: ; 0x1e720 (size=42) db $0 ; signs - db $1 ; people - db SPRITE_GUARD, $2 + 4, $6 + 4, $ff, $d2, $1 ; person + db $1 ; objects + object SPRITE_GUARD, $6, $2, STAY, LEFT, $1 ; person ; warp-to EVENT_DISP ROUTE_22_GATE_WIDTH, $7, $4 diff --git a/data/mapObjects/route23.asm b/data/mapObjects/route23.asm index 15591ae1..3995e510 100755 --- a/data/mapObjects/route23.asm +++ b/data/mapObjects/route23.asm @@ -1,4 +1,4 @@ -Route23Object: ; 0x50361 (size=81) +Route23Object: db $f ; border block db $4 ; warps @@ -10,14 +10,14 @@ Route23Object: ; 0x50361 (size=81) db $1 ; signs db $21, $3, $8 ; Route23Text8 - db $7 ; people - db SPRITE_GUARD, $23 + 4, $4 + 4, $ff, $d0, $1 ; person - db SPRITE_GUARD, $38 + 4, $a + 4, $ff, $d0, $2 ; person - db SPRITE_SWIMMER, $55 + 4, $8 + 4, $ff, $d0, $3 ; person - db SPRITE_SWIMMER, $60 + 4, $b + 4, $ff, $d0, $4 ; person - db SPRITE_GUARD, $69 + 4, $c + 4, $ff, $d0, $5 ; person - db SPRITE_GUARD, $77 + 4, $8 + 4, $ff, $d0, $6 ; person - db SPRITE_GUARD, $88 + 4, $8 + 4, $ff, $d0, $7 ; person + db $7 ; objects + object SPRITE_GUARD, $4, $23, STAY, DOWN, $1 ; person + object SPRITE_GUARD, $a, $38, STAY, DOWN, $2 ; person + object SPRITE_SWIMMER, $8, $55, STAY, DOWN, $3 ; person + object SPRITE_SWIMMER, $b, $60, STAY, DOWN, $4 ; person + object SPRITE_GUARD, $c, $69, STAY, DOWN, $5 ; person + object SPRITE_GUARD, $8, $77, STAY, DOWN, $6 ; person + object SPRITE_GUARD, $8, $88, STAY, DOWN, $7 ; person ; warp-to EVENT_DISP ROUTE_23_WIDTH, $8b, $7 ; ROUTE_22_GATE diff --git a/data/mapObjects/route24.asm b/data/mapObjects/route24.asm index e17709ff..5af90a4b 100755 --- a/data/mapObjects/route24.asm +++ b/data/mapObjects/route24.asm @@ -1,16 +1,16 @@ -Route24Object: ; 0x506a4 (size=67) +Route24Object: db $2c ; border block db $0 ; warps db $0 ; signs - db $8 ; people - db SPRITE_BLACK_HAIR_BOY_1, $f + 4, $b + 4, $ff, $d2, TRAINER | $1, ROCKET + $C8, $6 - db SPRITE_BLACK_HAIR_BOY_1, $14 + 4, $5 + 4, $ff, $d1, TRAINER | $2, JR__TRAINER_M + $C8, $2 - db SPRITE_BLACK_HAIR_BOY_1, $13 + 4, $b + 4, $ff, $d2, TRAINER | $3, JR__TRAINER_M + $C8, $3 - db SPRITE_LASS, $16 + 4, $a + 4, $ff, $d3, TRAINER | $4, LASS + $C8, $7 - db SPRITE_BUG_CATCHER, $19 + 4, $b + 4, $ff, $d2, TRAINER | $5, YOUNGSTER + $C8, $4 - db SPRITE_LASS, $1c + 4, $a + 4, $ff, $d3, TRAINER | $6, LASS + $C8, $8 - db SPRITE_BUG_CATCHER, $1f + 4, $b + 4, $ff, $d2, TRAINER | $7, BUG_CATCHER + $C8, $9 - db SPRITE_BALL, $5 + 4, $a + 4, $ff, $ff, ITEM | $8, TM_45 + db $8 ; objects + object SPRITE_BLACK_HAIR_BOY_1, $b, $f, STAY, LEFT, $1, OPP_ROCKET, $6 + object SPRITE_BLACK_HAIR_BOY_1, $5, $14, STAY, UP, $2, OPP_JR_TRAINER_M, $2 + object SPRITE_BLACK_HAIR_BOY_1, $b, $13, STAY, LEFT, $3, OPP_JR_TRAINER_M, $3 + object SPRITE_LASS, $a, $16, STAY, RIGHT, $4, OPP_LASS, $7 + object SPRITE_BUG_CATCHER, $b, $19, STAY, LEFT, $5, OPP_YOUNGSTER, $4 + object SPRITE_LASS, $a, $1c, STAY, RIGHT, $6, OPP_LASS, $8 + object SPRITE_BUG_CATCHER, $b, $1f, STAY, LEFT, $7, OPP_BUG_CATCHER, $9 + object SPRITE_BALL, $a, $5, STAY, NONE, $8, TM_45 diff --git a/data/mapObjects/route25.asm b/data/mapObjects/route25.asm index 6b3ef029..b26f62ef 100755 --- a/data/mapObjects/route25.asm +++ b/data/mapObjects/route25.asm @@ -1,4 +1,4 @@ -Route25Object: ; 0x507b2 (size=94) +Route25Object: db $2c ; border block db $1 ; warps @@ -7,17 +7,17 @@ Route25Object: ; 0x507b2 (size=94) db $1 ; signs db $3, $2b, $b ; Route25Text11 - db $a ; people - db SPRITE_BUG_CATCHER, $2 + 4, $e + 4, $ff, $d0, TRAINER | $1, YOUNGSTER + $C8, $5 - db SPRITE_BUG_CATCHER, $5 + 4, $12 + 4, $ff, $d1, TRAINER | $2, YOUNGSTER + $C8, $6 - db SPRITE_BLACK_HAIR_BOY_1, $4 + 4, $18 + 4, $ff, $d0, TRAINER | $3, JR__TRAINER_M + $C8, $2 - db SPRITE_LASS, $8 + 4, $12 + 4, $ff, $d3, TRAINER | $4, LASS + $C8, $9 - db SPRITE_BUG_CATCHER, $3 + 4, $20 + 4, $ff, $d2, TRAINER | $5, YOUNGSTER + $C8, $7 - db SPRITE_LASS, $4 + 4, $25 + 4, $ff, $d0, TRAINER | $6, LASS + $C8, $a - db SPRITE_HIKER, $4 + 4, $8 + 4, $ff, $d3, TRAINER | $7, HIKER + $C8, $2 - db SPRITE_HIKER, $9 + 4, $17 + 4, $ff, $d1, TRAINER | $8, HIKER + $C8, $3 - db SPRITE_HIKER, $7 + 4, $d + 4, $ff, $d3, TRAINER | $9, HIKER + $C8, $4 - db SPRITE_BALL, $2 + 4, $16 + 4, $ff, $ff, ITEM | $a, TM_19 + db $a ; objects + object SPRITE_BUG_CATCHER, $e, $2, STAY, DOWN, $1, OPP_YOUNGSTER, $5 + object SPRITE_BUG_CATCHER, $12, $5, STAY, UP, $2, OPP_YOUNGSTER, $6 + object SPRITE_BLACK_HAIR_BOY_1, $18, $4, STAY, DOWN, $3, OPP_JR_TRAINER_M, $2 + object SPRITE_LASS, $12, $8, STAY, RIGHT, $4, OPP_LASS, $9 + object SPRITE_BUG_CATCHER, $20, $3, STAY, LEFT, $5, OPP_YOUNGSTER, $7 + object SPRITE_LASS, $25, $4, STAY, DOWN, $6, OPP_LASS, $a + object SPRITE_HIKER, $8, $4, STAY, RIGHT, $7, OPP_HIKER, $2 + object SPRITE_HIKER, $17, $9, STAY, UP, $8, OPP_HIKER, $3 + object SPRITE_HIKER, $d, $7, STAY, RIGHT, $9, OPP_HIKER, $4 + object SPRITE_BALL, $16, $2, STAY, NONE, $a, TM_19 ; warp-to EVENT_DISP ROUTE_25_WIDTH, $3, $2d ; BILLS_HOUSE diff --git a/data/mapObjects/route2gate.asm b/data/mapObjects/route2gate.asm index a1bcc687..53590f69 100755 --- a/data/mapObjects/route2gate.asm +++ b/data/mapObjects/route2gate.asm @@ -1,4 +1,4 @@ -Route2GateObject: ; 0x5d620 (size=48) +Route2GateObject: db $a ; border block db $4 ; warps @@ -9,9 +9,9 @@ Route2GateObject: ; 0x5d620 (size=48) db $0 ; signs - db $2 ; people - db SPRITE_OAK_AIDE, $4 + 4, $1 + 4, $ff, $d2, $1 ; person - db SPRITE_BUG_CATCHER, $4 + 4, $5 + 4, $fe, $2, $2 ; person + db $2 ; objects + object SPRITE_OAK_AIDE, $1, $4, STAY, LEFT, $1 ; person + object SPRITE_BUG_CATCHER, $5, $4, WALK, $2, $2 ; person ; warp-to EVENT_DISP ROUTE_2_GATE_WIDTH, $0, $4 diff --git a/data/mapObjects/route2house.asm b/data/mapObjects/route2house.asm index 26adfcf4..d6665020 100755 --- a/data/mapObjects/route2house.asm +++ b/data/mapObjects/route2house.asm @@ -1,4 +1,4 @@ -Route2HouseObject: ; 0x1df07 (size=32) +Route2HouseObject: db $a ; border block db $2 ; warps @@ -7,9 +7,9 @@ Route2HouseObject: ; 0x1df07 (size=32) db $0 ; signs - db $2 ; people - db SPRITE_OAK_AIDE, $4 + 4, $2 + 4, $ff, $d3, $1 ; person - db SPRITE_GAMEBOY_KID_COPY, $1 + 4, $4 + 4, $ff, $d0, $2 ; person + db $2 ; objects + object SPRITE_OAK_AIDE, $2, $4, STAY, RIGHT, $1 ; person + object SPRITE_GAMEBOY_KID_COPY, $4, $1, STAY, DOWN, $2 ; person ; warp-to EVENT_DISP ROUTE_2_HOUSE_WIDTH, $7, $2 diff --git a/data/mapObjects/route3.asm b/data/mapObjects/route3.asm index 99de3d73..ba446dca 100755 --- a/data/mapObjects/route3.asm +++ b/data/mapObjects/route3.asm @@ -1,4 +1,4 @@ -Route3Object: ; 0x54208 (size=77) +Route3Object: db $2c ; border block db $0 ; warps @@ -6,13 +6,13 @@ Route3Object: ; 0x54208 (size=77) db $1 ; signs db $9, $3b, $a ; Route3Text10 - db $9 ; people - db SPRITE_BLACK_HAIR_BOY_2, $b + 4, $39 + 4, $ff, $ff, $1 ; person - db SPRITE_BUG_CATCHER, $6 + 4, $a + 4, $ff, $d3, TRAINER | $2, BUG_CATCHER + $C8, $4 - db SPRITE_BUG_CATCHER, $4 + 4, $e + 4, $ff, $d0, TRAINER | $3, YOUNGSTER + $C8, $1 - db SPRITE_LASS, $9 + 4, $10 + 4, $ff, $d2, TRAINER | $4, LASS + $C8, $1 - db SPRITE_BUG_CATCHER, $5 + 4, $13 + 4, $ff, $d0, TRAINER | $5, BUG_CATCHER + $C8, $5 - db SPRITE_LASS, $4 + 4, $17 + 4, $ff, $d2, TRAINER | $6, LASS + $C8, $2 - db SPRITE_BUG_CATCHER, $9 + 4, $16 + 4, $ff, $d2, TRAINER | $7, YOUNGSTER + $C8, $2 - db SPRITE_BUG_CATCHER, $6 + 4, $18 + 4, $ff, $d3, TRAINER | $8, BUG_CATCHER + $C8, $6 - db SPRITE_LASS, $a + 4, $21 + 4, $ff, $d1, TRAINER | $9, LASS + $C8, $3 + db $9 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $39, $b, STAY, NONE, $1 ; person + object SPRITE_BUG_CATCHER, $a, $6, STAY, RIGHT, $2, OPP_BUG_CATCHER, $4 + object SPRITE_BUG_CATCHER, $e, $4, STAY, DOWN, $3, OPP_YOUNGSTER, $1 + object SPRITE_LASS, $10, $9, STAY, LEFT, $4, OPP_LASS, $1 + object SPRITE_BUG_CATCHER, $13, $5, STAY, DOWN, $5, OPP_BUG_CATCHER, $5 + object SPRITE_LASS, $17, $4, STAY, LEFT, $6, OPP_LASS, $2 + object SPRITE_BUG_CATCHER, $16, $9, STAY, LEFT, $7, OPP_YOUNGSTER, $2 + object SPRITE_BUG_CATCHER, $18, $6, STAY, RIGHT, $8, OPP_BUG_CATCHER, $6 + object SPRITE_LASS, $21, $a, STAY, UP, $9, OPP_LASS, $3 diff --git a/data/mapObjects/route4.asm b/data/mapObjects/route4.asm index 57b81ee2..e52f4909 100755 --- a/data/mapObjects/route4.asm +++ b/data/mapObjects/route4.asm @@ -1,4 +1,4 @@ -Route4Object: ; 0x543b2 (size=58) +Route4Object: db $2c ; border block db $3 ; warps @@ -11,10 +11,10 @@ Route4Object: ; 0x543b2 (size=58) db $7, $11, $5 ; Route4Text5 db $7, $1b, $6 ; Route4Text6 - db $3 ; people - db SPRITE_LASS, $8 + 4, $9 + 4, $fe, $0, $1 ; person - db SPRITE_LASS, $3 + 4, $3f + 4, $ff, $d3, TRAINER | $2, LASS + $C8, $4 - db SPRITE_BALL, $3 + 4, $39 + 4, $ff, $ff, ITEM | $3, TM_04 + db $3 ; objects + object SPRITE_LASS, $9, $8, WALK, $0, $1 ; person + object SPRITE_LASS, $3f, $3, STAY, RIGHT, $2, OPP_LASS, $4 + object SPRITE_BALL, $39, $3, STAY, NONE, $3, TM_04 ; warp-to EVENT_DISP ROUTE_4_WIDTH, $5, $b ; MT_MOON_POKECENTER diff --git a/data/mapObjects/route5.asm b/data/mapObjects/route5.asm index c7481faa..6065f599 100755 --- a/data/mapObjects/route5.asm +++ b/data/mapObjects/route5.asm @@ -1,4 +1,4 @@ -Route5Object: ; 0x545a3 (size=47) +Route5Object: db $a ; border block db $5 ; warps @@ -11,7 +11,7 @@ Route5Object: ; 0x545a3 (size=47) db $1 ; signs db $1d, $11, $1 ; Route5Text1 - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP ROUTE_5_WIDTH, $1d, $a ; ROUTE_5_GATE diff --git a/data/mapObjects/route5gate.asm b/data/mapObjects/route5gate.asm index f71e3e64..9588f511 100755 --- a/data/mapObjects/route5gate.asm +++ b/data/mapObjects/route5gate.asm @@ -1,4 +1,4 @@ -Route5GateObject: ; 0x1dffb (size=42) +Route5GateObject: db $a ; border block db $4 ; warps @@ -9,8 +9,8 @@ Route5GateObject: ; 0x1dffb (size=42) db $0 ; signs - db $1 ; people - db SPRITE_GUARD, $3 + 4, $1 + 4, $ff, $d3, $1 ; person + db $1 ; objects + object SPRITE_GUARD, $1, $3, STAY, RIGHT, $1 ; person ; warp-to EVENT_DISP ROUTE_5_GATE_WIDTH, $5, $3 diff --git a/data/mapObjects/route6.asm b/data/mapObjects/route6.asm index b804f0d5..bfd88fac 100755 --- a/data/mapObjects/route6.asm +++ b/data/mapObjects/route6.asm @@ -1,4 +1,4 @@ -Route6Object: ; 0x58022 (size=87) +Route6Object: db $f ; border block db $4 ; warps @@ -10,13 +10,13 @@ Route6Object: ; 0x58022 (size=87) db $1 ; signs db $f, $13, $7 ; Route6Text7 - db $6 ; people - db SPRITE_BLACK_HAIR_BOY_1, $15 + 4, $a + 4, $ff, $d3, TRAINER | $1, JR__TRAINER_M + $C8, $4 - db SPRITE_LASS, $15 + 4, $b + 4, $ff, $d2, TRAINER | $2, JR__TRAINER_F + $C8, $2 - db SPRITE_BUG_CATCHER, $f + 4, $0 + 4, $ff, $d3, TRAINER | $3, BUG_CATCHER + $C8, $a - db SPRITE_BLACK_HAIR_BOY_1, $1f + 4, $b + 4, $ff, $d2, TRAINER | $4, JR__TRAINER_M + $C8, $5 - db SPRITE_LASS, $1e + 4, $b + 4, $ff, $d2, TRAINER | $5, JR__TRAINER_F + $C8, $3 - db SPRITE_BUG_CATCHER, $1a + 4, $13 + 4, $ff, $d2, TRAINER | $6, BUG_CATCHER + $C8, $b + db $6 ; objects + object SPRITE_BLACK_HAIR_BOY_1, $a, $15, STAY, RIGHT, $1, OPP_JR_TRAINER_M, $4 + object SPRITE_LASS, $b, $15, STAY, LEFT, $2, OPP_JR_TRAINER_F, $2 + object SPRITE_BUG_CATCHER, $0, $f, STAY, RIGHT, $3, OPP_BUG_CATCHER, $a + object SPRITE_BLACK_HAIR_BOY_1, $b, $1f, STAY, LEFT, $4, OPP_JR_TRAINER_M, $5 + object SPRITE_LASS, $b, $1e, STAY, LEFT, $5, OPP_JR_TRAINER_F, $3 + object SPRITE_BUG_CATCHER, $13, $1a, STAY, LEFT, $6, OPP_BUG_CATCHER, $b ; warp-to EVENT_DISP ROUTE_6_WIDTH, $1, $9 ; ROUTE_6_GATE diff --git a/data/mapObjects/route6gate.asm b/data/mapObjects/route6gate.asm index 068b1cc3..79f17007 100755 --- a/data/mapObjects/route6gate.asm +++ b/data/mapObjects/route6gate.asm @@ -1,4 +1,4 @@ -Route6GateObject: ; 0x1e0be (size=42) +Route6GateObject: db $a ; border block db $4 ; warps @@ -9,8 +9,8 @@ Route6GateObject: ; 0x1e0be (size=42) db $0 ; signs - db $1 ; people - db SPRITE_GUARD, $2 + 4, $6 + 4, $ff, $d2, $1 ; person + db $1 ; objects + object SPRITE_GUARD, $6, $2, STAY, LEFT, $1 ; person ; warp-to EVENT_DISP ROUTE_6_GATE_WIDTH, $5, $3 diff --git a/data/mapObjects/route7.asm b/data/mapObjects/route7.asm index 43425a11..d039cb3c 100755 --- a/data/mapObjects/route7.asm +++ b/data/mapObjects/route7.asm @@ -1,4 +1,4 @@ -Route7Object: ; 0x48022 (size=47) +Route7Object: db $f ; border block db $5 ; warps @@ -11,7 +11,7 @@ Route7Object: ; 0x48022 (size=47) db $1 ; signs db $d, $3, $1 ; Route7Text1 - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP ROUTE_7_WIDTH, $9, $12 ; ROUTE_7_GATE diff --git a/data/mapObjects/route7gate.asm b/data/mapObjects/route7gate.asm index 752b53f9..3aea6a88 100755 --- a/data/mapObjects/route7gate.asm +++ b/data/mapObjects/route7gate.asm @@ -1,4 +1,4 @@ -Route7GateObject: ; 0x1e185 (size=42) +Route7GateObject: db $a ; border block db $4 ; warps @@ -9,8 +9,8 @@ Route7GateObject: ; 0x1e185 (size=42) db $0 ; signs - db $1 ; people - db SPRITE_GUARD, $1 + 4, $3 + 4, $ff, $d0, $1 ; person + db $1 ; objects + object SPRITE_GUARD, $3, $1, STAY, DOWN, $1 ; person ; warp-to EVENT_DISP ROUTE_7_GATE_WIDTH, $3, $0 diff --git a/data/mapObjects/route8.asm b/data/mapObjects/route8.asm index 2662adcd..8aa16b82 100755 --- a/data/mapObjects/route8.asm +++ b/data/mapObjects/route8.asm @@ -1,4 +1,4 @@ -Route8Object: ; 0x5814f (size=119) +Route8Object: db $2c ; border block db $5 ; warps @@ -11,16 +11,16 @@ Route8Object: ; 0x5814f (size=119) db $1 ; signs db $3, $11, $a ; Route8Text10 - db $9 ; people - db SPRITE_BLACK_HAIR_BOY_2, $5 + 4, $8 + 4, $ff, $d3, TRAINER | $1, SUPER_NERD + $C8, $3 - db SPRITE_GAMBLER, $9 + 4, $d + 4, $ff, $d1, TRAINER | $2, GAMBLER + $C8, $5 - db SPRITE_BLACK_HAIR_BOY_2, $6 + 4, $2a + 4, $ff, $d1, TRAINER | $3, SUPER_NERD + $C8, $4 - db SPRITE_LASS, $3 + 4, $1a + 4, $ff, $d2, TRAINER | $4, LASS + $C8, $d - db SPRITE_BLACK_HAIR_BOY_2, $4 + 4, $1a + 4, $ff, $d3, TRAINER | $5, SUPER_NERD + $C8, $5 - db SPRITE_LASS, $5 + 4, $1a + 4, $ff, $d2, TRAINER | $6, LASS + $C8, $e - db SPRITE_LASS, $6 + 4, $1a + 4, $ff, $d3, TRAINER | $7, LASS + $C8, $f - db SPRITE_GAMBLER, $d + 4, $2e + 4, $ff, $d0, TRAINER | $8, GAMBLER + $C8, $7 - db SPRITE_LASS, $c + 4, $33 + 4, $ff, $d2, TRAINER | $9, LASS + $C8, $10 + db $9 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $8, $5, STAY, RIGHT, $1, OPP_SUPER_NERD, $3 + object SPRITE_GAMBLER, $d, $9, STAY, UP, $2, OPP_GAMBLER, $5 + object SPRITE_BLACK_HAIR_BOY_2, $2a, $6, STAY, UP, $3, OPP_SUPER_NERD, $4 + object SPRITE_LASS, $1a, $3, STAY, LEFT, $4, OPP_LASS, $d + object SPRITE_BLACK_HAIR_BOY_2, $1a, $4, STAY, RIGHT, $5, OPP_SUPER_NERD, $5 + object SPRITE_LASS, $1a, $5, STAY, LEFT, $6, OPP_LASS, $e + object SPRITE_LASS, $1a, $6, STAY, RIGHT, $7, OPP_LASS, $f + object SPRITE_GAMBLER, $2e, $d, STAY, DOWN, $8, OPP_GAMBLER, $7 + object SPRITE_LASS, $33, $c, STAY, LEFT, $9, OPP_LASS, $10 ; warp-to EVENT_DISP ROUTE_8_WIDTH, $9, $1 ; ROUTE_8_GATE diff --git a/data/mapObjects/route8gate.asm b/data/mapObjects/route8gate.asm index c38eed26..b059fb36 100755 --- a/data/mapObjects/route8gate.asm +++ b/data/mapObjects/route8gate.asm @@ -1,4 +1,4 @@ -Route8GateObject: ; 0x1e247 (size=42) +Route8GateObject: db $a ; border block db $4 ; warps @@ -9,8 +9,8 @@ Route8GateObject: ; 0x1e247 (size=42) db $0 ; signs - db $1 ; people - db SPRITE_GUARD, $1 + 4, $2 + 4, $ff, $d0, $1 ; person + db $1 ; objects + object SPRITE_GUARD, $2, $1, STAY, DOWN, $1 ; person ; warp-to EVENT_DISP ROUTE_8_GATE_WIDTH, $3, $0 diff --git a/data/mapObjects/route9.asm b/data/mapObjects/route9.asm index 32b89db4..9e079eab 100755 --- a/data/mapObjects/route9.asm +++ b/data/mapObjects/route9.asm @@ -1,4 +1,4 @@ -Route9Object: ; 0x546a8 (size=86) +Route9Object: db $2c ; border block db $0 ; warps @@ -6,14 +6,14 @@ Route9Object: ; 0x546a8 (size=86) db $1 ; signs db $7, $19, $b ; Route9Text11 - db $a ; people - db SPRITE_LASS, $a + 4, $d + 4, $ff, $d2, TRAINER | $1, JR__TRAINER_F + $C8, $5 - db SPRITE_BLACK_HAIR_BOY_1, $7 + 4, $18 + 4, $ff, $d2, TRAINER | $2, JR__TRAINER_M + $C8, $7 - db SPRITE_BLACK_HAIR_BOY_1, $7 + 4, $1f + 4, $ff, $d3, TRAINER | $3, JR__TRAINER_M + $C8, $8 - db SPRITE_LASS, $8 + 4, $30 + 4, $ff, $d3, TRAINER | $4, JR__TRAINER_F + $C8, $6 - db SPRITE_HIKER, $f + 4, $10 + 4, $ff, $d2, TRAINER | $5, HIKER + $C8, $b - db SPRITE_HIKER, $3 + 4, $2b + 4, $ff, $d2, TRAINER | $6, HIKER + $C8, $6 - db SPRITE_BUG_CATCHER, $2 + 4, $16 + 4, $ff, $d0, TRAINER | $7, BUG_CATCHER + $C8, $d - db SPRITE_HIKER, $f + 4, $2d + 4, $ff, $d3, TRAINER | $8, HIKER + $C8, $5 - db SPRITE_BUG_CATCHER, $8 + 4, $28 + 4, $ff, $d3, TRAINER | $9, BUG_CATCHER + $C8, $e - db SPRITE_BALL, $f + 4, $a + 4, $ff, $ff, ITEM | $a, TM_30 + db $a ; objects + object SPRITE_LASS, $d, $a, STAY, LEFT, $1, OPP_JR_TRAINER_F, $5 + object SPRITE_BLACK_HAIR_BOY_1, $18, $7, STAY, LEFT, $2, OPP_JR_TRAINER_M, $7 + object SPRITE_BLACK_HAIR_BOY_1, $1f, $7, STAY, RIGHT, $3, OPP_JR_TRAINER_M, $8 + object SPRITE_LASS, $30, $8, STAY, RIGHT, $4, OPP_JR_TRAINER_F, $6 + object SPRITE_HIKER, $10, $f, STAY, LEFT, $5, OPP_HIKER, $b + object SPRITE_HIKER, $2b, $3, STAY, LEFT, $6, OPP_HIKER, $6 + object SPRITE_BUG_CATCHER, $16, $2, STAY, DOWN, $7, OPP_BUG_CATCHER, $d + object SPRITE_HIKER, $2d, $f, STAY, RIGHT, $8, OPP_HIKER, $5 + object SPRITE_BUG_CATCHER, $28, $8, STAY, RIGHT, $9, OPP_BUG_CATCHER, $e + object SPRITE_BALL, $a, $f, STAY, NONE, $a, TM_30 diff --git a/data/mapObjects/safarizonecenter.asm b/data/mapObjects/safarizonecenter.asm index 8cb07350..b5fa0107 100755 --- a/data/mapObjects/safarizonecenter.asm +++ b/data/mapObjects/safarizonecenter.asm @@ -1,4 +1,4 @@ -SafariZoneCenterObject: ; 0x45bc5 (size=89) +SafariZoneCenterObject: db $0 ; border block db $9 ; warps @@ -16,8 +16,8 @@ SafariZoneCenterObject: ; 0x45bc5 (size=89) db $14, $12, $2 ; SafariZoneCenterText2 db $16, $e, $3 ; SafariZoneCenterText3 - db $1 ; people - db SPRITE_BALL, $a + 4, $e + 4, $ff, $ff, ITEM | $1, NUGGET + db $1 ; objects + object SPRITE_BALL, $e, $a, STAY, NONE, $1, NUGGET ; warp-to EVENT_DISP SAFARI_ZONE_CENTER_WIDTH, $19, $e ; SAFARI_ZONE_ENTRANCE diff --git a/data/mapObjects/safarizoneeast.asm b/data/mapObjects/safarizoneeast.asm index 26aa1cc1..6c2f8138 100755 --- a/data/mapObjects/safarizoneeast.asm +++ b/data/mapObjects/safarizoneeast.asm @@ -1,4 +1,4 @@ -SafariZoneEastObject: ; 0x4588b (size=81) +SafariZoneEastObject: db $0 ; border block db $5 ; warps @@ -13,11 +13,11 @@ SafariZoneEastObject: ; 0x4588b (size=81) db $4, $6, $6 ; SafariZoneEastText6 db $17, $5, $7 ; SafariZoneEastText7 - db $4 ; people - db SPRITE_BALL, $a + 4, $15 + 4, $ff, $ff, ITEM | $1, FULL_RESTORE - db SPRITE_BALL, $7 + 4, $3 + 4, $ff, $ff, ITEM | $2, MAX_POTION - db SPRITE_BALL, $d + 4, $14 + 4, $ff, $ff, ITEM | $3, CARBOS - db SPRITE_BALL, $c + 4, $f + 4, $ff, $ff, ITEM | $4, TM_37 + db $4 ; objects + object SPRITE_BALL, $15, $a, STAY, NONE, $1, FULL_RESTORE + object SPRITE_BALL, $3, $7, STAY, NONE, $2, MAX_POTION + object SPRITE_BALL, $14, $d, STAY, NONE, $3, CARBOS + object SPRITE_BALL, $f, $c, STAY, NONE, $4, TM_37 ; warp-to EVENT_DISP SAFARI_ZONE_EAST_WIDTH, $4, $0 ; SAFARI_ZONE_NORTH diff --git a/data/mapObjects/safarizoneentrance.asm b/data/mapObjects/safarizoneentrance.asm index c252109c..9d26aa17 100755 --- a/data/mapObjects/safarizoneentrance.asm +++ b/data/mapObjects/safarizoneentrance.asm @@ -1,4 +1,4 @@ -SafariZoneEntranceObject: ; 0x753f5 (size=48) +SafariZoneEntranceObject: db $a ; border block db $4 ; warps @@ -9,9 +9,9 @@ SafariZoneEntranceObject: ; 0x753f5 (size=48) db $0 ; signs - db $2 ; people - db SPRITE_WHITE_PLAYER, $2 + 4, $6 + 4, $ff, $d2, $1 ; person - db SPRITE_WHITE_PLAYER, $4 + 4, $1 + 4, $ff, $d3, $2 ; person + db $2 ; objects + object SPRITE_WHITE_PLAYER, $6, $2, STAY, LEFT, $1 ; person + object SPRITE_WHITE_PLAYER, $1, $4, STAY, RIGHT, $2 ; person ; warp-to EVENT_DISP SAFARI_ZONE_ENTRANCE_WIDTH, $5, $3 diff --git a/data/mapObjects/safarizonenorth.asm b/data/mapObjects/safarizonenorth.asm index 8c7a94f5..d0305507 100755 --- a/data/mapObjects/safarizonenorth.asm +++ b/data/mapObjects/safarizonenorth.asm @@ -1,4 +1,4 @@ -SafariZoneNorthObject: ; 0x459d5 (size=105) +SafariZoneNorthObject: db $0 ; border block db $9 ; warps @@ -19,9 +19,9 @@ SafariZoneNorthObject: ; 0x459d5 (size=105) db $21, $13, $6 ; SafariZoneNorthText6 db $1c, $1a, $7 ; SafariZoneNorthText7 - db $2 ; people - db SPRITE_BALL, $1 + 4, $19 + 4, $ff, $ff, ITEM | $1, PROTEIN - db SPRITE_BALL, $7 + 4, $13 + 4, $ff, $ff, ITEM | $2, TM_40 + db $2 ; objects + object SPRITE_BALL, $19, $1, STAY, NONE, $1, PROTEIN + object SPRITE_BALL, $13, $7, STAY, NONE, $2, TM_40 ; warp-to EVENT_DISP SAFARI_ZONE_NORTH_WIDTH, $23, $2 ; SAFARI_ZONE_WEST diff --git a/data/mapObjects/safarizoneresthouse1.asm b/data/mapObjects/safarizoneresthouse1.asm index 492f8f38..79156825 100755 --- a/data/mapObjects/safarizoneresthouse1.asm +++ b/data/mapObjects/safarizoneresthouse1.asm @@ -1,4 +1,4 @@ -SafariZoneRestHouse1Object: ; 0x45cfe (size=32) +SafariZoneRestHouse1Object: db $a ; border block db $2 ; warps @@ -7,9 +7,9 @@ SafariZoneRestHouse1Object: ; 0x45cfe (size=32) db $0 ; signs - db $2 ; people - db SPRITE_GIRL, $2 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_OAK_AIDE, $4 + 4, $1 + 4, $fe, $1, $2 ; person + db $2 ; objects + object SPRITE_GIRL, $3, $2, STAY, DOWN, $1 ; person + object SPRITE_OAK_AIDE, $1, $4, WALK, $1, $2 ; person ; warp-to EVENT_DISP SAFARI_ZONE_REST_HOUSE_1_WIDTH, $7, $2 ; SAFARI_ZONE_CENTER diff --git a/data/mapObjects/safarizoneresthouse2.asm b/data/mapObjects/safarizoneresthouse2.asm index f6918eed..82f04f9d 100755 --- a/data/mapObjects/safarizoneresthouse2.asm +++ b/data/mapObjects/safarizoneresthouse2.asm @@ -1,4 +1,4 @@ -SafariZoneRestHouse2Object: ; 0x45d43 (size=38) +SafariZoneRestHouse2Object: db $a ; border block db $2 ; warps @@ -7,10 +7,10 @@ SafariZoneRestHouse2Object: ; 0x45d43 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_OAK_AIDE, $4 + 4, $4 + 4, $fe, $0, $1 ; person - db SPRITE_BLACK_HAIR_BOY_1, $2 + 4, $0 + 4, $ff, $d3, $2 ; person - db SPRITE_ERIKA, $2 + 4, $6 + 4, $ff, $d0, $3 ; person + db $3 ; objects + object SPRITE_OAK_AIDE, $4, $4, WALK, $0, $1 ; person + object SPRITE_BLACK_HAIR_BOY_1, $0, $2, STAY, RIGHT, $2 ; person + object SPRITE_ERIKA, $6, $2, STAY, DOWN, $3 ; person ; warp-to EVENT_DISP SAFARI_ZONE_REST_HOUSE_2_WIDTH, $7, $2 ; SAFARI_ZONE_WEST diff --git a/data/mapObjects/safarizoneresthouse3.asm b/data/mapObjects/safarizoneresthouse3.asm index 70365365..ae973fa8 100755 --- a/data/mapObjects/safarizoneresthouse3.asm +++ b/data/mapObjects/safarizoneresthouse3.asm @@ -1,4 +1,4 @@ -SafariZoneRestHouse3Object: ; 0x45d8e (size=38) +SafariZoneRestHouse3Object: db $a ; border block db $2 ; warps @@ -7,10 +7,10 @@ SafariZoneRestHouse3Object: ; 0x45d8e (size=38) db $0 ; signs - db $3 ; people - db SPRITE_OAK_AIDE, $3 + 4, $1 + 4, $fe, $1, $1 ; person - db SPRITE_ROCKER, $2 + 4, $4 + 4, $ff, $ff, $2 ; person - db SPRITE_LAPRAS_GIVER, $2 + 4, $5 + 4, $ff, $ff, $3 ; person + db $3 ; objects + object SPRITE_OAK_AIDE, $1, $3, WALK, $1, $1 ; person + object SPRITE_ROCKER, $4, $2, STAY, NONE, $2 ; person + object SPRITE_LAPRAS_GIVER, $5, $2, STAY, NONE, $3 ; person ; warp-to EVENT_DISP SAFARI_ZONE_REST_HOUSE_3_WIDTH, $7, $2 ; SAFARI_ZONE_EAST diff --git a/data/mapObjects/safarizoneresthouse4.asm b/data/mapObjects/safarizoneresthouse4.asm index 53beef42..7502732c 100755 --- a/data/mapObjects/safarizoneresthouse4.asm +++ b/data/mapObjects/safarizoneresthouse4.asm @@ -1,4 +1,4 @@ -SafariZoneRestHouse4Object: ; 0x45dd9 (size=38) +SafariZoneRestHouse4Object: db $a ; border block db $2 ; warps @@ -7,10 +7,10 @@ SafariZoneRestHouse4Object: ; 0x45dd9 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_OAK_AIDE, $3 + 4, $6 + 4, $fe, $2, $1 ; person - db SPRITE_WHITE_PLAYER, $4 + 4, $3 + 4, $ff, $ff, $2 ; person - db SPRITE_GENTLEMAN, $5 + 4, $1 + 4, $fe, $1, $3 ; person + db $3 ; objects + object SPRITE_OAK_AIDE, $6, $3, WALK, $2, $1 ; person + object SPRITE_WHITE_PLAYER, $3, $4, STAY, NONE, $2 ; person + object SPRITE_GENTLEMAN, $1, $5, WALK, $1, $3 ; person ; warp-to EVENT_DISP SAFARI_ZONE_REST_HOUSE_4_WIDTH, $7, $2 ; SAFARI_ZONE_NORTH diff --git a/data/mapObjects/safarizonesecrethouse.asm b/data/mapObjects/safarizonesecrethouse.asm index 79032c70..a96115b8 100755 --- a/data/mapObjects/safarizonesecrethouse.asm +++ b/data/mapObjects/safarizonesecrethouse.asm @@ -1,4 +1,4 @@ -SafariZoneSecretHouseObject: ; 0x4a365 (size=26) +SafariZoneSecretHouseObject: db $17 ; border block db $2 ; warps @@ -7,8 +7,8 @@ SafariZoneSecretHouseObject: ; 0x4a365 (size=26) db $0 ; signs - db $1 ; people - db SPRITE_FISHER, $3 + 4, $3 + 4, $ff, $d0, $1 ; person + db $1 ; objects + object SPRITE_FISHER, $3, $3, STAY, DOWN, $1 ; person ; warp-to EVENT_DISP SAFARI_ZONE_SECRET_HOUSE_WIDTH, $7, $2 ; SAFARI_ZONE_WEST diff --git a/data/mapObjects/safarizonewest.asm b/data/mapObjects/safarizonewest.asm index 4bfc7a4d..64ed0876 100755 --- a/data/mapObjects/safarizonewest.asm +++ b/data/mapObjects/safarizonewest.asm @@ -1,4 +1,4 @@ -SafariZoneWestObject: ; 0x4a1dc (size=108) +SafariZoneWestObject: db $0 ; border block db $8 ; warps @@ -17,11 +17,11 @@ SafariZoneWestObject: ; 0x4a1dc (size=108) db $4, $1a, $7 ; SafariZoneWestText7 db $16, $18, $8 ; SafariZoneWestText8 - db $4 ; people - db SPRITE_BALL, $14 + 4, $8 + 4, $ff, $ff, ITEM | $1, MAX_POTION - db SPRITE_BALL, $7 + 4, $9 + 4, $ff, $ff, ITEM | $2, TM_32 - db SPRITE_BALL, $12 + 4, $12 + 4, $ff, $ff, ITEM | $3, MAX_REVIVE - db SPRITE_BALL, $7 + 4, $13 + 4, $ff, $ff, ITEM | $4, GOLD_TEETH + db $4 ; objects + object SPRITE_BALL, $8, $14, STAY, NONE, $1, MAX_POTION + object SPRITE_BALL, $9, $7, STAY, NONE, $2, TM_32 + object SPRITE_BALL, $12, $12, STAY, NONE, $3, MAX_REVIVE + object SPRITE_BALL, $13, $7, STAY, NONE, $4, GOLD_TEETH ; warp-to EVENT_DISP SAFARI_ZONE_WEST_WIDTH, $0, $14 ; SAFARI_ZONE_NORTH diff --git a/data/mapObjects/saffroncity.asm b/data/mapObjects/saffroncity.asm index 5ec54aff..7275800a 100755 --- a/data/mapObjects/saffroncity.asm +++ b/data/mapObjects/saffroncity.asm @@ -1,4 +1,4 @@ -SaffronCityObject: ; 0x509dc (size=188) +SaffronCityObject: db $f ; border block db $8 ; warps @@ -23,22 +23,22 @@ SaffronCityObject: ; 0x509dc (size=188) db $1d, $1b, $18 ; SaffronCityText24 db $13, $1, $19 ; SaffronCityText25 - db $f ; people - db SPRITE_ROCKET, $6 + 4, $7 + 4, $ff, $ff, $1 ; person - db SPRITE_ROCKET, $8 + 4, $14 + 4, $fe, $2, $2 ; person - db SPRITE_ROCKET, $4 + 4, $22 + 4, $ff, $ff, $3 ; person - db SPRITE_ROCKET, $c + 4, $d + 4, $ff, $ff, $4 ; person - db SPRITE_ROCKET, $19 + 4, $b + 4, $fe, $2, $5 ; person - db SPRITE_ROCKET, $d + 4, $20 + 4, $fe, $2, $6 ; person - db SPRITE_ROCKET, $1e + 4, $12 + 4, $fe, $2, $7 ; person - db SPRITE_OAK_AIDE, $e + 4, $8 + 4, $fe, $0, $8 ; person - db SPRITE_LAPRAS_GIVER, $17 + 4, $17 + 4, $ff, $ff, $9 ; person - db SPRITE_ERIKA, $1e + 4, $11 + 4, $fe, $2, $a ; person - db SPRITE_GENTLEMAN, $c + 4, $1e + 4, $ff, $d0, $b ; person - db SPRITE_BIRD, $c + 4, $1f + 4, $ff, $d0, $c ; person - db SPRITE_ROCKER, $8 + 4, $12 + 4, $ff, $d1, $d ; person - db SPRITE_ROCKET, $16 + 4, $12 + 4, $ff, $d0, $e ; person - db SPRITE_ROCKET, $16 + 4, $13 + 4, $ff, $d0, $f ; person + db $f ; objects + object SPRITE_ROCKET, $7, $6, STAY, NONE, $1 ; person + object SPRITE_ROCKET, $14, $8, WALK, $2, $2 ; person + object SPRITE_ROCKET, $22, $4, STAY, NONE, $3 ; person + object SPRITE_ROCKET, $d, $c, STAY, NONE, $4 ; person + object SPRITE_ROCKET, $b, $19, WALK, $2, $5 ; person + object SPRITE_ROCKET, $20, $d, WALK, $2, $6 ; person + object SPRITE_ROCKET, $12, $1e, WALK, $2, $7 ; person + object SPRITE_OAK_AIDE, $8, $e, WALK, $0, $8 ; person + object SPRITE_LAPRAS_GIVER, $17, $17, STAY, NONE, $9 ; person + object SPRITE_ERIKA, $11, $1e, WALK, $2, $a ; person + object SPRITE_GENTLEMAN, $1e, $c, STAY, DOWN, $b ; person + object SPRITE_BIRD, $1f, $c, STAY, DOWN, $c ; person + object SPRITE_ROCKER, $12, $8, STAY, UP, $d ; person + object SPRITE_ROCKET, $12, $16, STAY, DOWN, $e ; person + object SPRITE_ROCKET, $13, $16, STAY, DOWN, $f ; person ; warp-to EVENT_DISP SAFFRON_CITY_WIDTH, $5, $7 ; COPYCATS_HOUSE_1F diff --git a/data/mapObjects/saffrongym.asm b/data/mapObjects/saffrongym.asm index eb85a89f..6a770fdc 100755 --- a/data/mapObjects/saffrongym.asm +++ b/data/mapObjects/saffrongym.asm @@ -1,4 +1,4 @@ -SaffronGymObject: ; 0x5d259 (size=330) +SaffronGymObject: db $2e ; border block db $20 ; warps @@ -37,16 +37,16 @@ SaffronGymObject: ; 0x5d259 (size=330) db $0 ; signs - db $9 ; people - db SPRITE_GIRL, $8 + 4, $9 + 4, $ff, $d0, TRAINER | $1, SABRINA + $C8, $1 - db SPRITE_MEDIUM, $1 + 4, $a + 4, $ff, $d0, TRAINER | $2, CHANNELER + $C8, $16 - db SPRITE_BUG_CATCHER, $1 + 4, $11 + 4, $ff, $d0, TRAINER | $3, PSYCHIC_TR + $C8, $1 - db SPRITE_MEDIUM, $7 + 4, $3 + 4, $ff, $d0, TRAINER | $4, CHANNELER + $C8, $17 - db SPRITE_BUG_CATCHER, $7 + 4, $11 + 4, $ff, $d0, TRAINER | $5, PSYCHIC_TR + $C8, $2 - db SPRITE_MEDIUM, $d + 4, $3 + 4, $ff, $d0, TRAINER | $6, CHANNELER + $C8, $18 - db SPRITE_BUG_CATCHER, $d + 4, $11 + 4, $ff, $d0, TRAINER | $7, PSYCHIC_TR + $C8, $3 - db SPRITE_BUG_CATCHER, $1 + 4, $3 + 4, $ff, $d0, TRAINER | $8, PSYCHIC_TR + $C8, $4 - db SPRITE_GYM_HELPER, $f + 4, $a + 4, $ff, $d0, $9 ; person + db $9 ; objects + object SPRITE_GIRL, $9, $8, STAY, DOWN, $1, OPP_SABRINA, $1 + object SPRITE_MEDIUM, $a, $1, STAY, DOWN, $2, OPP_CHANNELER, $16 + object SPRITE_BUG_CATCHER, $11, $1, STAY, DOWN, $3, OPP_PSYCHIC_TR, $1 + object SPRITE_MEDIUM, $3, $7, STAY, DOWN, $4, OPP_CHANNELER, $17 + object SPRITE_BUG_CATCHER, $11, $7, STAY, DOWN, $5, OPP_PSYCHIC_TR, $2 + object SPRITE_MEDIUM, $3, $d, STAY, DOWN, $6, OPP_CHANNELER, $18 + object SPRITE_BUG_CATCHER, $11, $d, STAY, DOWN, $7, OPP_PSYCHIC_TR, $3 + object SPRITE_BUG_CATCHER, $3, $1, STAY, DOWN, $8, OPP_PSYCHIC_TR, $4 + object SPRITE_GYM_HELPER, $a, $f, STAY, DOWN, $9 ; person ; warp-to EVENT_DISP SAFFRON_GYM_WIDTH, $11, $8 diff --git a/data/mapObjects/saffronhouse1.asm b/data/mapObjects/saffronhouse1.asm index 991caa7d..9f6d7750 100755 --- a/data/mapObjects/saffronhouse1.asm +++ b/data/mapObjects/saffronhouse1.asm @@ -1,4 +1,4 @@ -SaffronHouse1Object: ; 0x1de04 (size=44) +SaffronHouse1Object: db $a ; border block db $2 ; warps @@ -7,11 +7,11 @@ SaffronHouse1Object: ; 0x1de04 (size=44) db $0 ; signs - db $4 ; people - db SPRITE_BRUNETTE_GIRL, $3 + 4, $2 + 4, $ff, $d3, $1 ; person - db SPRITE_BIRD, $4 + 4, $0 + 4, $fe, $1, $2 ; person - db SPRITE_BUG_CATCHER, $1 + 4, $4 + 4, $ff, $d0, $3 ; person - db SPRITE_PAPER_SHEET, $3 + 4, $3 + 4, $ff, $ff, $4 ; person + db $4 ; objects + object SPRITE_BRUNETTE_GIRL, $2, $3, STAY, RIGHT, $1 ; person + object SPRITE_BIRD, $0, $4, WALK, $1, $2 ; person + object SPRITE_BUG_CATCHER, $4, $1, STAY, DOWN, $3 ; person + object SPRITE_PAPER_SHEET, $3, $3, STAY, NONE, $4 ; person ; warp-to EVENT_DISP SAFFRON_HOUSE_1_WIDTH, $7, $2 diff --git a/data/mapObjects/saffronhouse2.asm b/data/mapObjects/saffronhouse2.asm index e9b68e7c..e57bdbb7 100755 --- a/data/mapObjects/saffronhouse2.asm +++ b/data/mapObjects/saffronhouse2.asm @@ -1,4 +1,4 @@ -SaffronHouse2Object: ; 0x1de8a (size=26) +SaffronHouse2Object: db $a ; border block db $2 ; warps @@ -7,8 +7,8 @@ SaffronHouse2Object: ; 0x1de8a (size=26) db $0 ; signs - db $1 ; people - db SPRITE_FISHER, $3 + 4, $5 + 4, $ff, $d2, $1 ; person + db $1 ; objects + object SPRITE_FISHER, $5, $3, STAY, LEFT, $1 ; person ; warp-to EVENT_DISP SAFFRON_HOUSE_2_WIDTH, $7, $2 diff --git a/data/mapObjects/saffronmart.asm b/data/mapObjects/saffronmart.asm index 30951c12..113a1ea9 100755 --- a/data/mapObjects/saffronmart.asm +++ b/data/mapObjects/saffronmart.asm @@ -1,4 +1,4 @@ -SaffronMartObject: ; 0x5d41c (size=38) +SaffronMartObject: db $0 ; border block db $2 ; warps @@ -7,10 +7,10 @@ SaffronMartObject: ; 0x5d41c (size=38) db $0 ; signs - db $3 ; people - db SPRITE_MART_GUY, $5 + 4, $0 + 4, $ff, $d3, $1 ; person - db SPRITE_BLACK_HAIR_BOY_2, $2 + 4, $4 + 4, $ff, $ff, $2 ; person - db SPRITE_LASS, $5 + 4, $6 + 4, $fe, $0, $3 ; person + db $3 ; objects + object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person + object SPRITE_BLACK_HAIR_BOY_2, $4, $2, STAY, NONE, $2 ; person + object SPRITE_LASS, $6, $5, WALK, $0, $3 ; person ; warp-to EVENT_DISP SAFFRON_MART_WIDTH, $7, $3 diff --git a/data/mapObjects/saffronpokecenter.asm b/data/mapObjects/saffronpokecenter.asm index 251aeea5..896b550a 100755 --- a/data/mapObjects/saffronpokecenter.asm +++ b/data/mapObjects/saffronpokecenter.asm @@ -1,4 +1,4 @@ -SaffronPokecenterObject: ; 0x5d54f (size=44) +SaffronPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ SaffronPokecenterObject: ; 0x5d54f (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_FOULARD_WOMAN, $5 + 4, $5 + 4, $ff, $ff, $2 ; person - db SPRITE_GENTLEMAN, $3 + 4, $8 + 4, $ff, $d0, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_FOULARD_WOMAN, $5, $5, STAY, NONE, $2 ; person + object SPRITE_GENTLEMAN, $8, $3, STAY, DOWN, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP SAFFRON_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/school.asm b/data/mapObjects/school.asm index c26844a4..53f7fc00 100755 --- a/data/mapObjects/school.asm +++ b/data/mapObjects/school.asm @@ -1,4 +1,4 @@ -SchoolObject: ; 0x1d55d (size=32) +SchoolObject: db $a ; border block db $2 ; warps @@ -7,9 +7,9 @@ SchoolObject: ; 0x1d55d (size=32) db $0 ; signs - db $2 ; people - db SPRITE_BRUNETTE_GIRL, $5 + 4, $3 + 4, $ff, $d1, $1 ; person - db SPRITE_LASS, $1 + 4, $4 + 4, $ff, $d0, $2 ; person + db $2 ; objects + object SPRITE_BRUNETTE_GIRL, $3, $5, STAY, UP, $1 ; person + object SPRITE_LASS, $4, $1, STAY, DOWN, $2 ; person ; warp-to EVENT_DISP VIRIDIAN_SCHOOL_WIDTH, $7, $2 diff --git a/data/mapObjects/seafoamislands1.asm b/data/mapObjects/seafoamislands1.asm index 62fc8320..4f7f7a8e 100755 --- a/data/mapObjects/seafoamislands1.asm +++ b/data/mapObjects/seafoamislands1.asm @@ -1,4 +1,4 @@ -SeafoamIslands1Object: ; 0x4484f (size=72) +SeafoamIslands1Object: db $7d ; border block db $7 ; warps @@ -12,9 +12,9 @@ SeafoamIslands1Object: ; 0x4484f (size=72) db $0 ; signs - db $2 ; people - db SPRITE_BOULDER, $a + 4, $12 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $1 ; person - db SPRITE_BOULDER, $7 + 4, $1a + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $2 ; person + db $2 ; objects + object SPRITE_BOULDER, $12, $a, STAY, BOULDER_MOVEMENT_BYTE_2, $1 ; person + object SPRITE_BOULDER, $1a, $7, STAY, BOULDER_MOVEMENT_BYTE_2, $2 ; person ; warp-to EVENT_DISP SEAFOAM_ISLANDS_1_WIDTH, $11, $4 diff --git a/data/mapObjects/seafoamislands2.asm b/data/mapObjects/seafoamislands2.asm index 821a38cd..d25e5375 100755 --- a/data/mapObjects/seafoamislands2.asm +++ b/data/mapObjects/seafoamislands2.asm @@ -1,4 +1,4 @@ -SeafoamIslands2Object: ; 0x46376 (size=72) +SeafoamIslands2Object: db $7d ; border block db $7 ; warps @@ -12,9 +12,9 @@ SeafoamIslands2Object: ; 0x46376 (size=72) db $0 ; signs - db $2 ; people - db SPRITE_BOULDER, $6 + 4, $11 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $1 ; person - db SPRITE_BOULDER, $6 + 4, $16 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $2 ; person + db $2 ; objects + object SPRITE_BOULDER, $11, $6, STAY, BOULDER_MOVEMENT_BYTE_2, $1 ; person + object SPRITE_BOULDER, $16, $6, STAY, BOULDER_MOVEMENT_BYTE_2, $2 ; person ; warp-to EVENT_DISP SEAFOAM_ISLANDS_2_WIDTH, $2, $4 ; SEAFOAM_ISLANDS_3 diff --git a/data/mapObjects/seafoamislands3.asm b/data/mapObjects/seafoamislands3.asm index 0370805d..a660f2ed 100755 --- a/data/mapObjects/seafoamislands3.asm +++ b/data/mapObjects/seafoamislands3.asm @@ -1,4 +1,4 @@ -SeafoamIslands3Object: ; 0x464b2 (size=72) +SeafoamIslands3Object: db $7d ; border block db $7 ; warps @@ -12,9 +12,9 @@ SeafoamIslands3Object: ; 0x464b2 (size=72) db $0 ; signs - db $2 ; people - db SPRITE_BOULDER, $6 + 4, $12 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $1 ; person - db SPRITE_BOULDER, $6 + 4, $17 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $2 ; person + db $2 ; objects + object SPRITE_BOULDER, $12, $6, STAY, BOULDER_MOVEMENT_BYTE_2, $1 ; person + object SPRITE_BOULDER, $17, $6, STAY, BOULDER_MOVEMENT_BYTE_2, $2 ; person ; warp-to EVENT_DISP SEAFOAM_ISLANDS_3_WIDTH, $3, $5 ; SEAFOAM_ISLANDS_2 diff --git a/data/mapObjects/seafoamislands4.asm b/data/mapObjects/seafoamislands4.asm index 3f1baa1d..c7043a93 100755 --- a/data/mapObjects/seafoamislands4.asm +++ b/data/mapObjects/seafoamislands4.asm @@ -1,4 +1,4 @@ -SeafoamIslands4Object: ; 0x466a6 (size=96) +SeafoamIslands4Object: db $7d ; border block db $7 ; warps @@ -12,13 +12,13 @@ SeafoamIslands4Object: ; 0x466a6 (size=96) db $0 ; signs - db $6 ; people - db SPRITE_BOULDER, $e + 4, $5 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $1 ; person - db SPRITE_BOULDER, $f + 4, $3 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $2 ; person - db SPRITE_BOULDER, $e + 4, $8 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $3 ; person - db SPRITE_BOULDER, $e + 4, $9 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $4 ; person - db SPRITE_BOULDER, $6 + 4, $12 + 4, $ff, $ff, $5 ; person - db SPRITE_BOULDER, $6 + 4, $13 + 4, $ff, $ff, $6 ; person + db $6 ; objects + object SPRITE_BOULDER, $5, $e, STAY, BOULDER_MOVEMENT_BYTE_2, $1 ; person + object SPRITE_BOULDER, $3, $f, STAY, BOULDER_MOVEMENT_BYTE_2, $2 ; person + object SPRITE_BOULDER, $8, $e, STAY, BOULDER_MOVEMENT_BYTE_2, $3 ; person + object SPRITE_BOULDER, $9, $e, STAY, BOULDER_MOVEMENT_BYTE_2, $4 ; person + object SPRITE_BOULDER, $12, $6, STAY, NONE, $5 ; person + object SPRITE_BOULDER, $13, $6, STAY, NONE, $6 ; person ; warp-to EVENT_DISP SEAFOAM_ISLANDS_4_WIDTH, $c, $5 ; SEAFOAM_ISLANDS_3 diff --git a/data/mapObjects/seafoamislands5.asm b/data/mapObjects/seafoamislands5.asm index 6c207975..a05c00cc 100755 --- a/data/mapObjects/seafoamislands5.asm +++ b/data/mapObjects/seafoamislands5.asm @@ -1,4 +1,4 @@ -SeafoamIslands5Object: ; 0x468bc (size=62) +SeafoamIslands5Object: db $7d ; border block db $4 ; warps @@ -11,10 +11,10 @@ SeafoamIslands5Object: ; 0x468bc (size=62) db $f, $9, $4 ; SeafoamIslands5Text4 db $1, $17, $5 ; SeafoamIslands5Text5 - db $3 ; people - db SPRITE_BOULDER, $f + 4, $4 + 4, $ff, $ff, $1 ; person - db SPRITE_BOULDER, $f + 4, $5 + 4, $ff, $ff, $2 ; person - db SPRITE_BIRD, $1 + 4, $6 + 4, $ff, $d0, TRAINER | $3, ARTICUNO, 50 + db $3 ; objects + object SPRITE_BOULDER, $4, $f, STAY, NONE, $1 ; person + object SPRITE_BOULDER, $5, $f, STAY, NONE, $2 ; person + object SPRITE_BIRD, $6, $1, STAY, DOWN, $3, ARTICUNO, 50 ; warp-to EVENT_DISP SEAFOAM_ISLANDS_5_WIDTH, $11, $14 ; SEAFOAM_ISLANDS_4 diff --git a/data/mapObjects/silphco1.asm b/data/mapObjects/silphco1.asm index 0d599ca6..fe779393 100755 --- a/data/mapObjects/silphco1.asm +++ b/data/mapObjects/silphco1.asm @@ -1,4 +1,4 @@ -SilphCo1Object: ; 0x5d470 (size=50) +SilphCo1Object: db $2e ; border block db $5 ; warps @@ -10,8 +10,8 @@ SilphCo1Object: ; 0x5d470 (size=50) db $0 ; signs - db $1 ; people - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $4 + 4, $ff, $d0, $1 ; person + db $1 ; objects + object SPRITE_CABLE_CLUB_WOMAN, $4, $2, STAY, DOWN, $1 ; person ; warp-to EVENT_DISP SILPH_CO_1F_WIDTH, $11, $a diff --git a/data/mapObjects/silphco10.asm b/data/mapObjects/silphco10.asm index 5d253d98..185a23c9 100755 --- a/data/mapObjects/silphco10.asm +++ b/data/mapObjects/silphco10.asm @@ -1,4 +1,4 @@ -SilphCo10Object: ; 0x5a1fb (size=95) +SilphCo10Object: db $2e ; border block db $6 ; warps @@ -11,13 +11,13 @@ SilphCo10Object: ; 0x5a1fb (size=95) db $0 ; signs - db $6 ; people - db SPRITE_ROCKET, $9 + 4, $1 + 4, $ff, $d3, TRAINER | $1, ROCKET + $C8, $27 - db SPRITE_OAK_AIDE, $2 + 4, $a + 4, $ff, $d2, TRAINER | $2, SCIENTIST + $C8, $b - db SPRITE_ERIKA, $f + 4, $9 + 4, $fe, $0, $3 ; person - db SPRITE_BALL, $c + 4, $2 + 4, $ff, $ff, ITEM | $4, TM_26 - db SPRITE_BALL, $e + 4, $4 + 4, $ff, $ff, ITEM | $5, RARE_CANDY - db SPRITE_BALL, $b + 4, $5 + 4, $ff, $ff, ITEM | $6, CARBOS + db $6 ; objects + object SPRITE_ROCKET, $1, $9, STAY, RIGHT, $1, OPP_ROCKET, $27 + object SPRITE_OAK_AIDE, $a, $2, STAY, LEFT, $2, OPP_SCIENTIST, $b + object SPRITE_ERIKA, $9, $f, WALK, $0, $3 ; person + object SPRITE_BALL, $2, $c, STAY, NONE, $4, TM_26 + object SPRITE_BALL, $4, $e, STAY, NONE, $5, RARE_CANDY + object SPRITE_BALL, $5, $b, STAY, NONE, $6, CARBOS ; warp-to EVENT_DISP SILPH_CO_10F_WIDTH, $0, $8 ; SILPH_CO_9F diff --git a/data/mapObjects/silphco11.asm b/data/mapObjects/silphco11.asm index 93b9e339..95712629 100755 --- a/data/mapObjects/silphco11.asm +++ b/data/mapObjects/silphco11.asm @@ -1,4 +1,4 @@ -SilphCo11Object: ; 0x62380 (size=72) +SilphCo11Object: db $d ; border block db $4 ; warps @@ -9,12 +9,12 @@ SilphCo11Object: ; 0x62380 (size=72) db $0 ; signs - db $5 ; people - db SPRITE_MR_MASTERBALL, $5 + 4, $7 + 4, $ff, $d0, $1 ; person - db SPRITE_FOULARD_WOMAN, $5 + 4, $a + 4, $ff, $d0, $2 ; person - db SPRITE_GIOVANNI, $9 + 4, $6 + 4, $ff, $d0, TRAINER | $3, GIOVANNI + $C8, $2 - db SPRITE_ROCKET, $10 + 4, $3 + 4, $ff, $d1, TRAINER | $4, ROCKET + $C8, $29 - db SPRITE_ROCKET, $9 + 4, $f + 4, $ff, $d1, TRAINER | $5, ROCKET + $C8, $28 + db $5 ; objects + object SPRITE_MR_MASTERBALL, $7, $5, STAY, DOWN, $1 ; person + object SPRITE_FOULARD_WOMAN, $a, $5, STAY, DOWN, $2 ; person + object SPRITE_GIOVANNI, $6, $9, STAY, DOWN, $3, OPP_GIOVANNI, $2 + object SPRITE_ROCKET, $3, $10, STAY, UP, $4, OPP_ROCKET, $29 + object SPRITE_ROCKET, $f, $9, STAY, UP, $5, OPP_ROCKET, $28 ; warp-to EVENT_DISP SILPH_CO_11F_WIDTH, $0, $9 ; SILPH_CO_10F diff --git a/data/mapObjects/silphco2.asm b/data/mapObjects/silphco2.asm index 5da4ccc5..ae3aca74 100755 --- a/data/mapObjects/silphco2.asm +++ b/data/mapObjects/silphco2.asm @@ -1,4 +1,4 @@ -SilphCo2Object: ; 0x59e66 (size=98) +SilphCo2Object: db $2e ; border block db $7 ; warps @@ -12,12 +12,12 @@ SilphCo2Object: ; 0x59e66 (size=98) db $0 ; signs - db $5 ; people - db SPRITE_ERIKA, $1 + 4, $a + 4, $ff, $d1, $1 ; person - db SPRITE_OAK_AIDE, $c + 4, $5 + 4, $ff, $d0, TRAINER | $2, SCIENTIST + $C8, $2 - db SPRITE_OAK_AIDE, $d + 4, $18 + 4, $ff, $d2, TRAINER | $3, SCIENTIST + $C8, $3 - db SPRITE_ROCKET, $b + 4, $10 + 4, $ff, $d1, TRAINER | $4, ROCKET + $C8, $17 - db SPRITE_ROCKET, $7 + 4, $18 + 4, $ff, $d1, TRAINER | $5, ROCKET + $C8, $18 + db $5 ; objects + object SPRITE_ERIKA, $a, $1, STAY, UP, $1 ; person + object SPRITE_OAK_AIDE, $5, $c, STAY, DOWN, $2, OPP_SCIENTIST, $2 + object SPRITE_OAK_AIDE, $18, $d, STAY, LEFT, $3, OPP_SCIENTIST, $3 + object SPRITE_ROCKET, $10, $b, STAY, UP, $4, OPP_ROCKET, $17 + object SPRITE_ROCKET, $18, $7, STAY, UP, $5, OPP_ROCKET, $18 ; warp-to EVENT_DISP SILPH_CO_2F_WIDTH, $0, $18 ; SILPH_CO_1F diff --git a/data/mapObjects/silphco3.asm b/data/mapObjects/silphco3.asm index e50bf7cb..ddea9062 100755 --- a/data/mapObjects/silphco3.asm +++ b/data/mapObjects/silphco3.asm @@ -1,4 +1,4 @@ -SilphCo3Object: ; 0x5a035 (size=113) +SilphCo3Object: db $2e ; border block db $a ; warps @@ -15,11 +15,11 @@ SilphCo3Object: ; 0x5a035 (size=113) db $0 ; signs - db $4 ; people - db SPRITE_LAPRAS_GIVER, $8 + 4, $18 + 4, $ff, $ff, $1 ; person - db SPRITE_ROCKET, $7 + 4, $14 + 4, $ff, $d2, TRAINER | $2, ROCKET + $C8, $19 - db SPRITE_OAK_AIDE, $9 + 4, $7 + 4, $ff, $d0, TRAINER | $3, SCIENTIST + $C8, $4 - db SPRITE_BALL, $5 + 4, $8 + 4, $ff, $ff, ITEM | $4, HYPER_POTION + db $4 ; objects + object SPRITE_LAPRAS_GIVER, $18, $8, STAY, NONE, $1 ; person + object SPRITE_ROCKET, $14, $7, STAY, LEFT, $2, OPP_ROCKET, $19 + object SPRITE_OAK_AIDE, $7, $9, STAY, DOWN, $3, OPP_SCIENTIST, $4 + object SPRITE_BALL, $8, $5, STAY, NONE, $4, HYPER_POTION ; warp-to EVENT_DISP SILPH_CO_3F_WIDTH, $0, $1a ; SILPH_CO_2F diff --git a/data/mapObjects/silphco4.asm b/data/mapObjects/silphco4.asm index bbd26292..a2320112 100755 --- a/data/mapObjects/silphco4.asm +++ b/data/mapObjects/silphco4.asm @@ -1,4 +1,4 @@ -SilphCo4Object: ; 0x19e35 (size=111) +SilphCo4Object: db $2e ; border block db $7 ; warps @@ -12,14 +12,14 @@ SilphCo4Object: ; 0x19e35 (size=111) db $0 ; signs - db $7 ; people - db SPRITE_LAPRAS_GIVER, $2 + 4, $6 + 4, $ff, $ff, $1 ; person - db SPRITE_ROCKET, $e + 4, $9 + 4, $ff, $d3, TRAINER | $2, ROCKET + $C8, $1a - db SPRITE_OAK_AIDE, $6 + 4, $e + 4, $ff, $d2, TRAINER | $3, SCIENTIST + $C8, $5 - db SPRITE_ROCKET, $a + 4, $1a + 4, $ff, $d1, TRAINER | $4, ROCKET + $C8, $1b - db SPRITE_BALL, $9 + 4, $3 + 4, $ff, $ff, ITEM | $5, FULL_HEAL - db SPRITE_BALL, $7 + 4, $4 + 4, $ff, $ff, ITEM | $6, MAX_REVIVE - db SPRITE_BALL, $8 + 4, $5 + 4, $ff, $ff, ITEM | $7, ESCAPE_ROPE + db $7 ; objects + object SPRITE_LAPRAS_GIVER, $6, $2, STAY, NONE, $1 ; person + object SPRITE_ROCKET, $9, $e, STAY, RIGHT, $2, OPP_ROCKET, $1a + object SPRITE_OAK_AIDE, $e, $6, STAY, LEFT, $3, OPP_SCIENTIST, $5 + object SPRITE_ROCKET, $1a, $a, STAY, UP, $4, OPP_ROCKET, $1b + object SPRITE_BALL, $3, $9, STAY, NONE, $5, FULL_HEAL + object SPRITE_BALL, $4, $7, STAY, NONE, $6, MAX_REVIVE + object SPRITE_BALL, $5, $8, STAY, NONE, $7, ESCAPE_ROPE ; warp-to EVENT_DISP SILPH_CO_4F_WIDTH, $0, $18 ; SILPH_CO_3F diff --git a/data/mapObjects/silphco5.asm b/data/mapObjects/silphco5.asm index 2a1cf258..62e30fac 100755 --- a/data/mapObjects/silphco5.asm +++ b/data/mapObjects/silphco5.asm @@ -1,4 +1,4 @@ -SilphCo5Object: ; 0x1a08d (size=137) +SilphCo5Object: db $2e ; border block db $7 ; warps @@ -12,18 +12,18 @@ SilphCo5Object: ; 0x1a08d (size=137) db $0 ; signs - db $b ; people - db SPRITE_LAPRAS_GIVER, $9 + 4, $d + 4, $ff, $ff, $1 ; person - db SPRITE_ROCKET, $10 + 4, $8 + 4, $ff, $d3, TRAINER | $2, ROCKET + $C8, $1c - db SPRITE_OAK_AIDE, $3 + 4, $8 + 4, $ff, $d3, TRAINER | $3, SCIENTIST + $C8, $6 - db SPRITE_ROCKER, $a + 4, $12 + 4, $ff, $d1, TRAINER | $4, JUGGLER + $C8, $1 - db SPRITE_ROCKET, $4 + 4, $1c + 4, $ff, $d1, TRAINER | $5, ROCKET + $C8, $1d - db SPRITE_BALL, $d + 4, $2 + 4, $ff, $ff, ITEM | $6, TM_09 - db SPRITE_BALL, $6 + 4, $4 + 4, $ff, $ff, ITEM | $7, PROTEIN - db SPRITE_BALL, $10 + 4, $15 + 4, $ff, $ff, ITEM | $8, CARD_KEY - db SPRITE_CLIPBOARD, $c + 4, $16 + 4, $ff, $ff, $9 ; person - db SPRITE_CLIPBOARD, $a + 4, $19 + 4, $ff, $ff, $a ; person - db SPRITE_CLIPBOARD, $6 + 4, $18 + 4, $ff, $ff, $b ; person + db $b ; objects + object SPRITE_LAPRAS_GIVER, $d, $9, STAY, NONE, $1 ; person + object SPRITE_ROCKET, $8, $10, STAY, RIGHT, $2, OPP_ROCKET, $1c + object SPRITE_OAK_AIDE, $8, $3, STAY, RIGHT, $3, OPP_SCIENTIST, $6 + object SPRITE_ROCKER, $12, $a, STAY, UP, $4, OPP_JUGGLER, $1 + object SPRITE_ROCKET, $1c, $4, STAY, UP, $5, OPP_ROCKET, $1d + object SPRITE_BALL, $2, $d, STAY, NONE, $6, TM_09 + object SPRITE_BALL, $4, $6, STAY, NONE, $7, PROTEIN + object SPRITE_BALL, $15, $10, STAY, NONE, $8, CARD_KEY + object SPRITE_CLIPBOARD, $16, $c, STAY, NONE, $9 ; person + object SPRITE_CLIPBOARD, $19, $a, STAY, NONE, $a ; person + object SPRITE_CLIPBOARD, $18, $6, STAY, NONE, $b ; person ; warp-to EVENT_DISP SILPH_CO_5F_WIDTH, $0, $18 ; SILPH_CO_6F diff --git a/data/mapObjects/silphco6.asm b/data/mapObjects/silphco6.asm index b3e15af1..19d66e50 100755 --- a/data/mapObjects/silphco6.asm +++ b/data/mapObjects/silphco6.asm @@ -1,4 +1,4 @@ -SilphCo6Object: ; 0x1a2fb (size=112) +SilphCo6Object: db $2e ; border block db $5 ; warps @@ -10,17 +10,17 @@ SilphCo6Object: ; 0x1a2fb (size=112) db $0 ; signs - db $a ; people - db SPRITE_LAPRAS_GIVER, $6 + 4, $a + 4, $ff, $ff, $1 ; person - db SPRITE_LAPRAS_GIVER, $6 + 4, $14 + 4, $ff, $ff, $2 ; person - db SPRITE_ERIKA, $6 + 4, $15 + 4, $ff, $d0, $3 ; person - db SPRITE_ERIKA, $a + 4, $b + 4, $ff, $d3, $4 ; person - db SPRITE_LAPRAS_GIVER, $d + 4, $12 + 4, $ff, $d1, $5 ; person - db SPRITE_ROCKET, $3 + 4, $11 + 4, $ff, $d3, TRAINER | $6, ROCKET + $C8, $1e - db SPRITE_OAK_AIDE, $8 + 4, $7 + 4, $ff, $d0, TRAINER | $7, SCIENTIST + $C8, $7 - db SPRITE_ROCKET, $f + 4, $e + 4, $ff, $d2, TRAINER | $8, ROCKET + $C8, $1f - db SPRITE_BALL, $c + 4, $3 + 4, $ff, $ff, ITEM | $9, HP_UP - db SPRITE_BALL, $f + 4, $2 + 4, $ff, $ff, ITEM | $a, X_ACCURACY + db $a ; objects + object SPRITE_LAPRAS_GIVER, $a, $6, STAY, NONE, $1 ; person + object SPRITE_LAPRAS_GIVER, $14, $6, STAY, NONE, $2 ; person + object SPRITE_ERIKA, $15, $6, STAY, DOWN, $3 ; person + object SPRITE_ERIKA, $b, $a, STAY, RIGHT, $4 ; person + object SPRITE_LAPRAS_GIVER, $12, $d, STAY, UP, $5 ; person + object SPRITE_ROCKET, $11, $3, STAY, RIGHT, $6, OPP_ROCKET, $1e + object SPRITE_OAK_AIDE, $7, $8, STAY, DOWN, $7, OPP_SCIENTIST, $7 + object SPRITE_ROCKET, $e, $f, STAY, LEFT, $8, OPP_ROCKET, $1f + object SPRITE_BALL, $3, $c, STAY, NONE, $9, HP_UP + object SPRITE_BALL, $2, $f, STAY, NONE, $a, X_ACCURACY ; warp-to EVENT_DISP SILPH_CO_6F_WIDTH, $0, $10 ; SILPH_CO_7F diff --git a/data/mapObjects/silphco7.asm b/data/mapObjects/silphco7.asm index fe435bb0..47e881fe 100755 --- a/data/mapObjects/silphco7.asm +++ b/data/mapObjects/silphco7.asm @@ -1,4 +1,4 @@ -SilphCo7Object: ; 0x51ed7 (size=128) +SilphCo7Object: db $2e ; border block db $6 ; warps @@ -11,18 +11,18 @@ SilphCo7Object: ; 0x51ed7 (size=128) db $0 ; signs - db $b ; people - db SPRITE_LAPRAS_GIVER, $5 + 4, $1 + 4, $ff, $ff, $1 ; person - db SPRITE_LAPRAS_GIVER, $d + 4, $d + 4, $ff, $d1, $2 ; person - db SPRITE_LAPRAS_GIVER, $a + 4, $7 + 4, $ff, $ff, $3 ; person - db SPRITE_ERIKA, $8 + 4, $a + 4, $ff, $ff, $4 ; person - db SPRITE_ROCKET, $1 + 4, $d + 4, $ff, $d0, TRAINER | $5, ROCKET + $C8, $20 - db SPRITE_OAK_AIDE, $d + 4, $2 + 4, $ff, $d0, TRAINER | $6, SCIENTIST + $C8, $8 - db SPRITE_ROCKET, $2 + 4, $14 + 4, $ff, $d2, TRAINER | $7, ROCKET + $C8, $21 - db SPRITE_ROCKET, $e + 4, $13 + 4, $ff, $d3, TRAINER | $8, ROCKET + $C8, $22 - db SPRITE_BLUE, $7 + 4, $3 + 4, $ff, $d1, $9 ; person - db SPRITE_BALL, $9 + 4, $1 + 4, $ff, $ff, ITEM | $a, CALCIUM - db SPRITE_BALL, $b + 4, $18 + 4, $ff, $ff, ITEM | $b, TM_03 + db $b ; objects + object SPRITE_LAPRAS_GIVER, $1, $5, STAY, NONE, $1 ; person + object SPRITE_LAPRAS_GIVER, $d, $d, STAY, UP, $2 ; person + object SPRITE_LAPRAS_GIVER, $7, $a, STAY, NONE, $3 ; person + object SPRITE_ERIKA, $a, $8, STAY, NONE, $4 ; person + object SPRITE_ROCKET, $d, $1, STAY, DOWN, $5, OPP_ROCKET, $20 + object SPRITE_OAK_AIDE, $2, $d, STAY, DOWN, $6, OPP_SCIENTIST, $8 + object SPRITE_ROCKET, $14, $2, STAY, LEFT, $7, OPP_ROCKET, $21 + object SPRITE_ROCKET, $13, $e, STAY, RIGHT, $8, OPP_ROCKET, $22 + object SPRITE_BLUE, $3, $7, STAY, UP, $9 ; person + object SPRITE_BALL, $1, $9, STAY, NONE, $a, CALCIUM + object SPRITE_BALL, $18, $b, STAY, NONE, $b, TM_03 ; warp-to EVENT_DISP SILPH_CO_7F_WIDTH, $0, $10 ; SILPH_CO_8F diff --git a/data/mapObjects/silphco8.asm b/data/mapObjects/silphco8.asm index be802791..188b27b6 100755 --- a/data/mapObjects/silphco8.asm +++ b/data/mapObjects/silphco8.asm @@ -1,4 +1,4 @@ -SilphCo8Object: ; 0x56613 (size=90) +SilphCo8Object: db $2e ; border block db $7 ; warps @@ -12,11 +12,11 @@ SilphCo8Object: ; 0x56613 (size=90) db $0 ; signs - db $4 ; people - db SPRITE_LAPRAS_GIVER, $2 + 4, $4 + 4, $ff, $ff, $1 ; person - db SPRITE_ROCKET, $2 + 4, $13 + 4, $ff, $d2, TRAINER | $2, ROCKET + $C8, $23 - db SPRITE_OAK_AIDE, $2 + 4, $a + 4, $ff, $d0, TRAINER | $3, SCIENTIST + $C8, $9 - db SPRITE_ROCKET, $f + 4, $c + 4, $ff, $d3, TRAINER | $4, ROCKET + $C8, $24 + db $4 ; objects + object SPRITE_LAPRAS_GIVER, $4, $2, STAY, NONE, $1 ; person + object SPRITE_ROCKET, $13, $2, STAY, LEFT, $2, OPP_ROCKET, $23 + object SPRITE_OAK_AIDE, $a, $2, STAY, DOWN, $3, OPP_SCIENTIST, $9 + object SPRITE_ROCKET, $c, $f, STAY, RIGHT, $4, OPP_ROCKET, $24 ; warp-to EVENT_DISP SILPH_CO_8F_WIDTH, $0, $10 ; SILPH_CO_9F diff --git a/data/mapObjects/silphco9.asm b/data/mapObjects/silphco9.asm index 2ebaa8df..76d82895 100755 --- a/data/mapObjects/silphco9.asm +++ b/data/mapObjects/silphco9.asm @@ -1,4 +1,4 @@ -SilphCo9Object: ; 0x5d93f (size=74) +SilphCo9Object: db $2e ; border block db $5 ; warps @@ -10,11 +10,11 @@ SilphCo9Object: ; 0x5d93f (size=74) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $e + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_ROCKET, $4 + 4, $2 + 4, $ff, $d1, TRAINER | $2, ROCKET + $C8, $25 - db SPRITE_OAK_AIDE, $d + 4, $15 + 4, $ff, $d0, TRAINER | $3, SCIENTIST + $C8, $a - db SPRITE_ROCKET, $10 + 4, $d + 4, $ff, $d1, TRAINER | $4, ROCKET + $C8, $26 + db $4 ; objects + object SPRITE_NURSE, $3, $e, STAY, DOWN, $1 ; person + object SPRITE_ROCKET, $2, $4, STAY, UP, $2, OPP_ROCKET, $25 + object SPRITE_OAK_AIDE, $15, $d, STAY, DOWN, $3, OPP_SCIENTIST, $a + object SPRITE_ROCKET, $d, $10, STAY, UP, $4, OPP_ROCKET, $26 ; warp-to EVENT_DISP SILPH_CO_9F_WIDTH, $0, $e ; SILPH_CO_10F diff --git a/data/mapObjects/silphcoelevator.asm b/data/mapObjects/silphcoelevator.asm index ced554eb..2de795ae 100755 --- a/data/mapObjects/silphcoelevator.asm +++ b/data/mapObjects/silphcoelevator.asm @@ -1,4 +1,4 @@ -SilphCoElevatorObject: ; 0x45844 (size=23) +SilphCoElevatorObject: db $f ; border block db $2 ; warps @@ -8,7 +8,7 @@ SilphCoElevatorObject: ; 0x45844 (size=23) db $1 ; signs db $0, $3, $1 ; SilphCoElevatorText1 - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP SILPH_CO_ELEVATOR_WIDTH, $3, $1 diff --git a/data/mapObjects/ssanne1.asm b/data/mapObjects/ssanne1.asm index a1688f5c..7f6a826c 100755 --- a/data/mapObjects/ssanne1.asm +++ b/data/mapObjects/ssanne1.asm @@ -1,4 +1,4 @@ -SSAnne1Object: ; 0x61277 (size=104) +SSAnne1Object: db $c ; border block db $b ; warps @@ -16,9 +16,9 @@ SSAnne1Object: ; 0x61277 (size=104) db $0 ; signs - db $2 ; people - db SPRITE_WAITER, $6 + 4, $c + 4, $fe, $2, $1 ; person - db SPRITE_SAILOR, $5 + 4, $1b + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_WAITER, $c, $6, WALK, $2, $1 ; person + object SPRITE_SAILOR, $1b, $5, STAY, NONE, $2 ; person ; warp-to EVENT_DISP SS_ANNE_1_WIDTH, $0, $1a ; VERMILION_DOCK diff --git a/data/mapObjects/ssanne10.asm b/data/mapObjects/ssanne10.asm index b98f734f..a8f49cf7 100755 --- a/data/mapObjects/ssanne10.asm +++ b/data/mapObjects/ssanne10.asm @@ -1,4 +1,4 @@ -SSAnne10Object: ; 0x61e75 (size=165) +SSAnne10Object: db $c ; border block db $a ; warps @@ -15,18 +15,18 @@ SSAnne10Object: ; 0x61e75 (size=165) db $0 ; signs - db $b ; people - db SPRITE_SAILOR, $d + 4, $0 + 4, $ff, $d0, TRAINER | $1, SAILOR + $C8, $3 - db SPRITE_SAILOR, $b + 4, $2 + 4, $ff, $d0, TRAINER | $2, SAILOR + $C8, $4 - db SPRITE_SAILOR, $3 + 4, $c + 4, $ff, $d2, TRAINER | $3, SAILOR + $C8, $5 - db SPRITE_SAILOR, $2 + 4, $16 + 4, $ff, $d0, TRAINER | $4, SAILOR + $C8, $6 - db SPRITE_SAILOR, $2 + 4, $0 + 4, $ff, $d3, TRAINER | $5, SAILOR + $C8, $7 - db SPRITE_FISHER2, $4 + 4, $0 + 4, $ff, $d3, TRAINER | $6, FISHER + $C8, $2 - db SPRITE_BLACK_HAIR_BOY_2, $d + 4, $a + 4, $ff, $d3, $7 ; person - db SPRITE_SLOWBRO, $c + 4, $b + 4, $ff, $ff, $8 ; person - db SPRITE_BALL, $2 + 4, $14 + 4, $ff, $ff, ITEM | $9, ETHER - db SPRITE_BALL, $2 + 4, $a + 4, $ff, $ff, ITEM | $a, TM_44 - db SPRITE_BALL, $b + 4, $c + 4, $ff, $ff, ITEM | $b, MAX_POTION + db $b ; objects + object SPRITE_SAILOR, $0, $d, STAY, DOWN, $1, OPP_SAILOR, $3 + object SPRITE_SAILOR, $2, $b, STAY, DOWN, $2, OPP_SAILOR, $4 + object SPRITE_SAILOR, $c, $3, STAY, LEFT, $3, OPP_SAILOR, $5 + object SPRITE_SAILOR, $16, $2, STAY, DOWN, $4, OPP_SAILOR, $6 + object SPRITE_SAILOR, $0, $2, STAY, RIGHT, $5, OPP_SAILOR, $7 + object SPRITE_FISHER2, $0, $4, STAY, RIGHT, $6, OPP_FISHER, $2 + object SPRITE_BLACK_HAIR_BOY_2, $a, $d, STAY, RIGHT, $7 ; person + object SPRITE_SLOWBRO, $b, $c, STAY, NONE, $8 ; person + object SPRITE_BALL, $14, $2, STAY, NONE, $9, ETHER + object SPRITE_BALL, $a, $2, STAY, NONE, $a, TM_44 + object SPRITE_BALL, $c, $b, STAY, NONE, $b, MAX_POTION ; warp-to EVENT_DISP SS_ANNE_10_WIDTH, $5, $2 ; SS_ANNE_4 diff --git a/data/mapObjects/ssanne2.asm b/data/mapObjects/ssanne2.asm index 3f756c31..eb761685 100755 --- a/data/mapObjects/ssanne2.asm +++ b/data/mapObjects/ssanne2.asm @@ -1,4 +1,4 @@ -SSAnne2Object: ; 0x61514 (size=90) +SSAnne2Object: db $c ; border block db $9 ; warps @@ -14,9 +14,9 @@ SSAnne2Object: ; 0x61514 (size=90) db $0 ; signs - db $2 ; people - db SPRITE_WAITER, $7 + 4, $3 + 4, $fe, $1, $1 ; person - db SPRITE_BLUE, $4 + 4, $24 + 4, $ff, $d0, TRAINER | $2, SONY1 + $C8, $1 + db $2 ; objects + object SPRITE_WAITER, $3, $7, WALK, $1, $1 ; person + object SPRITE_BLUE, $24, $4, STAY, DOWN, $2, OPP_SONY1, $1 ; warp-to EVENT_DISP SS_ANNE_2_WIDTH, $b, $9 ; SS_ANNE_9 diff --git a/data/mapObjects/ssanne3.asm b/data/mapObjects/ssanne3.asm index 2068304d..567f0363 100755 --- a/data/mapObjects/ssanne3.asm +++ b/data/mapObjects/ssanne3.asm @@ -1,4 +1,4 @@ -SSAnne3Object: ; 0x4493c (size=26) +SSAnne3Object: db $c ; border block db $2 ; warps @@ -7,8 +7,8 @@ SSAnne3Object: ; 0x4493c (size=26) db $0 ; signs - db $1 ; people - db SPRITE_SAILOR, $3 + 4, $9 + 4, $fe, $2, $1 ; person + db $1 ; objects + object SPRITE_SAILOR, $9, $3, WALK, $2, $1 ; person ; warp-to EVENT_DISP SS_ANNE_3_WIDTH, $3, $0 ; SS_ANNE_5 diff --git a/data/mapObjects/ssanne4.asm b/data/mapObjects/ssanne4.asm index a2abc2cf..fbd1df5b 100755 --- a/data/mapObjects/ssanne4.asm +++ b/data/mapObjects/ssanne4.asm @@ -1,4 +1,4 @@ -SSAnne4Object: ; 0x61632 (size=52) +SSAnne4Object: db $c ; border block db $6 ; warps @@ -11,7 +11,7 @@ SSAnne4Object: ; 0x61632 (size=52) db $0 ; signs - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP SS_ANNE_4_WIDTH, $3, $17 ; SS_ANNE_10 diff --git a/data/mapObjects/ssanne5.asm b/data/mapObjects/ssanne5.asm index 88b2b5b7..6031327e 100755 --- a/data/mapObjects/ssanne5.asm +++ b/data/mapObjects/ssanne5.asm @@ -1,4 +1,4 @@ -SSAnne5Object: ; 0x6172b (size=54) +SSAnne5Object: db $23 ; border block db $2 ; warps @@ -7,12 +7,12 @@ SSAnne5Object: ; 0x6172b (size=54) db $0 ; signs - db $5 ; people - db SPRITE_BLACK_HAIR_BOY_2, $2 + 4, $5 + 4, $ff, $d1, $1 ; person - db SPRITE_SAILOR, $9 + 4, $4 + 4, $ff, $ff, $2 ; person - db SPRITE_BLACK_HAIR_BOY_1, $b + 4, $7 + 4, $ff, $ff, $3 ; person - db SPRITE_SAILOR, $4 + 4, $4 + 4, $ff, $d0, TRAINER | $4, SAILOR + $C8, $1 - db SPRITE_SAILOR, $8 + 4, $a + 4, $ff, $d1, TRAINER | $5, SAILOR + $C8, $2 + db $5 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $5, $2, STAY, UP, $1 ; person + object SPRITE_SAILOR, $4, $9, STAY, NONE, $2 ; person + object SPRITE_BLACK_HAIR_BOY_1, $7, $b, STAY, NONE, $3 ; person + object SPRITE_SAILOR, $4, $4, STAY, DOWN, $4, OPP_SAILOR, $1 + object SPRITE_SAILOR, $a, $8, STAY, UP, $5, OPP_SAILOR, $2 ; warp-to EVENT_DISP SS_ANNE_5_WIDTH, $6, $d ; SS_ANNE_3 diff --git a/data/mapObjects/ssanne6.asm b/data/mapObjects/ssanne6.asm index 7724ab5c..8c2444f8 100755 --- a/data/mapObjects/ssanne6.asm +++ b/data/mapObjects/ssanne6.asm @@ -1,4 +1,4 @@ -SSAnne6Object: ; 0x6181b (size=54) +SSAnne6Object: db $c ; border block db $1 ; warps @@ -6,14 +6,14 @@ SSAnne6Object: ; 0x6181b (size=54) db $0 ; signs - db $7 ; people - db SPRITE_COOK, $8 + 4, $1 + 4, $fe, $1, $1 ; person - db SPRITE_COOK, $8 + 4, $5 + 4, $fe, $1, $2 ; person - db SPRITE_COOK, $7 + 4, $9 + 4, $fe, $1, $3 ; person - db SPRITE_COOK, $6 + 4, $d + 4, $ff, $ff, $4 ; person - db SPRITE_COOK, $8 + 4, $d + 4, $ff, $ff, $5 ; person - db SPRITE_COOK, $a + 4, $d + 4, $ff, $ff, $6 ; person - db SPRITE_COOK, $d + 4, $b + 4, $ff, $d1, $7 ; person + db $7 ; objects + object SPRITE_COOK, $1, $8, WALK, $1, $1 ; person + object SPRITE_COOK, $5, $8, WALK, $1, $2 ; person + object SPRITE_COOK, $9, $7, WALK, $1, $3 ; person + object SPRITE_COOK, $d, $6, STAY, NONE, $4 ; person + object SPRITE_COOK, $d, $8, STAY, NONE, $5 ; person + object SPRITE_COOK, $d, $a, STAY, NONE, $6 ; person + object SPRITE_COOK, $b, $d, STAY, UP, $7 ; person ; warp-to EVENT_DISP SS_ANNE_6_WIDTH, $0, $6 ; SS_ANNE_1 diff --git a/data/mapObjects/ssanne7.asm b/data/mapObjects/ssanne7.asm index c40bcfec..6002e85b 100755 --- a/data/mapObjects/ssanne7.asm +++ b/data/mapObjects/ssanne7.asm @@ -1,4 +1,4 @@ -SSAnne7Object: ; 0x61946 (size=24) +SSAnne7Object: db $c ; border block db $1 ; warps @@ -8,8 +8,8 @@ SSAnne7Object: ; 0x61946 (size=24) db $1, $4, $2 ; SSAnne7Text2 db $2, $1, $3 ; SSAnne7Text3 - db $1 ; people - db SPRITE_SS_CAPTAIN, $2 + 4, $4 + 4, $ff, $d1, $1 ; person + db $1 ; objects + object SPRITE_SS_CAPTAIN, $4, $2, STAY, UP, $1 ; person ; warp-to EVENT_DISP SS_ANNE_7_WIDTH, $7, $0 ; SS_ANNE_2 diff --git a/data/mapObjects/ssanne8.asm b/data/mapObjects/ssanne8.asm index e2df8fa9..37c8cf61 100755 --- a/data/mapObjects/ssanne8.asm +++ b/data/mapObjects/ssanne8.asm @@ -1,4 +1,4 @@ -SSAnne8Object: ; 0x61a60 (size=127) +SSAnne8Object: db $c ; border block db $6 ; warps @@ -11,18 +11,18 @@ SSAnne8Object: ; 0x61a60 (size=127) db $0 ; signs - db $b ; people - db SPRITE_GENTLEMAN, $3 + 4, $2 + 4, $ff, $d2, TRAINER | $1, GENTLEMAN + $C8, $1 - db SPRITE_GENTLEMAN, $4 + 4, $b + 4, $ff, $d1, TRAINER | $2, GENTLEMAN + $C8, $2 - db SPRITE_BUG_CATCHER, $e + 4, $b + 4, $ff, $d1, TRAINER | $3, YOUNGSTER + $C8, $8 - db SPRITE_LASS, $b + 4, $d + 4, $ff, $d2, TRAINER | $4, LASS + $C8, $b - db SPRITE_GIRL, $3 + 4, $16 + 4, $fe, $1, $5 ; person - db SPRITE_FAT_BALD_GUY, $e + 4, $0 + 4, $ff, $ff, $6 ; person - db SPRITE_LITTLE_GIRL, $b + 4, $2 + 4, $ff, $d0, $7 ; person - db SPRITE_CLEFAIRY, $b + 4, $3 + 4, $ff, $d0, $8 ; person - db SPRITE_GIRL, $d + 4, $a + 4, $ff, $d3, $9 ; person - db SPRITE_BALL, $f + 4, $c + 4, $ff, $ff, ITEM | $a, TM_08 - db SPRITE_GENTLEMAN, $d + 4, $15 + 4, $fe, $2, $b ; person + db $b ; objects + object SPRITE_GENTLEMAN, $2, $3, STAY, LEFT, $1, OPP_GENTLEMAN, $1 + object SPRITE_GENTLEMAN, $b, $4, STAY, UP, $2, OPP_GENTLEMAN, $2 + object SPRITE_BUG_CATCHER, $b, $e, STAY, UP, $3, OPP_YOUNGSTER, $8 + object SPRITE_LASS, $d, $b, STAY, LEFT, $4, OPP_LASS, $b + object SPRITE_GIRL, $16, $3, WALK, $1, $5 ; person + object SPRITE_FAT_BALD_GUY, $0, $e, STAY, NONE, $6 ; person + object SPRITE_LITTLE_GIRL, $2, $b, STAY, DOWN, $7 ; person + object SPRITE_CLEFAIRY, $3, $b, STAY, DOWN, $8 ; person + object SPRITE_GIRL, $a, $d, STAY, RIGHT, $9 ; person + object SPRITE_BALL, $c, $f, STAY, NONE, $a, TM_08 + object SPRITE_GENTLEMAN, $15, $d, WALK, $2, $b ; person ; warp-to EVENT_DISP SS_ANNE_8_WIDTH, $0, $0 ; SS_ANNE_1 diff --git a/data/mapObjects/ssanne9.asm b/data/mapObjects/ssanne9.asm index a621ad9f..6b5e4b7d 100755 --- a/data/mapObjects/ssanne9.asm +++ b/data/mapObjects/ssanne9.asm @@ -1,4 +1,4 @@ -SSAnne9Object: ; 0x61c8d (size=188) +SSAnne9Object: db $c ; border block db $c ; warps @@ -17,20 +17,20 @@ SSAnne9Object: ; 0x61c8d (size=188) db $0 ; signs - db $d ; people - db SPRITE_GENTLEMAN, $2 + 4, $a + 4, $ff, $d3, TRAINER | $1, GENTLEMAN + $C8, $3 - db SPRITE_FISHER2, $4 + 4, $d + 4, $ff, $d2, TRAINER | $2, FISHER + $C8, $1 - db SPRITE_GENTLEMAN, $e + 4, $0 + 4, $ff, $d3, TRAINER | $3, GENTLEMAN + $C8, $5 - db SPRITE_LASS, $b + 4, $2 + 4, $ff, $d0, TRAINER | $4, LASS + $C8, $c - db SPRITE_GENTLEMAN, $2 + 4, $1 + 4, $ff, $d0, $5 ; person - db SPRITE_BALL, $1 + 4, $c + 4, $ff, $ff, ITEM | $6, MAX_ETHER - db SPRITE_GENTLEMAN, $2 + 4, $15 + 4, $ff, $d0, $7 ; person - db SPRITE_OLD_PERSON, $1 + 4, $16 + 4, $ff, $d0, $8 ; person - db SPRITE_BALL, $c + 4, $0 + 4, $ff, $ff, ITEM | $9, RARE_CANDY - db SPRITE_GENTLEMAN, $c + 4, $c + 4, $ff, $d0, $a ; person - db SPRITE_YOUNG_BOY, $e + 4, $b + 4, $ff, $ff, $b ; person - db SPRITE_BRUNETTE_GIRL, $c + 4, $16 + 4, $ff, $d2, $c ; person - db SPRITE_FOULARD_WOMAN, $c + 4, $14 + 4, $ff, $d3, $d ; person + db $d ; objects + object SPRITE_GENTLEMAN, $a, $2, STAY, RIGHT, $1, OPP_GENTLEMAN, $3 + object SPRITE_FISHER2, $d, $4, STAY, LEFT, $2, OPP_FISHER, $1 + object SPRITE_GENTLEMAN, $0, $e, STAY, RIGHT, $3, OPP_GENTLEMAN, $5 + object SPRITE_LASS, $2, $b, STAY, DOWN, $4, OPP_LASS, $c + object SPRITE_GENTLEMAN, $1, $2, STAY, DOWN, $5 ; person + object SPRITE_BALL, $c, $1, STAY, NONE, $6, MAX_ETHER + object SPRITE_GENTLEMAN, $15, $2, STAY, DOWN, $7 ; person + object SPRITE_OLD_PERSON, $16, $1, STAY, DOWN, $8 ; person + object SPRITE_BALL, $0, $c, STAY, NONE, $9, RARE_CANDY + object SPRITE_GENTLEMAN, $c, $c, STAY, DOWN, $a ; person + object SPRITE_YOUNG_BOY, $b, $e, STAY, NONE, $b ; person + object SPRITE_BRUNETTE_GIRL, $16, $c, STAY, LEFT, $c ; person + object SPRITE_FOULARD_WOMAN, $14, $c, STAY, RIGHT, $d ; person ; warp-to EVENT_DISP SS_ANNE_9_WIDTH, $5, $2 ; SS_ANNE_2 diff --git a/data/mapObjects/tradecenter.asm b/data/mapObjects/tradecenter.asm new file mode 100755 index 00000000..f482fc4f --- /dev/null +++ b/data/mapObjects/tradecenter.asm @@ -0,0 +1,9 @@ +TradeCenterObject: + db $e ; border block + + db $0 ; warps + + db $0 ; signs + + db $1 ; objects + object SPRITE_RED, $2, $2, STAY, $0, $1 ; person diff --git a/data/mapObjects/tradecenterm.asm b/data/mapObjects/tradecenterm.asm deleted file mode 100755 index 104b9c0b..00000000 --- a/data/mapObjects/tradecenterm.asm +++ /dev/null @@ -1,9 +0,0 @@ -TradeCenterMObject: ; 0x4fd87 (size=10) - db $e ; border block - - db $0 ; warps - - db $0 ; signs - - db $1 ; people - db SPRITE_RED, $2 + 4, $2 + 4, $ff, $0, $1 ; person diff --git a/data/mapObjects/undergroundpathentranceroute5.asm b/data/mapObjects/undergroundpathentranceroute5.asm index f782636c..14d7232e 100755 --- a/data/mapObjects/undergroundpathentranceroute5.asm +++ b/data/mapObjects/undergroundpathentranceroute5.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute5Object: ; 0x5d6c1 (size=34) +UndergroundPathEntranceRoute5Object: db $a ; border block db $3 ; warps @@ -8,8 +8,8 @@ UndergroundPathEntranceRoute5Object: ; 0x5d6c1 (size=34) db $0 ; signs - db $1 ; people - db SPRITE_LITTLE_GIRL, $3 + 4, $2 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_LITTLE_GIRL, $2, $3, STAY, NONE, $1 ; person ; warp-to EVENT_DISP PATH_ENTRANCE_ROUTE_5_WIDTH, $7, $3 diff --git a/data/mapObjects/undergroundpathentranceroute6.asm b/data/mapObjects/undergroundpathentranceroute6.asm index 624381a9..7bce8774 100755 --- a/data/mapObjects/undergroundpathentranceroute6.asm +++ b/data/mapObjects/undergroundpathentranceroute6.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute6Object: ; 0x5d6fe (size=34) +UndergroundPathEntranceRoute6Object: db $a ; border block db $3 ; warps @@ -8,8 +8,8 @@ UndergroundPathEntranceRoute6Object: ; 0x5d6fe (size=34) db $0 ; signs - db $1 ; people - db SPRITE_GIRL, $3 + 4, $2 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_GIRL, $2, $3, STAY, NONE, $1 ; person ; warp-to EVENT_DISP PATH_ENTRANCE_ROUTE_6_WIDTH, $7, $3 diff --git a/data/mapObjects/undergroundpathentranceroute7.asm b/data/mapObjects/undergroundpathentranceroute7.asm index d0e51c8a..51b4bcda 100755 --- a/data/mapObjects/undergroundpathentranceroute7.asm +++ b/data/mapObjects/undergroundpathentranceroute7.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute7Object: ; 0x5d73b (size=34) +UndergroundPathEntranceRoute7Object: db $a ; border block db $3 ; warps @@ -8,8 +8,8 @@ UndergroundPathEntranceRoute7Object: ; 0x5d73b (size=34) db $0 ; signs - db $1 ; people - db SPRITE_FAT_BALD_GUY, $4 + 4, $2 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_FAT_BALD_GUY, $2, $4, STAY, NONE, $1 ; person ; warp-to EVENT_DISP PATH_ENTRANCE_ROUTE_7_WIDTH, $7, $3 diff --git a/data/mapObjects/undergroundpathentranceroute7copy.asm b/data/mapObjects/undergroundpathentranceroute7copy.asm index 53972ce9..04a5bf2f 100755 --- a/data/mapObjects/undergroundpathentranceroute7copy.asm +++ b/data/mapObjects/undergroundpathentranceroute7copy.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute7CopyObject: ; 5d787 (17:5787) +UndergroundPathEntranceRoute7CopyObject: db $a ; border block db $3 ; warps @@ -8,9 +8,9 @@ UndergroundPathEntranceRoute7CopyObject: ; 5d787 (17:5787) db $0 ; signs - db $2 ; people - db SPRITE_GIRL, $2 + 4, $3 + 4, $ff, $ff, $1 ; person - db SPRITE_FAT_BALD_GUY, $4 + 4, $2 + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_GIRL, $3, $2, STAY, NONE, $1 ; person + object SPRITE_FAT_BALD_GUY, $2, $4, STAY, NONE, $2 ; person ; warp-to EVENT_DISP PATH_ENTRANCE_ROUTE_7_COPY_WIDTH, $7, $3 diff --git a/data/mapObjects/undergroundpathentranceroute8.asm b/data/mapObjects/undergroundpathentranceroute8.asm index a59e017b..9e98c987 100755 --- a/data/mapObjects/undergroundpathentranceroute8.asm +++ b/data/mapObjects/undergroundpathentranceroute8.asm @@ -1,4 +1,4 @@ -UndergroundPathEntranceRoute8Object: ; 0x1e298 (size=34) +UndergroundPathEntranceRoute8Object: db $a ; border block db $3 ; warps @@ -8,8 +8,8 @@ UndergroundPathEntranceRoute8Object: ; 0x1e298 (size=34) db $0 ; signs - db $1 ; people - db SPRITE_GIRL, $4 + 4, $3 + 4, $ff, $ff, $1 ; person + db $1 ; objects + object SPRITE_GIRL, $3, $4, STAY, NONE, $1 ; person ; warp-to EVENT_DISP PATH_ENTRANCE_ROUTE_8_WIDTH, $7, $3 diff --git a/data/mapObjects/undergroundpathns.asm b/data/mapObjects/undergroundpathns.asm index 7dac9b95..d0188a76 100755 --- a/data/mapObjects/undergroundpathns.asm +++ b/data/mapObjects/undergroundpathns.asm @@ -1,4 +1,4 @@ -UndergroundPathNSObject: ; 0x61f2a (size=20) +UndergroundPathNSObject: db $1 ; border block db $2 ; warps @@ -7,7 +7,7 @@ UndergroundPathNSObject: ; 0x61f2a (size=20) db $0 ; signs - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP UNDERGROUND_PATH_NS_WIDTH, $4, $5 ; PATH_ENTRANCE_ROUTE_5 diff --git a/data/mapObjects/undergroundpathwe.asm b/data/mapObjects/undergroundpathwe.asm index ad3c51f7..42bbb9bf 100755 --- a/data/mapObjects/undergroundpathwe.asm +++ b/data/mapObjects/undergroundpathwe.asm @@ -1,4 +1,4 @@ -UndergroundPathWEObject: ; 0x61f4e (size=20) +UndergroundPathWEObject: db $1 ; border block db $2 ; warps @@ -7,7 +7,7 @@ UndergroundPathWEObject: ; 0x61f4e (size=20) db $0 ; signs - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP UNDERGROUND_PATH_WE_WIDTH, $5, $2 ; PATH_ENTRANCE_ROUTE_7 diff --git a/data/mapObjects/unknowndungeon1.asm b/data/mapObjects/unknowndungeon1.asm index e5dbe1c3..e0393f2e 100755 --- a/data/mapObjects/unknowndungeon1.asm +++ b/data/mapObjects/unknowndungeon1.asm @@ -1,4 +1,4 @@ -UnknownDungeon1Object: ; 0x74d15 (size=97) +UnknownDungeon1Object: db $7d ; border block db $9 ; warps @@ -14,10 +14,10 @@ UnknownDungeon1Object: ; 0x74d15 (size=97) db $0 ; signs - db $3 ; people - db SPRITE_BALL, $d + 4, $7 + 4, $ff, $ff, ITEM | $1, FULL_RESTORE - db SPRITE_BALL, $3 + 4, $13 + 4, $ff, $ff, ITEM | $2, MAX_ELIXER - db SPRITE_BALL, $0 + 4, $5 + 4, $ff, $ff, ITEM | $3, NUGGET + db $3 ; objects + object SPRITE_BALL, $7, $d, STAY, NONE, $1, FULL_RESTORE + object SPRITE_BALL, $13, $3, STAY, NONE, $2, MAX_ELIXER + object SPRITE_BALL, $5, $0, STAY, NONE, $3, NUGGET ; warp-to EVENT_DISP UNKNOWN_DUNGEON_1_WIDTH, $11, $18 diff --git a/data/mapObjects/unknowndungeon2.asm b/data/mapObjects/unknowndungeon2.asm index 997198b5..e1a443bb 100755 --- a/data/mapObjects/unknowndungeon2.asm +++ b/data/mapObjects/unknowndungeon2.asm @@ -1,4 +1,4 @@ -UnknownDungeon2Object: ; 0x45e14 (size=73) +UnknownDungeon2Object: db $7d ; border block db $6 ; warps @@ -11,10 +11,10 @@ UnknownDungeon2Object: ; 0x45e14 (size=73) db $0 ; signs - db $3 ; people - db SPRITE_BALL, $9 + 4, $1d + 4, $ff, $ff, ITEM | $1, PP_UP - db SPRITE_BALL, $f + 4, $4 + 4, $ff, $ff, ITEM | $2, ULTRA_BALL - db SPRITE_BALL, $6 + 4, $d + 4, $ff, $ff, ITEM | $3, FULL_RESTORE + db $3 ; objects + object SPRITE_BALL, $1d, $9, STAY, NONE, $1, PP_UP + object SPRITE_BALL, $4, $f, STAY, NONE, $2, ULTRA_BALL + object SPRITE_BALL, $d, $6, STAY, NONE, $3, FULL_RESTORE ; warp-to EVENT_DISP UNKNOWN_DUNGEON_2_WIDTH, $1, $1d ; UNKNOWN_DUNGEON_1 diff --git a/data/mapObjects/unknowndungeon3.asm b/data/mapObjects/unknowndungeon3.asm index a3fba264..84fe5e5d 100755 --- a/data/mapObjects/unknowndungeon3.asm +++ b/data/mapObjects/unknowndungeon3.asm @@ -1,4 +1,4 @@ -UnknownDungeon3Object: ; 0x45f36 (size=34) +UnknownDungeon3Object: db $7d ; border block db $1 ; warps @@ -6,10 +6,10 @@ UnknownDungeon3Object: ; 0x45f36 (size=34) db $0 ; signs - db $3 ; people - db SPRITE_SLOWBRO, $d + 4, $1b + 4, $ff, $d0, TRAINER | $1, MEWTWO, 70 - db SPRITE_BALL, $9 + 4, $10 + 4, $ff, $ff, ITEM | $2, ULTRA_BALL - db SPRITE_BALL, $1 + 4, $12 + 4, $ff, $ff, ITEM | $3, MAX_REVIVE + db $3 ; objects + object SPRITE_SLOWBRO, $1b, $d, STAY, DOWN, $1, MEWTWO, 70 + object SPRITE_BALL, $10, $9, STAY, NONE, $2, ULTRA_BALL + object SPRITE_BALL, $12, $1, STAY, NONE, $3, MAX_REVIVE ; warp-to EVENT_DISP UNKNOWN_DUNGEON_3_WIDTH, $6, $3 ; UNKNOWN_DUNGEON_1 diff --git a/data/mapObjects/vermilioncity.asm b/data/mapObjects/vermilioncity.asm index a7a6a6b4..8f64e894 100755 --- a/data/mapObjects/vermilioncity.asm +++ b/data/mapObjects/vermilioncity.asm @@ -1,4 +1,4 @@ -VermilionCityObject: ; 0x189ba (size=133) +VermilionCityObject: db $43 ; border block db $9 ; warps @@ -21,13 +21,13 @@ VermilionCityObject: ; 0x189ba (size=133) db $13, $7, $c ; VermilionCityText12 db $f, $1d, $d ; VermilionCityText13 - db $6 ; people - db SPRITE_FOULARD_WOMAN, $7 + 4, $13 + 4, $fe, $2, $1 ; person - db SPRITE_GAMBLER, $6 + 4, $e + 4, $ff, $ff, $2 ; person - db SPRITE_SAILOR, $1e + 4, $13 + 4, $ff, $d1, $3 ; person - db SPRITE_GAMBLER, $7 + 4, $1e + 4, $ff, $ff, $4 ; person - db SPRITE_SLOWBRO, $9 + 4, $1d + 4, $fe, $1, $5 ; person - db SPRITE_SAILOR, $1b + 4, $19 + 4, $fe, $2, $6 ; person + db $6 ; objects + object SPRITE_FOULARD_WOMAN, $13, $7, WALK, $2, $1 ; person + object SPRITE_GAMBLER, $e, $6, STAY, NONE, $2 ; person + object SPRITE_SAILOR, $13, $1e, STAY, UP, $3 ; person + object SPRITE_GAMBLER, $1e, $7, STAY, NONE, $4 ; person + object SPRITE_SLOWBRO, $1d, $9, WALK, $1, $5 ; person + object SPRITE_SAILOR, $19, $1b, WALK, $2, $6 ; person ; warp-to EVENT_DISP VERMILION_CITY_WIDTH, $3, $b ; VERMILION_POKECENTER diff --git a/data/mapObjects/vermiliondock.asm b/data/mapObjects/vermiliondock.asm index 4c49e966..54d6790a 100755 --- a/data/mapObjects/vermiliondock.asm +++ b/data/mapObjects/vermiliondock.asm @@ -1,4 +1,4 @@ -VermilionDockObject: ; 0x1dcc6 (size=20) +VermilionDockObject: db $f ; border block db $2 ; warps @@ -7,7 +7,7 @@ VermilionDockObject: ; 0x1dcc6 (size=20) db $0 ; signs - db $0 ; people + db $0 ; objects ; warp-to EVENT_DISP VERMILION_DOCK_WIDTH, $0, $e diff --git a/data/mapObjects/vermiliongym.asm b/data/mapObjects/vermiliongym.asm index 30787405..9058ec4c 100755 --- a/data/mapObjects/vermiliongym.asm +++ b/data/mapObjects/vermiliongym.asm @@ -1,4 +1,4 @@ -VermilionGymObject: ; 0x5cbfe (size=58) +VermilionGymObject: db $3 ; border block db $2 ; warps @@ -7,12 +7,12 @@ VermilionGymObject: ; 0x5cbfe (size=58) db $0 ; signs - db $5 ; people - db SPRITE_ROCKER, $1 + 4, $5 + 4, $ff, $d0, TRAINER | $1, LT__SURGE + $C8, $1 - db SPRITE_GENTLEMAN, $6 + 4, $9 + 4, $ff, $d2, TRAINER | $2, GENTLEMAN + $C8, $3 - db SPRITE_BLACK_HAIR_BOY_2, $8 + 4, $3 + 4, $ff, $d2, TRAINER | $3, ROCKER + $C8, $1 - db SPRITE_SAILOR, $a + 4, $0 + 4, $ff, $d3, TRAINER | $4, SAILOR + $C8, $8 - db SPRITE_GYM_HELPER, $e + 4, $4 + 4, $ff, $d0, $5 ; person + db $5 ; objects + object SPRITE_ROCKER, $5, $1, STAY, DOWN, $1, OPP_LT_SURGE, $1 + object SPRITE_GENTLEMAN, $9, $6, STAY, LEFT, $2, OPP_GENTLEMAN, $3 + object SPRITE_BLACK_HAIR_BOY_2, $3, $8, STAY, LEFT, $3, OPP_ROCKER, $1 + object SPRITE_SAILOR, $0, $a, STAY, RIGHT, $4, OPP_SAILOR, $8 + object SPRITE_GYM_HELPER, $4, $e, STAY, DOWN, $5 ; person ; warp-to EVENT_DISP VERMILION_GYM_WIDTH, $11, $4 diff --git a/data/mapObjects/vermilionhouse1.asm b/data/mapObjects/vermilionhouse1.asm index e6104944..199489ba 100755 --- a/data/mapObjects/vermilionhouse1.asm +++ b/data/mapObjects/vermilionhouse1.asm @@ -1,4 +1,4 @@ -VermilionHouse1Object: ; 0x1db20 (size=38) +VermilionHouse1Object: db $a ; border block db $2 ; warps @@ -7,10 +7,10 @@ VermilionHouse1Object: ; 0x1db20 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_BUG_CATCHER, $3 + 4, $5 + 4, $ff, $d2, $1 ; person - db SPRITE_BIRD, $5 + 4, $3 + 4, $fe, $2, $2 ; person - db SPRITE_PAPER_SHEET, $3 + 4, $4 + 4, $ff, $ff, $3 ; person + db $3 ; objects + object SPRITE_BUG_CATCHER, $5, $3, STAY, LEFT, $1 ; person + object SPRITE_BIRD, $3, $5, WALK, $2, $2 ; person + object SPRITE_PAPER_SHEET, $4, $3, STAY, NONE, $3 ; person ; warp-to EVENT_DISP VERMILION_HOUSE_1_WIDTH, $7, $2 diff --git a/data/mapObjects/vermilionhouse2.asm b/data/mapObjects/vermilionhouse2.asm index aab505cb..0108233b 100755 --- a/data/mapObjects/vermilionhouse2.asm +++ b/data/mapObjects/vermilionhouse2.asm @@ -1,4 +1,4 @@ -VermilionHouse2Object: ; 0x560cf (size=26) +VermilionHouse2Object: db $a ; border block db $2 ; warps @@ -7,8 +7,8 @@ VermilionHouse2Object: ; 0x560cf (size=26) db $0 ; signs - db $1 ; people - db SPRITE_FISHER, $4 + 4, $2 + 4, $ff, $d3, $1 ; person + db $1 ; objects + object SPRITE_FISHER, $2, $4, STAY, RIGHT, $1 ; person ; warp-to EVENT_DISP VERMILION_HOUSE_2_WIDTH, $7, $2 diff --git a/data/mapObjects/vermilionhouse3.asm b/data/mapObjects/vermilionhouse3.asm index b23a741b..2b8e007b 100755 --- a/data/mapObjects/vermilionhouse3.asm +++ b/data/mapObjects/vermilionhouse3.asm @@ -1,4 +1,4 @@ -VermilionHouse3Object: ; 0x19c25 (size=26) +VermilionHouse3Object: db $a ; border block db $2 ; warps @@ -7,8 +7,8 @@ VermilionHouse3Object: ; 0x19c25 (size=26) db $0 ; signs - db $1 ; people - db SPRITE_LITTLE_GIRL, $5 + 4, $3 + 4, $ff, $d1, $1 ; person + db $1 ; objects + object SPRITE_LITTLE_GIRL, $3, $5, STAY, UP, $1 ; person ; warp-to EVENT_DISP VERMILION_HOUSE_3_WIDTH, $7, $2 diff --git a/data/mapObjects/vermilionmart.asm b/data/mapObjects/vermilionmart.asm index f57adde8..01df824e 100755 --- a/data/mapObjects/vermilionmart.asm +++ b/data/mapObjects/vermilionmart.asm @@ -1,4 +1,4 @@ -VermilionMartObject: ; 0x5c9f4 (size=38) +VermilionMartObject: db $0 ; border block db $2 ; warps @@ -7,10 +7,10 @@ VermilionMartObject: ; 0x5c9f4 (size=38) db $0 ; signs - db $3 ; people - db SPRITE_MART_GUY, $5 + 4, $0 + 4, $ff, $d3, $1 ; person - db SPRITE_BLACK_HAIR_BOY_1, $6 + 4, $5 + 4, $ff, $ff, $2 ; person - db SPRITE_LASS, $3 + 4, $3 + 4, $fe, $2, $3 ; person + db $3 ; objects + object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person + object SPRITE_BLACK_HAIR_BOY_1, $5, $6, STAY, NONE, $2 ; person + object SPRITE_LASS, $3, $3, WALK, $2, $3 ; person ; warp-to EVENT_DISP VERMILION_MART_WIDTH, $7, $3 diff --git a/data/mapObjects/vermilionpokecenter.asm b/data/mapObjects/vermilionpokecenter.asm index 97b86520..727af039 100755 --- a/data/mapObjects/vermilionpokecenter.asm +++ b/data/mapObjects/vermilionpokecenter.asm @@ -1,4 +1,4 @@ -VermilionPokecenterObject: ; 0x5c9a9 (size=44) +VermilionPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ VermilionPokecenterObject: ; 0x5c9a9 (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_FISHER, $5 + 4, $a + 4, $ff, $ff, $2 ; person - db SPRITE_SAILOR, $4 + 4, $5 + 4, $ff, $ff, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_FISHER, $a, $5, STAY, NONE, $2 ; person + object SPRITE_SAILOR, $5, $4, STAY, NONE, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP VERMILION_POKECENTER_WIDTH, $7, $3 diff --git a/data/mapObjects/victoryroad1.asm b/data/mapObjects/victoryroad1.asm index 96cb23bb..05680b9f 100755 --- a/data/mapObjects/victoryroad1.asm +++ b/data/mapObjects/victoryroad1.asm @@ -1,4 +1,4 @@ -VictoryRoad1Object: ; 0x5dab8 (size=76) +VictoryRoad1Object: db $7d ; border block db $3 ; warps @@ -8,14 +8,14 @@ VictoryRoad1Object: ; 0x5dab8 (size=76) db $0 ; signs - db $7 ; people - db SPRITE_LASS, $5 + 4, $7 + 4, $ff, $d3, TRAINER | $1, COOLTRAINER_F + $C8, $5 - db SPRITE_BLACK_HAIR_BOY_1, $2 + 4, $3 + 4, $ff, $d0, TRAINER | $2, COOLTRAINER_M + $C8, $5 - db SPRITE_BALL, $0 + 4, $b + 4, $ff, $ff, ITEM | $3, TM_43 - db SPRITE_BALL, $2 + 4, $9 + 4, $ff, $ff, ITEM | $4, RARE_CANDY - db SPRITE_BOULDER, $f + 4, $5 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $5 ; person - db SPRITE_BOULDER, $2 + 4, $e + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $6 ; person - db SPRITE_BOULDER, $a + 4, $2 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $7 ; person + db $7 ; objects + object SPRITE_LASS, $7, $5, STAY, RIGHT, $1, OPP_COOLTRAINER_F, $5 + object SPRITE_BLACK_HAIR_BOY_1, $3, $2, STAY, DOWN, $2, OPP_COOLTRAINER_M, $5 + object SPRITE_BALL, $b, $0, STAY, NONE, $3, TM_43 + object SPRITE_BALL, $9, $2, STAY, NONE, $4, RARE_CANDY + object SPRITE_BOULDER, $5, $f, STAY, BOULDER_MOVEMENT_BYTE_2, $5 ; person + object SPRITE_BOULDER, $e, $2, STAY, BOULDER_MOVEMENT_BYTE_2, $6 ; person + object SPRITE_BOULDER, $2, $a, STAY, BOULDER_MOVEMENT_BYTE_2, $7 ; person ; warp-to EVENT_DISP VICTORY_ROAD_1_WIDTH, $11, $8 diff --git a/data/mapObjects/victoryroad2.asm b/data/mapObjects/victoryroad2.asm index 39ec23c5..1bada62a 100755 --- a/data/mapObjects/victoryroad2.asm +++ b/data/mapObjects/victoryroad2.asm @@ -1,4 +1,4 @@ -VictoryRoad2Object: ; 0x51915 (size=154) +VictoryRoad2Object: db $7d ; border block db $7 ; warps @@ -12,20 +12,20 @@ VictoryRoad2Object: ; 0x51915 (size=154) db $0 ; signs - db $d ; people - db SPRITE_HIKER, $9 + 4, $c + 4, $ff, $d2, TRAINER | $1, BLACKBELT + $C8, $9 - db SPRITE_BLACK_HAIR_BOY_2, $d + 4, $15 + 4, $ff, $d2, TRAINER | $2, JUGGLER + $C8, $2 - db SPRITE_BLACK_HAIR_BOY_1, $8 + 4, $13 + 4, $ff, $d0, TRAINER | $3, TAMER + $C8, $5 - db SPRITE_BLACK_HAIR_BOY_2, $2 + 4, $4 + 4, $ff, $d0, TRAINER | $4, POKEMANIAC + $C8, $6 - db SPRITE_BLACK_HAIR_BOY_2, $3 + 4, $1a + 4, $ff, $d2, TRAINER | $5, JUGGLER + $C8, $5 - db SPRITE_BIRD, $5 + 4, $b + 4, $ff, $d1, TRAINER | $6, MOLTRES, 50 - db SPRITE_BALL, $5 + 4, $1b + 4, $ff, $ff, ITEM | $7, TM_17 - db SPRITE_BALL, $9 + 4, $12 + 4, $ff, $ff, ITEM | $8, FULL_HEAL - db SPRITE_BALL, $b + 4, $9 + 4, $ff, $ff, ITEM | $9, TM_05 - db SPRITE_BALL, $0 + 4, $b + 4, $ff, $ff, ITEM | $a, GUARD_SPEC_ - db SPRITE_BOULDER, $e + 4, $4 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $b ; person - db SPRITE_BOULDER, $5 + 4, $5 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $c ; person - db SPRITE_BOULDER, $10 + 4, $17 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $d ; person + db $d ; objects + object SPRITE_HIKER, $c, $9, STAY, LEFT, $1, OPP_BLACKBELT, $9 + object SPRITE_BLACK_HAIR_BOY_2, $15, $d, STAY, LEFT, $2, OPP_JUGGLER, $2 + object SPRITE_BLACK_HAIR_BOY_1, $13, $8, STAY, DOWN, $3, OPP_TAMER, $5 + object SPRITE_BLACK_HAIR_BOY_2, $4, $2, STAY, DOWN, $4, OPP_POKEMANIAC, $6 + object SPRITE_BLACK_HAIR_BOY_2, $1a, $3, STAY, LEFT, $5, OPP_JUGGLER, $5 + object SPRITE_BIRD, $b, $5, STAY, UP, $6, MOLTRES, 50 + object SPRITE_BALL, $1b, $5, STAY, NONE, $7, TM_17 + object SPRITE_BALL, $12, $9, STAY, NONE, $8, FULL_HEAL + object SPRITE_BALL, $9, $b, STAY, NONE, $9, TM_05 + object SPRITE_BALL, $b, $0, STAY, NONE, $a, GUARD_SPEC + object SPRITE_BOULDER, $4, $e, STAY, BOULDER_MOVEMENT_BYTE_2, $b ; person + object SPRITE_BOULDER, $5, $5, STAY, BOULDER_MOVEMENT_BYTE_2, $c ; person + object SPRITE_BOULDER, $17, $10, STAY, BOULDER_MOVEMENT_BYTE_2, $d ; person ; warp-to EVENT_DISP VICTORY_ROAD_2_WIDTH, $8, $0 ; VICTORY_ROAD_1 diff --git a/data/mapObjects/victoryroad3.asm b/data/mapObjects/victoryroad3.asm index 998a189d..20e43583 100755 --- a/data/mapObjects/victoryroad3.asm +++ b/data/mapObjects/victoryroad3.asm @@ -1,4 +1,4 @@ -VictoryRoad3Object: ; 0x44acd (size=106) +VictoryRoad3Object: db $7d ; border block db $4 ; warps @@ -9,17 +9,17 @@ VictoryRoad3Object: ; 0x44acd (size=106) db $0 ; signs - db $a ; people - db SPRITE_BLACK_HAIR_BOY_1, $5 + 4, $1c + 4, $ff, $d2, TRAINER | $1, COOLTRAINER_M + $C8, $2 - db SPRITE_LASS, $d + 4, $7 + 4, $ff, $d3, TRAINER | $2, COOLTRAINER_F + $C8, $2 - db SPRITE_BLACK_HAIR_BOY_1, $e + 4, $6 + 4, $ff, $d2, TRAINER | $3, COOLTRAINER_M + $C8, $3 - db SPRITE_LASS, $3 + 4, $d + 4, $ff, $d3, TRAINER | $4, COOLTRAINER_F + $C8, $3 - db SPRITE_BALL, $5 + 4, $1a + 4, $ff, $ff, ITEM | $5, MAX_REVIVE - db SPRITE_BALL, $7 + 4, $7 + 4, $ff, $ff, ITEM | $6, TM_47 - db SPRITE_BOULDER, $3 + 4, $16 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $7 ; person - db SPRITE_BOULDER, $c + 4, $d + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $8 ; person - db SPRITE_BOULDER, $a + 4, $18 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $9 ; person - db SPRITE_BOULDER, $f + 4, $16 + 4, $ff, BOULDER_MOVEMENT_BYTE_2, $a ; person + db $a ; objects + object SPRITE_BLACK_HAIR_BOY_1, $1c, $5, STAY, LEFT, $1, OPP_COOLTRAINER_M, $2 + object SPRITE_LASS, $7, $d, STAY, RIGHT, $2, OPP_COOLTRAINER_F, $2 + object SPRITE_BLACK_HAIR_BOY_1, $6, $e, STAY, LEFT, $3, OPP_COOLTRAINER_M, $3 + object SPRITE_LASS, $d, $3, STAY, RIGHT, $4, OPP_COOLTRAINER_F, $3 + object SPRITE_BALL, $1a, $5, STAY, NONE, $5, MAX_REVIVE + object SPRITE_BALL, $7, $7, STAY, NONE, $6, TM_47 + object SPRITE_BOULDER, $16, $3, STAY, BOULDER_MOVEMENT_BYTE_2, $7 ; person + object SPRITE_BOULDER, $d, $c, STAY, BOULDER_MOVEMENT_BYTE_2, $8 ; person + object SPRITE_BOULDER, $18, $a, STAY, BOULDER_MOVEMENT_BYTE_2, $9 ; person + object SPRITE_BOULDER, $16, $f, STAY, BOULDER_MOVEMENT_BYTE_2, $a ; person ; warp-to EVENT_DISP VICTORY_ROAD_3_WIDTH, $7, $17 ; VICTORY_ROAD_2 diff --git a/data/mapObjects/viridiancity.asm b/data/mapObjects/viridiancity.asm index 37cb42e2..ca40cc4f 100755 --- a/data/mapObjects/viridiancity.asm +++ b/data/mapObjects/viridiancity.asm @@ -1,4 +1,4 @@ -ViridianCityObject: ; 0x18384 (size=104) +ViridianCityObject: db $f ; border block db $5 ; warps @@ -16,14 +16,14 @@ ViridianCityObject: ; 0x18384 (size=104) db $19, $18, $c ; PokeCenterSignText db $7, $1b, $d ; ViridianCityText13 - db $7 ; people - db SPRITE_BUG_CATCHER, $14 + 4, $d + 4, $fe, $0, $1 ; person - db SPRITE_GAMBLER, $8 + 4, $1e + 4, $ff, $ff, $2 ; person - db SPRITE_BUG_CATCHER, $19 + 4, $1e + 4, $fe, $0, $3 ; person - db SPRITE_GIRL, $9 + 4, $11 + 4, $ff, $d3, $4 ; person - db SPRITE_LYING_OLD_MAN, $9 + 4, $12 + 4, $ff, $ff, $5 ; person - db SPRITE_FISHER2, $17 + 4, $6 + 4, $ff, $d0, $6 ; person - db SPRITE_GAMBLER, $5 + 4, $11 + 4, $fe, $2, $7 ; person + db $7 ; objects + object SPRITE_BUG_CATCHER, $d, $14, WALK, $0, $1 ; person + object SPRITE_GAMBLER, $1e, $8, STAY, NONE, $2 ; person + object SPRITE_BUG_CATCHER, $1e, $19, WALK, $0, $3 ; person + object SPRITE_GIRL, $11, $9, STAY, RIGHT, $4 ; person + object SPRITE_LYING_OLD_MAN, $12, $9, STAY, NONE, $5 ; person + object SPRITE_FISHER2, $6, $17, STAY, DOWN, $6 ; person + object SPRITE_GAMBLER, $11, $5, WALK, $2, $7 ; person ; warp-to EVENT_DISP VIRIDIAN_CITY_WIDTH, $19, $17 ; VIRIDIAN_POKECENTER diff --git a/data/mapObjects/viridianforest.asm b/data/mapObjects/viridianforest.asm index 74f64dd5..0e466a70 100755 --- a/data/mapObjects/viridianforest.asm +++ b/data/mapObjects/viridianforest.asm @@ -1,4 +1,4 @@ -ViridianForestObject: ; 0x611da (size=127) +ViridianForestObject: db $3 ; border block db $6 ; warps @@ -17,15 +17,15 @@ ViridianForestObject: ; 0x611da (size=127) db $2d, $12, $d ; ViridianForestText13 db $1, $2, $e ; ViridianForestText14 - db $8 ; people - db SPRITE_BUG_CATCHER, $2b + 4, $10 + 4, $ff, $ff, $1 ; person - db SPRITE_BUG_CATCHER, $21 + 4, $1e + 4, $ff, $d2, TRAINER | $2, BUG_CATCHER + $C8, $1 - db SPRITE_BUG_CATCHER, $13 + 4, $1e + 4, $ff, $d2, TRAINER | $3, BUG_CATCHER + $C8, $2 - db SPRITE_BUG_CATCHER, $12 + 4, $2 + 4, $ff, $d2, TRAINER | $4, BUG_CATCHER + $C8, $3 - db SPRITE_BALL, $b + 4, $19 + 4, $ff, $ff, ITEM | $5, ANTIDOTE - db SPRITE_BALL, $1d + 4, $c + 4, $ff, $ff, ITEM | $6, POTION - db SPRITE_BALL, $1f + 4, $1 + 4, $ff, $ff, ITEM | $7, POKE_BALL - db SPRITE_BUG_CATCHER, $28 + 4, $1b + 4, $ff, $ff, $8 ; person + db $8 ; objects + object SPRITE_BUG_CATCHER, $10, $2b, STAY, NONE, $1 ; person + object SPRITE_BUG_CATCHER, $1e, $21, STAY, LEFT, $2, OPP_BUG_CATCHER, $1 + object SPRITE_BUG_CATCHER, $1e, $13, STAY, LEFT, $3, OPP_BUG_CATCHER, $2 + object SPRITE_BUG_CATCHER, $2, $12, STAY, LEFT, $4, OPP_BUG_CATCHER, $3 + object SPRITE_BALL, $19, $b, STAY, NONE, $5, ANTIDOTE + object SPRITE_BALL, $c, $1d, STAY, NONE, $6, POTION + object SPRITE_BALL, $1, $1f, STAY, NONE, $7, POKE_BALL + object SPRITE_BUG_CATCHER, $1b, $28, STAY, NONE, $8 ; person ; warp-to EVENT_DISP VIRIDIAN_FOREST_WIDTH, $0, $1 ; VIRIDIAN_FOREST_EXIT diff --git a/data/mapObjects/viridianforestentrance.asm b/data/mapObjects/viridianforestentrance.asm index ce0aaae5..06faad72 100755 --- a/data/mapObjects/viridianforestentrance.asm +++ b/data/mapObjects/viridianforestentrance.asm @@ -1,4 +1,4 @@ -ViridianForestEntranceObject: ; 0x5d66d (size=48) +ViridianForestEntranceObject: db $a ; border block db $4 ; warps @@ -9,9 +9,9 @@ ViridianForestEntranceObject: ; 0x5d66d (size=48) db $0 ; signs - db $2 ; people - db SPRITE_GIRL, $4 + 4, $8 + 4, $ff, $d2, $1 ; person - db SPRITE_LITTLE_GIRL, $4 + 4, $2 + 4, $fe, $1, $2 ; person + db $2 ; objects + object SPRITE_GIRL, $8, $4, STAY, LEFT, $1 ; person + object SPRITE_LITTLE_GIRL, $2, $4, WALK, $1, $2 ; person ; warp-to EVENT_DISP VIRIDIAN_FOREST_ENTRANCE_WIDTH, $0, $4 ; VIRIDIAN_FOREST diff --git a/data/mapObjects/viridianforestexit.asm b/data/mapObjects/viridianforestexit.asm index a96d5270..0f48fd1c 100755 --- a/data/mapObjects/viridianforestexit.asm +++ b/data/mapObjects/viridianforestexit.asm @@ -1,4 +1,4 @@ -ViridianForestExitObject: ; 0x5d598 (size=48) +ViridianForestExitObject: db $a ; border block db $4 ; warps @@ -9,9 +9,9 @@ ViridianForestExitObject: ; 0x5d598 (size=48) db $0 ; signs - db $2 ; people - db SPRITE_BLACK_HAIR_BOY_2, $2 + 4, $3 + 4, $ff, $ff, $1 ; person - db SPRITE_OLD_PERSON, $5 + 4, $2 + 4, $ff, $ff, $2 ; person + db $2 ; objects + object SPRITE_BLACK_HAIR_BOY_2, $3, $2, STAY, NONE, $1 ; person + object SPRITE_OLD_PERSON, $2, $5, STAY, NONE, $2 ; person ; warp-to EVENT_DISP VIRIDIAN_FOREST_EXIT_WIDTH, $0, $4 diff --git a/data/mapObjects/viridiangym.asm b/data/mapObjects/viridiangym.asm index 5cc1c086..8efa5e22 100755 --- a/data/mapObjects/viridiangym.asm +++ b/data/mapObjects/viridiangym.asm @@ -1,4 +1,4 @@ -ViridianGymObject: ; 0x74bde (size=105) +ViridianGymObject: db $3 ; border block db $2 ; warps @@ -7,18 +7,18 @@ ViridianGymObject: ; 0x74bde (size=105) db $0 ; signs - db $b ; people - db SPRITE_GIOVANNI, $1 + 4, $2 + 4, $ff, $d0, TRAINER | $1, GIOVANNI + $C8, $3 - db SPRITE_BLACK_HAIR_BOY_1, $7 + 4, $c + 4, $ff, $d0, TRAINER | $2, COOLTRAINER_M + $C8, $9 - db SPRITE_HIKER, $b + 4, $b + 4, $ff, $d1, TRAINER | $3, BLACKBELT + $C8, $6 - db SPRITE_ROCKER, $7 + 4, $a + 4, $ff, $d0, TRAINER | $4, TAMER + $C8, $3 - db SPRITE_HIKER, $7 + 4, $3 + 4, $ff, $d2, TRAINER | $5, BLACKBELT + $C8, $7 - db SPRITE_BLACK_HAIR_BOY_1, $5 + 4, $d + 4, $ff, $d3, TRAINER | $6, COOLTRAINER_M + $C8, $a - db SPRITE_HIKER, $1 + 4, $a + 4, $ff, $d0, TRAINER | $7, BLACKBELT + $C8, $8 - db SPRITE_ROCKER, $10 + 4, $2 + 4, $ff, $d3, TRAINER | $8, TAMER + $C8, $4 - db SPRITE_BLACK_HAIR_BOY_1, $5 + 4, $6 + 4, $ff, $d0, TRAINER | $9, COOLTRAINER_M + $C8, $1 - db SPRITE_GYM_HELPER, $f + 4, $10 + 4, $ff, $d0, $a ; person - db SPRITE_BALL, $9 + 4, $10 + 4, $ff, $ff, ITEM | $b, REVIVE + db $b ; objects + object SPRITE_GIOVANNI, $2, $1, STAY, DOWN, $1, OPP_GIOVANNI, $3 + object SPRITE_BLACK_HAIR_BOY_1, $c, $7, STAY, DOWN, $2, OPP_COOLTRAINER_M, $9 + object SPRITE_HIKER, $b, $b, STAY, UP, $3, OPP_BLACKBELT, $6 + object SPRITE_ROCKER, $a, $7, STAY, DOWN, $4, OPP_TAMER, $3 + object SPRITE_HIKER, $3, $7, STAY, LEFT, $5, OPP_BLACKBELT, $7 + object SPRITE_BLACK_HAIR_BOY_1, $d, $5, STAY, RIGHT, $6, OPP_COOLTRAINER_M, $a + object SPRITE_HIKER, $a, $1, STAY, DOWN, $7, OPP_BLACKBELT, $8 + object SPRITE_ROCKER, $2, $10, STAY, RIGHT, $8, OPP_TAMER, $4 + object SPRITE_BLACK_HAIR_BOY_1, $6, $5, STAY, DOWN, $9, OPP_COOLTRAINER_M, $1 + object SPRITE_GYM_HELPER, $10, $f, STAY, DOWN, $a ; person + object SPRITE_BALL, $10, $9, STAY, NONE, $b, REVIVE ; warp-to EVENT_DISP VIRIDIAN_GYM_WIDTH, $11, $10 diff --git a/data/mapObjects/viridianhouse.asm b/data/mapObjects/viridianhouse.asm index dd2d6069..c06bb9c8 100755 --- a/data/mapObjects/viridianhouse.asm +++ b/data/mapObjects/viridianhouse.asm @@ -1,4 +1,4 @@ -ViridianHouseObject: ; 0x1d5bb (size=44) +ViridianHouseObject: db $a ; border block db $2 ; warps @@ -7,11 +7,11 @@ ViridianHouseObject: ; 0x1d5bb (size=44) db $0 ; signs - db $4 ; people - db SPRITE_BALDING_GUY, $3 + 4, $5 + 4, $ff, $ff, $1 ; person - db SPRITE_LITTLE_GIRL, $4 + 4, $1 + 4, $fe, $1, $2 ; person - db SPRITE_BIRD, $5 + 4, $5 + 4, $fe, $2, $3 ; person - db SPRITE_CLIPBOARD, $0 + 4, $4 + 4, $ff, $ff, $4 ; person + db $4 ; objects + object SPRITE_BALDING_GUY, $5, $3, STAY, NONE, $1 ; person + object SPRITE_LITTLE_GIRL, $1, $4, WALK, $1, $2 ; person + object SPRITE_BIRD, $5, $5, WALK, $2, $3 ; person + object SPRITE_CLIPBOARD, $4, $0, STAY, NONE, $4 ; person ; warp-to EVENT_DISP VIRIDIAN_HOUSE_WIDTH, $7, $2 diff --git a/data/mapObjects/viridianmart.asm b/data/mapObjects/viridianmart.asm index b1b367c7..4b90bee3 100755 --- a/data/mapObjects/viridianmart.asm +++ b/data/mapObjects/viridianmart.asm @@ -1,4 +1,4 @@ -ViridianMartObject: ; 0x1d50a (size=38) +ViridianMartObject: db $0 ; border block db $2 ; warps @@ -7,10 +7,10 @@ ViridianMartObject: ; 0x1d50a (size=38) db $0 ; signs - db $3 ; people - db SPRITE_MART_GUY, $5 + 4, $0 + 4, $ff, $d3, $1 ; person - db SPRITE_BUG_CATCHER, $5 + 4, $5 + 4, $fe, $1, $2 ; person - db SPRITE_BLACK_HAIR_BOY_1, $3 + 4, $3 + 4, $ff, $ff, $3 ; person + db $3 ; objects + object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person + object SPRITE_BUG_CATCHER, $5, $5, WALK, $1, $2 ; person + object SPRITE_BLACK_HAIR_BOY_1, $3, $3, STAY, NONE, $3 ; person ; warp-to EVENT_DISP VIRIDIAN_MART_WIDTH, $7, $3 diff --git a/data/mapObjects/viridianpokecenter.asm b/data/mapObjects/viridianpokecenter.asm index 6631a814..2e96ca58 100755 --- a/data/mapObjects/viridianpokecenter.asm +++ b/data/mapObjects/viridianpokecenter.asm @@ -1,4 +1,4 @@ -ViridianPokecenterObject: ; 0x44277 (size=44) +ViridianPokecenterObject: db $0 ; border block db $2 ; warps @@ -7,11 +7,11 @@ ViridianPokecenterObject: ; 0x44277 (size=44) db $0 ; signs - db $4 ; people - db SPRITE_NURSE, $1 + 4, $3 + 4, $ff, $d0, $1 ; person - db SPRITE_GENTLEMAN, $5 + 4, $a + 4, $fe, $1, $2 ; person - db SPRITE_BLACK_HAIR_BOY_1, $3 + 4, $4 + 4, $ff, $ff, $3 ; person - db SPRITE_CABLE_CLUB_WOMAN, $2 + 4, $b + 4, $ff, $d0, $4 ; person + db $4 ; objects + object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person + object SPRITE_GENTLEMAN, $a, $5, WALK, $1, $2 ; person + object SPRITE_BLACK_HAIR_BOY_1, $4, $3, STAY, NONE, $3 ; person + object SPRITE_CABLE_CLUB_WOMAN, $b, $2, STAY, DOWN, $4 ; person ; warp-to EVENT_DISP VIRIDIAN_POKECENTER_WIDTH, $7, $3 diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index f6bd8d99..ab8ae1ca 100755 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -1,5 +1,5 @@ ; see also MapHeaderPointers -MapHeaderBanks: ; c23d (3:423d) +MapHeaderBanks: db BANK(PalletTown_h) ;PALLET_TOWN db BANK(ViridianCity_h) ; VIRIDIAN_CITY db BANK(PewterCity_h) ; PEWTER_CITY @@ -239,8 +239,8 @@ MapHeaderBanks: ; c23d (3:423d) db BANK(SilphCoElevator_h) db $11 db $11 - db BANK(BattleCenterM_h) - db BANK(TradeCenterM_h) + db BANK(TradeCenter_h) + db BANK(Colosseum_h) db $11 db $11 db $11 @@ -248,6 +248,3 @@ MapHeaderBanks: ; c23d (3:423d) db BANK(Lorelei_h) db BANK(Bruno_h) db BANK(Agatha_h) -IF DEF(_OPTION_BEACH_HOUSE) - db BANK(BeachHouse_h) -ENDC diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm index 771989a5..b777e4ca 100755 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -1,5 +1,5 @@ ; see also MapHeaderBanks -MapHeaderPointers:: ; 01ae (0:01ae) +MapHeaderPointers:: dw PalletTown_h dw ViridianCity_h dw PewterCity_h @@ -239,8 +239,8 @@ MapHeaderPointers:: ; 01ae (0:01ae) dw SilphCoElevator_h dw SilphCo2_h ; unused dw SilphCo2_h ; unused - dw BattleCenterM_h - dw TradeCenterM_h + dw TradeCenter_h + dw Colosseum_h dw SilphCo2_h ; unused dw SilphCo2_h ; unused dw SilphCo2_h ; unused @@ -248,6 +248,3 @@ MapHeaderPointers:: ; 01ae (0:01ae) dw Lorelei_h dw Bruno_h dw Agatha_h ;247 -IF DEF(_OPTION_BEACH_HOUSE) - dw BeachHouse_h -ENDC diff --git a/data/map_songs.asm b/data/map_songs.asm index 1d7ab269..892f475e 100755 --- a/data/map_songs.asm +++ b/data/map_songs.asm @@ -1,4 +1,4 @@ -MapSongBanks: ; c04d (3:404d) +MapSongBanks: db MUSIC_PALLET_TOWN, BANK(Music_PalletTown) ;PALLET_TOWN db MUSIC_CITIES1, BANK(Music_Cities1) ; VIRIDIAN_CITY db MUSIC_CITIES1, BANK(Music_Cities1) ; PEWTER_CITY @@ -238,8 +238,8 @@ MapSongBanks: ; c04d (3:404d) db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SilphCoElevator db MUSIC_SILPH_CO, BANK(Music_SilphCo) db MUSIC_SILPH_CO, BANK(Music_SilphCo) - db MUSIC_CELADON, BANK(Music_Celadon) ; BattleCenterM - db MUSIC_CELADON, BANK(Music_Celadon) ; TradeCenterM + db MUSIC_CELADON, BANK(Music_Celadon) ; TradeCenter + db MUSIC_CELADON, BANK(Music_Celadon) ; Colosseum db MUSIC_SILPH_CO, BANK(Music_SilphCo) db MUSIC_SILPH_CO, BANK(Music_SilphCo) db MUSIC_SILPH_CO, BANK(Music_SilphCo) @@ -247,6 +247,3 @@ MapSongBanks: ; c04d (3:404d) db MUSIC_GYM, BANK(Music_Gym) ; Lorelei db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; Bruno db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; Agatha -IF DEF(_OPTION_BEACH_HOUSE) - db MUSIC_ROUTES3, BANK(Music_Routes3) ; BeachHouse -ENDC diff --git a/data/mart_inventories.asm b/data/mart_inventories.asm index 4389a1a3..35ae2e9d 100755 --- a/data/mart_inventories.asm +++ b/data/mart_inventories.asm @@ -1,75 +1,64 @@ ; mart inventories are below ; they are texts -; first byte $FE, next byte # of items, last byte $FF ; Viridian -ViridianMartText6:: ; 2442 (0:2442) - db $FE,4,POKE_BALL,ANTIDOTE,PARLYZ_HEAL,BURN_HEAL,$FF +ViridianCashierText:: + TX_MART POKE_BALL, ANTIDOTE, PARLYZ_HEAL, BURN_HEAL ; Pewter -PewterMartText1:: ; 2449 (0:2449) - db $FE,7,POKE_BALL,POTION,ESCAPE_ROPE,ANTIDOTE,BURN_HEAL,AWAKENING - db PARLYZ_HEAL,$FF +PewterCashierText:: + TX_MART POKE_BALL, POTION, ESCAPE_ROPE, ANTIDOTE, BURN_HEAL, AWAKENING, PARLYZ_HEAL ; Cerulean -CeruleanMartText1:: ; 2453 (0:2453) - db $FE,7,POKE_BALL,POTION,REPEL,ANTIDOTE,BURN_HEAL,AWAKENING - db PARLYZ_HEAL,$FF +CeruleanCashierText:: + TX_MART POKE_BALL, POTION, REPEL, ANTIDOTE, BURN_HEAL, AWAKENING, PARLYZ_HEAL ; Bike shop - db $FE,1,BICYCLE,$FF + TX_MART BICYCLE ; Vermilion -VermilionMartText1:: ; 2461 (0:2461) - db $FE,6,POKE_BALL,SUPER_POTION,ICE_HEAL,AWAKENING,PARLYZ_HEAL - db REPEL,$FF +VermilionCashierText:: + TX_MART POKE_BALL, SUPER_POTION, ICE_HEAL, AWAKENING, PARLYZ_HEAL, REPEL ; Lavender -LavenderMartText1:: ; 246a (0:246a) - db $FE,9,GREAT_BALL,SUPER_POTION,REVIVE,ESCAPE_ROPE,SUPER_REPEL - db ANTIDOTE,BURN_HEAL,ICE_HEAL,PARLYZ_HEAL,$FF +LavenderCashierText:: + TX_MART GREAT_BALL, SUPER_POTION, REVIVE, ESCAPE_ROPE, SUPER_REPEL, ANTIDOTE, BURN_HEAL, ICE_HEAL, PARLYZ_HEAL ; Celadon Dept. Store 2F (1) -CeladonMart2Text1:: ; 2476 (0:2476) - db $FE,9,GREAT_BALL,SUPER_POTION,REVIVE,SUPER_REPEL,ANTIDOTE - db BURN_HEAL,ICE_HEAL,AWAKENING,PARLYZ_HEAL,$FF +CeladonMart2Clerk1Text:: + TX_MART GREAT_BALL, SUPER_POTION, REVIVE, SUPER_REPEL, ANTIDOTE, BURN_HEAL, ICE_HEAL, AWAKENING, PARLYZ_HEAL ; Celadon Dept. Store 2F (2) -CeladonMart2Text2:: ; 2482 (0:2482) - db $FE,9,TM_32,TM_33,TM_02,TM_07,TM_37,TM_01,TM_05,TM_09,TM_17,$FF +CeladonMart2Clerk2Text:: + TX_MART TM_32, TM_33, TM_02, TM_07, TM_37, TM_01, TM_05, TM_09, TM_17 ; Celadon Dept. Store 4F -CeladonMart4Text1:: ; 248e (0:248e) - db $FE,5,POKE_DOLL,FIRE_STONE,THUNDER_STONE,WATER_STONE,LEAF_STONE,$FF +CeladonMart4ClerkText:: + TX_MART POKE_DOLL, FIRE_STONE, THUNDER_STONE, WATER_STONE, LEAF_STONE ; Celadon Dept. Store 5F (1) -CeladonMart5Text3:: ; 2496 (0:2496) - db $FE,7,X_ACCURACY,GUARD_SPEC_,DIRE_HIT,X_ATTACK,X_DEFEND,X_SPEED - db X_SPECIAL,$FF +CeladonMart5Clerk1Text:: + TX_MART X_ACCURACY, GUARD_SPEC, DIRE_HIT, X_ATTACK, X_DEFEND, X_SPEED, X_SPECIAL ; Celadon Dept. Store 5F (2) -CeladonMart5Text4:: ; 24a0 (0:24a0) - db $FE,5,HP_UP,PROTEIN,IRON,CARBOS,CALCIUM,$FF +CeladonMart5Clerk2Text:: + TX_MART HP_UP, PROTEIN, IRON, CARBOS, CALCIUM ; Fuchsia -FuchsiaMartText1:: ; 24a8 (0:24a8) - db $FE,6,ULTRA_BALL,GREAT_BALL,SUPER_POTION,REVIVE,FULL_HEAL - db SUPER_REPEL,$FF +FuchsiaCashierText:: + TX_MART ULTRA_BALL, GREAT_BALL, SUPER_POTION, REVIVE, FULL_HEAL, SUPER_REPEL -; unused? 24b1 - db $FE,5,GREAT_BALL,HYPER_POTION,SUPER_POTION,FULL_HEAL,REVIVE,$FF +; unused? + TX_MART GREAT_BALL, HYPER_POTION, SUPER_POTION, FULL_HEAL, REVIVE ; Cinnabar -CinnabarMartText1:: ; 24b9 (0:24b9) - db $FE,7,ULTRA_BALL,GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE - db FULL_HEAL,REVIVE,$FF +CinnabarCashierText:: + TX_MART ULTRA_BALL, GREAT_BALL, HYPER_POTION, MAX_REPEL, ESCAPE_ROPE, FULL_HEAL, REVIVE ; Saffron -SaffronMartText1:: ; 24c3 (0:24c3) - db $FE,6,GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE,FULL_HEAL - db REVIVE,$FF +SaffronCashierText:: + TX_MART GREAT_BALL, HYPER_POTION, MAX_REPEL, ESCAPE_ROPE, FULL_HEAL, REVIVE ; Indigo -IndigoPlateauLobbyText4:: ; 24cc (0:24cc) - db $FE,7,ULTRA_BALL,GREAT_BALL,FULL_RESTORE,MAX_POTION,FULL_HEAL - db REVIVE,MAX_REPEL,$FF +IndigoCashierText:: + TX_MART ULTRA_BALL, GREAT_BALL, FULL_RESTORE, MAX_POTION, FULL_HEAL, REVIVE, MAX_REPEL diff --git a/data/mon_palettes.asm b/data/mon_palettes.asm index f6763d7d..8c4d0bc0 100755 --- a/data/mon_palettes.asm +++ b/data/mon_palettes.asm @@ -1,4 +1,4 @@ -MonsterPalettes: ; 725c8 (1c:65c8) +MonsterPalettes: db PAL_MEWMON ; MISSINGNO db PAL_GREENMON ; BULBASAUR db PAL_GREENMON ; IVYSAUR @@ -82,7 +82,7 @@ MonsterPalettes: ; 725c8 (1c:65c8) db PAL_PINKMON ; SLOWBRO db PAL_GREYMON ; MAGNEMITE db PAL_GREYMON ; MAGNETON - db PAL_BROWNMON ; FARFETCH_D + db PAL_BROWNMON ; FARFETCHD db PAL_BROWNMON ; DODUO db PAL_BROWNMON ; DODRIO db PAL_BLUEMON ; SEEL diff --git a/data/mon_party_sprites.asm b/data/mon_party_sprites.asm index 92297b6d..987d8d28 100755 --- a/data/mon_party_sprites.asm +++ b/data/mon_party_sprites.asm @@ -1,77 +1,77 @@ -MonPartyData: ; 7190d (1c:590d) - dn SPRITE_GRASS, SPRITE_GRASS ;Bulbasaur/Ivysaur - dn SPRITE_GRASS, SPRITE_MON ;Venusaur/Charmander - dn SPRITE_MON, SPRITE_MON ;Charmeleon/Charizard - dn SPRITE_WATER, SPRITE_WATER ;Squirtle/Wartortle - dn SPRITE_WATER, SPRITE_BUG ;Blastoise/Caterpie - dn SPRITE_BUG, SPRITE_BUG ;Metapod/Butterfree - dn SPRITE_BUG, SPRITE_BUG ;Weedle/Kakuna - dn SPRITE_BUG, SPRITE_BIRD_M ;Beedrill/Pidgey - dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Pidgeotto/Pidgeot - dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Rattata/Raticate - dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Spearow/Fearow - dn SPRITE_SNAKE, SPRITE_SNAKE ;Ekans/Arbok - dn SPRITE_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 ;Nidorino/Nidoking - dn SPRITE_FAIRY, SPRITE_FAIRY ;Clefairy/Clefable - dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Vulpix/Ninetales - dn SPRITE_FAIRY, SPRITE_FAIRY ;Jigglypuff/Wigglytuff - dn SPRITE_MON, SPRITE_MON ;Zubat/Golbat - dn SPRITE_GRASS, SPRITE_GRASS ;Oddish/Gloom - dn SPRITE_GRASS, SPRITE_BUG ;Vileplume/Paras - dn SPRITE_BUG, SPRITE_BUG ;Parasect/Venonat - dn SPRITE_BUG, SPRITE_MON ;Venomoth/Diglett - dn SPRITE_MON, SPRITE_MON ;Dugtrio/Meowth - dn SPRITE_MON, SPRITE_MON ;Persian/Psyduck - dn SPRITE_MON, SPRITE_MON ;Golduck/Mankey - dn SPRITE_MON, SPRITE_QUADRUPED ;Primeape/Growlithe - dn SPRITE_QUADRUPED, SPRITE_MON ;Arcanine/Poliwag - dn SPRITE_MON, SPRITE_MON ;Poliwhirl/Poliwrath - dn SPRITE_MON, SPRITE_MON ;Abra/Kadabra - dn SPRITE_MON, SPRITE_MON ;Alakazam/Machop - dn SPRITE_MON, SPRITE_MON ;Machoke/Machamp - dn SPRITE_GRASS, SPRITE_GRASS ;Bellsprout/Weepinbell - dn SPRITE_GRASS, SPRITE_WATER ;Victreebel/Tentacool - dn SPRITE_WATER, SPRITE_MON ;Tentacruel/Geodude - dn SPRITE_MON, SPRITE_MON ;Graveler/Golem - dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Ponyta/Rapidash - dn SPRITE_QUADRUPED, SPRITE_MON ;Slowpoke/Slowbro - dn SPRITE_BALL_M, SPRITE_BALL_M ;Magnemite/Magneton - dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Farfetch'd/Doduo - dn SPRITE_BIRD_M, SPRITE_WATER ;Dodrio/Seel - dn SPRITE_WATER, SPRITE_MON ;Dewgong/Grimer - dn SPRITE_MON, SPRITE_HELIX ;Muk/Shellder - dn SPRITE_HELIX, SPRITE_MON ;Cloyster/Gastly - dn SPRITE_MON, SPRITE_MON ;Haunter/Gengar - dn SPRITE_SNAKE, SPRITE_MON ;Onix/Drowzee - dn SPRITE_MON, SPRITE_WATER ;Hypno/Krabby - dn SPRITE_WATER, SPRITE_BALL_M ;Kingler/Voltorb - dn SPRITE_BALL_M, SPRITE_GRASS ;Electrode/Exeggcute - dn SPRITE_GRASS, SPRITE_MON ;Exeggutor/Cubone - dn SPRITE_MON, SPRITE_MON ;Marowak/Hitmonlee - dn SPRITE_MON, SPRITE_MON ;Hitmonchan/Lickitung - dn SPRITE_MON, SPRITE_MON ;Koffing/Weezing - dn SPRITE_QUADRUPED, SPRITE_MON ;Rhyhorn/Rhydon - dn SPRITE_FAIRY, SPRITE_GRASS ;Chansey/Tangela - dn SPRITE_MON, SPRITE_WATER ;Kangaskhan/Horsea - dn SPRITE_WATER, SPRITE_WATER ;Seadra/Goldeen - dn SPRITE_WATER, SPRITE_HELIX ;Seaking/Staryu - dn SPRITE_HELIX, SPRITE_MON ;Starmie/Mr.Mime - dn SPRITE_BUG, SPRITE_MON ;Scyther/Jynx - dn SPRITE_MON, SPRITE_MON ;Electabuzz/Magmar - dn SPRITE_BUG, SPRITE_QUADRUPED ;Pinsir/Tauros - dn SPRITE_WATER, SPRITE_SNAKE ;Magikarp/Gyarados - dn SPRITE_WATER, SPRITE_MON ;Lapras/Ditto - dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Eevee/Vaporeon - dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Jolteon/Flareon - dn SPRITE_MON, SPRITE_HELIX ;Porygon/Omanyte - dn SPRITE_HELIX, SPRITE_HELIX ;Omastar/Kabuto - dn SPRITE_HELIX, SPRITE_BIRD_M ;Kabutops/Aerodactyl - dn SPRITE_MON, SPRITE_BIRD_M ;Snorlax/Articuno - dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Zapdos/Moltres - dn SPRITE_SNAKE, SPRITE_SNAKE ;Dratini/Dragonair - dn SPRITE_SNAKE, SPRITE_MON ;Dragonite/Mewtwo - dn SPRITE_MON, 0 ;Mew/Padding +MonPartyData: + dn SPRITE_GRASS, SPRITE_GRASS ;Bulbasaur/Ivysaur + dn SPRITE_GRASS, SPRITE_MON ;Venusaur/Charmander + dn SPRITE_MON, SPRITE_MON ;Charmeleon/Charizard + dn SPRITE_WATER, SPRITE_WATER ;Squirtle/Wartortle + dn SPRITE_WATER, SPRITE_BUG ;Blastoise/Caterpie + dn SPRITE_BUG, SPRITE_BUG ;Metapod/Butterfree + dn SPRITE_BUG, SPRITE_BUG ;Weedle/Kakuna + dn SPRITE_BUG, SPRITE_BIRD_M ;Beedrill/Pidgey + dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Pidgeotto/Pidgeot + dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Rattata/Raticate + dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Spearow/Fearow + dn SPRITE_SNAKE, SPRITE_SNAKE ;Ekans/Arbok + dn SPRITE_FAIRY, SPRITE_FAIRY ;Pikachu/Raichu + dn SPRITE_MON, SPRITE_MON ;Sandshrew/Sandslash + dn SPRITE_MON, SPRITE_MON ;NidoranF/Nidorina + dn SPRITE_MON, SPRITE_MON ;Nidoqueen/NidoranM + dn SPRITE_MON, SPRITE_MON ;Nidorino/Nidoking + dn SPRITE_FAIRY, SPRITE_FAIRY ;Clefairy/Clefable + dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Vulpix/Ninetales + dn SPRITE_FAIRY, SPRITE_FAIRY ;Jigglypuff/Wigglytuff + dn SPRITE_MON, SPRITE_MON ;Zubat/Golbat + dn SPRITE_GRASS, SPRITE_GRASS ;Oddish/Gloom + dn SPRITE_GRASS, SPRITE_BUG ;Vileplume/Paras + dn SPRITE_BUG, SPRITE_BUG ;Parasect/Venonat + dn SPRITE_BUG, SPRITE_MON ;Venomoth/Diglett + dn SPRITE_MON, SPRITE_MON ;Dugtrio/Meowth + dn SPRITE_MON, SPRITE_MON ;Persian/Psyduck + dn SPRITE_MON, SPRITE_MON ;Golduck/Mankey + dn SPRITE_MON, SPRITE_QUADRUPED ;Primeape/Growlithe + dn SPRITE_QUADRUPED, SPRITE_MON ;Arcanine/Poliwag + dn SPRITE_MON, SPRITE_MON ;Poliwhirl/Poliwrath + dn SPRITE_MON, SPRITE_MON ;Abra/Kadabra + dn SPRITE_MON, SPRITE_MON ;Alakazam/Machop + dn SPRITE_MON, SPRITE_MON ;Machoke/Machamp + dn SPRITE_GRASS, SPRITE_GRASS ;Bellsprout/Weepinbell + dn SPRITE_GRASS, SPRITE_WATER ;Victreebel/Tentacool + dn SPRITE_WATER, SPRITE_MON ;Tentacruel/Geodude + dn SPRITE_MON, SPRITE_MON ;Graveler/Golem + dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Ponyta/Rapidash + dn SPRITE_QUADRUPED, SPRITE_MON ;Slowpoke/Slowbro + dn SPRITE_BALL_M, SPRITE_BALL_M ;Magnemite/Magneton + dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Farfetch'd/Doduo + dn SPRITE_BIRD_M, SPRITE_WATER ;Dodrio/Seel + dn SPRITE_WATER, SPRITE_MON ;Dewgong/Grimer + dn SPRITE_MON, SPRITE_HELIX ;Muk/Shellder + dn SPRITE_HELIX, SPRITE_MON ;Cloyster/Gastly + dn SPRITE_MON, SPRITE_MON ;Haunter/Gengar + dn SPRITE_SNAKE, SPRITE_MON ;Onix/Drowzee + dn SPRITE_MON, SPRITE_WATER ;Hypno/Krabby + dn SPRITE_WATER, SPRITE_BALL_M ;Kingler/Voltorb + dn SPRITE_BALL_M, SPRITE_GRASS ;Electrode/Exeggcute + dn SPRITE_GRASS, SPRITE_MON ;Exeggutor/Cubone + dn SPRITE_MON, SPRITE_MON ;Marowak/Hitmonlee + dn SPRITE_MON, SPRITE_MON ;Hitmonchan/Lickitung + dn SPRITE_MON, SPRITE_MON ;Koffing/Weezing + dn SPRITE_QUADRUPED, SPRITE_MON ;Rhyhorn/Rhydon + dn SPRITE_FAIRY, SPRITE_GRASS ;Chansey/Tangela + dn SPRITE_MON, SPRITE_WATER ;Kangaskhan/Horsea + dn SPRITE_WATER, SPRITE_WATER ;Seadra/Goldeen + dn SPRITE_WATER, SPRITE_HELIX ;Seaking/Staryu + dn SPRITE_HELIX, SPRITE_MON ;Starmie/Mr.Mime + dn SPRITE_BUG, SPRITE_MON ;Scyther/Jynx + dn SPRITE_MON, SPRITE_MON ;Electabuzz/Magmar + dn SPRITE_BUG, SPRITE_QUADRUPED ;Pinsir/Tauros + dn SPRITE_WATER, SPRITE_SNAKE ;Magikarp/Gyarados + dn SPRITE_WATER, SPRITE_MON ;Lapras/Ditto + dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Eevee/Vaporeon + dn SPRITE_QUADRUPED, SPRITE_QUADRUPED ;Jolteon/Flareon + dn SPRITE_MON, SPRITE_HELIX ;Porygon/Omanyte + dn SPRITE_HELIX, SPRITE_HELIX ;Omastar/Kabuto + dn SPRITE_HELIX, SPRITE_BIRD_M ;Kabutops/Aerodactyl + dn SPRITE_MON, SPRITE_BIRD_M ;Snorlax/Articuno + dn SPRITE_BIRD_M, SPRITE_BIRD_M ;Zapdos/Moltres + dn SPRITE_SNAKE, SPRITE_SNAKE ;Dratini/Dragonair + dn SPRITE_SNAKE, SPRITE_MON ;Dragonite/Mewtwo + dn SPRITE_MON, 0 ;Mew/Padding diff --git a/data/moves.asm b/data/moves.asm index 22165b7d..44859681 100755 --- a/data/moves.asm +++ b/data/moves.asm @@ -11,6 +11,7 @@ move: macro endm move POUND, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35 +MoveEnd: move KARATE_CHOP, NO_ADDITIONAL_EFFECT, 50, NORMAL, 100, 25 move DOUBLESLAP, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 10 move COMET_PUNCH, TWO_TO_FIVE_ATTACKS_EFFECT, 18, NORMAL, 85, 15 diff --git a/data/pokedex_entries.asm b/data/pokedex_entries.asm index 6f06d699..3fb2d3c6 100755 --- a/data/pokedex_entries.asm +++ b/data/pokedex_entries.asm @@ -1,4 +1,4 @@ -PokedexEntryPointers: ; 4047e (10:447e) +PokedexEntryPointers: dw RhydonDexEntry dw KangaskhanDexEntry dw NidoranMDexEntry @@ -195,1064 +195,1064 @@ PokedexEntryPointers: ; 4047e (10:447e) ; weight in pounds ; text entry -RhydonDexEntry: ; 405fa (10:45fa) +RhydonDexEntry: db "DRILL@" db 6,3 dw 2650 TX_FAR _RhydonDexEntry db "@" -KangaskhanDexEntry: ; 40609 (10:4609) +KangaskhanDexEntry: db "PARENT@" db 7,3 dw 1760 TX_FAR _KangaskhanDexEntry db "@" -NidoranMDexEntry: ; 40619 (10:4619) +NidoranMDexEntry: db "POISON PIN@" db 1,8 dw 200 TX_FAR _NidoranMDexEntry db "@" -ClefairyDexEntry: ; 4062d (10:462d) +ClefairyDexEntry: db "FAIRY@" db 2,0 dw 170 TX_FAR _ClefairyDexEntry db "@" -SpearowDexEntry: ; 4063c (10:463c) +SpearowDexEntry: db "TINY BIRD@" db 1,0 dw 40 TX_FAR _SpearowDexEntry db "@" -VoltorbDexEntry: ; 4064f (10:464f) +VoltorbDexEntry: db "BALL@" db 1,8 dw 230 TX_FAR _VoltorbDexEntry db "@" -NidokingDexEntry: ; 4065d (10:465d) +NidokingDexEntry: db "DRILL@" db 4,7 dw 1370 TX_FAR _NidokingDexEntry db "@" -SlowbroDexEntry: ; 4066c (10:466c) +SlowbroDexEntry: db "HERMITCRAB@" db 5,3 dw 1730 TX_FAR _SlowbroDexEntry db "@" -IvysaurDexEntry: ; 40680 (10:4680) +IvysaurDexEntry: db "SEED@" db 3,3 dw 290 TX_FAR _IvysaurDexEntry db "@" -ExeggutorDexEntry: ; 4068e (10:468e) +ExeggutorDexEntry: db "COCONUT@" db 6,7 dw 2650 TX_FAR _ExeggutorDexEntry db "@" -LickitungDexEntry: ; 4069f (10:469f) +LickitungDexEntry: db "LICKING@" db 3,11 dw 1440 TX_FAR _LickitungDexEntry db "@" -ExeggcuteDexEntry: ; 406b0 (10:46b0) +ExeggcuteDexEntry: db "EGG@" db 1,4 dw 60 TX_FAR _ExeggcuteDexEntry db "@" -GrimerDexEntry: ; 406bd (10:46bd) +GrimerDexEntry: db "SLUDGE@" db 2,11 dw 660 TX_FAR _GrimerDexEntry db "@" -GengarDexEntry: ; 406cd (10:46cd) +GengarDexEntry: db "SHADOW@" db 4,11 dw 890 TX_FAR _GengarDexEntry db "@" -NidoranFDexEntry: ; 406dd (10:46dd) +NidoranFDexEntry: db "POISON PIN@" db 1,4 dw 150 TX_FAR _NidoranFDexEntry db "@" -NidoqueenDexEntry: ; 406f1 (10:46f1) +NidoqueenDexEntry: db "DRILL@" db 4,3 dw 1320 TX_FAR _NidoqueenDexEntry db "@" -CuboneDexEntry: ; 40700 (10:4700) +CuboneDexEntry: db "LONELY@" db 1,4 dw 140 TX_FAR _CuboneDexEntry db "@" -RhyhornDexEntry: ; 40710 (10:4710) +RhyhornDexEntry: db "SPIKES@" db 3,3 dw 2540 TX_FAR _RhyhornDexEntry db "@" -LaprasDexEntry: ; 40720 (10:4720) +LaprasDexEntry: db "TRANSPORT@" db 8,2 dw 4850 TX_FAR _LaprasDexEntry db "@" -ArcanineDexEntry: ; 40733 (10:4733) +ArcanineDexEntry: db "LEGENDARY@" db 6,3 dw 3420 TX_FAR _ArcanineDexEntry db "@" -MewDexEntry: ; 40746 (10:4746) +MewDexEntry: db "NEW SPECIE@" db 1,4 dw 90 TX_FAR _MewDexEntry db "@" -GyaradosDexEntry: ; 4075a (10:475a) +GyaradosDexEntry: db "ATROCIOUS@" db 21,4 dw 5180 TX_FAR _GyaradosDexEntry db "@" -ShellderDexEntry: ; 4076d (10:476d) +ShellderDexEntry: db "BIVALVE@" db 1,0 dw 90 TX_FAR _ShellderDexEntry db "@" -TentacoolDexEntry: ; 4077e (10:477e) +TentacoolDexEntry: db "JELLYFISH@" db 2,11 dw 1000 TX_FAR _TentacoolDexEntry db "@" -GastlyDexEntry: ; 40791 (10:4791) +GastlyDexEntry: db "GAS@" db 4,3 dw 2 TX_FAR _GastlyDexEntry db "@" -ScytherDexEntry: ; 4079e (10:479e) +ScytherDexEntry: db "MANTIS@" db 4,11 dw 1230 TX_FAR _ScytherDexEntry db "@" -StaryuDexEntry: ; 407ae (10:47ae) +StaryuDexEntry: db "STARSHAPE@" db 2,7 dw 760 TX_FAR _StaryuDexEntry db "@" -BlastoiseDexEntry: ; 407c1 (10:47c1) +BlastoiseDexEntry: db "SHELLFISH@" db 5,3 dw 1890 TX_FAR _BlastoiseDexEntry db "@" -PinsirDexEntry: ; 407d4 (10:47d4) +PinsirDexEntry: db "STAGBEETLE@" db 4,11 dw 1210 TX_FAR _PinsirDexEntry db "@" -TangelaDexEntry: ; 407e8 (10:47e8) +TangelaDexEntry: db "VINE@" db 3,3 dw 770 TX_FAR _TangelaDexEntry db "@" -GrowlitheDexEntry: ; 407f6 (10:47f6) +GrowlitheDexEntry: db "PUPPY@" db 2,4 dw 420 TX_FAR _GrowlitheDexEntry db "@" -OnixDexEntry: ; 40805 (10:4805) +OnixDexEntry: db "ROCK SNAKE@" db 28,10 dw 4630 TX_FAR _OnixDexEntry db "@" -FearowDexEntry: ; 40819 (10:4819) +FearowDexEntry: db "BEAK@" db 3,11 dw 840 TX_FAR _FearowDexEntry db "@" -PidgeyDexEntry: ; 40827 (10:4827) +PidgeyDexEntry: db "TINY BIRD@" db 1,0 dw 40 TX_FAR _PidgeyDexEntry db "@" -SlowpokeDexEntry: ; 4083a (10:483a) +SlowpokeDexEntry: db "DOPEY@" db 3,11 dw 790 TX_FAR _SlowpokeDexEntry db "@" -KadabraDexEntry: ; 40849 (10:4849) +KadabraDexEntry: db "PSI@" db 4,3 dw 1250 TX_FAR _KadabraDexEntry db "@" -GravelerDexEntry: ; 40856 (10:4856) +GravelerDexEntry: db "ROCK@" db 3,3 dw 2320 TX_FAR _GravelerDexEntry db "@" -ChanseyDexEntry: ; 40864 (10:4864) +ChanseyDexEntry: db "EGG@" db 3,7 dw 760 TX_FAR _ChanseyDexEntry db "@" -MachokeDexEntry: ; 40871 (10:4871) +MachokeDexEntry: db "SUPERPOWER@" db 4,11 dw 1550 TX_FAR _MachokeDexEntry db "@" -MrMimeDexEntry: ; 40885 (10:4885) +MrMimeDexEntry: db "BARRIER@" db 4,3 dw 1200 TX_FAR _MrMimeDexEntry db "@" -HitmonleeDexEntry: ; 40896 (10:4896) +HitmonleeDexEntry: db "KICKING@" db 4,11 dw 1100 TX_FAR _HitmonleeDexEntry db "@" -HitmonchanDexEntry: ; 408a7 (10:48a7) +HitmonchanDexEntry: db "PUNCHING@" db 4,7 dw 1110 TX_FAR _HitmonchanDexEntry db "@" -ArbokDexEntry: ; 408b9 (10:48b9) +ArbokDexEntry: db "COBRA@" db 11,6 dw 1430 TX_FAR _ArbokDexEntry db "@" -ParasectDexEntry: ; 408c8 (10:48c8) +ParasectDexEntry: db "MUSHROOM@" db 3,3 dw 650 TX_FAR _ParasectDexEntry db "@" -PsyduckDexEntry: ; 408da (10:48da) +PsyduckDexEntry: db "DUCK@" db 2,7 dw 430 TX_FAR _PsyduckDexEntry db "@" -DrowzeeDexEntry: ; 408e8 (10:48e8) +DrowzeeDexEntry: db "HYPNOSIS@" db 3,3 dw 710 TX_FAR _DrowzeeDexEntry db "@" -GolemDexEntry: ; 408fa (10:48fa) +GolemDexEntry: db "MEGATON@" db 4,7 dw 6620 TX_FAR _GolemDexEntry db "@" -MagmarDexEntry: ; 4090b (10:490b) +MagmarDexEntry: db "SPITFIRE@" db 4,3 dw 980 TX_FAR _MagmarDexEntry db "@" -ElectabuzzDexEntry: ; 4091d (10:491d) +ElectabuzzDexEntry: db "ELECTRIC@" db 3,7 dw 660 TX_FAR _ElectabuzzDexEntry db "@" -MagnetonDexEntry: ; 4092f (10:492f) +MagnetonDexEntry: db "MAGNET@" db 3,3 dw 1320 TX_FAR _MagnetonDexEntry db "@" -KoffingDexEntry: ; 4093f (10:493f) +KoffingDexEntry: db "POISON GAS@" db 2,0 dw 20 TX_FAR _KoffingDexEntry db "@" -MankeyDexEntry: ; 40953 (10:4953) +MankeyDexEntry: db "PIG MONKEY@" db 1,8 dw 620 TX_FAR _MankeyDexEntry db "@" -SeelDexEntry: ; 40967 (10:4967) +SeelDexEntry: db "SEA LION@" db 3,7 dw 1980 TX_FAR _SeelDexEntry db "@" -DiglettDexEntry: ; 40979 (10:4979) +DiglettDexEntry: db "MOLE@" db 0,8 dw 20 TX_FAR _DiglettDexEntry db "@" -TaurosDexEntry: ; 40987 (10:4987) +TaurosDexEntry: db "WILD BULL@" db 4,7 dw 1950 TX_FAR _TaurosDexEntry db "@" -FarfetchdDexEntry: ; 4099a (10:499a) +FarfetchdDexEntry: db "WILD DUCK@" db 2,7 dw 330 TX_FAR _FarfetchdDexEntry db "@" -VenonatDexEntry: ; 409ad (10:49ad) +VenonatDexEntry: db "INSECT@" db 3,3 dw 660 TX_FAR _VenonatDexEntry db "@" -DragoniteDexEntry: ; 409bd (10:49bd) +DragoniteDexEntry: db "DRAGON@" db 7,3 dw 4630 TX_FAR _DragoniteDexEntry db "@" -DoduoDexEntry: ; 409cd (10:49cd) +DoduoDexEntry: db "TWIN BIRD@" db 4,7 dw 860 TX_FAR _DoduoDexEntry db "@" -PoliwagDexEntry: ; 409e0 (10:49e0) +PoliwagDexEntry: db "TADPOLE@" db 2,0 dw 270 TX_FAR _PoliwagDexEntry db "@" -JynxDexEntry: ; 409f1 (10:49f1) +JynxDexEntry: db "HUMANSHAPE@" db 4,7 dw 900 TX_FAR _JynxDexEntry db "@" -MoltresDexEntry: ; 40a05 (10:4a05) +MoltresDexEntry: db "FLAME@" db 6,7 dw 1320 TX_FAR _MoltresDexEntry db "@" -ArticunoDexEntry: ; 40a14 (10:4a14) +ArticunoDexEntry: db "FREEZE@" db 5,7 dw 1220 TX_FAR _ArticunoDexEntry db "@" -ZapdosDexEntry: ; 40a24 (10:4a24) +ZapdosDexEntry: db "ELECTRIC@" db 5,3 dw 1160 TX_FAR _ZapdosDexEntry db "@" -DittoDexEntry: ; 40a36 (10:4a36) +DittoDexEntry: db "TRANSFORM@" db 1,0 dw 90 TX_FAR _DittoDexEntry db "@" -MeowthDexEntry: ; 40a49 (10:4a49) +MeowthDexEntry: db "SCRATCHCAT@" db 1,4 dw 90 TX_FAR _MeowthDexEntry db "@" -KrabbyDexEntry: ; 40a5d (10:4a5d) +KrabbyDexEntry: db "RIVER CRAB@" db 1,4 dw 140 TX_FAR _KrabbyDexEntry db "@" -VulpixDexEntry: ; 40a71 (10:4a71) +VulpixDexEntry: db "FOX@" db 2,0 dw 220 TX_FAR _VulpixDexEntry db "@" -NinetalesDexEntry: ; 40a7e (10:4a7e) +NinetalesDexEntry: db "FOX@" db 3,7 dw 440 TX_FAR _NinetalesDexEntry db "@" -PikachuDexEntry: ; 40a8b (10:4a8b) +PikachuDexEntry: db "MOUSE@" db 1,4 dw 130 TX_FAR _PikachuDexEntry db "@" -RaichuDexEntry: ; 40a9a (10:4a9a) +RaichuDexEntry: db "MOUSE@" db 2,7 dw 660 TX_FAR _RaichuDexEntry db "@" -DratiniDexEntry: ; 40aa9 (10:4aa9) +DratiniDexEntry: db "DRAGON@" db 5,11 dw 70 TX_FAR _DratiniDexEntry db "@" -DragonairDexEntry: ; 40ab9 (10:4ab9) +DragonairDexEntry: db "DRAGON@" db 13,1 dw 360 TX_FAR _DragonairDexEntry db "@" -KabutoDexEntry: ; 40ac9 (10:4ac9) +KabutoDexEntry: db "SHELLFISH@" db 1,8 dw 250 TX_FAR _KabutoDexEntry db "@" -KabutopsDexEntry: ; 40adc (10:4adc) +KabutopsDexEntry: db "SHELLFISH@" db 4,3 dw 890 TX_FAR _KabutopsDexEntry db "@" -HorseaDexEntry: ; 40aef (10:4aef) +HorseaDexEntry: db "DRAGON@" db 1,4 dw 180 TX_FAR _HorseaDexEntry db "@" -SeadraDexEntry: ; 40aff (10:4aff) +SeadraDexEntry: db "DRAGON@" db 3,11 dw 550 TX_FAR _SeadraDexEntry db "@" -SandshrewDexEntry: ; 40b0f (10:4b0f) +SandshrewDexEntry: db "MOUSE@" db 2,0 dw 260 TX_FAR _SandshrewDexEntry db "@" -SandslashDexEntry: ; 40b1e (10:4b1e) +SandslashDexEntry: db "MOUSE@" db 3,3 dw 650 TX_FAR _SandslashDexEntry db "@" -OmanyteDexEntry: ; 40b2d (10:4b2d) +OmanyteDexEntry: db "SPIRAL@" db 1,4 dw 170 TX_FAR _OmanyteDexEntry db "@" -OmastarDexEntry: ; 40b3d (10:4b3d) +OmastarDexEntry: db "SPIRAL@" db 3,3 dw 770 TX_FAR _OmastarDexEntry db "@" -JigglypuffDexEntry: ; 40b4d (10:4b4d) +JigglypuffDexEntry: db "BALLOON@" db 1,8 dw 120 TX_FAR _JigglypuffDexEntry db "@" -WigglytuffDexEntry: ; 40b5e (10:4b5e) +WigglytuffDexEntry: db "BALLOON@" db 3,3 dw 260 TX_FAR _WigglytuffDexEntry db "@" -EeveeDexEntry: ; 40b6f (10:4b6f) +EeveeDexEntry: db "EVOLUTION@" db 1,0 dw 140 TX_FAR _EeveeDexEntry db "@" -FlareonDexEntry: ; 40b82 (10:4b82) +FlareonDexEntry: db "FLAME@" db 2,11 dw 550 TX_FAR _FlareonDexEntry db "@" -JolteonDexEntry: ; 40b91 (10:4b91) +JolteonDexEntry: db "LIGHTNING@" db 2,7 dw 540 TX_FAR _JolteonDexEntry db "@" -VaporeonDexEntry: ; 40ba4 (10:4ba4) +VaporeonDexEntry: db "BUBBLE JET@" db 3,3 dw 640 TX_FAR _VaporeonDexEntry db "@" -MachopDexEntry: ; 40bb8 (10:4bb8) +MachopDexEntry: db "SUPERPOWER@" db 2,7 dw 430 TX_FAR _MachopDexEntry db "@" -ZubatDexEntry: ; 40bcc (10:4bcc) +ZubatDexEntry: db "BAT@" db 2,7 dw 170 TX_FAR _ZubatDexEntry db "@" -EkansDexEntry: ; 40bd9 (10:4bd9) +EkansDexEntry: db "SNAKE@" db 6,7 dw 150 TX_FAR _EkansDexEntry db "@" -ParasDexEntry: ; 40be8 (10:4be8) +ParasDexEntry: db "MUSHROOM@" db 1,0 dw 120 TX_FAR _ParasDexEntry db "@" -PoliwhirlDexEntry: ; 40bfa (10:4bfa) +PoliwhirlDexEntry: db "TADPOLE@" db 3,3 dw 440 TX_FAR _PoliwhirlDexEntry db "@" -PoliwrathDexEntry: ; 40c0b (10:4c0b) +PoliwrathDexEntry: db "TADPOLE@" db 4,3 dw 1190 TX_FAR _PoliwrathDexEntry db "@" -WeedleDexEntry: ; 40c1c (10:4c1c) +WeedleDexEntry: db "HAIRY BUG@" db 1,0 dw 70 TX_FAR _WeedleDexEntry db "@" -KakunaDexEntry: ; 40c2f (10:4c2f) +KakunaDexEntry: db "COCOON@" db 2,0 dw 220 TX_FAR _KakunaDexEntry db "@" -BeedrillDexEntry: ; 40c3f (10:4c3f) +BeedrillDexEntry: db "POISON BEE@" db 3,3 dw 650 TX_FAR _BeedrillDexEntry db "@" -DodrioDexEntry: ; 40c53 (10:4c53) +DodrioDexEntry: db "TRIPLEBIRD@" db 5,11 dw 1880 TX_FAR _DodrioDexEntry db "@" -PrimeapeDexEntry: ; 40c67 (10:4c67) +PrimeapeDexEntry: db "PIG MONKEY@" db 3,3 dw 710 TX_FAR _PrimeapeDexEntry db "@" -DugtrioDexEntry: ; 40c7b (10:4c7b) +DugtrioDexEntry: db "MOLE@" db 2,4 dw 730 TX_FAR _DugtrioDexEntry db "@" -VenomothDexEntry: ; 40c89 (10:4c89) +VenomothDexEntry: db "POISONMOTH@" db 4,11 dw 280 TX_FAR _VenomothDexEntry db "@" -DewgongDexEntry: ; 40c9d (10:4c9d) +DewgongDexEntry: db "SEA LION@" db 5,7 dw 2650 TX_FAR _DewgongDexEntry db "@" -CaterpieDexEntry: ; 40caf (10:4caf) +CaterpieDexEntry: db "WORM@" db 1,0 dw 60 TX_FAR _CaterpieDexEntry db "@" -MetapodDexEntry: ; 40cbd (10:4cbd) +MetapodDexEntry: db "COCOON@" db 2,4 dw 220 TX_FAR _MetapodDexEntry db "@" -ButterfreeDexEntry: ; 40ccd (10:4ccd) +ButterfreeDexEntry: db "BUTTERFLY@" db 3,7 dw 710 TX_FAR _ButterfreeDexEntry db "@" -MachampDexEntry: ; 40ce0 (10:4ce0) +MachampDexEntry: db "SUPERPOWER@" db 5,3 dw 2870 TX_FAR _MachampDexEntry db "@" -GolduckDexEntry: ; 40cf4 (10:4cf4) +GolduckDexEntry: db "DUCK@" db 5,7 dw 1690 TX_FAR _GolduckDexEntry db "@" -HypnoDexEntry: ; 40d02 (10:4d02) +HypnoDexEntry: db "HYPNOSIS@" db 5,3 dw 1670 TX_FAR _HypnoDexEntry db "@" -GolbatDexEntry: ; 40d14 (10:4d14) +GolbatDexEntry: db "BAT@" db 5,3 dw 1210 TX_FAR _GolbatDexEntry db "@" -MewtwoDexEntry: ; 40d21 (10:4d21) +MewtwoDexEntry: db "GENETIC@" db 6,7 dw 2690 TX_FAR _MewtwoDexEntry db "@" -SnorlaxDexEntry: ; 40d32 (10:4d32) +SnorlaxDexEntry: db "SLEEPING@" db 6,11 dw 10140 TX_FAR _SnorlaxDexEntry db "@" -MagikarpDexEntry: ; 40d44 (10:4d44) +MagikarpDexEntry: db "FISH@" db 2,11 dw 220 TX_FAR _MagikarpDexEntry db "@" -MukDexEntry: ; 40d52 (10:4d52) +MukDexEntry: db "SLUDGE@" db 3,11 dw 660 TX_FAR _MukDexEntry db "@" -KinglerDexEntry: ; 40d62 (10:4d62) +KinglerDexEntry: db "PINCER@" db 4,3 dw 1320 TX_FAR _KinglerDexEntry db "@" -CloysterDexEntry: ; 40d72 (10:4d72) +CloysterDexEntry: db "BIVALVE@" db 4,11 dw 2920 TX_FAR _CloysterDexEntry db "@" -ElectrodeDexEntry: ; 40d83 (10:4d83) +ElectrodeDexEntry: db "BALL@" db 3,11 dw 1470 TX_FAR _ElectrodeDexEntry db "@" -ClefableDexEntry: ; 40d91 (10:4d91) +ClefableDexEntry: db "FAIRY@" db 4,3 dw 880 TX_FAR _ClefableDexEntry db "@" -WeezingDexEntry: ; 40da0 (10:4da0) +WeezingDexEntry: db "POISON GAS@" db 3,11 dw 210 TX_FAR _WeezingDexEntry db "@" -PersianDexEntry: ; 40db4 (10:4db4) +PersianDexEntry: db "CLASSY CAT@" db 3,3 dw 710 TX_FAR _PersianDexEntry db "@" -MarowakDexEntry: ; 40dc8 (10:4dc8) +MarowakDexEntry: db "BONEKEEPER@" db 3,3 dw 990 TX_FAR _MarowakDexEntry db "@" -HaunterDexEntry: ; 40ddc (10:4ddc) +HaunterDexEntry: db "GAS@" db 5,3 dw 2 TX_FAR _HaunterDexEntry db "@" -AbraDexEntry: ; 40de9 (10:4de9) +AbraDexEntry: db "PSI@" db 2,11 dw 430 TX_FAR _AbraDexEntry db "@" -AlakazamDexEntry: ; 40df6 (10:4df6) +AlakazamDexEntry: db "PSI@" db 4,11 dw 1060 TX_FAR _AlakazamDexEntry db "@" -PidgeottoDexEntry: ; 40e03 (10:4e03) +PidgeottoDexEntry: db "BIRD@" db 3,7 dw 660 TX_FAR _PidgeottoDexEntry db "@" -PidgeotDexEntry: ; 40e11 (10:4e11) +PidgeotDexEntry: db "BIRD@" db 4,11 dw 870 TX_FAR _PidgeotDexEntry db "@" -StarmieDexEntry: ; 40e1f (10:4e1f) +StarmieDexEntry: db "MYSTERIOUS@" db 3,7 dw 1760 TX_FAR _StarmieDexEntry db "@" -BulbasaurDexEntry: ; 40e33 (10:4e33) +BulbasaurDexEntry: db "SEED@" db 2,4 dw 150 TX_FAR _BulbasaurDexEntry db "@" -VenusaurDexEntry: ; 40e41 (10:4e41) +VenusaurDexEntry: db "SEED@" db 6,7 dw 2210 TX_FAR _VenusaurDexEntry db "@" -TentacruelDexEntry: ; 40e4f (10:4e4f) +TentacruelDexEntry: db "JELLYFISH@" db 5,3 dw 1210 TX_FAR _TentacruelDexEntry db "@" -GoldeenDexEntry: ; 40e62 (10:4e62) +GoldeenDexEntry: db "GOLDFISH@" db 2,0 dw 330 TX_FAR _GoldeenDexEntry db "@" -SeakingDexEntry: ; 40e74 (10:4e74) +SeakingDexEntry: db "GOLDFISH@" db 4,3 dw 860 TX_FAR _SeakingDexEntry db "@" -PonytaDexEntry: ; 40e86 (10:4e86) +PonytaDexEntry: db "FIRE HORSE@" db 3,3 dw 660 TX_FAR _PonytaDexEntry db "@" -RapidashDexEntry: ; 40e9a (10:4e9a) +RapidashDexEntry: db "FIRE HORSE@" db 5,7 dw 2090 TX_FAR _RapidashDexEntry db "@" -RattataDexEntry: ; 40eae (10:4eae) +RattataDexEntry: db "RAT@" db 1,0 dw 80 TX_FAR _RattataDexEntry db "@" -RaticateDexEntry: ; 40ebb (10:4ebb) +RaticateDexEntry: db "RAT@" db 2,4 dw 410 TX_FAR _RaticateDexEntry db "@" -NidorinoDexEntry: ; 40ec8 (10:4ec8) +NidorinoDexEntry: db "POISON PIN@" db 2,11 dw 430 TX_FAR _NidorinoDexEntry db "@" -NidorinaDexEntry: ; 40edc (10:4edc) +NidorinaDexEntry: db "POISON PIN@" db 2,7 dw 440 TX_FAR _NidorinaDexEntry db "@" -GeodudeDexEntry: ; 40ef0 (10:4ef0) +GeodudeDexEntry: db "ROCK@" db 1,4 dw 440 TX_FAR _GeodudeDexEntry db "@" -PorygonDexEntry: ; 40efe (10:4efe) +PorygonDexEntry: db "VIRTUAL@" db 2,7 dw 800 TX_FAR _PorygonDexEntry db "@" -AerodactylDexEntry: ; 40f0f (10:4f0f) +AerodactylDexEntry: db "FOSSIL@" db 5,11 dw 1300 TX_FAR _AerodactylDexEntry db "@" -MagnemiteDexEntry: ; 40f1f (10:4f1f) +MagnemiteDexEntry: db "MAGNET@" db 1,0 dw 130 TX_FAR _MagnemiteDexEntry db "@" -CharmanderDexEntry: ; 40f2f (10:4f2f) +CharmanderDexEntry: db "LIZARD@" db 2,0 dw 190 TX_FAR _CharmanderDexEntry db "@" -SquirtleDexEntry: ; 40f3f (10:4f3f) +SquirtleDexEntry: db "TINYTURTLE@" db 1,8 dw 200 TX_FAR _SquirtleDexEntry db "@" -CharmeleonDexEntry: ; 40f53 (10:4f53) +CharmeleonDexEntry: db "FLAME@" db 3,7 dw 420 TX_FAR _CharmeleonDexEntry db "@" -WartortleDexEntry: ; 40f62 (10:4f62) +WartortleDexEntry: db "TURTLE@" db 3,3 dw 500 TX_FAR _WartortleDexEntry db "@" -CharizardDexEntry: ; 40f72 (10:4f72) +CharizardDexEntry: db "FLAME@" db 5,7 dw 2000 TX_FAR _CharizardDexEntry db "@" -OddishDexEntry: ; 40f81 (10:4f81) +OddishDexEntry: db "WEED@" db 1,8 dw 120 TX_FAR _OddishDexEntry db "@" -GloomDexEntry: ; 40f8f (10:4f8f) +GloomDexEntry: db "WEED@" db 2,7 dw 190 TX_FAR _GloomDexEntry db "@" -VileplumeDexEntry: ; 40f9d (10:4f9d) +VileplumeDexEntry: db "FLOWER@" db 3,11 dw 410 TX_FAR _VileplumeDexEntry db "@" -BellsproutDexEntry: ; 40fad (10:4fad) +BellsproutDexEntry: db "FLOWER@" db 2,4 dw 90 TX_FAR _BellsproutDexEntry db "@" -WeepinbellDexEntry: ; 40fbd (10:4fbd) +WeepinbellDexEntry: db "FLYCATCHER@" db 3,3 dw 140 TX_FAR _WeepinbellDexEntry db "@" -VictreebelDexEntry: ; 40fd1 (10:4fd1) +VictreebelDexEntry: db "FLYCATCHER@" db 5,7 dw 340 TX_FAR _VictreebelDexEntry db "@" -MissingNoDexEntry: ; 40fe5 (10:4fe5) +MissingNoDexEntry: db "???@" db 10 ; 1.0 m db 100 ; 10.0 kg diff --git a/data/pokedex_order.asm b/data/pokedex_order.asm index 46a1717a..0e293946 100755 --- a/data/pokedex_order.asm +++ b/data/pokedex_order.asm @@ -1,4 +1,4 @@ -PokedexOrder: ; 41024 (10:5024) +PokedexOrder: db DEX_RHYDON db DEX_KANGASKHAN db DEX_NIDORAN_M @@ -62,7 +62,7 @@ PokedexOrder: ; 41024 (10:5024) db 0 ; MISSINGNO. db 0 ; MISSINGNO. db 0 ; MISSINGNO. - db DEX_FARFETCH_D + db DEX_FARFETCHD db DEX_VENONAT db DEX_DRAGONITE db 0 ; MISSINGNO. diff --git a/data/prize_mon_levels.asm b/data/prize_mon_levels.asm index 1437649c..bffa4440 100755 --- a/data/prize_mon_levels.asm +++ b/data/prize_mon_levels.asm @@ -1,4 +1,4 @@ -PrizeMonLevelDictionary: ; 5298a (14:698a) +PrizeMonLevelDictionary: IF DEF(_RED) db ABRA,9 db CLEFAIRY,8 diff --git a/data/prizes.asm b/data/prizes.asm index 3d4102b6..1120c0d0 100755 --- a/data/prizes.asm +++ b/data/prizes.asm @@ -1,4 +1,4 @@ -PrizeDifferentMenuPtrs: ; 52843 (14:6843) +PrizeDifferentMenuPtrs: dw PrizeMenuMon1Entries dw PrizeMenuMon1Cost @@ -8,10 +8,10 @@ PrizeDifferentMenuPtrs: ; 52843 (14:6843) dw PrizeMenuTMsEntries dw PrizeMenuTMsCost -NoThanksText: ; 5284f (14:684f) +NoThanksText: db "NO THANKS@" -PrizeMenuMon1Entries: ; 52859 (14:6859) +PrizeMenuMon1Entries: db ABRA db CLEFAIRY IF DEF(_RED) @@ -22,7 +22,7 @@ IF DEF(_BLUE) ENDC db "@" -PrizeMenuMon1Cost: ; 5285d (14:685d) +PrizeMenuMon1Cost: IF DEF(_RED) coins 180 coins 500 @@ -34,7 +34,7 @@ ENDC coins 1200 db "@" -PrizeMenuMon2Entries: ; 52864 (14:6864) +PrizeMenuMon2Entries: IF DEF(_RED) db DRATINI db SCYTHER @@ -46,7 +46,7 @@ ENDC db PORYGON db "@" -PrizeMenuMon2Cost: ; 52868 (14:6868) +PrizeMenuMon2Cost: IF DEF(_RED) coins 2800 coins 5500 @@ -59,13 +59,13 @@ IF DEF(_BLUE) ENDC db "@" -PrizeMenuTMsEntries: ; 5286f (14:686f) +PrizeMenuTMsEntries: db TM_23 db TM_15 db TM_50 db "@" -PrizeMenuTMsCost: ; 52873 (14:6873) +PrizeMenuTMsCost: coins 3300 coins 5500 coins 7700 diff --git a/data/sgb_border.asm b/data/sgb_border.asm index e1da84ac..c2afc193 100755 --- a/data/sgb_border.asm +++ b/data/sgb_border.asm @@ -1,4 +1,4 @@ -BorderPalettes: ; 72788 (1c:6788) +BorderPalettes: IF DEF(_RED) INCBIN "gfx/red/sgbborder.map" ENDC @@ -53,7 +53,7 @@ ENDC ds $18 -SGBBorderGraphics: ; 72fe8 (1c:6fe8) +SGBBorderGraphics: IF DEF(_RED) INCBIN "gfx/red/sgbborder.2bpp" ENDC diff --git a/data/sgb_packets.asm b/data/sgb_packets.asm index 3e5e3f0b..cae91883 100755 --- a/data/sgb_packets.asm +++ b/data/sgb_packets.asm @@ -51,20 +51,20 @@ DATA_SND: MACRO db \3 ; length (1-11) ENDM -BlkPacket_WholeScreen: ; 7219e (1c:619e) +BlkPacket_WholeScreen: ATTR_BLK 1 ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,17 ds 8 db $03,$00,$00,$13,$11,$00,$00 -BlkPacket_Battle: ; 721b5 (1c:61b5) +BlkPacket_Battle: ATTR_BLK 5 - ATTR_BLK_DATA %111, 2,2,0, 00,12, 19,17 - ATTR_BLK_DATA %011, 1,1,0, 01,00, 10,03 - ATTR_BLK_DATA %011, 0,0,0, 10,07, 19,10 - ATTR_BLK_DATA %011, 2,2,0, 00,04, 08,11 - ATTR_BLK_DATA %011, 3,3,0, 11,00, 19,06 + ATTR_BLK_DATA %111, 2,2,0, 00,12, 19,17 ; message box: pal 2 + ATTR_BLK_DATA %011, 1,1,0, 01,00, 10,03 ; enemy HP bar: pal 1 + ATTR_BLK_DATA %011, 0,0,0, 10,07, 19,10 ; player HP bar: pal 0 + ATTR_BLK_DATA %011, 2,2,0, 00,04, 08,11 ; player mon: pal 2 + ATTR_BLK_DATA %011, 3,3,0, 11,00, 19,06 ; enemy mon : pal 3 db $03,$00,$00,$13,$0b,$00 db $03,$00,$0c,$13,$11,$02 @@ -74,9 +74,9 @@ BlkPacket_Battle: ; 721b5 (1c:61b5) db $03,$0b,$00,$13,$07,$03 db $00 -BlkPacket_StatusScreen: ; 721fa (1c:61fa) +BlkPacket_StatusScreen: ATTR_BLK 1 - ATTR_BLK_DATA %111, 1,1,0, 01,00, 07,06 + ATTR_BLK_DATA %111, 1,1,0, 01,00, 07,06 ; mon: pal 1, HP bar: pal 0 ds 8 db $02,$00,$00,$11,$00,$03 @@ -84,9 +84,9 @@ BlkPacket_StatusScreen: ; 721fa (1c:61fa) db $01,$07,$13,$11,$00,$03 db $08,$00,$13,$06,$00,$00 -BlkPacket_Pokedex: ; 72222 (1c:6222) +BlkPacket_Pokedex: ATTR_BLK 1 - ATTR_BLK_DATA %111, 1,1,0, 01,01, 08,08 + ATTR_BLK_DATA %111, 1,1,0, 01,01, 08,08 ; mon: pal 1, everything else: pal 0 ds 8 db $02,$00,$00,$11,$00,$01 @@ -95,13 +95,13 @@ BlkPacket_Pokedex: ; 72222 (1c:6222) db $09,$08,$11,$00,$03,$09 db $01,$13,$11,$00,$00 -BlkPacket_Slots: ; 7224f (1c:624f) +BlkPacket_Slots: ATTR_BLK 5 - ATTR_BLK_DATA %011, 1,1,0, 00,00, 19,11 - ATTR_BLK_DATA %011, 2,2,0, 00,04, 19,09 - ATTR_BLK_DATA %010, 3,3,0, 00,06, 19,07 - ATTR_BLK_DATA %011, 0,0,0, 04,04, 15,09 - ATTR_BLK_DATA %011, 0,0,0, 00,12, 19,17 + ATTR_BLK_DATA %011, 1,1,0, 00,00, 19,11 ; "3" rows and top of screen: pal 1 + ATTR_BLK_DATA %011, 2,2,0, 00,04, 19,09 ; "2" rows: pal 2 + ATTR_BLK_DATA %010, 3,3,0, 00,06, 19,07 ; "1" row: pal 3 + ATTR_BLK_DATA %011, 0,0,0, 04,04, 15,09 ; slot reels: pal 0 + ATTR_BLK_DATA %011, 0,0,0, 00,12, 19,17 ; message box: pal 0 db $03,$00,$00,$13,$0b,$01 db $03,$00,$04,$13,$09,$02 @@ -110,11 +110,11 @@ BlkPacket_Slots: ; 7224f (1c:624f) db $03,$00,$0c,$13,$11,$00 db $00 -BlkPacket_Titlescreen: ; 7228e (1c:628e) +BlkPacket_Titlescreen: ATTR_BLK 3 - ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,07 - ATTR_BLK_DATA %010, 1,1,0, 00,08, 19,09 - ATTR_BLK_DATA %011, 2,2,0, 00,10, 19,17 + ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,07 ; pokemon logo: pal 0 + ATTR_BLK_DATA %010, 1,1,0, 00,08, 19,09 ; version text: pal 1 + ATTR_BLK_DATA %011, 2,2,0, 00,10, 19,17 ; player, mon, copyright text: pal 2 ds 12 db $03,$00,$00,$13,$07,$00 @@ -122,11 +122,11 @@ BlkPacket_Titlescreen: ; 7228e (1c:628e) db $03,$00,$0a,$13,$11,$02 db $00 -BlkPacket_NidorinoIntro: ; 722c1 (1c:62c1) +BlkPacket_NidorinoIntro: ATTR_BLK 3 - ATTR_BLK_DATA %011, 1,1,0, 00,00, 19,03 - ATTR_BLK_DATA %011, 0,0,0, 00,04, 19,13 - ATTR_BLK_DATA %011, 1,1,0, 00,14, 19,17 + ATTR_BLK_DATA %011, 1,1,0, 00,00, 19,03 ; upper black bar: pal 1 + ATTR_BLK_DATA %011, 0,0,0, 00,04, 19,13 ; letterbox: pal 0 + ATTR_BLK_DATA %011, 1,1,0, 00,14, 19,17 ; lower black bar: pal 1 ds 12 db $03,$00,$00,$13,$03,$01 @@ -134,15 +134,15 @@ BlkPacket_NidorinoIntro: ; 722c1 (1c:62c1) db $03,$00,$0e,$13,$11,$01 db $00 -BlkPacket_PartyMenu: ; 722f4 (1c:62f4) +BlkPacket_PartyMenu: ATTR_BLK 7 - ATTR_BLK_DATA %110, 0,0,1, 01,00, 02,12 - ATTR_BLK_DATA %010, 0,0,0, 05,01, 11,01 - ATTR_BLK_DATA %010, 0,0,0, 05,03, 11,03 - ATTR_BLK_DATA %010, 0,0,0, 05,05, 11,05 - ATTR_BLK_DATA %010, 0,0,0, 05,07, 11,07 - ATTR_BLK_DATA %010, 0,0,0, 05,09, 11,09 - ATTR_BLK_DATA %010, 0,0,0, 05,11, 11,11 + ATTR_BLK_DATA %110, 0,0,1, 01,00, 02,12 ; mon sprites: pal 0, everything else: pal 1 + ATTR_BLK_DATA %010, 0,0,0, 05,01, 11,01 ; HP bar 0: pal set dynamically + ATTR_BLK_DATA %010, 0,0,0, 05,03, 11,03 ; HP bar 1: pal set dynamically + ATTR_BLK_DATA %010, 0,0,0, 05,05, 11,05 ; HP bar 2: pal set dynamically + ATTR_BLK_DATA %010, 0,0,0, 05,07, 11,07 ; HP bar 3: pal set dynamically + ATTR_BLK_DATA %010, 0,0,0, 05,09, 11,09 ; HP bar 4: pal set dynamically + ATTR_BLK_DATA %010, 0,0,0, 05,11, 11,11 ; HP bar 5: pal set dynamically ds 4 db $02,$00,$00,$11,$01,$03 @@ -156,18 +156,18 @@ BlkPacket_PartyMenu: ; 722f4 (1c:62f4) db $0c,$08,$12,$09,$00,$03 db $0c,$0a,$12,$0b,$00,$00 -BlkPacket_TrainerCard: ; 72360 (1c:6360) +BlkPacket_TrainerCard: ATTR_BLK 10 - ATTR_BLK_DATA %010, 0,0,0, 03,12, 04,13 - ATTR_BLK_DATA %010, 1,1,0, 07,12, 08,13 - ATTR_BLK_DATA %010, 3,3,0, 11,12, 12,13 - ATTR_BLK_DATA %010, 2,2,0, 16,11, 17,12 - ATTR_BLK_DATA %010, 1,1,0, 14,13, 15,14 - ATTR_BLK_DATA %010, 3,3,0, 16,13, 17,14 - ATTR_BLK_DATA %010, 2,2,0, 03,15, 04,16 - ATTR_BLK_DATA %010, 3,3,0, 07,15, 08,16 - ATTR_BLK_DATA %010, 2,2,0, 11,15, 12,16 - ATTR_BLK_DATA %010, 1,1,0, 15,15, 16,16 + ATTR_BLK_DATA %010, 0,0,0, 03,12, 04,13 ; Boulder Badge + ATTR_BLK_DATA %010, 1,1,0, 07,12, 08,13 ; Cascade Badge + ATTR_BLK_DATA %010, 3,3,0, 11,12, 12,13 ; Thunder Badge + ATTR_BLK_DATA %010, 2,2,0, 16,11, 17,12 ; Rainbow Badge + ATTR_BLK_DATA %010, 1,1,0, 14,13, 15,14 ; Rainbow Badge + ATTR_BLK_DATA %010, 3,3,0, 16,13, 17,14 ; Rainbow Badge + ATTR_BLK_DATA %010, 2,2,0, 03,15, 04,16 ; Soul Badge + ATTR_BLK_DATA %010, 3,3,0, 07,15, 08,16 ; Marsh Badge + ATTR_BLK_DATA %010, 2,2,0, 11,15, 12,16 ; Volcano Badge + ATTR_BLK_DATA %010, 1,1,0, 15,15, 16,16 ; Earth Badge ds 2 db $03,$03,$0c,$04,$0d,$00 @@ -182,11 +182,11 @@ BlkPacket_TrainerCard: ; 72360 (1c:6360) db $03,$0f,$0f,$10,$10,$01 db $00 -BlkPacket_GameFreakIntro: ; 723dd (1c:63dd) +BlkPacket_GameFreakIntro: ATTR_BLK 3 - ATTR_BLK_DATA %111, 1,1,0, 05,11, 07,13 - ATTR_BLK_DATA %010, 2,2,0, 08,11, 09,13 - ATTR_BLK_DATA %011, 3,3,0, 12,11, 14,13 + ATTR_BLK_DATA %111, 1,1,0, 05,11, 07,13 ; falling stars (left): pal 1, GameFreak logo: pal 0 + ATTR_BLK_DATA %010, 2,2,0, 08,11, 09,13 ; falling stars (middle): pal 2 + ATTR_BLK_DATA %011, 3,3,0, 12,11, 14,13 ; falling stars (right): pal 3 ds 12 db $03,$00,$00,$13,$0a,$00 diff --git a/data/slot_machine_wheels.asm b/data/slot_machine_wheels.asm index 8f300152..88a89822 100755 --- a/data/slot_machine_wheels.asm +++ b/data/slot_machine_wheels.asm @@ -1,4 +1,4 @@ -SlotMachineWheel1: ; 379e5 (d:79e5) +SlotMachineWheel1: dw SLOTS7 dw SLOTSMOUSE dw SLOTSFISH @@ -18,7 +18,7 @@ SlotMachineWheel1: ; 379e5 (d:79e5) dw SLOTSMOUSE dw SLOTSFISH -SlotMachineWheel2: ; 37a09 (d:7a09) +SlotMachineWheel2: dw SLOTS7 dw SLOTSFISH dw SLOTSCHERRY @@ -38,7 +38,7 @@ SlotMachineWheel2: ; 37a09 (d:7a09) dw SLOTSFISH dw SLOTSCHERRY -SlotMachineWheel3: ; 37a2d (d:7a2d) +SlotMachineWheel3: dw SLOTS7 dw SLOTSBIRD dw SLOTSFISH diff --git a/data/special_warps.asm b/data/special_warps.asm index 480bac89..27837109 100755 --- a/data/special_warps.asm +++ b/data/special_warps.asm @@ -1,7 +1,7 @@ ; Format: (size 2 bytes) ; 00: target map ID ; 01: which dungeon warp in the source map was used -DungeonWarpList: ; 63bf (1:63bf) +DungeonWarpList: db SEAFOAM_ISLANDS_2,$01 db SEAFOAM_ISLANDS_2,$02 db SEAFOAM_ISLANDS_3,$01 @@ -16,7 +16,7 @@ DungeonWarpList: ; 63bf (1:63bf) db MANSION_2,$03 db $FF -DungeonWarpData: ; 63d8 (1:63d8) +DungeonWarpData: FLYWARP_DATA SEAFOAM_ISLANDS_2_WIDTH,7,18 FLYWARP_DATA SEAFOAM_ISLANDS_2_WIDTH,7,23 FLYWARP_DATA SEAFOAM_ISLANDS_3_WIDTH,7,19 @@ -34,32 +34,32 @@ DungeonWarpData: ; 63d8 (1:63d8) ; db Map_id ; FLYWARP_DATA [Map Width][Y-pos][X-pos] ; db Tileset_id -FirstMapSpec: ; 6420 (1:6420) +FirstMapSpec: db REDS_HOUSE_2F FLYWARP_DATA REDS_HOUSE_2F_WIDTH,6,3 db REDS_HOUSE_2 -BattleCenterSpec1: ; 6428 (1:6428) - db BATTLE_CENTER - FLYWARP_DATA BATTLE_CENTER_WIDTH,4,3 - db CLUB - -BattleCenterSpec2: ; 6430 (1:6430) - db BATTLE_CENTER - FLYWARP_DATA BATTLE_CENTER_WIDTH,4,6 - db CLUB - -TradeCenterSpec1: ; 6438 (1:6438) +TradeCenterSpec1: db TRADE_CENTER FLYWARP_DATA TRADE_CENTER_WIDTH,4,3 db CLUB -TradeCenterSpec2: ; 6440 (1:6440) +TradeCenterSpec2: db TRADE_CENTER FLYWARP_DATA TRADE_CENTER_WIDTH,4,6 db CLUB -FlyWarpDataPtr: ; 6448 (1:6448) +ColosseumSpec1: + db COLOSSEUM + FLYWARP_DATA COLOSSEUM_WIDTH,4,3 + db CLUB + +ColosseumSpec2: + db COLOSSEUM + FLYWARP_DATA COLOSSEUM_WIDTH,4,6 + db CLUB + +FlyWarpDataPtr: db PALLET_TOWN, 0 dw PalletTownFlyWarp db VIRIDIAN_CITY, 0 @@ -91,29 +91,29 @@ FlyWarpDataPtr: ; 6448 (1:6448) ; [Event Displacement][Y-block][X-block][Y-sub_block][X-sub_block] ; Macro Format: ; FLYWARP_DATA [Map Width][Y-pos][X-pos] -PalletTownFlyWarp: ; 647c (1:647c) +PalletTownFlyWarp: FLYWARP_DATA PALLET_TOWN_WIDTH, 6, 5 -ViridianCityFlyWarp: ; 6482 (1:6482) +ViridianCityFlyWarp: FLYWARP_DATA VIRIDIAN_CITY_WIDTH, 26, 23 -PewterCityFlyWarp: ; 6488 (1:6488) +PewterCityFlyWarp: FLYWARP_DATA PEWTER_CITY_WIDTH, 26, 13 -CeruleanCityFlyWarp: ; 648e (1:648e) +CeruleanCityFlyWarp: FLYWARP_DATA CERULEAN_CITY_WIDTH, 18, 19 -LavenderTownFlyWarp: ; 6494 (1:6494) +LavenderTownFlyWarp: FLYWARP_DATA LAVENDER_TOWN_WIDTH, 6, 3 -VermilionCityFlyWarp: ; 649a (1:649a) +VermilionCityFlyWarp: FLYWARP_DATA VERMILION_CITY_WIDTH, 4, 11 -CeladonCityFlyWarp: ; 64a0 (1:64a0) +CeladonCityFlyWarp: FLYWARP_DATA CELADON_CITY_WIDTH, 10, 41 -FuchsiaCityFlyWarp: ; 64a6 (1:64a6) +FuchsiaCityFlyWarp: FLYWARP_DATA FUCHSIA_CITY_WIDTH, 28, 19 -CinnabarIslandFlyWarp: ; 64ac (1:64ac) +CinnabarIslandFlyWarp: FLYWARP_DATA CINNABAR_ISLAND_WIDTH, 12, 11 -IndigoPlateauFlyWarp: ; 64b2 (1:64b2) +IndigoPlateauFlyWarp: FLYWARP_DATA INDIGO_PLATEAU_WIDTH, 6, 9 -SaffronCityFlyWarp: ; 64b8 (1:64b8) +SaffronCityFlyWarp: FLYWARP_DATA SAFFRON_CITY_WIDTH, 30, 9 -Route4FlyWarp: ; 64be (1:64be) +Route4FlyWarp: FLYWARP_DATA ROUTE_4_WIDTH, 6, 11 -Route10FlyWarp: ; 64c4 (1:64c4) +Route10FlyWarp: FLYWARP_DATA ROUTE_10_WIDTH, 20, 11 diff --git a/data/sprite_sets.asm b/data/sprite_sets.asm index c5e2d29e..5b0e1e00 100755 --- a/data/sprite_sets.asm +++ b/data/sprite_sets.asm @@ -1,4 +1,4 @@ -MapSpriteSets: ; 17a64 (5:7a64) +MapSpriteSets: db $01 ; PALLET_TOWN db $01 ; VIRIDIAN_CITY db $02 ; PEWTER_CITY @@ -44,7 +44,7 @@ MapSpriteSets: ; 17a64 (5:7a64) ; 01: coordinate of dividing line ; 02: sprite set ID if in the West or North side ; 03: sprite set ID if in the East or South side -SplitMapSpriteSets: ; 17a89 (5:7a89) +SplitMapSpriteSets: db $02,$25,$02,$01 ; $f1 db $02,$32,$02,$03 ; $f2 db $01,$39,$04,$08 ; $f3 @@ -58,7 +58,7 @@ SplitMapSpriteSets: ; 17a89 (5:7a89) db $01,$11,$05,$07 ; $fb db $01,$03,$07,$03 ; $fc -SpriteSets: ; 17ab9 (5:7ab9) +SpriteSets: ; sprite set $01 db SPRITE_BLUE db SPRITE_BUG_CATCHER @@ -189,7 +189,7 @@ SpriteSets: ; 17ab9 (5:7ab9) db SPRITE_BALL db SPRITE_OMANYTE -SpriteSheetPointerTable: ; 17b27 (5:7b27) +SpriteSheetPointerTable: ; SPRITE_RED dw RedSprite db $c0 ; byte count diff --git a/data/super_palettes.asm b/data/super_palettes.asm index c1afb003..97f1d8ec 100755 --- a/data/super_palettes.asm +++ b/data/super_palettes.asm @@ -1,5 +1,5 @@ ; palettes for overworlds, title screen, monsters -SuperPalettes: ; 72660 (1c:6660) +SuperPalettes: RGB 31,29,31 ; PAL_ROUTE RGB 21,28,11 RGB 20,26,31 diff --git a/data/super_rod.asm b/data/super_rod.asm index 2b0646fc..93ea992b 100755 --- a/data/super_rod.asm +++ b/data/super_rod.asm @@ -1,6 +1,6 @@ ; super rod data ; format: map, pointer to fishing group -SuperRodData: ; e919 (3:6919) +SuperRodData: dbw PALLET_TOWN, FishingGroup1 dbw VIRIDIAN_CITY, FishingGroup1 dbw CERULEAN_CITY, FishingGroup3 @@ -38,61 +38,61 @@ SuperRodData: ; e919 (3:6919) ; fishing groups ; number of monsters, followed by level/monster pairs -FishingGroup1: ; e97d (3:697d) +FishingGroup1: db 2 db 15,TENTACOOL db 15,POLIWAG -FishingGroup2: ; e982 (3:6982) +FishingGroup2: db 2 db 15,GOLDEEN db 15,POLIWAG -FishingGroup3: ; e987 (3:6987) +FishingGroup3: db 3 db 15,PSYDUCK db 15,GOLDEEN db 15,KRABBY -FishingGroup4: ; e98e (3:698e) +FishingGroup4: db 2 db 15,KRABBY db 15,SHELLDER -FishingGroup5: ; e993 (3:6993) +FishingGroup5: db 2 db 23,POLIWHIRL db 15,SLOWPOKE -FishingGroup6: ; e998 (3:6998) +FishingGroup6: db 4 db 15,DRATINI db 15,KRABBY db 15,PSYDUCK db 15,SLOWPOKE -FishingGroup7: ; e9a1 (3:69a1) +FishingGroup7: db 4 db 5,TENTACOOL db 15,KRABBY db 15,GOLDEEN db 15,MAGIKARP -FishingGroup8: ; e9aa (3:69aa) +FishingGroup8: db 4 db 15,STARYU db 15,HORSEA db 15,SHELLDER db 15,GOLDEEN -FishingGroup9: ; e9b3 (3:69b3) +FishingGroup9: db 4 db 23,SLOWBRO db 23,SEAKING db 23,KINGLER db 23,SEADRA -FishingGroup10: ; e9bc (3:69bc) +FishingGroup10: db 4 db 23,SEAKING db 15,KRABBY diff --git a/data/tileset_headers.asm b/data/tileset_headers.asm index 3e2e68bb..d8e0d9b4 100755 --- a/data/tileset_headers.asm +++ b/data/tileset_headers.asm @@ -1,4 +1,4 @@ -Tilesets: ; c7be (3:47be) +Tilesets: tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR @@ -23,6 +23,3 @@ Tilesets: ; c7be (3:47be) tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, INDOOR tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, CAVE tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, CAVE -IF DEF(_OPTION_BEACH_HOUSE) - tileset BeachHouse_Block, BeachHouse_GFX, BeachHouse_Coll, $FF,$FF,$FF, $FF, INDOOR -ENDC diff --git a/data/title_mons.asm b/data/title_mons.asm index abcf1bb4..c5d94301 100755 --- a/data/title_mons.asm +++ b/data/title_mons.asm @@ -1,4 +1,4 @@ -TitleMons: ; 4588 (1:4588) +TitleMons: ; mons on the title screen are randomly chosen from here IF DEF(_RED) db CHARMANDER diff --git a/data/tm_prices.asm b/data/tm_prices.asm index 89fdb8e9..ccc8be05 100755 --- a/data/tm_prices.asm +++ b/data/tm_prices.asm @@ -1,4 +1,4 @@ -TechnicalMachinePrices: ; 7bfa7 (1e:7fa7) +TechnicalMachinePrices: ; In thousands (nybbles). dn 3, 2 ; TM_01, TM_02 dn 2, 1 ; TM_03, TM_04 diff --git a/data/tms.asm b/data/tms.asm index 23630691..23c1685e 100755 --- a/data/tms.asm +++ b/data/tms.asm @@ -1,4 +1,4 @@ -TechnicalMachines: ; 13773 (4:7773) +TechnicalMachines: db MEGA_PUNCH db RAZOR_WIND db SWORDS_DANCE diff --git a/data/town_map_entries.asm b/data/town_map_entries.asm index d2edd949..abf584de 100755 --- a/data/town_map_entries.asm +++ b/data/town_map_entries.asm @@ -1,4 +1,4 @@ -ExternalMapEntries: ; 71313 (1c:5313) +ExternalMapEntries: EMAP $2,$B,PalletTownName EMAP $2,$8,ViridianCityName EMAP $2,$3,PewterCityName @@ -37,65 +37,65 @@ ExternalMapEntries: ; 71313 (1c:5313) EMAP $A,$1,Route24Name EMAP $B,$0,Route25Name -InternalMapEntries: ; 71382 (1c:5382) - IMAP $29,$2,$B,PalletTownName - IMAP $2E,$2,$8,ViridianCityName - IMAP $33,$2,$6,Route2Name - IMAP $34,$2,$4,ViridianForestName - IMAP $3B,$2,$3,PewterCityName - IMAP $3E,$6,$2,MountMoonName - IMAP $44,$A,$2,CeruleanCityName - IMAP $45,$5,$2,Route4Name - IMAP $46,$A,$2,CeruleanCityName - IMAP $49,$A,$4,Route5Name - IMAP $4C,$A,$6,Route6Name - IMAP $4F,$9,$5,Route7Name - IMAP $51,$B,$5,Route8Name - IMAP $53,$E,$3,RockTunnelName - IMAP $54,$F,$4,PowerPlantName - IMAP $57,$D,$9,Route11Name - IMAP $58,$E,$7,Route12Name - IMAP $59,$C,$0,SeaCottageName - IMAP $5F,$A,$9,VermilionCityName - IMAP $69,$9,$A,SSAnneName - IMAP $6D,$0,$4,VictoryRoadName - IMAP $77,$0,$2,PokemonLeagueName - IMAP $78,$A,$5,UndergroundPathName - IMAP $79,$0,$2,PokemonLeagueName - IMAP $7A,$A,$5,UndergroundPathName - IMAP $8D,$7,$5,CeladonCityName - IMAP $8E,$E,$5,LavenderTownName - IMAP $95,$F,$5,PokemonTowerName - IMAP $98,$E,$5,LavenderTownName - IMAP $9C,$8,$D,FuchsiaCityName - IMAP $9D,$8,$C,SafariZoneName - IMAP $9F,$8,$D,FuchsiaCityName - IMAP $A3,$5,$F,SeafoamIslandsName - IMAP $A4,$A,$9,VermilionCityName - IMAP $A5,$8,$D,FuchsiaCityName - IMAP $A6,$2,$F,PokemonMansionName - IMAP $AE,$2,$F,CinnabarIslandName - IMAP $AF,$0,$2,IndigoPlateauName - IMAP $B8,$A,$5,SaffronCityName - IMAP $BA,$9,$D,Route15Name - IMAP $BD,$4,$5,Route16Name - IMAP $BE,$E,$A,Route12Name - IMAP $C0,$7,$D,Route18Name - IMAP $C1,$5,$F,SeafoamIslandsName - IMAP $C2,$0,$7,Route22Name - IMAP $C3,$0,$4,VictoryRoadName - IMAP $C4,$E,$7,Route12Name - IMAP $C5,$A,$9,VermilionCityName - IMAP $C6,$3,$4,DiglettsCaveName - IMAP $C7,$0,$4,VictoryRoadName - IMAP $CF,$7,$5,RocketHQName - IMAP $D6,$A,$5,SilphCoName - IMAP $D9,$2,$F,PokemonMansionName - IMAP $E2,$8,$C,SafariZoneName - IMAP $E5,$9,$1,CeruleanCaveName - IMAP $E6,$E,$5,LavenderTownName - IMAP $E7,$A,$2,CeruleanCityName - IMAP $E9,$E,$3,RockTunnelName - IMAP $ED,$A,$5,SilphCoName - IMAP $F8,$0,$2,PokemonLeagueName +InternalMapEntries: + IMAP OAKS_LAB, $2,$B,PalletTownName + IMAP VIRIDIAN_GYM, $2,$8,ViridianCityName + IMAP VIRIDIAN_FOREST_ENTRANCE, $2,$6,Route2Name + IMAP VIRIDIAN_FOREST, $2,$4,ViridianForestName + IMAP PEWTER_POKECENTER, $2,$3,PewterCityName + IMAP MT_MOON_3, $6,$2,MountMoonName + IMAP CERULEAN_MART, $A,$2,CeruleanCityName + IMAP MT_MOON_POKECENTER, $5,$2,Route4Name + IMAP TRASHED_HOUSE_COPY, $A,$2,CeruleanCityName + IMAP DAYCAREM, $A,$4,Route5Name + IMAP PATH_ENTRANCE_ROUTE_6_COPY,$A,$6,Route6Name + IMAP PATH_ENTRANCE_ROUTE_7_COPY,$9,$5,Route7Name + IMAP PATH_ENTRANCE_ROUTE_8, $B,$5,Route8Name + IMAP ROCK_TUNNEL_1, $E,$3,RockTunnelName + IMAP POWER_PLANT, $F,$4,PowerPlantName + IMAP ROUTE_11_GATE_2F, $D,$9,Route11Name + IMAP ROUTE_12_GATE_1F, $E,$7,Route12Name + IMAP BILLS_HOUSE, $C,$0,SeaCottageName + IMAP VERMILION_DOCK, $A,$9,VermilionCityName + IMAP SS_ANNE_10, $9,$A,SSAnneName + IMAP VICTORY_ROAD_1, $0,$4,VictoryRoadName + IMAP HALL_OF_FAME, $0,$2,PokemonLeagueName + IMAP UNDERGROUND_PATH_NS, $A,$5,UndergroundPathName + IMAP CHAMPIONS_ROOM, $0,$2,PokemonLeagueName + IMAP UNDERGROUND_PATH_WE, $A,$5,UndergroundPathName + IMAP CELADON_HOTEL, $7,$5,CeladonCityName + IMAP LAVENDER_POKECENTER, $E,$5,LavenderTownName + IMAP POKEMONTOWER_7, $F,$5,PokemonTowerName + IMAP LAVENDER_HOUSE_2, $E,$5,LavenderTownName + IMAP FUCHSIA_HOUSE_2, $8,$D,FuchsiaCityName + IMAP SAFARI_ZONE_ENTRANCE, $8,$C,SafariZoneName + IMAP FUCHSIA_MEETING_ROOM, $8,$D,FuchsiaCityName + IMAP SEAFOAM_ISLANDS_5, $5,$F,SeafoamIslandsName + IMAP VERMILION_HOUSE_2, $A,$9,VermilionCityName + IMAP FUCHSIA_HOUSE_3, $8,$D,FuchsiaCityName + IMAP MANSION_1, $2,$F,PokemonMansionName + IMAP CINNABAR_MART_COPY, $2,$F,CinnabarIslandName + IMAP INDIGO_PLATEAU_LOBBY, $0,$2,IndigoPlateauName + IMAP SAFFRON_HOUSE_2, $A,$5,SaffronCityName + IMAP ROUTE_15_GATE_2F, $9,$D,Route15Name + IMAP ROUTE_16_HOUSE, $4,$5,Route16Name + IMAP ROUTE_12_HOUSE, $E,$A,Route12Name + IMAP ROUTE_18_GATE_2F, $7,$D,Route18Name + IMAP SEAFOAM_ISLANDS_1, $5,$F,SeafoamIslandsName + IMAP ROUTE_22_GATE, $0,$7,Route22Name + IMAP VICTORY_ROAD_2, $0,$4,VictoryRoadName + IMAP ROUTE_12_GATE_2F, $E,$7,Route12Name + IMAP VERMILION_HOUSE_3, $A,$9,VermilionCityName + IMAP DIGLETTS_CAVE, $3,$4,DiglettsCaveName + IMAP VICTORY_ROAD_3, $0,$4,VictoryRoadName + IMAP UNUSED_MAP_CE, $7,$5,RocketHQName + IMAP SILPH_CO_8F, $A,$5,SilphCoName + IMAP MANSION_4, $2,$F,PokemonMansionName + IMAP SAFARI_ZONE_REST_HOUSE_4, $8,$C,SafariZoneName + IMAP UNKNOWN_DUNGEON_1, $9,$1,CeruleanCaveName + IMAP NAME_RATERS_HOUSE, $E,$5,LavenderTownName + IMAP CERULEAN_HOUSE_2, $A,$2,CeruleanCityName + IMAP ROCK_TUNNEL_2, $E,$3,RockTunnelName + IMAP SILPH_CO_ELEVATOR, $A,$5,SilphCoName + IMAP AGATHAS_ROOM, $0,$2,PokemonLeagueName db $FF diff --git a/data/town_map_order.asm b/data/town_map_order.asm index 3bd8c223..10131a31 100755 --- a/data/town_map_order.asm +++ b/data/town_map_order.asm @@ -1,4 +1,4 @@ -TownMapOrder: ; 70f11 (1c:4f11) +TownMapOrder: db PALLET_TOWN db ROUTE_1 db VIRIDIAN_CITY @@ -46,3 +46,4 @@ TownMapOrder: ; 70f11 (1c:4f11) db VICTORY_ROAD_3 db INDIGO_PLATEAU db POWER_PLANT +TownMapOrderEnd: diff --git a/data/trades.asm b/data/trades.asm index b761fecf..cf0fcbfd 100755 --- a/data/trades.asm +++ b/data/trades.asm @@ -1,25 +1,12 @@ -TradeMons: ; 71b7b (1c:5b7b) +TradeMons: ; givemonster, getmonster, textstring, nickname (11 bytes), 14 bytes total -IF DEF(_YELLOW) - db LICKITUNG, DUGTRIO, 0,"GURIO@@@@@@" - db CLEFAIRY, MR_MIME, 0,"MILES@@@@@@" - db BUTTERFREE,BEEDRILL, 2,"STINGER@@@@" - db KANGASKHAN,MUK, 0,"STICKY@@@@@" - db MEW, MEW, 2,"BART@@@@@@@" - db TANGELA, PARASECT, 0,"SPIKE@@@@@@" - db PIDGEOT, PIDGEOT, 1,"MARTY@@@@@@" - db GOLDUCK, RHYDON, 1,"BUFFY@@@@@@" - db GROWLITHE, DEWGONG, 2,"CEZANNE@@@@" - db CUBONE, MACHOKE, 2,"RICKY@@@@@@" -ELSE - db NIDORINO, NIDORINA, 0,"TERRY@@@@@@" - db ABRA, MR_MIME, 0,"MARCEL@@@@@" - db BUTTERFREE,BEEDRILL, 2,"CHIKUCHIKU@" - db PONYTA, SEEL, 0,"SAILOR@@@@@" - db SPEAROW, FARFETCH_D,2,"DUX@@@@@@@@" - db SLOWBRO, LICKITUNG, 0,"MARC@@@@@@@" - db POLIWHIRL, JYNX, 1,"LOLA@@@@@@@" - db RAICHU, ELECTRODE, 1,"DORIS@@@@@@" - db VENONAT, TANGELA, 2,"CRINKLES@@@" - db NIDORAN_M, NIDORAN_F, 2,"SPOT@@@@@@@" -ENDC + db NIDORINO, NIDORINA, 0,"TERRY@@@@@@" + db ABRA, MR_MIME, 0,"MARCEL@@@@@" + db BUTTERFREE,BEEDRILL, 2,"CHIKUCHIKU@" + db PONYTA, SEEL, 0,"SAILOR@@@@@" + db SPEAROW, FARFETCHD,2,"DUX@@@@@@@@" + db SLOWBRO, LICKITUNG,0,"MARC@@@@@@@" + db POLIWHIRL, JYNX, 1,"LOLA@@@@@@@" + db RAICHU, ELECTRODE,1,"DORIS@@@@@@" + db VENONAT, TANGELA, 2,"CRINKLES@@@" + db NIDORAN_M, NIDORAN_F,2,"SPOT@@@@@@@" diff --git a/data/trainer_moves.asm b/data/trainer_moves.asm index 432f0fed..2e7b52a5 100755 --- a/data/trainer_moves.asm +++ b/data/trainer_moves.asm @@ -1,8 +1,7 @@ -IF !DEF(YELLOW) -LoneMoves: ; 39d22 (e:5d22) +LoneMoves: ; these are used for gym leaders. -; this is not automatic! you have to write the number you want to W_LONEATTACKNO -; first. e.g., erika's script writes 4 to W_LONEATTACKNO to get mega drain, +; this is not automatic! you have to write the number you want to wLoneAttackNo +; first. e.g., erika's script writes 4 to wLoneAttackNo to get mega drain, ; the fourth entry in the list. ; first byte: pokemon in the trainer's party that gets the move @@ -17,7 +16,7 @@ LoneMoves: ; 39d22 (e:5d22) db 3,FIRE_BLAST db 4,FISSURE -TeamMoves: ; 39d32 (e:5d32) +TeamMoves: ; these are used for elite four. ; this is automatic, based on trainer class. ; don't be confused by LoneMoves above, the two data structures are @@ -31,167 +30,3 @@ TeamMoves: ; 39d32 (e:5d32) db AGATHA,TOXIC db LANCE,BARRIER db $FF - -ELSE -; yellow has its own format. - -; entry ≔ trainerclass, trainerid, moveset+, 0 -; moveset ≔ partymon, partymon'smove, moveid - -LoneMoves: -TeamMoves: - db BUG_CATCHER,$f - db 2,2,TACKLE - db 2,3,STRING_SHOT - db 0 - - db YOUNGSTER,$e - db 1,4,FISSURE - db 0 - - db BROCK,$1 - db 2,3,BIND - db 2,4,BIDE - db 0 - - db MISTY,$1 - db 2,4,BUBBLEBEAM - db 0 - - db LT__SURGE,$1 - db 1,1,THUNDERBOLT - db 1,2,MEGA_PUNCH - db 1,3,MEGA_KICK - db 1,4,GROWL - db 0 - - db ERIKA,$1 - db 1,3,MEGA_DRAIN - db 2,1,RAZOR_LEAF - db 3,1,PETAL_DANCE - db 0 - - db KOGA,$1 - db 1,1,TOXIC - db 1,2,TACKLE - db 2,1,TOXIC - db 2,3,SUPERSONIC - db 3,1,TOXIC - db 3,2,DOUBLE_EDGE - db 4,1,LEECH_LIFE - db 4,2,DOUBLE_TEAM - db 4,3,PSYCHIC_M - db 4,4,TOXIC - db 0 - - db BLAINE,$1 - db 1,1,FLAMETHROWER - db 1,4,CONFUSE_RAY - db 3,1,FLAMETHROWER - db 3,2,FIRE_BLAST - db 3,3,REFLECT - db 0 - - db SABRINA,$1 - db 1,1,FLASH - db 2,1,KINESIS - db 2,4,PSYWAVE - db 3,1,PSYWAVE - db 0 - - db GIOVANNI,$3 - db 1,3,FISSURE - db 2,2,DOUBLE_TEAM - db 3,1,EARTHQUAKE - db 3,3,THUNDER - db 4,1,EARTHQUAKE - db 4,2,LEER - db 4,3,THUNDER - db 5,1,ROCK_SLIDE - db 5,4,EARTHQUAKE - db 0 - - db LORELEI,$1 - db 1,1,BUBBLEBEAM - db 2,3,ICE_BEAM - db 3,1,PSYCHIC_M - db 3,2,SURF - db 4,3,LOVELY_KISS - db 5,3,BLIZZARD - db 0 - - db BRUNO,$1 - db 1,1,ROCK_SLIDE - db 1,2,SCREECH - db 1,4,DIG - db 2,3,FIRE_PUNCH - db 2,4,DOUBLE_TEAM - db 3,1,DOUBLE_KICK - db 3,2,MEGA_KICK - db 3,4,DOUBLE_TEAM - db 4,1,ROCK_SLIDE - db 4,2,SCREECH - db 4,4,EARTHQUAKE - db 5,2,KARATE_CHOP - db 5,3,STRENGTH - db 0 - - db AGATHA,$1 - db 1,2,SUBSTITUTE - db 1,3,LICK - db 1,4,MEGA_DRAIN - db 2,2,TOXIC - db 2,4,LEECH_LIFE - db 3,2,LICK - db 4,1,WRAP - db 5,2,PSYCHIC_M - db 0 - - db LANCE,$1 - db 1,1,DRAGON_RAGE - db 2,1,THUNDER_WAVE - db 2,3,THUNDERBOLT - db 3,1,BUBBLEBEAM - db 3,2,WRAP - db 3,3,ICE_BEAM - db 4,1,WING_ATTACK - db 4,2,SWIFT - db 4,3,FLY - db 5,1,BLIZZARD - db 5,2,FIRE_BLAST - db 5,3,THUNDER - db 0 - - db SONY3,$1 - db 1,3,EARTHQUAKE - db 2,4,KINESIS - db 3,4,LEECH_SEED - db 4,1,ICE_BEAM - db 5,1,CONFUSE_RAY - db 5,4,FIRE_SPIN - db 6,3,QUICK_ATTACK - db 0 - - db SONY3,$2 - db 1,3,EARTHQUAKE - db 2,4,KINESIS - db 3,4,LEECH_SEED - db 4,1,THUNDERBOLT - db 5,1,ICE_BEAM - db 6,2,REFLECT - db 6,3,QUICK_ATTACK - db 0 - - db SONY3,$3 - db 1,3,EARTHQUAKE - db 2,4,KINESIS - db 3,4,LEECH_SEED - db 4,1,CONFUSE_RAY - db 4,4,FIRE_SPIN - db 5,1,THUNDERBOLT - db 6,1,AURORA_BEAM - db 6,3,QUICK_ATTACK - db 0 - - db $ff -endc diff --git a/data/trainer_parties.asm b/data/trainer_parties.asm index b121efc0..0c586dad 100755 --- a/data/trainer_parties.asm +++ b/data/trainer_parties.asm @@ -1,14 +1,51 @@ -TrainerDataPointers: ; 39d3b (e:5d3b) - dw YoungsterData,BugCatcherData,LassData,SailorData,JrTrainerMData - dw JrTrainerFData,PokemaniacData,SuperNerdData,HikerData,BikerData - dw BurglarData,EngineerData,Juggler1Data,FisherData,SwimmerData - dw CueBallData,GamblerData,BeautyData,PsychicData,RockerData - dw JugglerData,TamerData,BirdKeeperData,BlackbeltData,Green1Data - dw ProfOakData,ChiefData,ScientistData,GiovanniData,RocketData - dw CooltrainerMData,CooltrainerFData,BrunoData,BrockData,MistyData - dw LtSurgeData,ErikaData,KogaData,BlaineData,SabrinaData - dw GentlemanData,Green2Data,Green3Data,LoreleiData,ChannelerData - dw AgathaData,LanceData +TrainerDataPointers: + dw YoungsterData + dw BugCatcherData + dw LassData + dw SailorData + dw JrTrainerMData + dw JrTrainerFData + dw PokemaniacData + dw SuperNerdData + dw HikerData + dw BikerData + dw BurglarData + dw EngineerData + dw Juggler1Data + dw FisherData + dw SwimmerData + dw CueBallData + dw GamblerData + dw BeautyData + dw PsychicData + dw RockerData + dw JugglerData + dw TamerData + dw BirdKeeperData + dw BlackbeltData + dw Green1Data + dw ProfOakData + dw ChiefData + dw ScientistData + dw GiovanniData + dw RocketData + dw CooltrainerMData + dw CooltrainerFData + dw BrunoData + dw BrockData + dw MistyData + dw LtSurgeData + dw ErikaData + dw KogaData + dw BlaineData + dw SabrinaData + dw GentlemanData + dw Green2Data + dw Green3Data + dw LoreleiData + dw ChannelerData + dw AgathaData + dw LanceData ; if first byte != FF, then ; first byte is level (of all pokemon on this team) @@ -19,233 +56,261 @@ TrainerDataPointers: ; 39d3b (e:5d3b) ; every next two bytes are a level and species ; null-terminated -YoungsterData: ; 39d99 (e:5d99) +YoungsterData: +; Route 3 db 11,RATTATA,EKANS,0 db 14,SPEAROW,0 +; Mt. Moon 1F db 10,RATTATA,RATTATA,ZUBAT,0 +; Route 24 db 14,RATTATA,EKANS,ZUBAT,0 +; Route 25 db 15,RATTATA,SPEAROW,0 db 17,SLOWPOKE,0 db 14,EKANS,SANDSHREW,0 +; SS Anne 1F Rooms db 21,NIDORAN_M,0 +; Route 11 db 21,EKANS,0 db 19,SANDSHREW,ZUBAT,0 db 17,RATTATA,RATTATA,RATICATE,0 db 18,NIDORAN_M,NIDORINO,0 +; Unused db 17,SPEAROW,RATTATA,RATTATA,SPEAROW,0 -if DEF(_YELLOW) - db 24,SANDSHREW,0 -endc -BugCatcherData: ; 39dce (e:5dce) -if DEF(_YELLOW) - db 7,CATERPIE,CATERPIE,0 - db 6,METAPOD,CATERPIE,METAPOD,0 - db 10,CATERPIE,0 -else +BugCatcherData: +; Viridian Forest db 6,WEEDLE,CATERPIE,0 db 7,WEEDLE,KAKUNA,WEEDLE,0 db 9,WEEDLE,0 -endc +; Route 3 db 10,CATERPIE,WEEDLE,CATERPIE,0 db 9,WEEDLE,KAKUNA,CATERPIE,METAPOD,0 db 11,CATERPIE,METAPOD,0 +; Mt. Moon 1F db 11,WEEDLE,KAKUNA,0 db 10,CATERPIE,METAPOD,CATERPIE,0 +; Route 24 db 14,CATERPIE,WEEDLE,0 +; Route 6 db 16,WEEDLE,CATERPIE,WEEDLE,0 db 20,BUTTERFREE,0 +; Unused db 18,METAPOD,CATERPIE,VENONAT,0 +; Route 9 db 19,BEEDRILL,BEEDRILL,0 db 20,CATERPIE,WEEDLE,VENONAT,0 -if DEF(_YELLOW) - db 8,CATERPIE,METAPOD,0 -endc -LassData: ; 39e0c (e:5e0c) +LassData: +; Route 3 db 9,PIDGEY,PIDGEY,0 db 10,RATTATA,NIDORAN_M,0 db 14,JIGGLYPUFF,0 +; Route 4 db 31,PARAS,PARAS,PARASECT,0 +; Mt. Moon 1F db 11,ODDISH,BELLSPROUT,0 db 14,CLEFAIRY,0 +; Route 24 db 16,PIDGEY,NIDORAN_F,0 db 14,PIDGEY,NIDORAN_F,0 +; Route 25 db 15,NIDORAN_M,NIDORAN_F,0 db 13,ODDISH,PIDGEY,ODDISH,0 +; SS Anne 1F Rooms db 18,PIDGEY,NIDORAN_F,0 -if DEF(_YELLOW) - db 20,JIGGLYPUFF,0 -else +; SS Anne 2F Rooms db 18,RATTATA,PIKACHU,0 -endc +; Route 8 db 23,NIDORAN_F,NIDORINA,0 db 24,MEOWTH,MEOWTH,MEOWTH,0 -if DEF(_YELLOW) - db 19,PIDGEY,RATTATA,NIDORAN_F,MEOWTH,NIDORAN_M,0 -else db 19,PIDGEY,RATTATA,NIDORAN_M,MEOWTH,PIKACHU,0 -endc db 22,CLEFAIRY,CLEFAIRY,0 +; Celadon Gym db 23,BELLSPROUT,WEEPINBELL,0 db 23,ODDISH,GLOOM,0 -if DEF(_YELLOW) - db 6,NIDORAN_F,NIDORAN_M,0 -endc -SailorData: ; 39e58 (e:5e58) +SailorData: +; SS Anne Stern db 18,MACHOP,SHELLDER,0 db 17,MACHOP,TENTACOOL,0 +; SS Anne B1F Rooms db 21,SHELLDER,0 db 17,HORSEA,SHELLDER,TENTACOOL,0 db 18,TENTACOOL,STARYU,0 db 17,HORSEA,HORSEA,HORSEA,0 db 20,MACHOP,0 -if DEF(_YELLOW) - db 24,MAGNEMITE,0 -else +; Vermilion Gym db 21,PIKACHU,PIKACHU,0 -endc -JrTrainerMData: ; 39e78 (e:5e78) -if DEF(_YELLOW) - db 9,DIGLETT,SANDSHREW,0 -else +JrTrainerMData: +; Pewter Gym db 11,DIGLETT,SANDSHREW,0 -endc +; Route 24/Route 25 db 14,RATTATA,EKANS,0 +; Route 24 db 18,MANKEY,0 +; Route 6 db 20,SQUIRTLE,0 db 16,SPEAROW,RATICATE,0 +; Unused db 18,DIGLETT,DIGLETT,SANDSHREW,0 +; Route 9 db 21,GROWLITHE,CHARMANDER,0 db 19,RATTATA,DIGLETT,EKANS,SANDSHREW,0 +; Route 12 db 29,NIDORAN_M,NIDORINO,0 -if DEF(_YELLOW) - db 16,WEEPINBELL,0 -endc -JrTrainerFData: ; 39e9d (e:5e9d) +JrTrainerFData: +; Cerulean Gym db 19,GOLDEEN,0 -if DEF(_YELLOW) - db 16,ODDISH,BELLSPROUT,0 -else +; Route 6 db 16,RATTATA,PIKACHU,0 -endc db 16,PIDGEY,PIDGEY,PIDGEY,0 +; Unused db 22,BULBASAUR,0 +; Route 9 db 18,ODDISH,BELLSPROUT,ODDISH,BELLSPROUT,0 db 23,MEOWTH,0 -if DEF(_YELLOW) - db 20,JIGGLYPUFF,CLEFAIRY,0 -else +; Route 10 db 20,PIKACHU,CLEFAIRY,0 -endc db 21,PIDGEY,PIDGEOTTO,0 +; Rock Tunnel B1F db 21,JIGGLYPUFF,PIDGEY,MEOWTH,0 db 22,ODDISH,BULBASAUR,0 +; Celadon Gym db 24,BULBASAUR,IVYSAUR,0 -if DEF(_YELLOW) - db 24,PIDGEY,MEOWTH,RATTATA,PIDGEY,MEOWTH,0 -else +; Route 13 db 24,PIDGEY,MEOWTH,RATTATA,PIKACHU,MEOWTH,0 -endc db 30,POLIWAG,POLIWAG,0 db 27,PIDGEY,MEOWTH,PIDGEY,PIDGEOTTO,0 db 28,GOLDEEN,POLIWAG,HORSEA,0 +; Route 20 db 31,GOLDEEN,SEAKING,0 +; Rock Tunnel 1F db 22,BELLSPROUT,CLEFAIRY,0 db 20,MEOWTH,ODDISH,PIDGEY,0 db 19,PIDGEY,RATTATA,RATTATA,BELLSPROUT,0 +; Route 15 db 28,GLOOM,ODDISH,ODDISH,0 -if DEF(_YELLOW) - db 29,PIDGEY,PIDGEOTTO,0 -else db 29,PIKACHU,RAICHU,0 -endc db 33,CLEFAIRY,0 db 29,BELLSPROUT,ODDISH,TANGELA,0 +; Route 20 db 30,TENTACOOL,HORSEA,SEEL,0 -if DEF(_YELLOW) - db 20,CUBONE,0 -endc -PokemaniacData: ; 39f09 (e:5f09) +PokemaniacData: +; Route 10 db 30,RHYHORN,LICKITUNG,0 db 20,CUBONE,SLOWPOKE,0 +; Rock Tunnel B1F db 20,SLOWPOKE,SLOWPOKE,SLOWPOKE,0 db 22,CHARMANDER,CUBONE,0 db 25,SLOWPOKE,0 +; Victory Road 2F db 40,CHARMELEON,LAPRAS,LICKITUNG,0 +; Rock Tunnel 1F db 23,CUBONE,SLOWPOKE,0 -SuperNerdData: ; 39f26 (e:5f26) +SuperNerdData: +; Mt. Moon 1F db 11,MAGNEMITE,VOLTORB,0 +; Mt. Moon B2F db 12,GRIMER,VOLTORB,KOFFING,0 +; Route 8 db 20,VOLTORB,KOFFING,VOLTORB,MAGNEMITE,0 db 22,GRIMER,MUK,GRIMER,0 db 26,KOFFING,0 +; Unused db 22,KOFFING,MAGNEMITE,WEEZING,0 db 20,MAGNEMITE,MAGNEMITE,KOFFING,MAGNEMITE,0 db 24,MAGNEMITE,VOLTORB,0 +; Cinnabar Gym db 36,VULPIX,VULPIX,NINETALES,0 db 34,PONYTA,CHARMANDER,VULPIX,GROWLITHE,0 db 41,RAPIDASH,0 db 37,GROWLITHE,VULPIX,0 -HikerData: ; 39f5e (e:5f5e) +HikerData: +; Mt. Moon 1F db 10,GEODUDE,GEODUDE,ONIX,0 +; Route 25 db 15,MACHOP,GEODUDE,0 db 13,GEODUDE,GEODUDE,MACHOP,GEODUDE,0 db 17,ONIX,0 +; Route 9 db 21,GEODUDE,ONIX,0 db 20,GEODUDE,MACHOP,GEODUDE,0 +; Route 10 db 21,GEODUDE,ONIX,0 db 19,ONIX,GRAVELER,0 +; Rock Tunnel B1F db 21,GEODUDE,GEODUDE,GRAVELER,0 db 25,GEODUDE,0 +; Route 9/Rock Tunnel B1F db 20,MACHOP,ONIX,0 +; Rock Tunnel 1F db 19,GEODUDE,MACHOP,GEODUDE,GEODUDE,0 db 20,ONIX,ONIX,GEODUDE,0 db 21,GEODUDE,GRAVELER,0 -BikerData: ; 39f9c (e:5f9c) +BikerData: +; Route 13 db 28,KOFFING,KOFFING,KOFFING,0 +; Route 14 db 29,KOFFING,GRIMER,0 +; Route 15 db 25,KOFFING,KOFFING,WEEZING,KOFFING,GRIMER,0 db 28,KOFFING,GRIMER,WEEZING,0 +; Route 16 db 29,GRIMER,KOFFING,0 db 33,WEEZING,0 db 26,GRIMER,GRIMER,GRIMER,GRIMER,0 +; Route 17 db 28,WEEZING,KOFFING,WEEZING,0 db 33,MUK,0 db 29,VOLTORB,VOLTORB,0 db 29,WEEZING,MUK,0 db 25,KOFFING,WEEZING,KOFFING,KOFFING,WEEZING,0 +; Route 14 db 26,KOFFING,KOFFING,GRIMER,KOFFING,0 db 28,GRIMER,GRIMER,KOFFING,0 db 29,KOFFING,MUK,0 -BurglarData: ; 39fe4 (e:5fe4) +BurglarData: +; Unused db 29,GROWLITHE,VULPIX,0 db 33,GROWLITHE,0 db 28,VULPIX,CHARMANDER,PONYTA,0 +; Cinnabar Gym db 36,GROWLITHE,VULPIX,NINETALES,0 db 41,PONYTA,0 db 37,VULPIX,GROWLITHE,0 +; Mansion 2F db 34,CHARMANDER,CHARMELEON,0 +; Mansion 3F db 38,NINETALES,0 +; Mansion B1F db 34,GROWLITHE,PONYTA,0 -EngineerData: ; 3a007 (e:6007) +EngineerData: +; Unused db 21,VOLTORB,MAGNEMITE,0 +; Route 11 db 21,MAGNEMITE,0 db 18,MAGNEMITE,MAGNEMITE,MAGNETON,0 -Juggler1Data: ; 3a013 (e:6013) +Juggler1Data: ; none -FisherData: ; 3a013 (e:6013) +FisherData: +; SS Anne 2F Rooms db 17,GOLDEEN,TENTACOOL,GOLDEEN,0 +; SS Anne B1F Rooms db 17,TENTACOOL,STARYU,SHELLDER,0 +; Route 12 db 22,GOLDEEN,POLIWAG,GOLDEEN,0 db 24,TENTACOOL,GOLDEEN,0 db 27,GOLDEEN,0 db 21,POLIWAG,SHELLDER,GOLDEEN,HORSEA,0 +; Route 21 db 28,SEAKING,GOLDEEN,SEAKING,SEAKING,0 db 31,SHELLDER,CLOYSTER,0 db 27,MAGIKARP,MAGIKARP,MAGIKARP,MAGIKARP,MAGIKARP,MAGIKARP,0 db 33,SEAKING,GOLDEEN,0 +; Route 12 db 24,MAGIKARP,MAGIKARP,0 -SwimmerData: ; 3a049 (e:6049) +SwimmerData: +; Cerulean Gym db 16,HORSEA,SHELLDER,0 +; Route 19 db 30,TENTACOOL,SHELLDER,0 db 29,GOLDEEN,HORSEA,STARYU,0 db 30,POLIWAG,POLIWHIRL,0 @@ -253,340 +318,371 @@ SwimmerData: ; 3a049 (e:6049) db 29,GOLDEEN,SHELLDER,SEAKING,0 db 30,HORSEA,HORSEA,0 db 27,TENTACOOL,TENTACOOL,STARYU,HORSEA,TENTACRUEL,0 +; Route 20 db 31,SHELLDER,CLOYSTER,0 db 35,STARYU,0 db 28,HORSEA,HORSEA,SEADRA,HORSEA,0 +; Route 21 db 33,SEADRA,TENTACRUEL,0 db 37,STARMIE,0 db 33,STARYU,WARTORTLE,0 db 32,POLIWHIRL,TENTACOOL,SEADRA,0 -CueBallData: ; 3a08d (e:608d) +CueBallData: +; Route 16 db 28,MACHOP,MANKEY,MACHOP,0 db 29,MANKEY,MACHOP,0 db 33,MACHOP,0 +; Route 17 db 29,MANKEY,PRIMEAPE,0 db 29,MACHOP,MACHOKE,0 db 33,MACHOKE,0 db 26,MANKEY,MANKEY,MACHOKE,MACHOP,0 db 29,PRIMEAPE,MACHOKE,0 +; Route 21 db 31,TENTACOOL,TENTACOOL,TENTACRUEL,0 -GamblerData: ; 3a0b3 (e:60b3) +GamblerData: +; Route 11 db 18,POLIWAG,HORSEA,0 db 18,BELLSPROUT,ODDISH,0 db 18,VOLTORB,MAGNEMITE,0 db 18,GROWLITHE,VULPIX,0 +; Route 8 db 22,POLIWAG,POLIWAG,POLIWHIRL,0 +; Unused db 22,ONIX,GEODUDE,GRAVELER,0 +; Route 8 db 24,GROWLITHE,VULPIX,0 -BeautyData: ; 3a0d1 (e:60d1) +BeautyData: +; Celadon Gym db 21,ODDISH,BELLSPROUT,ODDISH,BELLSPROUT,0 db 24,BELLSPROUT,BELLSPROUT,0 db 26,EXEGGCUTE,0 -if DEF(_YELLOW) - db 27,RATTATA,VULPIX,RATTATA,0 -else +; Route 13 db 27,RATTATA,PIKACHU,RATTATA,0 -endc db 29,CLEFAIRY,MEOWTH,0 +; Route 20 db 35,SEAKING,0 db 30,SHELLDER,SHELLDER,CLOYSTER,0 db 31,POLIWAG,SEAKING,0 +; Route 15 db 29,PIDGEOTTO,WIGGLYTUFF,0 db 29,BULBASAUR,IVYSAUR,0 +; Unused db 33,WEEPINBELL,BELLSPROUT,WEEPINBELL,0 +; Route 19 db 27,POLIWAG,GOLDEEN,SEAKING,GOLDEEN,POLIWAG,0 db 30,GOLDEEN,SEAKING,0 db 29,STARYU,STARYU,STARYU,0 +; Route 20 db 30,SEADRA,HORSEA,SEADRA,0 -PsychicData: ; 3a115 (e:6115) +PsychicData: +; Saffron Gym db 31,KADABRA,SLOWPOKE,MR_MIME,KADABRA,0 db 34,MR_MIME,KADABRA,0 db 33,SLOWPOKE,SLOWPOKE,SLOWBRO,0 db 38,SLOWBRO,0 -RockerData: ; 3a127 (e:6127) -if DEF(_YELLOW) - db 20,VOLTORB,VOLTORB,VOLTORB,0 -else +RockerData: +; Vermilion Gym db 20,VOLTORB,MAGNEMITE,VOLTORB,0 -endc +; Route 12 db 29,VOLTORB,ELECTRODE,0 -JugglerData: ; 3a130 (e:6130) +JugglerData: +; Silph Co. 5F db 29,KADABRA,MR_MIME,0 +; Victory Road 2F db 41,DROWZEE,HYPNO,KADABRA,KADABRA,0 +; Fucshia Gym db 31,DROWZEE,DROWZEE,KADABRA,DROWZEE,0 db 34,DROWZEE,HYPNO,0 +; Victory Road 2F db 48,MR_MIME,0 +; Unused db 33,HYPNO,0 +; Fucshia Gym db 38,HYPNO,0 db 34,DROWZEE,KADABRA,0 -TamerData: ; 3a151 (e:6151) +TamerData: +; Fucshia Gym db 34,SANDSLASH,ARBOK,0 db 33,ARBOK,SANDSLASH,ARBOK,0 +; Viridian Gym db 43,RHYHORN,0 db 39,ARBOK,TAUROS,0 +; Victory Road 2F db 44,PERSIAN,GOLDUCK,0 +; Unused db 42,RHYHORN,PRIMEAPE,ARBOK,TAUROS,0 -BirdKeeperData: ; 3a16b (e:616b) +BirdKeeperData: +; Route 13 db 29,PIDGEY,PIDGEOTTO,0 db 25,SPEAROW,PIDGEY,PIDGEY,SPEAROW,SPEAROW,0 db 26,PIDGEY,PIDGEOTTO,SPEAROW,FEAROW,0 - db 33,FARFETCH_D,0 +; Route 14 + db 33,FARFETCHD,0 db 29,SPEAROW,FEAROW,0 - db 26,PIDGEOTTO,FARFETCH_D,DODUO,PIDGEY,0 +; Route 15 + db 26,PIDGEOTTO,FARFETCHD,DODUO,PIDGEY,0 db 28,DODRIO,DODUO,DODUO,0 +; Route 18 db 29,SPEAROW,FEAROW,0 db 34,DODRIO,0 db 26,SPEAROW,SPEAROW,FEAROW,SPEAROW,0 +; Route 20 db 30,FEAROW,FEAROW,PIDGEOTTO,0 +; Unused db 39,PIDGEOTTO,PIDGEOTTO,PIDGEY,PIDGEOTTO,0 - db 42,FARFETCH_D,FEAROW,0 + db 42,FARFETCHD,FEAROW,0 +; Route 14 db 28,PIDGEY,DODUO,PIDGEOTTO,0 db 26,PIDGEY,SPEAROW,PIDGEY,FEAROW,0 db 29,PIDGEOTTO,FEAROW,0 db 28,SPEAROW,DODUO,FEAROW,0 -BlackbeltData: ; 3a1be (e:61be) +BlackbeltData: +; Fighting Dojo db 37,HITMONLEE,HITMONCHAN,0 db 31,MANKEY,MANKEY,PRIMEAPE,0 db 32,MACHOP,MACHOKE,0 db 36,PRIMEAPE,0 db 31,MACHOP,MANKEY,PRIMEAPE,0 +; Viridian Gym db 40,MACHOP,MACHOKE,0 db 43,MACHOKE,0 db 38,MACHOKE,MACHOP,MACHOKE,0 +; Victory Road 2F db 43,MACHOKE,MACHOP,MACHOKE,0 -Green1Data: ; 3a1e4 (e:61e4) -if DEF(_YELLOW) - db 5,EEVEE,0 - db $FF,9,SPEAROW,8,EEVEE,0 - db $FF,18,SPEAROW,15,SANDSHREW,15,RATTATA,17,EEVEE,0 -else +Green1Data: db 5,SQUIRTLE,0 db 5,BULBASAUR,0 db 5,CHARMANDER,0 +; Route 22 db $FF,9,PIDGEY,8,SQUIRTLE,0 db $FF,9,PIDGEY,8,BULBASAUR,0 db $FF,9,PIDGEY,8,CHARMANDER,0 +; Cerulean City db $FF,18,PIDGEOTTO,15,ABRA,15,RATTATA,17,SQUIRTLE,0 db $FF,18,PIDGEOTTO,15,ABRA,15,RATTATA,17,BULBASAUR,0 db $FF,18,PIDGEOTTO,15,ABRA,15,RATTATA,17,CHARMANDER,0 -endc -ProfOakData: ; 3a21d (e:621d) +ProfOakData: +; Unused db $FF,66,TAUROS,67,EXEGGUTOR,68,ARCANINE,69,BLASTOISE,70,GYARADOS,0 db $FF,66,TAUROS,67,EXEGGUTOR,68,ARCANINE,69,VENUSAUR,70,GYARADOS,0 db $FF,66,TAUROS,67,EXEGGUTOR,68,ARCANINE,69,CHARIZARD,70,GYARADOS,0 -ChiefData: ; 3a241 (e:6241) +ChiefData: ; none -ScientistData: ; 3a241 (e:6241) +ScientistData: +; Unused db 34,KOFFING,VOLTORB,0 +; Silph Co. 2F db 26,GRIMER,WEEZING,KOFFING,WEEZING,0 db 28,MAGNEMITE,VOLTORB,MAGNETON,0 +; Silph Co. 3F/Mansion 1F db 29,ELECTRODE,WEEZING,0 +; Silph Co. 4F db 33,ELECTRODE,0 +; Silph Co. 5F db 26,MAGNETON,KOFFING,WEEZING,MAGNEMITE,0 +; Silph Co. 6F db 25,VOLTORB,KOFFING,MAGNETON,MAGNEMITE,KOFFING,0 +; Silph Co. 7F db 29,ELECTRODE,MUK,0 +; Silph Co. 8F db 29,GRIMER,ELECTRODE,0 +; Silph Co. 9F db 28,VOLTORB,KOFFING,MAGNETON,0 +; Silph Co. 10F db 29,MAGNEMITE,KOFFING,0 +; Mansion 3F db 33,MAGNEMITE,MAGNETON,VOLTORB,0 +; Mansion B1F db 34,MAGNEMITE,ELECTRODE,0 -GiovanniData: ; 3a27e (e:627e) -if DEF(_YELLOW) - db $FF,25,ONIX,24,RHYHORN,29,PERSIAN,0 - db $FF,37,NIDORINO,35,PERSIAN,37,RHYHORN,41,NIDOQUEEN,0 - db $FF,50,DUGTRIO,53,PERSIAN,53,NIDOQUEEN,55,NIDOKING,55,RHYDON,0 -else +GiovanniData: +; Rocket Hideout B4F db $FF,25,ONIX,24,RHYHORN,29,KANGASKHAN,0 +; Silph Co. 11F db $FF,37,NIDORINO,35,KANGASKHAN,37,RHYHORN,41,NIDOQUEEN,0 +; Viridian Gym db $FF,45,RHYHORN,42,DUGTRIO,44,NIDOQUEEN,45,NIDOKING,50,RHYDON,0 -endc -RocketData: ; 3a29c (e:629c) +RocketData: +; Mt. Moon B2F db 13,RATTATA,ZUBAT,0 db 11,SANDSHREW,RATTATA,ZUBAT,0 db 12,ZUBAT,EKANS,0 db 16,RATICATE,0 +; Cerulean City db 17,MACHOP,DROWZEE,0 +; Route 24 db 15,EKANS,ZUBAT,0 +; Game Corner db 20,RATICATE,ZUBAT,0 +; Rocket Hideout B1F db 21,DROWZEE,MACHOP,0 db 21,RATICATE,RATICATE,0 db 20,GRIMER,KOFFING,KOFFING,0 db 19,RATTATA,RATICATE,RATICATE,RATTATA,0 db 22,GRIMER,KOFFING,0 +; Rocket Hideout B2F db 17,ZUBAT,KOFFING,GRIMER,ZUBAT,RATICATE,0 +; Rocket Hideout B3F db 20,RATTATA,RATICATE,DROWZEE,0 db 21,MACHOP,MACHOP,0 +; Rocket Hideout B4F db 23,SANDSHREW,EKANS,SANDSLASH,0 db 23,EKANS,SANDSHREW,ARBOK,0 db 21,KOFFING,ZUBAT,0 +; Pokémon Tower 7F db 25,ZUBAT,ZUBAT,GOLBAT,0 db 26,KOFFING,DROWZEE,0 db 23,ZUBAT,RATTATA,RATICATE,ZUBAT,0 +; Unused db 26,DROWZEE,KOFFING,0 +; Silph Co. 2F db 29,CUBONE,ZUBAT,0 db 25,GOLBAT,ZUBAT,ZUBAT,RATICATE,ZUBAT,0 +; Silph Co. 3F db 28,RATICATE,HYPNO,RATICATE,0 +; Silph Co. 4F db 29,MACHOP,DROWZEE,0 db 28,EKANS,ZUBAT,CUBONE,0 +; Silph Co. 5F db 33,ARBOK,0 db 33,HYPNO,0 +; Silph Co. 6F db 29,MACHOP,MACHOKE,0 db 28,ZUBAT,ZUBAT,GOLBAT,0 +; Silph Co. 7F db 26,RATICATE,ARBOK,KOFFING,GOLBAT,0 db 29,CUBONE,CUBONE,0 db 29,SANDSHREW,SANDSLASH,0 +; Silph Co. 8F db 26,RATICATE,ZUBAT,GOLBAT,RATTATA,0 db 28,WEEZING,GOLBAT,KOFFING,0 +; Silph Co. 9F db 28,DROWZEE,GRIMER,MACHOP,0 db 28,GOLBAT,DROWZEE,HYPNO,0 +; Silph Co. 10F db 33,MACHOKE,0 +; Silph Co. 11F db 25,RATTATA,RATTATA,ZUBAT,RATTATA,EKANS,0 db 32,CUBONE,DROWZEE,MAROWAK,0 -if DEF(_YELLOW) -JessieJamesData: - db 14,EKANS,MEOWTH,KOFFING,0 - db 25,KOFFING,MEOWTH,EKANS,0 - db 27,MEOWTH,ARBOK,WEEZING,0 - db 31,WEEZING,ARBOK,MEOWTH,0 - db 16,KOFFING,0 - db 27,KOFFING,0 - db 29,WEEZING,0 - db 33,WEEZING,0 -endc -CooltrainerMData: ; 3a35a (e:635a) +CooltrainerMData: +; Viridian Gym db 39,NIDORINO,NIDOKING,0 +; Victory Road 3F db 43,EXEGGUTOR,CLOYSTER,ARCANINE,0 db 43,KINGLER,TENTACRUEL,BLASTOISE,0 +; Unused db 45,KINGLER,STARMIE,0 +; Victory Road 1F db 42,IVYSAUR,WARTORTLE,CHARMELEON,CHARIZARD,0 +; Unused db 44,IVYSAUR,WARTORTLE,CHARMELEON,0 db 49,NIDOKING,0 db 44,KINGLER,CLOYSTER,0 +; Viridian Gym db 39,SANDSLASH,DUGTRIO,0 db 43,RHYHORN,0 -CooltrainerFData: ; 3a385 (e:6385) +CooltrainerFData: +; Celadon Gym db 24,WEEPINBELL,GLOOM,IVYSAUR,0 +; Victory Road 3F db 43,BELLSPROUT,WEEPINBELL,VICTREEBEL,0 db 43,PARASECT,DEWGONG,CHANSEY,0 +; Unused db 46,VILEPLUME,BUTTERFREE,0 +; Victory Road 1F db 44,PERSIAN,NINETALES,0 +; Unused db 45,IVYSAUR,VENUSAUR,0 db 45,NIDORINA,NIDOQUEEN,0 db 43,PERSIAN,NINETALES,RAICHU,0 -BrunoData: ; 3a3a9 (e:63a9) +BrunoData: db $FF,53,ONIX,55,HITMONCHAN,55,HITMONLEE,56,ONIX,58,MACHAMP,0 -BrockData: ; 3a3b5 (e:63b5) -if DEF(_YELLOW) - db $FF,10,GEODUDE,12,ONIX,0 -else +BrockData: db $FF,12,GEODUDE,14,ONIX,0 -endc -MistyData: ; 3a3bb (e:63bb) +MistyData: db $FF,18,STARYU,21,STARMIE,0 -LtSurgeData: ; 3a3c1 (e:63c1) -if DEF(_YELLOW) - db $FF,28,RAICHU,0 -else +LtSurgeData: db $FF,21,VOLTORB,18,PIKACHU,24,RAICHU,0 -endc -ErikaData: ; 3a3c9 (e:63c9) -if DEF(_YELLOW) - db $FF,30,TANGELA,32,WEEPINBELL,32,GLOOM,0 -else +ErikaData: db $FF,29,VICTREEBEL,24,TANGELA,29,VILEPLUME,0 -endc -KogaData: ; 3a3d1 (e:63d1) -if DEF(_YELLOW) - db $FF,44,VENONAT,46,VENONAT,48,VENONAT,50,VENOMOTH,0 -else +KogaData: db $FF,37,KOFFING,39,MUK,37,KOFFING,43,WEEZING,0 -endc -BlaineData: ; 3a3db (e:63db) -if DEF(_YELLOW) - db $FF,48,NINETALES,50,RAPIDASH,54,ARCANINE,0 -else +BlaineData: db $FF,42,GROWLITHE,40,PONYTA,42,RAPIDASH,47,ARCANINE,0 -endc -SabrinaData: ; 3a3e5 (e:63e5) -if DEF(_YELLOW) - db $FF,50,ABRA,50,KADABRA,50,ALAKAZAM,0 -else +SabrinaData: db $FF,38,KADABRA,37,MR_MIME,38,VENOMOTH,43,ALAKAZAM,0 -endc -GentlemanData: ; 3a3ef (e:63ef) +GentlemanData: +; SS Anne 1F Rooms db 18,GROWLITHE,GROWLITHE,0 db 19,NIDORAN_M,NIDORAN_F,0 -if DEF(_YELLOW) - db 22,VOLTORB,MAGNEMITE,0 -else +; SS Anne 2F Rooms/Vermilion Gym db 23,PIKACHU,0 -endc +; Unused db 48,PRIMEAPE,0 +; SS Anne 2F Rooms db 17,GROWLITHE,PONYTA,0 -Green2Data: ; 3a401 (e:6401) -if DEF(_YELLOW) - db $FF,19,SPEAROW,16,RATTATA,18,SANDSHREW,20,EEVEE,0 - db $FF,25,FEAROW,23,SHELLDER,22,VULPIX,20,SANDSHREW,25,EEVEE,0 - db $FF,25,FEAROW,23,MAGNEMITE,22,SHELLDER,20,SANDSHREW,25,EEVEE,0 - db $FF,25,FEAROW,23,VULPIX,22,MAGNEMITE,20,SANDSHREW,25,EEVEE,0 - db $FF,38,SANDSLASH,35,NINETALES,37,CLOYSTER,35,KADABRA,40,JOLTEON,0 - db $FF,38,SANDSLASH,35,CLOYSTER,37,MAGNETON,35,KADABRA,40,FLAREON,0 - db $FF,38,SANDSLASH,35,MAGNETON,37,NINETALES,35,KADABRA,40,VAPOREON,0 - db $FF,47,SANDSLASH,45,EXEGGCUTE,45,NINETALES,47,CLOYSTER,50,KADABRA,53,JOLTEON,0 - db $FF,47,SANDSLASH,45,EXEGGCUTE,45,CLOYSTER,47,MAGNETON,50,KADABRA,53,FLAREON,0 - db $FF,47,SANDSLASH,45,EXEGGCUTE,45,MAGNETON,47,NINETALES,50,KADABRA,53,VAPOREON,0 -else +Green2Data: +; SS Anne 2F db $FF,19,PIDGEOTTO,16,RATICATE,18,KADABRA,20,WARTORTLE,0 db $FF,19,PIDGEOTTO,16,RATICATE,18,KADABRA,20,IVYSAUR,0 db $FF,19,PIDGEOTTO,16,RATICATE,18,KADABRA,20,CHARMELEON,0 +; Pokémon Tower 2F db $FF,25,PIDGEOTTO,23,GROWLITHE,22,EXEGGCUTE,20,KADABRA,25,WARTORTLE,0 db $FF,25,PIDGEOTTO,23,GYARADOS,22,GROWLITHE,20,KADABRA,25,IVYSAUR,0 db $FF,25,PIDGEOTTO,23,EXEGGCUTE,22,GYARADOS,20,KADABRA,25,CHARMELEON,0 +; Silph Co. 7F db $FF,37,PIDGEOT,38,GROWLITHE,35,EXEGGCUTE,35,ALAKAZAM,40,BLASTOISE,0 db $FF,37,PIDGEOT,38,GYARADOS,35,GROWLITHE,35,ALAKAZAM,40,VENUSAUR,0 db $FF,37,PIDGEOT,38,EXEGGCUTE,35,GYARADOS,35,ALAKAZAM,40,CHARIZARD,0 +; Route 22 db $FF,47,PIDGEOT,45,RHYHORN,45,GROWLITHE,47,EXEGGCUTE,50,ALAKAZAM,53,BLASTOISE,0 db $FF,47,PIDGEOT,45,RHYHORN,45,GYARADOS,47,GROWLITHE,50,ALAKAZAM,53,VENUSAUR,0 db $FF,47,PIDGEOT,45,RHYHORN,45,EXEGGCUTE,47,GYARADOS,50,ALAKAZAM,53,CHARIZARD,0 -endc -Green3Data: ; 3a491 (e:6491) -if DEF(_YELLOW) - db $FF,61,SANDSLASH,59,ALAKAZAM,61,EXEGGUTOR,61,CLOYSTER,63,NINETALES,65,JOLTEON,0 - db $FF,61,SANDSLASH,59,ALAKAZAM,61,EXEGGUTOR,61,MAGNETON,63,CLOYSTER,65,FLAREON,0 - db $FF,61,SANDSLASH,59,ALAKAZAM,61,EXEGGUTOR,61,NINETALES,63,MAGNETON,65,VAPOREON,0 -else +Green3Data: db $FF,61,PIDGEOT,59,ALAKAZAM,61,RHYDON,61,ARCANINE,63,EXEGGUTOR,65,BLASTOISE,0 db $FF,61,PIDGEOT,59,ALAKAZAM,61,RHYDON,61,GYARADOS,63,ARCANINE,65,VENUSAUR,0 db $FF,61,PIDGEOT,59,ALAKAZAM,61,RHYDON,61,EXEGGUTOR,63,GYARADOS,65,CHARIZARD,0 -endc -LoreleiData: ; 3a4bb (e:64bb) +LoreleiData: db $FF,54,DEWGONG,53,CLOYSTER,54,SLOWBRO,56,JYNX,56,LAPRAS,0 -ChannelerData: ; 3a4c7 (e:64c7) +ChannelerData: +; Unused db 22,GASTLY,0 db 24,GASTLY,0 db 23,GASTLY,GASTLY,0 db 24,GASTLY,0 +; Pokémon Tower 3F db 23,GASTLY,0 db 24,GASTLY,0 +; Unused db 24,HAUNTER,0 +; Pokémon Tower 3F db 22,GASTLY,0 +; Pokémon Tower 4F db 24,GASTLY,0 db 23,GASTLY,GASTLY,0 +; Unused db 24,GASTLY,0 +; Pokémon Tower 4F db 22,GASTLY,0 +; Unused db 24,GASTLY,0 +; Pokémon Tower 5F db 23,HAUNTER,0 +; Unused db 24,GASTLY,0 +; Pokémon Tower 5F db 22,GASTLY,0 db 24,GASTLY,0 db 22,HAUNTER,0 +; Pokémon Tower 6F db 22,GASTLY,GASTLY,GASTLY,0 db 24,GASTLY,0 db 24,GASTLY,0 +; Saffron Gym db 34,GASTLY,HAUNTER,0 db 38,HAUNTER,0 db 33,GASTLY,GASTLY,HAUNTER,0 -AgathaData: ; 3a516 (e:6516) +AgathaData: db $FF,56,GENGAR,56,GOLBAT,55,HAUNTER,58,ARBOK,60,GENGAR,0 -LanceData: ; 3a522 (e:6522) +LanceData: db $FF,58,GYARADOS,56,DRAGONAIR,56,DRAGONAIR,60,AERODACTYL,62,DRAGONITE,0 diff --git a/data/trainer_types.asm b/data/trainer_types.asm index 5ad1dbd0..cc7ca605 100755 --- a/data/trainer_types.asm +++ b/data/trainer_types.asm @@ -1,17 +1,17 @@ -FemaleTrainerList:: ; 3434 (0:3434) - db $c8+LASS - db $c8+JR__TRAINER_F - db $c8+BEAUTY - db $c8+COOLTRAINER_F +FemaleTrainerList:: + db OPP_LASS + db OPP_JR_TRAINER_F + db OPP_BEAUTY + db OPP_COOLTRAINER_F db $FF -EvilTrainerList:: ; 3439 (0:3439) - db $c8+JUGGLER_X - db $c8+GAMBLER - db $c8+ROCKER - db $c8+JUGGLER - db $c8+CHIEF - db $c8+SCIENTIST - db $c8+GIOVANNI - db $c8+ROCKET +EvilTrainerList:: + db OPP_JUGGLER_X + db OPP_GAMBLER + db OPP_ROCKER + db OPP_JUGGLER + db OPP_CHIEF + db OPP_SCIENTIST + db OPP_GIOVANNI + db OPP_ROCKET db $FF diff --git a/data/type_effects.asm b/data/type_effects.asm index b3207c84..1321a3d9 100755 --- a/data/type_effects.asm +++ b/data/type_effects.asm @@ -1,4 +1,4 @@ -TypeEffects: ; 3e474 (f:6474) +TypeEffects: ; format: attacking type, defending type, damage multiplier ; the multiplier is a (decimal) fixed-point number: ; 20 is ×2.0 diff --git a/data/warp_tile_ids.asm b/data/warp_tile_ids.asm index aa725d00..6fd326cc 100755 --- a/data/warp_tile_ids.asm +++ b/data/warp_tile_ids.asm @@ -1,4 +1,4 @@ -WarpTileIDPointers: ; c4cc (3:44cc) +WarpTileIDPointers: dw OverworldWarpTileIDs dw RedsHouse1WarpTileIDs dw MartWarpTileIDs @@ -24,62 +24,62 @@ WarpTileIDPointers: ; c4cc (3:44cc) dw FacilityWarpTileIDs dw PlateauWarpTileIDs -OverworldWarpTileIDs: ; c4fc (3:44fc) +OverworldWarpTileIDs: db $1B,$58,$FF -ForestGateWarpTileIDs: ; c4ff (3:44ff) -MuseumWarpTileIDs: ; c4ff (3:44ff) -GateWarpTileIDs: ; c4ff (3:44ff) +ForestGateWarpTileIDs: +MuseumWarpTileIDs: +GateWarpTileIDs: db $3B -RedsHouse1WarpTileIDs: ; c500 (3:4500) -RedsHouse2WarpTileIDs: ; c500 (3:4500) +RedsHouse1WarpTileIDs: +RedsHouse2WarpTileIDs: db $1A,$1C,$FF -MartWarpTileIDs: ; c503 (3:4503) -PokecenterWarpTileIDs: ; c503 (3:4503) +MartWarpTileIDs: +PokecenterWarpTileIDs: db $5E,$FF -ForestWarpTileIDs: ; c505 (3:4505) +ForestWarpTileIDs: db $5A,$5C,$3A,$FF -DojoWarpTileIDs: ; c509 (3:4509) -GymWarpTileIDs: ; c509 (3:4509) +DojoWarpTileIDs: +GymWarpTileIDs: db $4A,$FF -HouseWarpTileIDs: ; c50b (3:450b) +HouseWarpTileIDs: db $54,$5C,$32,$FF -ShipWarpTileIDs: ; c50f (3:450f) +ShipWarpTileIDs: db $37,$39,$1E,$4A,$FF -InteriorWarpTileIDs: ; c514 (3:4514) +InteriorWarpTileIDs: db $15,$55,$04,$FF -CavernWarpTileIDs: ; c518 (3:4518) +CavernWarpTileIDs: db $18,$1A,$22,$FF -LobbyWarpTileIDs: ; c51c (3:451c) +LobbyWarpTileIDs: db $1A,$1C,$38,$FF -MansionWarpTileIDs: ; c520 (3:4520) +MansionWarpTileIDs: db $1A,$1C,$53,$FF -LabWarpTileIDs: ; c524 (3:4524) +LabWarpTileIDs: db $34,$FF -FacilityWarpTileIDs: ; c526 (3:4526) +FacilityWarpTileIDs: db $43,$58,$20 -CemeteryWarpTileIDs: ; c529 (3:4529) +CemeteryWarpTileIDs: db $1B -UndergroundWarpTileIDs: ; c52a (3:452a) +UndergroundWarpTileIDs: db $13,$FF -PlateauWarpTileIDs: ; c52c (3:452c) +PlateauWarpTileIDs: db $1B,$3B -ShipPortWarpTileIDs: ; c52e (3:452e) -ClubWarpTileIDs: ; c52e (3:452e) +ShipPortWarpTileIDs: +ClubWarpTileIDs: db $FF diff --git a/data/wildPokemon/diglettscave.asm b/data/wildPokemon/diglettscave.asm index 0b8ec1c7..37512687 100755 --- a/data/wildPokemon/diglettscave.asm +++ b/data/wildPokemon/diglettscave.asm @@ -11,4 +11,3 @@ CaveMons: db 29,DUGTRIO db 31,DUGTRIO db $00 - diff --git a/data/wildPokemon/mansion1.asm b/data/wildPokemon/mansion1.asm index e96b9d42..22ad032b 100755 --- a/data/wildPokemon/mansion1.asm +++ b/data/wildPokemon/mansion1.asm @@ -12,8 +12,7 @@ MansionMons1: db 37,WEEZING db 39,MUK ENDC - - IF DEF(_GREEN) || DEF(_BLUE) + IF DEF(_BLUE) db 32,GRIMER db 30,GRIMER db 34,PONYTA @@ -25,19 +24,4 @@ MansionMons1: db 37,MUK db 39,WEEZING ENDC - - IF DEF(_YELLOW) - db 34,RATTATA - db 34,RATICATE - db 23,GRIMER - db 26,GROWLITHE - db 37,RATTATA - db 37,RATICATE - db 30,GROWLITHE - db 26,GRIMER - db 34,GROWLITHE - db 38,GROWLITHE - ENDC - db $00 - diff --git a/data/wildPokemon/mansion2.asm b/data/wildPokemon/mansion2.asm index 77cce408..985474fc 100755 --- a/data/wildPokemon/mansion2.asm +++ b/data/wildPokemon/mansion2.asm @@ -12,8 +12,7 @@ MansionMons2: db 39,WEEZING db 37,MUK ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 32,VULPIX db 34,GRIMER db 34,GRIMER @@ -25,32 +24,4 @@ MansionMons2: db 39,MUK db 37,WEEZING ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 32,GROWLITHE - db 34,GRIMER - db 34,GRIMER - db 30,PONYTA - db 30,GRIMER - db 32,PONYTA - db 30,KOFFING - db 28,PONYTA - db 39,MUK - db 37,WEEZING - ENDC - - IF DEF(_YELLOW) - db 37,RATTATA - db 37,RATICATE - db 26,GRIMER - db 29,GRIMER - db 40,RATTATA - db 40,RATICATE - db 32,GRIMER - db 35,GRIMER - db 35,MUK - db 38,MUK - ENDC - db $00 - diff --git a/data/wildPokemon/mansion3.asm b/data/wildPokemon/mansion3.asm index eceb0296..9c5521ae 100755 --- a/data/wildPokemon/mansion3.asm +++ b/data/wildPokemon/mansion3.asm @@ -12,8 +12,7 @@ MansionMons3: db 36,PONYTA db 42,MUK ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 31,GRIMER db 33,VULPIX db 35,GRIMER @@ -25,32 +24,4 @@ MansionMons3: db 36,PONYTA db 42,WEEZING ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 31,GRIMER - db 33,GROWLITHE - db 35,GRIMER - db 32,PONYTA - db 34,PONYTA - db 40,MUK - db 34,KOFFING - db 38,MUK - db 36,PONYTA - db 42,WEEZING - ENDC - - IF DEF(_YELLOW) - db 40,RATTATA - db 40,RATICATE - db 32,GRIMER - db 35,GRIMER - db 43,RATTATA - db 43,RATICATE - db 38,GRIMER - db 38,GRIMER - db 38,MUK - db 41,MUK - ENDC - db $00 - diff --git a/data/wildPokemon/mansionb1.asm b/data/wildPokemon/mansionb1.asm index 9dcd9893..83266ddd 100755 --- a/data/wildPokemon/mansionb1.asm +++ b/data/wildPokemon/mansionb1.asm @@ -12,8 +12,7 @@ MansionMonsB1: db 42,WEEZING db 42,MUK ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 33,GRIMER db 31,GRIMER db 35,VULPIX @@ -25,31 +24,4 @@ MansionMonsB1: db 38,MAGMAR db 42,WEEZING ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 33,GRIMER - db 31,GRIMER - db 35,GROWLITHE - db 32,PONYTA - db 31,GRIMER - db 40,MUK - db 34,PONYTA - db 35,KOFFING - db 38,MUK - db 42,WEEZING - ENDC - - IF DEF(_YELLOW) - db 35,GRIMER - db 38,GRIMER - db 37,RATICATE - db 40,RATICATE - db 41,MUK - db 43,RATICATE - db 24,DITTO - db 46,RATICATE - db 18,DITTO - db 12,DITTO - ENDC - db $00 diff --git a/data/wildPokemon/mtmoon1.asm b/data/wildPokemon/mtmoon1.asm index a8018b82..44b34c45 100755 --- a/data/wildPokemon/mtmoon1.asm +++ b/data/wildPokemon/mtmoon1.asm @@ -1,27 +1,13 @@ MoonMons1: db $0A - IF DEF(_YELLOW) - db 8,ZUBAT - db 9,ZUBAT - db 10,GEODUDE - db 6,ZUBAT - db 7,ZUBAT - db 10,ZUBAT - db 10,GEODUDE - db 11,ZUBAT - db 12,SANDSHREW - db 11,CLEFAIRY - ELSE - db 8,ZUBAT - db 7,ZUBAT - db 9,ZUBAT - db 8,GEODUDE - db 6,ZUBAT - db 10,ZUBAT - db 10,GEODUDE - db 8,PARAS - db 11,ZUBAT - db 8,CLEFAIRY - ENDC + db 8,ZUBAT + db 7,ZUBAT + db 9,ZUBAT + db 8,GEODUDE + db 6,ZUBAT + db 10,ZUBAT + db 10,GEODUDE + db 8,PARAS + db 11,ZUBAT + db 8,CLEFAIRY db $00 - diff --git a/data/wildPokemon/mtmoonb1.asm b/data/wildPokemon/mtmoonb1.asm index c78b8471..5c0d8a53 100755 --- a/data/wildPokemon/mtmoonb1.asm +++ b/data/wildPokemon/mtmoonb1.asm @@ -1,27 +1,13 @@ MoonMonsB1: db $0A - IF DEF(_YELLOW) - db 8,ZUBAT - db 9,ZUBAT - db 10,GEODUDE - db 6,ZUBAT - db 7,ZUBAT - db 10,ZUBAT - db 10,GEODUDE - db 11,ZUBAT - db 12,SANDSHREW - db 11,CLEFAIRY - ELSE - db 8,ZUBAT - db 7,ZUBAT - db 7,GEODUDE - db 8,GEODUDE - db 9,ZUBAT - db 10,PARAS - db 10,ZUBAT - db 11,ZUBAT - db 9,CLEFAIRY - db 9,GEODUDE - ENDC + db 8,ZUBAT + db 7,ZUBAT + db 7,GEODUDE + db 8,GEODUDE + db 9,ZUBAT + db 10,PARAS + db 10,ZUBAT + db 11,ZUBAT + db 9,CLEFAIRY + db 9,GEODUDE db $00 - diff --git a/data/wildPokemon/mtmoonb2.asm b/data/wildPokemon/mtmoonb2.asm index 0118a898..cbf97e7e 100755 --- a/data/wildPokemon/mtmoonb2.asm +++ b/data/wildPokemon/mtmoonb2.asm @@ -1,27 +1,13 @@ MoonMonsB2: db $0A - IF DEF(_YELLOW) - db 10,ZUBAT - db 11,GEODUDE - db 13,PARAS - db 11,ZUBAT - db 11,ZUBAT - db 12,ZUBAT - db 13,ZUBAT - db 9,CLEFAIRY - db 11,CLEFAIRY - db 13,CLEFAIRY - ELSE - db 9,ZUBAT - db 9,GEODUDE - db 10,ZUBAT - db 10,GEODUDE - db 11,ZUBAT - db 10,PARAS - db 12,PARAS - db 10,CLEFAIRY - db 12,ZUBAT - db 12,CLEFAIRY - ENDC + db 9,ZUBAT + db 9,GEODUDE + db 10,ZUBAT + db 10,GEODUDE + db 11,ZUBAT + db 10,PARAS + db 12,PARAS + db 10,CLEFAIRY + db 12,ZUBAT + db 12,CLEFAIRY db $00 - diff --git a/data/wildPokemon/nomons.asm b/data/wildPokemon/nomons.asm index 895cf2e0..ce7f7ede 100755 --- a/data/wildPokemon/nomons.asm +++ b/data/wildPokemon/nomons.asm @@ -1,4 +1,3 @@ NoMons: db $00 db $00 - diff --git a/data/wildPokemon/pokemontower1.asm b/data/wildPokemon/pokemontower1.asm index 4911c790..df951e70 100755 --- a/data/wildPokemon/pokemontower1.asm +++ b/data/wildPokemon/pokemontower1.asm @@ -1,4 +1,3 @@ TowerMons1: db $00 db $00 - diff --git a/data/wildPokemon/pokemontower2.asm b/data/wildPokemon/pokemontower2.asm index a849668d..dcbe0da0 100755 --- a/data/wildPokemon/pokemontower2.asm +++ b/data/wildPokemon/pokemontower2.asm @@ -1,4 +1,3 @@ TowerMons2: db $00 db $00 - diff --git a/data/wildPokemon/pokemontower3.asm b/data/wildPokemon/pokemontower3.asm index 4e3a7c62..135ed84f 100755 --- a/data/wildPokemon/pokemontower3.asm +++ b/data/wildPokemon/pokemontower3.asm @@ -1,29 +1,13 @@ TowerMons3: db $0A - - IF DEF(_YELLOW) - db 20,GASTLY - db 21,GASTLY - db 22,GASTLY - db 23,GASTLY - db 24,GASTLY - db 19,GASTLY - db 18,GASTLY - db 25,GASTLY - db 20,HAUNTER - db 25,HAUNTER - ELSE - db 20,GASTLY - db 21,GASTLY - db 22,GASTLY - db 23,GASTLY - db 19,GASTLY - db 18,GASTLY - db 24,GASTLY - db 20,CUBONE - db 22,CUBONE - db 25,HAUNTER - ENDC - + db 20,GASTLY + db 21,GASTLY + db 22,GASTLY + db 23,GASTLY + db 19,GASTLY + db 18,GASTLY + db 24,GASTLY + db 20,CUBONE + db 22,CUBONE + db 25,HAUNTER db $00 - diff --git a/data/wildPokemon/pokemontower4.asm b/data/wildPokemon/pokemontower4.asm index e0de809f..0c84b0cf 100755 --- a/data/wildPokemon/pokemontower4.asm +++ b/data/wildPokemon/pokemontower4.asm @@ -1,29 +1,13 @@ TowerMons4: db $0A - - IF DEF(_YELLOW) - db 20,GASTLY - db 21,GASTLY - db 22,GASTLY - db 23,GASTLY - db 24,GASTLY - db 19,GASTLY - db 18,GASTLY - db 25,GASTLY - db 20,HAUNTER - db 25,HAUNTER - ELSE - db 20,GASTLY - db 21,GASTLY - db 22,GASTLY - db 23,GASTLY - db 19,GASTLY - db 18,GASTLY - db 25,HAUNTER - db 20,CUBONE - db 22,CUBONE - db 24,GASTLY - ENDC - + db 20,GASTLY + db 21,GASTLY + db 22,GASTLY + db 23,GASTLY + db 19,GASTLY + db 18,GASTLY + db 25,HAUNTER + db 20,CUBONE + db 22,CUBONE + db 24,GASTLY db $00 - diff --git a/data/wildPokemon/pokemontower5.asm b/data/wildPokemon/pokemontower5.asm index 9f97b98e..440dbf8d 100755 --- a/data/wildPokemon/pokemontower5.asm +++ b/data/wildPokemon/pokemontower5.asm @@ -1,29 +1,13 @@ TowerMons5: db $0A - - IF DEF(_YELLOW) - db 22,GASTLY - db 23,GASTLY - db 24,GASTLY - db 25,GASTLY - db 26,GASTLY - db 21,GASTLY - db 20,CUBONE - db 27,GASTLY - db 22,HAUNTER - db 27,HAUNTER - ELSE - db 20,GASTLY - db 21,GASTLY - db 22,GASTLY - db 23,GASTLY - db 19,GASTLY - db 18,GASTLY - db 25,HAUNTER - db 20,CUBONE - db 22,CUBONE - db 24,GASTLY - ENDC - + db 20,GASTLY + db 21,GASTLY + db 22,GASTLY + db 23,GASTLY + db 19,GASTLY + db 18,GASTLY + db 25,HAUNTER + db 20,CUBONE + db 22,CUBONE + db 24,GASTLY db $00 - diff --git a/data/wildPokemon/pokemontower6.asm b/data/wildPokemon/pokemontower6.asm index b97e2ddd..553fdb5d 100755 --- a/data/wildPokemon/pokemontower6.asm +++ b/data/wildPokemon/pokemontower6.asm @@ -1,29 +1,13 @@ TowerMons6: db $0F - - IF DEF(_YELLOW) - db 22,GASTLY - db 23,GASTLY - db 24,GASTLY - db 25,GASTLY - db 26,GASTLY - db 21,GASTLY - db 22,CUBONE - db 27,GASTLY - db 22,HAUNTER - db 27,HAUNTER - ELSE - db 21,GASTLY - db 22,GASTLY - db 23,GASTLY - db 24,GASTLY - db 20,GASTLY - db 19,GASTLY - db 26,HAUNTER - db 22,CUBONE - db 24,CUBONE - db 28,HAUNTER - ENDC - + db 21,GASTLY + db 22,GASTLY + db 23,GASTLY + db 24,GASTLY + db 20,GASTLY + db 19,GASTLY + db 26,HAUNTER + db 22,CUBONE + db 24,CUBONE + db 28,HAUNTER db $00 - diff --git a/data/wildPokemon/pokemontower7.asm b/data/wildPokemon/pokemontower7.asm index b0d94534..0f7e66e9 100755 --- a/data/wildPokemon/pokemontower7.asm +++ b/data/wildPokemon/pokemontower7.asm @@ -1,29 +1,13 @@ TowerMons7: db $0F - - IF DEF(_YELLOW) - db 24,GASTLY - db 25,GASTLY - db 26,GASTLY - db 27,GASTLY - db 28,GASTLY - db 23,GASTLY - db 24,CUBONE - db 29,GASTLY - db 24,HAUNTER - db 29,HAUNTER - ELSE - db 21,GASTLY - db 22,GASTLY - db 23,GASTLY - db 24,GASTLY - db 20,GASTLY - db 28,HAUNTER - db 22,CUBONE - db 24,CUBONE - db 28,HAUNTER - db 30,HAUNTER - ENDC - + db 21,GASTLY + db 22,GASTLY + db 23,GASTLY + db 24,GASTLY + db 20,GASTLY + db 28,HAUNTER + db 22,CUBONE + db 24,CUBONE + db 28,HAUNTER + db 30,HAUNTER db $00 - diff --git a/data/wildPokemon/powerplant.asm b/data/wildPokemon/powerplant.asm index f956fcf2..35eece95 100755 --- a/data/wildPokemon/powerplant.asm +++ b/data/wildPokemon/powerplant.asm @@ -1,34 +1,19 @@ PowerPlantMons: db $0A - - IF DEF(_YELLOW) - db 30,MAGNEMITE - db 35,MAGNEMITE - db 33,MAGNETON - db 33,VOLTORB - db 37,VOLTORB - db 33,GRIMER - db 37,GRIMER - db 38,MAGNETON - db 33,MUK - db 37,MUK - ELSE - db 21,VOLTORB - db 21,MAGNEMITE - db 20,PIKACHU - db 24,PIKACHU - db 23,MAGNEMITE - db 23,VOLTORB - db 32,MAGNETON - db 35,MAGNETON - IF DEF(_RED) - db 33,ELECTABUZZ - db 36,ELECTABUZZ - ENDC - IF DEF(_GREEN) || DEF(_BLUE) - db 33,RAICHU - db 36,RAICHU - ENDC + db 21,VOLTORB + db 21,MAGNEMITE + db 20,PIKACHU + db 24,PIKACHU + db 23,MAGNEMITE + db 23,VOLTORB + db 32,MAGNETON + db 35,MAGNETON + IF DEF(_RED) + db 33,ELECTABUZZ + db 36,ELECTABUZZ + ENDC + IF DEF(_BLUE) + db 33,RAICHU + db 36,RAICHU ENDC - db $00 diff --git a/data/wildPokemon/rocktunnel1.asm b/data/wildPokemon/rocktunnel1.asm index 992a4e73..a36f2092 100755 --- a/data/wildPokemon/rocktunnel1.asm +++ b/data/wildPokemon/rocktunnel1.asm @@ -1,34 +1,13 @@ TunnelMonsB1: db $0F - - IF DEF(_YELLOW) - db 15,ZUBAT - db 16,GEODUDE - db 17,ZUBAT - db 19,ZUBAT - db 18,GEODUDE - db 20,GEODUDE - db 21,ZUBAT - db 17,MACHOP - db 19,MACHOP - db 21,MACHOP - ELSE - db 16,ZUBAT - db 17,ZUBAT - db 17,GEODUDE - db 15,MACHOP - db 16,GEODUDE - IF DEF(_RED) || DEF(_GREEN) || (DEF(_BLUE) && !DEF(_JAPAN)) - db 18,ZUBAT - ENDC - IF (DEF(_BLUE) && DEF(_JAPAN)) - db 18,DITTO - ENDC - db 15,ZUBAT - db 17,MACHOP - db 13,ONIX - db 15,ONIX - ENDC - + db 16,ZUBAT + db 17,ZUBAT + db 17,GEODUDE + db 15,MACHOP + db 16,GEODUDE + db 18,ZUBAT + db 15,ZUBAT + db 17,MACHOP + db 13,ONIX + db 15,ONIX db $00 - diff --git a/data/wildPokemon/rocktunnel2.asm b/data/wildPokemon/rocktunnel2.asm index 0a47d984..2fc7ef94 100755 --- a/data/wildPokemon/rocktunnel2.asm +++ b/data/wildPokemon/rocktunnel2.asm @@ -1,34 +1,13 @@ TunnelMonsB2: db $0F - - IF DEF(_YELLOW) - db 20,ZUBAT - db 17,GEODUDE - db 18,MACHOP - db 21,ZUBAT - db 22,ZUBAT - db 21,GEODUDE - db 20,MACHOP - db 14,ONIX - db 18,ONIX - db 22,ONIX - ELSE - db 16,ZUBAT - db 17,ZUBAT - db 17,GEODUDE - db 15,MACHOP - db 16,GEODUDE - IF DEF(_RED) || DEF(_GREEN) || (DEF(_BLUE) && !DEF(_JAPAN)) - db 18,ZUBAT - ENDC - IF DEF(_BLUE) && DEF(_JAPAN) - db 18,DITTO - ENDC - db 17,MACHOP - db 17,ONIX - db 13,ONIX - db 18,GEODUDE - ENDC - + db 16,ZUBAT + db 17,ZUBAT + db 17,GEODUDE + db 15,MACHOP + db 16,GEODUDE + db 18,ZUBAT + db 17,MACHOP + db 17,ONIX + db 13,ONIX + db 18,GEODUDE db $00 - diff --git a/data/wildPokemon/route1.asm b/data/wildPokemon/route1.asm index 8e5b6897..f618c34f 100755 --- a/data/wildPokemon/route1.asm +++ b/data/wildPokemon/route1.asm @@ -1,27 +1,13 @@ Route1Mons: db $19 - IF DEF(_YELLOW) - db 3,PIDGEY - db 4,PIDGEY - db 2,RATTATA - db 3,RATTATA - db 2,PIDGEY - db 3,PIDGEY - db 5,PIDGEY - db 4,RATTATA - db 6,PIDGEY - db 7,PIDGEY - ELSE - db 3,PIDGEY - db 3,RATTATA - db 3,RATTATA - db 2,RATTATA - db 2,PIDGEY - db 3,PIDGEY - db 3,PIDGEY - db 4,RATTATA - db 4,PIDGEY - db 5,PIDGEY - ENDC + db 3,PIDGEY + db 3,RATTATA + db 3,RATTATA + db 2,RATTATA + db 2,PIDGEY + db 3,PIDGEY + db 3,PIDGEY + db 4,RATTATA + db 4,PIDGEY + db 5,PIDGEY db $00 - diff --git a/data/wildPokemon/route10.asm b/data/wildPokemon/route10.asm index 7cfaf25c..34e0b5ee 100755 --- a/data/wildPokemon/route10.asm +++ b/data/wildPokemon/route10.asm @@ -1,6 +1,5 @@ Route10Mons: db $0F - IF DEF(_RED) db 16,VOLTORB db 16,SPEAROW @@ -13,8 +12,7 @@ Route10Mons: db 13,EKANS db 17,EKANS ENDC - - IF DEF(_BLUE) || DEF(_GREEN) + IF DEF(_BLUE) db 16,VOLTORB db 16,SPEAROW db 14,VOLTORB @@ -26,19 +24,4 @@ Route10Mons: db 13,SANDSHREW db 17,SANDSHREW ENDC - - IF DEF(_YELLOW) - db 16,MAGNEMITE - db 18,RATTATA - db 18,MAGNEMITE - db 20,MAGNEMITE - db 17,NIDORAN_M - db 17,NIDORAN_F - db 22,MAGNEMITE - db 20,RATICATE - db 16,MACHOP - db 18,MACHOP - ENDC - db $00 - diff --git a/data/wildPokemon/route11.asm b/data/wildPokemon/route11.asm index 66c52c20..9e4e3644 100755 --- a/data/wildPokemon/route11.asm +++ b/data/wildPokemon/route11.asm @@ -1,6 +1,5 @@ Route11Mons: db $0F - IF DEF(_RED) db 14,EKANS db 15,SPEAROW @@ -13,8 +12,7 @@ Route11Mons: db 11,DROWZEE db 15,DROWZEE ENDC - - IF DEF(_GREEN) || DEF(_BLUE) + IF DEF(_BLUE) db 14,SANDSHREW db 15,SPEAROW db 12,SANDSHREW @@ -26,19 +24,4 @@ Route11Mons: db 11,DROWZEE db 15,DROWZEE ENDC - - IF DEF(_YELLOW) - db 16,PIDGEY - db 15,RATTATA - db 18,PIDGEY - db 15,DROWZEE - db 17,RATTATA - db 17,DROWZEE - db 18,PIDGEOTTO - db 20,PIDGEOTTO - db 19,DROWZEE - db 17,RATICATE - ENDC - db $00 - diff --git a/data/wildPokemon/route12.asm b/data/wildPokemon/route12.asm index 7f5e47fe..45dfbc9d 100755 --- a/data/wildPokemon/route12.asm +++ b/data/wildPokemon/route12.asm @@ -1,7 +1,6 @@ Route12Mons: db $0F - - IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_RED) db 24,ODDISH db 25,PIDGEY db 23,PIDGEY @@ -12,10 +11,8 @@ Route12Mons: db 27,PIDGEY db 28,GLOOM db 30,GLOOM - db $00 ENDC - - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_BLUE) db 24,BELLSPROUT db 25,PIDGEY db 23,PIDGEY @@ -26,31 +23,5 @@ Route12Mons: db 27,PIDGEY db 28,WEEPINBELL db 30,WEEPINBELL - db $00 ENDC - - IF DEF(_YELLOW) - db 25,ODDISH - db 25,BELLSPROUT - db 28,PIDGEY - db 28,PIDGEOTTO - db 27,ODDISH - db 27,BELLSPROUT - db 29,GLOOM - db 29,WEEPINBELL - db 26,FARFETCH_D - db 31,FARFETCH_D - - db $03 - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWBRO - db 20,SLOWBRO - ENDC - + db $00 diff --git a/data/wildPokemon/route13.asm b/data/wildPokemon/route13.asm index 1b694f36..2a1a6cb5 100755 --- a/data/wildPokemon/route13.asm +++ b/data/wildPokemon/route13.asm @@ -1,5 +1,5 @@ Route13Mons: - IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_RED) db $14 db 24,ODDISH db 25,PIDGEY @@ -11,10 +11,8 @@ Route13Mons: db 25,DITTO db 28,GLOOM db 30,GLOOM - db $00 ENDC - - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_BLUE) db $14 db 24,BELLSPROUT db 25,PIDGEY @@ -26,32 +24,5 @@ Route13Mons: db 25,DITTO db 28,WEEPINBELL db 30,WEEPINBELL - db $00 ENDC - - IF DEF(_YELLOW) - db $0F - db 25,ODDISH - db 25,BELLSPROUT - db 28,PIDGEOTTO - db 28,PIDGEY - db 27,ODDISH - db 27,BELLSPROUT - db 29,GLOOM - db 29,WEEPINBELL - db 26,FARFETCH_D - db 31,FARFETCH_D - - db $03 - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWPOKE - db 15,SLOWBRO - db 20,SLOWBRO - ENDC - + db $00 diff --git a/data/wildPokemon/route14.asm b/data/wildPokemon/route14.asm index 999981af..aad5aa48 100755 --- a/data/wildPokemon/route14.asm +++ b/data/wildPokemon/route14.asm @@ -1,6 +1,6 @@ Route14Mons: db $0F - IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_RED) db 24,ODDISH db 26,PIDGEY db 23,DITTO @@ -12,8 +12,7 @@ Route14Mons: db 28,PIDGEOTTO db 30,PIDGEOTTO ENDC - - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_BLUE) db 24,BELLSPROUT db 26,PIDGEY db 23,DITTO @@ -25,19 +24,4 @@ Route14Mons: db 28,PIDGEOTTO db 30,PIDGEOTTO ENDC - - IF DEF(_YELLOW) - db 26,ODDISH - db 26,BELLSPROUT - db 24,VENONAT - db 30,PIDGEOTTO - db 28,ODDISH - db 28,BELLSPROUT - db 30,GLOOM - db 30,WEEPINBELL - db 27,VENONAT - db 30,VENOMOTH - ENDC - db $00 - diff --git a/data/wildPokemon/route15.asm b/data/wildPokemon/route15.asm index d924052a..b4762230 100755 --- a/data/wildPokemon/route15.asm +++ b/data/wildPokemon/route15.asm @@ -1,6 +1,6 @@ Route15Mons: db $0F - IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_RED) db 24,ODDISH db 26,DITTO db 23,PIDGEY @@ -12,8 +12,7 @@ Route15Mons: db 28,PIDGEOTTO db 30,PIDGEOTTO ENDC - - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_BLUE) db 24,BELLSPROUT db 26,DITTO db 23,PIDGEY @@ -25,19 +24,4 @@ Route15Mons: db 28,PIDGEOTTO db 30,PIDGEOTTO ENDC - - IF DEF(_YELLOW) - db 26,ODDISH - db 26,BELLSPROUT - db 24,VENONAT - db 32,PIDGEOTTO - db 28,ODDISH - db 28,BELLSPROUT - db 30,GLOOM - db 30,WEEPINBELL - db 27,VENONAT - db 30,VENOMOTH - ENDC - db $00 - diff --git a/data/wildPokemon/route16.asm b/data/wildPokemon/route16.asm index 468e3777..c2421c50 100755 --- a/data/wildPokemon/route16.asm +++ b/data/wildPokemon/route16.asm @@ -1,28 +1,13 @@ Route16Mons: db $19 - IF DEF(_YELLOW) - db 22,SPEAROW - db 22,DODUO - db 23,RATTATA - db 24,DODUO - db 24,RATTATA - db 26,DODUO - db 23,SPEAROW - db 24,FEAROW - db 25,RATICATE - db 26,RATICATE - ELSE - db 20,SPEAROW - db 22,SPEAROW - db 18,RATTATA - db 20,DODUO - db 20,RATTATA - db 18,DODUO - db 22,DODUO - db 22,RATTATA - db 23,RATICATE - db 25,RATICATE - ENDC - + db 20,SPEAROW + db 22,SPEAROW + db 18,RATTATA + db 20,DODUO + db 20,RATTATA + db 18,DODUO + db 22,DODUO + db 22,RATTATA + db 23,RATICATE + db 25,RATICATE db $00 - diff --git a/data/wildPokemon/route17.asm b/data/wildPokemon/route17.asm index 36283a99..8dffd9a3 100755 --- a/data/wildPokemon/route17.asm +++ b/data/wildPokemon/route17.asm @@ -1,29 +1,13 @@ Route17Mons: db $19 - - IF DEF(_YELLOW) - db 26,DODUO - db 27,FEAROW - db 27,DODUO - db 28,DODUO - db 28,PONYTA - db 30,PONYTA - db 29,FEAROW - db 28,DODUO - db 32,PONYTA - db 29,DODRIO - ELSE - db 20,SPEAROW - db 22,SPEAROW - db 25,RATICATE - db 24,DODUO - db 27,RATICATE - db 26,DODUO - db 28,DODUO - db 29,RATICATE - db 25,FEAROW - db 27,FEAROW - ENDC - + db 20,SPEAROW + db 22,SPEAROW + db 25,RATICATE + db 24,DODUO + db 27,RATICATE + db 26,DODUO + db 28,DODUO + db 29,RATICATE + db 25,FEAROW + db 27,FEAROW db $00 - diff --git a/data/wildPokemon/route18.asm b/data/wildPokemon/route18.asm index e16fc8ac..47bd247d 100755 --- a/data/wildPokemon/route18.asm +++ b/data/wildPokemon/route18.asm @@ -1,29 +1,13 @@ Route18Mons: db $19 - - IF DEF(_YELLOW) - db 22,SPEAROW - db 22,DODUO - db 23,RATTATA - db 24,DODUO - db 24,RATTATA - db 26,DODUO - db 23,SPEAROW - db 24,FEAROW - db 25,RATICATE - db 26,RATICATE - ELSE - db 20,SPEAROW - db 22,SPEAROW - db 25,RATICATE - db 24,DODUO - db 25,FEAROW - db 26,DODUO - db 28,DODUO - db 29,RATICATE - db 27,FEAROW - db 29,FEAROW - ENDC - + db 20,SPEAROW + db 22,SPEAROW + db 25,RATICATE + db 24,DODUO + db 25,FEAROW + db 26,DODUO + db 28,DODUO + db 29,RATICATE + db 27,FEAROW + db 29,FEAROW db $00 - diff --git a/data/wildPokemon/route2.asm b/data/wildPokemon/route2.asm index 8f9eb4e5..fb3a5e82 100755 --- a/data/wildPokemon/route2.asm +++ b/data/wildPokemon/route2.asm @@ -1,39 +1,24 @@ Route2Mons: db $19 - - IF DEF(_YELLOW) - db 3,RATTATA - db 3,PIDGEY - db 4,RATTATA - db 4,NIDORAN_M - db 4,NIDORAN_F - db 5,PIDGEY - db 6,NIDORAN_M - db 6,NIDORAN_F - db 7,PIDGEY - db 7,PIDGEY - ELSE - db 3,RATTATA - db 3,PIDGEY - db 4,PIDGEY - db 4,RATTATA - db 5,PIDGEY - if DEF(_RED) - db 3,WEEDLE - ENDC - if DEF(_BLUE) - db 3,CATERPIE - ENDC - db 2,RATTATA - db 5,RATTATA - if DEF(_RED) - db 4,WEEDLE - db 5,WEEDLE - ENDC - if DEF(_BLUE) - db 4,CATERPIE - db 5,CATERPIE - ENDC + db 3,RATTATA + db 3,PIDGEY + db 4,PIDGEY + db 4,RATTATA + db 5,PIDGEY + if DEF(_RED) + db 3,WEEDLE + ENDC + if DEF(_BLUE) + db 3,CATERPIE + ENDC + db 2,RATTATA + db 5,RATTATA + if DEF(_RED) + db 4,WEEDLE + db 5,WEEDLE + ENDC + if DEF(_BLUE) + db 4,CATERPIE + db 5,CATERPIE ENDC db $00 - diff --git a/data/wildPokemon/route21.asm b/data/wildPokemon/route21.asm index 7017081d..3cc73ba0 100755 --- a/data/wildPokemon/route21.asm +++ b/data/wildPokemon/route21.asm @@ -1,30 +1,15 @@ Route21Mons: db $19 - - IF DEF(_YELLOW) - db 15,PIDGEY - db 13,RATTATA - db 13,PIDGEY - db 11,PIDGEY - db 17,PIDGEY - db 15,RATTATA - db 15,RATICATE - db 17,PIDGEOTTO - db 19,PIDGEOTTO - db 15,PIDGEOTTO - ELSE - db 21,RATTATA - db 23,PIDGEY - db 30,RATICATE - db 23,RATTATA - db 21,PIDGEY - db 30,PIDGEOTTO - db 32,PIDGEOTTO - db 28,TANGELA - db 30,TANGELA - db 32,TANGELA - ENDC - + db 21,RATTATA + db 23,PIDGEY + db 30,RATICATE + db 23,RATTATA + db 21,PIDGEY + db 30,PIDGEOTTO + db 32,PIDGEOTTO + db 28,TANGELA + db 30,TANGELA + db 32,TANGELA db $05 db 5,TENTACOOL db 10,TENTACOOL @@ -36,4 +21,3 @@ Route21Mons: db 30,TENTACOOL db 35,TENTACOOL db 40,TENTACOOL - diff --git a/data/wildPokemon/route22.asm b/data/wildPokemon/route22.asm index 78c5631a..750a2f4e 100755 --- a/data/wildPokemon/route22.asm +++ b/data/wildPokemon/route22.asm @@ -1,6 +1,6 @@ Route22Mons: db $19 - IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_RED) db 3,RATTATA db 3,NIDORAN_M db 4,RATTATA @@ -12,7 +12,7 @@ Route22Mons: db 3,NIDORAN_F db 4,NIDORAN_F ENDC - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_BLUE) db 3,RATTATA db 3,NIDORAN_F db 4,RATTATA @@ -24,17 +24,4 @@ Route22Mons: db 3,NIDORAN_M db 4,NIDORAN_M ENDC - IF DEF(_YELLOW) - db 2,NIDORAN_M - db 2,NIDORAN_F - db 3,MANKEY - db 3,RATTATA - db 4,NIDORAN_M - db 4,NIDORAN_F - db 5,MANKEY - db 2,SPEAROW - db 4,SPEAROW - db 6,SPEAROW - ENDC db $00 - diff --git a/data/wildPokemon/route23.asm b/data/wildPokemon/route23.asm index 1320868c..a96a0d3c 100755 --- a/data/wildPokemon/route23.asm +++ b/data/wildPokemon/route23.asm @@ -1,39 +1,23 @@ Route23Mons: db $0A - - IF DEF(_YELLOW) - db 41,NIDORINO - db 41,NIDORINA - db 36,MANKEY - db 44,NIDORINO - db 44,NIDORINA - db 40,FEAROW - db 41,MANKEY - db 45,FEAROW - db 41,PRIMEAPE - db 46,PRIMEAPE - ELSE - IF DEF(_RED) - db 26,EKANS - ENDC - IF !DEF(_RED) - db 26,SANDSHREW - ENDC - db 33,DITTO - db 26,SPEAROW - db 38,FEAROW - db 38,DITTO - db 38,FEAROW - IF DEF(_RED) - db 41,ARBOK - ENDC - IF !DEF(_RED) - db 41,SANDSLASH - ENDC - db 43,DITTO - db 41,FEAROW - db 43,FEAROW + IF DEF(_RED) + db 26,EKANS ENDC - + IF !DEF(_RED) + db 26,SANDSHREW + ENDC + db 33,DITTO + db 26,SPEAROW + db 38,FEAROW + db 38,DITTO + db 38,FEAROW + IF DEF(_RED) + db 41,ARBOK + ENDC + IF !DEF(_RED) + db 41,SANDSLASH + ENDC + db 43,DITTO + db 41,FEAROW + db 43,FEAROW db $00 - diff --git a/data/wildPokemon/route24.asm b/data/wildPokemon/route24.asm index d586927f..3a745f36 100755 --- a/data/wildPokemon/route24.asm +++ b/data/wildPokemon/route24.asm @@ -1,6 +1,5 @@ Route24Mons: db $19 - IF DEF(_RED) db 7,WEEDLE db 8,KAKUNA @@ -13,8 +12,7 @@ Route24Mons: db 8,ABRA db 12,ABRA ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 7,CATERPIE db 8,METAPOD db 12,PIDGEY @@ -26,32 +24,4 @@ Route24Mons: db 8,ABRA db 12,ABRA ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 7,CATERPIE - db 8,METAPOD - db 12,PIDGEY - db 12,ODDISH - db 13,ODDISH - db 10,ABRA - db 14,ODDISH - db 13,PIDGEY - db 8,ABRA - db 12,ABRA - ENDC - - IF DEF(_YELLOW) - db 12,ODDISH - db 12,BELLSPROUT - db 13,PIDGEY - db 14,ODDISH - db 14,BELLSPROUT - db 15,PIDGEY - db 13,VENONAT - db 16,VENONAT - db 17,PIDGEY - db 17,PIDGEOTTO - ENDC - db $00 - diff --git a/data/wildPokemon/route25.asm b/data/wildPokemon/route25.asm index 4609c7cd..4884fa64 100755 --- a/data/wildPokemon/route25.asm +++ b/data/wildPokemon/route25.asm @@ -1,6 +1,5 @@ Route25Mons: db $0F - IF DEF(_RED) db 8,WEEDLE db 9,KAKUNA @@ -13,8 +12,7 @@ Route25Mons: db 7,METAPOD db 8,CATERPIE ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 8,CATERPIE db 9,METAPOD db 13,PIDGEY @@ -26,32 +24,4 @@ Route25Mons: db 7,KAKUNA db 8,WEEDLE ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 8,CATERPIE - db 9,METAPOD - db 13,PIDGEY - db 12,ODDISH - db 13,ODDISH - db 12,ABRA - db 14,ODDISH - db 10,ABRA - db 7,KAKUNA - db 8,WEEDLE - ENDC - - IF DEF(_YELLOW) - db 12,ODDISH - db 12,BELLSPROUT - db 13,PIDGEY - db 14,ODDISH - db 14,BELLSPROUT - db 15,PIDGEY - db 13,VENONAT - db 16,VENONAT - db 17,PIDGEY - db 17,PIDGEOTTO - ENDC - db $00 - diff --git a/data/wildPokemon/route3.asm b/data/wildPokemon/route3.asm index fe7c5da9..dea820a4 100755 --- a/data/wildPokemon/route3.asm +++ b/data/wildPokemon/route3.asm @@ -1,27 +1,13 @@ Route3Mons: db $14 - IF DEF(_YELLOW) - db 8,SPEAROW - db 9,SPEAROW - db 9,MANKEY - db 10,SPEAROW - db 8,SANDSHREW - db 10,RATTATA - db 10,SANDSHREW - db 12,RATTATA - db 11,SPEAROW - db 12,SPEAROW - ELSE - db 6,PIDGEY - db 5,SPEAROW - db 7,PIDGEY - db 6,SPEAROW - db 7,SPEAROW - db 8,PIDGEY - db 8,SPEAROW - db 3,JIGGLYPUFF - db 5,JIGGLYPUFF - db 7,JIGGLYPUFF - ENDC + db 6,PIDGEY + db 5,SPEAROW + db 7,PIDGEY + db 6,SPEAROW + db 7,SPEAROW + db 8,PIDGEY + db 8,SPEAROW + db 3,JIGGLYPUFF + db 5,JIGGLYPUFF + db 7,JIGGLYPUFF db $00 - diff --git a/data/wildPokemon/route4.asm b/data/wildPokemon/route4.asm index 40c3b7b5..624d58de 100755 --- a/data/wildPokemon/route4.asm +++ b/data/wildPokemon/route4.asm @@ -1,6 +1,5 @@ Route4Mons: db $14 - IF DEF(_RED) db 10,RATTATA db 10,SPEAROW @@ -13,8 +12,7 @@ Route4Mons: db 8,EKANS db 12,EKANS ENDC - - IF DEF(_BLUE) || DEF(_GREEN) + IF DEF(_BLUE) db 10,RATTATA db 10,SPEAROW db 8,RATTATA @@ -26,19 +24,4 @@ Route4Mons: db 8,SANDSHREW db 12,SANDSHREW ENDC - - IF DEF(_YELLOW) - db 8,SPEAROW - db 9,SPEAROW - db 9,MANKEY - db 10,SPEAROW - db 8,SANDSHREW - db 10,RATTATA - db 10,SANDSHREW - db 12,RATTATA - db 11,SPEAROW - db 12,SPEAROW - ENDC - db $00 - diff --git a/data/wildPokemon/route5.asm b/data/wildPokemon/route5.asm index aa67ca87..cb8c583b 100755 --- a/data/wildPokemon/route5.asm +++ b/data/wildPokemon/route5.asm @@ -1,6 +1,5 @@ Route5Mons: db $0F - IF DEF(_RED) db 13,ODDISH db 13,PIDGEY @@ -13,8 +12,7 @@ Route5Mons: db 14,MANKEY db 16,MANKEY ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 13,BELLSPROUT db 13,PIDGEY db 15,PIDGEY @@ -26,32 +24,4 @@ Route5Mons: db 14,MEOWTH db 16,MEOWTH ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 13,ODDISH - db 13,PIDGEY - db 15,PIDGEY - db 10,MEOWTH - db 12,MEOWTH - db 15,ODDISH - db 16,ODDISH - db 16,PIDGEY - db 14,MEOWTH - db 16,MEOWTH - ENDC - - IF DEF(_YELLOW) - db 15,PIDGEY - db 14,RATTATA - db 7,ABRA - db 16,PIDGEY - db 16,RATTATA - db 17,PIDGEY - db 17,PIDGEOTTO - db 3,JIGGLYPUFF - db 5,JIGGLYPUFF - db 7,JIGGLYPUFF - ENDC - db $00 - diff --git a/data/wildPokemon/route6.asm b/data/wildPokemon/route6.asm index 86e0c05f..92512ffb 100755 --- a/data/wildPokemon/route6.asm +++ b/data/wildPokemon/route6.asm @@ -1,6 +1,5 @@ Route6Mons: db $0F - IF DEF(_RED) db 13,ODDISH db 13,PIDGEY @@ -12,10 +11,8 @@ Route6Mons: db 16,PIDGEY db 14,MANKEY db 16,MANKEY - db $00 ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 13,BELLSPROUT db 13,PIDGEY db 15,PIDGEY @@ -26,45 +23,5 @@ Route6Mons: db 16,PIDGEY db 14,MEOWTH db 16,MEOWTH - db $00 ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 13,ODDISH - db 13,PIDGEY - db 15,PIDGEY - db 10,MEOWTH - db 12,MEOWTH - db 15,ODDISH - db 16,ODDISH - db 16,PIDGEY - db 14,MEOWTH - db 16,MEOWTH - db $00 - ENDC - - IF DEF(_YELLOW) - db 15,PIDGEY - db 14,RATTATA - db 7,ABRA - db 16,PIDGEY - db 16,RATTATA - db 17,PIDGEY - db 17,PIDGEOTTO - db 3,JIGGLYPUFF - db 5,JIGGLYPUFF - db 7,JIGGLYPUFF - - db $03 - db 15,PSYDUCK - db 15,PSYDUCK - db 15,PSYDUCK - db 15,PSYDUCK - db 15,PSYDUCK - db 15,PSYDUCK - db 15,PSYDUCK - db 15,PSYDUCK - db 15,GOLDUCK - db 20,GOLDUCK - ENDC - + db $00 diff --git a/data/wildPokemon/route7.asm b/data/wildPokemon/route7.asm index 505b632b..559c98ee 100755 --- a/data/wildPokemon/route7.asm +++ b/data/wildPokemon/route7.asm @@ -1,6 +1,5 @@ Route7Mons: db $0F - IF DEF(_RED) db 19,PIDGEY db 19,ODDISH @@ -13,8 +12,7 @@ Route7Mons: db 19,MANKEY db 20,MANKEY ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 19,PIDGEY db 19,BELLSPROUT db 17,MEOWTH @@ -26,32 +24,4 @@ Route7Mons: db 19,MEOWTH db 20,MEOWTH ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 19,PIDGEY - db 19,ODDISH - db 17,MEOWTH - db 22,ODDISH - db 22,PIDGEY - db 18,MEOWTH - db 18,GROWLITHE - db 20,GROWLITHE - db 19,MEOWTH - db 20,MEOWTH - ENDC - - IF DEF(_YELLOW) - db 20,PIDGEY - db 22,PIDGEY - db 20,RATTATA - db 15,ABRA - db 19,ABRA - db 24,PIDGEOTTO - db 26,ABRA - db 19,JIGGLYPUFF - db 24,JIGGLYPUFF - db 24,JIGGLYPUFF - ENDC - db $00 - diff --git a/data/wildPokemon/route8.asm b/data/wildPokemon/route8.asm index 67905134..8a0bfa31 100755 --- a/data/wildPokemon/route8.asm +++ b/data/wildPokemon/route8.asm @@ -1,6 +1,5 @@ Route8Mons: db $0F - IF DEF(_RED) db 18,PIDGEY db 18,MANKEY @@ -13,8 +12,7 @@ Route8Mons: db 15,GROWLITHE db 18,GROWLITHE ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 18,PIDGEY db 18,MEOWTH db 17,SANDSHREW @@ -26,32 +24,4 @@ Route8Mons: db 15,VULPIX db 18,VULPIX ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 18,PIDGEY - db 18,MEOWTH - db 17,SANDSHREW - db 16,GROWLITHE - db 20,PIDGEY - db 20,MEOWTH - db 19,SANDSHREW - db 17,GROWLITHE - db 15,GROWLITHE - db 18,GROWLITHE - ENDC - - IF DEF(_YELLOW) - db 20,PIDGEY - db 22,PIDGEY - db 20,RATTATA - db 15,ABRA - db 19,ABRA - db 24,PIDGEOTTO - db 19,JIGGLYPUFF - db 24,JIGGLYPUFF - db 20,KADABRA - db 27,KADABRA - ENDC - db $00 - diff --git a/data/wildPokemon/route9.asm b/data/wildPokemon/route9.asm index d563aa2b..716589b0 100755 --- a/data/wildPokemon/route9.asm +++ b/data/wildPokemon/route9.asm @@ -1,6 +1,5 @@ Route9Mons: db $0F - IF DEF(_RED) db 16,RATTATA db 16,SPEAROW @@ -13,8 +12,7 @@ Route9Mons: db 13,EKANS db 17,EKANS ENDC - - IF DEF(_GREEN) || DEF(_BLUE) + IF DEF(_BLUE) db 16,RATTATA db 16,SPEAROW db 14,RATTATA @@ -26,19 +24,4 @@ Route9Mons: db 13,SANDSHREW db 17,SANDSHREW ENDC - - IF DEF(_YELLOW) - db 16,NIDORAN_M - db 16,NIDORAN_F - db 18,RATTATA - db 18,NIDORAN_M - db 18,NIDORAN_F - db 17,SPEAROW - db 18,NIDORINO - db 18,NIDORINA - db 20,RATICATE - db 19,FEAROW - ENDC - db $00 - diff --git a/data/wildPokemon/safarizone1.asm b/data/wildPokemon/safarizone1.asm index 3781af0e..3d77b6fe 100755 --- a/data/wildPokemon/safarizone1.asm +++ b/data/wildPokemon/safarizone1.asm @@ -1,6 +1,6 @@ ZoneMons1: db $1E - IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_RED) db 24,NIDORAN_M db 26,DODUO db 22,PARAS @@ -9,16 +9,10 @@ ZoneMons1: db 23,EXEGGCUTE db 24,NIDORAN_F db 25,PARASECT - IF DEF(_RED) - db 25,KANGASKHAN - ENDC - IF DEF(_JAPAN) && DEF(_BLUE) - db 25,LICKITUNG - ENDC + db 25,KANGASKHAN db 28,SCYTHER ENDC - - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_BLUE) db 24,NIDORAN_F db 26,DODUO db 22,PARAS @@ -30,19 +24,4 @@ ZoneMons1: db 25,KANGASKHAN db 28,PINSIR ENDC - - IF DEF(_YELLOW) - db 21,NIDORAN_M - db 29,NIDORAN_F - db 22,EXEGGCUTE - db 21,TAUROS - db 32,NIDORINA - db 19,CUBONE - db 26,EXEGGCUTE - db 24,MAROWAK - db 21,CHANSEY - db 15,SCYTHER - ENDC - db $00 - diff --git a/data/wildPokemon/safarizone2.asm b/data/wildPokemon/safarizone2.asm index 5de4ad00..c1b6a547 100755 --- a/data/wildPokemon/safarizone2.asm +++ b/data/wildPokemon/safarizone2.asm @@ -1,48 +1,28 @@ ZoneMons2: db $1E - IF DEF(_YELLOW) - db 36,NIDORAN_M - db 14,NIDORAN_F - db 20,EXEGGCUTE - db 25,RHYHORN - db 23,NIDORINA - db 28,KANGASKHAN - db 16,CUBONE - db 33,KANGASKHAN - db 25,SCYTHER - db 15,PINSIR - ELSE - IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) - db 22,NIDORAN_M - ENDC - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) - db 22,NIDORAN_F - ENDC - db 26,RHYHORN - db 23,PARAS - db 25,EXEGGCUTE - IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) - db 30,NIDORINO - ENDC - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) - db 30,NIDORINA - ENDC - db 27,EXEGGCUTE - IF DEF(_RED) || (DEF(_JAPAN) && DEF(_BLUE)) - db 30,NIDORINA - ENDC - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) - db 30,NIDORINO - ENDC - db 32,VENOMOTH - db 26,CHANSEY - IF DEF(_RED) || DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) - db 28,TAUROS - ENDC - IF (DEF(_JAPAN) && DEF(_BLUE)) - db 28,PINSIR - ENDC + IF DEF(_RED) + db 22,NIDORAN_M ENDC - + IF DEF(_BLUE) + db 22,NIDORAN_F + ENDC + db 26,RHYHORN + db 23,PARAS + db 25,EXEGGCUTE + IF DEF(_RED) + db 30,NIDORINO + ENDC + IF DEF(_BLUE) + db 30,NIDORINA + ENDC + db 27,EXEGGCUTE + IF DEF(_RED) + db 30,NIDORINA + ENDC + IF DEF(_BLUE) + db 30,NIDORINO + ENDC + db 32,VENOMOTH + db 26,CHANSEY + db 28,TAUROS db $00 - diff --git a/data/wildPokemon/safarizone3.asm b/data/wildPokemon/safarizone3.asm index c13cd378..47b6a102 100755 --- a/data/wildPokemon/safarizone3.asm +++ b/data/wildPokemon/safarizone3.asm @@ -12,8 +12,7 @@ ZoneMons3: db 26,TAUROS db 28,KANGASKHAN ENDC - - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_BLUE) db 25,NIDORAN_F db 26,DODUO db 23,VENONAT @@ -25,32 +24,4 @@ ZoneMons3: db 26,TAUROS db 28,KANGASKHAN ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 25,NIDORAN_M - db 26,DODUO - db 23,VENONAT - db 24,EXEGGCUTE - db 33,NIDORINO - db 26,EXEGGCUTE - db 25,NIDORAN_F - db 31,VENOMOTH - db 26,PINSIR - db 28,LICKITUNG - ENDC - - IF DEF(_YELLOW) - db 29,NIDORAN_M - db 21,NIDORAN_F - db 22,EXEGGCUTE - db 21,TAUROS - db 32,NIDORINO - db 19,CUBONE - db 26,EXEGGCUTE - db 24,MAROWAK - db 25,PINSIR - db 27,TANGELA - ENDC - db $00 - diff --git a/data/wildPokemon/safarizonecenter.asm b/data/wildPokemon/safarizonecenter.asm index 7b50e5b9..0cd5323a 100755 --- a/data/wildPokemon/safarizonecenter.asm +++ b/data/wildPokemon/safarizonecenter.asm @@ -12,8 +12,7 @@ ZoneMonsCenter: db 23,SCYTHER db 23,CHANSEY ENDC - - IF DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) + IF DEF(_BLUE) db 22,NIDORAN_F db 25,RHYHORN db 22,VENONAT @@ -25,32 +24,4 @@ ZoneMonsCenter: db 23,PINSIR db 23,CHANSEY ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 22,NIDORAN_M - db 25,RHYHORN - db 22,VENONAT - db 24,EXEGGCUTE - db 31,NIDORINO - db 25,EXEGGCUTE - db 31,NIDORINA - db 30,PARASECT - db 23,SCYTHER - db 23,CHANSEY - ENDC - - IF DEF(_YELLOW) - db 14,NIDORAN_M - db 36,NIDORAN_F - db 24,EXEGGCUTE - db 20,RHYHORN - db 23,NIDORINO - db 27,PARASECT - db 27,PARAS - db 32,PARASECT - db 22,TANGELA - db 7,CHANSEY - ENDC - db $00 - diff --git a/data/wildPokemon/seafoamisland1.asm b/data/wildPokemon/seafoamisland1.asm index 45d0a707..3c431f9a 100755 --- a/data/wildPokemon/seafoamisland1.asm +++ b/data/wildPokemon/seafoamisland1.asm @@ -12,8 +12,7 @@ IslandMons1: db 28,SHELLDER db 38,GOLDUCK ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 30,SEEL db 30,PSYDUCK db 30,STARYU @@ -25,32 +24,4 @@ IslandMons1: db 28,STARYU db 38,SLOWBRO ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 30,SEEL - db 30,HORSEA - db 30,STARYU - db 30,KRABBY - db 28,KRABBY - db 21,ZUBAT - db 29,GOLBAT - db 28,SLOWPOKE - db 28,STARYU - db 38,SLOWBRO - ENDC - - IF DEF(_YELLOW) - db 18,ZUBAT - db 25,KRABBY - db 27,KRABBY - db 27,ZUBAT - db 36,ZUBAT - db 28,SLOWPOKE - db 30,SLOWPOKE - db 9,ZUBAT - db 27,GOLBAT - db 36,GOLBAT - ENDC - db $00 - diff --git a/data/wildPokemon/seafoamislandb1.asm b/data/wildPokemon/seafoamislandb1.asm index 3f6ef7b6..6f96f240 100755 --- a/data/wildPokemon/seafoamislandb1.asm +++ b/data/wildPokemon/seafoamislandb1.asm @@ -12,8 +12,7 @@ IslandMonsB1: db 38,DEWGONG db 37,SEADRA ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 30,SHELLDER db 30,KRABBY db 32,STARYU @@ -25,32 +24,4 @@ IslandMonsB1: db 38,DEWGONG db 37,KINGLER ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 30,SHELLDER - db 30,KRABBY - db 32,STARYU - db 32,KRABBY - db 28,HORSEA - db 30,SEEL - db 30,HORSEA - db 28,SEEL - db 38,DEWGONG - db 37,KINGLER - ENDC - - IF DEF(_YELLOW) - db 27,ZUBAT - db 26,KRABBY - db 36,ZUBAT - db 28,KRABBY - db 27,GOLBAT - db 29,SLOWPOKE - db 18,ZUBAT - db 28,KINGLER - db 22,SEEL - db 26,SEEL - ENDC - db $00 - diff --git a/data/wildPokemon/seafoamislandb2.asm b/data/wildPokemon/seafoamislandb2.asm index 5df1cca9..7191fea9 100755 --- a/data/wildPokemon/seafoamislandb2.asm +++ b/data/wildPokemon/seafoamislandb2.asm @@ -12,8 +12,7 @@ IslandMonsB2: db 30,GOLBAT db 37,SLOWBRO ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 30,SEEL db 30,PSYDUCK db 32,SEEL @@ -25,32 +24,4 @@ IslandMonsB2: db 30,GOLBAT db 37,GOLDUCK ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 30,SEEL - db 30,HORSEA - db 32,SEEL - db 32,HORSEA - db 28,KRABBY - db 30,SHELLDER - db 30,KRABBY - db 28,STARYU - db 30,GOLBAT - db 37,JYNX - ENDC - - IF DEF(_YELLOW) - db 27,ZUBAT - db 27,KRABBY - db 36,ZUBAT - db 27,GOLBAT - db 28,KINGLER - db 24,SEEL - db 29,KRABBY - db 36,GOLBAT - db 31,SLOWPOKE - db 31,SLOWBRO - ENDC - db $00 - diff --git a/data/wildPokemon/seafoamislandb3.asm b/data/wildPokemon/seafoamislandb3.asm index e8560c9a..9778c0e9 100755 --- a/data/wildPokemon/seafoamislandb3.asm +++ b/data/wildPokemon/seafoamislandb3.asm @@ -12,8 +12,7 @@ IslandMonsB3: db 39,SEADRA db 37,DEWGONG ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 31,PSYDUCK db 31,SEEL db 33,PSYDUCK @@ -25,44 +24,4 @@ IslandMonsB3: db 39,KINGLER db 37,DEWGONG ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 31,HORSEA - db 31,SEEL - db 33,HORSEA - db 33,SEEL - db 29,KRABBY - db 31,STARYU - db 31,KRABBY - db 29,STARYU - db 39,KINGLER - db 37,DEWGONG - ENDC - - IF DEF(_YELLOW) - db 27,GOLBAT - db 36,ZUBAT - db 29,KRABBY - db 27,ZUBAT - db 30,KINGLER - db 26,SEEL - db 31,KRABBY - db 30,SEEL - db 28,DEWGONG - db 32,DEWGONG - - db $05 - db 25,TENTACOOL - db 30,TENTACOOL - db 20,TENTACOOL - db 30,STARYU - db 35,TENTACOOL - db 30,STARYU - db 40,TENTACOOL - db 30,STARYU - db 30,STARYU - db 30,STARYU - ENDC - db $00 - diff --git a/data/wildPokemon/seafoamislandb4.asm b/data/wildPokemon/seafoamislandb4.asm index 7f8977d6..3948470b 100755 --- a/data/wildPokemon/seafoamislandb4.asm +++ b/data/wildPokemon/seafoamislandb4.asm @@ -12,8 +12,7 @@ IslandMonsB4: db 39,SLOWBRO db 32,GOLBAT ENDC - - IF DEF(_GREEN) || !DEF(_JAPAN) && DEF(_BLUE) + IF DEF(_BLUE) db 31,KRABBY db 31,STARYU db 33,KRABBY @@ -25,44 +24,4 @@ IslandMonsB4: db 39,GOLDUCK db 32,GOLBAT ENDC - - IF DEF(_JAPAN) && DEF(_BLUE) - db 31,KRABBY - db 31,STARYU - db 33,KRABBY - db 33,STARYU - db 29,HORSEA - db 31,SEEL - db 31,HORSEA - db 29,SEEL - db 39,JYNX - db 32,GOLBAT - ENDC - - IF DEF(_YELLOW) - db 36,GOLBAT - db 36,ZUBAT - db 30,KRABBY - db 32,KINGLER - db 28,SEEL - db 32,SEEL - db 27,GOLBAT - db 45,ZUBAT - db 30,DEWGONG - db 34,DEWGONG - - db $05 - db 25,TENTACOOL - db 30,TENTACOOL - db 20,TENTACOOL - db 30,STARYU - db 35,TENTACOOL - db 30,STARYU - db 40,TENTACOOL - db 30,STARYU - db 30,STARYU - db 30,STARYU - ENDC - db $00 - diff --git a/data/wildPokemon/unknowndungeon1.asm b/data/wildPokemon/unknowndungeon1.asm index 504d32f1..70f680b7 100755 --- a/data/wildPokemon/unknowndungeon1.asm +++ b/data/wildPokemon/unknowndungeon1.asm @@ -1,38 +1,18 @@ DungeonMons1: db $0A - IF DEF(_YELLOW) - db 50,GOLBAT - db 55,GOLBAT - db 45,GRAVELER - db 55,GLOOM - db 55,WEEPINBELL + db 46,GOLBAT + db 46,HYPNO + db 46,MAGNETON + db 49,DODRIO + db 49,VENOMOTH + IF DEF(_RED) + db 52,ARBOK + ENDC + IF !DEF(_RED) db 52,SANDSLASH - db 54,VENOMOTH - db 54,PARASECT - db 55,DITTO - db 60,DITTO - ELSE - db 46,GOLBAT - db 46,HYPNO - db 46,MAGNETON - IF DEF(_RED) || DEF(_GREEN) || (!DEF(_JAPAN) && DEF(_BLUE)) - db 49,DODRIO - ENDC - IF DEF(_JAPAN) && DEF(_BLUE) - db 49,RAPIDASH - ENDC - db 49,VENOMOTH - IF DEF(_RED) - db 52,ARBOK - ENDC - IF !DEF(_RED) - db 52,SANDSLASH - ENDC - db 49,KADABRA - db 52,PARASECT - db 53,RAICHU - db 53,DITTO ENDC - + db 49,KADABRA + db 52,PARASECT + db 53,RAICHU + db 53,DITTO db $00 - diff --git a/data/wildPokemon/unknowndungeon2.asm b/data/wildPokemon/unknowndungeon2.asm index 9422f3a0..5afe55ac 100755 --- a/data/wildPokemon/unknowndungeon2.asm +++ b/data/wildPokemon/unknowndungeon2.asm @@ -1,33 +1,13 @@ DungeonMons2: db $0F - IF DEF(_YELLOW) - db 52,GOLBAT - db 57,GOLBAT - db 50,GRAVELER - db 56,SANDSLASH - db 50,RHYHORN - db 60,DITTO - db 58,GLOOM - db 58,WEEPINBELL - db 60,RHYDON - db 58,RHYDON - ELSE - db 51,DODRIO - db 51,VENOMOTH - db 51,KADABRA - db 52,RHYDON - IF DEF(_RED) || DEF(_GREEN) || (DEF(_BLUE) && !DEF(_JAPAN)) - db 52,MAROWAK - ENDC - IF (DEF(_BLUE) && DEF(_JAPAN)) - db 52,MAROWAK - ENDC - db 52,ELECTRODE - db 56,CHANSEY - db 54,WIGGLYTUFF - db 55,DITTO - db 60,DITTO - ENDC - + db 51,DODRIO + db 51,VENOMOTH + db 51,KADABRA + db 52,RHYDON + db 52,MAROWAK + db 52,ELECTRODE + db 56,CHANSEY + db 54,WIGGLYTUFF + db 55,DITTO + db 60,DITTO db $00 - diff --git a/data/wildPokemon/unknowndungeonb1.asm b/data/wildPokemon/unknowndungeonb1.asm index 6a88edb2..245d5912 100755 --- a/data/wildPokemon/unknowndungeonb1.asm +++ b/data/wildPokemon/unknowndungeonb1.asm @@ -1,33 +1,18 @@ DungeonMonsB1: db $19 - IF DEF(_YELLOW) - db 54,GOLBAT - db 59,GOLBAT - db 55,GRAVELER - db 52,RHYHORN - db 62,RHYDON - db 60,DITTO - db 56,CHANSEY - db 65,DITTO - db 55,LICKITUNG - db 50,LICKITUNG - ELSE - db 55,RHYDON - db 55,MAROWAK - db 55,ELECTRODE - db 64,CHANSEY - db 64,PARASECT - db 64,RAICHU - IF DEF(_RED) - db 57,ARBOK - ENDC - IF DEF(_BLUE) || DEF(_GREEN) - db 57,SANDSLASH - ENDC - db 65,DITTO - db 63,DITTO - db 67,DITTO + db 55,RHYDON + db 55,MAROWAK + db 55,ELECTRODE + db 64,CHANSEY + db 64,PARASECT + db 64,RAICHU + IF DEF(_RED) + db 57,ARBOK ENDC - + IF DEF(_BLUE) + db 57,SANDSLASH + ENDC + db 65,DITTO + db 63,DITTO + db 67,DITTO db $00 - diff --git a/data/wildPokemon/victoryroad1.asm b/data/wildPokemon/victoryroad1.asm index 98914a91..60aae31a 100755 --- a/data/wildPokemon/victoryroad1.asm +++ b/data/wildPokemon/victoryroad1.asm @@ -1,29 +1,13 @@ PlateauMons1: db $0F - - IF DEF(_YELLOW) - db 26,GEODUDE - db 31,GEODUDE - db 36,GEODUDE - db 39,ZUBAT - db 44,ZUBAT - db 41,GEODUDE - db 43,ONIX - db 45,ONIX - db 41,GRAVELER - db 47,GRAVELER - ELSE - db 24,MACHOP - db 26,GEODUDE - db 22,ZUBAT - db 36,ONIX - db 39,ONIX - db 42,ONIX - db 41,GRAVELER - db 41,GOLBAT - db 42,MACHOKE - db 43,MAROWAK - ENDC - + db 24,MACHOP + db 26,GEODUDE + db 22,ZUBAT + db 36,ONIX + db 39,ONIX + db 42,ONIX + db 41,GRAVELER + db 41,GOLBAT + db 42,MACHOKE + db 43,MAROWAK db $00 - diff --git a/data/wildPokemon/victoryroad2.asm b/data/wildPokemon/victoryroad2.asm index ffe117bc..580d644d 100755 --- a/data/wildPokemon/victoryroad2.asm +++ b/data/wildPokemon/victoryroad2.asm @@ -1,29 +1,13 @@ PlateauMons2: db $0A - - IF DEF(_YELLOW) - db 31,GEODUDE - db 36,GEODUDE - db 41,GEODUDE - db 44,ZUBAT - db 39,GOLBAT - db 44,GRAVELER - db 45,ONIX - db 47,ONIX - db 39,MACHOKE - db 42,MACHOKE - ELSE - db 22,MACHOP - db 24,GEODUDE - db 26,ZUBAT - db 36,ONIX - db 39,ONIX - db 42,ONIX - db 41,MACHOKE - db 40,GOLBAT - db 40,MAROWAK - db 43,GRAVELER - ENDC - + db 22,MACHOP + db 24,GEODUDE + db 26,ZUBAT + db 36,ONIX + db 39,ONIX + db 42,ONIX + db 41,MACHOKE + db 40,GOLBAT + db 40,MAROWAK + db 43,GRAVELER db $00 - diff --git a/data/wildPokemon/victoryroad3.asm b/data/wildPokemon/victoryroad3.asm index 7c1b2c1c..80d7ef3e 100755 --- a/data/wildPokemon/victoryroad3.asm +++ b/data/wildPokemon/victoryroad3.asm @@ -1,29 +1,13 @@ PlateauMons3: db $0F - - IF DEF(_YELLOW) - db 36,GEODUDE - db 44,GOLBAT - db 41,GEODUDE - db 49,ONIX - db 46,GEODUDE - db 41,GRAVELER - db 42,MACHOKE - db 45,MACHOKE - db 47,GRAVELER - db 47,GRAVELER - ELSE - db 24,MACHOP - db 26,GEODUDE - db 22,ZUBAT - db 42,ONIX - db 40,VENOMOTH - db 45,ONIX - db 43,GRAVELER - db 41,GOLBAT - db 42,MACHOKE - db 45,MACHOKE - ENDC - + db 24,MACHOP + db 26,GEODUDE + db 22,ZUBAT + db 42,ONIX + db 40,VENOMOTH + db 45,ONIX + db 43,GRAVELER + db 41,GOLBAT + db 42,MACHOKE + db 45,MACHOKE db $00 - diff --git a/data/wildPokemon/viridianforest.asm b/data/wildPokemon/viridianforest.asm index f6e00ac3..ae9a5a70 100755 --- a/data/wildPokemon/viridianforest.asm +++ b/data/wildPokemon/viridianforest.asm @@ -1,43 +1,25 @@ ForestMons: - IF DEF(_YELLOW) - db $19 - db 3,CATERPIE + db $08 + IF DEF(_RED) + db 4,WEEDLE + db 5,KAKUNA + db 3,WEEDLE + db 5,WEEDLE + db 4,KAKUNA + db 6,KAKUNA db 4,METAPOD + db 3,CATERPIE + ENDC + IF DEF(_BLUE) db 4,CATERPIE + db 5,METAPOD + db 3,CATERPIE db 5,CATERPIE - db 4,PIDGEY - db 6,PIDGEY - db 6,CATERPIE + db 4,METAPOD db 6,METAPOD - db 8,PIDGEY - db 9,PIDGEOTTO - ELSE - db $08 - IF DEF(_RED) - db 4,WEEDLE - db 5,KAKUNA - db 3,WEEDLE - db 5,WEEDLE - db 4,KAKUNA - db 6,KAKUNA - db 4,METAPOD - db 3,CATERPIE - ENDC - IF DEF(_BLUE) || DEF(_GREEN) - db 4,CATERPIE - db 5,METAPOD - db 3,CATERPIE - db 5,CATERPIE - db 4,METAPOD - db 6,METAPOD - db 4,KAKUNA - db 3,WEEDLE - ENDC - - db 3,PIKACHU - db 5,PIKACHU + db 4,KAKUNA + db 3,WEEDLE ENDC - - + db 3,PIKACHU + db 5,PIKACHU db $00 - diff --git a/data/wildPokemon/waterpokemon.asm b/data/wildPokemon/waterpokemon.asm index ef2d39ea..07c6a187 100755 --- a/data/wildPokemon/waterpokemon.asm +++ b/data/wildPokemon/waterpokemon.asm @@ -1,6 +1,5 @@ WaterMons: db $00 - db $05 db 5,TENTACOOL db 10,TENTACOOL @@ -12,4 +11,3 @@ WaterMons: db 30,TENTACOOL db 35,TENTACOOL db 40,TENTACOOL - diff --git a/data/wild_mons.asm b/data/wild_mons.asm index f29fd340..a2c9d6b2 100755 --- a/data/wild_mons.asm +++ b/data/wild_mons.asm @@ -1,4 +1,4 @@ -WildDataPointers: ; ceeb (3:4eeb) +WildDataPointers: dw NoMons ; PALLET_TOWN dw NoMons ; VIRIDIAN_CITY dw NoMons ; PEWTER_CITY @@ -247,21 +247,18 @@ WildDataPointers: ; ceeb (3:4eeb) dw NoMons dw NoMons dw NoMons - IF DEF(_OPTION_BEACH_HOUSE) - dw NoMons - ENDC dw $FFFF ; wild pokemon data is divided into two parts. ; first part: pokemon found in grass ; second part: pokemon found while surfing ; each part goes as follows: - ; if first byte == 00, then - ; no wild pokemon on this map - ; if first byte != 00, then - ; first byte is encounter rate - ; followed by 20 bytes: - ; level, species (ten times) + ; if first byte == 00, then + ; no wild pokemon on this map + ; if first byte != 00, then + ; first byte is encounter rate + ; followed by 20 bytes: + ; level, species (ten times) INCLUDE "data/wildPokemon/nomons.asm" INCLUDE "data/wildPokemon/route1.asm" diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index ae4ecb0d..82aa6d52 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -1,58 +1,58 @@ -HallOfFamePC: ; 7405c (1d:405c) +HallOfFamePC: callba AnimateHallOfFame call ClearScreen - ld c, $64 + ld c, 100 call DelayFrames call DisableLCD ld hl, vFont ld bc, $800 / 2 - call Func_74171 + call ZeroMemory ld hl, vChars2 + $600 ld bc, $200 / 2 - call Func_74171 + call ZeroMemory ld hl, vChars2 + $7e0 ld bc, $10 ld a, $ff call FillMemory - ld hl, wTileMap - call Func_7417b - hlCoord 0, 14 - call Func_7417b - ld a, $c0 - ld [rBGP], a ; $ff47 + coord hl, 0, 0 + call FillFourRowsWithBlack + coord hl, 0, 14 + call FillFourRowsWithBlack + ld a, %11000000 + 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 [wTrainerEngageDistance], a + ld [wUnusedCD3D], a ; not read + ld [wNumCreditsMonsDisplayed], a jp Credits -Func_740ba: ; 740ba (1d:40ba) - ld hl, DataTable_74160 ; $4160 - ld b, $4 -.asm_740bf +FadeInCreditsText: + ld hl, HoFGBPalettes + ld b, 4 +.loop ld a, [hli] - ld [rBGP], a ; $ff47 - ld c, $5 + ld [rBGP], a + ld c, 5 call DelayFrames dec b - jr nz, .asm_740bf + jr nz, .loop ret -DisplayCreditsMon: ; 740cb (1d:40cb) +DisplayCreditsMon: xor a ld [H_AUTOBGTRANSFERENABLED],a call SaveScreenTilesToBuffer1 call FillMiddleOfScreenWithWhite ; display the next monster from CreditsMons - ld hl,wTrainerEngageDistance + ld hl,wNumCreditsMonsDisplayed ld c,[hl] ; how many monsters have we displayed so far? inc [hl] ld b,0 @@ -61,132 +61,143 @@ DisplayCreditsMon: ; 740cb (1d:40cb) ld a,[hl] ld [wcf91],a ld [wd0b5],a - hlCoord 8, 6 + coord hl, 8, 6 call GetMonHeader call LoadFrontSpriteByMonIndex ld hl,vBGMap0 + $c - call Func_74164 + call CreditsCopyTileMapToVRAM xor a ld [H_AUTOBGTRANSFERENABLED],a call LoadScreenTilesFromBuffer1 ld hl,vBGMap0 - call Func_74164 + call CreditsCopyTileMapToVRAM ld a,$A7 - ld [$FF4B],a + ld [rWX],a ld hl,vBGMap1 - call Func_74164 + call CreditsCopyTileMapToVRAM call FillMiddleOfScreenWithWhite - ld a,$FC - ld [$FF47],a + ld a,%11111100 ; make the mon a black silhouette + ld [rBGP],a + +; scroll the mon left by one tile 7 times ld bc,7 -.next - call Func_74140 +.scrollLoop1 + call ScrollCreditsMonLeft dec c - jr nz,.next - ld c,$14 -.next2 - call Func_74140 - ld a,[$FF4B] + jr nz,.scrollLoop1 + +; scroll the mon left by one tile 20 times +; This time, we have to move the window left too in order to hide the text that +; is wrapping around to the right side of the screen. + ld c,20 +.scrollLoop2 + call ScrollCreditsMonLeft + ld a,[rWX] sub 8 - ld [$FF4B],a + ld [rWX],a dec c - jr nz,.next2 + jr nz,.scrollLoop2 + xor a ld [hWY],a - ld a,$C0 - ld [$FF47],a + ld a,%11000000 + ld [rBGP],a ret INCLUDE "data/credit_mons.asm" -Func_74140: ; 74140 (1d:4140) +ScrollCreditsMonLeft: ld h, b ld l, $20 - call Func_74152 + call ScrollCreditsMonLeft_SetSCX ld h, $0 ld l, $70 - call Func_74152 + call ScrollCreditsMonLeft_SetSCX ld a, b add $8 ld b, a ret -Func_74152: ; 74152 (1d:4152) - ld a, [$ff44] +ScrollCreditsMonLeft_SetSCX: + ld a, [rLY] cp l - jr nz, Func_74152 + jr nz, ScrollCreditsMonLeft_SetSCX ld a, h - ld [rSCX], a ; $ff43 -.asm_7415a - ld a, [$ff44] + ld [rSCX], a +.loop + ld a, [rLY] cp h - jr z, .asm_7415a + jr z, .loop ret -DataTable_74160: ; 74160 (1d:4160) - db $C0,$D0,$E0,$F0 +HoFGBPalettes: + db %11000000 + db %11010000 + db %11100000 + db %11110000 -Func_74164: ; 74164 (1d:4164) +CreditsCopyTileMapToVRAM: 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_AUTOBGTRANSFERDEST + 1], a + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a jp Delay3 -Func_74171: ; 74171 (1d:4171) - ld [hl], $0 +ZeroMemory: +; zero bc bytes at hl + ld [hl], 0 inc hl inc hl dec bc ld a, b or c - jr nz, Func_74171 + jr nz, ZeroMemory ret -Func_7417b: ; 7417b (1d:417b) - ld bc, $50 +FillFourRowsWithBlack: + ld bc, SCREEN_WIDTH * 4 ld a, $7e jp FillMemory -FillMiddleOfScreenWithWhite: ; 74183 (1d:4183) - hlCoord 0, 4 - ld bc, $c8 ; 10 rows of 20 tiles each - ld a, $7f ; blank white tile +FillMiddleOfScreenWithWhite: + coord hl, 0, 4 + ld bc, SCREEN_WIDTH * 10 + ld a, " " jp FillMemory -Credits: ; 7418e (1d:418e) - ld de, CreditsOrder ; $4243 +Credits: + ld de, CreditsOrder push de -.asm_74192 +.nextCreditsScreen pop de - hlCoord 9, 6 + coord hl, 9, 6 push hl call FillMiddleOfScreenWithWhite pop hl -.asm_7419b +.nextCreditsCommand ld a, [de] inc de push de cp $ff - jr z, .asm_741d5 + jr z, .fadeInTextAndShowMon cp $fe - jr z, .asm_741dc + jr z, .showTextAndShowMon cp $fd - jr z, .asm_741e6 + jr z, .fadeInText cp $fc - jr z, .asm_741ed + jr z, .showText cp $fb - jr z, .asm_741f4 + jr z, .showCopyrightText cp $fa jr z, .showTheEnd push hl push hl - ld hl, CreditsTextPointers ; $42c3 + ld hl, CreditsTextPointers add a ld c, a - ld b, $0 + ld b, 0 add hl, bc ld e, [hl] inc hl @@ -199,53 +210,53 @@ Credits: ; 7418e (1d:418e) add hl, bc call PlaceString pop hl - ld bc, $28 + ld bc, SCREEN_WIDTH * 2 add hl, bc pop de - jr .asm_7419b -.asm_741d5 - call Func_740ba - ld c, $5a - jr .asm_741de -.asm_741dc - ld c, $6e -.asm_741de + jr .nextCreditsCommand +.fadeInTextAndShowMon + call FadeInCreditsText + ld c, 90 + jr .next1 +.showTextAndShowMon + ld c, 110 +.next1 call DelayFrames call DisplayCreditsMon - jr .asm_74192 -.asm_741e6 - call Func_740ba - ld c, $78 - jr .asm_741ef -.asm_741ed - ld c, $8c -.asm_741ef + jr .nextCreditsScreen +.fadeInText + call FadeInCreditsText + ld c, 120 + jr .next2 +.showText + ld c, 140 +.next2 call DelayFrames - jr .asm_74192 -.asm_741f4 + jr .nextCreditsScreen +.showCopyrightText push de callba LoadCopyrightTiles pop de pop de - jr .asm_7419b + jr .nextCreditsCommand .showTheEnd - ld c, $10 + ld c, 16 call DelayFrames call FillMiddleOfScreenWithWhite pop de ld de, TheEndGfx ld hl, vChars2 + $600 - ld bc, (BANK(TheEndGfx) << 8) + $0a + lb bc, BANK(TheEndGfx), (TheEndGfxEnd - TheEndGfx) / $10 call CopyVideoData - hlCoord 4, 8 + coord hl, 4, 8 ld de, TheEndTextString call PlaceString - hlCoord 4, 9 + coord hl, 4, 9 inc de call PlaceString - jp Func_740ba + jp FadeInCreditsText -TheEndTextString: ; 74229 (1d:4229) +TheEndTextString: ; "T H E E N D" db $60," ",$62," ",$64," ",$64," ",$66," ",$68,"@" db $61," ",$63," ",$65," ",$65," ",$67," ",$69,"@" @@ -254,5 +265,6 @@ INCLUDE "data/credits_order.asm" INCLUDE "text/credits_text.asm" -TheEndGfx: ; 7473e (1d:473e) ; 473E (473F on blue) +TheEndGfx: INCBIN "gfx/theend.interleave.2bpp" +TheEndGfxEnd: diff --git a/engine/add_mon.asm b/engine/add_mon.asm new file mode 100644 index 00000000..19d03942 --- /dev/null +++ b/engine/add_mon.asm @@ -0,0 +1,512 @@ +_AddPartyMon: +; Adds a new mon to the player's or enemy's party. +; [wMonDataLocation] is used in an unusual way in this function. +; If the lower nybble is 0, the mon is added to the player's party, else the enemy's. +; If the entire value is 0, then the player is allowed to name the mon. + ld de, wPartyCount + ld a, [wMonDataLocation] + and $f + jr z, .next + ld de, wEnemyPartyCount +.next + ld a, [de] + inc a + cp PARTY_LENGTH + 1 + ret nc ; return if the party is already full + ld [de], a + ld a, [de] + ld [hNewPartyLength], a + add e + ld e, a + jr nc, .noCarry + inc d +.noCarry + ld a, [wcf91] + ld [de], a ; write species of new mon in party list + inc de + ld a, $ff ; terminator + ld [de], a + ld hl, wPartyMonOT + ld a, [wMonDataLocation] + and $f + jr z, .next2 + ld hl, wEnemyMonOT +.next2 + ld a, [hNewPartyLength] + dec a + call SkipFixedLengthTextEntries + ld d, h + ld e, l + ld hl, wPlayerName + ld bc, NAME_LENGTH + call CopyData + ld a, [wMonDataLocation] + and a + jr nz, .skipNaming + ld hl, wPartyMonNicks + ld a, [hNewPartyLength] + dec a + call SkipFixedLengthTextEntries + ld a, NAME_MON_SCREEN + ld [wNamingScreenType], a + predef AskName +.skipNaming + ld hl, wPartyMons + ld a, [wMonDataLocation] + and $f + jr z, .next3 + ld hl, wEnemyMons +.next3 + ld a, [hNewPartyLength] + dec a + ld bc, wPartyMon2 - wPartyMon1 + call AddNTimes + ld e, l + ld d, h + push hl + ld a, [wcf91] + ld [wd0b5], a + call GetMonHeader + ld hl, wMonHeader + ld a, [hli] + ld [de], a ; species + inc de + pop hl + push hl + ld a, [wMonDataLocation] + and $f + ld a, $98 ; set enemy trainer mon IVs to fixed average values + ld b, $88 + jr nz, .next4 + +; If the mon is being added to the player's party, update the pokedex. + ld a, [wcf91] + ld [wd11e], a + push de + predef IndexToPokedex + pop de + ld a, [wd11e] + dec a + ld c, a + ld b, FLAG_TEST + ld hl, wPokedexOwned + call FlagAction + ld a, c ; whether the mon was already flagged as owned + ld [wUnusedD153], a ; not read + ld a, [wd11e] + dec a + ld c, a + ld b, FLAG_SET + push bc + call FlagAction + pop bc + ld hl, wPokedexSeen + call FlagAction + + pop hl + push hl + + ld a, [wIsInBattle] + and a ; is this a wild mon caught in battle? + jr nz, .copyEnemyMonData + +; Not wild. + call Random ; generate random IVs + ld b, a + call Random + +.next4 + push bc + ld bc, wPartyMon1DVs - wPartyMon1 + add hl, bc + pop bc + ld [hli], a + ld [hl], b ; write IVs + ld bc, (wPartyMon1HPExp - 1) - (wPartyMon1DVs + 1) + add hl, bc + ld a, 1 + ld c, a + xor a + ld b, a + call CalcStat ; calc HP stat (set cur Hp to max HP) + ld a, [H_MULTIPLICAND+1] + ld [de], a + inc de + ld a, [H_MULTIPLICAND+2] + ld [de], a + inc de + xor a + ld [de], a ; box level + inc de + ld [de], a ; status ailments + inc de + jr .copyMonTypesAndMoves +.copyEnemyMonData + ld bc, wEnemyMon1DVs - wEnemyMon1 + add hl, bc + ld a, [wEnemyMonDVs] ; copy IVs from cur enemy mon + ld [hli], a + ld a, [wEnemyMonDVs + 1] + ld [hl], a + ld a, [wEnemyMonHP] ; copy HP from cur enemy mon + ld [de], a + inc de + ld a, [wEnemyMonHP+1] + ld [de], a + inc de + xor a + ld [de], a ; box level + inc de + ld a, [wEnemyMonStatus] ; copy status ailments from cur enemy mon + ld [de], a + inc de +.copyMonTypesAndMoves + ld hl, wMonHTypes + ld a, [hli] ; type 1 + ld [de], a + inc de + ld a, [hli] ; type 2 + ld [de], a + inc de + ld a, [hli] ; catch rate (held item in gen 2) + ld [de], a + ld hl, wMonHMoves + ld a, [hli] + inc de + push de + ld [de], a + ld a, [hli] + inc de + ld [de], a + ld a, [hli] + inc de + ld [de], a + ld a, [hli] + inc de + ld [de], a + push de + dec de + dec de + dec de + xor a + ld [wLearningMovesFromDayCare], a + predef WriteMonMoves + pop de + ld a, [wPlayerID] ; set trainer ID to player ID + inc de + ld [de], a + ld a, [wPlayerID + 1] + inc de + ld [de], a + push de + ld a, [wCurEnemyLVL] + ld d, a + callab CalcExperience + pop de + inc de + ld a, [hExperience] ; write experience + ld [de], a + inc de + ld a, [hExperience + 1] + ld [de], a + inc de + ld a, [hExperience + 2] + ld [de], a + xor a + ld b, NUM_STATS * 2 +.writeEVsLoop ; set all EVs to 0 + inc de + ld [de], a + dec b + jr nz, .writeEVsLoop + inc de + inc de + pop hl + call AddPartyMon_WriteMovePP + inc de + ld a, [wCurEnemyLVL] + ld [de], a + inc de + ld a, [wIsInBattle] + dec a + jr nz, .calcFreshStats + ld hl, wEnemyMonMaxHP + ld bc, $a + call CopyData ; copy stats of cur enemy mon + pop hl + jr .done +.calcFreshStats + pop hl + ld bc, wPartyMon1HPExp - 1 - wPartyMon1 + add hl, bc + ld b, $0 + call CalcStats ; calculate fresh set of stats +.done + scf + ret + +LoadMovePPs: + call GetPredefRegisters + ; fallthrough +AddPartyMon_WriteMovePP: + ld b, NUM_MOVES +.pploop + ld a, [hli] ; read move ID + and a + jr z, .empty + dec a + push hl + push de + push bc + ld hl, Moves + ld bc, MoveEnd - Moves + call AddNTimes + ld de, wcd6d + ld a, BANK(Moves) + call FarCopyData + pop bc + pop de + pop hl + ld a, [wcd6d + 5] ; PP is byte 5 of move data +.empty + inc de + ld [de], a + dec b + jr nz, .pploop ; there are still moves to read + ret + +; adds enemy mon [wcf91] (at position [wWhichPokemon] in enemy list) to own party +; used in the cable club trade center +_AddEnemyMonToPlayerParty: + ld hl, wPartyCount + ld a, [hl] + cp PARTY_LENGTH + scf + ret z ; party full, return failure + inc a + ld [hl], a ; add 1 to party members + ld c, a + ld b, $0 + add hl, bc + ld a, [wcf91] + ld [hli], a ; add mon as last list entry + ld [hl], $ff ; write new sentinel + ld hl, wPartyMons + ld a, [wPartyCount] + dec a + ld bc, wPartyMon2 - wPartyMon1 + call AddNTimes + ld e, l + ld d, h + ld hl, wLoadedMon + call CopyData ; write new mon's data (from wLoadedMon) + ld hl, wPartyMonOT + ld a, [wPartyCount] + dec a + call SkipFixedLengthTextEntries + ld d, h + ld e, l + ld hl, wEnemyMonOT + ld a, [wWhichPokemon] + call SkipFixedLengthTextEntries + ld bc, NAME_LENGTH + call CopyData ; write new mon's OT name (from an enemy mon) + ld hl, wPartyMonNicks + ld a, [wPartyCount] + dec a + call SkipFixedLengthTextEntries + ld d, h + ld e, l + ld hl, wEnemyMonNicks + ld a, [wWhichPokemon] + call SkipFixedLengthTextEntries + ld bc, NAME_LENGTH + call CopyData ; write new mon's nickname (from an enemy mon) + ld a, [wcf91] + ld [wd11e], a + predef IndexToPokedex + ld a, [wd11e] + dec a + ld c, a + ld b, FLAG_SET + ld hl, wPokedexOwned + push bc + call FlagAction ; add to owned pokemon + pop bc + ld hl, wPokedexSeen + call FlagAction ; add to seen pokemon + and a + ret ; return success + +_MoveMon: + ld a, [wMoveMonType] + and a + jr z, .checkPartyMonSlots + cp DAYCARE_TO_PARTY + jr z, .checkPartyMonSlots + cp PARTY_TO_DAYCARE + ld hl, wDayCareMon + jr z, .asm_f575 + ld hl, wNumInBox + ld a, [hl] + cp MONS_PER_BOX + jr nz, .partyOrBoxNotFull + jr .boxFull +.checkPartyMonSlots + ld hl, wPartyCount + ld a, [hl] + cp PARTY_LENGTH + jr nz, .partyOrBoxNotFull +.boxFull + scf + ret +.partyOrBoxNotFull + inc a + ld [hl], a ; increment number of mons in party/box + ld c, a + ld b, 0 + add hl, bc + ld a, [wMoveMonType] + cp DAYCARE_TO_PARTY + ld a, [wDayCareMon] + jr z, .asm_f556 + ld a, [wcf91] +.asm_f556 + ld [hli], a ; write new mon ID + ld [hl], $ff ; write new sentinel + ld a, [wMoveMonType] + dec a + ld hl, wPartyMons + ld bc, wPartyMon2 - wPartyMon1 ; $2c + ld a, [wPartyCount] + jr nz, .skipToNewMonEntry + ld hl, wBoxMons + ld bc, wBoxMon2 - wBoxMon1 ; $21 + ld a, [wNumInBox] +.skipToNewMonEntry + dec a + call AddNTimes +.asm_f575 + push hl + ld e, l + ld d, h + ld a, [wMoveMonType] + and a + ld hl, wBoxMons + ld bc, wBoxMon2 - wBoxMon1 ; $21 + jr z, .asm_f591 + cp DAYCARE_TO_PARTY + ld hl, wDayCareMon + jr z, .asm_f597 + ld hl, wPartyMons + ld bc, wPartyMon2 - wPartyMon1 ; $2c +.asm_f591 + ld a, [wWhichPokemon] + call AddNTimes +.asm_f597 + push hl + push de + ld bc, wBoxMon2 - wBoxMon1 + call CopyData + pop de + pop hl + ld a, [wMoveMonType] + and a + jr z, .asm_f5b4 + cp DAYCARE_TO_PARTY + jr z, .asm_f5b4 + ld bc, wBoxMon2 - wBoxMon1 + add hl, bc + ld a, [hl] + inc de + inc de + inc de + ld [de], a +.asm_f5b4 + ld a, [wMoveMonType] + cp PARTY_TO_DAYCARE + ld de, wDayCareMonOT + jr z, .asm_f5d3 + dec a + ld hl, wPartyMonOT + ld a, [wPartyCount] + jr nz, .asm_f5cd + ld hl, wBoxMonOT + ld a, [wNumInBox] +.asm_f5cd + dec a + call SkipFixedLengthTextEntries + ld d, h + ld e, l +.asm_f5d3 + ld hl, wBoxMonOT + ld a, [wMoveMonType] + and a + jr z, .asm_f5e6 + ld hl, wDayCareMonOT + cp DAYCARE_TO_PARTY + jr z, .asm_f5ec + ld hl, wPartyMonOT +.asm_f5e6 + ld a, [wWhichPokemon] + call SkipFixedLengthTextEntries +.asm_f5ec + ld bc, NAME_LENGTH + call CopyData + ld a, [wMoveMonType] + cp PARTY_TO_DAYCARE + ld de, wDayCareMonName + jr z, .asm_f611 + dec a + ld hl, wPartyMonNicks + ld a, [wPartyCount] + jr nz, .asm_f60b + ld hl, wBoxMonNicks + ld a, [wNumInBox] +.asm_f60b + dec a + call SkipFixedLengthTextEntries + ld d, h + ld e, l +.asm_f611 + ld hl, wBoxMonNicks + ld a, [wMoveMonType] + and a + jr z, .asm_f624 + ld hl, wDayCareMonName + cp DAYCARE_TO_PARTY + jr z, .asm_f62a + ld hl, wPartyMonNicks +.asm_f624 + ld a, [wWhichPokemon] + call SkipFixedLengthTextEntries +.asm_f62a + ld bc, NAME_LENGTH + call CopyData + pop hl + ld a, [wMoveMonType] + cp PARTY_TO_BOX + jr z, .asm_f664 + cp PARTY_TO_DAYCARE + jr z, .asm_f664 + push hl + srl a + add $2 + ld [wMonDataLocation], a + call LoadMonData + callba CalcLevelFromExperience + ld a, d + ld [wCurEnemyLVL], a + pop hl + ld bc, wBoxMon2 - wBoxMon1 + add hl, bc + ld [hli], a + ld d, h + ld e, l + ld bc, -18 + add hl, bc + ld b, $1 + call CalcStats +.asm_f664 + and a + ret diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index dc08e0e1..373136a8 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -1,21 +1,21 @@ ; Draws a "frame block". Frame blocks are blocks of tiles that are put ; together to form frames in battle animations. -DrawFrameBlock: ; 78000 (1e:4000) +DrawFrameBlock: ld l,c ld h,b ld a,[hli] - ld [W_NUMFBTILES],a - ld a,[W_FBDESTADDR + 1] + ld [wNumFBTiles],a + ld a,[wFBDestAddr + 1] ld e,a - ld a,[W_FBDESTADDR] + ld a,[wFBDestAddr] ld d,a xor a - ld [W_FBTILECOUNTER],a ; loop counter + ld [wFBTileCounter],a ; loop counter .loop - ld a,[W_FBTILECOUNTER] + ld a,[wFBTileCounter] inc a - ld [W_FBTILECOUNTER],a - ld a,[W_SUBANIMTRANSFORM] + ld [wFBTileCounter],a + ld a,[wSubAnimTransform] dec a jr z,.flipHorizontalAndVertical ; 1 dec a @@ -23,15 +23,15 @@ DrawFrameBlock: ; 78000 (1e:4000) dec a jr z,.flipBaseCoords ; 3 .noTransformation - ld a,[W_BASECOORDY] + ld a,[wBaseCoordY] add [hl] ld [de],a ; store Y inc hl inc de - ld a,[W_BASECOORDX] + ld a,[wBaseCoordX] jr .finishCopying .flipBaseCoords - ld a,[W_BASECOORDY] + ld a,[wBaseCoordY] ld b,a ld a,136 sub b ; flip Y base coordinate @@ -39,11 +39,11 @@ DrawFrameBlock: ; 78000 (1e:4000) ld [de],a ; store Y inc hl inc de - ld a,[W_BASECOORDX] + ld a,[wBaseCoordX] ld b,a ld a,168 sub b ; flip X base coordinate -.finishCopying ; finish copying values to OAM (when [W_SUBANIMTRANSFORM] not 1 or 2) +.finishCopying ; finish copying values to OAM (when [wSubAnimTransform] not 1 or 2) add [hl] ; X offset ld [de],a ; store X inc hl @@ -57,7 +57,7 @@ DrawFrameBlock: ; 78000 (1e:4000) inc de jp .nextTile .flipHorizontalAndVertical - ld a,[W_BASECOORDY] + ld a,[wBaseCoordY] add [hl] ; Y offset ld b,a ld a,136 @@ -65,7 +65,7 @@ DrawFrameBlock: ; 78000 (1e:4000) ld [de],a ; store Y inc hl inc de - ld a,[W_BASECOORDX] + ld a,[wBaseCoordX] add [hl] ; X offset ld b,a ld a,168 @@ -95,13 +95,13 @@ DrawFrameBlock: ; 78000 (1e:4000) inc de jp .nextTile .flipHorizontalTranslateDown - ld a,[W_BASECOORDY] + ld a,[wBaseCoordY] add [hl] add a,40 ; translate Y coordinate downwards ld [de],a ; store Y inc hl inc de - ld a,[W_BASECOORDX] + ld a,[wBaseCoordX] add [hl] ld b,a ld a,168 @@ -125,52 +125,52 @@ DrawFrameBlock: ; 78000 (1e:4000) ld [de],a inc de .nextTile - ld a,[W_FBTILECOUNTER] + ld a,[wFBTileCounter] ld c,a - ld a,[W_NUMFBTILES] + ld a,[wNumFBTiles] cp c jp nz,.loop ; go back up if there are more tiles to draw .afterDrawingTiles - ld a,[W_FBMODE] + ld a,[wFBMode] cp a,2 jr z,.advanceFrameBlockDestAddr; skip delay and don't clean OAM buffer - ld a,[W_SUBANIMFRAMEDELAY] + ld a,[wSubAnimFrameDelay] ld c,a call DelayFrames - ld a,[W_FBMODE] + ld a,[wFBMode] cp a,3 jr z,.advanceFrameBlockDestAddr ; skip cleaning OAM buffer cp a,4 jr z,.done ; skip cleaning OAM buffer and don't advance the frame block destination address - ld a,[W_ANIMATIONID] + ld a,[wAnimationID] cp a,GROWL jr z,.resetFrameBlockDestAddr call AnimationCleanOAM .resetFrameBlockDestAddr ld hl,wOAMBuffer ; OAM buffer ld a,l - ld [W_FBDESTADDR + 1],a + ld [wFBDestAddr + 1],a ld a,h - ld [W_FBDESTADDR],a ; set destination address to beginning of OAM buffer + ld [wFBDestAddr],a ; set destination address to beginning of OAM buffer ret .advanceFrameBlockDestAddr ld a,e - ld [W_FBDESTADDR + 1],a + ld [wFBDestAddr + 1],a ld a,d - ld [W_FBDESTADDR],a + ld [wFBDestAddr],a .done ret -PlayAnimation: ; 780f1 (1e:40f1) +PlayAnimation: xor a - ld [$FF8B],a - ld [W_SUBANIMTRANSFORM],a - ld a,[W_ANIMATIONID] ; get animation number + ld [$FF8B],a ; it looks like nothing reads this + ld [wSubAnimTransform],a + ld a,[wAnimationID] ; get animation number dec a 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 @@ -217,13 +217,13 @@ PlayAnimation: ; 780f1 (1e:40f1) .playSubanimation ld c,a and a,%00111111 - ld [W_SUBANIMFRAMEDELAY],a + ld [wSubAnimFrameDelay],a xor a sla c rla sla c rla - ld [wd09f],a ; tile select + ld [wWhichBattleAnimTileset],a ld a,[hli] ; sound ld [wAnimSoundID],a ; store sound ld a,[hli] ; subanimation ID @@ -235,15 +235,15 @@ PlayAnimation: ; 780f1 (1e:40f1) ld de,SubanimationPointers add hl,de ld a,l - ld [W_SUBANIMADDRPTR],a + ld [wSubAnimAddrPtr],a ld a,h - ld [W_SUBANIMADDRPTR + 1],a + ld [wSubAnimAddrPtr + 1],a ld l,c ld h,b push hl ld a,[rOBP0] push af - ld a,[wcc79] + ld a,[wAnimPalette] ld [rOBP0],a call LoadAnimationTileset call LoadSubanimation @@ -253,13 +253,13 @@ PlayAnimation: ; 780f1 (1e:40f1) .nextAnimationCommand pop hl jr .animationLoop -.AnimationOver ; 417B +.AnimationOver ret -LoadSubanimation: ; 7817c (1e:417c) - ld a,[W_SUBANIMADDRPTR + 1] +LoadSubanimation: + ld a,[wSubAnimAddrPtr + 1] ld h,a - ld a,[W_SUBANIMADDRPTR] + ld a,[wSubAnimAddrPtr] ld l,a ld a,[hli] ld e,a @@ -268,7 +268,7 @@ LoadSubanimation: ; 7817c (1e:417c) ld a,[de] ld b,a and a,31 - ld [W_SUBANIMCOUNTER],a ; number of frame blocks + ld [wSubAnimCounter],a ; number of frame blocks ld a,b and a,%11100000 cp a,5 << 5 ; is subanimation type 5? @@ -282,12 +282,12 @@ LoadSubanimation: ; 7817c (1e:417c) ; place the upper 3 bits of a into bits 0-2 of a before storing srl a swap a - ld [W_SUBANIMTRANSFORM],a + ld [wSubAnimTransform],a cp a,4 ; is the animation reversed? ld hl,0 jr nz,.storeSubentryAddr ; if the animation is reversed, then place the initial subentry address at the end of the list of subentries - ld a,[W_SUBANIMCOUNTER] + ld a,[wSubAnimCounter] dec a ld bc,3 .loop @@ -298,15 +298,15 @@ LoadSubanimation: ; 7817c (1e:417c) inc de add hl,de ld a,l - ld [W_SUBANIMSUBENTRYADDR],a + ld [wSubAnimSubEntryAddr],a ld a,h - ld [W_SUBANIMSUBENTRYADDR + 1],a + ld [wSubAnimSubEntryAddr + 1],a ret ; called if the subanimation type is not 5 ; sets the transform to 0 (i.e. no transform) if it's the player's turn ; sets the transform to the subanimation type if it's the enemy's turn -GetSubanimationTransform1: ; 781c2 (1e:41c2) +GetSubanimationTransform1: ld b,a ld a,[H_WHOSETURN] and a @@ -318,7 +318,7 @@ GetSubanimationTransform1: ; 781c2 (1e:41c2) ; called if the subanimation type is 5 ; sets the transform to 2 (i.e. horizontal and vertical flip) if it's the player's turn ; sets the transform to 0 (i.e. no transform) if it's the enemy's turn -GetSubanimationTransform2: ; 781ca (1e:41ca) +GetSubanimationTransform2: ld a,[H_WHOSETURN] and a ld a,2 << 5 @@ -327,8 +327,8 @@ GetSubanimationTransform2: ; 781ca (1e:41ca) ret ; loads tile patterns for battle animations -LoadAnimationTileset: ; 781d2 (1e:41d2) - ld a,[wd09f] ; tileset select +LoadAnimationTileset: + ld a,[wWhichBattleAnimTileset] add a add a ld hl,AnimationTilesetPointers @@ -336,18 +336,18 @@ LoadAnimationTileset: ; 781d2 (1e:41d2) ld d,0 add hl,de ld a,[hli] - ld [wd07d],a ; number of tiles + ld [wTempTilesetNumTiles],a ; number of tiles ld a,[hli] ld e,a ld a,[hl] ld d,a ; de = address of tileset ld hl,vSprites + $310 ld b, BANK(AnimationTileset1) ; ROM bank - ld a,[wd07d] + ld a,[wTempTilesetNumTiles] ld c,a ; number of tiles jp CopyVideoData ; load tileset -AnimationTilesetPointers: ; 781f2 (1e:41f2) +AnimationTilesetPointers: db 79 ; number of tiles dw AnimationTileset1 db $FF @@ -360,60 +360,57 @@ AnimationTilesetPointers: ; 781f2 (1e:41f2) dw AnimationTileset1 db $FF -AnimationTileset1: ; 781fe (1e:41fe) +AnimationTileset1: INCBIN "gfx/attack_anim_1.2bpp" -AnimationTileset2: ; 786ee (1e:46ee) +AnimationTileset2: INCBIN "gfx/attack_anim_2.2bpp" -SlotMachineTiles2: ; 78bde (1e:4bde) +SlotMachineTiles2: IF DEF(_RED) INCBIN "gfx/red/slotmachine2.2bpp" ENDC IF DEF(_BLUE) INCBIN "gfx/blue/slotmachine2.2bpp" ENDC -IF DEF(_YELLOW) - INCBIN "gfx/yellow/slotmachine2.2bpp" -ENDC -MoveAnimation: ; 78d5e (1e:4d5e) +MoveAnimation: push hl push de push bc push af call WaitForSoundToFinish - call Func_78e23 - ld a,[W_ANIMATIONID] + call SetAnimationPalette + ld a,[wAnimationID] and a - jr z,.AnimationFinished + jr z, .animationFinished ; if throwing a Poké Ball, skip the regular animation code cp a,TOSS_ANIM - jr nz,.MoveAnimation - ld de,.AnimationFinished + jr nz, .moveAnimation + ld de, .animationFinished push de jp TossBallAnimation -.MoveAnimation +.moveAnimation ; check if battle animations are disabled in the options - ld a,[W_OPTIONS] + ld a,[wOptions] bit 7,a - jr nz,.AnimationsDisabled + jr nz, .animationsDisabled call ShareMoveAnimations call PlayAnimation jr .next4 -.AnimationsDisabled +.animationsDisabled ld c,30 call DelayFrames .next4 call PlayApplyingAttackAnimation ; shake the screen or flash the pic in and out (to show damage) -.AnimationFinished +.animationFinished call WaitForSoundToFinish xor a - ld [W_SUBANIMSUBENTRYADDR],a - ld [wd09b],a - ld [W_SUBANIMTRANSFORM],a + ld [wSubAnimSubEntryAddr],a + ld [wUnusedD09B],a + ld [wSubAnimTransform],a dec a ld [wAnimSoundID],a pop af @@ -422,7 +419,7 @@ MoveAnimation: ; 78d5e (1e:4d5e) pop hl ret -ShareMoveAnimations: ; 78da6 (1e:4da6) +ShareMoveAnimations: ; some moves just reuse animations from status conditions ld a,[H_WHOSETURN] and a @@ -430,22 +427,22 @@ ShareMoveAnimations: ; 78da6 (1e:4da6) ; opponent’s turn - ld a,[W_ANIMATIONID] + ld a,[wAnimationID] cp a,AMNESIA ld b,CONF_ANIM - jr z,.Replace + jr z, .replaceAnim cp a,REST ld b,SLP_ANIM ret nz -.Replace +.replaceAnim ld a,b - ld [W_ANIMATIONID],a + ld [wAnimationID],a ret -PlayApplyingAttackAnimation: ; 78dbd (1e:4dbd) +PlayApplyingAttackAnimation: ; Generic animation that shows after the move's individual animation ; Different animation depending on whether the move has an additional effect and on whose turn it is ld a,[wAnimationType] @@ -462,7 +459,7 @@ PlayApplyingAttackAnimation: ; 78dbd (1e:4dbd) ld l,a jp [hl] -AnimationTypePointerTable: ; 78dcf (1e:4dcf) +AnimationTypePointerTable: dw ShakeScreenVertically ; enemy mon has used a damaging move without a side effect dw ShakeScreenHorizontallyHeavy ; enemy mon has used a damaging move with a side effect dw ShakeScreenHorizontallySlow ; enemy mon has used a non-damaging move @@ -470,100 +467,100 @@ AnimationTypePointerTable: ; 78dcf (1e:4dcf) dw ShakeScreenHorizontallyLight ; player mon has used a damaging move with a side effect dw ShakeScreenHorizontallySlow2 ; player mon has used a non-damaging move -ShakeScreenVertically: ; 78ddb (1e:4ddb) +ShakeScreenVertically: call PlayApplyingAttackSound - ld b, $8 + ld b, 8 jp AnimationShakeScreenVertically -ShakeScreenHorizontallyHeavy: ; 78de3 (1e:4de3) +ShakeScreenHorizontallyHeavy: call PlayApplyingAttackSound - ld b, $8 + ld b, 8 jp AnimationShakeScreenHorizontallyFast -ShakeScreenHorizontallySlow: ; 78deb (1e:4deb) - ld bc, $602 +ShakeScreenHorizontallySlow: + lb bc, 6, 2 jr AnimationShakeScreenHorizontallySlow -BlinkEnemyMonSprite: ; 78df0 (1e:4df0) +BlinkEnemyMonSprite: call PlayApplyingAttackSound jp AnimationBlinkEnemyMon -ShakeScreenHorizontallyLight: ; 78df6 (1e:4df6) +ShakeScreenHorizontallyLight: call PlayApplyingAttackSound - ld b, $2 + ld b, 2 jp AnimationShakeScreenHorizontallyFast -ShakeScreenHorizontallySlow2: ; 78dfe (1e:4dfe) - ld bc, $302 +ShakeScreenHorizontallySlow2: + lb bc, 3, 2 -AnimationShakeScreenHorizontallySlow: ; 78e01 (1e:4e01) +AnimationShakeScreenHorizontallySlow: push bc push bc -.asm_78e03 - ld a, [rWX] ; $ff4b +.loop1 + 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 + jr nz, .loop1 pop bc -.asm_78e11 - ld a, [rWX] ; $ff4b +.loop2 + 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 + jr nz, .loop2 pop bc dec c jr nz, AnimationShakeScreenHorizontallySlow ret -Func_78e23: ; 78e23 (1e:4e23) +SetAnimationPalette: ld a, [wOnSGB] and a ld a, $e4 - jr z, .asm_78e47 + jr z, .notSGB ld a, $f0 - ld [wcc79], a + ld [wAnimPalette], a ld b, $e4 - ld a, [W_ANIMATIONID] ; W_ANIMATIONID + ld a, [wAnimationID] cp TRADE_BALL_DROP_ANIM - jr c, .asm_78e3f + jr c, .next cp TRADE_BALL_POOF_ANIM + 1 - jr nc, .asm_78e3f + jr nc, .next ld b, $f0 -.asm_78e3f +.next ld a, b - ld [rOBP0], a ; $ff48 + ld [rOBP0], a ld a, $6c - ld [rOBP1], a ; $ff49 + ld [rOBP1], a ret -.asm_78e47 +.notSGB ld a, $e4 - ld [wcc79], a - ld [rOBP0], a ; $ff48 + ld [wAnimPalette], a + ld [rOBP0], a ld a, $6c - ld [rOBP1], a ; $ff49 + ld [rOBP1], a ret -PlaySubanimation: ; 78e53 (1e:4e53) +PlaySubanimation: 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 - ld [W_FBDESTADDR + 1],a + ld [wFBDestAddr + 1],a ld a,h - ld [W_FBDESTADDR],a - ld a,[W_SUBANIMSUBENTRYADDR + 1] + ld [wFBDestAddr],a + ld a,[wSubAnimSubEntryAddr + 1] ld h,a - ld a,[W_SUBANIMSUBENTRYADDR] + ld a,[wSubAnimSubEntryAddr] ld l,a .loop push hl @@ -581,28 +578,28 @@ 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] - ld [W_BASECOORDY],a + ld [wBaseCoordY],a ld a,[hl] - ld [W_BASECOORDX],a + ld [wBaseCoordX],a pop hl inc hl ld a,[hl] ; frame block mode - ld [W_FBMODE],a + ld [wFBMode],a call DrawFrameBlock call DoSpecialEffectByAnimationId ; run animation-specific function (if there is one) - ld a,[W_SUBANIMCOUNTER] + ld a,[wSubAnimCounter] dec a - ld [W_SUBANIMCOUNTER],a + ld [wSubAnimCounter],a ret z - ld a,[W_SUBANIMSUBENTRYADDR + 1] + ld a,[wSubAnimSubEntryAddr + 1] ld h,a - ld a,[W_SUBANIMSUBENTRYADDR] + ld a,[wSubAnimSubEntryAddr] ld l,a - ld a,[W_SUBANIMTRANSFORM] + ld a,[wSubAnimTransform] cp a,4 ; is the animation reversed? ld bc,3 jr nz,.nextSubanimationSubentry @@ -610,12 +607,12 @@ PlaySubanimation: ; 78e53 (1e:4e53) .nextSubanimationSubentry add hl,bc ld a,h - ld [W_SUBANIMSUBENTRYADDR + 1],a + ld [wSubAnimSubEntryAddr + 1],a ld a,l - ld [W_SUBANIMSUBENTRYADDR],a + ld [wSubAnimSubEntryAddr],a jp .loop -AnimationCleanOAM: ; 78ec8 (1e:4ec8) +AnimationCleanOAM: push hl push de push bc @@ -630,11 +627,11 @@ AnimationCleanOAM: ; 78ec8 (1e:4ec8) ; this runs after each frame block is drawn in a subanimation ; it runs a particular special effect based on the animation ID -DoSpecialEffectByAnimationId: ; 78ed7 (1e:4ed7) +DoSpecialEffectByAnimationId: push hl push de push bc - ld a,[W_ANIMATIONID] + ld a,[wAnimationID] ld hl,AnimationIdSpecialEffects ld de,3 call IsInArray @@ -653,7 +650,7 @@ DoSpecialEffectByAnimationId: ; 78ed7 (1e:4ed7) ret ; Format: Animation ID (1 byte), Address (2 bytes) -AnimationIdSpecialEffects: ; 78ef5 (1e:4ef5) +AnimationIdSpecialEffects: db MEGA_PUNCH dw AnimationFlashScreen @@ -667,7 +664,7 @@ AnimationIdSpecialEffects: ; 78ef5 (1e:4ef5) dw AnimationFlashScreen db TAIL_WHIP - dw Func_790d0 + dw TailWhipAnimationUnused db GROWL dw DoGrowlSpecialEffects @@ -703,13 +700,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 @@ -728,7 +725,7 @@ AnimationIdSpecialEffects: ; 78ef5 (1e:4ef5) db $FF ; terminator -DoBallTossSpecialEffects: ; 78f3e (1e:4f3e) +DoBallTossSpecialEffects: ld a,[wcf91] cp a,3 ; is it a Master Ball or Ultra Ball? jr nc,.skipFlashingEffect @@ -737,21 +734,21 @@ DoBallTossSpecialEffects: ; 78f3e (1e:4f3e) xor a,%00111100 ; complement colors 1 and 2 ld [rOBP0],a .skipFlashingEffect - ld a,[W_SUBANIMCOUNTER] + ld a,[wSubAnimCounter] cp a,11 ; is it the beginning of the subanimation? 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 + ld a,SFX_BALL_TOSS + call PlaySound .skipPlayingSound - ld a,[W_ISINBATTLE] + ld a,[wIsInBattle] cp a,02 ; is it a trainer battle? jr z,.isTrainerBattle ld a,[wd11e] cp a,$10 ; is the enemy pokemon the Ghost Marowak? ret nz ; if the enemy pokemon is the Ghost Marowak, make it dodge during the last 3 frames - ld a,[W_SUBANIMCOUNTER] + ld a,[wSubAnimCounter] cp a,3 jr z,.moveGhostMarowakLeft cp a,2 @@ -759,72 +756,72 @@ DoBallTossSpecialEffects: ; 78f3e (1e:4f3e) cp a,1 ret nz .moveGhostMarowakLeft - hlCoord 17, 0 + coord hl, 17, 0 ld de,20 - ld bc,$0707 ; 7 rows and 7 columns + lb bc, 7, 7 .loop push hl push bc - call Func_79862 ; move row of tiles left + call AnimCopyRowRight ; move row of tiles left pop bc pop hl add hl,de dec b jr nz,.loop ld a,%00001000 - ld [$ff10],a ; Channel 1 sweep register + ld [rNR10],a ; Channel 1 sweep register ret .isTrainerBattle ; if it's a trainer battle, shorten the animation by one frame - ld a,[W_SUBANIMCOUNTER] + ld a,[wSubAnimCounter] cp a,3 ret nz dec a - ld [W_SUBANIMCOUNTER],a + ld [wSubAnimCounter],a ret -DoBallShakeSpecialEffects: ; 78f96 (1e:4f96) - ld a,[W_SUBANIMCOUNTER] +DoBallShakeSpecialEffects: + ld a,[wSubAnimCounter] cp a,4 ; is it the beginning of a shake? 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 + ld a,SFX_TINK + call PlaySound ld c,40 call DelayFrames .skipPlayingSound - ld a,[W_SUBANIMCOUNTER] + ld a,[wSubAnimCounter] dec a ret nz ; if it's the end of the ball shaking subanimation, check if more shakes are left and restart the subanimation - ld a,[wWhichTrade] ; number of shakes + ld a,[wNumShakes] ; number of shakes dec a ; decrement number of shakes - ld [wWhichTrade],a + ld [wNumShakes],a ret z ; if there are shakes left, restart the subanimation - ld a,[W_SUBANIMSUBENTRYADDR] + ld a,[wSubAnimSubEntryAddr] ld l,a - ld a,[W_SUBANIMSUBENTRYADDR + 1] + ld a,[wSubAnimSubEntryAddr + 1] ld h,a ld de,-(4 * 3) ; 4 subentries and 3 bytes per subentry add hl,de ld a,l - ld [W_SUBANIMSUBENTRYADDR],a + ld [wSubAnimSubEntryAddr],a ld a,h - ld [W_SUBANIMSUBENTRYADDR + 1],a + ld [wSubAnimSubEntryAddr + 1],a ld a,5 ; number of subentries in the ball shaking subanimation plus one - ld [W_SUBANIMCOUNTER],a + ld [wSubAnimCounter],a ret ; plays a sound after the second frame of the poof animation -DoPoofSpecialEffects: ; 78fce (1e:4fce) - ld a,[W_SUBANIMCOUNTER] +DoPoofSpecialEffects: + ld a,[wSubAnimCounter] cp a,5 ret nz - ld a,(SFX_08_42 - SFX_Headers_08) / 3 + ld a,SFX_BALL_POOF jp PlaySound -DoRockSlideSpecialEffects: ; 78fd9 (1e:4fd9) - ld a,[W_SUBANIMCOUNTER] +DoRockSlideSpecialEffects: + ld a,[wSubAnimCounter] cp a,12 ret nc cp a,8 @@ -835,35 +832,35 @@ DoRockSlideSpecialEffects: ; 78fd9 (1e:4fd9) ; if the subaninmation counter is between 8 and 11, shake the screen horizontally and vertically .shakeScreen ld b,1 - predef Func_48125 ; shake horizontally + predef PredefShakeScreenHorizontally ; shake horizontally ld b,1 - predef_jump Func_480ff ; shake vertically + predef_jump PredefShakeScreenVertically ; shake vertically -FlashScreenEveryEightFrameBlocks: ; 78ff7 (1e:4ff7) - ld a,[W_SUBANIMCOUNTER] +FlashScreenEveryEightFrameBlocks: + ld a,[wSubAnimCounter] and a,7 ; is the subanimation counter exactly 8? call z,AnimationFlashScreen ; if so, flash the screen ret ; flashes the screen if the subanimation counter is divisible by 4 -FlashScreenEveryFourFrameBlocks: ; 79000 (1e:5000) - ld a,[W_SUBANIMCOUNTER] +FlashScreenEveryFourFrameBlocks: + ld a,[wSubAnimCounter] and a,3 call z,AnimationFlashScreen ret ; used for Explosion and Selfdestruct -DoExplodeSpecialEffects: ; 79009 (1e:5009) - ld a,[W_SUBANIMCOUNTER] +DoExplodeSpecialEffects: + ld a,[wSubAnimCounter] cp a,1 ; is it the end of the subanimation? jr nz,FlashScreenEveryFourFrameBlocks ; if it's the end of the subanimation, make the attacking pokemon disappear - hlCoord 1, 5 + coord hl, 1, 5 jp AnimationHideMonPic ; make pokemon disappear ; flashes the screen when subanimation counter is 1 modulo 4 -DoBlizzardSpecialEffects: ; 79016 (1e:5016) - ld a,[W_SUBANIMCOUNTER] +DoBlizzardSpecialEffects: + ld a,[wSubAnimCounter] cp a,13 jp z,AnimationFlashScreen cp a,9 @@ -875,9 +872,9 @@ DoBlizzardSpecialEffects: ; 79016 (1e:5016) ret ; flashes the screen at 3 points in the subanimation -; XXX is this unused? -Func_7902e: ; 7902e (1e:502e) - ld a,[W_SUBANIMCOUNTER] +; unused +FlashScreenUnused: + ld a,[wSubAnimCounter] cp a,14 jp z,AnimationFlashScreen cp a,9 @@ -887,18 +884,16 @@ 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) - ld a,[W_SUBANIMCOUNTER] +TradeHidePokemon: + ld a,[wSubAnimCounter] cp a,6 ret nz - ld a,$2F - jp Func_7980c ; make pokemon disappear + ld a,2 * SCREEN_WIDTH + 7 + jp ClearMonPicFromTileMap ; 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) - ld a,[W_SUBANIMCOUNTER] +TradeShakePokeball: + ld a,[wSubAnimCounter] cp a,1 ret nz ; if it's the end of the animation, make the ball jump up @@ -923,16 +918,15 @@ Func_7904c: ; 7904c (1e:504c) jr .loop .done call AnimationCleanOAM - ld a,(SFX_02_44 - SFX_Headers_02) / 3 - jp PlaySound ; play sound + ld a,SFX_TRADE_MACHINE + jp PlaySound -BallMoveDistances1: ; 79078 (1e:5078) +BallMoveDistances1: db -12,-12,-8 db $ff ; terminator ; function to make the pokeball jump up -; XXX probably a trade-related animation -Func_7907c ; 507C +TradeJumpPokeball: ld de,BallMoveDistances2 .loop ld hl,wOAMBuffer ; OAM buffer @@ -955,7 +949,7 @@ Func_7907c ; 507C cp a,$ff jr nz,.skipPlayingSound .playSound ; play sound if next move distance is 12 or this is the last one - ld a,(SFX_08_58 - SFX_Headers_08) / 3 + ld a,SFX_BATTLE_18 call PlaySound .skipPlayingSound push bc @@ -968,31 +962,31 @@ Func_7907c ; 507C pop de jr .loop -BallMoveDistances2: ; 790b3 (1e:50b3) +BallMoveDistances2: db 11,12,-12,-7,7,12,-8,8 db $ff ; terminator ; this function copies the current musical note graphic ; so that there are two musical notes flying towards the defending pokemon -DoGrowlSpecialEffects: ; 790bc (1e:50bc) +DoGrowlSpecialEffects: ld hl,wOAMBuffer ; OAM buffer ld de,wOAMBuffer + $10 ld bc,$10 call CopyData ; copy the musical note graphic - ld a,[W_SUBANIMCOUNTER] + ld a,[wSubAnimCounter] dec a call z,AnimationCleanOAM ; clean up at the end of the subanimation ret ; this is associated with Tail Whip, but Tail Whip doesn't use any subanimations -Func_790d0: ; 790d0 (1e:50d0) +TailWhipAnimationUnused: ld a,1 - ld [W_SUBANIMCOUNTER],a + ld [wSubAnimCounter],a ld c,20 jp DelayFrames ; Format: Special Effect ID (1 byte), Address (2 bytes) -SpecialEffectPointers: ; 790da (1e:50da) +SpecialEffectPointers: db SE_DARK_SCREEN_FLASH ; $FE dw AnimationFlashScreen db SE_DARK_SCREEN_PALETTE ; $FD @@ -1013,8 +1007,8 @@ SpecialEffectPointers: ; 790da (1e:50da) dw AnimationSlideMonDown db SE_FLASH_MON_PIC ; $F5 dw AnimationFlashMonPic - db SE_SLIDE_MON_OUT ; $F4 - dw AnimationSlideMonOut + db SE_SLIDE_MON_OFF ; $F4 + dw AnimationSlideMonOff db SE_BLINK_MON ; $F3 dw AnimationBlinkMon db SE_MOVE_MON_HORIZONTALLY ; $F2 @@ -1043,8 +1037,8 @@ SpecialEffectPointers: ; 790da (1e:50da) dw AnimationLeavesFalling db SE_PETALS_FALLING ; $E6 dw AnimationPetalsFalling - db SE_SLIDE_MON_HALF_LEFT ; $E5 - dw AnimationSlideMonHalfLeft + db SE_SLIDE_MON_HALF_OFF ; $E5 + dw AnimationSlideMonHalfOff db SE_SHAKE_ENEMY_HUD ; $E4 dw AnimationShakeEnemyHUD db SE_SHAKE_ENEMY_HUD_2 ; unused--same pointer as SE_SHAKE_ENEMY_HUD ($E4) @@ -1063,8 +1057,8 @@ SpecialEffectPointers: ; 790da (1e:50da) dw AnimationShowMonPic db SE_SHOW_ENEMY_MON_PIC ; $DC dw AnimationShowEnemyMonPic - db SE_SLIDE_ENEMY_MON_OUT ; $DB - dw AnimationSlideEnemyMonOut + db SE_SLIDE_ENEMY_MON_OFF ; $DB + dw AnimationSlideEnemyMonOff db SE_SHAKE_BACK_AND_FORTH ; $DA dw AnimationShakeBackAndForth db SE_SUBSTITUTE_MON ; $D9 @@ -1073,13 +1067,13 @@ SpecialEffectPointers: ; 790da (1e:50da) dw AnimationWavyScreen db $FF -AnimationDelay10: ; 79150 (1e:5150) +AnimationDelay10: ld c,10 jp DelayFrames ; calls a function with the turn flipped from player to enemy or vice versa ; input - hl - address of function to call -CallWithTurnFlipped: ; 79155 (1e:5155) +CallWithTurnFlipped: ld a,[H_WHOSETURN] push af xor a,1 @@ -1093,9 +1087,9 @@ CallWithTurnFlipped: ; 79155 (1e:5155) ret ; flashes the screen for an extended period (48 frames) -AnimationFlashScreenLong: ; 79165 (1e:5165) +AnimationFlashScreenLong: ld a,3 ; cycle through the palettes 3 times - ld [wd08a],a + ld [wFlashScreenLongCounter],a ld a,[wOnSGB] ; running on SGB? and a ld hl,FlashScreenLongMonochrome @@ -1111,15 +1105,15 @@ AnimationFlashScreenLong: ; 79165 (1e:5165) call FlashScreenLongDelay jr .innerLoop .endOfPalettes - ld a,[wd08a] + ld a,[wFlashScreenLongCounter] dec a - ld [wd08a],a + ld [wFlashScreenLongCounter],a pop hl jr nz,.loop ret ; BG palettes -FlashScreenLongMonochrome: ; 7918e (1e:518e) +FlashScreenLongMonochrome: db %11111001 ; 3, 3, 2, 1 db %11111110 ; 3, 3, 3, 2 db %11111111 ; 3, 3, 3, 3 @@ -1135,7 +1129,7 @@ FlashScreenLongMonochrome: ; 7918e (1e:518e) db $01 ; terminator ; BG palettes -FlashScreenLongSGB: ; 7919b (1e:519b) +FlashScreenLongSGB: db %11111000 ; 3, 3, 2, 0 db %11111100 ; 3, 3, 3, 0 db %11111111 ; 3, 3, 3, 3 @@ -1152,9 +1146,9 @@ FlashScreenLongSGB: ; 7919b (1e:519b) ; causes a delay of 2 frames for the first cycle ; causes a delay of 1 frame for the second and third cycles -FlashScreenLongDelay: ; 791a8 (1e:51a8) - ld a,[wd08a] - cp a,4 ; never true since [wd08a] starts at 3 +FlashScreenLongDelay: + ld a,[wFlashScreenLongCounter] + cp a,4 ; never true since [wFlashScreenLongCounter] starts at 3 ld c,4 jr z,.delayFrames cp a,3 @@ -1165,7 +1159,7 @@ FlashScreenLongDelay: ; 791a8 (1e:51a8) .delayFrames jp DelayFrames -AnimationFlashScreen: ; 791be (1e:51be) +AnimationFlashScreen: ld a,[rBGP] push af ; save initial palette ld a,%00011011 ; 0, 1, 2, 3 (inverted colors) @@ -1180,235 +1174,250 @@ AnimationFlashScreen: ; 791be (1e:51be) ld [rBGP],a ; restore initial palette ret -AnimationDarkScreenPalette: ; 791d6 (1e:51d6) +AnimationDarkScreenPalette: ; Changes the screen's palette to a dark palette. - ld bc, $6f6f - jr Func_791fc + lb bc, $6f, $6f + jr SetAnimationBGPalette -AnimationDarkenMonPalette: ; 791db (1e:51db) +AnimationDarkenMonPalette: ; Darkens the mon sprite's palette. - ld bc, $f9f4 - jr Func_791fc + lb bc, $f9, $f4 + jr SetAnimationBGPalette -Func_791e0: ; 791e0 (1e:51e0) - ld bc, $fef8 - jr Func_791fc +AnimationUnusedPalette1: + lb bc, $fe, $f8 + jr SetAnimationBGPalette -Func_791e5: ; 791e5 (1e:51e5) - ld bc, $ffff - jr Func_791fc +AnimationUnusedPalette2: + lb bc, $ff, $ff + jr SetAnimationBGPalette -AnimationResetScreenPalette: ; 791ea (1e:51ea) +AnimationResetScreenPalette: ; Restores the screen's palette to the normal palette. - ld bc, $e4e4 - jr Func_791fc + lb bc, $e4, $e4 + jr SetAnimationBGPalette -Func_791ef: ; 791ef (1e:51ef) - ld bc, $0000 - jr Func_791fc +AnimationUnusedPalette3: + lb bc, $00, $00 + jr SetAnimationBGPalette -AnimationLightScreenPalette: ; 791f4 (1e:51f4) +AnimationLightScreenPalette: ; Changes the screen to use a palette with light colors. - ld bc, $9090 - jr Func_791fc + lb bc, $90, $90 + jr SetAnimationBGPalette -Func_791f9: ; 791f9 (1e:51f9) - ld bc, $4040 +AnimationUnusedPalette4: + lb bc, $40, $40 -Func_791fc: ; 791fc (1e:51fc) +SetAnimationBGPalette: ld a, [wOnSGB] and a ld a, b - jr z, .asm_79204 + jr z, .next ld a, c -.asm_79204 - ld [rBGP], a ; $ff47 +.next + ld [rBGP], a ret ld b, $5 -AnimationShakeScreenVertically: ; 79209 (1e:5209) - predef_jump Func_480ff +AnimationShakeScreenVertically: + predef_jump PredefShakeScreenVertically -AnimationShakeScreen: ; 7920e (1e:520e) +AnimationShakeScreen: ; Shakes the screen for a while. Used in Earthquake/Fissure/etc. animations. ld b, $8 -AnimationShakeScreenHorizontallyFast: ; 79210 (1e:5210) - predef_jump Func_48125 +AnimationShakeScreenHorizontallyFast: + predef_jump PredefShakeScreenHorizontally -AnimationWaterDropletsEverywhere: ; 79215 (1e:5215) +AnimationWaterDropletsEverywhere: ; Draws water droplets all over the screen and makes them ; scroll. It's hard to describe, but it's the main animation ; in Surf/Mist/Toxic. xor a - ld [wd09f], a + ld [wWhichBattleAnimTileset], a call LoadAnimationTileset - ld d, $20 - ld a, $f0 - ld [W_BASECOORDX], a ; wd081 + ld d, 32 + ld a, -16 + ld [wBaseCoordX], a ld a, $71 - ld [wd09f], a -.asm_79228 - ld a, $10 - ld [W_BASECOORDY], a ; wd082 - ld a, $0 - ld [wd08a], a - call Func_79246 - ld a, $18 - ld [W_BASECOORDY], a ; wd082 - ld a, $20 - ld [wd08a], a - call Func_79246 + ld [wDropletTile], a +.loop + ld a, 16 + ld [wBaseCoordY], a + ld a, 0 + ld [wUnusedD08A], a + call _AnimationWaterDroplets + ld a, 24 + ld [wBaseCoordY], a + ld a, 32 + ld [wUnusedD08A], a + call _AnimationWaterDroplets dec d - jr nz, .asm_79228 + jr nz, .loop ret -Func_79246: ; 79246 (1e:5246) +_AnimationWaterDroplets: ld hl, wOAMBuffer -.asm_79249 - ld a, [W_BASECOORDY] ; wd082 - ld [hli], a - ld a, [W_BASECOORDX] ; wd081 - add $1b - ld [W_BASECOORDX], a ; wd081 - ld [hli], a - ld a, [wd09f] - ld [hli], a +.loop + ld a, [wBaseCoordY] + ld [hli], a ; Y + ld a, [wBaseCoordX] + add 27 + ld [wBaseCoordX], a + ld [hli], a ; X + ld a, [wDropletTile] + ld [hli], a ; tile xor a - ld [hli], a - ld a, [W_BASECOORDX] ; wd081 - cp $90 - jr c, .asm_79249 - sub $a8 - ld [W_BASECOORDX], a ; wd081 - ld a, [W_BASECOORDY] ; wd082 - add $10 - ld [W_BASECOORDY], a ; wd082 - cp $70 - jr c, .asm_79249 + ld [hli], a ; attribute + ld a, [wBaseCoordX] + cp 144 + jr c, .loop + sub 168 + ld [wBaseCoordX], a + ld a, [wBaseCoordY] + add 16 + ld [wBaseCoordY], a + cp 112 + jr c, .loop call AnimationCleanOAM jp DelayFrame -AnimationSlideMonUp: ; 7927a (1e:527a) +AnimationSlideMonUp: ; Slides the mon's sprite upwards. - ld c, $7 + ld c, 7 ld a, [H_WHOSETURN] and a - ld hl, wTileMap + $79 - ld de, wTileMap + $65 + coord hl, 1, 6 + coord de, 1, 5 ld a, $30 - jr z, .asm_79291 - ld hl, wTileMap + $20 - ld de, wTileMap + $c + jr z, .next + coord hl, 12, 1 + coord de, 12, 0 ld a, $ff -.asm_79291 - ld [wd09f], a - jp Func_792bf +.next + ld [wSlideMonUpBottomRowLeftTile], a + jp _AnimationSlideMonUp -AnimationSlideMonDown: ; 79297 (1e:5297) +AnimationSlideMonDown: ; Slides the mon's sprite down out of the screen. xor a call GetTileIDList -.asm_7929b +.loop call GetMonSpriteTileMapPointerFromRowCount push bc push de - call Func_79aae + call CopyPicTiles call Delay3 call AnimationHideMonPic pop de pop bc dec b - jr nz, .asm_7929b + jr nz, .loop ret -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 +AnimationSlideMonOff: +; Slides the mon's sprite off the screen horizontally. + ld e, 8 + ld a, 3 + ld [wSlideMonDelay], a + jp _AnimationSlideMonOff -AnimationSlideEnemyMonOut: ; 792b9 (1e:52b9) -; Slides the enemy mon out of the screen horizontally. - ld hl, AnimationSlideMonOut ; $52af +AnimationSlideEnemyMonOff: +; Slides the enemy mon off the screen horizontally. + ld hl, AnimationSlideMonOff jp CallWithTurnFlipped -Func_792bf: ; 792bf (1e:52bf) +_AnimationSlideMonUp: push de push hl push bc - ld b, $6 -.asm_792c4 + +; In each iteration, slide up all rows but the top one (which is overwritten). + ld b, 6 +.slideLoop push bc push de push hl - ld bc, $0007 + ld bc, 7 call CopyData +; Note that de and hl are popped in the same order they are pushed, swapping +; their values. When CopyData is called, hl points to a tile 1 row below +; the one de points to. To maintain this relationship, after swapping, we add 2 +; rows to hl so that it is 1 row below again. pop de pop hl - ld bc, $0028 + ld bc, SCREEN_WIDTH * 2 add hl, bc pop bc dec b - jr nz, .asm_792c4 + jr nz, .slideLoop + +; Fill in the bottom row of the mon pic with the next row's tile IDs. ld a, [H_WHOSETURN] and a - ld hl, wTileMap + $dd - jr z, .asm_792e2 - ld hl, wTileMap + $84 -.asm_792e2 - ld a, [wd09f] + coord hl, 1, 11 + jr z, .next + coord hl, 12, 6 +.next + ld a, [wSlideMonUpBottomRowLeftTile] inc a - ld [wd09f], a - ld c, $7 -.asm_792eb + ld [wSlideMonUpBottomRowLeftTile], a + ld c, 7 +.fillBottomRowLoop ld [hli], a - add $7 + add 7 dec c - jr nz, .asm_792eb - ld c, $2 + jr nz, .fillBottomRowLoop + + 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) +ShakeEnemyHUD_WritePlayerMonPicOAM: +; Writes the OAM entries for a copy of the player mon's pic in OAM. +; The top 5 rows are reproduced in OAM, although only 2 are actually needed. ld a, $10 - ld [W_BASECOORDX], a + ld [wBaseCoordX], a ld a, $30 - ld [W_BASECOORDY], a + ld [wBaseCoordY], a ld hl, wOAMBuffer - ld d, $0 - ld c, $7 -.asm_7930e - ld a, [W_BASECOORDY] + ld d, 0 + ld c, 7 +.loop + ld a, [wBaseCoordY] ld e, a - ld b, $5 -.asm_79314 - call Func_79329 + ld b, 5 +.innerLoop + call BattleAnimWriteOAMEntry inc d dec b - jr nz, .asm_79314 + jr nz, .innerLoop dec c ret z inc d inc d - ld a, [W_BASECOORDX] - add $8 - ld [W_BASECOORDX], a - jr .asm_7930e + ld a, [wBaseCoordX] + add 8 + ld [wBaseCoordX], a + jr .loop -Func_79329: ; 79329 (1e:5329) +BattleAnimWriteOAMEntry: +; Y coordinate = e (increased by 8 each call, before the write to OAM) +; X coordinate = [wBaseCoordX] +; tile = d +; attributes = 0 ld a, e - add $8 + add 8 ld e, a ld [hli], a - ld a, [W_BASECOORDX] ; wd081 + ld a, [wBaseCoordX] ld [hli], a ld a, d ld [hli], a @@ -1416,21 +1425,22 @@ Func_79329: ; 79329 (1e:5329) ld [hli], a ret -AdjustOAMBlockXPos: ; 79337 (1e:5337) +AdjustOAMBlockXPos: ld l, e ld h, d -AdjustOAMBlockXPos2: ; 79339 (1e:5339) - ld de, $4 +AdjustOAMBlockXPos2: + ld de, 4 .loop - ld a, [wd08a] + ld a, [wCoordAdjustmentAmount] ld b, a ld a, [hl] add b - cp $a8 + cp 168 jr c, .skipPuttingEntryOffScreen +; put off-screen if X >= 168 dec hl - ld a, $a0 + ld a, 160 ld [hli], a .skipPuttingEntryOffScreen ld [hl], a @@ -1439,21 +1449,21 @@ AdjustOAMBlockXPos2: ; 79339 (1e:5339) jr nz, .loop ret -AdjustOAMBlockYPos: ; 79350 (1e:5350) +AdjustOAMBlockYPos: ld l, e ld h, d -AdjustOAMBlockYPos2: ; 79352 (1e:5352) - ld de, $4 +AdjustOAMBlockYPos2: + ld de, 4 .loop - ld a, [wd08a] + ld a, [wCoordAdjustmentAmount] ld b, a ld a, [hl] add b - cp $70 + cp 112 jr c, .skipSettingPreviousEntrysAttribute dec hl - ld a, $a0 ; bug, sets previous OAM entry's attribute + ld a, 160 ; bug, sets previous OAM entry's attribute ld [hli], a .skipSettingPreviousEntrysAttribute ld [hl], a @@ -1462,70 +1472,70 @@ AdjustOAMBlockYPos2: ; 79352 (1e:5352) jr nz, .loop ret -AnimationBlinkEnemyMon: ; 79369 (1e:5369) +AnimationBlinkEnemyMon: ; 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) +AnimationBlinkMon: ; Make the mon's sprite blink on and off for a second or two. push af - ld c, $6 -.asm_79372 + ld c, 6 +.loop 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 - jr nz, .asm_79372 + jr nz, .loop pop af ret -AnimationFlashMonPic: ; 79389 (1e:5389) +AnimationFlashMonPic: ; Flashes the mon's sprite on and off ld a, [wBattleMonSpecies] - ld [wHPBarMaxHP + 1], a + ld [wChangeMonPicPlayerTurnSpecies], a ld a, [wEnemyMonSpecies] - ld [wHPBarMaxHP], a - jp Func_79793 + ld [wChangeMonPicEnemyTurnSpecies], a + jp ChangeMonPic -AnimationFlashEnemyMonPic: ; 79398 (1e:5398) +AnimationFlashEnemyMonPic: ; Flashes the enemy mon's sprite on and off ld hl, AnimationFlashMonPic jp CallWithTurnFlipped -AnimationShowMonPic: ; 7939e (1e:539e) +AnimationShowMonPic: xor a call GetTileIDList call GetMonSpriteTileMapPointerFromRowCount - call Func_79aae + call CopyPicTiles jp Delay3 -AnimationShowEnemyMonPic: ; 793ab (1e:53ab) +AnimationShowEnemyMonPic: ; Shows the emenmy mon's front sprite. Used in animations like Seismic Toss ; to make the mon's sprite reappear after disappears offscreen. ld hl, AnimationShowMonPic jp CallWithTurnFlipped -AnimationShakeBackAndForth: ; 793b1 (1e:53b1) +AnimationShakeBackAndForth: ; Shakes the mon's sprite back and forth rapidly. This is used in Double Team. ; The mon's sprite disappears after this animation. ld a, [H_WHOSETURN] and a - ld hl, wTileMap + $64 - ld de, wTileMap + $66 - jr z, .asm_793c2 - ld hl, wTileMap + $b - ld de, wTileMap + $d + coord hl, 0, 5 + coord de, 2, 5 + jr z, .next + coord hl, 11, 0 + coord de, 13, 0 -.asm_793c2 +.next xor a ld c, $10 -.asm_793c5 +.loop push af push bc push de @@ -1537,113 +1547,113 @@ AnimationShakeBackAndForth: ; 793b1 (1e:53b1) push hl call GetTileIDList pop hl - call Func_79aae + call CopyPicTiles call Delay3 pop hl - ld bc, $0709 + lb bc, 7, 9 call ClearScreenArea pop af call GetTileIDList pop hl - call Func_79aae + call CopyPicTiles call Delay3 pop hl - ld bc, $0709 + lb bc, 7, 9 call ClearScreenArea pop hl pop de pop bc pop af dec c - jr nz, .asm_793c5 + jr nz, .loop ret -AnimationMoveMonHorizontally: ; 793f9 (1e:53f9) +AnimationMoveMonHorizontally: ; Shifts the mon's sprite horizontally to a fixed location. Used by lots of ; animations like Tackle/Body Slam. call AnimationHideMonPic - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - hlCoord 2, 5 - jr z, .asm_79407 - hlCoord 11, 0 -.asm_79407 + coord hl, 2, 5 + jr z, .next + coord hl, 11, 0 +.next xor a push hl call GetTileIDList pop hl - call Func_79aae - ld c, $3 + call CopyPicTiles + ld c, 3 jp DelayFrames -AnimationResetMonPosition: ; 79415 (1e:5415) +AnimationResetMonPosition: ; 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 - ld a, $b -.asm_7941e - call Func_7980c + ld a, 5 * SCREEN_WIDTH + 2 + jr z, .next + ld a, 11 +.next + call ClearMonPicFromTileMap jp AnimationShowMonPic -AnimationSpiralBallsInward: ; 79424 (1e:5424) -; Creates an effect that looks like energy balls sprialing into the +AnimationSpiralBallsInward: +; Creates an effect that looks like energy balls spiralling into the ; player mon's sprite. Used in Focus Energy, for example. - ld a, [H_WHOSETURN] ; $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 - jr .asm_7943c -.asm_79435 + jr z, .playerTurn + ld a, -40 + ld [wSpiralBallsBaseY], a + ld a, 80 + ld [wSpiralBallsBaseX], a + jr .next +.playerTurn xor a - ld [wd08a], a - ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM -.asm_7943c - ld d, $7a - ld c, $3 + ld [wSpiralBallsBaseY], a + ld [wSpiralBallsBaseX], a +.next + ld d, $7a ; ball tile + ld c, 3 ; number of balls xor a - call Func_797e8 - ld hl, SpiralBallAnimationCoordinates ; $5476 -.asm_79447 + call InitMultipleObjectsOAM + ld hl, SpiralBallAnimationCoordinates +.loop push hl - ld c, $3 + ld c, 3 ld de, wOAMBuffer -.asm_7944d +.innerLoop ld a, [hl] cp $ff - jr z, .asm_7946f - ld a, [wd08a] + jr z, .done + ld a, [wSpiralBallsBaseY] add [hl] - ld [de], a + ld [de], a ; Y inc de inc hl - ld a, [W_SUBANIMTRANSFORM] ; W_SUBANIMTRANSFORM + ld a, [wSpiralBallsBaseX] add [hl] - ld [de], a + ld [de], a ; X inc hl inc de inc de inc de dec c - jr nz, .asm_7944d - ld c, $5 + jr nz, .innerLoop + ld c, 5 call DelayFrames pop hl inc hl inc hl - jr .asm_79447 -.asm_7946f + jr .loop +.done pop hl call AnimationCleanOAM jp AnimationFlashScreen -SpiralBallAnimationCoordinates: ; 79476 (1e:5476) +SpiralBallAnimationCoordinates: ; y, x pairs -; This is the sequence of screen coordinates that the spiraling +; This is the sequence of screen coordinates that the spiralling ; balls are positioned at. db $38, $28 db $40, $18 @@ -1668,131 +1678,132 @@ SpiralBallAnimationCoordinates: ; 79476 (1e:5476) db $50, $28 db $FF ; list terminator -AnimationSquishMonPic: ; 794a1 (1e:54a1) +AnimationSquishMonPic: ; Squishes the mon's sprite horizontally making it ; disappear. Used by Teleport/Sky Attack animations. - ld c, $4 -.asm_794a3 + ld c, 4 +.loop push bc - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - jr z, .asm_794b1 - hlCoord 16, 0 - deCoord 14, 0 - jr .asm_794b7 -.asm_794b1 - hlCoord 5, 5 - deCoord 3, 5 -.asm_794b7 + jr z, .playerTurn + coord hl, 16, 0 + coord de, 14, 0 + jr .next +.playerTurn + coord hl, 5, 5 + coord de, 3, 5 +.next push de - xor a - ld [wd09f], a - call Func_794d4 + xor a ; left + ld [wSquishMonCurrentDirection], a + call _AnimationSquishMonPic pop hl - ld a, $1 - ld [wd09f], a - call Func_794d4 + ld a, 1 ; right + ld [wSquishMonCurrentDirection], a + call _AnimationSquishMonPic pop bc dec c - jr nz, .asm_794a3 + jr nz, .loop call AnimationHideMonPic - ld c, $2 + ld c, 2 jp DelayFrame -Func_794d4: ; 794d4 (1e:54d4) - ld c, $7 -.asm_794d6 +_AnimationSquishMonPic: + ld c, 7 +.loop push bc push hl - ld c, $3 - ld a, [wd09f] - cp $0 - jr nz, .asm_794e7 - call Func_7985b + ld c, 3 + ld a, [wSquishMonCurrentDirection] + cp 0 + jr nz, .right + call AnimCopyRowLeft dec hl - jr .asm_794eb -.asm_794e7 - call Func_79862 + jr .next +.right + call AnimCopyRowRight inc hl -.asm_794eb - ld [hl], $7f +.next + ld [hl], " " pop hl - ld de, $14 + ld de, SCREEN_WIDTH add hl, de pop bc dec c - jr nz, .asm_794d6 + jr nz, .loop jp Delay3 -AnimationShootBallsUpward: ; 794f9 (1e:54f9) +AnimationShootBallsUpward: ; 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 - jr .asm_79506 -.asm_79503 - ld bc, $3028 -.asm_79506 + jr z, .playerTurn + lb bc, 0, 16 * 8 + jr .next +.playerTurn + lb bc, 6 * 8, 5 * 8 +.next ld a, b - ld [W_BASECOORDY], a ; wd082 + ld [wBaseCoordY], a ld a, c - ld [W_BASECOORDX], a ; wd081 - ld bc, $501 - call Func_79517 + ld [wBaseCoordX], a + lb bc, 5, 1 + call _AnimationShootBallsUpward jp AnimationCleanOAM -Func_79517: ; 79517 (1e:5517) +_AnimationShootBallsUpward: push bc xor a - ld [wd09f], a + ld [wWhichBattleAnimTileset], a call LoadAnimationTileset pop bc - ld d, $7a + ld d, $7a ; ball tile ld hl, wOAMBuffer push bc - ld a, [W_BASECOORDY] ; wd082 + ld a, [wBaseCoordY] ld e, a -.asm_7952a - call Func_79329 +.initOAMLoop + call BattleAnimWriteOAMEntry dec b - jr nz, .asm_7952a + jr nz, .initOAMLoop call DelayFrame pop bc ld a, b - ld [wd08a], a -.asm_79538 + ld [wNumShootingBalls], a +.loop push bc ld hl, wOAMBuffer -.asm_7953c - ld a, [W_BASECOORDY] ; wd082 - add $8 +.innerLoop + ld a, [wBaseCoordY] + add 8 ld e, a ld a, [hl] - cp e - jr z, .asm_7954b - add $fc + cp e ; has the ball reached the top? + jr z, .reachedTop + add -4 ; ball hasn't reached the top. move it up 4 pixels ld [hl], a - jr .asm_79554 -.asm_7954b - ld [hl], $0 - ld a, [wd08a] + jr .next +.reachedTop +; remove the ball once it has reached the top + ld [hl], 0 ; put it off-screen + ld a, [wNumShootingBalls] dec a - ld [wd08a], a -.asm_79554 - ld de, $4 - add hl, de + ld [wNumShootingBalls], a +.next + ld de, 4 + add hl, de ; next OAM entry dec b - jr nz, .asm_7953c + jr nz, .innerLoop call DelayFrames pop bc - ld a, [wd08a] + ld a, [wNumShootingBalls] and a - jr nz, .asm_79538 + jr nz, .loop ret -AnimationShootManyBallsUpward: ; 79566 (1e:5566) +AnimationShootManyBallsUpward: ; Shoots several pillars of "energy" balls upward. ld a, [H_WHOSETURN] and a @@ -1802,64 +1813,65 @@ AnimationShootManyBallsUpward: ; 79566 (1e:5566) ld hl, UpwardBallsAnimXCoordinatesEnemyTurn ld a, $28 ; y coordinate for "energy" ball pillar .player - ld [wTrainerSpriteOffset], a + ld [wSavedY], a .loop - ld a, [wTrainerSpriteOffset] - ld [W_BASECOORDY], a + ld a, [wSavedY] + ld [wBaseCoordY], a ld a, [hli] cp $ff jp z, AnimationCleanOAM - ld [W_BASECOORDX], a - ld bc, $0401 + ld [wBaseCoordX], a + lb bc, 4, 1 push hl - call Func_79517 + call _AnimationShootBallsUpward pop hl jr .loop -UpwardBallsAnimXCoordinatesPlayerTurn: ; 79591 (1e:5591) +UpwardBallsAnimXCoordinatesPlayerTurn: ; List of x coordinates for each pillar of "energy" balls in the ; AnimationShootManyBallsUpward animation. It's unused in the game. db $10, $40, $28, $18, $38, $30 db $FF ; list terminator -UpwardBallsAnimXCoordinatesEnemyTurn: ; 79598 (1e:5598) +UpwardBallsAnimXCoordinatesEnemyTurn: ; List of x coordinates for each pillar of "energy" balls in the ; AnimationShootManyBallsUpward animation. It's unused in the game. db $60, $90, $78, $68, $88, $80 db $FF ; list terminator -AnimationMinimizeMon: ; 7959f (1e:559f) +AnimationMinimizeMon: ; Changes the mon's sprite to a mini black sprite. Used by the ; Minimize animation. ld hl, wTempPic push hl xor a - ld bc, $310 + ld bc, 7 * 7 * $10 call FillMemory pop hl ld de, $194 add hl, de - ld de, MinimizedMonSprite ; $55c4 - ld c, $5 -.asm_795b4 + ld de, MinimizedMonSprite + ld c, MinimizedMonSpriteEnd - MinimizedMonSprite +.loop ld a, [de] ld [hli], a ld [hli], a inc de dec c - jr nz, .asm_795b4 - call Func_79652 + jr nz, .loop + call CopyTempPicToMonPic call Delay3 jp AnimationShowMonPic -MinimizedMonSprite: ; 795c4 (1e:55c4) +MinimizedMonSprite: INCBIN "gfx/minimized_mon_sprite.1bpp" +MinimizedMonSpriteEnd: -AnimationSlideMonDownAndHide: ; 795c9 (1e:55c9) +AnimationSlideMonDownAndHide: ; Slides the mon's sprite down and disappears. Used in Acid Armor. ld a, $1 ld c, $2 -.asm_795cd +.loop push bc push af call AnimationHideMonPic @@ -1867,168 +1879,182 @@ 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 pop bc dec c - jr nz, .asm_795cd + jr nz, .loop call AnimationHideMonPic ld hl, wTempPic ld bc, $0310 xor a call FillMemory - jp Func_79652 + jp CopyTempPicToMonPic -Func_795f8: ; 795f8 (1e:55f8) - ld a, [H_WHOSETURN] ; $fff3 +_AnimationSlideMonOff: +; Slides the mon's sprite off the screen horizontally by e tiles and waits +; [wSlideMonDelay] V-blanks each time the pic is slid by one tile. + ld a, [H_WHOSETURN] and a - jr z, .asm_79602 - hlCoord 12, 0 - jr .asm_79605 -.asm_79602 - hlCoord 0, 5 -.asm_79605 - ld d, $8 -.asm_79607 + jr z, .playerTurn + coord hl, 12, 0 + jr .next +.playerTurn + coord hl, 0, 5 +.next + ld d, 8 ; d's value is unused +.slideLoop ; iterates once for each time the pic slides by one tile push hl - ld b, $7 -.asm_7960a - ld c, $8 -.asm_7960c - ld a, [H_WHOSETURN] ; $fff3 + ld b, 7 +.rowLoop ; iterates once for each row + ld c, 8 +.tileLoop ; iterates once for each tile in the row + ld a, [H_WHOSETURN] and a - jr z, .asm_79616 - call Func_7963c - jr .asm_79619 -.asm_79616 - call Func_79633 -.asm_79619 + jr z, .playerTurn2 + call .EnemyNextTile + jr .next2 +.playerTurn2 + call .PlayerNextTile +.next2 ld [hli], a dec c - jr nz, .asm_7960c + jr nz, .tileLoop push de - ld de, $c + ld de, SCREEN_WIDTH - 8 add hl, de pop de dec b - jr nz, .asm_7960a - ld a, [W_SUBANIMTRANSFORM] ; W_SUBANIMTRANSFORM + jr nz, .rowLoop + ld a, [wSlideMonDelay] ld c, a call DelayFrames pop hl dec d dec e - jr nz, .asm_79607 + jr nz, .slideLoop ret -Func_79633: ; 79633 (1e:5633) +; Since mon pic tile numbers go from top to bottom, left to right in order, +; adding the height of the mon pic in tiles to a tile number gives the tile +; number of the tile one column to the right (and thus subtracting the height +; gives the reverse). If the next tile would be past the edge of the pic, the 2 +; functions below catch it by checking if the tile number is within the valid +; range and if not, replacing it with a blank tile. + +.PlayerNextTile ld a, [hl] - add $7 + add 7 +; This is a bug. The lower right corner tile of the mon back pic is blanked +; while the mon is sliding off the screen. It should compare with the max tile +; plus one instead. cp $61 ret c - ld a, $7f + ld a, " " ret -Func_7963c: ; 7963c (1e:563c) +.EnemyNextTile ld a, [hl] - sub $7 + sub 7 +; This has the same problem as above, but it has no visible effect because +; the lower right tile is in the first column to slide off the screen. cp $30 ret c - ld a, $7f + ld a, " " ret -AnimationSlideMonHalfLeft: ; 79645 (1e:5645) -; Slides the mon's sprite halfway out of the screen. It's used in Softboiled. - ld e, $4 - ld a, $4 - ld [W_SUBANIMTRANSFORM], a - call Func_795f8 +AnimationSlideMonHalfOff: +; Slides the mon's sprite halfway off the screen. It's used in Softboiled. + ld e, 4 + ld a, 4 + ld [wSlideMonDelay], a + call _AnimationSlideMonOff jp Delay3 -Func_79652: ; 79652 (1e:5652) - ld a, [H_WHOSETURN] ; $fff3 +CopyTempPicToMonPic: + ld a, [H_WHOSETURN] and a - ld hl, vBackPic - jr z, .asm_7965d - ld hl, vFrontPic -.asm_7965d + ld hl, vBackPic ; player turn + jr z, .next + ld hl, vFrontPic ; enemy turn +.next ld de, wTempPic ld bc, 7 * 7 jp CopyVideoData -AnimationWavyScreen: ; 79666 (1e:5666) +AnimationWavyScreen: ; used in Psywave/Psychic etc. ld hl, vBGMap0 - call Func_79e0d + call BattleAnimCopyTileMapToVRAM call Delay3 xor a ld [H_AUTOBGTRANSFERENABLED], a - ld a, $90 + ld a, SCREEN_HEIGHT_PIXELS ld [hWY], a - ld d, $80 - ld e, $8f + ld d, $80 ; terminator + ld e, SCREEN_HEIGHT_PIXELS - 1 ld c, $ff ld hl, WavyScreenLineOffsets -.asm_7967f +.loop push hl -.asm_79680 - call Func_796ae - ld a, [$ff44] - cp e - jr nz, .asm_79680 +.innerLoop + call WavyScreen_SetSCX + ld a, [rLY] + cp e ; is it the last visible line in the frame? + jr nz, .innerLoop ; keep going if not pop hl inc hl ld a, [hl] - cp d - jr nz, .asm_79691 - ld hl, WavyScreenLineOffsets -.asm_79691 + cp d ; have we reached the end? + jr nz, .next + ld hl, WavyScreenLineOffsets ; go back to the beginning if so +.next dec c - jr nz, .asm_7967f + jr nz, .loop xor a ld [hWY], a call SaveScreenTilesToBuffer2 call ClearScreen - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 call LoadScreenTilesFromBuffer2 ld hl, vBGMap1 - call Func_79e0d + call BattleAnimCopyTileMapToVRAM ret -Func_796ae: ; 796ae (1e:56ae) - ld a, [$ff41] - and $3 - jr nz, Func_796ae +WavyScreen_SetSCX: + ld a, [rSTAT] + and $3 ; is it H-blank? + jr nz, WavyScreen_SetSCX ; wait until it's H-blank ld a, [hl] - ld [$ff43], a + ld [rSCX], a inc hl ld a, [hl] - cp d + cp d ; have we reached the end? ret nz - ld hl, WavyScreenLineOffsets + ld hl, WavyScreenLineOffsets ; go back to the beginning if so ret -WavyScreenLineOffsets: ; 796bf (1e:56bf) +WavyScreenLineOffsets: ; Sequence of horizontal line pixel offsets for the wavy screen animation. ; This sequence vaguely resembles a sine wave. db 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1 db 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -2, -2, -1, -1, -1 db $80 ; terminator -AnimationSubstitute: ; 796e0 (1e:56e0) +AnimationSubstitute: ; Changes the pokemon's sprite to the mini sprite ld hl, wTempPic xor a ld bc, $0310 call FillMemory - ld a, [$fff3] + ld a, [H_WHOSETURN] and a - jr z, .asm_79715 ; 0x796ed $26 + jr z, .playerTurn ld hl, SlowbroSprite ; facing down sprite ld de, wTempPic + $120 call CopySlowbroSpriteData @@ -2041,8 +2067,8 @@ AnimationSubstitute: ; 796e0 (1e:56e0) ld hl, SlowbroSprite + $30 ld de, wTempPic + $120 + $10 + $70 call CopySlowbroSpriteData - jr .asm_79739 -.asm_79715 + jr .next +.playerTurn ld hl, SlowbroSprite + $40 ; facing up sprite ld de, wTempPic + $120 + $70 call CopySlowbroSpriteData @@ -2055,32 +2081,33 @@ AnimationSubstitute: ; 796e0 (1e:56e0) ld hl, SlowbroSprite + $70 ld de, wTempPic + $120 + $f0 call CopySlowbroSpriteData -.asm_79739 - call Func_79652 +.next + call CopyTempPicToMonPic jp AnimationShowMonPic -CopySlowbroSpriteData: ; 7973f (1e:573f) +CopySlowbroSpriteData: ld bc, $0010 ld a, BANK(SlowbroSprite) jp FarCopyData2 -Func_79747: ; 79747 (1e:5747) - ld a, [H_WHOSETURN] ; $fff3 +HideSubstituteShowMonAnim: + ld a, [H_WHOSETURN] and a - ld hl, wccf7 - ld a, [W_PLAYERBATTSTATUS2] ; W_PLAYERBATTSTATUS2 - jr z, .asm_79758 - ld hl, wccf3 - ld a, [W_ENEMYBATTSTATUS2] ; W_ENEMYBATTSTATUS2 -.asm_79758 + ld hl, wPlayerMonMinimized + ld a, [wPlayerBattleStatus2] + jr z, .next1 + ld hl, wEnemyMonMinimized + ld a, [wEnemyBattleStatus2] +.next1 push hl - bit 4, a - jr nz, .asm_79762 +; if the substitute broke, slide it down, else slide it offscreen horizontally + bit HasSubstituteUp, a + jr nz, .substituteStillUp call AnimationSlideMonDown - jr .asm_79765 -.asm_79762 - call AnimationSlideMonOut -.asm_79765 + jr .next2 +.substituteStillUp + call AnimationSlideMonOff +.next2 pop hl ld a, [hl] and a @@ -2088,48 +2115,48 @@ Func_79747: ; 79747 (1e:5747) call AnimationFlashMonPic jp AnimationShowMonPic -Func_79771: ; 79771 (1e:5771) - call AnimationSlideMonOut +ReshowSubstituteAnim: + call AnimationSlideMonOff call AnimationSubstitute jp AnimationShowMonPic -AnimationBoundUpAndDown: ; 7977a (1e:577a) +AnimationBoundUpAndDown: ; Bounces the mon's sprite up and down several times. It is used ; by Splash's animation. - ld c, $5 -.asm_7977c + ld c, 5 +.loop push bc call AnimationSlideMonDown pop bc dec c - jr nz, .asm_7977c ; 0x79782 $f8 + jr nz, .loop jp AnimationShowMonPic -AnimationTransformMon: ; 79787 (1e:5787) +AnimationTransformMon: ; Redraws this mon's sprite as the back/front sprite of the opposing mon. ; Used in Transform. ld a, [wEnemyMonSpecies] - ld [wHPBarMaxHP + 1], a + ld [wChangeMonPicPlayerTurnSpecies], a ld a, [wBattleMonSpecies] - ld [wHPBarMaxHP], a + ld [wChangeMonPicEnemyTurnSpecies], a -Func_79793: ; 79793 (1e:5793) - ld a, [H_WHOSETURN] ; $fff3 +ChangeMonPic: + ld a, [H_WHOSETURN] and a - jr z, .asm_797b0 - ld a, [wHPBarMaxHP] + jr z, .playerTurn + ld a, [wChangeMonPicEnemyTurnSpecies] ld [wcf91], a ld [wd0b5], a xor a - ld [W_SPRITEFLIPPED], a + ld [wSpriteFlipped], a call GetMonHeader - hlCoord 12, 0 + coord hl, 12, 0 call LoadFrontSpriteByMonIndex - jr .asm_797d3 -.asm_797b0 + jr .done +.playerTurn ld a, [wBattleMonSpecies2] push af - ld a, [wHPBarMaxHP + 1] + ld a, [wChangeMonPicPlayerTurnSpecies] ld [wBattleMonSpecies2], a ld [wd0b5], a call GetMonHeader @@ -2137,59 +2164,63 @@ Func_79793: ; 79793 (1e:5793) xor a call GetTileIDList call GetMonSpriteTileMapPointerFromRowCount - call Func_79aae + call CopyPicTiles pop af ld [wBattleMonSpecies2], a -.asm_797d3 - ld b, $1 - jp GoPAL_SET +.done + ld b, SET_PAL_BATTLE + jp RunPaletteCommand -AnimationHideEnemyMonPic: ; 797d8 (1e:57d8) +AnimationHideEnemyMonPic: ; 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) +InitMultipleObjectsOAM: +; Writes c OAM entries with tile d. +; Sets their Y coordinates to sequential multiples of 8, starting from 0. +; Sets their X coordinates to 0. +; Loads animation tileset a. push bc push de - ld [wd09f], a + ld [wWhichBattleAnimTileset], a call LoadAnimationTileset pop de pop bc xor a ld e, a - ld [W_BASECOORDX], a ; wd081 + ld [wBaseCoordX], a ld hl, wOAMBuffer -.asm_797fa - call Func_79329 +.loop + call BattleAnimWriteOAMEntry dec c - jr nz, .asm_797fa + jr nz, .loop ret -AnimationHideMonPic: ; 79801 (1e:5801) +AnimationHideMonPic: ; Hides the mon's sprite. - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - jr z, .asm_7980a - ld a, $c - jr Func_7980c -.asm_7980a - ld a, $65 + jr z, .playerTurn + ld a, 12 + jr ClearMonPicFromTileMap +.playerTurn + ld a, 5 * SCREEN_WIDTH + 1 -Func_7980c: ; 7980c (1e:580c) +ClearMonPicFromTileMap: push hl push de push bc ld e, a - ld d, $0 - ld hl, wTileMap + ld d, 0 + coord hl, 0, 0 add hl, de - ld bc, $707 + lb bc, 7, 7 call ClearScreenArea pop bc pop de @@ -2199,7 +2230,7 @@ Func_7980c: ; 7980c (1e:580c) ; puts the tile map destination address of a mon sprite in hl, given the row count in b ; The usual row count is 7, but it may be smaller when sliding a mon sprite in/out, ; in order to show only a portion of the mon sprite. -GetMonSpriteTileMapPointerFromRowCount: ; 79820 (1e:5820) +GetMonSpriteTileMapPointerFromRowCount: push de ld a, [H_WHOSETURN] and a @@ -2209,7 +2240,7 @@ GetMonSpriteTileMapPointerFromRowCount: ; 79820 (1e:5820) .enemyTurn ld a, 12 .next - ld hl, wTileMap + coord hl, 0, 0 ld e, a ld d, 0 add hl, de @@ -2232,7 +2263,7 @@ GetMonSpriteTileMapPointerFromRowCount: ; 79820 (1e:5820) ; de = tile ID list pointer ; b = number of rows ; c = number of columns -GetTileIDList: ; 79842 (1e:5842) +GetTileIDList: ld hl, TileIDListPointerTable ld e, a ld d, 0 @@ -2253,29 +2284,32 @@ GetTileIDList: ; 79842 (1e:5842) ld b, a ret -Func_7985b: ; 7985b (1e:585b) +AnimCopyRowLeft: +; copy a row of c tiles 1 tile left ld a, [hld] ld [hli], a inc hl dec c - jr nz, Func_7985b + jr nz, AnimCopyRowLeft ret -Func_79862: ; 79862 (1e:5862) +AnimCopyRowRight: +; copy a row of c tiles 1 tile right ld a, [hli] ld [hld], a dec hl dec c - jr nz, Func_79862 + jr nz, AnimCopyRowRight ret -Func_79869: ; 79869 (1e:5869) +; get the sound of the move id in b +GetMoveSoundB: ld a, b - call Func_7986f + call GetMoveSound ld b, a ret -Func_7986f: ; 7986f (1e:586f) +GetMoveSound: ld hl,MoveSoundTable ld e,a ld d,0 @@ -2298,26 +2332,26 @@ Func_7986f: ; 7986f (1e:586f) call GetCryData ld b,a pop hl - ld a,[wc0f1] + ld a,[wFrequencyModifier] add [hl] - ld [wc0f1],a + ld [wFrequencyModifier],a inc hl - ld a,[wc0f2] + ld a,[wTempoModifier] add [hl] - ld [wc0f2],a + ld [wTempoModifier],a jr .done .NotCryMove ld a,[hli] - ld [wc0f1],a + ld [wFrequencyModifier],a ld a,[hli] - ld [wc0f2],a + ld [wTempoModifier],a .done ld a,b ret -IsCryMove: ; 798ad (1e:58ad) +IsCryMove: ; set carry if the move animation involves playing a monster cry - ld a,[W_ANIMATIONID] + ld a,[wAnimationID] cp a,GROWL jr z,.CryMove cp a,ROAR @@ -2328,201 +2362,206 @@ IsCryMove: ; 798ad (1e:58ad) scf ret -MoveSoundTable: ; 798bc (1e:58bc) - db (SFX_08_4a - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_4c - SFX_Headers_08) / 3,$10,$80 - db (SFX_08_5d - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_4b - SFX_Headers_08) / 3,$01,$80 - db (SFX_08_4d - SFX_Headers_08) / 3,$00,$40 - db (SFX_08_77 - SFX_Headers_08) / 3,$00,$ff - db (SFX_08_4d - SFX_Headers_08) / 3,$10,$60 - db (SFX_08_4d - SFX_Headers_08) / 3,$20,$80 - db (SFX_08_4d - SFX_Headers_08) / 3,$00,$a0 - db (SFX_08_50 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_4f - SFX_Headers_08) / 3,$20,$40 - db (SFX_08_4f - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_4e - SFX_Headers_08) / 3,$00,$a0 - db (SFX_08_51 - SFX_Headers_08) / 3,$10,$c0 - db (SFX_08_51 - SFX_Headers_08) / 3,$00,$a0 - db (SFX_08_52 - SFX_Headers_08) / 3,$00,$c0 - db (SFX_08_52 - SFX_Headers_08) / 3,$10,$a0 - db (SFX_08_53 - SFX_Headers_08) / 3,$00,$e0 - db (SFX_08_51 - SFX_Headers_08) / 3,$20,$c0 - db (SFX_08_54 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_62 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_55 - SFX_Headers_08) / 3,$01,$80 - db (SFX_08_60 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_57 - SFX_Headers_08) / 3,$f0,$40 - db (SFX_08_5a - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_57 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_61 - SFX_Headers_08) / 3,$10,$80 - db (SFX_08_5b - SFX_Headers_08) / 3,$01,$a0 - db (SFX_08_58 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_5e - SFX_Headers_08) / 3,$00,$60 - db (SFX_08_5e - SFX_Headers_08) / 3,$01,$40 - db (SFX_08_5f - SFX_Headers_08) / 3,$00,$a0 - db (SFX_08_5a - SFX_Headers_08) / 3,$10,$a0 - db (SFX_08_60 - SFX_Headers_08) / 3,$00,$c0 - db (SFX_08_54 - SFX_Headers_08) / 3,$10,$60 - db (SFX_08_5a - SFX_Headers_08) / 3,$00,$a0 - db (SFX_08_62 - SFX_Headers_08) / 3,$11,$c0 - db (SFX_08_5a - SFX_Headers_08) / 3,$20,$c0 - db (SFX_08_61 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_5b - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_5b - SFX_Headers_08) / 3,$20,$c0 - db (SFX_08_59 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_71 - SFX_Headers_08) / 3,$ff,$40 - db (SFX_08_5e - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_4b - SFX_Headers_08) / 3,$00,$c0 - db (SFX_08_4b - SFX_Headers_08) / 3,$00,$40 - db (SFX_08_75 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_67 - SFX_Headers_08) / 3,$40,$60 - db (SFX_08_67 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_67 - SFX_Headers_08) / 3,$ff,$40 - db (SFX_08_6a - SFX_Headers_08) / 3,$80,$c0 - db (SFX_08_59 - SFX_Headers_08) / 3,$10,$a0 - db (SFX_08_59 - SFX_Headers_08) / 3,$21,$e0 - db (SFX_08_69 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_64 - SFX_Headers_08) / 3,$20,$60 - db (SFX_08_6a - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_6c - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_68 - SFX_Headers_08) / 3,$40,$80 - db (SFX_08_69 - SFX_Headers_08) / 3,$f0,$e0 - db (SFX_08_6d - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_6a - SFX_Headers_08) / 3,$f0,$60 - db (SFX_08_68 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_76 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_47 - SFX_Headers_08) / 3,$01,$a0 - db (SFX_08_53 - SFX_Headers_08) / 3,$f0,$20 - db (SFX_08_63 - SFX_Headers_08) / 3,$01,$c0 - db (SFX_08_63 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_5a - SFX_Headers_08) / 3,$00,$e0 - db (SFX_08_66 - SFX_Headers_08) / 3,$01,$60 - db (SFX_08_66 - SFX_Headers_08) / 3,$20,$40 - db (SFX_08_64 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_64 - SFX_Headers_08) / 3,$40,$c0 - db (SFX_08_5b - SFX_Headers_08) / 3,$03,$60 - db (SFX_08_65 - SFX_Headers_08) / 3,$11,$e0 - db (SFX_08_52 - SFX_Headers_08) / 3,$20,$e0 - db (SFX_08_6e - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_5c - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_5c - SFX_Headers_08) / 3,$11,$a0 - db (SFX_08_5c - SFX_Headers_08) / 3,$01,$c0 - db (SFX_08_53 - SFX_Headers_08) / 3,$14,$c0 - db (SFX_08_5b - SFX_Headers_08) / 3,$02,$a0 - db (SFX_08_69 - SFX_Headers_08) / 3,$f0,$80 - db (SFX_08_69 - SFX_Headers_08) / 3,$20,$c0 - db (SFX_08_6f - SFX_Headers_08) / 3,$00,$20 - db (SFX_08_6f - SFX_Headers_08) / 3,$20,$80 - db (SFX_08_6e - SFX_Headers_08) / 3,$12,$60 - db (SFX_08_66 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_54 - SFX_Headers_08) / 3,$01,$e0 - db (SFX_08_69 - SFX_Headers_08) / 3,$0f,$e0 - db (SFX_08_69 - SFX_Headers_08) / 3,$11,$20 - db (SFX_08_50 - SFX_Headers_08) / 3,$10,$40 - db (SFX_08_4f - SFX_Headers_08) / 3,$10,$c0 - db (SFX_08_54 - SFX_Headers_08) / 3,$00,$20 - db (SFX_08_70 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_75 - SFX_Headers_08) / 3,$11,$18 - db (SFX_08_49 - SFX_Headers_08) / 3,$20,$c0 - db (SFX_08_48 - SFX_Headers_08) / 3,$20,$c0 - db (SFX_08_65 - SFX_Headers_08) / 3,$00,$10 - db (SFX_08_66 - SFX_Headers_08) / 3,$f0,$20 - db (SFX_08_73 - SFX_Headers_08) / 3,$f0,$c0 - db (SFX_08_51 - SFX_Headers_08) / 3,$f0,$e0 - db (SFX_08_49 - SFX_Headers_08) / 3,$f0,$40 - db (SFX_08_71 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_73 - SFX_Headers_08) / 3,$80,$40 - db (SFX_08_73 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_54 - SFX_Headers_08) / 3,$11,$20 - db (SFX_08_54 - SFX_Headers_08) / 3,$22,$10 - db (SFX_08_5b - SFX_Headers_08) / 3,$f1,$ff - db (SFX_08_53 - SFX_Headers_08) / 3,$f1,$ff - db (SFX_08_54 - SFX_Headers_08) / 3,$33,$30 - db (SFX_08_72 - SFX_Headers_08) / 3,$40,$c0 - db (SFX_08_4e - SFX_Headers_08) / 3,$20,$20 - db (SFX_08_4e - SFX_Headers_08) / 3,$f0,$10 - db (SFX_08_4f - SFX_Headers_08) / 3,$f8,$10 - db (SFX_08_51 - SFX_Headers_08) / 3,$f0,$10 - db (SFX_08_65 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_58 - SFX_Headers_08) / 3,$00,$c0 - db (SFX_08_72 - SFX_Headers_08) / 3,$c0,$ff - db (SFX_08_49 - SFX_Headers_08) / 3,$f2,$20 - db (SFX_08_74 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_74 - SFX_Headers_08) / 3,$00,$40 - db (SFX_08_49 - SFX_Headers_08) / 3,$00,$40 - db (SFX_08_51 - SFX_Headers_08) / 3,$10,$ff - db (SFX_08_6a - SFX_Headers_08) / 3,$20,$20 - db (SFX_08_72 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_69 - SFX_Headers_08) / 3,$1f,$20 - db (SFX_08_65 - SFX_Headers_08) / 3,$2f,$80 - db (SFX_08_4f - SFX_Headers_08) / 3,$1f,$ff - db (SFX_08_6b - SFX_Headers_08) / 3,$1f,$60 - db (SFX_08_66 - SFX_Headers_08) / 3,$1e,$20 - db (SFX_08_66 - SFX_Headers_08) / 3,$1f,$18 - db (SFX_08_54 - SFX_Headers_08) / 3,$0f,$80 - db (SFX_08_49 - SFX_Headers_08) / 3,$f8,$10 - db (SFX_08_48 - SFX_Headers_08) / 3,$18,$20 - db (SFX_08_72 - SFX_Headers_08) / 3,$08,$40 - db (SFX_08_57 - SFX_Headers_08) / 3,$01,$e0 - db (SFX_08_51 - SFX_Headers_08) / 3,$09,$ff - db (SFX_08_75 - SFX_Headers_08) / 3,$42,$01 - db (SFX_08_5c - SFX_Headers_08) / 3,$00,$ff - db (SFX_08_72 - SFX_Headers_08) / 3,$08,$e0 - db (SFX_08_64 - SFX_Headers_08) / 3,$00,$80 - db (SFX_08_49 - SFX_Headers_08) / 3,$88,$10 - db (SFX_08_65 - SFX_Headers_08) / 3,$48,$ff - db (SFX_08_48 - SFX_Headers_08) / 3,$ff,$ff - db (SFX_08_64 - SFX_Headers_08) / 3,$ff,$10 - db (SFX_08_48 - SFX_Headers_08) / 3,$ff,$04 - db (SFX_08_5c - SFX_Headers_08) / 3,$01,$ff - db (SFX_08_53 - SFX_Headers_08) / 3,$f8,$ff - db (SFX_08_4c - SFX_Headers_08) / 3,$f0,$f0 - db (SFX_08_4f - SFX_Headers_08) / 3,$08,$10 - db (SFX_08_4d - SFX_Headers_08) / 3,$f0,$ff - db (SFX_08_5a - SFX_Headers_08) / 3,$f0,$ff - db (SFX_08_74 - SFX_Headers_08) / 3,$10,$ff - db (SFX_08_4e - SFX_Headers_08) / 3,$f0,$20 - db (SFX_08_6b - SFX_Headers_08) / 3,$f0,$60 - db (SFX_08_61 - SFX_Headers_08) / 3,$12,$10 - db (SFX_08_76 - SFX_Headers_08) / 3,$f0,$20 - db (SFX_08_5e - SFX_Headers_08) / 3,$12,$ff - db (SFX_08_71 - SFX_Headers_08) / 3,$80,$04 - db (SFX_08_73 - SFX_Headers_08) / 3,$f0,$10 - db (SFX_08_69 - SFX_Headers_08) / 3,$f8,$ff - db (SFX_08_66 - SFX_Headers_08) / 3,$f0,$ff - db (SFX_08_51 - SFX_Headers_08) / 3,$01,$ff - db (SFX_08_6c - SFX_Headers_08) / 3,$d8,$04 - 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) +MoveSoundTable: + ; ID, pitch mod, tempo mod + db SFX_POUND, $00,$80 ; POUND + db SFX_BATTLE_0C, $10,$80 ; KARATE_CHOP + db SFX_DOUBLESLAP, $00,$80 ; DOUBLESLAP + db SFX_BATTLE_0B, $01,$80 ; COMET_PUNCH + db SFX_BATTLE_0D, $00,$40 ; MEGA_PUNCH + db SFX_SILPH_SCOPE, $00,$ff ; PAY_DAY + db SFX_BATTLE_0D, $10,$60 ; FIRE_PUNCH + db SFX_BATTLE_0D, $20,$80 ; ICE_PUNCH + db SFX_BATTLE_0D, $00,$a0 ; THUNDERPUNCH + db SFX_DAMAGE, $00,$80 ; SCRATCH + db SFX_BATTLE_0F, $20,$40 ; VICEGRIP + db SFX_BATTLE_0F, $00,$80 ; GUILLOTINE + db SFX_BATTLE_0E, $00,$a0 ; RAZOR_WIND + db SFX_NOT_VERY_EFFECTIVE,$10,$c0 ; SWORDS_DANCE + db SFX_NOT_VERY_EFFECTIVE,$00,$a0 ; CUT + db SFX_BATTLE_12, $00,$c0 ; GUST + db SFX_BATTLE_12, $10,$a0 ; WING_ATTACK + db SFX_BATTLE_13, $00,$e0 ; WHIRLWIND + db SFX_NOT_VERY_EFFECTIVE,$20,$c0 ; FLY + db SFX_BATTLE_14, $00,$80 ; BIND + db SFX_BATTLE_22, $00,$80 ; SLAM + db SFX_VINE_WHIP, $01,$80 ; VINE_WHIP + db SFX_BATTLE_20, $00,$80 ; STOMP + db SFX_BATTLE_17, $f0,$40 ; DOUBLE_KICK + db SFX_SUPER_EFFECTIVE, $00,$80 ; MEGA_KICK + db SFX_BATTLE_17, $00,$80 ; JUMP_KICK + db SFX_BATTLE_21, $10,$80 ; ROLLING_KICK + db SFX_BATTLE_1B, $01,$a0 ; SAND_ATTACK + db SFX_BATTLE_18, $00,$80 ; HEADBUTT + db SFX_BATTLE_1E, $00,$60 ; HORN_ATTACK + db SFX_BATTLE_1E, $01,$40 ; FURY_ATTACK + db SFX_HORN_DRILL, $00,$a0 ; HORN_DRILL + db SFX_SUPER_EFFECTIVE, $10,$a0 ; TACKLE + db SFX_BATTLE_20, $00,$c0 ; BODY_SLAM + db SFX_BATTLE_14, $10,$60 ; WRAP + db SFX_SUPER_EFFECTIVE, $00,$a0 ; TAKE_DOWN + db SFX_BATTLE_22, $11,$c0 ; THRASH + db SFX_SUPER_EFFECTIVE, $20,$c0 ; DOUBLE_EDGE + db SFX_BATTLE_21, $00,$80 ; TAIL_WHIP + db SFX_BATTLE_1B, $00,$80 ; POISON_STING + db SFX_BATTLE_1B, $20,$c0 ; TWINEEDLE + db SFX_BATTLE_19, $00,$80 ; PIN_MISSILE + db SFX_BATTLE_31, $ff,$40 ; LEER + db SFX_BATTLE_1E, $00,$80 ; BITE + db SFX_BATTLE_0B, $00,$c0 ; GROWL + db SFX_BATTLE_0B, $00,$40 ; ROAR + db SFX_BATTLE_35, $00,$80 ; SING + db SFX_BATTLE_27, $40,$60 ; SUPERSONIC + db SFX_BATTLE_27, $00,$80 ; SONICBOOM + db SFX_BATTLE_27, $ff,$40 ; DISABLE + db SFX_BATTLE_2A, $80,$c0 ; ACID + db SFX_BATTLE_19, $10,$a0 ; EMBER + db SFX_BATTLE_19, $21,$e0 ; FLAMETHROWER + db SFX_BATTLE_29, $00,$80 ; MIST + db SFX_BATTLE_24, $20,$60 ; WATER_GUN + db SFX_BATTLE_2A, $00,$80 ; HYDRO_PUMP + db SFX_BATTLE_2C, $00,$80 ; SURF + db SFX_BATTLE_28, $40,$80 ; ICE_BEAM + db SFX_BATTLE_29, $f0,$e0 ; BLIZZARD + db SFX_PSYBEAM, $00,$80 ; PSYBEAM + db SFX_BATTLE_2A, $f0,$60 ; BUBBLEBEAM + db SFX_BATTLE_28, $00,$80 ; AURORA_BEAM + db SFX_BATTLE_36, $00,$80 ; HYPER_BEAM + db SFX_PECK,$01, $a0 ; PECK + db SFX_BATTLE_13, $f0,$20 ; DRILL_PECK + db SFX_BATTLE_23, $01,$c0 ; SUBMISSION + db SFX_BATTLE_23, $00,$80 ; LOW_KICK + db SFX_SUPER_EFFECTIVE, $00,$e0 ; COUNTER + db SFX_BATTLE_26, $01,$60 ; SEISMIC_TOSS + db SFX_BATTLE_26, $20,$40 ; STRENGTH + db SFX_BATTLE_24, $00,$80 ; ABSORB + db SFX_BATTLE_24, $40,$c0 ; MEGA_DRAIN + db SFX_BATTLE_1B, $03,$60 ; LEECH_SEED + db SFX_BATTLE_25, $11,$e0 ; GROWTH + db SFX_BATTLE_12, $20,$e0 ; RAZOR_LEAF + db SFX_BATTLE_2E, $00,$80 ; SOLARBEAM + db SFX_BATTLE_1C, $00,$80 ; POISONPOWDER + db SFX_BATTLE_1C, $11,$a0 ; STUN_SPORE + db SFX_BATTLE_1C, $01,$c0 ; SLEEP_POWDER + db SFX_BATTLE_13, $14,$c0 ; PETAL_DANCE + db SFX_BATTLE_1B, $02,$a0 ; STRING_SHOT + db SFX_BATTLE_29, $f0,$80 ; DRAGON_RAGE + db SFX_BATTLE_29, $20,$c0 ; FIRE_SPIN + db SFX_BATTLE_2F, $00,$20 ; THUNDERSHOCK + db SFX_BATTLE_2F, $20,$80 ; THUNDERBOLT + db SFX_BATTLE_2E, $12,$60 ; THUNDER_WAVE + db SFX_BATTLE_26, $00,$80 ; THUNDER + db SFX_BATTLE_14, $01,$e0 ; ROCK_THROW + db SFX_BATTLE_29, $0f,$e0 ; EARTHQUAKE + db SFX_BATTLE_29, $11,$20 ; FISSURE + db SFX_DAMAGE, $10,$40 ; DIG + db SFX_BATTLE_0F, $10,$c0 ; TOXIC + db SFX_BATTLE_14, $00,$20 ; CONFUSION + db SFX_PSYCHIC_M, $00,$80 ; PSYCHIC_M + db SFX_BATTLE_35, $11,$18 ; HYPNOSIS + db SFX_BATTLE_09, $20,$c0 ; MEDITATE + db SFX_FAINT_FALL, $20,$c0 ; AGILITY + db SFX_BATTLE_25, $00,$10 ; QUICK_ATTACK + db SFX_BATTLE_26, $f0,$20 ; RAGE + db SFX_BATTLE_33, $f0,$c0 ; TELEPORT + db SFX_NOT_VERY_EFFECTIVE,$f0,$e0 ; NIGHT_SHADE + db SFX_BATTLE_09, $f0,$40 ; MIMIC + db SFX_BATTLE_31, $00,$80 ; SCREECH + db SFX_BATTLE_33, $80,$40 ; DOUBLE_TEAM + db SFX_BATTLE_33, $00,$80 ; RECOVER + db SFX_BATTLE_14, $11,$20 ; HARDEN + db SFX_BATTLE_14, $22,$10 ; MINIMIZE + db SFX_BATTLE_1B, $f1,$ff ; SMOKESCREEN + db SFX_BATTLE_13, $f1,$ff ; CONFUSE_RAY + db SFX_BATTLE_14, $33,$30 ; WITHDRAW + db SFX_BATTLE_32, $40,$c0 ; DEFENSE_CURL + db SFX_BATTLE_0E, $20,$20 ; BARRIER + db SFX_BATTLE_0E, $f0,$10 ; LIGHT_SCREEN + db SFX_BATTLE_0F, $f8,$10 ; HAZE + db SFX_NOT_VERY_EFFECTIVE,$f0,$10 ; REFLECT + db SFX_BATTLE_25, $00,$80 ; FOCUS_ENERGY + db SFX_BATTLE_18, $00,$c0 ; BIDE + db SFX_BATTLE_32, $c0,$ff ; METRONOME + db SFX_BATTLE_09, $f2,$20 ; MIRROR_MOVE + db SFX_BATTLE_34, $00,$80 ; SELFDESTRUCT + db SFX_BATTLE_34, $00,$40 ; EGG_BOMB + db SFX_BATTLE_09, $00,$40 ; LICK + db SFX_NOT_VERY_EFFECTIVE,$10,$ff ; SMOG + db SFX_BATTLE_2A, $20,$20 ; SLUDGE + db SFX_BATTLE_32, $00,$80 ; BONE_CLUB + db SFX_BATTLE_29, $1f,$20 ; FIRE_BLAST + db SFX_BATTLE_25, $2f,$80 ; WATERFALL + db SFX_BATTLE_0F, $1f,$ff ; CLAMP + db SFX_BATTLE_2B, $1f,$60 ; SWIFT + db SFX_BATTLE_26, $1e,$20 ; SKULL_BASH + db SFX_BATTLE_26, $1f,$18 ; SPIKE_CANNON + db SFX_BATTLE_14, $0f,$80 ; CONSTRICT + db SFX_BATTLE_09, $f8,$10 ; AMNESIA + db SFX_FAINT_FALL, $18,$20 ; KINESIS + db SFX_BATTLE_32, $08,$40 ; SOFTBOILED + db SFX_BATTLE_17, $01,$e0 ; HI_JUMP_KICK + db SFX_NOT_VERY_EFFECTIVE,$09,$ff ; GLARE + db SFX_BATTLE_35, $42,$01 ; DREAM_EATER + db SFX_BATTLE_1C, $00,$ff ; POISON_GAS + db SFX_BATTLE_32, $08,$e0 ; BARRAGE + db SFX_BATTLE_24, $00,$80 ; LEECH_LIFE + db SFX_BATTLE_09, $88,$10 ; LOVELY_KISS + db SFX_BATTLE_25, $48,$ff ; SKY_ATTACK + db SFX_FAINT_FALL, $ff,$ff ; TRANSFORM + db SFX_BATTLE_24, $ff,$10 ; BUBBLE + db SFX_FAINT_FALL, $ff,$04 ; DIZZY_PUNCH + db SFX_BATTLE_1C, $01,$ff ; SPORE + db SFX_BATTLE_13, $f8,$ff ; FLASH + db SFX_BATTLE_0C, $f0,$f0 ; PSYWAVE + db SFX_BATTLE_0F, $08,$10 ; SPLASH + db SFX_BATTLE_0D, $f0,$ff ; ACID_ARMOR + db SFX_SUPER_EFFECTIVE, $f0,$ff ; CRABHAMMER + db SFX_BATTLE_34, $10,$ff ; EXPLOSION + db SFX_BATTLE_0E, $f0,$20 ; FURY_SWIPES + db SFX_BATTLE_2B, $f0,$60 ; BONEMERANG + db SFX_BATTLE_21, $12,$10 ; REST + db SFX_BATTLE_36, $f0,$20 ; ROCK_SLIDE + db SFX_BATTLE_1E, $12,$ff ; HYPER_FANG + db SFX_BATTLE_31, $80,$04 ; SHARPEN + db SFX_BATTLE_33, $f0,$10 ; CONVERSION + db SFX_BATTLE_29, $f8,$ff ; TRI_ATTACK + db SFX_BATTLE_26, $f0,$ff ; SUPER_FANG + db SFX_NOT_VERY_EFFECTIVE,$01,$ff ; SLASH + db SFX_BATTLE_2C, $d8,$04 ; SUBSTITUTE + db SFX_BATTLE_0B, $00,$80 ; STRUGGLE + db SFX_BATTLE_0B, $00,$80 + +CopyPicTiles: ld a, [H_WHOSETURN] and a ld a, $31 ; base tile ID of player mon sprite - jr z, .asm_79ab6 + jr z, .next ; enemy turn xor a ; base tile ID of enemy mon sprite -.asm_79ab6 +.next ld [hBaseTileID], a - jr asm_79acb + jr CopyTileIDs_NoBGTransfer -Func_79aba: ; 79aba (1e:5aba) +; copy the tiles used when a mon is being sent out of or into a pokeball +CopyDownscaledMonTiles: call GetPredefRegisters - ld a, [wcd6c] + ld a, [wDownscaledMonSize] and a - jr nz, .asm_79ac8 - ld de, Unknown_79b02 ; $5b02 - jr asm_79acb -.asm_79ac8 - ld de, Unknown_79b1b ; $5b1b -asm_79acb: ; 79acb (1e:5acb) + jr nz, .smallerSize + ld de, DownscaledMonTiles_5x5 + jr CopyTileIDs_NoBGTransfer +.smallerSize + ld de, DownscaledMonTiles_3x3 +; fall through + +CopyTileIDs_NoBGTransfer: xor a ld [H_AUTOBGTRANSFERENABLED], a +; fall through ; b = number of rows ; c = number of columns -CopyTileIDs: ; 79ace (1e:5ace) +CopyTileIDs: push hl .rowLoop push bc @@ -2547,7 +2586,7 @@ CopyTileIDs: ; 79ace (1e:5ace) pop hl ret -TileIDListPointerTable: ; 79aea (1e:5aea) +TileIDListPointerTable: dw Unknown_79b24 db $77 dw Unknown_79b55 @@ -2565,19 +2604,19 @@ TileIDListPointerTable: ; 79aea (1e:5aea) dw Unknown_79c50 db $3C -Unknown_79b02: ; 79b02 (1e:5b02) +DownscaledMonTiles_5x5: db $31,$38,$46,$54,$5B db $32,$39,$47,$55,$5C db $34,$3B,$49,$57,$5E db $36,$3D,$4B,$59,$60 db $37,$3E,$4C,$5A,$61 -Unknown_79b1b: ; 79b1b (1e:5b1b) +DownscaledMonTiles_3x3: db $31,$46,$5B db $34,$49,$5E db $37,$4C,$61 -Unknown_79b24: ; 79b24 (1e:5b24) +Unknown_79b24: db $00,$07,$0E,$15,$1C,$23,$2A db $01,$08,$0F,$16,$1D,$24,$2B db $02,$09,$10,$17,$1E,$25,$2C @@ -2586,19 +2625,19 @@ Unknown_79b24: ; 79b24 (1e:5b24) db $05,$0C,$13,$1A,$21,$28,$2F db $06,$0D,$14,$1B,$22,$29,$30 -Unknown_79b55: ; 79b55 (1e:5b55) +Unknown_79b55: db $00,$07,$0E,$15,$1C,$23,$2A db $01,$08,$0F,$16,$1D,$24,$2B db $03,$0A,$11,$18,$1F,$26,$2D db $04,$0B,$12,$19,$20,$27,$2E db $05,$0C,$13,$1A,$21,$28,$2F -Unknown_79b78: ; 79b78 (1e:5b78) +Unknown_79b78: db $00,$07,$0E,$15,$1C,$23,$2A db $02,$09,$10,$17,$1E,$25,$2C db $04,$0B,$12,$19,$20,$27,$2E -Unknown_79b8d: ; 79b8d (1e:5b8d) +Unknown_79b8d: db $00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$19,$00 db $02,$06,$0B,$10,$14,$1A,$00 @@ -2607,7 +2646,7 @@ Unknown_79b8d: ; 79b8d (1e:5b8d) db $04,$09,$0E,$13,$17,$1D,$1F db $05,$0A,$0F,$01,$18,$1E,$20 -Unknown_79bbe: ; 79bbe (1e:5bbe) +Unknown_79bbe: db $00,$00,$00,$30,$00,$37,$00 db $00,$00,$2B,$31,$34,$38,$3D db $21,$26,$2C,$01,$35,$39,$3E @@ -2616,7 +2655,7 @@ Unknown_79bbe: ; 79bbe (1e:5bbe) db $24,$29,$2F,$01,$01,$3B,$00 db $25,$2A,$01,$01,$01,$3C,$00 -Unknown_79bef: ; 79bef (1e:5bef) +Unknown_79bef: db $00,$00,$00,$00,$00,$00,$00 db $00,$00,$47,$4D,$00,$00,$00 db $00,$00,$48,$4E,$52,$56,$5B @@ -2625,7 +2664,7 @@ Unknown_79bef: ; 79bef (1e:5bef) db $41,$45,$4B,$51,$4C,$59,$5D db $42,$46,$4C,$4C,$55,$5A,$5E -Unknown_79c20: ; 79c20 (1e:5c20) +Unknown_79c20: db $31,$32,$32,$32,$32,$33 db $34,$35,$36,$36,$37,$38 db $34,$39,$3A,$3A,$3B,$38 @@ -2635,138 +2674,143 @@ Unknown_79c20: ; 79c20 (1e:5c20) db $41,$43,$4B,$4C,$4D,$4E db $4F,$50,$50,$50,$51,$52 -Unknown_79c50: ; 79c50 (1e:5c50) +Unknown_79c50: db $43,$55,$56,$53,$53,$53,$53,$53,$53,$53,$53,$53 db $43,$57,$58,$54,$54,$54,$54,$54,$54,$54,$54,$54 db $43,$59,$5A,$43,$43,$43,$43,$43,$43,$43,$43,$43 -AnimationLeavesFalling: ; 79c74 (1e:5c74) +AnimationLeavesFalling: ; Makes leaves float down from the top of the screen. This is used ; in Razor Leaf's animation. - ld a, [$ff48] + ld a, [rOBP0] push af - ld a, [wcc79] - ld [$ff48], a - ld d, $37 - ld a, $3 - ld [W_SUBANIMTRANSFORM], a - call Func_79c97 + ld a, [wAnimPalette] + ld [rOBP0], a + ld d, $37 ; leaf tile + ld a, 3 ; number of leaves + ld [wNumFallingObjects], a + call AnimationFallingObjects pop af - ld [$ff48], a + ld [rOBP0], a ret -AnimationPetalsFalling: ; 79c8a (1e:5c8a) +AnimationPetalsFalling: ; Makes lots of petals fall down from the top of the screen. It's used in ; the animation for Petal Dance. - ld d, $71 - ld a, $14 - ld [W_SUBANIMTRANSFORM], a - call Func_79c97 + ld d, $71 ; petal tile + ld a, 20 ; number of petals + ld [wNumFallingObjects], a + call AnimationFallingObjects jp ClearSprites -Func_79c97: ; 79c97 (1e:5c97) +AnimationFallingObjects: ld c, a - ld a, $1 - call Func_797e8 - call Func_79d2a - call Func_79d52 + ld a, 1 + call InitMultipleObjectsOAM + call FallingObjects_InitXCoords + call FallingObjects_InitMovementData ld hl, wOAMBuffer - ld [hl], $0 -.asm_79ca8 - ld hl, wTrainerSpriteOffset - ld de, $0000 - ld a, [W_SUBANIMTRANSFORM] + ld [hl], 0 +.loop + ld hl, wFallingObjectsMovementData + ld de, 0 + ld a, [wNumFallingObjects] ld c, a -.asm_79cb2 +.innerLoop push bc push hl push de ld a, [hl] - ld [wd08a], a - call Func_79d16 - call Func_79cdb + ld [wFallingObjectMovementByte], a + call FallingObjects_UpdateMovementByte + call FallingObjects_UpdateOAMEntry pop de - ld hl, $0004 + ld hl, 4 add hl, de ld e, l ld d, h pop hl - ld a, [wd08a] + ld a, [wFallingObjectMovementByte] ld [hli], a pop bc dec c - jr nz, .asm_79cb2 + jr nz, .innerLoop call Delay3 ld hl, wOAMBuffer - ld a, [hl] - cp $68 - jr nz, .asm_79ca8 + ld a, [hl] ; Y + cp 104 ; has the top falling object reached 104 yet? + jr nz, .loop ; keep moving the falling objects down until it does ret -Func_79cdb: ; 79cdb (1e:5cdb) +FallingObjects_UpdateOAMEntry: +; Increases Y by 2 pixels and adjusts X and X flip based on the falling object's +; movement byte. ld hl, wOAMBuffer add hl, de ld a, [hl] inc a inc a - cp $70 - jr c, .asm_79ce8 - ld a, $a0 -.asm_79ce8 - ld [hli], a - ld a, [wd08a] + cp 112 + jr c, .next + ld a, 160 ; if Y >= 112, put it off-screen +.next + ld [hli], a ; Y + ld a, [wFallingObjectMovementByte] ld b, a - ld de, Unknown_79d0d + ld de, FallingObjects_DeltaXs and $7f add e - jr nc, .asm_79cf6 + jr nc, .noCarry inc d -.asm_79cf6 +.noCarry ld e, a ld a, b and $80 - jr nz, .asm_79d03 + jr nz, .movingLeft +; moving right ld a, [de] add [hl] - ld [hli], a + ld [hli], a ; X inc hl - xor a - jr .asm_79d0b -.asm_79d03 + xor a ; no horizontal flip + jr .next2 +.movingLeft ld a, [de] ld b, a ld a, [hl] sub b - ld [hli], a + ld [hli], a ; X inc hl - ld a, $20 -.asm_79d0b - ld [hl], a + ld a, (1 << OAM_X_FLIP) +.next2 + ld [hl], a ; attribute ret -Unknown_79d0d: ; 79d0d (1e:5d0d) - db $00,$01,$03,$05,$07,$09,$0B,$0D,$0F +FallingObjects_DeltaXs: + db 0, 1, 3, 5, 7, 9, 11, 13, 15 -Func_79d16: ; 79d16 (1e:5d16) - ld a, [wd08a] +FallingObjects_UpdateMovementByte: + ld a, [wFallingObjectMovementByte] inc a ld b, a and $7f - cp $9 + cp 9 ; have we reached the end of the delta-Xs? ld a, b - jr nz, .asm_79d26 + jr nz, .next +; We've reached the end of the delta-Xs, so wrap to the start and change +; direction from right to left or vice versa. and $80 xor $80 -.asm_79d26 - ld [wd08a], a +.next + ld [wFallingObjectMovementByte], a ret -Func_79d2a: ; 79d2a (1e:5d2a) +FallingObjects_InitXCoords: ld hl, wOAMBuffer + $01 - ld de, Unknown_79d3e - ld a, [W_SUBANIMTRANSFORM] + ld de, FallingObjects_InitialXCoords + ld a, [wNumFallingObjects] ld c, a -.asm_79d34 +.loop ld a, [de] ld [hli], a inc hl @@ -2774,70 +2818,102 @@ Func_79d2a: ; 79d2a (1e:5d2a) inc hl inc de dec c - jr nz, .asm_79d34 + jr nz, .loop ret -Unknown_79d3e: ; 79d3e (1e:5d3e) +FallingObjects_InitialXCoords: db $38,$40,$50,$60,$70,$88,$90,$56,$67,$4A,$77,$84,$98,$32,$22,$5C,$6C,$7D,$8E,$99 -Func_79d52: ; 79d52 (1e:5d52) - ld hl, wTrainerSpriteOffset - ld de, Unknown_79d63 - ld a, [W_SUBANIMTRANSFORM] +FallingObjects_InitMovementData: + ld hl, wFallingObjectsMovementData + ld de, FallingObjects_InitialMovementData + ld a, [wNumFallingObjects] ld c, a -.asm_79d5c +.loop ld a, [de] ld [hli], a inc de dec c - jr nz, .asm_79d5c + jr nz, .loop ret -Unknown_79d63: ; 79d63 (1e:5d63) +FallingObjects_InitialMovementData: db $00,$84,$06,$81,$02,$88,$01,$83,$05,$89,$09,$80,$07,$87,$03,$82,$04,$85,$08,$86 -AnimationShakeEnemyHUD: ; 79d77 (1e:5d77) +AnimationShakeEnemyHUD: +; Shakes the enemy HUD. + +; Make a copy of the back pic's tile patterns in sprite tile pattern VRAM. ld de, vBackPic ld hl, vSprites ld bc, 7 * 7 call CopyVideoData + xor a ld [hSCX], a + +; Copy wTileMap to BG map 0. The regular BG (not the window) is set to use +; map 0 and can be scrolled with SCX, which allows a shaking effect. ld hl, vBGMap0 - call Func_79e0d - ld a, $90 + call BattleAnimCopyTileMapToVRAM + +; Now that the regular BG is showing the same thing the window was, move the +; window off the screen so that we can modify its contents below. + ld a, SCREEN_HEIGHT_PIXELS ld [hWY], a - ld hl, vBGMap0 + $320 - call Func_79e0d - ld a, $38 + +; Copy wTileMap to VRAM such that the row below the enemy HUD (in wTileMap) is +; lined up with row 0 of the window. + ld hl, vBGMap1 - $20 * 7 + call BattleAnimCopyTileMapToVRAM + +; Move the window so that the row below the enemy HUD (in BG map 0) lines up +; with the top row of the window on the screen. This makes it so that the window +; covers everything below the enemy HD with a copy that looks just like what +; was there before. + ld a, 7 * 8 ld [hWY], a - call Func_792fd + +; Write OAM entries so that the copy of the back pic from the top of this +; function shows up on screen. We need this because the back pic's Y coordinates +; range overlaps with that of the enemy HUD and we don't want to shake the top +; of the back pic when we shake the enemy HUD. The OAM copy won't be affected +; by SCX. + call ShakeEnemyHUD_WritePlayerMonPicOAM + ld hl, vBGMap0 - call Func_79e0d + call BattleAnimCopyTileMapToVRAM + +; Remove the back pic from the BG map. call AnimationHideMonPic call Delay3 - ld de, $0208 - call Func_79de9 + +; Use SCX to shake the regular BG. The window and the back pic OAM copy are +; not affected. + lb de, 2, 8 + call ShakeEnemyHUD_ShakeBG + +; Restore the original graphics. call AnimationShowMonPic call ClearSprites - ld a, $90 + ld a, SCREEN_HEIGHT_PIXELS ld [hWY], a ld hl, vBGMap1 - call Func_79e0d + call BattleAnimCopyTileMapToVRAM xor a ld [hWY], a call SaveScreenTilesToBuffer1 ld hl, vBGMap0 - call Func_79e0d + call BattleAnimCopyTileMapToVRAM call ClearScreen call Delay3 call LoadScreenTilesFromBuffer1 ld hl, vBGMap1 - jp Func_79e0d + jp BattleAnimCopyTileMapToVRAM ; b = tile ID list index ; c = base tile ID -CopyTileIDsFromList: ; 79dda (1e:5dda) +CopyTileIDsFromList: call GetPredefRegisters ld a, c ld [hBaseTileID], a @@ -2847,38 +2923,38 @@ CopyTileIDsFromList: ; 79dda (1e:5dda) pop hl jp CopyTileIDs -Func_79de9: ; 79de9 (1e:5de9) +ShakeEnemyHUD_ShakeBG: ld a, [hSCX] - ld [wTrainerSpriteOffset], a -.asm_79dee - ld a, [wTrainerSpriteOffset] + ld [wTempSCX], a +.loop + ld a, [wTempSCX] add d ld [hSCX], a - ld c, $2 + ld c, 2 call DelayFrames - ld a, [wTrainerSpriteOffset] + ld a, [wTempSCX] sub d ld [hSCX], a - ld c, $2 + ld c, 2 call DelayFrames dec e - jr nz, .asm_79dee - ld a, [wTrainerSpriteOffset] + jr nz, .loop + ld a, [wTempSCX] ld [hSCX], a ret -Func_79e0d: ; 79e0d (1e:5e0d) +BattleAnimCopyTileMapToVRAM: ld a, h - ld [$ffbd], a + ld [H_AUTOBGTRANSFERDEST + 1], a ld a, l ld [H_AUTOBGTRANSFERDEST], a jp Delay3 -TossBallAnimation: ; 79e16 (1e:5e16) - ld a,[W_ISINBATTLE] +TossBallAnimation: + ld a,[wIsInBattle] cp a,2 jr z,.BlockBall ; if in trainer battle, play different animation - ld a,[wd11e] + ld a,[wPokeBallAnimData] ld b,a ; upper nybble: how many animations (from PokeBallAnimations) to play @@ -2891,7 +2967,7 @@ TossBallAnimation: ; 79e16 (1e:5e16) ; store these for later ld a,b and a,$F - ld [wWhichTrade],a + ld [wNumShakes],a ld hl,.PokeBallAnimations ; choose which toss animation to use @@ -2906,7 +2982,7 @@ TossBallAnimation: ; 79e16 (1e:5e16) .done ld a,b .PlayNextAnimation - ld [W_ANIMATIONID],a + ld [wAnimationID],a push bc push hl call PlayAnimation @@ -2917,42 +2993,42 @@ TossBallAnimation: ; 79e16 (1e:5e16) jr nz,.PlayNextAnimation ret -.PokeBallAnimations: ; 79e50 (1e:5e50) +.PokeBallAnimations: ; sequence of animations that make up the Poké Ball toss db POOF_ANIM,HIDEPIC_ANIM,SHAKE_ANIM,POOF_ANIM,SHOWPIC_ANIM -.BlockBall ; 5E55 +.BlockBall ld a,TOSS_ANIM - ld [W_ANIMATIONID],a + ld [wAnimationID],a call PlayAnimation - ld a,(SFX_08_43 - SFX_Headers_08) / 3 - call PlaySound ; play sound effect + ld a,SFX_FAINT_THUD + call PlaySound ld a,BLOCKBALL_ANIM - ld [W_ANIMATIONID],a + ld [wAnimationID],a jp PlayAnimation -PlayApplyingAttackSound: ; 79e6a (1e:5e6a) +PlayApplyingAttackSound: ; play a different sound depending if move is not very effective, neutral, or super-effective ; don't play any sound at all if move is ineffective call WaitForSoundToFinish ld a, [wDamageMultipliers] and $7f ret z - cp $a + cp 10 ld a, $20 ld b, $30 - ld c, (SFX_08_50 - SFX_Headers_08) / 3 - jr z, .asm_79e8b + ld c, SFX_DAMAGE + jr z, .playSound ld a, $e0 ld b, $ff - ld c, (SFX_08_5a - SFX_Headers_08) / 3 - jr nc, .asm_79e8b + ld c, SFX_SUPER_EFFECTIVE + jr nc, .playSound ld a, $50 ld b, $1 - ld c, (SFX_08_51 - SFX_Headers_08) / 3 -.asm_79e8b - ld [wc0f1], a + ld c, SFX_NOT_VERY_EFFECTIVE +.playSound + ld [wFrequencyModifier], a ld a, b - ld [wc0f2], a + ld [wTempoModifier], a ld a, c jp PlaySound diff --git a/engine/battle/bank_e_misc.asm b/engine/battle/bank_e_misc.asm index 78b27108..33af6f6f 100644..100755 --- a/engine/battle/bank_e_misc.asm +++ b/engine/battle/bank_e_misc.asm @@ -1,5 +1,5 @@ ; formats a string at wMovesString that lists the moves at wMoves -FormatMovesString: ; 39b87 (e:5b87) +FormatMovesString: ld hl, wMoves ld de, wMovesString ld b, $0 @@ -24,7 +24,7 @@ FormatMovesString: ; 39b87 (e:5b87) jr .copyNameLoop .doneCopyingName ld a, b - ld [wcd6c], a + ld [wNumMovesMinusOne], a inc b ld a, $4e ; line break ld [de], a @@ -52,49 +52,49 @@ 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) - ld a, [wd11b] - cp $1 - jr nz, .asm_39be6 +InitList: + ld a, [wInitListType] + cp INIT_ENEMYOT_LIST + jr nz, .notEnemy ld hl, wEnemyPartyCount ld de, wEnemyMonOT ld a, ENEMYOT_NAME - jr .asm_39c18 -.asm_39be6 - cp $4 - jr nz, .calcAttackStat4 + jr .done +.notEnemy + cp INIT_PLAYEROT_LIST + jr nz, .notPlayer ld hl, wPartyCount ld de, wPartyMonOT ld a, PLAYEROT_NAME - jr .asm_39c18 -.calcAttackStat4 - cp $5 - jr nz, .asm_39c02 - ld hl, wStringBuffer2 + 11 + jr .done +.notPlayer + cp INIT_MON_LIST + jr nz, .notMonster + ld hl, wItemList ld de, MonsterNames ld a, MONSTER_NAME - jr .asm_39c18 -.asm_39c02 - cp $2 - jr nz, .asm_39c10 + jr .done +.notMonster + cp INIT_BAG_ITEM_LIST + jr nz, .notBag ld hl, wNumBagItems ld de, ItemNames ld a, ITEM_NAME - jr .asm_39c18 -.asm_39c10 - ld hl, wStringBuffer2 + 11 + jr .done +.notBag + ld hl, wItemList ld de, ItemNames ld a, ITEM_NAME -.asm_39c18 +.done ld [wNameListType], a ld a, l - ld [wList], a + ld [wListPointer], a ld a, h - ld [wList + 1], a + ld [wListPointer + 1], a ld a, e - ld [wcf8d], a + ld [wUnusedCF8D], a ld a, d - ld [wcf8e], a + ld [wUnusedCF8D + 1], a ld bc, ItemPrices ld a, c ld [wItemPrices], a @@ -102,10 +102,10 @@ Func_39bd5: ; 39bd5 (e:5bd5) ld [wItemPrices + 1], a ret -; get species of mon e in list [wcc49] for LoadMonData -GetMonSpecies: ; 39c37 (e:5c37) +; get species of mon e in list [wMonDataLocation] for LoadMonData +GetMonSpecies: ld hl, wPartySpecies - ld a, [wcc49] + ld a, [wMonDataLocation] and a jr z, .getSpecies dec 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..9e02c56f 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -1,5 +1,5 @@ -BattleTransition: ; 7096d (1c:496d) - ld a, $1 +BattleTransition: + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a @@ -7,10 +7,13 @@ BattleTransition: ; 7096d (1c:496d) dec a ld [wUpdateSpritesEnabled], a call DelayFrame + +; Determine which OAM block is being used by the enemy trainer sprite (if there +; is one). ld hl, wSpriteStateData1 + 2 - ld a, [H_DOWNARROWBLINKCNT2] + ld a, [hSpriteIndexOrTextID] ; enemy trainer sprite index (0 if wild battle) ld c, a - ld b, $0 + ld b, 0 ld de, $10 .loop1 ld a, [hl] @@ -21,13 +24,15 @@ BattleTransition: ; 7096d (1c:496d) add hl, de dec c jr nz, .loop1 + +; Clear OAM except for the blocks used by the player and enemy trainer sprites. ld hl, wOAMBuffer + $10 - ld c, $9 + ld c, 9 .loop2 ld a, b swap a cp l - jr z, .skip2 + jr z, .skip2 ; skip clearing the block if the enemy trainer is using it push hl push bc ld bc, $10 @@ -40,9 +45,10 @@ BattleTransition: ; 7096d (1c:496d) add hl, de dec c jr nz, .loop2 + call Delay3 call LoadBattleTransitionTile - ld bc, $0 + ld bc, 0 ld a, [wLinkState] cp LINK_STATE_BATTLING jr z, .linkBattle @@ -64,7 +70,7 @@ BattleTransition: ; 7096d (1c:496d) ; bit 0: set if trainer battle ; bit 1: set if enemy is at least 3 levels higher than player ; bit 2: set if dungeon map -BattleTransitions: ; 709d2 (1c:49d2) +BattleTransitions: dw BattleTransition_DoubleCircle ; %000 dw BattleTransition_Spiral ; %001 dw BattleTransition_Circle ; %010 @@ -74,9 +80,9 @@ BattleTransitions: ; 709d2 (1c:49d2) dw BattleTransition_VerticalStripes ; %110 dw BattleTransition_Split ; %111 -GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2) - ld a, [W_CUROPPONENT] - cp $c8 +GetBattleTransitionID_WildOrTrainer: + ld a, [wCurOpponent] + cp 200 jr nc, .trainer res 0, c ret @@ -84,7 +90,7 @@ GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2) set 0, c ret -GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef) +GetBattleTransitionID_CompareLevels: ld hl, wPartyMon1HP .faintedLoop ld a, [hli] @@ -99,24 +105,24 @@ GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef) ld a, [hl] add $3 ld e, a - ld a, [W_CURENEMYLVL] + ld a, [wCurEnemyLVL] sub e jr nc, .highLevelEnemy res 1, c - ld a, $1 - ld [wcd47], a + ld a, 1 + ld [wBattleTransitionSpiralDirection], a ret .highLevelEnemy set 1, c xor a - ld [wcd47], a + ld [wBattleTransitionSpiralDirection], a ret ; fails to recognize VICTORY_ROAD_2, VICTORY_ROAD_3, all ROCKET_HIDEOUT maps, ; MANSION_1, SEAFOAM_ISLANDS_[2-5], POWER_PLANT, DIGLETTS_CAVE ; and SILPH_CO_[9-11]F as dungeon maps -GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19) - ld a, [W_CURMAP] +GetBattleTransitionID_IsDungeonMap: + ld a, [wCurMap] ld e, a ld hl, DungeonMaps1 .loop1 @@ -145,18 +151,18 @@ GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19) res 2, c ret -; GetBattleTransitionID_IsDungeonMap checks if W_CURMAP +; GetBattleTransitionID_IsDungeonMap checks if wCurMap ; is equal to one of these maps -DungeonMaps1: ; 70a3f (1c:4a3f) +DungeonMaps1: db VIRIDIAN_FOREST db ROCK_TUNNEL_1 db SEAFOAM_ISLANDS_1 db ROCK_TUNNEL_2 db $FF -; GetBattleTransitionID_IsDungeonMap checks if W_CURMAP +; GetBattleTransitionID_IsDungeonMap checks if wCurMap ; is in between or equal to each pair of maps -DungeonMaps2: ; 70a44 (1c:4a44) +DungeonMaps2: ; all MT_MOON maps db MT_MOON_1 db MT_MOON_3 @@ -175,16 +181,17 @@ DungeonMaps2: ; 70a44 (1c:4a44) db UNKNOWN_DUNGEON_1 db $FF -LoadBattleTransitionTile: ; 70a4d (1c:4a4d) +LoadBattleTransitionTile: ld hl, vChars1 + $7f0 ld de, BattleTransitionTile - ld bc, (BANK(BattleTransitionTile) << 8) + $01 + lb bc, BANK(BattleTransitionTile), (BattleTransitionTileEnd - BattleTransitionTile) / $10 jp CopyVideoData -BattleTransitionTile: ; 70a59 (1c:4a59) +BattleTransitionTile: INCBIN "gfx/battle_transition.2bpp" +BattleTransitionTileEnd: -BattleTransition_BlackScreen: ; 70a69 (1c:4a69) +BattleTransition_BlackScreen: ld a, $ff ld [rBGP], a ld [rOBP0], a @@ -195,61 +202,61 @@ BattleTransition_BlackScreen: ; 70a69 (1c:4a69) ; called regardless of mon levels, but does an ; outward spiral if enemy is at least 3 levels ; higher than player and does an inward spiral otherwise -BattleTransition_Spiral: ; 70a72 (1c:4a72) - ld a, [wcd47] +BattleTransition_Spiral: + ld a, [wBattleTransitionSpiralDirection] and a jr z, .outwardSpiral call BattleTransition_InwardSpiral jr .done .outwardSpiral - hlCoord 10, 10 + coord hl, 10, 10 ld a, $3 - ld [wd09f], a + ld [wOutwardSpiralCurrentDirection], a ld a, l - ld [wd09b], a + ld [wOutwardSpiralTileMapPointer + 1], a ld a, h - ld [wd09a], a - ld b, $78 -.loop1 - ld c, $3 -.loop2 + ld [wOutwardSpiralTileMapPointer], a + ld b, 120 +.loop + ld c, 3 +.innerLoop push bc call BattleTransition_OutwardSpiral_ pop bc dec c - jr nz, .loop2 + jr nz, .innerLoop call DelayFrame dec b - jr nz, .loop1 + jr nz, .loop .done call BattleTransition_BlackScreen xor a - ld [wd09b], a - ld [wd09a], a + ld [wOutwardSpiralTileMapPointer + 1], a + ld [wOutwardSpiralTileMapPointer], a ret -BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa) - ld a, $7 - ld [wWhichTrade], a - ld hl, wTileMap - ld c, $11 - ld de, $14 +BattleTransition_InwardSpiral: + ld a, 7 + ld [wInwardSpiralUpdateScreenCounter], a + coord hl, 0, 0 + ld c, SCREEN_HEIGHT - 1 + ld de, SCREEN_WIDTH call BattleTransition_InwardSpiral_ inc c jr .skip .loop - ld de, $14 + ld de, SCREEN_WIDTH call BattleTransition_InwardSpiral_ .skip inc c - ld de, $1 + ld de, 1 call BattleTransition_InwardSpiral_ dec c dec c - ld de, $ffec + ld de, -SCREEN_WIDTH call BattleTransition_InwardSpiral_ inc c - ld de, rIE + ld de, -1 call BattleTransition_InwardSpiral_ dec c dec c @@ -258,101 +265,101 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa) jr nz, .loop ret -BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0) +BattleTransition_InwardSpiral_: push bc .loop ld [hl], $ff add hl, de push bc - ld a, [wWhichTrade] + ld a, [wInwardSpiralUpdateScreenCounter] dec a jr nz, .skip call BattleTransition_TransferDelay3 - ld a, $7 + ld a, 7 .skip - ld [wWhichTrade], a + ld [wInwardSpiralUpdateScreenCounter], a pop bc dec c jr nz, .loop pop bc ret -BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9) - ld bc, $ffec - ld de, $14 - ld a, [wd09b] +BattleTransition_OutwardSpiral_: + ld bc, -SCREEN_WIDTH + ld de, SCREEN_WIDTH + ld a, [wOutwardSpiralTileMapPointer + 1] ld l, a - ld a, [wd09a] + ld a, [wOutwardSpiralTileMapPointer] ld h, a - ld a, [wd09f] + ld a, [wOutwardSpiralCurrentDirection] cp $0 - jr z, .zero + jr z, .up cp $1 - jr z, .one + jr z, .left cp $2 - jr z, .two + jr z, .down cp $3 - jr z, .three -.done1 + jr z, .right +.keepSameDirection ld [hl], $ff -.done2_ +.done ld a, l - ld [wd09b], a + ld [wOutwardSpiralTileMapPointer + 1], a ld a, h - ld [wd09a], a + ld [wOutwardSpiralTileMapPointer], a ret -.zero +.up dec hl ld a, [hl] cp $ff - jr nz, .done2 + jr nz, .changeDirection inc hl add hl, bc - jr .done1 -.one + jr .keepSameDirection +.left add hl, de ld a, [hl] cp $ff - jr nz, .done2 + jr nz, .changeDirection add hl, bc dec hl - jr .done1 -.two + jr .keepSameDirection +.down inc hl ld a, [hl] cp $ff - jr nz, .done2 + jr nz, .changeDirection dec hl add hl, de - jr .done1 -.three + jr .keepSameDirection +.right add hl, bc ld a, [hl] cp $ff - jr nz, .done2 + jr nz, .changeDirection add hl, de inc hl - jr .done1 -.done2 + jr .keepSameDirection +.changeDirection ld [hl], $ff - ld a, [wd09f] + ld a, [wOutwardSpiralCurrentDirection] inc a cp $4 jr nz, .skip xor a .skip - ld [wd09f], a - jr .done2_ + ld [wOutwardSpiralCurrentDirection], a + jr .done FlashScreen: -BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d) +BattleTransition_FlashScreen_: ld hl, BattleTransition_FlashScreenPalettes .loop ld a, [hli] cp $1 jr z, .done ld [rBGP], a - ld c, $2 + ld c, 2 call DelayFrames jr .loop .done @@ -360,66 +367,66 @@ BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d) jr nz, BattleTransition_FlashScreen_ ret -BattleTransition_FlashScreenPalettes: ; 70b72 (1c:4b72) +BattleTransition_FlashScreenPalettes: db $F9,$FE,$FF,$FE,$F9,$E4,$90,$40,$00,$40,$90,$E4 db $01 ; terminator ; used for low level trainer dungeon battles -BattleTransition_Shrink: ; 70b7f (1c:4b7f) - ld c, $9 +BattleTransition_Shrink: + ld c, SCREEN_HEIGHT / 2 .loop push bc xor a ld [H_AUTOBGTRANSFERENABLED], a - hlCoord 0, 7 - deCoord 0, 8 - ld bc, $ffd8 + coord hl, 0, 7 + coord de, 0, 8 + ld bc, -SCREEN_WIDTH * 2 call BattleTransition_CopyTiles1 - hlCoord 0, 10 - deCoord 0, 9 - ld bc, $28 + coord hl, 0, 10 + coord de, 0, 9 + ld bc, SCREEN_WIDTH * 2 call BattleTransition_CopyTiles1 - hlCoord 8, 0 - deCoord 9, 0 - ld bc, $fffe + coord hl, 8, 0 + coord de, 9, 0 + ld bc, -2 call BattleTransition_CopyTiles2 - hlCoord 11, 0 - deCoord 10, 0 - ld bc, $2 + coord hl, 11, 0 + coord de, 10, 0 + ld bc, 2 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 -BattleTransition_Split: ; 70bca (1c:4bca) - ld c, $9 +BattleTransition_Split: + ld c, SCREEN_HEIGHT / 2 xor a ld [H_AUTOBGTRANSFERENABLED], a .loop push bc - hlCoord 0, 16 - deCoord 0, 17 - ld bc, $ffd8 + coord hl, 0, 16 + coord de, 0, 17 + ld bc, -SCREEN_WIDTH * 2 call BattleTransition_CopyTiles1 - hlCoord 0, 1 - ld de, wTileMap - ld bc, $28 + coord hl, 0, 1 + coord de, 0, 0 + ld bc, SCREEN_WIDTH * 2 call BattleTransition_CopyTiles1 - hlCoord 18, 0 - deCoord 19, 0 - ld bc, $fffe + coord hl, 18, 0 + coord de, 19, 0 + ld bc, -2 call BattleTransition_CopyTiles2 - hlCoord 1, 0 - ld de, wTileMap - ld bc, $2 + coord hl, 1, 0 + coord de, 0, 0 + ld bc, 2 call BattleTransition_CopyTiles2 call BattleTransition_TransferDelay3 call Delay3 @@ -427,26 +434,26 @@ 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) +BattleTransition_CopyTiles1: ld a, c - ld [wWhichTrade], a + ld [wBattleTransitionCopyTilesOffset], a ld a, b - ld [wTrainerEngageDistance], a - ld c, $8 + ld [wBattleTransitionCopyTilesOffset + 1], a + ld c, 8 .loop1 push bc push hl push de - ld bc, $14 + ld bc, SCREEN_WIDTH call CopyData pop hl pop de - ld a, [wWhichTrade] + ld a, [wBattleTransitionCopyTilesOffset] ld c, a - ld a, [wTrainerEngageDistance] + ld a, [wBattleTransitionCopyTilesOffset + 1] ld b, a add hl, bc pop bc @@ -455,35 +462,35 @@ BattleTransition_CopyTiles1: ; 70c12 (1c:4c12) ld l, e ld h, d ld a, $ff - ld c, $14 + ld c, SCREEN_WIDTH .loop2 ld [hli], a dec c jr nz, .loop2 ret -BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f) +BattleTransition_CopyTiles2: ld a, c - ld [wWhichTrade], a + ld [wBattleTransitionCopyTilesOffset], a ld a, b - ld [wTrainerEngageDistance], a - ld c, $9 + ld [wBattleTransitionCopyTilesOffset + 1], a + ld c, SCREEN_HEIGHT / 2 .loop1 push bc push hl push de - ld c, $12 + ld c, SCREEN_HEIGHT .loop2 ld a, [hl] ld [de], a ld a, e - add $14 + add SCREEN_WIDTH jr nc, .noCarry1 inc d .noCarry1 ld e, a ld a, l - add $14 + add SCREEN_WIDTH jr nc, .noCarry2 inc h .noCarry2 @@ -492,9 +499,9 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f) jr nz, .loop2 pop hl pop de - ld a, [wWhichTrade] + ld a, [wBattleTransitionCopyTilesOffset] ld c, a - ld a, [wTrainerEngageDistance] + ld a, [wBattleTransitionCopyTilesOffset + 1] ld b, a add hl, bc pop bc @@ -502,8 +509,8 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f) jr nz, .loop1 ld l, e ld h, d - ld de, $14 - ld c, $12 + ld de, SCREEN_WIDTH + ld c, SCREEN_HEIGHT .loop3 ld [hl], $ff add hl, de @@ -512,10 +519,10 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f) ret ; used for high level wild dungeon battles -BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e) - ld c, $12 - ld hl, wTileMap - deCoord 1, 17 +BattleTransition_VerticalStripes: + ld c, SCREEN_HEIGHT + coord hl, 0, 0 + coord de, 1, 17 xor a ld [H_AUTOBGTRANSFERENABLED], a .loop @@ -528,20 +535,20 @@ BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e) call BattleTransition_VerticalStripes_ call BattleTransition_TransferDelay3 pop hl - ld bc, $ffec + ld bc, -SCREEN_WIDTH add hl, bc ld e, l ld d, h pop hl - ld bc, $14 + ld bc, SCREEN_WIDTH add hl, bc pop bc dec c jr nz, .loop jp BattleTransition_BlackScreen -BattleTransition_VerticalStripes_: ; 70caa (1c:4caa) - ld c, $a +BattleTransition_VerticalStripes_: + ld c, SCREEN_WIDTH / 2 .loop ld [hl], $ff inc hl @@ -551,10 +558,10 @@ BattleTransition_VerticalStripes_: ; 70caa (1c:4caa) ret ; used for low level wild dungeon battles -BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4) - ld c, $14 - ld hl, wTileMap - deCoord 19, 1 +BattleTransition_HorizontalStripes: + ld c, SCREEN_WIDTH + coord hl, 0, 0 + coord de, 19, 1 xor a ld [H_AUTOBGTRANSFERENABLED], a .loop @@ -575,9 +582,9 @@ BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4) jr nz, .loop jp BattleTransition_BlackScreen -BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8) - ld c, $9 - ld de, $28 +BattleTransition_HorizontalStripes_: + ld c, SCREEN_HEIGHT / 2 + ld de, SCREEN_WIDTH * 2 .loop ld [hl], $ff add hl, de @@ -588,31 +595,31 @@ BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8) ; used for high level wild non-dungeon battles ; makes one full circle around the screen ; by animating each half circle one at a time -BattleTransition_Circle: ; 70ce4 (1c:4ce4) +BattleTransition_Circle: call BattleTransition_FlashScreen - ld bc, $000a + lb bc, 0, SCREEN_WIDTH / 2 ld hl, BattleTransition_HalfCircle1 call BattleTransition_Circle_Sub1 - ld c, $a - ld b, $1 + ld c, SCREEN_WIDTH / 2 + ld b, 1 ld hl, BattleTransition_HalfCircle2 call BattleTransition_Circle_Sub1 jp BattleTransition_BlackScreen -BattleTransition_FlashScreen: ; 70cfd (1c:4cfd) +BattleTransition_FlashScreen: ld b, $3 call BattleTransition_FlashScreen_ xor a ld [H_AUTOBGTRANSFERENABLED], a ret -BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06) +BattleTransition_Circle_Sub1: push bc push hl ld a, b call BattleTransition_Circle_Sub2 pop hl - ld bc, $0005 + ld bc, 5 add hl, bc call BattleTransition_TransferDelay3 pop bc @@ -620,8 +627,8 @@ BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06) jr nz, BattleTransition_Circle_Sub1 ret -BattleTransition_TransferDelay3: ; 70d19 (1c:4d19) - ld a, $1 +BattleTransition_TransferDelay3: + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a @@ -631,9 +638,9 @@ BattleTransition_TransferDelay3: ; 70d19 (1c:4d19) ; used for low level wild non-dungeon battles ; makes two half circles around the screen ; by animating both half circles at the same time -BattleTransition_DoubleCircle: ; 70d24 (1c:4d24) +BattleTransition_DoubleCircle: call BattleTransition_FlashScreen - ld c, $a + ld c, SCREEN_WIDTH / 2 ld hl, BattleTransition_HalfCircle1 ld de, BattleTransition_HalfCircle2 .loop @@ -647,7 +654,7 @@ BattleTransition_DoubleCircle: ; 70d24 (1c:4d24) ld a, $1 call BattleTransition_Circle_Sub2 pop hl - ld bc, $5 + ld bc, 5 add hl, bc ld e, l ld d, h @@ -659,10 +666,10 @@ BattleTransition_DoubleCircle: ; 70d24 (1c:4d24) jr nz, .loop jp BattleTransition_BlackScreen -BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50) - ld [wWhichTrade], a +BattleTransition_Circle_Sub2: + ld [wBattleTransitionCircleScreenQuadrantY], a ld a, [hli] - ld [wTrainerEngageDistance], a + ld [wBattleTransitionCircleScreenQuadrantX], a ld a, [hli] ld e, a ld a, [hli] @@ -672,7 +679,7 @@ BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50) ld l, a jp BattleTransition_Circle_Sub3 -BattleTransition_HalfCircle1: ; 70d61 (1c:4d61) +BattleTransition_HalfCircle1: db $01 dw BattleTransition_CircleData1 dwCoord 18, 6 @@ -713,7 +720,7 @@ BattleTransition_HalfCircle1: ; 70d61 (1c:4d61) dw BattleTransition_CircleData1 dwCoord 1, 6 -BattleTransition_HalfCircle2: ; 70d93 (1c:4d93) +BattleTransition_HalfCircle2: db $00 dw BattleTransition_CircleData1 dwCoord 1, 11 @@ -754,14 +761,14 @@ BattleTransition_HalfCircle2: ; 70d93 (1c:4d93) dw BattleTransition_CircleData1 dwCoord 18, 11 -BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5) +BattleTransition_Circle_Sub3: push hl ld a, [de] ld c, a inc de .loop1 ld [hl], $ff - ld a, [wTrainerEngageDistance] + ld a, [wBattleTransitionCircleScreenQuadrantX] and a jr z, .skip1 inc hl @@ -772,11 +779,11 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5) dec c jr nz, .loop1 pop hl - ld a, [wWhichTrade] + ld a, [wBattleTransitionCircleScreenQuadrantY] and a - ld bc, $14 + ld bc, SCREEN_WIDTH jr z, .skip3 - ld bc, $ffec + ld bc, -SCREEN_WIDTH .skip3 add hl, bc ld a, [de] @@ -787,7 +794,7 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5) jr z, BattleTransition_Circle_Sub3 ld c, a .loop2 - ld a, [wTrainerEngageDistance] + ld a, [wBattleTransitionCircleScreenQuadrantX] and a jr z, .skip4 dec hl @@ -799,17 +806,17 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5) jr nz, .loop2 jr BattleTransition_Circle_Sub3 -BattleTransition_CircleData1: ; 70dfe (1c:4dfe) +BattleTransition_CircleData1: db $02,$03,$05,$04,$09,$FF -BattleTransition_CircleData2: ; 70e04 (1c:4e04) +BattleTransition_CircleData2: db $01,$01,$02,$02,$04,$02,$04,$02,$03,$FF -BattleTransition_CircleData3: ; 70e0e (1c:4e0e) +BattleTransition_CircleData3: db $02,$01,$03,$01,$04,$01,$04,$01,$04,$01,$03,$01,$02,$01,$01,$01,$01,$FF -BattleTransition_CircleData4: ; 70e20 (1c:4e20) +BattleTransition_CircleData4: db $04,$01,$04,$00,$03,$01,$03,$00,$02,$01,$02,$00,$01,$FF -BattleTransition_CircleData5: ; 70e2e (1c:4e2e) +BattleTransition_CircleData5: db $04,$00,$03,$00,$03,$00,$02,$00,$02,$00,$01,$00,$01,$00,$01,$FF diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm index 9a00bd98..3d46c947 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 +PrintBeginningBattleText: + ld a, [wIsInBattle] dec a jr nz, .trainerBattle - ld a, [W_CURMAP] ; W_CURMAP + ld a, [wCurMap] 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, [wMoveMissed] 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 @@ -61,40 +61,40 @@ PrintBeginningBattleText: ; 58d99 (16:4d99) .playSFX xor a - ld [wc0f1], a + ld [wFrequencyModifier], a ld a, $80 - ld [wc0f2], a - ld a, (SFX_08_77 - SFX_Headers_08) / 3 + ld [wTempoModifier], a + ld a, SFX_SILPH_SCOPE call PlaySound jp WaitForSoundToFinish .done ret -WildMonAppearedText: ; 58e3b (16:4e3b) +WildMonAppearedText: TX_FAR _WildMonAppearedText db "@" -HookedMonAttackedText: ; 58e40 (16:4e40) +HookedMonAttackedText: TX_FAR _HookedMonAttackedText db "@" -EnemyAppearedText: ; 58e45 (16:4e45) +EnemyAppearedText: TX_FAR _EnemyAppearedText db "@" -TrainerWantsToFightText: ; 58e4a (16:4e4a) +TrainerWantsToFightText: TX_FAR _TrainerWantsToFightText db "@" -UnveiledGhostText: ; 58e4f (16:4e4f) +UnveiledGhostText: TX_FAR _UnveiledGhostText db "@" -GhostCantBeIDdText: ; 58e54 (16:4e54) +GhostCantBeIDdText: TX_FAR _GhostCantBeIDdText db "@" -PrintSendOutMonMessage: ; 58e59 (16:4e59) +PrintSendOutMonMessage: ld hl, wEnemyMonHP ld a, [hli] or [hl] @@ -104,10 +104,10 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59) ld [H_MULTIPLICAND], a ld hl, wEnemyMonHP ld a, [hli] - ld [wcce3], a + ld [wLastSwitchInEnemyMonHP], a ld [H_MULTIPLICAND + 1], a ld a, [hl] - ld [wcce4], a + ld [wLastSwitchInEnemyMonHP + 1], a ld [H_MULTIPLICAND + 2], a ld a, 25 ld [H_MULTIPLIER], a @@ -120,7 +120,7 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59) srl a rr b ld a, b - ld b, $4 + ld b, 4 ld [H_DIVISOR], a ; enemy mon max HP divided by 4 call Divide ld a, [H_QUOTIENT + 3] ; a = (enemy mon current HP * 25) / (enemy max HP / 4); this approximates the current percentage of max HP @@ -137,56 +137,56 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59) .printText jp PrintText -GoText: ; 58eae (16:4eae) +GoText: TX_FAR _GoText - db $08 ; asm + TX_ASM jr PrintPlayerMon1Text -DoItText: ; 58eb5 (16:4eb5) +DoItText: TX_FAR _DoItText - db $08 ; asm + TX_ASM jr PrintPlayerMon1Text -GetmText: ; 58ebc (16:4ebc) +GetmText: TX_FAR _GetmText - db $08 ; asm + TX_ASM jr PrintPlayerMon1Text -EnemysWeakText: ; 58ec3 (16:4ec3) +EnemysWeakText: TX_FAR _EnemysWeakText - db $08 ; asm + TX_ASM PrintPlayerMon1Text: ld hl, PlayerMon1Text ret -PlayerMon1Text: ; 58ecc (16:4ecc) +PlayerMon1Text: TX_FAR _PlayerMon1Text db "@" -RetreatMon: ; 58ed1 (16:4ed1) +RetreatMon: ld hl, PlayerMon2Text jp PrintText -PlayerMon2Text: ; 58ed7 (16:4ed7) +PlayerMon2Text: TX_FAR _PlayerMon2Text - db $08 ; asm + TX_ASM push de push bc ld hl, wEnemyMonHP + 1 - ld de, wcce4 + ld de, wLastSwitchInEnemyMonHP + 1 ld b, [hl] dec hl ld a, [de] sub b - ld [$ff98], a + ld [H_MULTIPLICAND + 2], a dec de ld b, [hl] ld a, [de] sbc b - ld [$ff97], a - ld a, $19 - ld [H_POWEROFTEN], a + ld [H_MULTIPLICAND + 1], a + ld a, 25 + ld [H_MULTIPLIER], a call Multiply ld hl, wEnemyMonMaxHP ld a, [hli] @@ -196,43 +196,48 @@ PlayerMon2Text: ; 58ed7 (16:4ed7) srl a rr b ld a, b - ld b, $4 - ld [H_POWEROFTEN], a + ld b, 4 + ld [H_DIVISOR], a call Divide pop bc pop de - ld a, [$ff98] - ld hl, EnoughText + ld a, [H_QUOTIENT + 3] ; a = ((LastSwitchInEnemyMonHP - CurrentEnemyMonHP) / 25) / (EnemyMonMaxHP / 4) +; Assuming that the enemy mon hasn't gained HP since the last switch in, +; a approximates the percentage that the enemy mon's total HP has decreased +; since the last switch in. +; If the enemy mon has gained HP, then a is garbage due to wrap-around and +; can fall in any of the ranges below. + ld hl, EnoughText ; HP stayed the same and a ret z - ld hl, ComeBackText - cp $1e + ld hl, ComeBackText ; HP went down 1% - 29% + cp 30 ret c - ld hl, OKExclamationText - cp $46 + ld hl, OKExclamationText ; HP went down 30% - 69% + cp 70 ret c - ld hl, GoodText + ld hl, GoodText ; HP went down 70% or more ret -EnoughText: ; 58f25 (16:4f25) +EnoughText: TX_FAR _EnoughText - db $08 ; asm + TX_ASM jr PrintComeBackText -OKExclamationText: ; 58f2c (16:4f2c) +OKExclamationText: TX_FAR _OKExclamationText - db $08 ; asm + TX_ASM jr PrintComeBackText -GoodText: ; 58f33 (16:4f33) +GoodText: TX_FAR _GoodText - db $08 ; asm + TX_ASM jr PrintComeBackText -PrintComeBackText: ; 58f3a (16:4f3a) +PrintComeBackText: ld hl, ComeBackText ret -ComeBackText: ; 58f3e (16:4f3e) +ComeBackText: TX_FAR _ComeBackText db "@" diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 48bed512..153a9048 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1,7 +1,7 @@ BattleCore: ; These are move effects (second value from the Moves table in bank $E). -ResidualEffects1: ; 3c000 (f:4000) +ResidualEffects1: ; most non-side effects db CONVERSION_EFFECT db HAZE_EFFECT @@ -20,13 +20,13 @@ ResidualEffects1: ; 3c000 (f:4000) db LEECH_SEED_EFFECT db SPLASH_EFFECT db -1 -SetDamageEffects: ; 3c011 (f:4011) +SetDamageEffects: ; moves that do damage but not through normal calculations ; e.g., Super Fang, Psywave db SUPER_FANG_EFFECT db SPECIAL_DAMAGE_EFFECT db -1 -ResidualEffects2: ; 3c014 (f:4014) +ResidualEffects2: ; non-side effects not included in ResidualEffects1 ; stat-affecting moves, sleep-inflicting moves, and Bide ; e.g., Meditate, Bide, Hypnosis @@ -58,7 +58,7 @@ ResidualEffects2: ; 3c014 (f:4014) db ACCURACY_DOWN2_EFFECT db EVASION_DOWN2_EFFECT db -1 -AlwaysHappenSideEffects: ; 3c030 (f:4030) +AlwaysHappenSideEffects: ; Attacks that aren't finished after they faint the opponent. db DRAIN_HP_EFFECT db EXPLODE_EFFECT @@ -71,7 +71,7 @@ AlwaysHappenSideEffects: ; 3c030 (f:4030) db TWINEEDLE_EFFECT db RAGE_EFFECT db -1 -SpecialEffects: ; 3c03b (f:403b) +SpecialEffects: ; Effects from arrays 2, 4, and 5B, minus Twineedle and Rage. ; Includes all effects that do not need to be called at the end of ; ExecutePlayerMove (or ExecuteEnemyMove), because they have already been handled @@ -90,19 +90,19 @@ SpecialEffects: ; 3c03b (f:403b) db JUMP_KICK_EFFECT db RECOIL_EFFECT ; fallthrough to Next EffectsArray -SpecialEffectsCont: ; 3c049 (f:4049) +SpecialEffectsCont: ; damaging moves whose effect is executed prior to damage calculation db THRASH_PETAL_DANCE_EFFECT db TRAPPING_EFFECT db -1 -SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c) +SlidePlayerAndEnemySilhouettesOnScreen: call LoadPlayerBackPic ld a, MESSAGE_BOX ; the usual text box at the bottom of the screen ld [wTextBoxID], a call DisplayTextBoxID - hlCoord 1, 5 - ld bc, $307 + coord hl, 1, 5 + lb bc, 3, 7 call ClearScreenArea call DisableLCD call LoadFontTilePatterns @@ -110,14 +110,14 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c) ld hl, vBGMap0 ld bc, $400 .clearBackgroundLoop - ld a, $7f + ld a, " " ld [hli], a dec bc ld a, b or c jr nz, .clearBackgroundLoop ; copy the work RAM tile map to VRAM - ld hl, wTileMap + coord hl, 0, 0 ld de, vBGMap0 ld b, 18 ; number of rows .copyRowLoop @@ -175,27 +175,25 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c) ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a ld a, $31 - ld [$ffe1], a - hlCoord 1, 5 - predef Func_3f0c6 + ld [hStartTileID], a + coord hl, 1, 5 + predef CopyUncompressedPicToTilemap xor a ld [hWY], a ld [rWY], a inc a ld [H_AUTOBGTRANSFERENABLED], a call Delay3 - ld b, $1 - call GoPAL_SET + ld b, SET_PAL_BATTLE + call RunPaletteCommand call HideSprites - ld hl, PrintBeginningBattleText - ld b, BANK(PrintBeginningBattleText) - jp Bankswitch + jpab PrintBeginningBattleText ; when a battle is starting, silhouettes of the player's pic and the enemy's pic are slid onto the screen ; the lower of the player's pic (his body) is part of the background, but his head is a sprite ; the reason for this is that it shares Y coordinates with the lower part of the enemy pic, so background scrolling wouldn't work for both pics ; instead, the enemy pic is part of the background and uses the scroll register, while the player's head is a sprite and is slid by changing its X coordinates in a loop -SlidePlayerHeadLeft: ; 3c0ff (f:40ff) +SlidePlayerHeadLeft: push bc ld hl, wOAMBuffer + $01 ld c, $15 ; number of OAM entries @@ -209,7 +207,7 @@ SlidePlayerHeadLeft: ; 3c0ff (f:40ff) pop bc ret -SetScrollXForSlidingPlayerBodyLeft: ; 3c110 (f:4110) +SetScrollXForSlidingPlayerBodyLeft: ld a, [rLY] cp l jr nz, SetScrollXForSlidingPlayerBodyLeft @@ -221,13 +219,13 @@ SetScrollXForSlidingPlayerBodyLeft: ; 3c110 (f:4110) jr z, .loop ret -StartBattle: ; 3c11e (f:411e) +StartBattle: xor a ld [wPartyGainExpFlags], a ld [wPartyFoughtCurrentEnemyFlags], a - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a inc a - ld [wd11d], a + ld [wFirstMonsNotOutYet], a ld hl, wEnemyMon1HP ld bc, wEnemyMon2 - wEnemyMon1 - 1 ld d, $3 @@ -241,7 +239,7 @@ StartBattle: ; 3c11e (f:411e) .foundFirstAliveEnemyMon ld a, d ld [wSerialExchangeNybbleReceiveData], a - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a ; is it a trainer battle? call nz, EnemySendOutFirstMon ; if it is a trainer battle, send out enemy mon ld c, 40 @@ -253,17 +251,17 @@ StartBattle: ; 3c11e (f:411e) and a jp z, HandlePlayerBlackOut ; jump if no mon is alive call LoadScreenTilesFromBuffer1 - ld a, [W_BATTLETYPE] + ld a, [wBattleType] and a ; is it a normal battle? jp z, .playerSendOutFirstMon ; if so, send out player mon ; safari zone battle .displaySafariZoneBattleMenu call DisplayBattleMenu ret c ; return if the player ran from battle - ld a, [wcd6a] + ld a, [wActionResultOrTookBattleTurn] and a ; was the item used successfully? jr z, .displaySafariZoneBattleMenu ; if not, display the menu again; XXX does this ever jump? - ld a, [W_NUMSAFARIBALLS] + ld a, [wNumSafariBalls] and a jr nz, .notOutOfSafariBalls call LoadScreenTilesFromBuffer1 @@ -324,13 +322,13 @@ StartBattle: ; 3c11e (f:411e) ld [wcf91], a ld [wBattleMonSpecies2], a call LoadScreenTilesFromBuffer1 - hlCoord 1, 5 + coord hl, 1, 5 ld a, $9 call SlideTrainerPicOffScreen call SaveScreenTilesToBuffer1 ld a, [wWhichPokemon] ld c, a - ld b, $1 + ld b, FLAG_SET push bc ld hl, wPartyGainExpFlags predef FlagActionPredef @@ -343,7 +341,7 @@ StartBattle: ; 3c11e (f:411e) jr MainInBattleLoop ; wild mon or link battle enemy ran from battle -EnemyRan: ; 3c202 (f:4202) +EnemyRan: call LoadScreenTilesFromBuffer1 ld a, [wLinkState] cp LINK_STATE_BATTLING @@ -355,23 +353,21 @@ EnemyRan: ; 3c202 (f:4202) ld hl, EnemyRanText .printText call PrintText - ld a, (SFX_08_44 - SFX_Headers_08) / 3 + ld a, SFX_RUN call PlaySoundWaitForCurrent xor a ld [H_WHOSETURN], a - ld hl, AnimationSlideEnemyMonOut - ld b, BANK(AnimationSlideEnemyMonOut) - jp Bankswitch + jpab AnimationSlideEnemyMonOff -WildRanText: ; 3c229 (f:4229) +WildRanText: TX_FAR _WildRanText db "@" -EnemyRanText: ; 3c22e (f:422e) +EnemyRanText: TX_FAR _EnemyRanText db "@" -MainInBattleLoop: ; 3c233 (f:4233) +MainInBattleLoop: call ReadPlayerMonCurHPAndStatus ld hl, wBattleMonHP ld a, [hli] @@ -383,14 +379,14 @@ MainInBattleLoop: ; 3c233 (f:4233) jp z, HandleEnemyMonFainted ; if enemy mon HP is 0, jump call SaveScreenTilesToBuffer1 xor a - ld [wd11d], a - ld a, [W_PLAYERBATTSTATUS2] + ld [wFirstMonsNotOutYet], a + ld a, [wPlayerBattleStatus2] and (1 << NeedsToRecharge) | (1 << UsingRage) ; check if the player is using Rage or needs to recharge jr nz, .selectEnemyMove ; the player is not using Rage and doesn't need to recharge - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 res Flinched, [hl] ; reset flinch bit - ld hl, W_PLAYERBATTSTATUS1 + ld hl, wPlayerBattleStatus1 res Flinched, [hl] ; reset flinch bit ld a, [hl] and (1 << ThrashingAbout) | (1 << ChargingUp) ; check if the player is thrashing about or charging for an attack @@ -404,10 +400,10 @@ MainInBattleLoop: ; 3c233 (f:4233) ld a, [wBattleMonStatus] and (1 << FRZ) | SLP ; is mon frozen or asleep? jr nz, .selectEnemyMove ; if so, jump - ld a, [W_PLAYERBATTSTATUS1] + ld a, [wPlayerBattleStatus1] and (1 << StoringEnergy) | (1 << UsingTrappingMove) ; check player is using Bide or using a multi-turn attack like wrap jr nz, .selectEnemyMove ; if so, jump - ld a, [W_ENEMYBATTSTATUS1] + ld a, [wEnemyBattleStatus1] bit UsingTrappingMove, a ; check if enemy is using a multi-turn attack like wrap jr z, .selectPlayerMove ; if not, jump ; enemy is using a mult-turn attack like wrap, so player is trapped and cannot execute a move @@ -415,12 +411,12 @@ MainInBattleLoop: ; 3c233 (f:4233) ld [wPlayerSelectedMove], a jr .selectEnemyMove .selectPlayerMove - ld a, [wcd6a] - and a + ld a, [wActionResultOrTookBattleTurn] + and a ; has the player already used the turn (e.g. by using an item, trying to run or switching pokemon) jr nz, .selectEnemyMove ld [wMoveMenuType], a inc a - ld [W_ANIMATIONID], a + ld [wAnimationID], a xor a ld [wMenuItemToSwap], a call MoveSelectionMenu @@ -436,18 +432,18 @@ MainInBattleLoop: ; 3c233 (f:4233) jr nz, .noLinkBattle ; link battle ld a, [wSerialExchangeNybbleReceiveData] - cp $f + cp LINKBATTLE_RUN jp z, EnemyRan - cp $e + cp LINKBATTLE_STRUGGLE jr z, .noLinkBattle - cp $d + cp LINKBATTLE_NO_ACTION jr z, .noLinkBattle - sub $4 + sub 4 jr c, .noLinkBattle ; the link battle enemy has switched mons - ld a, [W_PLAYERBATTSTATUS1] + ld a, [wPlayerBattleStatus1] bit UsingTrappingMove, a ; check if using multi-turn move like Wrap - jr z, .asm_3c2dd + jr z, .specialMoveNotUsed ld a, [wPlayerMoveListIndex] ld hl, wBattleMonMoves ld c, a @@ -456,9 +452,9 @@ MainInBattleLoop: ; 3c233 (f:4233) ld a, [hl] cp METRONOME ; a MIRROR MOVE check is missing, might lead to a desync in link battles ; when combined with multi-turn moves - jr nz, .asm_3c2dd + jr nz, .specialMoveNotUsed ld [wPlayerSelectedMove], a -.asm_3c2dd +.specialMoveNotUsed callab SwitchEnemyMon .noLinkBattle ld a, [wPlayerSelectedMove] @@ -492,8 +488,8 @@ MainInBattleLoop: ; 3c233 (f:4233) jr nc, .playerMovesFirst ; if player is faster jr .enemyMovesFirst ; if enemy is faster .speedEqual ; 50/50 chance for both players - ld a, [$ffaa] - cp $2 + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK jr z, .invertOutcome call BattleRandom cp $80 @@ -561,7 +557,7 @@ MainInBattleLoop: ; 3c233 (f:4233) call CheckNumAttacksLeft jp MainInBattleLoop -HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd) +HandlePoisonBurnLeechSeed: ld hl, wBattleMonHP ld de, wBattleMonStatus ld a, [H_WHOSETURN] @@ -588,11 +584,11 @@ HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd) pop hl call HandlePoisonBurnLeechSeed_DecreaseOwnHP .notBurnedOrPoisoned - ld de, W_PLAYERBATTSTATUS2 + ld de, wPlayerBattleStatus2 ld a, [H_WHOSETURN] and a jr z, .playersTurn2 - ld de, W_ENEMYBATTSTATUS2 + ld de, wEnemyBattleStatus2 .playersTurn2 ld a, [de] add a @@ -620,20 +616,20 @@ HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd) or [hl] ret nz ; test if fainted call DrawHUDsAndHPBars - ld c, $14 + ld c, 20 call DelayFrames xor a ret -HurtByPoisonText: ; 3c42e (f:442e) +HurtByPoisonText: TX_FAR _HurtByPoisonText db "@" -HurtByBurnText: ; 3c433 (f:4433) +HurtByBurnText: TX_FAR _HurtByBurnText db "@" -HurtByLeechSeedText: ; 3c438 (f:4438) +HurtByLeechSeedText: TX_FAR _HurtByLeechSeedText db "@" @@ -641,7 +637,7 @@ HurtByLeechSeedText: ; 3c438 (f:4438) ; note that the toxic ticks are considered even if the damage is not poison (hence the Leech Seed glitch) ; hl: HP pointer ; bc (out): total damage -HandlePoisonBurnLeechSeed_DecreaseOwnHP: ; 3c43d (f:443d) +HandlePoisonBurnLeechSeed_DecreaseOwnHP: push hl push hl ld bc, $e ; skip to max HP @@ -663,13 +659,13 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP: ; 3c43d (f:443d) jr nz, .nonZeroDamage inc c ; damage is at least 1 .nonZeroDamage - ld hl, W_PLAYERBATTSTATUS3 - ld de, W_PLAYERTOXICCOUNTER + ld hl, wPlayerBattleStatus3 + ld de, wPlayerToxicCounter ld a, [H_WHOSETURN] and a jr z, .playersTurn - ld hl, W_ENEMYBATTSTATUS3 - ld de, W_ENEMYTOXICCOUNTER + ld hl, wEnemyBattleStatus3 + ld de, wEnemyToxicCounter .playersTurn bit BadlyPoisoned, [hl] jr z, .noToxic @@ -709,7 +705,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP: ; 3c43d (f:443d) ; adds bc to enemy HP ; bc isn't updated if HP substracted was capped to prevent overkill -HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3) +HandlePoisonBurnLeechSeed_IncreaseEnemyHP: push hl ld hl, wEnemyMonMaxHP ld a, [H_WHOSETURN] @@ -721,8 +717,8 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3) ld [wHPBarMaxHP+1], a ld a, [hl] ld [wHPBarMaxHP], a - ld de, $fff2 - add hl, de ; skip back fomr max hp to current hp + ld de, wBattleMonHP - wBattleMonMaxHP + add hl, de ; skip back from max hp to current hp ld a, [hl] ld [wHPBarOldHP], a ; add bc to current HP add c @@ -759,13 +755,13 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3) pop hl ret -UpdateCurMonHPBar: ; 3c4f6 (f:44f6) - hlCoord 10, 9 ; tile pointer to player HP bar +UpdateCurMonHPBar: + coord hl, 10, 9 ; tile pointer to player HP bar ld a, [H_WHOSETURN] and a ld a, $1 jr z, .playersTurn - hlCoord 2, 2 ; tile pointer to enemy HP bar + coord hl, 2, 2 ; tile pointer to enemy HP bar xor a .playersTurn push bc @@ -774,25 +770,25 @@ UpdateCurMonHPBar: ; 3c4f6 (f:44f6) pop bc ret -CheckNumAttacksLeft: ; 3c50f (f:450f) +CheckNumAttacksLeft: ld a, [wPlayerNumAttacksLeft] and a jr nz, .checkEnemy ; player has 0 attacks left - ld hl, W_PLAYERBATTSTATUS1 + ld hl, wPlayerBattleStatus1 res UsingTrappingMove, [hl] ; player not using multi-turn attack like wrap any more .checkEnemy ld a, [wEnemyNumAttacksLeft] and a ret nz ; enemy has 0 attacks left - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 res UsingTrappingMove, [hl] ; enemy not using multi-turn attack like wrap any more ret -HandleEnemyMonFainted: ; 3c525 (f:4525) +HandleEnemyMonFainted: xor a - ld [wccf0], a + ld [wInHandlePlayerMonFainted], a call FaintEnemyPokemon call AnyPartyAlive ld a, d @@ -802,7 +798,7 @@ HandleEnemyMonFainted: ; 3c525 (f:4525) ld a, [hli] or [hl] ; is battle mon HP zero? call nz, DrawPlayerHUDAndHPBar ; if battle mon HP is not zero, draw player HD and HP bar - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a ret z ; return if it's a wild battle call AnyEnemyPokemonAliveCheck @@ -816,16 +812,16 @@ HandleEnemyMonFainted: ; 3c525 (f:4525) call ChooseNextMon .skipReplacingBattleMon ld a, $1 - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a call ReplaceFaintedEnemyMon jp z, EnemyRan xor a - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a jp MainInBattleLoop -FaintEnemyPokemon ; 0x3c567 +FaintEnemyPokemon: call ReadPlayerMonCurHPAndStatus - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a jr z, .wild ld a, [wEnemyMonPartyPos] @@ -836,41 +832,50 @@ FaintEnemyPokemon ; 0x3c567 ld [hli], a ld [hl], a .wild - ld hl, W_PLAYERBATTSTATUS1 + ld hl, wPlayerBattleStatus1 res AttackingMultipleTimes, [hl] - xor a - ld [wPlayerNumHits], a +; Bug. This only zeroes the high byte of the player's accumulated damage, +; setting the accumulated damage to itself mod 256 instead of 0 as was probably +; intended. That alone is problematic, but this mistake has another more severe +; effect. This function's counterpart for when the player mon faints, +; RemoveFaintedPlayerMon, zeroes both the high byte and the low byte. In a link +; battle, the other player's Game Boy will call that function in response to +; the enemy mon (the player mon from the other side's perspective) fainting, +; and the states of the two Game Boys will go out of sync unless the damage +; was congruent to 0 modulo 256. + xor a + ld [wPlayerBideAccumulatedDamage], a ld hl, wEnemyStatsToDouble ; clear enemy statuses ld [hli], a ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld [W_ENEMYDISABLEDMOVE], a - ld [wccef], a - ld [wccf3], a + ld [wEnemyDisabledMove], a + ld [wEnemyDisabledMoveNumber], a + ld [wEnemyMonMinimized], a ld hl, wPlayerUsedMove ld [hli], a ld [hl], a - hlCoord 12, 5 - deCoord 12, 6 + coord hl, 12, 5 + coord de, 12, 6 call SlideDownFaintedMonPic - ld hl, wTileMap - ld bc, $40b + coord hl, 0, 0 + lb bc, 4, 11 call ClearScreenArea - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a jr z, .wild_win xor a - ld [wc0f1], a - ld [wc0f2], a - ld a, (SFX_08_48 - SFX_Headers_08) / 3 ; SFX_FALL? + ld [wFrequencyModifier], a + ld [wTempoModifier], a + ld a, SFX_FAINT_FALL call PlaySoundWaitForCurrent .sfxwait - ld a, [wc02a] - cp (SFX_08_48 - SFX_Headers_08) / 3 + ld a, [wChannelSoundIDs + Ch4] + cp SFX_FAINT_FALL jr z, .sfxwait - ld a, (SFX_08_43 - SFX_Headers_08) / 3 ; SFX_DROP + ld a, SFX_FAINT_THUD call PlaySound call WaitForSoundToFinish jr .sfxplayed @@ -879,13 +884,15 @@ FaintEnemyPokemon ; 0x3c567 ld a, MUSIC_DEFEATED_WILD_MON call PlayBattleVictoryMusic .sfxplayed +; bug: win sfx is played for wild battles before checking for player mon HP +; this can lead to odd scenarios where both player and enemy faint, as the win sfx plays yet the player never won the battle ld hl, wBattleMonHP ld a, [hli] or [hl] jr nz, .playermonnotfaint - ld a, [wccf0] - and a - jr nz, .playermonnotfaint + ld a, [wInHandlePlayerMonFainted] + and a ; was this called by HandlePlayerMonFainted? + jr nz, .playermonnotfaint ; if so, don't call RemoveFaintedPlayerMon twice call RemoveFaintedPlayerMon .playermonnotfaint call AnyPartyAlive @@ -898,7 +905,7 @@ FaintEnemyPokemon ; 0x3c567 call SaveScreenTilesToBuffer1 xor a ld [wBattleResult], a - ld b, EXP__ALL + ld b, EXP_ALL call IsItemInBag push af jr z, .giveExpToMonsThatFought ; if no exp all, then jump @@ -938,23 +945,23 @@ FaintEnemyPokemon ; 0x3c567 jr nz, .gainExpFlagsLoop ld a, b ld [wPartyGainExpFlags], a - ld hl, GainExperience - ld b, BANK(GainExperience) - jp Bankswitch + jpab GainExperience -EnemyMonFaintedText: ; 0x3c63e +EnemyMonFaintedText: TX_FAR _EnemyMonFaintedText db "@" -EndLowHealthAlarm: ; 3c643 (f:4643) +EndLowHealthAlarm: +; This function is called when the player has the won the battle. It turns off +; the low health alarm and prevents it from reactivating until the next battle. xor a - ld [wLowHealthAlarm], a ;disable low health alarm - ld [wc02a], a + ld [wLowHealthAlarm], a ; turn off low health alarm + ld [wChannelSoundIDs + Ch4], a inc a - ld [wccf6], a + ld [wLowHealthAlarmDisabled], a ; prevent it from reactivating ret -AnyEnemyPokemonAliveCheck: ; 3c64f (f:464f) +AnyEnemyPokemonAliveCheck: ld a, [wEnemyPartyCount] ld b, a xor a @@ -972,8 +979,8 @@ AnyEnemyPokemonAliveCheck: ; 3c64f (f:464f) ret ; stores whether enemy ran in Z flag -ReplaceFaintedEnemyMon: ; 3c664 (f:4664) - ld hl, wcf1e +ReplaceFaintedEnemyMon: + ld hl, wEnemyHPBarColor ld e, $30 call GetBattleHealthBarColor callab DrawEnemyPokeballs @@ -983,31 +990,31 @@ ReplaceFaintedEnemyMon: ; 3c664 (f:4664) ; link battle call LinkBattleExchangeData ld a, [wSerialExchangeNybbleReceiveData] - cp $f + cp LINKBATTLE_RUN ret z call LoadScreenTilesFromBuffer1 .notLinkBattle call EnemySendOut xor a - ld [W_ENEMYMOVENUM], a - ld [wcd6a], a + ld [wEnemyMoveNum], a + ld [wActionResultOrTookBattleTurn], a ld [wAILayer2Encouragement], a inc a ; reset Z flag ret -TrainerBattleVictory: ; 3c696 (f:4696) +TrainerBattleVictory: call EndLowHealthAlarm ld b, MUSIC_DEFEATED_GYM_LEADER - ld a, [W_GYMLEADERNO] + ld a, [wGymLeaderNo] and a jr nz, .gymleader ld b, MUSIC_DEFEATED_TRAINER .gymleader - ld a, [W_TRAINERCLASS] + ld a, [wTrainerClass] cp SONY3 ; final battle against rival jr nz, .notrival ld b, MUSIC_DEFEATED_GYM_LEADER - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 set 1, [hl] .notrival ld a, [wLinkState] @@ -1020,37 +1027,38 @@ TrainerBattleVictory: ; 3c696 (f:4696) cp LINK_STATE_BATTLING ret z call ScrollTrainerPicAfterBattle - ld c, $28 + ld c, 40 call DelayFrames call PrintEndBattleText +; win money ld hl, MoneyForWinningText call PrintText ld de, wPlayerMoney + 2 - ld hl, wd07b + ld hl, wAmountMoneyWon + 2 ld c, $3 predef_jump AddBCDPredef -MoneyForWinningText: ; 3c6e4 (f:46e4) +MoneyForWinningText: TX_FAR _MoneyForWinningText db "@" -TrainerDefeatedText: ; 3c6e9 (f:46e9) +TrainerDefeatedText: TX_FAR _TrainerDefeatedText db "@" -PlayBattleVictoryMusic: ; 3c6ee (f:46ee) +PlayBattleVictoryMusic: push af ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySoundWaitForCurrent ld c, BANK(Music_DefeatedTrainer) pop af call PlayMusic jp Delay3 -HandlePlayerMonFainted: ; 3c700 (f:4700) - ld a, $1 - ld [wccf0], a +HandlePlayerMonFainted: + ld a, 1 + ld [wInHandlePlayerMonFainted], a call RemoveFaintedPlayerMon call AnyPartyAlive ; test if any more mons are alive ld a, d @@ -1062,7 +1070,7 @@ HandlePlayerMonFainted: ; 3c700 (f:4700) jr nz, .doUseNextMonDialogue ; if not, jump ; the enemy mon has 0 HP call FaintEnemyPokemon - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a ret z ; if wild encounter, battle is over call AnyEnemyPokemonAliveCheck @@ -1074,21 +1082,21 @@ HandlePlayerMonFainted: ; 3c700 (f:4700) jp nz, MainInBattleLoop ; if the enemy mon has more than 0 HP, go back to battle loop ; the enemy mon has 0 HP ld a, $1 - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a call ReplaceFaintedEnemyMon jp z, EnemyRan ; if enemy ran from battle rather than sending out another mon, jump xor a - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a jp MainInBattleLoop ; resets flags, slides mon's pic down, plays cry, and prints fainted message -RemoveFaintedPlayerMon: ; 3c741 (f:4741) +RemoveFaintedPlayerMon: ld a, [wPlayerMonNumber] ld c, a ld hl, wPartyGainExpFlags - ld b, $0 + ld b, FLAG_RESET predef FlagActionPredef ; clear gain exp flag for fainted mon - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 res 2, [hl] ; reset "attacking multiple times" flag ld a, [wLowHealthAlarm] bit 7, a ; skip sound flag (red bar (?)) @@ -1097,52 +1105,57 @@ RemoveFaintedPlayerMon: ; 3c741 (f:4741) ld [wLowHealthAlarm], a ;disable low health alarm call WaitForSoundToFinish .skipWaitForSound -; bug? if the player mon faints while the enemy mon is using bide, -; the accumulated damage is overwritten. xxx what values can [wLowHealthAlarm] have here? +; a is 0, so this zeroes the enemy's accumulated damage. ld hl, wEnemyBideAccumulatedDamage ld [hli], a ld [hl], a ld [wBattleMonStatus], a call ReadPlayerMonCurHPAndStatus - hlCoord 9, 7 - ld bc, $50b + coord hl, 9, 7 + lb bc, 5, 11 call ClearScreenArea - hlCoord 1, 10 - deCoord 1, 11 + coord hl, 1, 10 + coord de, 1, 11 call SlideDownFaintedMonPic ld a, $1 ld [wBattleResult], a - ld a, [wccf0] - and a - ret z + +; When the player mon and enemy mon faint at the same time and the fact that the +; enemy mon has fainted is detected first (e.g. when the player mon knocks out +; the enemy mon using a move with recoil and faints due to the recoil), don't +; play the player mon's cry or show the "[player mon] fainted!" message. + ld a, [wInHandlePlayerMonFainted] + and a ; was this called by HandleEnemyMonFainted? + ret z ; if so, return + ld a, [wBattleMonSpecies] call PlayCry ld hl, PlayerMonFaintedText jp PrintText -PlayerMonFaintedText: ; 3c796 (f:4796) +PlayerMonFaintedText: TX_FAR _PlayerMonFaintedText db "@" ; asks if you want to use next mon ; stores whether you ran in C flag -DoUseNextMonDialogue: ; 3c79b (f:479b) +DoUseNextMonDialogue: call PrintEmptyString call SaveScreenTilesToBuffer1 - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] and a dec a ret nz ; return if it's a trainer battle ld hl, UseNextMonText call PrintText .displayYesNoBox - hlCoord 13, 9 - ld bc, $a0e + coord hl, 13, 9 + lb bc, 10, 14 ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID - ld a, [wd12e] - cp $2 ; did the player choose NO? + ld a, [wMenuExitMethod] + cp CHOSE_SECOND_ITEM ; did the player choose NO? jr z, .tryRunning ; if the player chose NO, try running and a ; reset carry ret @@ -1154,15 +1167,15 @@ DoUseNextMonDialogue: ; 3c79b (f:479b) ld de, wEnemyMonSpeed jp TryRunningFromBattle -UseNextMonText: ; 3c7d3 (f:47d3) +UseNextMonText: TX_FAR _UseNextMonText db "@" ; choose next player mon to send out ; stores whether enemy mon has no HP left in Z flag -ChooseNextMon: ; 3c7d8 (f:47d8) - ld a, $2 - ld [wd07d], a +ChooseNextMon: + ld a, BATTLE_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a call DisplayPartyMenu .checkIfMonChosen jr nc, .monChosen @@ -1176,17 +1189,17 @@ ChooseNextMon: ; 3c7d8 (f:47d8) cp LINK_STATE_BATTLING jr nz, .notLinkBattle inc a - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a call LinkBattleExchangeData .notLinkBattle xor a - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a call ClearSprites ld a, [wWhichPokemon] ld [wPlayerMonNumber], a ld c, a ld hl, wPartyGainExpFlags - ld b, $1 + ld b, FLAG_SET push bc predef FlagActionPredef pop bc @@ -1196,7 +1209,7 @@ ChooseNextMon: ; 3c7d8 (f:47d8) call GBPalWhiteOut call LoadHudTilePatterns call LoadScreenTilesFromBuffer1 - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call GBPalNormal call SendOutMon ld hl, wEnemyMonHP @@ -1206,27 +1219,27 @@ ChooseNextMon: ; 3c7d8 (f:47d8) ; called when player is out of usable mons. ; prints approriate lose message, sets carry flag if player blacked out (special case for initial rival fight) -HandlePlayerBlackOut: ; 3c837 (f:4837) +HandlePlayerBlackOut: ld a, [wLinkState] cp LINK_STATE_BATTLING jr z, .notSony1Battle - ld a, [W_CUROPPONENT] - cp $c8 + SONY1 + ld a, [wCurOpponent] + cp OPP_SONY1 jr nz, .notSony1Battle - ld hl, wTileMap ; sony 1 battle - ld bc, $815 + coord hl, 0, 0 ; sony 1 battle + lb bc, 8, 21 call ClearScreenArea call ScrollTrainerPicAfterBattle - ld c, $28 + ld c, 40 call DelayFrames ld hl, Sony1WinText call PrintText - ld a, [W_CURMAP] + ld a, [wCurMap] cp OAKS_LAB ret z ; starter battle in oak's lab: don't black out .notSony1Battle - ld b, $0 - call GoPAL_SET + ld b, SET_PAL_BATTLE_BLACK + call RunPaletteCommand ld hl, PlayerBlackedOutText2 ld a, [wLinkState] cp LINK_STATE_BATTLING @@ -1241,21 +1254,21 @@ HandlePlayerBlackOut: ; 3c837 (f:4837) scf ret -Sony1WinText: ; 3c884 (f:4884) +Sony1WinText: TX_FAR _Sony1WinText db "@" -PlayerBlackedOutText2: ; 3c889 (f:4889) +PlayerBlackedOutText2: TX_FAR _PlayerBlackedOutText2 db "@" -LinkBattleLostText: ; 3c88e (f:488e) +LinkBattleLostText: TX_FAR _LinkBattleLostText db "@" ; slides pic of fainted mon downwards until it disappears ; bug: when this is called, [H_AUTOBGTRANSFERENABLED] is non-zero, so there is screen tearing -SlideDownFaintedMonPic: ; 3c893 (f:4893) +SlideDownFaintedMonPic: ld a, [wd730] push af set 6, a @@ -1274,7 +1287,7 @@ SlideDownFaintedMonPic: ; 3c893 (f:4893) call CopyData pop de pop hl - ld bc, -20 + ld bc, -SCREEN_WIDTH add hl, bc push hl ld h, d @@ -1286,7 +1299,7 @@ SlideDownFaintedMonPic: ; 3c893 (f:4893) pop bc dec b jr nz, .rowLoop - ld bc, 20 + ld bc, SCREEN_WIDTH add hl, bc ld de, SevenSpacesText call PlaceString @@ -1301,15 +1314,15 @@ SlideDownFaintedMonPic: ; 3c893 (f:4893) ld [wd730], a ret -SevenSpacesText: ; 3c8d7 (f:48d7) +SevenSpacesText: db " @" ; slides the player or enemy trainer off screen ; a is the number of tiles to slide it horizontally (always 9 for the player trainer or 8 for the enemy trainer) ; if a is 8, the slide is to the right, else it is to the left ; bug: when this is called, [H_AUTOBGTRANSFERENABLED] is non-zero, so there is screen tearing -SlideTrainerPicOffScreen: ; 3c8df (f:48df) - ld [$FF8B], a +SlideTrainerPicOffScreen: + ld [hSlideAmount], a ld c, a .slideStepLoop ; each iteration, the trainer pic is slid one tile left/right push bc @@ -1317,10 +1330,10 @@ SlideTrainerPicOffScreen: ; 3c8df (f:48df) ld b, 7 ; number of rows .rowLoop push hl - ld a, [$FF8B] + ld a, [hSlideAmount] ld c, a .columnLoop - ld a, [$FF8B] + ld a, [hSlideAmount] cp 8 jr z, .slideRight .slideLeft ; slide player sprite off screen @@ -1349,13 +1362,13 @@ SlideTrainerPicOffScreen: ; 3c8df (f:48df) ret ; send out a trainer's mon -EnemySendOut: ; 3c90e (f:490e) +EnemySendOut: ld hl,wPartyGainExpFlags xor a ld [hl],a ld a,[wPlayerMonNumber] ld c,a - ld b,1 + ld b,FLAG_SET push bc predef FlagActionPredef ld hl,wPartyFoughtCurrentEnemyFlags @@ -1365,7 +1378,7 @@ EnemySendOut: ; 3c90e (f:490e) predef FlagActionPredef ; don't change wPartyGainExpFlags or wPartyFoughtCurrentEnemyFlags -EnemySendOutFirstMon: ; 3c92a (f:492a) +EnemySendOutFirstMon: xor a ld hl,wEnemyStatsToDouble ; clear enemy statuses ld [hli],a @@ -1373,17 +1386,17 @@ EnemySendOutFirstMon: ; 3c92a (f:492a) ld [hli],a ld [hli],a ld [hl],a - ld [W_ENEMYDISABLEDMOVE],a - ld [wccef],a - ld [wccf3],a + ld [wEnemyDisabledMove],a + ld [wEnemyDisabledMoveNumber],a + ld [wEnemyMonMinimized],a ld hl,wPlayerUsedMove ld [hli],a ld [hl],a dec a ld [wAICount],a - ld hl,W_PLAYERBATTSTATUS1 + ld hl,wPlayerBattleStatus1 res 5,[hl] - hlCoord 18, 0 + coord hl, 18, 0 ld a,8 call SlideTrainerPicOffScreen call PrintEmptyString @@ -1421,7 +1434,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a) ld bc,wEnemyMon2 - wEnemyMon1 call AddNTimes ld a,[hl] - ld [W_CURENEMYLVL],a + ld [wCurEnemyLVL],a ld a,[wWhichPokemon] inc a ld hl,wEnemyPartyCount @@ -1434,12 +1447,12 @@ EnemySendOutFirstMon: ; 3c92a (f:492a) call LoadEnemyMonData ld hl,wEnemyMonHP ld a,[hli] - ld [wcce3],a + ld [wLastSwitchInEnemyMonHP],a ld a,[hl] - ld [wcce4],a + ld [wLastSwitchInEnemyMonHP + 1],a ld a,1 ld [wCurrentMenuItem],a - ld a,[wd11d] + ld a,[wFirstMonsNotOutYet] dec a jr z,.next4 ld a,[wPartyCount] @@ -1448,21 +1461,21 @@ EnemySendOutFirstMon: ; 3c92a (f:492a) ld a,[wLinkState] cp LINK_STATE_BATTLING jr z,.next4 - ld a,[W_OPTIONS] + ld a,[wOptions] bit 6,a jr nz,.next4 ld hl, TrainerAboutToUseText call PrintText - hlCoord 0, 7 - ld bc,$0801 + coord hl, 0, 7 + lb bc, 8, 1 ld a,TWO_OPTION_MENU ld [wTextBoxID],a call DisplayTextBoxID ld a,[wCurrentMenuItem] and a jr nz,.next4 - ld a,2 - ld [wd07d],a + ld a,BATTLE_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a call DisplayPartyMenu .next9 ld a,1 @@ -1488,11 +1501,11 @@ EnemySendOutFirstMon: ; 3c92a (f:492a) call LoadScreenTilesFromBuffer1 .next4 call ClearSprites - ld hl,wTileMap - ld bc,$040B + coord hl, 0, 0 + lb bc, 4, 11 call ClearScreenArea - ld b,1 - call GoPAL_SET + ld b, SET_PAL_BATTLE + call RunPaletteCommand call GBPalNormal ld hl,TrainerSentOutText call PrintText @@ -1502,10 +1515,10 @@ EnemySendOutFirstMon: ; 3c92a (f:492a) call GetMonHeader ld de,vFrontPic call LoadMonFrontSprite - ld a,$CF - ld [$FFE1],a - hlCoord 15, 6 - predef Func_3f073 + ld a,-$31 + ld [hStartTileID],a + coord hl, 15, 6 + predef AnimateSendingOutMon ld a,[wEnemyMonSpecies2] call PlayCry call DrawEnemyHUDAndHPBar @@ -1518,17 +1531,17 @@ EnemySendOutFirstMon: ; 3c92a (f:492a) call SaveScreenTilesToBuffer1 jp SwitchPlayerMon -TrainerAboutToUseText: ; 3ca79 (f:4a79) +TrainerAboutToUseText: TX_FAR _TrainerAboutToUseText db "@" -TrainerSentOutText: ; 3ca7e (f:4a7e) +TrainerSentOutText: TX_FAR _TrainerSentOutText db "@" ; tests if the player has any pokemon that are not fainted ; sets d = 0 if all fainted, d != 0 if some mons are still alive -AnyPartyAlive: ; 3ca83 (f:4a83) +AnyPartyAlive: ld a, [wPartyCount] ld e, a xor a @@ -1546,7 +1559,7 @@ AnyPartyAlive: ; 3ca83 (f:4a83) ; tests if player mon has fainted ; stores whether mon has fainted in Z flag -HasMonFainted: ; 3ca97 (f:4a97) +HasMonFainted: ld a, [wWhichPokemon] ld hl, wPartyMon1HP ld bc, wPartyMon2 - wPartyMon1 @@ -1554,7 +1567,7 @@ HasMonFainted: ; 3ca97 (f:4a97) ld a, [hli] or [hl] ret nz - ld a, [wd11d] + ld a, [wFirstMonsNotOutYet] and a jr nz, .done ld hl, NoWillText @@ -1563,22 +1576,22 @@ HasMonFainted: ; 3ca97 (f:4a97) xor a ret -NoWillText: ; 3cab4 (f:4ab4) +NoWillText: TX_FAR _NoWillText db "@" ; try to run from battle (hl = player speed, de = enemy speed) ; stores whether the attempt was successful in carry flag -TryRunningFromBattle: ; 3cab9 (f:4ab9) +TryRunningFromBattle: call IsGhostBattle jp z, .canEscape ; jump if it's a ghost battle - ld a, [W_BATTLETYPE] - cp $2 + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI jp z, .canEscape ; jump if it's a safari battle ld a, [wLinkState] cp LINK_STATE_BATTLING jp z, .canEscape - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a jr nz, .trainerBattle ; jump if it's a trainer battle ld a, [wNumRunAttempts] @@ -1589,14 +1602,14 @@ TryRunningFromBattle: ; 3cab9 (f:4ab9) ld a, [hl] ld [H_MULTIPLICAND + 2], a ld a, [de] - ld [$ff8d], a + ld [hEnemySpeed], a inc de ld a, [de] - ld [$ff8e], a + ld [hEnemySpeed + 1], a call LoadScreenTilesFromBuffer1 ld de, H_MULTIPLICAND + 1 - ld hl, $ff8d - ld c, $2 + ld hl, hEnemySpeed + ld c, 2 call StringCmp jr nc, .canEscape ; jump if player speed greater than enemy speed xor a @@ -1608,9 +1621,9 @@ TryRunningFromBattle: ; 3cab9 (f:4ab9) ld [H_DIVIDEND], a ld a, [H_PRODUCT + 3] ld [H_DIVIDEND + 1], a - ld a, [$ff8d] + ld a, [hEnemySpeed] ld b, a - ld a, [$ff8e] + ld a, [hEnemySpeed + 1] ; divide enemy speed by 4 srl b rr a @@ -1641,19 +1654,19 @@ 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 - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a ; you lose your turn when you can't escape ld hl, CantEscapeText jr .printCantEscapeOrNoRunningText .trainerBattle ld hl, NoRunningText .printCantEscapeOrNoRunningText call PrintText - ld a, $1 - ld [wd11f], a + ld a, 1 + ld [wForcePlayerToChooseMon], a call SaveScreenTilesToBuffer1 and a ; reset carry ret @@ -1665,19 +1678,19 @@ TryRunningFromBattle: ; 3cab9 (f:4ab9) ; link battle call SaveScreenTilesToBuffer1 xor a - ld [wcd6a], a - ld a, $f + ld [wActionResultOrTookBattleTurn], a + ld a, LINKBATTLE_RUN ld [wPlayerMoveListIndex], a call LinkBattleExchangeData call LoadScreenTilesFromBuffer1 ld a, [wSerialExchangeNybbleReceiveData] - cp $f + cp LINKBATTLE_RUN ld a, $2 jr z, .playSound dec a .playSound ld [wBattleResult], a - ld a, (SFX_08_44 - SFX_Headers_08) / 3 + ld a, SFX_RUN call PlaySoundWaitForCurrent ld hl, GotAwayText call PrintText @@ -1686,37 +1699,37 @@ TryRunningFromBattle: ; 3cab9 (f:4ab9) scf ; set carry ret -CantEscapeText: ; 3cb97 (f:4b97) +CantEscapeText: TX_FAR _CantEscapeText db "@" -NoRunningText: ; 3cb9c (f:4b9c) +NoRunningText: TX_FAR _NoRunningText db "@" -GotAwayText: ; 3cba1 (f:4ba1) +GotAwayText: TX_FAR _GotAwayText db "@" ; copies from party data to battle mon data when sending out a new player mon -LoadBattleMonFromParty: ; 3cba6 (f:4ba6) +LoadBattleMonFromParty: ld a, [wWhichPokemon] - ld bc, $2c + ld bc, wPartyMon2 - wPartyMon1 ld hl, wPartyMon1Species call AddNTimes ld de, wBattleMonSpecies - ld bc, $c + ld bc, wBattleMonDVs - wBattleMonSpecies call CopyData - ld bc, $f + ld bc, wPartyMon1DVs - wPartyMon1OTID add hl, bc ld de, wBattleMonDVs - ld bc, $2 + ld bc, NUM_DVS call CopyData ld de, wBattleMonPP - ld bc, $4 + ld bc, NUM_MOVES call CopyData ld de, wBattleMonLevel - ld bc, $b + ld bc, wBattleMonPP - wBattleMonLevel call CopyData ld a, [wBattleMonSpecies2] ld [wd0b5], a @@ -1725,16 +1738,16 @@ LoadBattleMonFromParty: ; 3cba6 (f:4ba6) ld a, [wPlayerMonNumber] call SkipFixedLengthTextEntries ld de, wBattleMonNick - ld bc, $b + ld bc, NAME_LENGTH call CopyData ld hl, wBattleMonLevel ld de, wPlayerMonUnmodifiedLevel ; block of memory used for unmodified stats - ld bc, $b + ld bc, 1 + NUM_STATS * 2 call CopyData call ApplyBurnAndParalysisPenaltiesToPlayer call ApplyBadgeStatBoosts ld a, $7 ; default stat modifier - ld b, $8 + ld b, NUM_STAT_MODS ld hl, wPlayerMonAttackMod .statModLoop ld [hli], a @@ -1743,24 +1756,24 @@ LoadBattleMonFromParty: ; 3cba6 (f:4ba6) ret ; copies from enemy party data to current enemy mon data when sending out a new enemy mon -LoadEnemyMonFromParty: ; 3cc13 (f:4c13) +LoadEnemyMonFromParty: ld a, [wWhichPokemon] - ld bc, $2c + ld bc, wEnemyMon2 - wEnemyMon1 ld hl, wEnemyMons call AddNTimes ld de, wEnemyMonSpecies - ld bc, $c + ld bc, wEnemyMonDVs - wEnemyMonSpecies call CopyData - ld bc, $f + ld bc, wEnemyMon1DVs - wEnemyMon1OTID add hl, bc ld de, wEnemyMonDVs - ld bc, $2 + ld bc, NUM_DVS call CopyData ld de, wEnemyMonPP - ld bc, $4 + ld bc, NUM_MOVES call CopyData ld de, wEnemyMonLevel - ld bc, $b + ld bc, wEnemyMonPP - wEnemyMonLevel call CopyData ld a, [wEnemyMonSpecies] ld [wd0b5], a @@ -1769,16 +1782,16 @@ LoadEnemyMonFromParty: ; 3cc13 (f:4c13) ld a, [wWhichPokemon] call SkipFixedLengthTextEntries ld de, wEnemyMonNick - ld bc, $b + ld bc, NAME_LENGTH call CopyData ld hl, wEnemyMonLevel ld de, wEnemyMonUnmodifiedLevel ; block of memory used for unmodified stats - ld bc, $b + ld bc, 1 + NUM_STATS * 2 call CopyData call ApplyBurnAndParalysisPenaltiesToEnemy - ld hl, W_MONHBASESTATS + ld hl, wMonHBaseStats ld de, wEnemyMonBaseStats - ld b, $5 + ld b, NUM_STATS .copyBaseStatsLoop ld a, [hli] ld [de], a @@ -1786,7 +1799,7 @@ LoadEnemyMonFromParty: ; 3cc13 (f:4c13) dec b jr nz, .copyBaseStatsLoop ld a, $7 ; default stat modifier - ld b, $8 + ld b, NUM_STAT_MODS ld hl, wEnemyMonStatMods .statModLoop ld [hli], a @@ -1796,7 +1809,7 @@ LoadEnemyMonFromParty: ; 3cc13 (f:4c13) ld [wEnemyMonPartyPos], a ret -SendOutMon: ; 3cc91 (f:4c91) +SendOutMon: callab PrintSendOutMonMessage ld hl, wEnemyMonHP ld a, [hli] @@ -1807,13 +1820,13 @@ SendOutMon: ; 3cc91 (f:4c91) call DrawPlayerHUDAndHPBar predef LoadMonBackPic xor a - ld [$ffe1], a - ld hl, wcc2d + ld [hStartTileID], a + ld hl, wBattleAndStartSavedMenuItem ld [hli], a ld [hl], a ld [wBoostExpByExpAll], a ld [wDamageMultipliers], a - ld [W_PLAYERMOVENUM], a + ld [wPlayerMoveNum], a ld hl, wPlayerUsedMove ld [hli], a ld [hl], a @@ -1823,56 +1836,56 @@ SendOutMon: ; 3cc91 (f:4c91) ld [hli], a ld [hli], a ld [hl], a - ld [W_PLAYERDISABLEDMOVE], a - ld [wccee], a - ld [wccf7], a - ld b, $1 - call GoPAL_SET - ld hl, W_ENEMYBATTSTATUS1 + ld [wPlayerDisabledMove], a + ld [wPlayerDisabledMoveNumber], a + ld [wPlayerMonMinimized], a + ld b, SET_PAL_BATTLE + call RunPaletteCommand + ld hl, wEnemyBattleStatus1 res UsingTrappingMove, [hl] ld a, $1 ld [H_WHOSETURN], a ld a, POOF_ANIM call PlayMoveAnimation - hlCoord 4, 11 - predef Func_3f073 + coord hl, 4, 11 + predef AnimateSendingOutMon ld a, [wcf91] call PlayCry call PrintEmptyString jp SaveScreenTilesToBuffer1 -; show 2 stages of the player getting smaller before disappearing -AnimateRetreatingPlayerMon: ; 3ccfa (f:4cfa) - hlCoord 1, 5 - ld bc, $707 +; show 2 stages of the player mon getting smaller before disappearing +AnimateRetreatingPlayerMon: + coord hl, 1, 5 + lb bc, 7, 7 call ClearScreenArea - hlCoord 3, 7 - ld bc, $505 + coord hl, 3, 7 + lb bc, 5, 5 xor a - ld [wcd6c], a - ld [H_DOWNARROWBLINKCNT1], a - predef Func_79aba - ld c, $4 + ld [wDownscaledMonSize], a + ld [hBaseTileID], a + predef CopyDownscaledMonTiles + ld c, 4 call DelayFrames call .clearScreenArea - hlCoord 4, 9 - ld bc, $303 - ld a, $1 - ld [wcd6c], a + coord hl, 4, 9 + lb bc, 3, 3 + ld a, 1 + ld [wDownscaledMonSize], a xor a - ld [H_DOWNARROWBLINKCNT1], a - predef Func_79aba + ld [hBaseTileID], a + predef CopyDownscaledMonTiles call Delay3 call .clearScreenArea ld a, $4c Coorda 5, 11 .clearScreenArea - hlCoord 1, 5 - ld bc, $707 + coord hl, 1, 5 + lb bc, 7, 7 jp ClearScreenArea ; reads player's current mon's HP into wBattleMonHP -ReadPlayerMonCurHPAndStatus: ; 3cd43 (f:4d43) +ReadPlayerMonCurHPAndStatus: ld a, [wPlayerMonNumber] ld hl, wPartyMon1HP ld bc, wPartyMon2 - wPartyMon1 @@ -1883,83 +1896,83 @@ ReadPlayerMonCurHPAndStatus: ; 3cd43 (f:4d43) ld bc, $4 ; 2 bytes HP, 1 byte unknown (unused?), 1 byte status jp CopyData -DrawHUDsAndHPBars: ; 3cd5a (f:4d5a) +DrawHUDsAndHPBars: call DrawPlayerHUDAndHPBar jp DrawEnemyHUDAndHPBar -DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60) +DrawPlayerHUDAndHPBar: xor a ld [H_AUTOBGTRANSFERENABLED], a - hlCoord 9, 7 - ld bc, $50b + coord hl, 9, 7 + lb bc, 5, 11 call ClearScreenArea callab PlacePlayerHUDTiles - hlCoord 18, 9 + coord hl, 18, 9 ld [hl], $73 ld de, wBattleMonNick - hlCoord 10, 7 + coord hl, 10, 7 call CenterMonName call PlaceString ld hl, wBattleMonSpecies ld de, wLoadedMon - ld bc, $c + ld bc, wBattleMonDVs - wBattleMonSpecies call CopyData ld hl, wBattleMonLevel ld de, wLoadedMonLevel - ld bc, $b + ld bc, wBattleMonPP - wBattleMonLevel call CopyData - hlCoord 14, 8 + coord hl, 14, 8 push hl inc hl ld de, wLoadedMonStatus call PrintStatusConditionNotFainted pop hl - jr nz, .asm_3cdae + jr nz, .doNotPrintLevel call PrintLevel -.asm_3cdae +.doNotPrintLevel ld a, [wLoadedMonSpecies] ld [wcf91], a - hlCoord 10, 9 + coord hl, 10, 9 predef DrawHP ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a - ld hl, wcf1d + ld hl, wPlayerHPBarColor call GetBattleHealthBarColor ld hl, wBattleMonHP ld a, [hli] or [hl] - jr z, .asm_3cdd9 - ld a, [wccf6] - and a - ret nz - ld a, [wcf1d] - cp $2 - jr z, .asm_3cde6 -.asm_3cdd9 + jr z, .fainted + ld a, [wLowHealthAlarmDisabled] + and a ; has the alarm been disabled because the player has already won? + ret nz ; if so, return + ld a, [wPlayerHPBarColor] + cp HP_BAR_RED + jr z, .setLowHealthAlarm +.fainted ld hl, wLowHealthAlarm bit 7, [hl] ;low health alarm enabled? ld [hl], $0 ret z xor a - ld [wc02a], a + ld [wChannelSoundIDs + Ch4], a ret -.asm_3cde6 +.setLowHealthAlarm ld hl, wLowHealthAlarm set 7, [hl] ;enable low health alarm ret -DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec) +DrawEnemyHUDAndHPBar: xor a ld [H_AUTOBGTRANSFERENABLED], a - ld hl, wTileMap - ld bc, $40c + coord hl, 0, 0 + lb bc, 4, 12 call ClearScreenArea callab PlaceEnemyHUDTiles ld de, wEnemyMonNick - hlCoord 1, 0 + coord hl, 1, 0 call CenterMonName call PlaceString - hlCoord 4, 1 + coord hl, 4, 1 push hl inc hl ld de, wEnemyMonStatus @@ -2032,27 +2045,27 @@ DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec) .drawHPBar xor a ld [wHPBarType], a - hlCoord 2, 2 + coord hl, 2, 2 call DrawHPBar ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a - ld hl, wcf1e + ld hl, wEnemyHPBarColor -GetBattleHealthBarColor: ; 3ce90 (f:4e90) +GetBattleHealthBarColor: ld b, [hl] call GetHealthBarColor ld a, [hl] cp b ret z - ld b, $1 - jp GoPAL_SET + ld b, SET_PAL_BATTLE + jp RunPaletteCommand ; center's mon's name on the battle screen ; if the name is 1 or 2 letters long, it is printed 2 spaces more to the right than usual ; (i.e. for names longer than 4 letters) ; if the name is 3 or 4 letters long, it is printed 1 space more to the right than usual ; (i.e. for names longer than 4 letters) -CenterMonName: ; 3ce9c (f:4e9c) +CenterMonName: push de inc hl inc hl @@ -2060,11 +2073,11 @@ CenterMonName: ; 3ce9c (f:4e9c) .loop inc de ld a, [de] - cp $50 + cp "@" jr z, .done inc de ld a, [de] - cp $50 + cp "@" jr z, .done dec hl dec b @@ -2073,30 +2086,30 @@ CenterMonName: ; 3ce9c (f:4e9c) pop de ret -DisplayBattleMenu: ; 3ceb3 (f:4eb3) +DisplayBattleMenu: call LoadScreenTilesFromBuffer1 ; restore saved screen - ld a, [W_BATTLETYPE] + ld a, [wBattleType] and a jr nz, .nonstandardbattle call DrawHUDsAndHPBars call PrintEmptyString call SaveScreenTilesToBuffer1 .nonstandardbattle - ld a, [W_BATTLETYPE] - cp $2 ; safari + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI ld a, BATTLE_MENU_TEMPLATE jr nz, .menuselected ld a, SAFARI_BATTLE_MENU_TEMPLATE .menuselected ld [wTextBoxID], a call DisplayTextBoxID - ld a, [W_BATTLETYPE] + ld a, [wBattleType] dec a jp nz, .handleBattleMenuInput ; handle menu input if it's not the old man tutorial ; the following happens for the old man tutorial ld hl, wPlayerName - ld de, W_GRASSRATE - ld bc, $b + ld de, wGrassRate + ld bc, NAME_LENGTH call CopyData ; temporarily save the player name in unused space, ; which is supposed to get overwritten when entering a ; map with wild Pokémon. Due to an oversight, the data @@ -2104,25 +2117,25 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) ; Missingno. glitch can show up. ld hl, .oldManName ld de, wPlayerName - ld bc, $b + ld bc, NAME_LENGTH call CopyData ; the following simulates the keystrokes by drawing menus on screen - hlCoord 9, 14 + coord hl, 9, 14 ld [hl], "▶" - ld c, $50 + ld c, 80 call DelayFrames - ld [hl], $7f - hlCoord 9, 16 + ld [hl], " " + coord hl, 9, 16 ld [hl], "▶" - ld c, $32 + ld c, 50 call DelayFrames - ld [hl], $ec + ld [hl], "▷" ld a, $2 ; select the "ITEM" menu jp .upperLeftMenuItemWasNotSelected .oldManName db "OLD MAN@" .handleBattleMenuInput - ld a, [wcc2d] + ld a, [wBattleAndStartSavedMenuItem] ld [wCurrentMenuItem], a ld [wLastMenuItem], a sub 2 ; check if the cursor is in the left column @@ -2132,8 +2145,8 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) ld [wLastMenuItem], a jr .rightColumn .leftColumn ; put cursor in left column of menu - ld a, [W_BATTLETYPE] - cp $2 + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI ld a, " " jr z, .safariLeftColumn ; put cursor in left column for normal battle menu (i.e. when it's not a Safari battle) @@ -2144,9 +2157,9 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) .safariLeftColumn Coorda 13, 14 Coorda 13, 16 - hlCoord 7, 14 - ld de, W_NUMSAFARIBALLS - ld bc, $102 + coord hl, 7, 14 + ld de, wNumSafariBalls + lb bc, 1, 2 call PrintNumber ld b, $1 ; top menu item X .leftColumn_WaitForInput @@ -2165,8 +2178,8 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) jr nz, .rightColumn jr .AButtonPressed ; the A button was pressed .rightColumn ; put cursor in right column of menu - ld a, [W_BATTLETYPE] - cp $2 + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI ld a, " " jr z, .safariRightColumn ; put cursor in right column for normal battle menu (i.e. when it's not a Safari battle) @@ -2177,9 +2190,9 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) .safariRightColumn Coorda 1, 14 ; clear upper cursor position in left column Coorda 1, 16 ; clear lower cursor position in left column - hlCoord 7, 14 - ld de, W_NUMSAFARIBALLS - ld bc, $102 + coord hl, 7, 14 + ld de, wNumSafariBalls + lb bc, 1, 2 call PrintNumber ld b, $d ; top menu item X .rightColumn_WaitForInput @@ -2202,10 +2215,10 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) ld [wCurrentMenuItem], a .AButtonPressed call PlaceUnfilledArrowMenuCursor - ld a, [W_BATTLETYPE] - cp $2 ; is it a Safari battle? + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI ld a, [wCurrentMenuItem] - ld [wcc2d], a + ld [wBattleAndStartSavedMenuItem], a jr z, .handleMenuSelection ; not Safari battle ; swap the IDs of the item menu and party menu (this is probably because they swapped the positions @@ -2224,8 +2237,8 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) and a jr nz, .upperLeftMenuItemWasNotSelected ; the upper left menu item was selected - ld a, [W_BATTLETYPE] - cp $2 + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI jr z, .throwSafariBallWasSelected ; the "FIGHT" menu was selected xor a @@ -2252,8 +2265,8 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) .notLinkBattle call SaveScreenTilesToBuffer2 - ld a, [W_BATTLETYPE] - cp $2 ; is it a safari battle? + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI jr nz, BagWasSelected ; bait was selected @@ -2263,21 +2276,21 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) BagWasSelected: call LoadScreenTilesFromBuffer1 - ld a, [W_BATTLETYPE] + ld a, [wBattleType] and a ; is it a normal battle? jr nz, .next ; normal battle call DrawHUDsAndHPBars .next - ld a, [W_BATTLETYPE] + ld a, [wBattleType] dec a ; is it the old man tutorial? jr nz, DisplayPlayerBag ; no, it is a normal battle ld hl, OldManItemList ld a, l - ld [wList], a + ld [wListPointer], a ld a, h - ld [wList + 1], a + ld [wListPointer + 1], a jr DisplayBagMenu OldManItemList: @@ -2289,22 +2302,22 @@ DisplayPlayerBag: ; get the pointer to player's bag when in a normal battle ld hl, wNumBagItems ld a, l - ld [wList], a + ld [wListPointer], a ld a, h - ld [wList + 1], a + ld [wListPointer + 1], a DisplayBagMenu: xor a - ld [wcf93], a + ld [wPrintItemPrices], a ld a, ITEMLISTMENU ld [wListMenuID], a - ld a, [wcc2c] + ld a, [wBagSavedMenuItem] ld [wCurrentMenuItem], a call DisplayListMenuID ld a, [wCurrentMenuItem] - ld [wcc2c], a + ld [wBagSavedMenuItem], a ld a, $0 - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld [wMenuItemToSwap], a jp c, DisplayBattleMenu ; go back to battle menu if an item was not selected @@ -2315,36 +2328,36 @@ UseBagItem: call GetItemName call CopyStringToCF4B ; copy name xor a - ld [wd152], a + ld [wPseudoItemID], a call UseItem call LoadHudTilePatterns call ClearSprites xor a ld [wCurrentMenuItem], a - ld a, [W_BATTLETYPE] - cp $2 ; is it a safari battle? + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI jr z, .checkIfMonCaptured - ld a, [wcd6a] + ld a, [wActionResultOrTookBattleTurn] and a ; was the item used successfully? jp z, BagWasSelected ; if not, go back to the bag menu - ld a, [W_PLAYERBATTSTATUS1] + ld a, [wPlayerBattleStatus1] bit UsingTrappingMove, a ; is the player using a multi-turn move like wrap? jr z, .checkIfMonCaptured ld hl, wPlayerNumAttacksLeft dec [hl] jr nz, .checkIfMonCaptured - ld hl, W_PLAYERBATTSTATUS1 + ld hl, wPlayerBattleStatus1 res UsingTrappingMove, [hl] ; not using multi-turn move any more .checkIfMonCaptured - ld a, [wd11c] + ld a, [wCapturedMonSpecies] and a ; was the enemy mon captured with a ball? jr nz, .returnAfterCapturingMon - ld a, [W_BATTLETYPE] - cp $2 ; is it a safari battle? + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI jr z, .returnAfterUsingItem_NoCapture ; not a safari battle call LoadScreenTilesFromBuffer1 @@ -2359,7 +2372,7 @@ UseBagItem: .returnAfterCapturingMon call GBPalNormal xor a - ld [wd11c], a + ld [wCapturedMonSpecies], a ld a, $2 ld [wBattleResult], a scf ; set carry @@ -2374,8 +2387,8 @@ PartyMenuOrRockOrRun: jp nz, BattleMenu_RunWasSelected ; party menu or rock was selected call SaveScreenTilesToBuffer2 - ld a, [W_BATTLETYPE] - cp $2 ; is it a safari battle? + ld a, [wBattleType] + cp BATTLE_TYPE_SAFARI jr nz, .partyMenuWasSelected ; safari battle ld a, SAFARI_ROCK @@ -2383,8 +2396,8 @@ PartyMenuOrRockOrRun: jp UseBagItem .partyMenuWasSelected call LoadScreenTilesFromBuffer1 - xor a - ld [wd07d], a + xor a ; NORMAL_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a ld [wMenuItemToSwap], a call DisplayPartyMenu .checkIfPartyMonWasSelected @@ -2394,16 +2407,16 @@ PartyMenuOrRockOrRun: call GBPalWhiteOut call LoadHudTilePatterns call LoadScreenTilesFromBuffer2 - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call GBPalNormal jp DisplayBattleMenu .partyMonDeselected - hlCoord 11, 11 - ld bc, $81 - ld a, $7f + coord hl, 11, 11 + ld bc, 6 * SCREEN_WIDTH + 9 + ld a, " " call FillMemory - xor a - ld [wd07d], a + xor a ; NORMAL_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a call GoBackToPartyMenu jr .checkIfPartyMonWasSelected .partyMonWasSelected @@ -2434,20 +2447,20 @@ PartyMenuOrRockOrRun: and a ; was Switch selected? jr z, .switchMon ; if so, jump ; Stats was selected - xor a - ld [wcc49], a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation], a ld hl, wPartyMon1 call ClearSprites ; display the two status screens predef StatusScreen predef StatusScreen2 ; now we need to reload the enemy mon pic - ld a, [W_ENEMYBATTSTATUS2] + ld a, [wEnemyBattleStatus2] bit HasSubstituteUp, a ; does the enemy mon have a substitute? ld hl, AnimationSubstitute jr nz, .doEnemyMonAnimation ; enemy mon doesn't have substitute - ld a, [wccf3] + ld a, [wEnemyMonMinimized] and a ; has the enemy mon used Minimise? ld hl, AnimationMinimizeMon jr nz, .doEnemyMonAnimation @@ -2478,24 +2491,24 @@ PartyMenuOrRockOrRun: call HasMonFainted jp z, .partyMonDeselected ; can't switch to fainted mon ld a, $1 - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a call GBPalWhiteOut call ClearSprites call LoadHudTilePatterns call LoadScreenTilesFromBuffer1 - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call GBPalNormal ; fall through to SwitchPlayerMon -SwitchPlayerMon: ; 3d1ba (f:51ba) +SwitchPlayerMon: callab RetreatMon - ld c, $32 + ld c, 50 call DelayFrames call AnimateRetreatingPlayerMon ld a, [wWhichPokemon] ld [wPlayerMonNumber], a ld c, a - ld b, $1 + ld b, FLAG_SET push bc ld hl, wPartyGainExpFlags predef FlagActionPredef @@ -2510,26 +2523,26 @@ SwitchPlayerMon: ; 3d1ba (f:51ba) and a ret -AlreadyOutText: ; 3d1f5 (f:51f5) +AlreadyOutText: TX_FAR _AlreadyOutText db "@" -BattleMenu_RunWasSelected: ; 3d1fa (f:51fa) +BattleMenu_RunWasSelected: call LoadScreenTilesFromBuffer1 ld a, $3 ld [wCurrentMenuItem], a ld hl, wBattleMonSpeed ld de, wEnemyMonSpeed call TryRunningFromBattle - ld a, $0 - ld [wd11f], a + ld a, 0 + ld [wForcePlayerToChooseMon], a ret c - ld a, [wcd6a] + ld a, [wActionResultOrTookBattleTurn] and a - ret nz + ret nz ; return if the player couldn't escape jp DisplayBattleMenu -MoveSelectionMenu: ; 3d219 (f:5219) +MoveSelectionMenu: ld a, [wMoveMenuType] dec a jr z, .mimicmenu @@ -2560,17 +2573,18 @@ MoveSelectionMenu: ; 3d219 (f:5219) ret z ld hl, wBattleMonMoves call .loadmoves - hlCoord 4, 12 - ld b, $4 - ld c, $e - di + coord hl, 4, 12 + ld b, 4 + ld c, 14 + di ; out of pure coincidence, it is possible for vblank to occur between the di and ei + ; so it is necessary to put the di ei block to not cause tearing call TextBoxBorder - hlCoord 4, 12 + coord hl, 4, 12 ld [hl], $7a - hlCoord 10, 12 + coord hl, 10, 12 ld [hl], $7e ei - hlCoord 6, 13 + coord hl, 6, 13 call .writemoves ld b, $5 ld a, $c @@ -2578,11 +2592,11 @@ MoveSelectionMenu: ; 3d219 (f:5219) .mimicmenu ld hl, wEnemyMonMoves call .loadmoves - hlCoord 0, 7 - ld b, $4 - ld c, $e + coord hl, 0, 7 + ld b, 4 + ld c, 14 call TextBoxBorder - hlCoord 2, 8 + coord hl, 2, 8 call .writemoves ld b, $1 ld a, $7 @@ -2590,22 +2604,22 @@ MoveSelectionMenu: ; 3d219 (f:5219) .relearnmenu ld a, [wWhichPokemon] ld hl, wPartyMon1Moves - ld bc, $2c + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes call .loadmoves - hlCoord 4, 7 - ld b, $4 - ld c, $e + coord hl, 4, 7 + ld b, 4 + ld c, 14 call TextBoxBorder - hlCoord 6, 8 + coord hl, 6, 8 call .writemoves ld b, $5 ld a, $7 .menuset ld hl, wTopMenuItemY - ld [hli], a + ld [hli], a ; wTopMenuItemY ld a, b - ld [hli], a + ld [hli], a ; wTopMenuItemX ld a, [wMoveMenuType] cp $1 jr z, .selectedmoveknown @@ -2614,30 +2628,30 @@ MoveSelectionMenu: ; 3d219 (f:5219) ld a, [wPlayerMoveListIndex] inc a .selectedmoveknown - ld [hli], a + ld [hli], a ; wCurrentMenuItem inc hl ; wTileBehindCursor untouched - ld a, [wcd6c] + ld a, [wNumMovesMinusOne] inc a inc a - ld [hli], a + ld [hli], a ; wMaxMenuItem ld a, [wMoveMenuType] dec a - ld b, $c1 ; can't use B + ld b, D_UP | D_DOWN | A_BUTTON jr z, .matchedkeyspicked dec a - ld b, $c3 + ld b, D_UP | D_DOWN | A_BUTTON | B_BUTTON jr z, .matchedkeyspicked ld a, [wLinkState] cp LINK_STATE_BATTLING jr z, .matchedkeyspicked - ld a, [W_FLAGS_D733] - bit 0, a - ld b, $c7 + ld a, [wFlags_D733] + bit BIT_TEST_BATTLE, a + ld b, D_UP | D_DOWN | A_BUTTON | B_BUTTON | SELECT jr z, .matchedkeyspicked ld b, $ff .matchedkeyspicked ld a, b - ld [hli], a + ld [hli], a ; wMenuWatchedKeys ld a, [wMoveMenuType] cp $1 jr z, .movelistindex1 @@ -2647,29 +2661,29 @@ MoveSelectionMenu: ; 3d219 (f:5219) ld [hl], a ; fallthrough -SelectMenuItem: ; 3d2fe (f:52fe) +SelectMenuItem: ld a, [wMoveMenuType] and a jr z, .battleselect dec a jr nz, .select - hlCoord 1, 14 + coord hl, 1, 14 ld de, WhichTechniqueString call PlaceString jr .select .battleselect - ld a, [W_FLAGS_D733] - bit 0, a + ld a, [wFlags_D733] + bit BIT_TEST_BATTLE, a jr nz, .select call PrintMenuItem ld a, [wMenuItemToSwap] and a jr z, .select - hlCoord 5, 13 + coord hl, 5, 13 dec a - ld bc, $14 + ld bc, SCREEN_WIDTH call AddNTimes - ld [hl], $ec + ld [hl], "▷" .select ld hl, hFlags_0xFFF6 set 1, [hl] @@ -2677,9 +2691,9 @@ SelectMenuItem: ; 3d2fe (f:52fe) ld hl, hFlags_0xFFF6 res 1, [hl] bit 6, a - jp nz, CursorUp ; up + jp nz, SelectMenuItem_CursorUp ; up bit 7, a - jp nz, CursorDown ; down + jp nz, SelectMenuItem_CursorDown ; down bit 2, a jp nz, SwapMovesInMenu ; select bit 1, a ; B, but was it reset above? @@ -2692,10 +2706,10 @@ SelectMenuItem: ; 3d2fe (f:52fe) ld b, a ld a, [wMoveMenuType] dec a ; if not mimic - jr nz, .nob + jr nz, .notB pop af ret -.nob +.notB dec a ld a, b ld [wPlayerMoveListIndex], a @@ -2712,14 +2726,14 @@ SelectMenuItem: ; 3d2fe (f:52fe) add hl, bc ld a, [hl] and $3f - jr z, .nopp - ld a, [W_PLAYERDISABLEDMOVE] + jr z, .noPP + ld a, [wPlayerDisabledMove] swap a and $f dec a cp c jr z, .disabled - ld a, [W_PLAYERBATTSTATUS3] + ld a, [wPlayerBattleStatus3] bit 3, a ; transformed jr nz, .dummy ; game freak derp .dummy @@ -2735,38 +2749,38 @@ SelectMenuItem: ; 3d2fe (f:52fe) .disabled ld hl, MoveDisabledText jr .print -.nopp +.noPP ld hl, MoveNoPPText .print call PrintText call LoadScreenTilesFromBuffer1 jp MoveSelectionMenu -MoveNoPPText: ; 3d3ae (f:53ae) +MoveNoPPText: TX_FAR _MoveNoPPText db "@" -MoveDisabledText: ; 3d3b3 (f:53b3) +MoveDisabledText: TX_FAR _MoveDisabledText db "@" -WhichTechniqueString: ; 3d3b8 (f:53b8) +WhichTechniqueString: db "WHICH TECHNIQUE?@" -CursorUp: ; 3d3c9 (f:53c9) +SelectMenuItem_CursorUp: ld a, [wCurrentMenuItem] and a jp nz, SelectMenuItem call EraseMenuCursor - ld a, [wcd6c] + ld a, [wNumMovesMinusOne] inc a ld [wCurrentMenuItem], a jp SelectMenuItem -CursorDown: ; 3d3dd (f:53dd) +SelectMenuItem_CursorDown: ld a, [wCurrentMenuItem] ld b, a - ld a, [wcd6c] + ld a, [wNumMovesMinusOne] inc a inc a cp b @@ -2776,14 +2790,14 @@ CursorDown: ; 3d3dd (f:53dd) ld [wCurrentMenuItem], a jp SelectMenuItem -AnyMoveToSelect: ; 3d3f5 (f:53f5) +AnyMoveToSelect: ; return z and Struggle as the selected move if all moves have 0 PP and/or are disabled ld a, STRUGGLE ld [wPlayerSelectedMove], a - ld a, [W_PLAYERDISABLEDMOVE] + ld a, [wPlayerDisabledMove] and a ld hl, wBattleMonPP - jr nz, .asm_3d40e + jr nz, .handleDisabledMove ld a, [hli] or [hl] inc hl @@ -2792,38 +2806,38 @@ AnyMoveToSelect: ; 3d3f5 (f:53f5) or [hl] and $3f ret nz - jr .asm_3d423 -.asm_3d40e + jr .noMovesLeft +.handleDisabledMove swap a - and $f + and $f ; get disabled move ld b, a - ld d, $5 + ld d, NUM_MOVES + 1 xor a -.asm_3d416 +.handleDisabledMovePPLoop dec d - jr z, .asm_3d421 - ld c, [hl] + jr z, .allMovesChecked + ld c, [hl] ; get move PP inc hl - dec b - jr z, .asm_3d416 + dec b ; is this the disabled move? + jr z, .handleDisabledMovePPLoop ; if so, ignore its PP value or c - jr .asm_3d416 -.asm_3d421 - and a - ret nz -.asm_3d423 + jr .handleDisabledMovePPLoop +.allMovesChecked + and a ; any PP left? + ret nz ; return if a move has PP left +.noMovesLeft ld hl, NoMovesLeftText call PrintText - ld c, $3c + ld c, 60 call DelayFrames xor a ret -NoMovesLeftText: ; 3d430 (f:5430) +NoMovesLeftText: TX_FAR _NoMovesLeftText db "@" -SwapMovesInMenu: ; 3d435 (f:5435) +SwapMovesInMenu: ld a, [wMenuItemToSwap] and a jr z, .noMenuItemSelected @@ -2832,7 +2846,7 @@ SwapMovesInMenu: ; 3d435 (f:5435) ld hl, wBattleMonPP call .swapBytes ; swap move PP ; update the index of the disabled move if necessary - ld hl, W_PLAYERDISABLEDMOVE + ld hl, wPlayerDisabledMove ld a, [hl] swap a and $f @@ -2867,7 +2881,7 @@ SwapMovesInMenu: ; 3d435 (f:5435) push hl call .swapBytes ; swap moves pop hl - ld bc, $15 + ld bc, wPartyMon1PP - wPartyMon1Moves add hl, bc call .swapBytes ; swap move PP xor a @@ -2899,14 +2913,14 @@ SwapMovesInMenu: ; 3d435 (f:5435) ld [wMenuItemToSwap], a ; select the current menu item for swapping jp MoveSelectionMenu -PrintMenuItem: ; 3d4b6 (f:54b6) +PrintMenuItem: xor a ld [H_AUTOBGTRANSFERENABLED], a - hlCoord 0, 8 - ld b, $3 - ld c, $9 + coord hl, 0, 8 + ld b, 3 + ld c, 9 call TextBoxBorder - ld a, [W_PLAYERDISABLEDMOVE] + ld a, [wPlayerDisabledMove] and a jr z, .notDisabled swap a @@ -2915,7 +2929,7 @@ PrintMenuItem: ; 3d4b6 (f:54b6) ld a, [wCurrentMenuItem] cp b jr nz, .notDisabled - hlCoord 1, 10 + coord hl, 1, 10 ld de, DisabledText call PlaceString jr .moveDisabled @@ -2929,13 +2943,13 @@ 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 - ld a, $4 - ld [wcc49], a + ld a, BATTLE_MON_DATA + ld [wMonDataLocation], a callab GetMaxPP ld hl, wCurrentMenuItem ld c, [hl] @@ -2946,77 +2960,73 @@ PrintMenuItem: ; 3d4b6 (f:54b6) ld a, [hl] and $3f ld [wcd6d], a -; print TYPE/<type> and <curPP>/<maxPP> - hlCoord 1, 9 +; print TYPE/<type> and <curPP>/<maxPP> + coord hl, 1, 9 ld de, TypeText call PlaceString - hlCoord 7, 11 + coord hl, 7, 11 ld [hl], "/" - hlCoord 5, 9 + coord hl, 5, 9 ld [hl], "/" - hlCoord 5, 11 + coord hl, 5, 11 ld de, wcd6d - ld bc, $102 + lb bc, 1, 2 call PrintNumber - hlCoord 8, 11 - ld de, wd11e - ld bc, $102 + coord hl, 8, 11 + ld de, wMaxPP + lb bc, 1, 2 call PrintNumber - call GetCurrentMove - hlCoord 2, 10 + call GetCurrentMove + coord hl, 2, 10 predef PrintMoveType .moveDisabled ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a jp Delay3 -DisabledText: ; 3d555 (f:5555) -IF DEF(_YELLOW) - db "Disabled!@" -ELSE +DisabledText: db "disabled!@" -ENDC -TypeText: ; 3d55f (f:555f) +TypeText: db "TYPE@" -SelectEnemyMove: ; 3d564 (f:5564) +SelectEnemyMove: ld a, [wLinkState] - sub $4 + sub LINK_STATE_BATTLING jr nz, .noLinkBattle ; link battle call SaveScreenTilesToBuffer1 call LinkBattleExchangeData call LoadScreenTilesFromBuffer1 ld a, [wSerialExchangeNybbleReceiveData] - cp $e - jp z, .asm_3d601 - cp $d + cp LINKBATTLE_STRUGGLE + jp z, .linkedOpponentUsedStruggle + cp LINKBATTLE_NO_ACTION jr z, .unableToSelectMove - cp $4 + cp 4 ret nc ld [wEnemyMoveListIndex], a ld c, a ld hl, wEnemyMonMoves - ld b, $0 + ld b, 0 add hl, bc ld a, [hl] jr .done .noLinkBattle - ld a, [W_ENEMYBATTSTATUS2] + ld a, [wEnemyBattleStatus2] and (1 << NeedsToRecharge) | (1 << UsingRage) ; need to recharge or using rage ret nz - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 ld a, [hl] and (1 << ChargingUp) | (1 << ThrashingAbout) ; using a charging move or thrash/petal dance ret nz ld a, [wEnemyMonStatus] and SLP | 1 << FRZ ; sleeping or frozen ret nz - ld a, [W_ENEMYBATTSTATUS1] + ld a, [wEnemyBattleStatus1] and (1 << UsingTrappingMove) | (1 << StoringEnergy) ; using a trapping move like wrap or bide ret nz - ld a, [W_PLAYERBATTSTATUS1] + ld a, [wPlayerBattleStatus1] bit UsingTrappingMove, a ; caught in player's trapping move (e.g. wrap) jr z, .canSelectMove .unableToSelectMove @@ -3027,12 +3037,12 @@ SelectEnemyMove: ; 3d564 (f:5564) ld a, [hld] and a jr nz, .atLeastTwoMovesAvailable - ld a, [W_ENEMYDISABLEDMOVE] + ld a, [wEnemyDisabledMove] and a ld a, STRUGGLE ; struggle if the only move is disabled jr nz, .done .atLeastTwoMovesAvailable - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a jr z, .chooseRandomMove ; wild encounter callab AIEnemyTrainerChooseMoves @@ -3040,23 +3050,23 @@ SelectEnemyMove: ; 3d564 (f:5564) push hl call BattleRandom ld b, $1 - cp $3f ; select move 1 in [0,3e] (63/256 chance) + cp $3f ; select move 1, [0,3e] (63/256 chance) jr c, .moveChosen inc hl inc b - cp $7f ; select move 1 in [3f,7e] (64/256 chance) + cp $7f ; select move 2, [3f,7e] (64/256 chance) jr c, .moveChosen inc hl inc b - cp $be ; select move 1 in [7f,bd] (63/256 chance) + cp $be ; select move 3, [7f,bd] (63/256 chance) jr c, .moveChosen inc hl - inc b ; select move 4 in [be,ff] (66/256 chance) + inc b ; select move 4, [be,ff] (66/256 chance) .moveChosen ld a, b dec a ld [wEnemyMoveListIndex], a - ld a, [W_ENEMYDISABLEDMOVE] + ld a, [wEnemyDisabledMove] swap a and $f cp b @@ -3068,72 +3078,73 @@ SelectEnemyMove: ; 3d564 (f:5564) .done ld [wEnemySelectedMove], a ret -.asm_3d601 +.linkedOpponentUsedStruggle ld a, STRUGGLE jr .done ; this appears to exchange data with the other gameboy during link battles -LinkBattleExchangeData: ; 3d605 (f:5605) +LinkBattleExchangeData: ld a, $ff ld [wSerialExchangeNybbleReceiveData], a ld a, [wPlayerMoveListIndex] - cp $f ; is the player running from battle? - jr z, .asm_3d630 - ld a, [wcd6a] - and a - jr nz, .asm_3d629 + cp LINKBATTLE_RUN ; is the player running from battle? + jr z, .doExchange + ld a, [wActionResultOrTookBattleTurn] + and a ; is the player switching in another mon? + jr nz, .switching +; the player used a move ld a, [wPlayerSelectedMove] cp STRUGGLE - ld b, $e - jr z, .asm_3d62f - dec b - inc a - jr z, .asm_3d62f + ld b, LINKBATTLE_STRUGGLE + jr z, .next + dec b ; LINKBATTLE_NO_ACTION + inc a ; does move equal -1 (i.e. no action)? + jr z, .next ld a, [wPlayerMoveListIndex] - jr .asm_3d630 -.asm_3d629 + jr .doExchange +.switching ld a, [wWhichPokemon] - add $4 + add 4 ld b, a -.asm_3d62f +.next ld a, b -.asm_3d630 +.doExchange ld [wSerialExchangeNybbleSendData], a callab PrintWaitingText -.asm_3d63b +.syncLoop1 call Serial_ExchangeNybble call DelayFrame ld a, [wSerialExchangeNybbleReceiveData] inc a - jr z, .asm_3d63b - ld b, $a -.asm_3d649 + jr z, .syncLoop1 + ld b, 10 +.syncLoop2 call DelayFrame call Serial_ExchangeNybble dec b - jr nz, .asm_3d649 - ld b, $a -.asm_3d654 + jr nz, .syncLoop2 + ld b, 10 +.syncLoop3 call DelayFrame call Serial_SendZeroByte dec b - jr nz, .asm_3d654 + jr nz, .syncLoop3 ret -ExecutePlayerMove: ; 3d65e (f:565e) +ExecutePlayerMove: xor a ld [H_WHOSETURN], a ; set player's turn ld a, [wPlayerSelectedMove] inc a jp z, ExecutePlayerMoveDone ; for selected move = FF, skip most of player's turn xor a - ld [W_MOVEMISSED], a + ld [wMoveMissed], a ld [wMonIsDisobedient], a ld [wMoveDidntMiss], a ld a, $a ld [wDamageMultipliers], a - ld a, [wcd6a] - and a + ld a, [wActionResultOrTookBattleTurn] + and a ; has the player already used the turn (e.g. by using an item, trying to run or switching pokemon) jp nz, ExecutePlayerMoveDone call PrintGhostText jp z, ExecutePlayerMoveDone @@ -3142,14 +3153,14 @@ ExecutePlayerMove: ; 3d65e (f:565e) jp [hl] .playerHasNoSpecialCondition call GetCurrentMove - ld hl, W_PLAYERBATTSTATUS1 + ld hl, wPlayerBattleStatus1 bit ChargingUp, [hl] ; charging up for attack jr nz, PlayerCanExecuteChargingMove call CheckForDisobedience jp z, ExecutePlayerMoveDone -CheckIfPlayerNeedsToChargeUp: ; 3d69a (f:569a) - ld a, [W_PLAYERMOVEEFFECT] +CheckIfPlayerNeedsToChargeUp: + ld a, [wPlayerMoveEffect] cp CHARGE_EFFECT jp z, JumpMoveEffect cp FLY_EFFECT @@ -3157,31 +3168,31 @@ CheckIfPlayerNeedsToChargeUp: ; 3d69a (f:569a) jr PlayerCanExecuteMove ; in-battle stuff -PlayerCanExecuteChargingMove: ; 3d6a9 (f:56a9) - ld hl,W_PLAYERBATTSTATUS1 +PlayerCanExecuteChargingMove: + ld hl,wPlayerBattleStatus1 res ChargingUp,[hl] ; reset charging up and invulnerability statuses if mon was charging up for an attack ; being fully paralyzed or hurting oneself in confusion removes charging up status ; resulting in the Pokemon being invulnerable for the whole battle res Invulnerable,[hl] -PlayerCanExecuteMove: ; 3d6b0 (f:56b0) +PlayerCanExecuteMove: call PrintMonName1Text ld hl,DecrementPP ld de,wPlayerSelectedMove ; pointer to the move just used ld b,BANK(DecrementPP) call Bankswitch - ld a,[W_PLAYERMOVEEFFECT] ; effect of the move just used + ld a,[wPlayerMoveEffect] ; effect of the move just used 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 - ld a,[W_PLAYERMOVEEFFECT] + jp c,JumpMoveEffect ; ResidualEffects1 moves skip damage calculation and accuracy tests + ; unless executed as part of their exclusive effect functions + ld a,[wPlayerMoveEffect] 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 -PlayerCalcMoveDamage: ; 3d6dc (f:56dc) - ld a,[W_PLAYERMOVEEFFECT] + call c,JumpMoveEffect ; execute the effects of SpecialEffectsCont moves (e.g. Wrap, Thrash) but don't skip anything +PlayerCalcMoveDamage: + ld a,[wPlayerMoveEffect] ld hl,SetDamageEffects ld de,1 call IsInArray @@ -3197,43 +3208,43 @@ PlayerCalcMoveDamage: ; 3d6dc (f:56dc) call RandomizeDamage .moveHitTest call MoveHitTest -handleIfPlayerMoveMissed - ld a,[W_MOVEMISSED] +handleIfPlayerMoveMissed: + ld a,[wMoveMissed] and a jr z,getPlayerAnimationType - ld a,[W_PLAYERMOVEEFFECT] - sub a,EXPLODE_EFFECT + ld a,[wPlayerMoveEffect] + sub a,EXPLODE_EFFECT jr z,playPlayerMoveAnimation ; don't play any animation if the move missed, unless it was EXPLODE_EFFECT jr playerCheckIfFlyOrChargeEffect -getPlayerAnimationType - ld a,[W_PLAYERMOVEEFFECT] +getPlayerAnimationType: + ld a,[wPlayerMoveEffect] and a ld a,4 ; move has no effect other than dealing damage jr z,playPlayerMoveAnimation ld a,5 ; move has effect -playPlayerMoveAnimation +playPlayerMoveAnimation: push af - ld a,[W_PLAYERBATTSTATUS2] - bit 4,a - ld hl,Func_79747 - ld b,BANK(Func_79747) + ld a,[wPlayerBattleStatus2] + bit HasSubstituteUp,a + ld hl,HideSubstituteShowMonAnim + ld b,BANK(HideSubstituteShowMonAnim) call nz,Bankswitch pop af ld [wAnimationType],a - ld a,[W_PLAYERMOVENUM] + ld a,[wPlayerMoveNum] call PlayMoveAnimation call HandleExplodingAnimation call DrawPlayerHUDAndHPBar - ld a,[W_PLAYERBATTSTATUS2] - bit 4,a - ld hl,Func_79771 - ld b,BANK(Func_79771) + ld a,[wPlayerBattleStatus2] + bit HasSubstituteUp,a + ld hl,ReshowSubstituteAnim + ld b,BANK(ReshowSubstituteAnim) call nz,Bankswitch jr MirrorMoveCheck -playerCheckIfFlyOrChargeEffect - ld c,$1E +playerCheckIfFlyOrChargeEffect: + ld c,30 call DelayFrames - ld a,[W_PLAYERMOVEEFFECT] + ld a,[wPlayerMoveEffect] cp a,FLY_EFFECT jr z,.playAnim cp a,CHARGE_EFFECT @@ -3244,8 +3255,8 @@ playerCheckIfFlyOrChargeEffect ld [wAnimationType],a ld a,STATUS_AFFECTED_ANIM call PlayMoveAnimation -MirrorMoveCheck - ld a,[W_PLAYERMOVEEFFECT] +MirrorMoveCheck: + ld a,[wPlayerMoveEffect] cp a,MIRROR_MOVE_EFFECT jr nz,.metronomeCheck call MirrorMoveCopyMove @@ -3259,16 +3270,16 @@ MirrorMoveCheck call MetronomePickMove jp CheckIfPlayerNeedsToChargeUp ; Go back to damage calculation for the move picked by Metronome .next - ld a,[W_PLAYERMOVEEFFECT] + ld a,[wPlayerMoveEffect] ld hl,ResidualEffects2 ld de,1 call IsInArray jp c,JumpMoveEffect ; done here after executing effects of ResidualEffects2 - ld a,[W_MOVEMISSED] + ld a,[wMoveMissed] and a jr z,.moveDidNotMiss call PrintMoveFailureText - ld a,[W_PLAYERMOVEEFFECT] + ld a,[wPlayerMoveEffect] cp a,EXPLODE_EFFECT ; even if Explosion or Selfdestruct missed, its effect still needs to be activated jr z,.notDone jp ExecutePlayerMoveDone ; otherwise, we're done if the move missed @@ -3279,7 +3290,7 @@ MirrorMoveCheck ld a,1 ld [wMoveDidntMiss],a .notDone - ld a,[W_PLAYERMOVEEFFECT] + ld a,[wPlayerMoveEffect] ld hl,AlwaysHappenSideEffects ld de,1 call IsInArray @@ -3291,13 +3302,13 @@ MirrorMoveCheck ret z ; don't do anything else if the enemy fainted call HandleBuildingRage - ld hl,W_PLAYERBATTSTATUS1 + ld hl,wPlayerBattleStatus1 bit AttackingMultipleTimes,[hl] jr z,.executeOtherEffects 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 @@ -3305,7 +3316,7 @@ MirrorMoveCheck xor a ld [wPlayerNumHits],a .executeOtherEffects - ld a,[W_PLAYERMOVEEFFECT] + ld a,[wPlayerMoveEffect] and a jp z,ExecutePlayerMoveDone ld hl,SpecialEffects @@ -3317,17 +3328,17 @@ MirrorMoveCheck ; Responsible for executing Twineedle's second side effect (poison). jp ExecutePlayerMoveDone -MultiHitText: ; 3d805 (f:5805) +MultiHitText: TX_FAR _MultiHitText db "@" -ExecutePlayerMoveDone: ; 3d80a (f:580a) +ExecutePlayerMoveDone: xor a - ld [wcd6a],a + ld [wActionResultOrTookBattleTurn],a ld b,1 ret -PrintGhostText: ; 3d811 (f:5811) +PrintGhostText: ; print the ghost battle messages call IsGhostBattle ret nz @@ -3347,19 +3358,19 @@ PrintGhostText: ; 3d811 (f:5811) xor a ret -ScaredText: ; 3d830 (f:5830) +ScaredText: TX_FAR _ScaredText db "@" -GetOutText: ; 3d835 (f:5835) +GetOutText: TX_FAR _GetOutText db "@" -IsGhostBattle: ; 3d83a (f:583a) - ld a,[W_ISINBATTLE] +IsGhostBattle: + ld a,[wIsInBattle] dec a ret nz - ld a,[W_CURMAP] + ld a,[wCurMap] cp a,POKEMONTOWER_1 jr c,.next cp a,LAVENDER_HOUSE_1 @@ -3374,7 +3385,7 @@ IsGhostBattle: ; 3d83a (f:583a) ; checks for various status conditions affecting the player mon ; stores whether the mon cannot use a move this turn in Z flag -CheckPlayerStatusConditions: ; 3d854 (f:5854) +CheckPlayerStatusConditions: ld hl,wBattleMonStatus ld a,[hl] and a,SLP ; sleep mask @@ -3412,7 +3423,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) jp .returnToHL .HeldInPlaceCheck - ld a,[W_ENEMYBATTSTATUS1] + ld a,[wEnemyBattleStatus1] bit UsingTrappingMove,a ; is enemy using a mult-turn move like wrap? jp z,.FlinchedCheck ld hl,CantMoveText @@ -3421,7 +3432,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) jp .returnToHL .FlinchedCheck - ld hl,W_PLAYERBATTSTATUS1 + ld hl,wPlayerBattleStatus1 bit Flinched,[hl] jp z,.HyperBeamCheck res Flinched,[hl] ; reset player's flinch status @@ -3431,7 +3442,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) jp .returnToHL .HyperBeamCheck - ld hl,W_PLAYERBATTSTATUS2 + ld hl,wPlayerBattleStatus2 bit NeedsToRecharge,[hl] jr z,.AnyMoveDisabledCheck res NeedsToRecharge,[hl] ; reset player's recharge status @@ -3441,27 +3452,27 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) jp .returnToHL .AnyMoveDisabledCheck - ld hl,W_PLAYERDISABLEDMOVE + ld hl,wPlayerDisabledMove ld a,[hl] and a jr z,.ConfusedCheck dec a ld [hl],a - and a,$F ; did Disable counter hit 0? + and $f ; did Disable counter hit 0? jr nz,.ConfusedCheck ld [hl],a - ld [wccee],a + ld [wPlayerDisabledMoveNumber],a ld hl,DisabledNoMoreText call PrintText .ConfusedCheck - ld a,[W_PLAYERBATTSTATUS1] + ld a,[wPlayerBattleStatus1] add a ; is player confused? jr nc,.TriedToUseDisabledMoveCheck - ld hl,W_PLAYERCONFUSEDCOUNTER + ld hl,wPlayerConfusedCounter dec [hl] jr nz,.IsConfused - ld hl,W_PLAYERBATTSTATUS1 + ld hl,wPlayerBattleStatus1 res Confused,[hl] ; if confused counter hit 0, reset confusion status ld hl,ConfusedNoMoreText call PrintText @@ -3476,15 +3487,16 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) call BattleRandom cp a,$80 ; 50% chance to hurt itself jr c,.TriedToUseDisabledMoveCheck - ld hl,W_PLAYERBATTSTATUS1 + ld hl,wPlayerBattleStatus1 ld a,[hl] - and a, 1 << Confused ; if mon hurts itself, clear every other status from W_PLAYERBATTSTATUS1 + and a, 1 << Confused ; if mon hurts itself, clear every other status from wPlayerBattleStatus1 ld [hl],a call HandleSelfConfusionDamage jr .MonHurtItselfOrFullyParalysed .TriedToUseDisabledMoveCheck - ld a,[wccee] +; prevents a disabled move that was selected before being disabled from being used + ld a,[wPlayerDisabledMoveNumber] and a jr z,.ParalysisCheck ld hl,wPlayerSelectedMove @@ -3505,12 +3517,12 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) call PrintText .MonHurtItselfOrFullyParalysed - ld hl,W_PLAYERBATTSTATUS1 + ld hl,wPlayerBattleStatus1 ld a,[hl] - ; clear bide, thrashing, charging up, and trapping moves such as warp (already cleared for confusion damage) - and a, (1 << AttackingMultipleTimes) | (1 << Flinched) | (1 << Invulnerable) | (1 << Confused) + ; 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] + ld a,[wPlayerMoveEffect] cp a,FLY_EFFECT jr z,.FlyOrChargeEffect cp a,CHARGE_EFFECT @@ -3527,12 +3539,12 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) jp .returnToHL ; if using a two-turn move, we need to recharge the first turn .BideCheck - ld hl,W_PLAYERBATTSTATUS1 + ld hl,wPlayerBattleStatus1 bit StoringEnergy,[hl] ; is mon using bide? jr z,.ThrashingAboutCheck xor a - ld [W_PLAYERMOVENUM],a - ld hl,W_DAMAGE + ld [wPlayerMoveNum],a + ld hl,wDamage ld a,[hli] ld b,a ld c,[hl] @@ -3549,30 +3561,30 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) ld hl,ExecutePlayerMoveDone jp .returnToHL ; unless mon unleashes energy, can't move this turn .UnleashEnergy - ld hl,W_PLAYERBATTSTATUS1 + ld hl,wPlayerBattleStatus1 res StoringEnergy,[hl] ; not using bide any more ld hl,UnleashedEnergyText call PrintText ld a,1 - ld [W_PLAYERMOVEPOWER],a + ld [wPlayerMovePower],a ld hl,wPlayerBideAccumulatedDamage + 1 ld a,[hld] add a ld b,a - ld [W_DAMAGE + 1],a + ld [wDamage + 1],a ld a,[hl] rl a ; double the damage - ld [W_DAMAGE],a + ld [wDamage],a or b jr nz,.next ld a,1 - ld [W_MOVEMISSED],a + ld [wMoveMissed],a .next xor a ld [hli],a ld [hl],a ld a,BIDE - ld [W_PLAYERMOVENUM],a + ld [wPlayerMoveNum],a ld hl,handleIfPlayerMoveMissed ; skip damage calculation, DecrementPP and MoveHitTest jp .returnToHL @@ -3580,22 +3592,22 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) bit ThrashingAbout,[hl] ; is mon using thrash or petal dance? jr z,.MultiturnMoveCheck ld a,THRASH - ld [W_PLAYERMOVENUM],a + ld [wPlayerMoveNum],a ld hl,ThrashingAboutText call PrintText ld hl,wPlayerNumAttacksLeft - dec [hl] ; did Trashing About counter hit 0? + 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 trashing about + ld hl,wPlayerBattleStatus1 + res ThrashingAbout,[hl] ; no longer thrashing about set Confused,[hl] ; confused call BattleRandom and a,3 inc a inc a ; confused for 2-5 turns - ld [W_PLAYERCONFUSEDCOUNTER],a + ld [wPlayerConfusedCounter],a pop hl ; skip DecrementPP jp .returnToHL @@ -3607,13 +3619,13 @@ 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 .RageCheck - ld a, [W_PLAYERBATTSTATUS2] + ld a, [wPlayerBattleStatus2] bit UsingRage, a ; is mon using rage? jp z, .checkPlayerStatusConditionsDone ; if we made it this far, mon can move normally this turn ld a, RAGE @@ -3621,7 +3633,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) call GetMoveName call CopyStringToCF4B xor a - ld [W_PLAYERMOVEEFFECT], a + ld [wPlayerMoveEffect], a ld hl, PlayerCanExecuteMove jp .returnToHL @@ -3634,77 +3646,77 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854) and a ret -FastAsleepText: ; 3da3d (f:5a3d) +FastAsleepText: TX_FAR _FastAsleepText db "@" -WokeUpText: ; 3da42 (f:5a42) +WokeUpText: TX_FAR _WokeUpText db "@" -IsFrozenText: ; 3da47 (f:5a47) +IsFrozenText: TX_FAR _IsFrozenText db "@" -FullyParalyzedText: ; 3da4c (f:5a4c) +FullyParalyzedText: TX_FAR _FullyParalyzedText db "@" -FlinchedText: ; 3da51 (f:5a51) +FlinchedText: TX_FAR _FlinchedText db "@" -MustRechargeText: ; 3da56 (f:5a56) +MustRechargeText: TX_FAR _MustRechargeText db "@" -DisabledNoMoreText: ; 3da5b (f:5a5b) +DisabledNoMoreText: TX_FAR _DisabledNoMoreText db "@" -IsConfusedText: ; 3da60 (f:5a60) +IsConfusedText: TX_FAR _IsConfusedText db "@" -HurtItselfText: ; 3da65 (f:5a65) +HurtItselfText: TX_FAR _HurtItselfText db "@" -ConfusedNoMoreText: ; 3da6a (f:5a6a) +ConfusedNoMoreText: TX_FAR _ConfusedNoMoreText db "@" -SavingEnergyText: ; 3da6f (f:5a6f) +SavingEnergyText: TX_FAR _SavingEnergyText db "@" -UnleashedEnergyText: ; 3da74 (f:5a74) +UnleashedEnergyText: TX_FAR _UnleashedEnergyText db "@" -ThrashingAboutText: ; 3da79 (f:5a79) +ThrashingAboutText: TX_FAR _ThrashingAboutText db "@" -AttackContinuesText: ; 3da7e (f:5a7e) +AttackContinuesText: TX_FAR _AttackContinuesText db "@" -CantMoveText: ; 3da83 (f:5a83) +CantMoveText: TX_FAR _CantMoveText db "@" -PrintMoveIsDisabledText: ; 3da88 (f:5a88) +PrintMoveIsDisabledText: ld hl, wPlayerSelectedMove - ld de, W_PLAYERBATTSTATUS1 + ld de, wPlayerBattleStatus1 ld a, [H_WHOSETURN] and a jr z, .removeChargingUp inc hl - ld de, W_ENEMYBATTSTATUS1 + ld de, wEnemyBattleStatus1 .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 @@ -3712,11 +3724,11 @@ PrintMoveIsDisabledText: ; 3da88 (f:5a88) ld hl, MoveIsDisabledText jp PrintText -MoveIsDisabledText: ; 3daa8 (f:5aa8) +MoveIsDisabledText: TX_FAR _MoveIsDisabledText db "@" -HandleSelfConfusionDamage: ; 3daad (f:5aad) +HandleSelfConfusionDamage: ld hl, HurtItselfText call PrintText ld hl, wEnemyMonDefense @@ -3728,7 +3740,7 @@ HandleSelfConfusionDamage: ; 3daad (f:5aad) ld [hli], a ld a, [wBattleMonDefense + 1] ld [hl], a - ld hl, W_PLAYERMOVEEFFECT + ld hl, wPlayerMoveEffect push hl ld a, [hl] push af @@ -3760,24 +3772,29 @@ HandleSelfConfusionDamage: ; 3daad (f:5aad) ld [H_WHOSETURN], a jp ApplyDamageToPlayerPokemon -PrintMonName1Text: ; 3daf5 (f:5af5) +PrintMonName1Text: ld hl, MonName1Text jp PrintText -MonName1Text: ; 3dafb (f:5afb) +; 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: TX_FAR _MonName1Text - db $08 ; asm + TX_ASM ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVENUM] + ld a, [wPlayerMoveNum] ld hl, wPlayerUsedMove - jr z, .asm_3db11 - ld a, [W_ENEMYMOVENUM] + jr z, .playerTurn + ld a, [wEnemyMoveNum] ld hl, wEnemyUsedMove -.asm_3db11 +.playerTurn ld [hl], a ld [wd11e], a - call Func_3db85 + call DetermineExclamationPointTextNum ld a, [wMonIsDisobedient] and a ld hl, Used2Text @@ -3789,35 +3806,37 @@ MonName1Text: ; 3dafb (f:5afb) ld hl, Used1Text ret -Used1Text: ; 3db2d (f:5b2d) +Used1Text: TX_FAR _Used1Text - db $08 ; asm + TX_ASM jr PrintInsteadText -Used2Text: ; 3db34 (f:5b34) +Used2Text: TX_FAR _Used2Text - db $08 ; asm + TX_ASM + ; fall through -PrintInsteadText: ; 3db39 (f:5b39) +PrintInsteadText: ld a, [wMonIsDisobedient] and a - jr z, PrintCF4BText + jr z, PrintMoveName ld hl, InsteadText ret -InsteadText: ; 3db43 (f:5b43) +InsteadText: TX_FAR _InsteadText - db $08 ; asm + TX_ASM + ; fall through -PrintCF4BText: ; 3db48 (f:5b48) - ld hl, CF4BText +PrintMoveName: + ld hl, _PrintMoveName ret -CF4BText: ; 3db4c (f:5b4c) +_PrintMoveName: 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 @@ -3829,56 +3848,63 @@ CF4BText: ; 3db4c (f:5b4c) ld l, a ret -ExclamationPointPointerTable: ; 3db62 (f:5b62) +ExclamationPointPointerTable: dw ExclamationPoint1Text dw ExclamationPoint2Text dw ExclamationPoint3Text dw ExclamationPoint4Text dw ExclamationPoint5Text -ExclamationPoint1Text: ; 3db6c (f:5b6c) +ExclamationPoint1Text: TX_FAR _ExclamationPoint1Text db "@" -ExclamationPoint2Text: ; 3db71 (f:5b71) +ExclamationPoint2Text: TX_FAR _ExclamationPoint2Text db "@" -ExclamationPoint3Text: ; 3db76 (f:5b76) +ExclamationPoint3Text: TX_FAR _ExclamationPoint3Text db "@" -ExclamationPoint4Text: ; 3db7b (f:5b7b) +ExclamationPoint4Text: TX_FAR _ExclamationPoint4Text db "@" -ExclamationPoint5Text: ; 3db80 (f:5b80) +ExclamationPoint5Text: 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: 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: db SWORDS_DANCE, GROWTH db $00 db RECOVER, BIDE, SELFDESTRUCT, AMNESIA @@ -3893,12 +3919,12 @@ UnknownMovesList_3dba3: ; 3dba3 (f:5ba3) db $00 db $FF ; terminator -PrintMoveFailureText: ; 3dbe2 (f:5be2) - ld de, W_PLAYERMOVEEFFECT +PrintMoveFailureText: + ld de, wPlayerMoveEffect ld a, [H_WHOSETURN] and a jr z, .playersTurn - ld de, W_ENEMYMOVEEFFECT + ld de, wEnemyMoveEffect .playersTurn ld hl, DoesntAffectMonText ld a, [wDamageMultipliers] @@ -3920,8 +3946,8 @@ PrintMoveFailureText: ; 3dbe2 (f:5be2) ret nz ; 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 + ld hl, wDamage ; since the move missed, wDamage will always contain 0 at this point. + ; 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] @@ -3942,7 +3968,7 @@ PrintMoveFailureText: ; 3dbe2 (f:5be2) ld hl, KeptGoingAndCrashedText call PrintText ld b, $4 - predef Func_48125 + predef PredefShakeScreenHorizontally ld a, [H_WHOSETURN] and a jr nz, .enemyTurn @@ -3950,28 +3976,28 @@ PrintMoveFailureText: ; 3dbe2 (f:5be2) .enemyTurn jp ApplyDamageToEnemyPokemon -AttackMissedText: ; 3dc42 (f:5c42) +AttackMissedText: TX_FAR _AttackMissedText db "@" -KeptGoingAndCrashedText: ; 3dc47 (f:5c47) +KeptGoingAndCrashedText: TX_FAR _KeptGoingAndCrashedText db "@" -UnaffectedText: ; 3dc4c (f:5c4c) +UnaffectedText: TX_FAR _UnaffectedText db "@" -PrintDoesntAffectText: ; 3dc51 (f:5c51) +PrintDoesntAffectText: ld hl, DoesntAffectMonText jp PrintText -DoesntAffectMonText: ; 3dc57 (f:5c57) +DoesntAffectMonText: TX_FAR _DoesntAffectMonText db "@" ; if there was a critical hit or an OHKO was successful, print the corresponding text -PrintCriticalOHKOText: ; 3dc5c (f:5c5c) +PrintCriticalOHKOText: ld a, [wCriticalHitOrOHKO] and a jr z, .done ; do nothing if there was no critical hit or successful OHKO @@ -3988,24 +4014,24 @@ PrintCriticalOHKOText: ; 3dc5c (f:5c5c) xor a ld [wCriticalHitOrOHKO], a .done - ld c, $14 + ld c, 20 jp DelayFrames -CriticalOHKOTextPointers: ; 3dc7a (f:5c7a) +CriticalOHKOTextPointers: dw CriticalHitText dw OHKOText -CriticalHitText: ; 3dc7e (f:5c7e) +CriticalHitText: TX_FAR _CriticalHitText db "@" -OHKOText: ; 3dc83 (f:5c83) +OHKOText: TX_FAR _OHKOText db "@" ; checks if a traded mon will disobey due to lack of badges ; stores whether the mon will use a move in Z flag -CheckForDisobedience: ; 3dc88 (f:5c88) +CheckForDisobedience: xor a ld [wMonIsDisobedient], a ld a, [wLinkState] @@ -4030,7 +4056,7 @@ CheckForDisobedience: ; 3dc88 (f:5c88) ; it was traded .monIsTraded ; what level might disobey? - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges bit 7, [hl] ld a, 101 jr nz, .next @@ -4112,7 +4138,7 @@ CheckForDisobedience: ; 3dc88 (f:5c88) ld a, [wBattleMonMoves + 1] and a ; is the second move slot empty? jr z, .monDoesNothing ; mon will not use move if it only knows one move - ld a, [wccee] + ld a, [wPlayerDisabledMoveNumber] and a jr nz, .monDoesNothing ld a, [wPlayerSelectedMove] @@ -4184,38 +4210,38 @@ CheckForDisobedience: ; 3dc88 (f:5c88) xor a ; set Z flag ret -LoafingAroundText: ; 3ddb6 (f:5db6) +LoafingAroundText: TX_FAR _LoafingAroundText db "@" -BeganToNapText: ; 3ddbb (f:5dbb) +BeganToNapText: TX_FAR _BeganToNapText db "@" -WontObeyText: ; 3ddc0 (f:5dc0) +WontObeyText: TX_FAR _WontObeyText db "@" -TurnedAwayText: ; 3ddc5 (f:5dc5) +TurnedAwayText: TX_FAR _TurnedAwayText db "@" -IgnoredOrdersText: ; 3ddca (f:5dca) +IgnoredOrdersText: TX_FAR _IgnoredOrdersText db "@" ; sets b, c, d, and e for the CalculateDamage routine in the case of an attack by the player mon -GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf) +GetDamageVarsForPlayerAttack: xor a - ld hl, W_DAMAGE ; damage to eventually inflict, initialise to zero + ld hl, wDamage ; damage to eventually inflict, initialise to zero ldi [hl], a ld [hl], a - ld hl, W_PLAYERMOVEPOWER + ld hl, wPlayerMovePower ld a, [hli] and a ld d, a ; d = move power ret z ; return if move power is zero - ld a, [hl] ; a = [W_PLAYERMOVETYPE] + ld a, [hl] ; a = [wPlayerMoveType] cp FIRE ; types >= FIRE are all special jr nc, .specialAttack .physicalAttack @@ -4223,7 +4249,7 @@ GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf) ld a, [hli] ld b, a ld c, [hl] ; bc = enemy defense - ld a, [W_ENEMYBATTSTATUS3] + ld a, [wEnemyBattleStatus3] bit HasReflectUp, a ; check for Reflect jr z, .physicalAttackCritCheck ; if the enemy has used Reflect, double the enemy's defense @@ -4253,7 +4279,7 @@ GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf) ld a, [hli] ld b, a ld c, [hl] ; bc = enemy special - ld a, [W_ENEMYBATTSTATUS3] + ld a, [wEnemyBattleStatus3] bit HasLightScreenUp, a ; check for Light Screen jr z, .specialAttackCritCheck ; if the enemy has used Light Screen, double the enemy's special @@ -4318,17 +4344,17 @@ GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf) ret ; sets b, c, d, and e for the CalculateDamage routine in the case of an attack by the enemy mon -GetDamageVarsForEnemyAttack: ; 3de75 (f:5e75) - ld hl, W_DAMAGE ; damage to eventually inflict, initialise to zero +GetDamageVarsForEnemyAttack: + ld hl, wDamage ; damage to eventually inflict, initialise to zero xor a ld [hli], a ld [hl], a - ld hl, W_ENEMYMOVEPOWER + ld hl, wEnemyMovePower ld a, [hli] ld d, a ; d = move power and a ret z ; return if move power is zero - ld a, [hl] ; a = [W_ENEMYMOVETYPE] + ld a, [hl] ; a = [wEnemyMoveType] cp FIRE ; types >= FIRE are all special jr nc, .specialAttack .physicalAttack @@ -4336,7 +4362,7 @@ GetDamageVarsForEnemyAttack: ; 3de75 (f:5e75) ld a, [hli] ld b, a ld c, [hl] ; bc = player defense - ld a, [W_PLAYERBATTSTATUS3] + ld a, [wPlayerBattleStatus3] bit HasReflectUp, a ; check for Reflect jr z, .physicalAttackCritCheck ; if the player has used Reflect, double the player's defense @@ -4366,7 +4392,7 @@ GetDamageVarsForEnemyAttack: ; 3de75 (f:5e75) ld a, [hli] ld b, a ld c, [hl] - ld a, [W_PLAYERBATTSTATUS3] + ld a, [wPlayerBattleStatus3] bit HasLightScreenUp, a ; check for Light Screen jr z, .specialAttackCritCheck ; if the player has used Light Screen, double the player's special @@ -4433,7 +4459,7 @@ GetDamageVarsForEnemyAttack: ; 3de75 (f:5e75) ; get stat c of enemy mon ; c: stat to get (HP=1,Attack=2,Defense=3,Speed=4,Special=5) -GetEnemyMonStat: ; 3df1c (f:5f1c) +GetEnemyMonStat: push de push bc ld a, [wLinkState] @@ -4456,7 +4482,7 @@ GetEnemyMonStat: ; 3df1c (f:5f1c) ret .notLinkBattle ld a, [wEnemyMonLevel] - ld [W_CURENEMYLVL], a + ld [wCurEnemyLVL], a ld a, [wEnemyMonSpecies] ld [wd0b5], a call GetMonHeader @@ -4474,18 +4500,18 @@ GetEnemyMonStat: ; 3df1c (f:5f1c) pop de ret -CalculateDamage: ; 3df65 (f:5f65) +CalculateDamage: ; input: -; b: attack -; c: opponent defense -; d: base power -; e: level +; b: attack +; c: opponent defense +; d: base power +; e: level ld a, [H_WHOSETURN] ; whose turn? and a - ld a, [W_PLAYERMOVEEFFECT] + ld a, [wPlayerMoveEffect] jr z, .effect - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] .effect ; EXPLODE_EFFECT halves defense. @@ -4562,7 +4588,7 @@ CalculateDamage: ; 3df65 (f:5f65) ld b, 4 call Divide - ld hl, W_DAMAGE + ld hl, wDamage ld b, [hl] ld a, [H_QUOTIENT + 3] add b @@ -4636,46 +4662,45 @@ CalculateDamage: ; 3df65 (f:5f65) and a ret -JumpToOHKOMoveEffect: ; 3e016 (f:6016) +JumpToOHKOMoveEffect: call JumpMoveEffect - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] dec a ret -UnusedHighCriticalMoves: ; 3e01e (f:601e) +UnusedHighCriticalMoves: db KARATE_CHOP db RAZOR_LEAF db CRABHAMMER db SLASH db $FF -; 3e023 ; determines if attack is a critical hit ; azure heights claims "the fastest pokémon (who are,not coincidentally, ; among the most popular) tend to CH about 20 to 25% of the time." -CriticalHitTest: ; 3e023 (f:6023) +CriticalHitTest: xor a ld [wCriticalHitOrOHKO], a ld a, [H_WHOSETURN] and a ld a, [wEnemyMonSpecies] - jr nz, .asm_3e032 + jr nz, .handleEnemy ld a, [wBattleMonSpecies] -.asm_3e032 +.handleEnemy ld [wd0b5], a call GetMonHeader - ld a, [W_MONHBASESPEED] + ld a, [wMonHBaseSpeed] ld b, a srl b ; (effective (base speed/2)) ld a, [H_WHOSETURN] and a - ld hl, W_PLAYERMOVEPOWER - ld de, W_PLAYERBATTSTATUS2 + ld hl, wPlayerMovePower + ld de, wPlayerBattleStatus2 jr z, .calcCriticalHitProbability - ld hl, W_ENEMYMOVEPOWER - ld de, W_ENEMYBATTSTATUS2 -.calcCriticalHitProbability ; 0x3e04f + ld hl, wEnemyMovePower + ld de, wEnemyBattleStatus2 +.calcCriticalHitProbability ld a, [hld] ; read base power from RAM and a ret z ; do nothing if zero @@ -4721,7 +4746,7 @@ CriticalHitTest: ; 3e023 (f:6023) ret ; high critical hit moves -HighCriticalMoves: ; 3e08e (f:608e) +HighCriticalMoves: db KARATE_CHOP db RAZOR_LEAF db CRABHAMMER @@ -4730,7 +4755,7 @@ HighCriticalMoves: ; 3e08e (f:608e) ; function to determine if Counter hits and if so, how much damage it does -HandleCounterMove: ; 3e093 (f:6093) +HandleCounterMove: ; The variables checked by Counter are updated whenever the cursor points to a new move in the battle selection menu. ; This is irrelevant for the opponent's side outside of link battles, since the move selection is controlled by the AI. ; However, in the scenario where the player switches out and the opponent uses Counter, @@ -4741,18 +4766,18 @@ HandleCounterMove: ; 3e093 (f:6093) and a ; player's turn ld hl,wEnemySelectedMove - ld de,W_ENEMYMOVEPOWER + ld de,wEnemyMovePower ld a,[wPlayerSelectedMove] jr z,.next ; enemy's turn ld hl,wPlayerSelectedMove - ld de,W_PLAYERMOVEPOWER + ld de,wPlayerMovePower ld a,[wEnemySelectedMove] .next cp a,COUNTER ret nz ; return if not using Counter ld a,$01 - ld [W_MOVEMISSED],a ; initialize the move missed variable to true (it is set to false below if the move hits) + ld [wMoveMissed],a ; initialize the move missed variable to true (it is set to false below if the move hits) ld a,[hl] cp a,COUNTER ret z ; miss if the opponent's last selected move is Counter. @@ -4770,11 +4795,11 @@ HandleCounterMove: ; 3e093 (f:6093) xor a ret .counterableType - ld hl,W_DAMAGE + ld hl,wDamage 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 + ; wDamage 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] @@ -4790,27 +4815,27 @@ HandleCounterMove: ; 3e093 (f:6093) ld [hl],a .noCarry xor a - ld [W_MOVEMISSED],a + ld [wMoveMissed],a call MoveHitTest ; do the normal move hit test in addition to Counter's special rules xor a ret -ApplyAttackToEnemyPokemon: ; 3e0df (f:60df) - ld a,[W_PLAYERMOVEEFFECT] +ApplyAttackToEnemyPokemon: + ld a,[wPlayerMoveEffect] cp a,OHKO_EFFECT jr z,ApplyDamageToEnemyPokemon cp a,SUPER_FANG_EFFECT jr z,.superFangEffect cp a,SPECIAL_DAMAGE_EFFECT jr z,.specialDamage - ld a,[W_PLAYERMOVEPOWER] + ld a,[wPlayerMovePower] and a jp z,ApplyAttackToEnemyPokemonDone ; no attack to apply if base power is 0 jr ApplyDamageToEnemyPokemon .superFangEffect ; set the damage to half the target's HP ld hl,wEnemyMonHP - ld de,W_DAMAGE + ld de,wDamage ld a,[hli] srl a ld [de],a @@ -4829,7 +4854,7 @@ ApplyAttackToEnemyPokemon: ; 3e0df (f:60df) ld hl,wBattleMonLevel ld a,[hl] ld b,a ; Seismic Toss deals damage equal to the user's level - ld a,[W_PLAYERMOVENUM] + ld a,[wPlayerMoveNum] cp a,SEISMIC_TOSS jr z,.storeDamage cp a,NIGHT_SHADE @@ -4855,20 +4880,20 @@ ApplyAttackToEnemyPokemon: ; 3e0df (f:60df) jr nc,.loop ld b,a .storeDamage ; store damage value at b - ld hl,W_DAMAGE + ld hl,wDamage xor a ld [hli],a ld a,b ld [hl],a -ApplyDamageToEnemyPokemon: ; 3e142 (f:6142) - ld hl,W_DAMAGE +ApplyDamageToEnemyPokemon: + ld hl,wDamage ld a,[hli] ld b,a ld a,[hl] or b jr z,ApplyAttackToEnemyPokemonDone ; we're done if damage is 0 - ld a,[W_ENEMYBATTSTATUS2] + ld a,[wEnemyBattleStatus2] bit HasSubstituteUp,a ; does the enemy have a substitute? jp nz,AttackSubstitute ; subtract the damage from the pokemon's current HP @@ -4886,7 +4911,7 @@ ApplyDamageToEnemyPokemon: ; 3e142 (f:6142) sbc b ld [wEnemyMonHP],a jr nc,.animateHpBar -; if more damage was done than the current HP, zero the HP and set the damage (W_DAMAGE) +; if more damage was done than the current HP, zero the HP and set the damage (wDamage) ; equal to how much HP the pokemon had before the attack ld a,[wHPBarOldHP+1] ld [hli],a @@ -4907,29 +4932,29 @@ ApplyDamageToEnemyPokemon: ; 3e142 (f:6142) ld [wHPBarNewHP+1],a ld a,[hl] ld [wHPBarNewHP],a - hlCoord 2, 2 + coord hl, 2, 2 xor a ld [wHPBarType],a predef UpdateHPBar2 ; animate the HP bar shortening -ApplyAttackToEnemyPokemonDone: ; 3e19d (f:619d) +ApplyAttackToEnemyPokemonDone: jp DrawHUDsAndHPBars -ApplyAttackToPlayerPokemon: ; 3e1a0 (f:61a0) - ld a,[W_ENEMYMOVEEFFECT] +ApplyAttackToPlayerPokemon: + ld a,[wEnemyMoveEffect] cp a,OHKO_EFFECT jr z,ApplyDamageToPlayerPokemon cp a,SUPER_FANG_EFFECT jr z,.superFangEffect cp a,SPECIAL_DAMAGE_EFFECT jr z,.specialDamage - ld a,[W_ENEMYMOVEPOWER] + ld a,[wEnemyMovePower] and a jp z,ApplyAttackToPlayerPokemonDone jr ApplyDamageToPlayerPokemon .superFangEffect ; set the damage to half the target's HP ld hl,wBattleMonHP - ld de,W_DAMAGE + ld de,wDamage ld a,[hli] srl a ld [de],a @@ -4948,7 +4973,7 @@ ApplyAttackToPlayerPokemon: ; 3e1a0 (f:61a0) ld hl,wEnemyMonLevel ld a,[hl] ld b,a - ld a,[W_ENEMYMOVENUM] + ld a,[wEnemyMoveNum] cp a,SEISMIC_TOSS jr z,.storeDamage cp a,NIGHT_SHADE @@ -4974,20 +4999,20 @@ ApplyAttackToPlayerPokemon: ; 3e1a0 (f:61a0) jr nc,.loop ld b,a .storeDamage - ld hl,W_DAMAGE + ld hl,wDamage xor a ld [hli],a ld a,b ld [hl],a -ApplyDamageToPlayerPokemon: ; 3e200 (f:6200) - ld hl,W_DAMAGE +ApplyDamageToPlayerPokemon: + ld hl,wDamage ld a,[hli] ld b,a ld a,[hl] or b jr z,ApplyAttackToPlayerPokemonDone ; we're done if damage is 0 - ld a,[W_PLAYERBATTSTATUS2] + ld a,[wPlayerBattleStatus2] bit HasSubstituteUp,a ; does the player have a substitute? jp nz,AttackSubstitute ; subtract the damage from the pokemon's current HP @@ -5006,7 +5031,7 @@ ApplyDamageToPlayerPokemon: ; 3e200 (f:6200) ld [wBattleMonHP],a ld [wHPBarNewHP+1],a jr nc,.animateHpBar -; if more damage was done than the current HP, zero the HP and set the damage (W_DAMAGE) +; if more damage was done than the current HP, zero the HP and set the damage (wDamage) ; equal to how much HP the pokemon had before the attack ld a,[wHPBarOldHP+1] ld [hli],a @@ -5025,34 +5050,34 @@ ApplyDamageToPlayerPokemon: ; 3e200 (f:6200) ld [wHPBarMaxHP+1],a ld a,[hl] ld [wHPBarMaxHP],a - hlCoord 10, 9 + coord hl, 10, 9 ld a,$01 ld [wHPBarType],a predef UpdateHPBar2 ; animate the HP bar shortening -ApplyAttackToPlayerPokemonDone +ApplyAttackToPlayerPokemonDone: jp DrawHUDsAndHPBars -AttackSubstitute: ; 3e25e (f:625e) +AttackSubstitute: ; 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 call PrintText ; values for player turn ld de,wEnemySubstituteHP - ld bc,W_ENEMYBATTSTATUS2 + ld bc,wEnemyBattleStatus2 ld a,[H_WHOSETURN] and a jr z,.applyDamageToSubstitute ; values for enemy turn ld de,wPlayerSubstituteHP - ld bc,W_PLAYERBATTSTATUS2 + ld bc,wPlayerBattleStatus2 .applyDamageToSubstitute - ld hl,W_DAMAGE + ld hl,wDamage ld a,[hli] and a jr nz,.substituteBroke ; damage > 0xFF always breaks substitutes @@ -5062,7 +5087,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, wDamage isn't updated with the amount of HP ; the Substitute had before being attacked. ld h,b ld l,c @@ -5073,41 +5098,41 @@ AttackSubstitute: ; 3e25e (f:625e) ld a,[H_WHOSETURN] xor a,$01 ld [H_WHOSETURN],a - callab Func_79747 ; animate the substitute breaking + callab HideSubstituteShowMonAnim ; animate the substitute breaking ; flip the turn back to the way it was ld a,[H_WHOSETURN] xor a,$01 ld [H_WHOSETURN],a - ld hl,W_PLAYERMOVEEFFECT ; value for player's turn + ld hl,wPlayerMoveEffect ; value for player's turn and a jr z,.nullifyEffect - ld hl,W_ENEMYMOVEEFFECT ; value for enemy's turn + ld hl,wEnemyMoveEffect ; value for enemy's turn .nullifyEffect xor a ld [hl],a ; zero the effect of the attacker's move jp DrawHUDsAndHPBars -SubstituteTookDamageText: ; 3e2ac (f:62ac) +SubstituteTookDamageText: TX_FAR _SubstituteTookDamageText db "@" -SubstituteBrokeText: ; 3e2b1 (f:62b1) +SubstituteBrokeText: TX_FAR _SubstituteBrokeText db "@" ; this function raises the attack modifier of a pokemon using Rage when that pokemon is attacked -HandleBuildingRage: ; 3e2b6 (f:62b6) +HandleBuildingRage: ; values for the player turn - ld hl,W_ENEMYBATTSTATUS2 + ld hl,wEnemyBattleStatus2 ld de,wEnemyMonStatMods - ld bc,W_ENEMYMOVENUM + ld bc,wEnemyMoveNum ld a,[H_WHOSETURN] and a jr z,.next ; values for the enemy turn - ld hl,W_PLAYERBATTSTATUS2 + ld hl,wPlayerBattleStatus2 ld de,wPlayerMonStatMods - ld bc,W_PLAYERMOVENUM + ld bc,wPlayerMoveNum .next bit UsingRage,[hl] ; is the pokemon being attacked under the effect of Rage? ret z ; return if not @@ -5138,13 +5163,13 @@ HandleBuildingRage: ; 3e2b6 (f:62b6) ld [H_WHOSETURN],a ret -BuildingRageText: ; 3e2f8 (f:62f8) +BuildingRageText: TX_FAR _BuildingRageText db "@" ; copy last move for Mirror Move ; sets zero flag on failure and unsets zero flag on success -MirrorMoveCopyMove: ; 3e2fd (f:62fd) +MirrorMoveCopyMove: ; Mirror Move makes use of ccf1 (wPlayerUsedMove) and ccf2 (wEnemyUsedMove) addresses, ; which are mainly used to print the "[Pokemon] used [Move]" text. ; Both are set to 0 whenever a new Pokemon is sent out @@ -5156,11 +5181,11 @@ MirrorMoveCopyMove: ; 3e2fd (f:62fd) ; values for player turn ld a,[wEnemyUsedMove] ld hl,wPlayerSelectedMove - ld de,W_PLAYERMOVENUM + ld de,wPlayerMoveNum jr z,.next ; values for enemy turn ld a,[wPlayerUsedMove] - ld de,W_ENEMYMOVENUM + ld de,wEnemyMoveNum ld hl,wEnemySelectedMove .next ld [hl],a @@ -5174,16 +5199,16 @@ MirrorMoveCopyMove: ; 3e2fd (f:62fd) xor a ret -MirrorMoveFailedText: ; 3e324 (f:6324) +MirrorMoveFailedText: TX_FAR _MirrorMoveFailedText db "@" ; function used to reload move data for moves like Mirror Move and Metronome -ReloadMoveData: ; 3e329 (f:6329) +ReloadMoveData: ld [wd11e],a dec a ld hl,Moves - ld bc,$0006 + ld bc,MoveEnd - Moves call AddNTimes ld a,BANK(Moves) call FarCopyData ; copy the move's stats @@ -5196,19 +5221,19 @@ ReloadMoveData: ; 3e329 (f:6329) ret ; function that picks a random move for metronome -MetronomePickMove: ; 3e348 (f:6348) +MetronomePickMove: xor a ld [wAnimationType],a ld a,METRONOME call PlayMoveAnimation ; play Metronome's animation ; values for player turn - ld de,W_PLAYERMOVENUM + ld de,wPlayerMoveNum ld hl,wPlayerSelectedMove ld a,[H_WHOSETURN] and a jr z,.pickMoveLoop ; values for enemy turn - ld de,W_ENEMYMOVENUM + ld de,wEnemyMoveNum ld hl,wEnemySelectedMove ; loop to pick a random number in the range [1, $a5) to be the move used by Metronome .pickMoveLoop @@ -5225,7 +5250,7 @@ MetronomePickMove: ; 3e348 (f:6348) ; this function increments the current move's PP ; it's used to prevent moves that run another move within the same turn ; (like Mirror Move and Metronome) from losing 2 PP -IncrementMovePP: ; 3e373 (f:6373) +IncrementMovePP: ld a,[H_WHOSETURN] and a ; values for player turn @@ -5257,7 +5282,7 @@ IncrementMovePP: ; 3e373 (f:6373) ret ; function to adjust the base damage of an attack to account for type effectiveness -AdjustDamageForMoveType: ; 3e3a5 (f:63a5) +AdjustDamageForMoveType: ; values for player turn ld hl,wBattleMonType ld a,[hli] @@ -5267,8 +5292,8 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5) ld a,[hli] ld d,a ; d = type 1 of defender ld e,[hl] ; e = type 2 of defender - ld a,[W_PLAYERMOVETYPE] - ld [wd11e],a + ld a,[wPlayerMoveType] + ld [wMoveType],a ld a,[H_WHOSETURN] and a jr z,.next @@ -5281,10 +5306,10 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5) ld a,[hli] ld d,a ; d = type 1 of defender ld e,[hl] ; e = type 2 of defender - ld a,[W_ENEMYMOVETYPE] - ld [wd11e],a + ld a,[wEnemyMoveType] + ld [wMoveType],a .next - ld a,[wd11e] ; move type + ld a,[wMoveType] cp b ; does the move type match type 1 of the attacker? jr z,.sameTypeAttackBonus cp c ; does the move type match type 2 of the attacker? @@ -5292,7 +5317,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5) jr .skipSameTypeAttackBonus .sameTypeAttackBonus ; if the move type matches one of the attacker's types - ld hl,W_DAMAGE + 1 + ld hl,wDamage + 1 ld a,[hld] ld h,[hl] ld l,a ; hl = damage @@ -5303,14 +5328,14 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5) add hl,bc ; hl = floor(1.5 * damage) ; store damage ld a,h - ld [W_DAMAGE],a + ld [wDamage],a ld a,l - ld [W_DAMAGE + 1],a + ld [wDamage + 1],a ld hl,wDamageMultipliers set 7,[hl] .skipSameTypeAttackBonus - ld a,[wd11e] - ld b,a ; b = move type + ld a,[wMoveType] + ld b,a ld hl,TypeEffects .loop ld a,[hli] ; a = "attacking type" of the current type pair @@ -5338,7 +5363,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5) ld [wDamageMultipliers],a xor a ld [H_MULTIPLICAND],a - ld hl,W_DAMAGE + ld hl,wDamage ld a,[hli] ld [H_MULTIPLICAND + 1],a ld a,[hld] @@ -5359,7 +5384,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5) ; if damage is 0, make the move miss ; this only occurs if a move that would do 2 or 3 damage is 0.25x effective against the target inc a - ld [W_MOVEMISSED],a + ld [wMoveMissed],a .skipTypeImmunity pop bc pop hl @@ -5373,29 +5398,29 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5) ; function to tell how effective the type of an enemy attack is on the player's current pokemon ; this doesn't take into account the effects that dual types can have ; (e.g. 4x weakness / resistance, weaknesses and resistances canceling) -; the result is stored in [wd11e] +; the result is stored in [wTypeEffectiveness] ; ($05 is not very effective, $10 is neutral, $14 is super effective) ; as far is can tell, this is only used once in some AI code to help decide which move to use -AIGetTypeEffectiveness: ; 3e449 (f:6449) - ld a,[W_ENEMYMOVETYPE] - ld d,a ; d = type of enemy move +AIGetTypeEffectiveness: + ld a,[wEnemyMoveType] + ld d,a ; d = type of enemy move ld hl,wBattleMonType - ld b,[hl] ; b = type 1 of player's pokemon + ld b,[hl] ; b = type 1 of player's pokemon inc hl - ld c,[hl] ; c = type 2 of player's pokemon + ld c,[hl] ; c = type 2 of player's pokemon ld a,$10 - ld [wd11e],a ; initialize [wd11e] to neutral effectiveness + ld [wTypeEffectiveness],a ; initialize to neutral effectiveness ld hl,TypeEffects .loop ld a,[hli] cp a,$ff ret z - cp d ; match the type of the move + cp d ; match the type of the move jr nz,.nextTypePair1 ld a,[hli] - cp b ; match with type 1 of pokemon + cp b ; match with type 1 of pokemon jr z,.done - cp c ; or match with type 2 of pokemon + cp c ; or match with type 2 of pokemon jr z,.done jr .nextTypePair2 .nextTypePair1 @@ -5405,23 +5430,23 @@ AIGetTypeEffectiveness: ; 3e449 (f:6449) jr .loop .done ld a,[hl] - ld [wd11e],a ; store damage multiplier + ld [wTypeEffectiveness],a ; store damage multiplier ret INCLUDE "data/type_effects.asm" ; some tests that need to pass for a move to hit -MoveHitTest: ; 3e56b (f:656b) +MoveHitTest: ; player's turn - ld hl,W_ENEMYBATTSTATUS1 - ld de,W_PLAYERMOVEEFFECT + ld hl,wEnemyBattleStatus1 + ld de,wPlayerMoveEffect ld bc,wEnemyMonStatus ld a,[H_WHOSETURN] and a jr z,.dreamEaterCheck ; enemy's turn - ld hl,W_PLAYERBATTSTATUS1 - ld de,W_ENEMYMOVEEFFECT + ld hl,wPlayerBattleStatus1 + ld de,wEnemyMoveEffect ld bc,wBattleMonStatus .dreamEaterCheck ld a,[de] @@ -5450,7 +5475,7 @@ MoveHitTest: ; 3e56b (f:656b) jr nz,.enemyTurn .playerTurn ; this checks if the move effect is disallowed by mist - ld a,[W_PLAYERMOVEEFFECT] + ld a,[wPlayerMoveEffect] cp a,ATTACK_DOWN1_EFFECT jr c,.skipEnemyMistCheck cp a,HAZE_EFFECT + 1 @@ -5467,16 +5492,16 @@ MoveHitTest: ; 3e56b (f:656b) ; FLASH, CONVERSION*, HAZE*, SCREECH, LIGHT SCREEN*, REFLECT* ; the moves that are marked with an asterisk are not affected since this ; function is not called when those moves are used - ld a,[W_ENEMYBATTSTATUS2] + ld a,[wEnemyBattleStatus2] bit ProtectedByMist,a ; is mon protected by mist? jp nz,.moveMissed .skipEnemyMistCheck - ld a,[W_PLAYERBATTSTATUS2] + ld a,[wPlayerBattleStatus2] bit UsingXAccuracy,a ; is the player using X Accuracy? ret nz ; if so, always hit regardless of accuracy/evasion jr .calcHitChance .enemyTurn - ld a,[W_ENEMYMOVEEFFECT] + ld a,[wEnemyMoveEffect] cp a,ATTACK_DOWN1_EFFECT jr c,.skipPlayerMistCheck cp a,HAZE_EFFECT + 1 @@ -5488,21 +5513,21 @@ MoveHitTest: ; 3e56b (f:656b) jr .skipPlayerMistCheck .playerMistCheck ; similar to enemy mist check - ld a,[W_PLAYERBATTSTATUS2] + ld a,[wPlayerBattleStatus2] bit ProtectedByMist,a ; is mon protected by mist? jp nz,.moveMissed .skipPlayerMistCheck - ld a,[W_ENEMYBATTSTATUS2] + ld a,[wEnemyBattleStatus2] bit UsingXAccuracy,a ; is the enemy using X Accuracy? ret nz ; if so, always hit regardless of accuracy/evasion .calcHitChance call CalcHitChance ; scale the move accuracy according to attacker's accuracy and target's evasion - ld a,[W_PLAYERMOVEACCURACY] + ld a,[wPlayerMoveAccuracy] ld b,a ld a,[H_WHOSETURN] and a jr z,.doAccuracyCheck - ld a,[W_ENEMYMOVEACCURACY] + ld a,[wEnemyMoveAccuracy] ld b,a .doAccuracyCheck ; if the random number generated is greater than or equal to the scaled accuracy, the move misses @@ -5513,26 +5538,26 @@ MoveHitTest: ; 3e56b (f:656b) ret .moveMissed xor a - ld hl,W_DAMAGE ; zero the damage + ld hl,wDamage ; zero the damage ld [hli],a ld [hl],a inc a - ld [W_MOVEMISSED],a + ld [wMoveMissed],a ld a,[H_WHOSETURN] and a jr z,.playerTurn2 .enemyTurn2 - ld hl,W_ENEMYBATTSTATUS1 + ld hl,wEnemyBattleStatus1 res UsingTrappingMove,[hl] ; end multi-turn attack e.g. wrap ret .playerTurn2 - ld hl,W_PLAYERBATTSTATUS1 + ld hl,wPlayerBattleStatus1 res UsingTrappingMove,[hl] ; end multi-turn attack e.g. wrap ret ; values for player turn -CalcHitChance: ; 3e624 (f:6624) - ld hl,W_PLAYERMOVEACCURACY +CalcHitChance: + ld hl,wPlayerMoveAccuracy ld a,[H_WHOSETURN] and a ld a,[wPlayerMonAccuracyMod] @@ -5541,7 +5566,7 @@ CalcHitChance: ; 3e624 (f:6624) ld c,a jr z,.next ; values for enemy turn - ld hl,W_ENEMYMOVEACCURACY + ld hl,wEnemyMoveAccuracy ld a,[wEnemyMonAccuracyMod] ld b,a ld a,[wPlayerMonEvasionMod] @@ -5563,7 +5588,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 @@ -5603,8 +5628,8 @@ CalcHitChance: ; 3e624 (f:6624) ret ; multiplies damage by a random percentage from ~85% to 100% -RandomizeDamage: ; 3e687 (f:6687) - ld hl, W_DAMAGE +RandomizeDamage: + ld hl, wDamage ld a, [hli] and a jr nz, .DamageGreaterThanOne @@ -5633,14 +5658,14 @@ RandomizeDamage: ; 3e687 (f:6687) call Divide ; divide the result by 255 ; store the modified damage ld a, [H_QUOTIENT + 2] - ld hl, W_DAMAGE + ld hl, wDamage ld [hli], a ld a, [H_QUOTIENT + 3] ld [hl], a ret ; for more detailed commentary, see equivalent function for player side (ExecutePlayerMove) -ExecuteEnemyMove: ; 3e6bc (f:66bc) +ExecuteEnemyMove: ld a, [wEnemySelectedMove] inc a jp z, ExecuteEnemyMoveDone @@ -5651,15 +5676,15 @@ ExecuteEnemyMove: ; 3e6bc (f:66bc) jr nz, .executeEnemyMove ld b, $1 ld a, [wSerialExchangeNybbleReceiveData] - cp $e + cp LINKBATTLE_STRUGGLE jr z, .executeEnemyMove - cp $4 + cp 4 ret nc .executeEnemyMove ld hl, wAILayer2Encouragement inc [hl] xor a - ld [W_MOVEMISSED], a + ld [wMoveMissed], a ld [wMoveDidntMiss], a ld a, $a ld [wDamageMultipliers], a @@ -5667,23 +5692,23 @@ ExecuteEnemyMove: ; 3e6bc (f:66bc) jr nz, .enemyHasNoSpecialConditions jp [hl] .enemyHasNoSpecialConditions - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 bit ChargingUp, [hl] ; is the enemy charging up for attack? jr nz, EnemyCanExecuteChargingMove ; if so, jump call GetCurrentMove -CheckIfEnemyNeedsToChargeUp: ; 3e6fc (f:66fc) - ld a, [W_ENEMYMOVEEFFECT] +CheckIfEnemyNeedsToChargeUp: + ld a, [wEnemyMoveEffect] cp CHARGE_EFFECT jp z, JumpMoveEffect cp FLY_EFFECT jp z, JumpMoveEffect jr EnemyCanExecuteMove -EnemyCanExecuteChargingMove: ; 3e70b (f:670b) - ld hl, W_ENEMYBATTSTATUS1 +EnemyCanExecuteChargingMove: + ld hl, wEnemyBattleStatus1 res ChargingUp, [hl] ; no longer charging up for attack res Invulnerable, [hl] ; no longer invulnerable to typical attacks - ld a, [W_ENEMYMOVENUM] + ld a, [wEnemyMoveNum] ld [wd0b5], a ld a, BANK(MoveNames) ld [wPredefBank], a @@ -5692,23 +5717,23 @@ EnemyCanExecuteChargingMove: ; 3e70b (f:670b) call GetName ld de, wcd6d call CopyStringToCF4B -EnemyCanExecuteMove: ; 3e72b (f:672b) +EnemyCanExecuteMove: xor a ld [wMonIsDisobedient], a call PrintMonName1Text - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] ld hl, ResidualEffects1 ld de, $1 call IsInArray jp c, JumpMoveEffect - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] ld hl, SpecialEffectsCont ld de, $1 call IsInArray call c, JumpMoveEffect -EnemyCalcMoveDamage: ; 3e750 (f:6750) +EnemyCalcMoveDamage: call SwapPlayerAndEnemyLevels - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] ld hl, SetDamageEffects ld de, $1 call IsInArray @@ -5724,54 +5749,54 @@ EnemyCalcMoveDamage: ; 3e750 (f:6750) call AdjustDamageForMoveType call RandomizeDamage -EnemyMoveHitTest: ; 3e77f (f:677f) +EnemyMoveHitTest: call MoveHitTest -handleIfEnemyMoveMissed: ; 3e782 (f:6782) - ld a, [W_MOVEMISSED] +handleIfEnemyMoveMissed: + ld a, [wMoveMissed] and a - jr z, .asm_3e791 - ld a, [W_ENEMYMOVEEFFECT] + jr z, .moveDidNotMiss + ld a, [wEnemyMoveEffect] cp EXPLODE_EFFECT - jr z, asm_3e7a0 + jr z, handleExplosionMiss jr EnemyCheckIfFlyOrChargeEffect -.asm_3e791 +.moveDidNotMiss call SwapPlayerAndEnemyLevels -GetEnemyAnimationType: ; 3e794 (f:6794) - ld a, [W_ENEMYMOVEEFFECT] +GetEnemyAnimationType: + ld a, [wEnemyMoveEffect] and a ld a, $1 jr z, playEnemyMoveAnimation ld a, $2 jr playEnemyMoveAnimation -asm_3e7a0: ; 3e7a0 (f:67a0) +handleExplosionMiss: call SwapPlayerAndEnemyLevels xor a -playEnemyMoveAnimation: ; 3e7a4 (f:67a4) +playEnemyMoveAnimation: push af - ld a, [W_ENEMYBATTSTATUS2] + ld a, [wEnemyBattleStatus2] bit HasSubstituteUp, a ; does mon have a substitute? - ld hl, Func_79747 - ld b, BANK(Func_79747) + ld hl, HideSubstituteShowMonAnim + ld b, BANK(HideSubstituteShowMonAnim) call nz, Bankswitch pop af ld [wAnimationType], a - ld a, [W_ENEMYMOVENUM] + ld a, [wEnemyMoveNum] call PlayMoveAnimation call HandleExplodingAnimation call DrawEnemyHUDAndHPBar - ld a, [W_ENEMYBATTSTATUS2] + ld a, [wEnemyBattleStatus2] bit HasSubstituteUp, a ; does mon have a substitute? - ld hl, Func_79771 - ld b, BANK(Func_79771) + ld hl, ReshowSubstituteAnim + ld b, BANK(ReshowSubstituteAnim) call nz, Bankswitch ; slide the substitute's sprite out jr EnemyCheckIfMirrorMoveEffect -EnemyCheckIfFlyOrChargeEffect: ; 3e7d1 (f:67d1) +EnemyCheckIfFlyOrChargeEffect: call SwapPlayerAndEnemyLevels - ld c, $1e + ld c, 30 call DelayFrames - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] cp FLY_EFFECT jr z, .playAnim cp CHARGE_EFFECT @@ -5782,8 +5807,8 @@ EnemyCheckIfFlyOrChargeEffect: ; 3e7d1 (f:67d1) ld [wAnimationType], a ld a,STATUS_AFFECTED_ANIM call PlayMoveAnimation -EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef) - ld a, [W_ENEMYMOVEEFFECT] +EnemyCheckIfMirrorMoveEffect: + ld a, [wEnemyMoveEffect] cp MIRROR_MOVE_EFFECT jr nz, .notMirrorMoveEffect call MirrorMoveCopyMove @@ -5795,27 +5820,27 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef) call MetronomePickMove jp CheckIfEnemyNeedsToChargeUp .notMetronomeEffect - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] ld hl, ResidualEffects2 ld de, $1 call IsInArray jp c, JumpMoveEffect - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] and a - jr z, .asm_3e82b + jr z, .moveDidNotMiss call PrintMoveFailureText - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] cp EXPLODE_EFFECT - jr z, .asm_3e83e + jr z, .handleExplosionMiss jp ExecuteEnemyMoveDone -.asm_3e82b +.moveDidNotMiss call ApplyAttackToPlayerPokemon call PrintCriticalOHKOText callab DisplayEffectiveness ld a, 1 ld [wMoveDidntMiss], a -.asm_3e83e - ld a, [W_ENEMYMOVEEFFECT] +.handleExplosionMiss + ld a, [wEnemyMoveEffect] ld hl, AlwaysHappenSideEffects ld de, $1 call IsInArray @@ -5826,9 +5851,9 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef) or b ret z call HandleBuildingRage - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 bit AttackingMultipleTimes, [hl] ; is mon hitting multiple times? (example: double kick) - jr z, .asm_3e873 + jr z, .notMultiHitMove push hl ld hl, wEnemyNumAttacksLeft dec [hl] @@ -5839,8 +5864,8 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef) call PrintText xor a ld [wEnemyNumHits], a -.asm_3e873 - ld a, [W_ENEMYMOVEEFFECT] +.notMultiHitMove + ld a, [wEnemyMoveEffect] and a jr z, ExecuteEnemyMoveDone ld hl, SpecialEffects @@ -5849,17 +5874,17 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef) call nc, JumpMoveEffect jr ExecuteEnemyMoveDone -HitXTimesText: ; 3e887 (f:6887) +HitXTimesText: TX_FAR _HitXTimesText db "@" -ExecuteEnemyMoveDone: ; 3e88c (f:688c) +ExecuteEnemyMoveDone: ld b, $1 ret ; checks for various status conditions affecting the enemy mon ; stores whether the mon cannot use a move this turn in Z flag -CheckEnemyStatusConditions: ; 3e88f (f:688f) +CheckEnemyStatusConditions: ld hl, wEnemyMonStatus ld a, [hl] and SLP ; sleep mask @@ -5874,14 +5899,14 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f) ld [wAnimationType], a ld a,SLP_ANIM call PlayMoveAnimation - jr .next1 + jr .sleepDone .wokeUp ld hl, WokeUpText call PrintText -.next1 +.sleepDone xor a ld [wEnemyUsedMove], a - ld hl, ExecuteEnemyMoveDone + ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn jp .enemyReturnToHL .checkIfFrozen bit FRZ, [hl] @@ -5890,56 +5915,56 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f) call PrintText xor a ld [wEnemyUsedMove], a - ld hl, ExecuteEnemyMoveDone + ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn jp .enemyReturnToHL .checkIfTrapped - ld a, [W_PLAYERBATTSTATUS1] + ld a, [wPlayerBattleStatus1] bit UsingTrappingMove, a ; is the player using a multi-turn attack like warp jp z, .checkIfFlinched ld hl, CantMoveText call PrintText - ld hl, ExecuteEnemyMoveDone + ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn jp .enemyReturnToHL .checkIfFlinched - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 bit Flinched, [hl] ; check if enemy mon flinched jp z, .checkIfMustRecharge res Flinched, [hl] ld hl, FlinchedText call PrintText - ld hl, ExecuteEnemyMoveDone + ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn jp .enemyReturnToHL .checkIfMustRecharge - ld hl, W_ENEMYBATTSTATUS2 + ld hl, wEnemyBattleStatus2 bit NeedsToRecharge, [hl] ; check if enemy mon has to recharge after using a move jr z, .checkIfAnyMoveDisabled res NeedsToRecharge, [hl] ld hl, MustRechargeText call PrintText - ld hl, ExecuteEnemyMoveDone + ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn jp .enemyReturnToHL .checkIfAnyMoveDisabled - ld hl, W_ENEMYDISABLEDMOVE + ld hl, wEnemyDisabledMove ld a, [hl] and a jr z, .checkIfConfused - dec a + dec a ; decrement disable counter ld [hl], a - and $f + and $f ; did disable counter hit 0? jr nz, .checkIfConfused ld [hl], a - ld [wccef], a + ld [wEnemyDisabledMoveNumber], a ld hl, DisabledNoMoreText call PrintText .checkIfConfused - ld a, [W_ENEMYBATTSTATUS1] + ld a, [wEnemyBattleStatus1] add a ; check if enemy mon is confused jp nc, .checkIfTriedToUseDisabledMove - ld hl, W_ENEMYCONFUSEDCOUNTER + ld hl, wEnemyConfusedCounter dec [hl] jr nz, .isConfused - ld hl, W_ENEMYBATTSTATUS1 - res Confused, [hl] + ld hl, wEnemyBattleStatus1 + res Confused, [hl] ; if confused counter hit 0, reset confusion status ld hl, ConfusedNoMoreText call PrintText jp .checkIfTriedToUseDisabledMove @@ -5953,9 +5978,9 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f) call BattleRandom cp $80 jr c, .checkIfTriedToUseDisabledMove - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 ld a, [hl] - and 1 << Confused + and 1 << Confused ; if mon hurts itself, clear every other status from wEnemyBattleStatus1 ld [hl], a ld hl, HurtItselfText call PrintText @@ -5968,7 +5993,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f) ld [hli], a ld a, [wEnemyMonDefense + 1] ld [hl], a - ld hl, W_ENEMYMOVEEFFECT + ld hl, wEnemyMoveEffect push hl ld a, [hl] push af @@ -5999,31 +6024,32 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f) call ApplyDamageToEnemyPokemon jr .monHurtItselfOrFullyParalysed .checkIfTriedToUseDisabledMove - ld a, [wccef] +; prevents a disabled move that was selected before being disabled from being used + ld a, [wEnemyDisabledMoveNumber] and a jr z, .checkIfParalysed ld hl, wEnemySelectedMove cp [hl] jr nz, .checkIfParalysed call PrintMoveIsDisabledText - ld hl, ExecuteEnemyMoveDone + ld hl, ExecuteEnemyMoveDone ; if a disabled move was somehow selected, player can't move this turn jp .enemyReturnToHL .checkIfParalysed ld hl, wEnemyMonStatus bit PAR, [hl] jr z, .checkIfUsingBide call BattleRandom - cp $3f + cp $3f ; 25% to be fully paralysed jr nc, .checkIfUsingBide ld hl, FullyParalyzedText call PrintText .monHurtItselfOrFullyParalysed - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 ld a, [hl] - ; clear bide, thrashing about, charging up, and multi-turn moves such as warp - and (1 << AttackingMultipleTimes) | (1 << Flinched) | (1 << Invulnerable) | (1 << Confused) + ; 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] + ld a, [wEnemyMoveEffect] cp FLY_EFFECT jr z, .flyOrChargeEffect cp CHARGE_EFFECT @@ -6036,78 +6062,78 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f) call PlayMoveAnimation .notFlyOrChargeEffect ld hl, ExecuteEnemyMoveDone - jp .enemyReturnToHL + jp .enemyReturnToHL ; if using a two-turn move, enemy needs to recharge the first turn .checkIfUsingBide - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 bit StoringEnergy, [hl] ; is mon using bide? jr z, .checkIfThrashingAbout xor a - ld [W_ENEMYMOVENUM], a - ld hl, W_DAMAGE + ld [wEnemyMoveNum], a + ld hl, wDamage ld a, [hli] ld b, a ld c, [hl] ld hl, wEnemyBideAccumulatedDamage + 1 ld a, [hl] - add c + add c ; accumulate damage taken ld [hld], a ld a, [hl] adc b ld [hl], a ld hl, wEnemyNumAttacksLeft - dec [hl] + dec [hl] ; did Bide counter hit 0? jr z, .unleashEnergy ld hl, ExecuteEnemyMoveDone - jp .enemyReturnToHL + jp .enemyReturnToHL ; unless mon unleashes energy, can't move this turn .unleashEnergy - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 res StoringEnergy, [hl] ; not using bide any more ld hl, UnleashedEnergyText call PrintText ld a, $1 - ld [W_ENEMYMOVEPOWER], a + ld [wEnemyMovePower], a ld hl, wEnemyBideAccumulatedDamage + 1 ld a, [hld] add a ld b, a - ld [W_DAMAGE + 1], a + ld [wDamage + 1], a ld a, [hl] - rl a - ld [W_DAMAGE], a + rl a ; double the damage + ld [wDamage], a or b - jr nz, .next2 + jr nz, .next ld a, $1 - ld [W_MOVEMISSED], a -.next2 + ld [wMoveMissed], a +.next xor a ld [hli], a ld [hl], a ld a, BIDE - ld [W_ENEMYMOVENUM], a + ld [wEnemyMoveNum], a call SwapPlayerAndEnemyLevels - ld hl, handleIfEnemyMoveMissed + ld hl, handleIfEnemyMoveMissed ; skip damage calculation, DecrementPP and MoveHitTest jp .enemyReturnToHL .checkIfThrashingAbout bit ThrashingAbout, [hl] ; is mon using thrash or petal dance? jr z, .checkIfUsingMultiturnMove ld a, THRASH - ld [W_ENEMYMOVENUM], a + ld [wEnemyMoveNum], a ld hl, ThrashingAboutText call PrintText ld hl, wEnemyNumAttacksLeft - dec [hl] - ld hl, EnemyCalcMoveDamage + dec [hl] ; did Thrashing About counter hit 0? + ld hl, EnemyCalcMoveDamage ; skip DecrementPP jp nz, .enemyReturnToHL push hl - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 res ThrashingAbout, [hl] ; mon is no longer using thrash or petal dance set Confused, [hl] ; mon is now confused call BattleRandom and $3 inc a - inc a - ld [W_ENEMYCONFUSEDCOUNTER], a - pop hl + inc a ; confused for 2-5 turns + ld [wEnemyConfusedCounter], a + pop hl ; skip DecrementPP jp .enemyReturnToHL .checkIfUsingMultiturnMove bit UsingTrappingMove, [hl] ; is mon using multi-turn move? @@ -6115,20 +6141,21 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f) ld hl, AttackContinuesText call PrintText ld hl, wEnemyNumAttacksLeft - dec [hl] - ld hl, GetEnemyAnimationType + dec [hl] ; did multi-turn move end? + ld hl, GetEnemyAnimationType ; if it didn't, skip damage calculation (deal damage equal to last hit), + ; DecrementPP and MoveHitTest jp nz, .enemyReturnToHL jp .enemyReturnToHL .checkIfUsingRage - ld a, [W_ENEMYBATTSTATUS2] + ld a, [wEnemyBattleStatus2] bit UsingRage, a ; is mon using rage? - jp z, .checkEnemyStatusConditionsDone + jp z, .checkEnemyStatusConditionsDone ; if we made it this far, mon can move normally this turn ld a, RAGE ld [wd11e], a call GetMoveName call CopyStringToCF4B xor a - ld [W_ENEMYMOVEEFFECT], a + ld [wEnemyMoveEffect], a ld hl, EnemyCanExecuteMove jp .enemyReturnToHL .enemyReturnToHL @@ -6139,25 +6166,25 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f) and a ; clear Z flag ret -GetCurrentMove: ; 3eabe (f:6abe) +GetCurrentMove: ld a, [H_WHOSETURN] and a jp z, .player - ld de, W_ENEMYMOVENUM + ld de, wEnemyMoveNum ld a, [wEnemySelectedMove] jr .selected .player - ld de, W_PLAYERMOVENUM - ld a, [W_FLAGS_D733] - bit 0, a - ld a, [wccd9] + ld de, wPlayerMoveNum + ld a, [wFlags_D733] + bit BIT_TEST_BATTLE, a + ld a, [wTestBattlePlayerSelectedMove] jr nz, .selected ld a, [wPlayerSelectedMove] .selected ld [wd0b5], a dec a ld hl, Moves - ld bc, $6 + ld bc, MoveEnd - Moves call AddNTimes ld a, BANK(Moves) call FarCopyData @@ -6170,7 +6197,7 @@ GetCurrentMove: ; 3eabe (f:6abe) ld de, wcd6d jp CopyStringToCF4B -LoadEnemyMonData: ; 3eb01 (f:6b01) +LoadEnemyMonData: ld a, [wLinkState] cp LINK_STATE_BATTLING jp z, LoadEnemyMonFromParty @@ -6178,13 +6205,13 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) ld [wEnemyMonSpecies], a ld [wd0b5], a call GetMonHeader - ld a, [W_ENEMYBATTSTATUS3] + ld a, [wEnemyBattleStatus3] bit Transformed, a ; is enemy mon transformed? - ld hl, wcceb ; copied DVs from when it used Transform + ld hl, wTransformedEnemyMonOriginalDVs ; original DVs before transforming ld a, [hli] ld b, [hl] jr nz, .storeDVs - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] cp $2 ; is it a trainer battle? ; fixed DVs for trainer mon ld a, $98 @@ -6199,7 +6226,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) ld [hli], a ld [hl], b ld de, wEnemyMonLevel - ld a, [W_CURENEMYLVL] + ld a, [wCurEnemyLVL] ld [de], a inc de ld b, $0 @@ -6207,10 +6234,10 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) push hl call CalcStats pop hl - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] cp $2 ; is it a trainer battle? jr z, .copyHPAndStatusFromPartyData - ld a, [W_ENEMYBATTSTATUS3] + ld a, [wEnemyBattleStatus3] bit Transformed, a ; is enemy mon transformed? jr nz, .copyTypes ; if transformed, jump ; if it's a wild mon and not transformed, init the current HP to max HP and the status to 0 @@ -6239,7 +6266,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) ld [wEnemyMonStatus], a jr .copyTypes .copyTypes - ld hl, W_MONHTYPES + ld hl, wMonHTypes ld de, wEnemyMonType ld a, [hli] ; copy type 1 ld [de], a @@ -6250,7 +6277,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) ld a, [hli] ; copy catch rate ld [de], a inc de - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] cp $2 ; is it a trainer battle? jr nz, .copyStandardMoves ; if it's a trainer battle, copy moves from enemy party data @@ -6263,7 +6290,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) jr .loadMovePPs .copyStandardMoves ; for a wild mon, first copy default moves from the mon header - ld hl, W_MONHMOVES + ld hl, wMonHMoves ld a, [hli] ld [de], a inc de @@ -6279,22 +6306,22 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) dec de dec de xor a - ld [wHPBarMaxHP], a + ld [wLearningMovesFromDayCare], a predef WriteMonMoves ; get moves based on current level .loadMovePPs ld hl, wEnemyMonMoves - ld de, wEnemyMonSpecial + 1 + ld de, wEnemyMonPP - 1 predef LoadMovePPs - ld hl, W_MONHBASESTATS + ld hl, wMonHBaseStats ld de, wEnemyMonBaseStats - ld b, $5 + ld b, NUM_STATS .copyBaseStatsLoop ld a, [hli] ld [de], a inc de dec b jr nz, .copyBaseStatsLoop - ld hl, W_MONHCATCHRATE + ld hl, wMonHCatchRate ld a, [hli] ld [de], a inc de @@ -6305,7 +6332,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) call GetMonName ld hl, wcd6d ld de, wEnemyMonNick - ld bc, $b + ld bc, NAME_LENGTH call CopyData ld a, [wEnemyMonSpecies2] ld [wd11e], a @@ -6313,15 +6340,15 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) ld a, [wd11e] dec a ld c, a - ld b, $1 + ld b, FLAG_SET ld hl, wPokedexSeen predef FlagActionPredef ; mark this mon as seen in the pokedex ld hl, wEnemyMonLevel ld de, wEnemyMonUnmodifiedLevel - ld bc, $b + ld bc, 1 + NUM_STATS * 2 call CopyData ld a, $7 ; default stat mod - ld b, $8 ; number of stat mods + ld b, NUM_STAT_MODS ; number of stat mods ld hl, wEnemyMonStatMods .statModLoop ld [hli], a @@ -6330,7 +6357,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) ret ; calls BattleTransition to show the battle transition animation and initializes some battle variables -DoBattleTransitionAndInitBattleVariables: ; 3ec32 (f:6c32) +DoBattleTransitionAndInitBattleVariables: ld a, [wLinkState] cp LINK_STATE_BATTLING jr nz, .next @@ -6362,11 +6389,11 @@ DoBattleTransitionAndInitBattleVariables: ; 3ec32 (f:6c32) ld [hli], a ld [hli], a ld [hl], a - ld [W_PLAYERDISABLEDMOVE], a + ld [wPlayerDisabledMove], a ret ; swaps the level values of the BattleMon and EnemyMon structs -SwapPlayerAndEnemyLevels: ; 3ec81 (f:6c81) +SwapPlayerAndEnemyLevels: push bc ld a, [wBattleMonLevel] ld b, a @@ -6380,8 +6407,8 @@ SwapPlayerAndEnemyLevels: ; 3ec81 (f:6c81) ; loads either red back pic or old man back pic ; also writes OAM data and loads tile patterns for the Red or Old Man back sprite's head ; (for use when scrolling the player sprite and enemy's silhouettes on screen) -LoadPlayerBackPic: ; 3ec92 (f:6c92) - ld a, [W_BATTLETYPE] +LoadPlayerBackPic: + ld a, [wBattleType] dec a ; is it the old man tutorial? ld de, RedPicBack jr nz, .next @@ -6392,7 +6419,7 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92) predef ScaleSpriteByTwo ld hl, wOAMBuffer xor a - ld [$FF8B], a ; initial tile number + ld [hOAMTile], a ; initial tile number ld b, $7 ; 7 columns ld e, $a0 ; X for the left-most column .loop ; each loop iteration writes 3 OAM entries in a vertical column @@ -6406,16 +6433,16 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92) add d ; increase Y by height of tile ld d, a inc hl - ld a, [$FF8B] + ld a, [hOAMTile] ld [hli], a ; OAM tile number inc a ; increment tile number - ld [$FF8B], a + ld [hOAMTile], a inc hl dec c jr nz, .innerLoop - ld a, [$FF8B] + ld a, [hOAMTile] add $4 ; increase tile number by 4 - ld [$FF8B], a + ld [hOAMTile], a ld a, $8 ; width of tile add e ; increase X by width of tile ld e, a @@ -6428,7 +6455,7 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92) xor a ld [$4000], a ld hl, vSprites - ld de, S_SPRITEBUFFER1 + ld de, sSpriteBuffer1 ld a, [H_LOADEDROMBANK] ld b, a ld c, 7 * 7 @@ -6436,35 +6463,31 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92) xor a ld [$0], a ld a, $31 - ld [$ffe1], a - hlCoord 1, 5 - predef_jump Func_3f0c6 + ld [hStartTileID], a + coord hl, 1, 5 + predef_jump CopyUncompressedPicToTilemap ; does nothing since no stats are ever selected (barring glitches) -DoubleOrHalveSelectedStats: ; 3ed02 (f:6d02) +DoubleOrHalveSelectedStats: callab DoubleSelectedStats - ld hl, HalveSelectedStats - ld b, BANK(HalveSelectedStats) - jp Bankswitch + jpab HalveSelectedStats -ScrollTrainerPicAfterBattle: ; 3ed12 (f:6d12) - ld hl, _ScrollTrainerPicAfterBattle - ld b, BANK(_ScrollTrainerPicAfterBattle) - jp Bankswitch +ScrollTrainerPicAfterBattle: + jpab _ScrollTrainerPicAfterBattle -ApplyBurnAndParalysisPenaltiesToPlayer: ; 3ed1a (f:6d1a) +ApplyBurnAndParalysisPenaltiesToPlayer: ld a, $1 jr ApplyBurnAndParalysisPenalties -ApplyBurnAndParalysisPenaltiesToEnemy: ; 3ed1e (f:6d1e) +ApplyBurnAndParalysisPenaltiesToEnemy: xor a -ApplyBurnAndParalysisPenalties: ; 3ed1f (f:6d1f) +ApplyBurnAndParalysisPenalties: ld [H_WHOSETURN], a call QuarterSpeedDueToParalysis jp HalveAttackDueToBurn -QuarterSpeedDueToParalysis: ; 3ed27 (f:6d27) +QuarterSpeedDueToParalysis: ld a, [H_WHOSETURN] and a jr z, .playerTurn @@ -6507,7 +6530,7 @@ QuarterSpeedDueToParalysis: ; 3ed27 (f:6d27) ld [hl], b ret -HalveAttackDueToBurn: ; 3ed64 (f:6d64) +HalveAttackDueToBurn: ld a, [H_WHOSETURN] and a jr z, .playerTurn @@ -6546,26 +6569,26 @@ HalveAttackDueToBurn: ; 3ed64 (f:6d64) ld [hl], b ret -CalculateModifiedStats: ; 3ed99 (f:6d99) +CalculateModifiedStats: ld c, 0 .loop call CalculateModifiedStat inc c ld a, c - cp 4 + cp NUM_STATS - 1 jr nz, .loop ret ; calculate modified stat for stat c (0 = attack, 1 = defense, 2 = speed, 3 = special) -CalculateModifiedStat: ; 3eda5 (f:6da5) +CalculateModifiedStat: push bc push bc - ld a, [wd11e] + ld a, [wCalculateWhoseStats] and a ld a, c ld hl, wBattleMonAttack ld de, wPlayerMonUnmodifiedAttack - ld bc, wPlayerMonAttackMod + ld bc, wPlayerMonStatMods jr z, .next ld hl, wEnemyMonAttack ld de, wEnemyMonUnmodifiedAttack @@ -6635,11 +6658,11 @@ CalculateModifiedStat: ; 3eda5 (f:6da5) pop bc ret -ApplyBadgeStatBoosts: ; 3ee19 (f:6e19) +ApplyBadgeStatBoosts: ld a, [wLinkState] cp LINK_STATE_BATTLING ret z ; return if link battle - ld a, [W_OBTAINEDBADGES] + ld a, [wObtainedBadges] ld b, a ld hl, wBattleMonAttack ld c, $4 @@ -6688,35 +6711,35 @@ ApplyBadgeStatBoosts: ; 3ee19 (f:6e19) ld [hld], a ret -LoadHudAndHpBarAndStatusTilePatterns: ; 3ee58 (f:6e58) +LoadHudAndHpBarAndStatusTilePatterns: call LoadHpBarAndStatusTilePatterns -LoadHudTilePatterns: ; 3ee5b (f:6e5b) +LoadHudTilePatterns: ld a, [rLCDC] add a ; is LCD disabled? jr c, .lcdEnabled .lcdDisabled ld hl, BattleHudTiles1 ld de, vChars2 + $6d0 - ld bc, $18 + ld bc, BattleHudTiles1End - BattleHudTiles1 ld a, BANK(BattleHudTiles1) call FarCopyDataDouble ld hl, BattleHudTiles2 ld de, vChars2 + $730 - ld bc, $30 + ld bc, BattleHudTiles3End - BattleHudTiles2 ld a, BANK(BattleHudTiles2) jp FarCopyDataDouble .lcdEnabled ld de, BattleHudTiles1 ld hl, vChars2 + $6d0 - ld bc, (BANK(BattleHudTiles1) << 8) + $03 + lb bc, BANK(BattleHudTiles1), (BattleHudTiles1End - BattleHudTiles1) / $8 call CopyVideoDataDouble ld de, BattleHudTiles2 ld hl, vChars2 + $730 - ld bc, (BANK(BattleHudTiles2) << 8) + $06 + lb bc, BANK(BattleHudTiles2), (BattleHudTiles3End - BattleHudTiles2) / $8 jp CopyVideoDataDouble -PrintEmptyString: ; 3ee94 (f:6e94) +PrintEmptyString: ld hl, .emptyString jp PrintText .emptyString @@ -6749,8 +6772,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 @@ -6759,11 +6782,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 @@ -6775,22 +6798,22 @@ BattleRandom: ret -HandleExplodingAnimation: ; 3eed3 (f:6ed3) +HandleExplodingAnimation: ld a, [H_WHOSETURN] and a - ld hl, wEnemyMonType1 ; wcfea - ld de, W_ENEMYBATTSTATUS1 - ld a, [W_PLAYERMOVENUM] - jr z, .asm_3eeea - ld hl, wBattleMonType1 ; wd019 - ld de, W_ENEMYBATTSTATUS1 - ld a, [W_ENEMYMOVENUM] -.asm_3eeea + ld hl, wEnemyMonType1 + ld de, wEnemyBattleStatus1 + ld a, [wPlayerMoveNum] + jr z, .player + ld hl, wBattleMonType1 + ld de, wEnemyBattleStatus1 + ld a, [wEnemyMoveNum] +.player cp SELFDESTRUCT - jr z, .asm_3eef1 + jr z, .isExplodingMove cp EXPLOSION ret nz -.asm_3eef1 +.isExplodingMove ld a, [de] bit Invulnerable, a ; fly/dig ret nz @@ -6800,28 +6823,29 @@ HandleExplodingAnimation: ; 3eed3 (f:6ed3) ld a, [hl] cp GHOST ret z - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] and a ret nz ld a, 5 ld [wAnimationType], a -PlayMoveAnimation: ; 3ef07 (f:6f07) - ld [W_ANIMATIONID],a +PlayMoveAnimation: + ld [wAnimationID],a call Delay3 predef_jump MoveAnimation -InitBattle: ; 3ef12 (f:6f12) - ld a, [W_CUROPPONENT] +InitBattle: + ld a, [wCurOpponent] and a - jr z, asm_3ef23 + jr z, DetermineWildOpponent -InitOpponent: ; 3ef18 (f:6f18) - ld a, [W_CUROPPONENT] +InitOpponent: + ld a, [wCurOpponent] ld [wcf91], a ld [wEnemyMonSpecies2], a - jr asm_3ef3d -asm_3ef23: ; 3ef23 (f:6f23) + jr InitBattleCommon + +DetermineWildOpponent: ld a, [wd732] bit 1, a jr z, .asm_3ef2f @@ -6834,47 +6858,47 @@ asm_3ef23: ; 3ef23 (f:6f23) ret nz callab TryDoWildEncounter ret nz -asm_3ef3d: ; 3ef3d (f:6f3d) +InitBattleCommon: ld a, [wMapPalOffset] push af - ld hl, wd358 + ld hl, wLetterPrintingDelayFlags ld a, [hl] push af res 1, [hl] callab InitBattleVariables ld a, [wEnemyMonSpecies2] - sub $c8 + sub 200 jp c, InitWildBattle - ld [W_TRAINERCLASS], a + ld [wTrainerClass], a call GetTrainerInformation callab ReadTrainer call DoBattleTransitionAndInitBattleVariables call _LoadTrainerPic xor a ld [wEnemyMonSpecies2], a - ld [$ffe1], a + ld [hStartTileID], a dec a ld [wAICount], a - hlCoord 12, 0 - predef Func_3f0c6 + coord hl, 12, 0 + predef CopyUncompressedPicToTilemap ld a, $ff ld [wEnemyMonPartyPos], a ld a, $2 - ld [W_ISINBATTLE], a - jp InitBattle_Common + ld [wIsInBattle], a + jp _InitBattleCommon -InitWildBattle: ; 3ef8b (f:6f8b) +InitWildBattle: ld a, $1 - ld [W_ISINBATTLE], a + ld [wIsInBattle], a call LoadEnemyMonData call DoBattleTransitionAndInitBattleVariables - ld a, [W_CUROPPONENT] + ld a, [wCurOpponent] cp MAROWAK jr z, .isGhost call IsGhostBattle jr nz, .isNoGhost .isGhost - ld hl, W_MONHSPRITEDIM + ld hl, wMonHSpriteDim ld a, $66 ld [hli], a ; write sprite dimensions ld bc, GhostPic @@ -6907,15 +6931,15 @@ InitWildBattle: ; 3ef8b (f:6f8b) call LoadMonFrontSprite ; load mon sprite .spriteLoaded xor a - ld [W_TRAINERCLASS], a - ld [$ffe1], a - hlCoord 12, 0 - predef Func_3f0c6 + ld [wTrainerClass], a + ld [hStartTileID], a + coord hl, 12, 0 + predef CopyUncompressedPicToTilemap ; common code that executes after init battle code specific to trainer or wild battles -InitBattle_Common: ; 3efeb (f:6feb) - ld b, $0 - call GoPAL_SET +_InitBattleCommon: + ld b, SET_PAL_BATTLE_BLACK + call RunPaletteCommand call SlidePlayerAndEnemySilhouettesOnScreen xor a ld [H_AUTOBGTRANSFERENABLED], a @@ -6924,41 +6948,41 @@ InitBattle_Common: ; 3efeb (f:6feb) call SaveScreenTilesToBuffer1 call ClearScreen ld a, $98 - ld [$ffbd], a + ld [H_AUTOBGTRANSFERDEST + 1], a ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 ld a, $9c - ld [$ffbd], a + ld [H_AUTOBGTRANSFERDEST + 1], a call LoadScreenTilesFromBuffer1 - hlCoord 9, 7 - ld bc, $50a + coord hl, 9, 7 + lb bc, 5, 10 call ClearScreenArea - hlCoord 1, 0 - ld bc, $40a + coord hl, 1, 0 + lb bc, 4, 10 call ClearScreenArea call ClearSprites - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a ; is it a wild battle? call z, DrawEnemyHUDAndHPBar ; draw enemy HUD and HP bar if it's a wild battle call StartBattle callab EndOfBattle pop af - ld [wd358], a + ld [wLetterPrintingDelayFlags], a pop af ld [wMapPalOffset], a - ld a, [wd0d4] + ld a, [wSavedTilesetType] ld [hTilesetType], a scf ret .emptyString db "@" -_LoadTrainerPic: ; 3f04b (f:704b) +_LoadTrainerPic: ; wd033-wd034 contain pointer to pic - ld a, [wd033] + ld a, [wTrainerPicPointer] ld e, a - ld a, [wd034] + ld a, [wTrainerPicPointer + 1] ld d, a ; de contains pointer to trainer pic ld a, [wLinkState] and a @@ -6973,115 +6997,116 @@ _LoadTrainerPic: ; 3f04b (f:704b) jp LoadUncompressedSpriteData ; unreferenced -Func_3f069: ; 3f069 (f:7069) +ResetCryModifiers: xor a - ld [wc0f1], a - ld [wc0f2], a + ld [wFrequencyModifier], a + ld [wTempoModifier], a jp PlaySound -Func_3f073: ; 3f073 (f:7073) +; animates the mon "growing" out of the pokeball +AnimateSendingOutMon: ld a, [wPredefRegisters] ld h, a ld a, [wPredefRegisters + 1] ld l, a - ld a, [$ffe1] - ld [H_DOWNARROWBLINKCNT1], a + ld a, [hStartTileID] + ld [hBaseTileID], a ld b, $4c - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] and a - jr z, .asm_3f0bc + jr z, .notInBattle add b ld [hl], a call Delay3 - ld bc, -41 + ld bc, -(SCREEN_WIDTH * 2 + 1) add hl, bc - ld a, $1 - ld [wcd6c], a - ld bc, $303 - predef Func_79aba - ld c, $4 + ld a, 1 + ld [wDownscaledMonSize], a + lb bc, 3, 3 + predef CopyDownscaledMonTiles + ld c, 4 call DelayFrames - ld bc, -41 + ld bc, -(SCREEN_WIDTH * 2 + 1) add hl, bc xor a - ld [wcd6c], a - ld bc, $505 - predef Func_79aba - ld c, $5 + ld [wDownscaledMonSize], a + lb bc, 5, 5 + predef CopyDownscaledMonTiles + ld c, 5 call DelayFrames - ld bc, -41 - jr .asm_3f0bf -.asm_3f0bc - ld bc, -123 -.asm_3f0bf + ld bc, -(SCREEN_WIDTH * 2 + 1) + jr .next +.notInBattle + ld bc, -(SCREEN_WIDTH * 6 + 3) +.next add hl, bc - ld a, [H_DOWNARROWBLINKCNT1] + ld a, [hBaseTileID] add $31 - jr asm_3f0d0 + jr CopyUncompressedPicToHL -Func_3f0c6: ; 3f0c6 (f:70c6) +CopyUncompressedPicToTilemap: ld a, [wPredefRegisters] ld h, a ld a, [wPredefRegisters + 1] ld l, a - ld a, [$ffe1] -asm_3f0d0: ; 3f0d0 (f:70d0) - ld bc, $707 - ld de, $14 + ld a, [hStartTileID] +CopyUncompressedPicToHL: + lb bc, 7, 7 + ld de, SCREEN_WIDTH push af - ld a, [W_SPRITEFLIPPED] + ld a, [wSpriteFlipped] and a - jr nz, .asm_3f0ed + jr nz, .flipped pop af -.asm_3f0de +.loop push bc push hl -.asm_3f0e0 +.innerLoop ld [hl], a add hl, de inc a dec c - jr nz, .asm_3f0e0 + jr nz, .innerLoop pop hl inc hl pop bc dec b - jr nz, .asm_3f0de + jr nz, .loop ret - -.asm_3f0ed + +.flipped push bc - ld b, $0 + ld b, 0 dec c add hl, bc pop bc pop af -.asm_3f0f4 +.flippedLoop push bc push hl -.asm_3f0f6 +.flippedInnerLoop ld [hl], a add hl, de inc a dec c - jr nz, .asm_3f0f6 + jr nz, .flippedInnerLoop pop hl dec hl pop bc dec b - jr nz, .asm_3f0f4 + jr nz, .flippedLoop ret -LoadMonBackPic: ; 3f103 (f:7103) +LoadMonBackPic: ; Assumes the monster's attributes have ; been loaded with GetMonHeader. ld a, [wBattleMonSpecies2] ld [wcf91], a - hlCoord 1, 5 - ld b, $7 - ld c, $8 + coord hl, 1, 5 + ld b, 7 + ld c, 8 call ClearScreenArea - ld hl, W_MONHBACKSPRITE - W_MONHEADER + ld hl, wMonHBackSprite - wMonHeader call UncompressMonSprite predef ScaleSpriteByTwo ld de, vBackPic @@ -7093,17 +7118,17 @@ LoadMonBackPic: ; 3f103 (f:7103) ld b, a jp CopyVideoData -JumpMoveEffect: ; 3f132 (f:7132) +JumpMoveEffect: call _JumpMoveEffect ld b, $1 ret -_JumpMoveEffect: ; 3f138 (f:7138) +_JumpMoveEffect: ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVEEFFECT] + ld a, [wPlayerMoveEffect] jr z, .next1 - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] .next1 dec a ; subtract 1, there is no special effect for 00 add a ; x2, 16bit pointers @@ -7116,7 +7141,7 @@ _JumpMoveEffect: ; 3f138 (f:7138) ld l, a jp [hl] ; jump to special effect handler -MoveEffectPointerTable: ; 3f150 (f:7150) +MoveEffectPointerTable: dw SleepEffect ; unused effect dw PoisonEffect ; POISON_SIDE_EFFECT1 dw DrainHPEffect ; DRAIN_HP_EFFECT @@ -7204,14 +7229,14 @@ MoveEffectPointerTable: ; 3f150 (f:7150) dw SplashEffect ; SPLASH_EFFECT dw DisableEffect ; DISABLE_EFFECT -SleepEffect: ; 3f1fc (f:71fc) +SleepEffect: ld de, wEnemyMonStatus - ld bc, W_ENEMYBATTSTATUS2 + ld bc, wEnemyBattleStatus2 ld a, [H_WHOSETURN] and a jp z, .sleepEffect ld de, wBattleMonStatus - ld bc, W_PLAYERBATTSTATUS2 + ld bc, wPlayerBattleStatus2 .sleepEffect ld a, [bc] @@ -7233,7 +7258,7 @@ SleepEffect: ; 3f1fc (f:71fc) push de call MoveHitTest ; apply accuracy tests pop de - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] and a jr nz, .didntAffect .setSleepCounter @@ -7248,22 +7273,22 @@ SleepEffect: ; 3f1fc (f:71fc) .didntAffect jp PrintDidntAffectText -FellAsleepText: ; 3f245 (f:7245) +FellAsleepText: TX_FAR _FellAsleepText db "@" -AlreadyAsleepText: ; 3f24a (f:724a) +AlreadyAsleepText: TX_FAR _AlreadyAsleepText db "@" -PoisonEffect: ; 3f24f (f:724f) +PoisonEffect: ld hl, wEnemyMonStatus - ld de, W_PLAYERMOVEEFFECT + ld de, wPlayerMoveEffect ld a, [H_WHOSETURN] and a jr z, .poisonEffect ld hl, wBattleMonStatus - ld de, W_ENEMYMOVEEFFECT + ld de, wEnemyMoveEffect .poisonEffect call CheckTargetSubstitute jr nz, .noEffect ; can't posion a substitute target @@ -7289,7 +7314,7 @@ PoisonEffect: ; 3f24f (f:724f) call MoveHitTest ; apply accuracy tests pop de pop hl - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] and a jr nz, .didntAffect jr .inflictPoison @@ -7305,13 +7330,13 @@ PoisonEffect: ; 3f24f (f:724f) ld a, [H_WHOSETURN] and a ld b, ANIM_C7 - ld hl, W_PLAYERBATTSTATUS3 + ld hl, wPlayerBattleStatus3 ld a, [de] - ld de, W_PLAYERTOXICCOUNTER + ld de, wPlayerToxicCounter jr nz, .ok ld b, ANIM_A9 - ld hl, W_ENEMYBATTSTATUS3 - ld de, W_ENEMYTOXICCOUNTER + ld hl, wEnemyBattleStatus3 + ld de, wEnemyToxicCounter .ok cp TOXIC jr nz, .normalPoison ; done if move is not Toxic @@ -7319,18 +7344,18 @@ PoisonEffect: ; 3f24f (f:724f) xor a ld [de], a ld hl, BadlyPoisonedText - jr .asm_3f2c0 + jr .continue .normalPoison ld hl, PoisonedText -.asm_3f2c0 +.continue pop de ld a, [de] cp POISON_EFFECT - jr z, .asm_3f2cd + jr z, .regularPoisonEffect ld a, b call PlayBattleAnimation2 jp PrintText -.asm_3f2cd +.regularPoisonEffect call PlayCurrentMoveAnimation2 jp PrintText .noEffect @@ -7338,31 +7363,29 @@ PoisonEffect: ; 3f24f (f:724f) cp POISON_EFFECT ret nz .didntAffect - ld c, $32 + ld c, 50 call DelayFrames jp PrintDidntAffectText -PoisonedText: ; 3f2df (f:72df) +PoisonedText: TX_FAR _PoisonedText db "@" -BadlyPoisonedText: ; 3f2e4 (f:72e4) +BadlyPoisonedText: TX_FAR _BadlyPoisonedText db "@" -DrainHPEffect: ; 3f2e9 (f:72e9) - ld hl, DrainHPEffect_ - ld b, BANK(DrainHPEffect_) - jp Bankswitch +DrainHPEffect: + jpab DrainHPEffect_ -ExplodeEffect: ; 3f2f1 (f:72f1) +ExplodeEffect: ld hl, wBattleMonHP - ld de, W_PLAYERBATTSTATUS2 + ld de, wPlayerBattleStatus2 ld a, [H_WHOSETURN] and a jr z, .faintUser ld hl, wEnemyMonHP - ld de, W_ENEMYBATTSTATUS2 + ld de, wEnemyBattleStatus2 .faintUser xor a ld [hli], a ; set the mon's HP to 0 @@ -7374,7 +7397,7 @@ ExplodeEffect: ; 3f2f1 (f:72f1) ld [de], a ret -FreezeBurnParalyzeEffect: ; 3f30c (f:730c) +FreezeBurnParalyzeEffect: xor a ld [wAnimationType], a call CheckTargetSubstitute ; test bit 4 of d063/d068 flags [target has substitute flag] @@ -7385,7 +7408,7 @@ FreezeBurnParalyzeEffect: ; 3f30c (f:730c) ld a, [wEnemyMonStatus] and a jp nz, CheckDefrost ; can't inflict status if opponent is already statused - ld a, [W_PLAYERMOVETYPE] + ld a, [wPlayerMoveType] ld b, a ld a, [wEnemyMonType1] cp b ; do target type 1 and move type match? @@ -7393,7 +7416,7 @@ FreezeBurnParalyzeEffect: ; 3f30c (f:730c) ld a, [wEnemyMonType2] cp b ; do target type 2 and move type match? ret z ; return if they match - ld a, [W_PLAYERMOVEEFFECT] + ld a, [wPlayerMoveEffect] cp a, PARALYZE_SIDE_EFFECT1 + 1 ; 10% status effects are 04, 05, 06 so 07 will set carry for those ld b, $1a ; 0x1A/0x100 or 26/256 = 10.2%~ chance jr c, .next1 ; branch ahead if this is a 10% chance effect.. @@ -7433,11 +7456,11 @@ FreezeBurnParalyzeEffect: ; 3f30c (f:730c) call PlayBattleAnimation ld hl, FrozenText jp PrintText -opponentAttacker: ; 3f382 (f:7382) +opponentAttacker: ld a, [wBattleMonStatus] ; mostly same as above with addresses swapped for opponent and a jp nz, CheckDefrost - ld a, [W_ENEMYMOVETYPE] + ld a, [wEnemyMoveType] ld b, a ld a, [wBattleMonType1] cp b @@ -7445,7 +7468,7 @@ opponentAttacker: ; 3f382 (f:7382) ld a, [wBattleMonType2] cp b ret z - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] cp a, PARALYZE_SIDE_EFFECT1 + 1 ld b, $1a jr c, .next1 @@ -7479,26 +7502,26 @@ opponentAttacker: ; 3f382 (f:7382) ld hl, FrozenText jp PrintText -BurnedText: ; 3f3d8 (f:73d8) +BurnedText: TX_FAR _BurnedText db "@" -FrozenText: ; 3f3dd (f:73dd) +FrozenText: TX_FAR _FrozenText db "@" -CheckDefrost: ; 3f3e2 (f:73e2) +CheckDefrost: ; any fire-type move that has a chance inflict burn (all but Fire Spin) will defrost a frozen target - and a, 1 << FRZ ; are they frozen? + and a, 1 << FRZ ; are they frozen? ret z ; return if so ld a, [H_WHOSETURN] and a jr nz, .opponent ;player [attacker] - ld a, [W_PLAYERMOVETYPE] + ld a, [wPlayerMoveType] sub a, FIRE ret nz ; return if type of move used isn't fire - ld [wEnemyMonStatus], a ; set opponent status to 00 ["defrost" a frozen monster] + ld [wEnemyMonStatus], a ; set opponent status to 00 ["defrost" a frozen monster] ld hl, wEnemyMon1Status ld a, [wEnemyMonPartyPos] ld bc, wEnemyMon2 - wEnemyMon1 @@ -7508,7 +7531,7 @@ CheckDefrost: ; 3f3e2 (f:73e2) ld hl, FireDefrostedText jr .common .opponent - ld a, [W_ENEMYMOVETYPE] ; same as above with addresses swapped + ld a, [wEnemyMoveType] ; same as above with addresses swapped sub a, FIRE ret nz ld [wBattleMonStatus], a @@ -7522,18 +7545,18 @@ CheckDefrost: ; 3f3e2 (f:73e2) .common jp PrintText -FireDefrostedText: ; 3f423 (f:7423) +FireDefrostedText: TX_FAR _FireDefrostedText db "@" -StatModifierUpEffect: ; 3f428 (f:7428) +StatModifierUpEffect: ld hl, wPlayerMonStatMods - ld de, W_PLAYERMOVEEFFECT + ld de, wPlayerMoveEffect ld a, [H_WHOSETURN] and a jr z, .statModifierUpEffect ld hl, wEnemyMonStatMods - ld de, W_ENEMYMOVEEFFECT + ld de, wEnemyMoveEffect .statModifierUpEffect ld a, [de] sub ATTACK_UP1_EFFECT @@ -7600,17 +7623,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 @@ -7625,36 +7648,38 @@ StatModifierUpEffect: ; 3f428 (f:7428) ld a, 999 % $100 ld [H_MULTIPLICAND + 2], a -UpdateStat: ; 3f4c3 (f:74c3) +UpdateStat: ld a, [H_PRODUCT + 2] ld [hli], a ld a, [H_PRODUCT + 3] ld [hl], a pop hl -UpdateStatDone: ; 3f4ca (f:74ca) +UpdateStatDone: ld b, c inc b - call Func_3f688 - ld hl, W_PLAYERBATTSTATUS2 - ld de, W_PLAYERMOVENUM - ld bc, wccf7 + call PrintStatText + ld hl, wPlayerBattleStatus2 + ld de, wPlayerMoveNum + ld bc, wPlayerMonMinimized ld a, [H_WHOSETURN] and a jr z, .asm_3f4e6 - ld hl, W_ENEMYBATTSTATUS2 - ld de, W_ENEMYMOVENUM - ld bc, wccf3 + ld hl, wEnemyBattleStatus2 + ld de, wEnemyMoveNum + ld bc, wEnemyMonMinimized .asm_3f4e6 ld a, [de] cp MINIMIZE jr nz, .asm_3f4f9 - bit HasSubstituteUp, [hl] ; substitute + ; if a substitute is up, slide off the substitute and show the mon pic before + ; playing the minimize animation + bit HasSubstituteUp, [hl] push af push bc - ld hl, Func_79747 - ld b, BANK(Func_79747) + ld hl, HideSubstituteShowMonAnim + ld b, BANK(HideSubstituteShowMonAnim) push de - call nz, Bankswitch ; play Minimize animation unless there's Substitute involved + call nz, Bankswitch pop de .asm_3f4f9 call PlayCurrentMoveAnimation @@ -7664,8 +7689,8 @@ UpdateStatDone: ; 3f4ca (f:74ca) pop bc ld a, $1 ld [bc], a - ld hl, Func_79771 - ld b, BANK(Func_79771) + ld hl, ReshowSubstituteAnim + ld b, BANK(ReshowSubstituteAnim) pop af call nz, Bankswitch .applyBadgeBoostsAndStatusPenalties @@ -7680,47 +7705,47 @@ UpdateStatDone: ; 3f4ca (f:74ca) call QuarterSpeedDueToParalysis ; apply speed penalty to the player whose turn is not, if it's paralyzed jp HalveAttackDueToBurn ; apply attack penalty to the player whose turn is not, if it's burned -RestoreOriginalStatModifier: ; 3f520 (f:7520) +RestoreOriginalStatModifier: pop hl dec [hl] -PrintNothingHappenedText: ; 3f522 (f:7522) +PrintNothingHappenedText: ld hl, NothingHappenedText jp PrintText -MonsStatsRoseText: ; 3f528 (f:7528) +MonsStatsRoseText: TX_FAR _MonsStatsRoseText - db $08 ; asm + TX_ASM ld hl, GreatlyRoseText ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVEEFFECT] - jr z, .asm_3f53b - ld a, [W_ENEMYMOVEEFFECT] -.asm_3f53b + ld a, [wPlayerMoveEffect] + jr z, .playerTurn + ld a, [wEnemyMoveEffect] +.playerTurn cp ATTACK_DOWN1_EFFECT ret nc ld hl, RoseText ret -GreatlyRoseText: ; 3f542 (f:7542) - db $0a +GreatlyRoseText: + TX_DELAY TX_FAR _GreatlyRoseText - -RoseText: ; 3f547 (f:7547) +; fallthrough +RoseText: TX_FAR _RoseText db "@" -StatModifierDownEffect: ; 3f54c (f:754c) +StatModifierDownEffect: ld hl, wEnemyMonStatMods - ld de, W_PLAYERMOVEEFFECT - ld bc, W_ENEMYBATTSTATUS1 + ld de, wPlayerMoveEffect + ld bc, wEnemyBattleStatus1 ld a, [H_WHOSETURN] and a jr z, .statModifierDownEffect ld hl, wPlayerMonStatMods - ld de, W_ENEMYMOVEEFFECT - ld bc, W_PLAYERBATTSTATUS1 + ld de, wEnemyMoveEffect + ld bc, wPlayerBattleStatus1 ld a, [wLinkState] cp LINK_STATE_BATTLING jr z, .statModifierDownEffect @@ -7747,7 +7772,7 @@ StatModifierDownEffect: ; 3f54c (f:754c) pop bc pop de pop hl - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] and a jp nz, MoveMissed ld a, [bc] @@ -7795,16 +7820,16 @@ StatModifierDownEffect: ; 3f54c (f:754c) ld a, c add e ld e, a - jr nc, .asm_3f5e4 + jr nc, .noCarry inc d ; de = unmodified stat -.asm_3f5e4 +.noCarry pop bc ld a, [hld] sub $1 ; can't lower stat below 1 (-6) jr nz, .recalculateStat ld a, [hl] and a - jp z, Func_3f64d + jp z, CantLowerAnymore_Pop .recalculateStat ; recalculate affected stat ; paralysis and burn penalties, as well as badge boosts are ignored @@ -7818,17 +7843,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 @@ -7841,18 +7866,18 @@ StatModifierDownEffect: ; 3f54c (f:754c) ld a, $1 ld [H_MULTIPLICAND + 2], a -UpdateLoweredStat: ; 3f624 (f:7624) +UpdateLoweredStat: ld a, [H_PRODUCT + 2] ld [hli], a ld a, [H_PRODUCT + 3] ld [hl], a pop de pop hl -UpdateLoweredStatDone: ; 3f62c (f:762c) +UpdateLoweredStatDone: ld b, c inc b push de - call Func_3f688 + call PrintStatText pop de ld a, [de] cp $44 @@ -7872,66 +7897,67 @@ UpdateLoweredStatDone: ; 3f62c (f:762c) call QuarterSpeedDueToParalysis jp HalveAttackDueToBurn -Func_3f64d: ; 3f64d (f:764d) +CantLowerAnymore_Pop: pop de pop hl inc [hl] -CantLowerAnymore: ; 3f650 (f:7650) +CantLowerAnymore: ld a, [de] cp ATTACK_DOWN_SIDE_EFFECT ret nc ld hl, NothingHappenedText jp PrintText -MoveMissed: ; 3f65a (f:765a) +MoveMissed: ld a, [de] cp $44 ret nc jp ConditionalPrintButItFailed -MonsStatsFellText: ; 3f661 (f:7661) +MonsStatsFellText: TX_FAR _MonsStatsFellText - db $08 ; asm + TX_ASM ld hl, FellText ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVEEFFECT] - jr z, .asm_3f674 - ld a, [W_ENEMYMOVEEFFECT] -.asm_3f674 - cp $1a + ld a, [wPlayerMoveEffect] + jr z, .playerTurn + ld a, [wEnemyMoveEffect] +.playerTurn +; check if the move's effect decreases a stat by 2 + cp BIDE_EFFECT ret c - cp $44 + cp ATTACK_DOWN_SIDE_EFFECT ret nc ld hl, GreatlyFellText ret -GreatlyFellText: ; 3f67e (f:767e) - db $0a +GreatlyFellText: + TX_DELAY TX_FAR _GreatlyFellText - -FellText: ; 3f683 (f:7683) +; fallthrough +FellText: TX_FAR _FellText db "@" -Func_3f688: ; 3f688 (f:7688) +PrintStatText: ld hl, StatsTextStrings - ld c, $50 -.asm_3f68d + ld c, "@" +.findStatName_outer dec b - jr z, .asm_3f696 -.asm_3f690 + jr z, .foundStatName +.findStatName_inner ld a, [hli] cp c - jr z, .asm_3f68d - jr .asm_3f690 -.asm_3f696 + jr z, .findStatName_outer + jr .findStatName_inner +.foundStatName ld de, wcf4b ld bc, $a jp CopyData -StatsTextStrings: ; 3f69f (f:769f) +StatsTextStrings: db "ATTACK@" db "DEFENSE@" db "SPEED@" @@ -7939,7 +7965,7 @@ StatsTextStrings: ; 3f69f (f:769f) db "ACCURACY@" db "EVADE@" -StatModifierRatios: ; 3f6cb (f:76cb) +StatModifierRatios: ; first byte is numerator, second byte is denominator db 25, 100 ; 0.25 db 28, 100 ; 0.28 @@ -7955,14 +7981,14 @@ StatModifierRatios: ; 3f6cb (f:76cb) db 35, 10 ; 3.50 db 4, 1 ; 4.00 -BideEffect: ; 3f6e5 (f:76e5) - ld hl, W_PLAYERBATTSTATUS1 +BideEffect: + ld hl, wPlayerBattleStatus1 ld de, wPlayerBideAccumulatedDamage ld bc, wPlayerNumAttacksLeft ld a, [H_WHOSETURN] and a jr z, .bideEffect - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 ld de, wEnemyBideAccumulatedDamage ld bc, wEnemyNumAttacksLeft .bideEffect @@ -7971,8 +7997,8 @@ BideEffect: ; 3f6e5 (f:76e5) ld [de], a inc de ld [de], a - ld [W_PLAYERMOVEEFFECT], a - ld [W_ENEMYMOVEEFFECT], a + ld [wPlayerMoveEffect], a + ld [wEnemyMoveEffect], a call BattleRandom and $1 inc a @@ -7982,13 +8008,13 @@ BideEffect: ; 3f6e5 (f:76e5) add XSTATITEM_ANIM jp PlayBattleAnimation2 -ThrashPetalDanceEffect: ; 3f717 (f:7717) - ld hl, W_PLAYERBATTSTATUS1 +ThrashPetalDanceEffect: + ld hl, wPlayerBattleStatus1 ld de, wPlayerNumAttacksLeft ld a, [H_WHOSETURN] and a jr z, .thrashPetalDanceEffect - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 ld de, wEnemyNumAttacksLeft .thrashPetalDanceEffect set ThrashingAbout, [hl] ; mon is now using thrash/petal dance @@ -8001,140 +8027,140 @@ ThrashPetalDanceEffect: ; 3f717 (f:7717) add ANIM_B0 jp PlayBattleAnimation2 -SwitchAndTeleportEffect: ; 3f739 (f:7739) +SwitchAndTeleportEffect: ld a, [H_WHOSETURN] and a - jr nz, .asm_3f791 - ld a, [W_ISINBATTLE] + jr nz, .handleEnemy + ld a, [wIsInBattle] dec a - jr nz, .asm_3f77e - ld a, [W_CURENEMYLVL] + jr nz, .notWildBattle1 + ld a, [wCurEnemyLVL] ld b, a ld a, [wBattleMonLevel] - cp b - jr nc, .asm_3f76e + cp b ; is the player's level greater than the enemy's level? + jr nc, .playerMoveWasSuccessful ; if so, teleport will always succeed add b ld c, a - inc c -.asm_3f751 + inc c ; c = sum of player level and enemy level +.rejectionSampleLoop1 call BattleRandom - cp c - jr nc, .asm_3f751 + cp c ; get a random number between 0 and c + jr nc, .rejectionSampleLoop1 srl b - srl b - cp b - jr nc, .asm_3f76e - ld c, $32 + srl b ; b = enemyLevel / 4 + cp b ; is rand[0, playerLevel + enemyLevel) >= (enemyLevel / 4)? + jr nc, .playerMoveWasSuccessful ; if so, allow teleporting + ld c, 50 call DelayFrames - ld a, [W_PLAYERMOVENUM] + ld a, [wPlayerMoveNum] cp TELEPORT jp nz, PrintDidntAffectText jp PrintButItFailedText_ -.asm_3f76e +.playerMoveWasSuccessful call ReadPlayerMonCurHPAndStatus xor a ld [wAnimationType], a inc a ld [wEscapedFromBattle], a - ld a, [W_PLAYERMOVENUM] - jr .asm_3f7e4 -.asm_3f77e - ld c, $32 + ld a, [wPlayerMoveNum] + jr .playAnimAndPrintText +.notWildBattle1 + ld c, 50 call DelayFrames ld hl, IsUnaffectedText - ld a, [W_PLAYERMOVENUM] + ld a, [wPlayerMoveNum] cp TELEPORT jp nz, PrintText jp PrintButItFailedText_ -.asm_3f791 - ld a, [W_ISINBATTLE] +.handleEnemy + ld a, [wIsInBattle] dec a - jr nz, .asm_3f7d1 + jr nz, .notWildBattle2 ld a, [wBattleMonLevel] ld b, a - ld a, [W_CURENEMYLVL] + ld a, [wCurEnemyLVL] cp b - jr nc, .asm_3f7c1 + jr nc, .enemyMoveWasSuccessful add b ld c, a inc c -.asm_3f7a4 +.rejectionSampleLoop2 call BattleRandom cp c - jr nc, .asm_3f7a4 + jr nc, .rejectionSampleLoop2 srl b srl b cp b - jr nc, .asm_3f7c1 - ld c, $32 + jr nc, .enemyMoveWasSuccessful + ld c, 50 call DelayFrames - ld a, [W_ENEMYMOVENUM] + ld a, [wEnemyMoveNum] cp TELEPORT jp nz, PrintDidntAffectText jp PrintButItFailedText_ -.asm_3f7c1 +.enemyMoveWasSuccessful call ReadPlayerMonCurHPAndStatus xor a ld [wAnimationType], a inc a ld [wEscapedFromBattle], a - ld a, [W_ENEMYMOVENUM] - jr .asm_3f7e4 -.asm_3f7d1 - ld c, $32 + ld a, [wEnemyMoveNum] + jr .playAnimAndPrintText +.notWildBattle2 + ld c, 50 call DelayFrames ld hl, IsUnaffectedText - ld a, [W_ENEMYMOVENUM] + ld a, [wEnemyMoveNum] cp TELEPORT jp nz, PrintText jp ConditionalPrintButItFailed -.asm_3f7e4 +.playAnimAndPrintText push af call PlayBattleAnimation - ld c, $14 + ld c, 20 call DelayFrames pop af ld hl, RanFromBattleText cp TELEPORT - jr z, .asm_3f7ff + jr z, .printText ld hl, RanAwayScaredText cp ROAR - jr z, .asm_3f7ff + jr z, .printText ld hl, WasBlownAwayText -.asm_3f7ff +.printText jp PrintText -RanFromBattleText: ; 3f802 (f:7802) +RanFromBattleText: TX_FAR _RanFromBattleText db "@" -RanAwayScaredText: ; 3f807 (f:7807) +RanAwayScaredText: TX_FAR _RanAwayScaredText db "@" -WasBlownAwayText: ; 3f80c (f:780c) +WasBlownAwayText: TX_FAR _WasBlownAwayText db "@" -TwoToFiveAttacksEffect: ; 3f811 (f:7811) - ld hl, W_PLAYERBATTSTATUS1 +TwoToFiveAttacksEffect: + ld hl, wPlayerBattleStatus1 ld de, wPlayerNumAttacksLeft ld bc, wPlayerNumHits ld a, [H_WHOSETURN] and a jr z, .twoToFiveAttacksEffect - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 ld de, wEnemyNumAttacksLeft ld bc, wEnemyNumHits .twoToFiveAttacksEffect bit AttackingMultipleTimes, [hl] ; is mon attacking multiple times? ret nz set AttackingMultipleTimes, [hl] ; mon is now attacking multiple times - ld hl, W_PLAYERMOVEEFFECT + ld hl, wPlayerMoveEffect ld a, [H_WHOSETURN] and a jr z, .setNumberOfHits - ld hl, W_ENEMYMOVEEFFECT + ld hl, wEnemyMoveEffect .setNumberOfHits ld a, [hl] cp TWINEEDLE_EFFECT @@ -8146,10 +8172,11 @@ TwoToFiveAttacksEffect: ; 3f811 (f:7811) call BattleRandom and $3 cp $2 - jr c, .asm_3f851 + jr c, .gotNumHits +; if the number of hits was greater than 2, re-roll again for a lower chance call BattleRandom and $3 -.asm_3f851 +.gotNumHits inc a inc a .saveNumberOfHits @@ -8161,16 +8188,16 @@ TwoToFiveAttacksEffect: ; 3f811 (f:7811) ld [hl], a ; set Twineedle's effect to poison effect jr .saveNumberOfHits -FlinchSideEffect: ; 3f85b (f:785b) +FlinchSideEffect: call CheckTargetSubstitute ret nz - ld hl, W_ENEMYBATTSTATUS1 - ld de, W_PLAYERMOVEEFFECT + ld hl, wEnemyBattleStatus1 + ld de, wPlayerMoveEffect ld a, [H_WHOSETURN] and a jr z, .flinchSideEffect - ld hl, W_PLAYERBATTSTATUS1 - ld de, W_ENEMYMOVEEFFECT + ld hl, wPlayerBattleStatus1 + ld de, wEnemyMoveEffect .flinchSideEffect ld a, [de] cp FLINCH_SIDE_EFFECT1 @@ -8185,20 +8212,18 @@ FlinchSideEffect: ; 3f85b (f:785b) call ClearHyperBeam ret -OneHitKOEffect: ; 3f884 (f:7884) - ld hl, OneHitKOEffect_ - ld b, BANK(OneHitKOEffect_) - jp Bankswitch +OneHitKOEffect: + jpab OneHitKOEffect_ -ChargeEffect: ; 3f88c (f:788c) - ld hl, W_PLAYERBATTSTATUS1 - ld de, W_PLAYERMOVEEFFECT +ChargeEffect: + ld hl, wPlayerBattleStatus1 + ld de, wPlayerMoveEffect ld a, [H_WHOSETURN] and a ld b, XSTATITEM_ANIM jr z, .chargeEffect - ld hl, W_ENEMYBATTSTATUS1 - ld de, W_ENEMYMOVEEFFECT + ld hl, wEnemyBattleStatus1 + ld de, wEnemyMoveEffect ld b, ANIM_AF .chargeEffect set ChargingUp, [hl] @@ -8220,71 +8245,71 @@ ChargeEffect: ; 3f88c (f:788c) ld a, b call PlayBattleAnimation ld a, [de] - ld [wWhichTrade], a + ld [wChargeMoveNum], a ld hl, ChargeMoveEffectText jp PrintText -ChargeMoveEffectText: ; 3f8c8 (f:78c8) +ChargeMoveEffectText: TX_FAR _ChargeMoveEffectText - db $08 ; asm - ld a, [wWhichTrade] + TX_ASM + ld a, [wChargeMoveNum] cp RAZOR_WIND ld hl, MadeWhirlwindText - jr z, .asm_3f8f8 + jr z, .gotText cp SOLARBEAM ld hl, TookInSunlightText - jr z, .asm_3f8f8 + jr z, .gotText cp SKULL_BASH ld hl, LoweredItsHeadText - jr z, .asm_3f8f8 + jr z, .gotText cp SKY_ATTACK ld hl, SkyAttackGlowingText - jr z, .asm_3f8f8 + jr z, .gotText cp FLY ld hl, FlewUpHighText - jr z, .asm_3f8f8 + jr z, .gotText cp DIG ld hl, DugAHoleText -.asm_3f8f8 +.gotText ret -MadeWhirlwindText: ; 3f8f9 (f:78f9) +MadeWhirlwindText: TX_FAR _MadeWhirlwindText db "@" -TookInSunlightText: ; 3f8fe (f:78fe) +TookInSunlightText: TX_FAR _TookInSunlightText db "@" -LoweredItsHeadText: ; 3f903 (f:7903) +LoweredItsHeadText: TX_FAR _LoweredItsHeadText db "@" -SkyAttackGlowingText: ; 3f908 (f:7908) +SkyAttackGlowingText: TX_FAR _SkyAttackGlowingText db "@" -FlewUpHighText: ; 3f90d (f:790d) +FlewUpHighText: TX_FAR _FlewUpHighText db "@" -DugAHoleText: ; 3f912 (f:7912) +DugAHoleText: TX_FAR _DugAHoleText db "@" -TrappingEffect: ; 3f917 (f:7917) - ld hl, W_PLAYERBATTSTATUS1 +TrappingEffect: + ld hl, wPlayerBattleStatus1 ld de, wPlayerNumAttacksLeft ld a, [H_WHOSETURN] and a jr z, .trappingEffect - ld hl, W_ENEMYBATTSTATUS1 + ld hl, wEnemyBattleStatus1 ld de, wEnemyNumAttacksLeft .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 @@ -8297,52 +8322,46 @@ TrappingEffect: ; 3f917 (f:7917) ld [de], a ret -MistEffect: ; 3f941 (f:7941) - ld hl, MistEffect_ - ld b, BANK(MistEffect_) - jp Bankswitch +MistEffect: + jpab MistEffect_ -FocusEnergyEffect: ; 3f949 (f:7949) - ld hl, FocusEnergyEffect_ - ld b, BANK(FocusEnergyEffect_) - jp Bankswitch +FocusEnergyEffect: + jpab FocusEnergyEffect_ -RecoilEffect: ; 3f951 (f:7951) - ld hl, RecoilEffect_ - ld b, BANK(RecoilEffect_) - jp Bankswitch +RecoilEffect: + jpab RecoilEffect_ -ConfusionSideEffect: ; 3f959 (f:7959) +ConfusionSideEffect: call BattleRandom - cp $19 + cp $19 ; ~10% chance ret nc jr ConfusionSideEffectSuccess -ConfusionEffect: ; 3f961 (f:7961) +ConfusionEffect: call CheckTargetSubstitute jr nz, ConfusionEffectFailed call MoveHitTest - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] and a jr nz, ConfusionEffectFailed -ConfusionSideEffectSuccess: ; 3f96f (f:796f) +ConfusionSideEffectSuccess: ld a, [H_WHOSETURN] and a - ld hl, W_ENEMYBATTSTATUS1 - ld bc, W_ENEMYCONFUSEDCOUNTER - ld a, [W_PLAYERMOVEEFFECT] + ld hl, wEnemyBattleStatus1 + ld bc, wEnemyConfusedCounter + ld a, [wPlayerMoveEffect] jr z, .confuseTarget - ld hl, W_PLAYERBATTSTATUS1 - ld bc, W_PLAYERCONFUSEDCOUNTER - ld a, [W_ENEMYMOVEEFFECT] + ld hl, wPlayerBattleStatus1 + ld bc, wPlayerConfusedCounter + ld a, [wEnemyMoveEffect] .confuseTarget bit Confused, [hl] ; is mon confused? jr nz, ConfusionEffectFailed set Confused, [hl] ; mon is now confused push af call BattleRandom - and $3 + and $3 inc a inc a ld [bc], a ; confusion status will last 2-5 turns @@ -8352,80 +8371,76 @@ ConfusionSideEffectSuccess: ; 3f96f (f:796f) ld hl, BecameConfusedText jp PrintText -BecameConfusedText: ; 3f9a1 (f:79a1) +BecameConfusedText: TX_FAR _BecameConfusedText db "@" -ConfusionEffectFailed: ; 3f9a6 (f:79a6) +ConfusionEffectFailed: cp CONFUSION_SIDE_EFFECT ret z - ld c, $32 + ld c, 50 call DelayFrames jp ConditionalPrintButItFailed -ParalyzeEffect: ; 3f9b1 (f:79b1) - ld hl, ParalyzeEffect_ - ld b, BANK(ParalyzeEffect_) - jp Bankswitch +ParalyzeEffect: + jpab ParalyzeEffect_ -SubstituteEffect: ; 3f9b9 (f:79b9) - ld hl, SubstituteEffect_ - ld b, BANK(SubstituteEffect_) - jp Bankswitch +SubstituteEffect: + jpab SubstituteEffect_ -HyperBeamEffect: ; 3f9c1 (f:79c1) - ld hl, W_PLAYERBATTSTATUS2 +HyperBeamEffect: + ld hl, wPlayerBattleStatus2 ld a, [H_WHOSETURN] and a jr z, .hyperBeamEffect - ld hl, W_ENEMYBATTSTATUS2 + ld hl, wEnemyBattleStatus2 .hyperBeamEffect set NeedsToRecharge, [hl] ; mon now needs to recharge ret -ClearHyperBeam: ; 3f9cf (f:79cf) +ClearHyperBeam: push hl - ld hl, W_ENEMYBATTSTATUS2 + ld hl, wEnemyBattleStatus2 ld a, [H_WHOSETURN] and a - jr z, .asm_3f9db - ld hl, W_PLAYERBATTSTATUS2 -.asm_3f9db + jr z, .playerTurn + ld hl, wPlayerBattleStatus2 +.playerTurn res NeedsToRecharge, [hl] ; mon no longer needs to recharge pop hl ret -RageEffect: ; 3f9df (f:79df) - ld hl, W_PLAYERBATTSTATUS2 +RageEffect: + ld hl, wPlayerBattleStatus2 ld a, [H_WHOSETURN] and a jr z, .player - ld hl, W_ENEMYBATTSTATUS2 + ld hl, wEnemyBattleStatus2 .player set UsingRage, [hl] ; mon is now in "rage" mode ret -MimicEffect: ; 3f9ed (f:79ed) - ld c, $32 +MimicEffect: + ld c, 50 call DelayFrames call MoveHitTest - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] and a - jr nz, .asm_3fa74 + jr nz, .mimicMissed ld a, [H_WHOSETURN] and a ld hl, wBattleMonMoves - ld a, [W_PLAYERBATTSTATUS1] - jr nz, .asm_3fa13 + ld a, [wPlayerBattleStatus1] + jr nz, .enemyTurn ld a, [wLinkState] cp LINK_STATE_BATTLING - jr nz, .asm_3fa3a + jr nz, .letPlayerChooseMove ld hl, wEnemyMonMoves - ld a, [W_ENEMYBATTSTATUS1] -.asm_3fa13 + ld a, [wEnemyBattleStatus1] +.enemyTurn bit Invulnerable, a - jr nz, .asm_3fa74 -.asm_3fa17 + jr nz, .mimicMissed +.getRandomMove push hl call BattleRandom and $3 @@ -8435,20 +8450,20 @@ MimicEffect: ; 3f9ed (f:79ed) ld a, [hl] pop hl and a - jr z, .asm_3fa17 + jr z, .getRandomMove ld d, a ld a, [H_WHOSETURN] and a ld hl, wBattleMonMoves ld a, [wPlayerMoveListIndex] - jr z, .asm_3fa5f + jr z, .playerTurn ld hl, wEnemyMonMoves ld a, [wEnemyMoveListIndex] - jr .asm_3fa5f -.asm_3fa3a - ld a, [W_ENEMYBATTSTATUS1] + jr .playerTurn +.letPlayerChooseMove + ld a, [wEnemyBattleStatus1] bit Invulnerable, a - jr nz, .asm_3fa74 + jr nz, .mimicMissed ld a, [wCurrentMenuItem] push af ld a, $1 @@ -8463,7 +8478,7 @@ MimicEffect: ; 3f9ed (f:79ed) ld d, [hl] pop af ld hl, wBattleMonMoves -.asm_3fa5f +.playerTurn ld c, a ld b, $0 add hl, bc @@ -8474,39 +8489,38 @@ MimicEffect: ; 3f9ed (f:79ed) call PlayCurrentMoveAnimation ld hl, MimicLearnedMoveText jp PrintText -.asm_3fa74 +.mimicMissed jp PrintButItFailedText_ -MimicLearnedMoveText: ; 3fa77 (f:7a77) +MimicLearnedMoveText: TX_FAR _MimicLearnedMoveText db "@" -LeechSeedEffect: ; 3fa7c (f:7a7c) - ld hl, LeechSeedEffect_ - ld b, BANK(LeechSeedEffect_) - jp Bankswitch +LeechSeedEffect: + jpab LeechSeedEffect_ -SplashEffect: ; 3fa84 (f:7a84) +SplashEffect: call PlayCurrentMoveAnimation jp PrintNoEffectText -DisableEffect: ; 3fa8a (f:7a8a) +DisableEffect: call MoveHitTest - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] and a - jr nz, .asm_3fb06 - ld de, W_ENEMYDISABLEDMOVE + jr nz, .moveMissed + ld de, wEnemyDisabledMove ld hl, wEnemyMonMoves ld a, [H_WHOSETURN] and a - jr z, .asm_3faa4 - ld de, W_PLAYERDISABLEDMOVE + jr z, .disableEffect + ld de, wPlayerDisabledMove ld hl, wBattleMonMoves -.asm_3faa4 +.disableEffect +; no effect if target already has a move disabled ld a, [de] and a - jr nz, .asm_3fb06 -.asm_3faa8 + jr nz, .moveMissed +.pickMoveToDisable push hl call BattleRandom and $3 @@ -8516,20 +8530,21 @@ DisableEffect: ; 3fa8a (f:7a8a) ld a, [hl] pop hl and a - jr z, .asm_3faa8 - ld [wd11e], a + jr z, .pickMoveToDisable ; loop until a non-00 move slot is found + ld [wd11e], a ; store move number push hl ld a, [H_WHOSETURN] and a ld hl, wBattleMonPP - jr nz, .asm_3facf + jr nz, .enemyTurn ld a, [wLinkState] cp LINK_STATE_BATTLING - pop hl - jr nz, .asm_3fae1 + pop hl ; wEnemyMonMoves + jr nz, .playerTurnNotLinkBattle +; .playerTurnLinkBattle push hl ld hl, wEnemyMonPP -.asm_3facf +.enemyTurn push hl ld a, [hli] or [hl] @@ -8538,144 +8553,133 @@ DisableEffect: ; 3fa8a (f:7a8a) inc hl or [hl] and $3f - pop hl - jr z, .asm_3fb05 + pop hl ; wBattleMonPP or wEnemyMonPP + jr z, .moveMissedPopHL ; nothing to do if all moves have no PP left add hl, bc ld a, [hl] pop hl and a - jr z, .asm_3faa8 -.asm_3fae1 + jr z, .pickMoveToDisable ; pick another move if this one had 0 PP +.playerTurnNotLinkBattle +; non-link battle enemies have unlimited PP so the previous checks aren't needed call BattleRandom and $7 - inc a - inc c + inc a ; 1-8 turns disabled + inc c ; move 1-4 will be disabled swap c - add c + add c ; map disabled move to high nibble of wEnemyDisabledMove / wPlayerDisabledMove ld [de], a call PlayCurrentMoveAnimation2 - ld hl, wccee + ld hl, wPlayerDisabledMoveNumber ld a, [H_WHOSETURN] and a - jr nz, .asm_3faf8 - inc hl -.asm_3faf8 - ld a, [wd11e] + jr nz, .printDisableText + inc hl ; wEnemyDisabledMoveNumber +.printDisableText + ld a, [wd11e] ; move number ld [hl], a call GetMoveName ld hl, MoveWasDisabledText jp PrintText -.asm_3fb05 +.moveMissedPopHL pop hl -.asm_3fb06 +.moveMissed jp PrintButItFailedText_ -MoveWasDisabledText: ; 3fb09 (f:7b09) +MoveWasDisabledText: TX_FAR _MoveWasDisabledText db "@" -PayDayEffect: ; 3fb0e (f:7b0e) - ld hl, PayDayEffect_ - ld b, BANK(PayDayEffect_) - jp Bankswitch - -ConversionEffect: ; 3fb16 (f:7b16) - ld hl, ConversionEffect_ - ld b, BANK(ConversionEffect_) - jp Bankswitch - -HazeEffect: ; 3fb1e (f:7b1e) - ld hl, HazeEffect_ - ld b, BANK(HazeEffect_) - jp Bankswitch - -HealEffect: ; 3fb26 (f:7b26) - ld hl, HealEffect_ - ld b, BANK(HealEffect_) - jp Bankswitch - -TransformEffect: ; 3fb2e (f:7b2e) - ld hl, TransformEffect_ - ld b, BANK(TransformEffect_) - jp Bankswitch - -ReflectLightScreenEffect: ; 3fb36 (f:7b36) - ld hl, ReflectLightScreenEffect_ - ld b, BANK(ReflectLightScreenEffect_) - jp Bankswitch - -NothingHappenedText: ; 3fb3e (f:7b3e) +PayDayEffect: + jpab PayDayEffect_ + +ConversionEffect: + jpab ConversionEffect_ + +HazeEffect: + jpab HazeEffect_ + +HealEffect: + jpab HealEffect_ + +TransformEffect: + jpab TransformEffect_ + +ReflectLightScreenEffect: + jpab ReflectLightScreenEffect_ + +NothingHappenedText: TX_FAR _NothingHappenedText db "@" -PrintNoEffectText: ; 3fb43 (f:7b43) +PrintNoEffectText: ld hl, NoEffectText jp PrintText -NoEffectText: ; 3fb49 (f:7b49) +NoEffectText: TX_FAR _NoEffectText db "@" -ConditionalPrintButItFailed: ; 3fb4e (f:7b4e) +ConditionalPrintButItFailed: ld a, [wMoveDidntMiss] and a ret nz ; return if the side effect failed, yet the attack was successful -PrintButItFailedText_: ; 3fb53 (f:7b53) +PrintButItFailedText_: ld hl, ButItFailedText jp PrintText -ButItFailedText: ; 3fb59 (f:7b59) +ButItFailedText: TX_FAR _ButItFailedText db "@" -PrintDidntAffectText: ; 3fb5e (f:7b5e) +PrintDidntAffectText: ld hl, DidntAffectText jp PrintText -DidntAffectText: ; 3fb64 (f:7b64) +DidntAffectText: TX_FAR _DidntAffectText db "@" -IsUnaffectedText: ; 3fb69 (f:7b69) +IsUnaffectedText: TX_FAR _IsUnaffectedText db "@" -PrintMayNotAttackText: ; 3fb6e (f:7b6e) +PrintMayNotAttackText: ld hl, ParalyzedMayNotAttackText jp PrintText -ParalyzedMayNotAttackText: ; 3fb74 (f:7b74) +ParalyzedMayNotAttackText: TX_FAR _ParalyzedMayNotAttackText db "@" -CheckTargetSubstitute: ; 3fb79 (f:7b79) +CheckTargetSubstitute: push hl - ld hl, W_ENEMYBATTSTATUS2 - ld a, [H_WHOSETURN] + ld hl, wEnemyBattleStatus2 + ld a, [H_WHOSETURN] and a jr z, .next1 - ld hl, W_PLAYERBATTSTATUS2 + ld hl, wPlayerBattleStatus2 .next1 - bit HasSubstituteUp, [hl] + bit HasSubstituteUp, [hl] pop hl ret -PlayCurrentMoveAnimation2: ; 3fb89 (f:7b89) +PlayCurrentMoveAnimation2: ; animation at MOVENUM will be played unless MOVENUM is 0 ; plays wAnimationType 3 or 6 ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVENUM] + ld a, [wPlayerMoveNum] jr z, .notEnemyTurn - ld a, [W_ENEMYMOVENUM] + ld a, [wEnemyMoveNum] .notEnemyTurn and a ret z -PlayBattleAnimation2: ; 3fb96 (f:7b96) +PlayBattleAnimation2: ; play animation ID at a and animation type 6 or 3 - ld [W_ANIMATIONID], a + ld [wAnimationID], a ld a, [H_WHOSETURN] and a ld a, $6 @@ -8685,26 +8689,26 @@ PlayBattleAnimation2: ; 3fb96 (f:7b96) ld [wAnimationType], a jp PlayBattleAnimationGotID -PlayCurrentMoveAnimation: ; 3fba8 (f:7ba8) +PlayCurrentMoveAnimation: ; animation at MOVENUM will be played unless MOVENUM is 0 ; resets wAnimationType xor a ld [wAnimationType], a ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVENUM] + ld a, [wPlayerMoveNum] jr z, .notEnemyTurn - ld a, [W_ENEMYMOVENUM] + ld a, [wEnemyMoveNum] .notEnemyTurn and a ret z -PlayBattleAnimation: ; 3fbb9 (f:7bb9) +PlayBattleAnimation: ; play animation ID at a and predefined animation type - ld [W_ANIMATIONID], a + ld [wAnimationID], a -PlayBattleAnimationGotID: ; 3fbbc (f:7bbc) -; play animation at W_ANIMATIONID +PlayBattleAnimationGotID: +; play animation at wAnimationID push hl push de push bc diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm index ecf5040b..e23a85ba 100644 --- a/engine/battle/decrement_pp.asm +++ b/engine/battle/decrement_pp.asm @@ -1,23 +1,23 @@ -DecrementPP: ; 68000 (1a:4000) +DecrementPP: ; after using a move, decrement pp in battle and (if not transformed?) in party ld a, [de] cp a, STRUGGLE ret z ; if the pokemon is using "struggle", there's nothing to do ; we don't decrement PP for "struggle" - ld hl, W_PLAYERBATTSTATUS1 - ld a, [hli] ; load the W_PLAYERBATTSTATUS1 pokemon status flags and increment hl to load the - ; W_PLAYERBATTSTATUS2 status flags later + ld hl, wPlayerBattleStatus1 + ld a, [hli] ; load the wPlayerBattleStatus1 pokemon status flags and increment hl to load the + ; wPlayerBattleStatus2 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, [wPlayerBattleStatus3] 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,9 +31,9 @@ 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 +.DecrementPP: ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use? ld c, a ld b, 0 diff --git a/engine/battle/display_effectiveness.asm b/engine/battle/display_effectiveness.asm index 17f0bd5b..85f2bc3e 100644 --- a/engine/battle/display_effectiveness.asm +++ b/engine/battle/display_effectiveness.asm @@ -1,4 +1,4 @@ -DisplayEffectiveness: ; 2fb7b (b:7b7b) +DisplayEffectiveness: ld a, [wDamageMultipliers] and a, $7F cp a, $0A @@ -9,10 +9,10 @@ DisplayEffectiveness: ; 2fb7b (b:7b7b) .done jp PrintText -SuperEffectiveText: ; 2fb8e (b:7b8e) +SuperEffectiveText: TX_FAR _SuperEffectiveText db "@" -NotVeryEffectiveText: ; 2fb93 (b:7b93) +NotVeryEffectiveText: TX_FAR _NotVeryEffectiveText db "@" diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm index fce3701c..f44d64f5 100644 --- a/engine/battle/draw_hud_pokeball_gfx.asm +++ b/engine/battle/draw_hud_pokeball_gfx.asm @@ -1,50 +1,50 @@ -DrawAllPokeballs: ; 3a849 (e:6849) +DrawAllPokeballs: call LoadPartyPokeballGfx call SetupOwnPartyPokeballs - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [wIsInBattle] dec a ret z ; return if wild pokémon jp SetupEnemyPartyPokeballs -DrawEnemyPokeballs: ; 0x3a857 +DrawEnemyPokeballs: call LoadPartyPokeballGfx jp SetupEnemyPartyPokeballs -LoadPartyPokeballGfx: ; 3a85d (e:685d) - ld de, PokeballTileGraphics ; $697e +LoadPartyPokeballGfx: + ld de, PokeballTileGraphics ld hl, vSprites + $310 - ld bc, (BANK(PokeballTileGraphics) << 8) + $04 + lb bc, BANK(PokeballTileGraphics), (PokeballTileGraphicsEnd - PokeballTileGraphics) / $10 jp CopyVideoData -SetupOwnPartyPokeballs: ; 3a869 (e:6869) +SetupOwnPartyPokeballs: call PlacePlayerHUDTiles ld hl, wPartyMon1 - ld de, wPartyCount ; wPartyCount + ld de, wPartyCount call SetupPokeballs ld a, $60 - ld hl, W_BASECOORDX ; wd081 + ld hl, wBaseCoordX ld [hli], a ld [hl], a - ld a, $8 - ld [wTrainerEngageDistance], a + ld a, 8 + ld [wHUDPokeballGfxOffsetX], a ld hl, wOAMBuffer jp WritePokeballOAMData -SetupEnemyPartyPokeballs: ; 3a887 (e:6887) +SetupEnemyPartyPokeballs: call PlaceEnemyHUDTiles ld hl, wEnemyMons - ld de, wEnemyPartyCount ; wEnemyPartyCount + ld de, wEnemyPartyCount call SetupPokeballs - ld hl, W_BASECOORDX ; wd081 + ld hl, wBaseCoordX ld a, $48 ld [hli], a ld [hl], $20 - ld a, $f8 - ld [wTrainerEngageDistance], a + ld a, -8 + ld [wHUDPokeballGfxOffsetX], a ld hl, wOAMBuffer + PARTY_LENGTH * 4 jp WritePokeballOAMData -SetupPokeballs: ; 0x3a8a6 +SetupPokeballs: ld a, [de] push af ld de, wBuffer @@ -66,7 +66,7 @@ SetupPokeballs: ; 0x3a8a6 jr nz, .monloop ret -PickPokeball: ; 3a8c2 (e:68c2) +PickPokeball: inc hl ld a, [hli] and a @@ -90,96 +90,96 @@ PickPokeball: ; 3a8c2 (e:68c2) .done ld a, b ld [de], a - ld bc, $0028 ; rest of mon struct - add hl, bc + ld bc, wPartyMon2 - wPartyMon1Status + add hl, bc ; next mon struct ret -WritePokeballOAMData: ; 3a8e1 (e:68e1) +WritePokeballOAMData: ld de, wBuffer ld c, PARTY_LENGTH .loop - ld a, [W_BASECOORDY] ; wd082 + ld a, [wBaseCoordY] ld [hli], a - ld a, [W_BASECOORDX] ; wd081 + ld a, [wBaseCoordX] ld [hli], a ld a, [de] ld [hli], a xor a ld [hli], a - ld a, [W_BASECOORDX] ; wd081 + ld a, [wBaseCoordX] ld b, a - ld a, [wTrainerEngageDistance] + ld a, [wHUDPokeballGfxOffsetX] add b - ld [W_BASECOORDX], a ; wd081 + ld [wBaseCoordX], a inc de dec c jr nz, .loop ret -PlacePlayerHUDTiles: ; 3a902 (e:6902) - ld hl, PlayerBattleHUDGraphicsTiles ; $6916 - ld de, wTrainerFacingDirection +PlacePlayerHUDTiles: + ld hl, PlayerBattleHUDGraphicsTiles + ld de, wHUDGraphicsTiles ld bc, $3 call CopyData - hlCoord 18, 10 - ld de, rIE ; $ffff + coord hl, 18, 10 + ld de, -1 jr PlaceHUDTiles -PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916) +PlayerBattleHUDGraphicsTiles: ; The tile numbers for specific parts of the battle display for the player's pokemon db $73 ; unused ($73 is hardcoded into the routine that uses these bytes) db $77 ; lower-right corner tile of the HUD db $6F ; lower-left triangle tile of the HUD -PlaceEnemyHUDTiles: ; 3a919 (e:6919) - ld hl, EnemyBattleHUDGraphicsTiles ; $692d - ld de, wTrainerFacingDirection +PlaceEnemyHUDTiles: + ld hl, EnemyBattleHUDGraphicsTiles + ld de, wHUDGraphicsTiles ld bc, $3 call CopyData - hlCoord 1, 2 + coord hl, 1, 2 ld de, $1 jr PlaceHUDTiles -EnemyBattleHUDGraphicsTiles: ; 3a92d (e:692d) +EnemyBattleHUDGraphicsTiles: ; The tile numbers for specific parts of the battle display for the enemy db $73 ; unused ($73 is hardcoded in the routine that uses these bytes) db $74 ; lower-left corner tile of the HUD db $78 ; lower-right triangle tile of the HUD -PlaceHUDTiles: ; 3a930 (e:6930) +PlaceHUDTiles: ld [hl], $73 - ld bc, $14 + ld bc, SCREEN_WIDTH add hl, bc - ld a, [wTrainerScreenY] + ld a, [wHUDGraphicsTiles + 1] ; leftmost tile ld [hl], a - ld a, $8 -.asm_3a93c + ld a, 8 +.loop add hl, de ld [hl], $76 dec a - jr nz, .asm_3a93c + jr nz, .loop add hl, de - ld a, [wTrainerScreenX] + ld a, [wHUDGraphicsTiles + 2] ; rightmost tile ld [hl], a ret -SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948) +SetupPlayerAndEnemyPokeballs: 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, wBaseCoordX ld a, $50 ld [hli], a ld [hl], $40 - ld a, $8 - ld [wTrainerEngageDistance], a + ld a, 8 + ld [wHUDPokeballGfxOffsetX], 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, wBaseCoordX ld a, $50 ld [hli], a ld [hl], $68 @@ -187,5 +187,6 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948) jp WritePokeballOAMData ; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (faited) and pokeball slot (no mon) -PokeballTileGraphics:: ; 3a97e (e:697e) +PokeballTileGraphics:: INCBIN "gfx/pokeball.2bpp" +PokeballTileGraphicsEnd: diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm index f03dd07f..c77e3b39 100644..100755 --- a/engine/battle/end_of_battle.asm +++ b/engine/battle/end_of_battle.asm @@ -1,4 +1,4 @@ -EndOfBattle: ; 137aa (4:77aa) +EndOfBattle: ld a, [wLinkState] cp LINK_STATE_BATTLING jr nz, .notLinkBattle @@ -19,9 +19,9 @@ EndOfBattle: ; 137aa (4:77aa) jr z, .placeWinOrLoseString ld de, DrawText .placeWinOrLoseString - hlCoord 6, 8 + coord hl, 6, 8 call PlaceString - ld c, $c8 + ld c, 200 call DelayFrames jr .evolution .notLinkBattle @@ -41,20 +41,20 @@ EndOfBattle: ; 137aa (4:77aa) call PrintText .evolution xor a - ld [wccd4], a + ld [wForceEvolution], a predef EvolutionAfterBattle .resetVariables xor a ld [wLowHealthAlarm], a ;disable low health alarm - ld [wc02a], a - ld [W_ISINBATTLE], a - ld [W_BATTLETYPE], a - ld [W_MOVEMISSED], a - ld [W_CUROPPONENT], a - ld [wd11f], a + ld [wChannelSoundIDs + Ch4], a + ld [wIsInBattle], a + ld [wBattleType], a + ld [wMoveMissed], a + ld [wCurOpponent], a + ld [wForcePlayerToChooseMon], a ld [wNumRunAttempts], a ld [wEscapedFromBattle], a - ld hl, wcc2b + ld hl, wPartyAndBillsPCSavedMenuItem ld [hli], a ld [hli], a ld [hli], a @@ -74,15 +74,15 @@ EndOfBattle: ; 137aa (4:77aa) ld [wDestinationWarpID], a ret -YouWinText: ; 13853 (4:7853) +YouWinText: db "YOU WIN@" -YouLoseText: ; 1385b (4:785b) +YouLoseText: db "YOU LOSE@" -DrawText: ; 13864 (4:7864) +DrawText: db " DRAW@" -PickUpPayDayMoneyText: ; 1386b (4:786b) +PickUpPayDayMoneyText: 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..24748338 100644 --- a/engine/battle/experience.asm +++ b/engine/battle/experience.asm @@ -1,4 +1,4 @@ -GainExperience: ; 5524f (15:524f) +GainExperience: ld a, [wLinkState] cp LINK_STATE_BATTLING ret z ; return if link battle @@ -15,7 +15,7 @@ GainExperience: ; 5524f (15:524f) ld hl, wPartyGainExpFlags ld a, [wWhichPokemon] ld c, a - ld b, $2 + ld b, FLAG_TEST predef FlagActionPredef ld a, c and a ; is mon's gain exp flag set? @@ -26,7 +26,7 @@ GainExperience: ; 5524f (15:524f) ld d, h ld e, l ld hl, wEnemyMonBaseStats - ld c, $5 + ld c, NUM_STATS .gainStatExpLoop ld a, [hli] ld b, a ; enemy mon base stat @@ -49,11 +49,11 @@ GainExperience: ; 5524f (15:524f) ld [de], a .nextBaseStat dec c - jr z, .asm_552a1 + jr z, .statExpDone inc de inc de jr .gainStatExpLoop -.asm_552a1 +.statExpDone xor a ld [H_MULTIPLICAND], a ld [H_MULTIPLICAND + 1], a @@ -66,7 +66,7 @@ GainExperience: ; 5524f (15:524f) ld [H_DIVISOR], a ld b, 4 call Divide - ld hl, -((wPartyMon1HPExp + 1) - wPartyMon1OTID + 4 * 2) + ld hl, wPartyMon1OTID - (wPartyMon1DVs - 1) add hl, de ld b, [hl] ; party mon OTID inc hl @@ -76,14 +76,14 @@ GainExperience: ; 5524f (15:524f) ld b, [hl] ld a, [wPlayerID + 1] cp b - ld a, $0 + ld a, 0 jr z, .next .tradedMon call BoostExp ; traded mon exp boost - ld a, $1 + ld a, 1 .next ld [wGainBoostedExp], a - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a ; is it a trainer battle? call nz, BoostExp ; if so, boost exp inc hl @@ -92,12 +92,12 @@ GainExperience: ; 5524f (15:524f) ; add the gained exp to the party mon's exp ld b, [hl] ld a, [H_QUOTIENT + 3] - ld [wcf4c], a + ld [wExpAmountGained + 1], a add b ld [hld], a ld b, [hl] ld a, [H_QUOTIENT + 2] - ld [wcf4b], a + ld [wExpAmountGained], a adc b ld [hl], a jr nc, .noCarry @@ -119,11 +119,11 @@ GainExperience: ; 5524f (15:524f) ld d, MAX_LEVEL callab CalcExperience ; get max exp ; compare max exp with current exp - ld a, [$ff96] + ld a, [hExperience] ld b, a - ld a, [$ff97] + ld a, [hExperience + 1] ld c, a - ld a, [$ff98] + ld a, [hExperience + 2] ld d, a pop hl ld a, [hld] @@ -148,8 +148,8 @@ GainExperience: ; 5524f (15:524f) call GetPartyMonName ld hl, GainedText call PrintText - xor a ; party mon data - ld [wcc49], a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation], a call LoadMonData pop hl ld bc, wPartyMon1Level - wPartyMon1Exp @@ -160,11 +160,11 @@ GainExperience: ; 5524f (15:524f) ld a, [hl] ; current level cp d jp z, .nextMon ; if level didn't change, go to next mon - ld a, [W_CURENEMYLVL] + ld a, [wCurEnemyLVL] push af push hl ld a, d - ld [W_CURENEMYLVL], a + ld [wCurEnemyLVL], a ld [hl], a ld bc, wPartyMon1Species - wPartyMon1Level add hl, bc @@ -220,19 +220,19 @@ GainExperience: ; 5524f (15:524f) add hl, bc push hl ld de, wBattleMonLevel - ld bc, $b ; size of stats + ld bc, 1 + NUM_STATS * 2 ; size of stats call CopyData pop hl - ld a, [W_PLAYERBATTSTATUS3] + ld a, [wPlayerBattleStatus3] bit 3, a ; is the mon transformed? jr nz, .recalcStatChanges ; the mon is not transformed, so update the unmodified stats ld de, wPlayerMonUnmodifiedLevel - ld bc, $b + ld bc, 1 + NUM_STATS * 2 call CopyData .recalcStatChanges - xor a - ld [wd11e], a + xor a ; battle mon + ld [wCalculateWhoseStats], a callab CalculateModifiedStats callab ApplyBurnAndParalysisPenaltiesToPlayer callab ApplyBadgeStatBoosts @@ -242,26 +242,26 @@ GainExperience: ; 5524f (15:524f) .printGrewLevelText ld hl, GrewLevelText call PrintText - xor a ; party mon data - ld [wcc49], a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation], a call LoadMonData ld d, $1 callab PrintStatsBox call WaitForTextScrollButtonPress call LoadScreenTilesFromBuffer1 - xor a - ld [wcc49], a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation], a ld a, [wd0b5] ld [wd11e], a predef LearnMoveFromLevelUp - ld hl, wccd3 + ld hl, wCanEvolveFlags ld a, [wWhichPokemon] ld c, a - ld b, $1 + ld b, FLAG_SET predef FlagActionPredef pop hl pop af - ld [W_CURENEMYLVL], a + ld [wCurEnemyLVL], a .nextMon ld a, [wPartyCount] @@ -281,7 +281,7 @@ GainExperience: ; 5524f (15:524f) ld [hl], a ; clear gain exp flags ld a, [wPlayerMonNumber] ld c, a - ld b, $1 + ld b, FLAG_SET push bc predef FlagActionPredef ; set the gain exp flag for the mon that is currently out ld hl, wPartyFoughtCurrentEnemyFlags @@ -291,7 +291,7 @@ GainExperience: ; 5524f (15:524f) predef_jump FlagActionPredef ; set the fought current enemy flag for the mon that is currently out ; divide enemy base stats, catch rate, and base exp by the number of mons gaining exp -DivideExpDataByNumMonsGainingExp: ; 5546c (15:546c) +DivideExpDataByNumMonsGainingExp: ld a, [wPartyGainExpFlags] ld b, a xor a @@ -308,7 +308,7 @@ DivideExpDataByNumMonsGainingExp: ; 5546c (15:546c) ret c ; return if only one mon is gaining exp ld [wd11e], a ; store number of mons gaining exp ld hl, wEnemyMonBaseStats - ld c, $7 + ld c, wEnemyMonBaseExp + 1 - wEnemyMonBaseStats .divideLoop xor a ld [H_DIVIDEND], a @@ -325,7 +325,7 @@ DivideExpDataByNumMonsGainingExp: ; 5546c (15:546c) ret ; multiplies exp by 1.5 -BoostExp: ; 5549f (15:549f) +BoostExp: ld a, [H_QUOTIENT + 2] ld b, a ld a, [H_QUOTIENT + 3] @@ -339,9 +339,9 @@ BoostExp: ; 5549f (15:549f) ld [H_QUOTIENT + 2], a ret -GainedText: ; 554b2 (15:54b2) +GainedText: TX_FAR _GainedText - db $08 ; asm + TX_ASM ld a, [wBoostExpByExpAll] ld hl, WithExpAllText and a @@ -353,20 +353,20 @@ GainedText: ; 554b2 (15:54b2) ld hl, BoostedText ret -WithExpAllText: ; 554cb (15:54cb) +WithExpAllText: TX_FAR _WithExpAllText - db $08 ; asm + TX_ASM ld hl, ExpPointsText ret -BoostedText: ; 554d4 (15:54d4) +BoostedText: TX_FAR _BoostedText -ExpPointsText: ; 554d8 (15:54d8) +ExpPointsText: TX_FAR _ExpPointsText db "@" -GrewLevelText: ; 554dd (15:54dd) +GrewLevelText: TX_FAR _GrewLevelText - db $0b + TX_SFX_LEVEL_UP db "@" diff --git a/engine/battle/get_trainer_name.asm b/engine/battle/get_trainer_name.asm index 961f25cf..36ca019e 100644 --- a/engine/battle/get_trainer_name.asm +++ b/engine/battle/get_trainer_name.asm @@ -1,16 +1,16 @@ -GetTrainerName_: ; 13a58 (4:7a58) - ld hl, W_GRASSRATE +GetTrainerName_: + ld hl, wGrassRate ld a, [wLinkState] and a - jr nz, .rival - ld hl, W_RIVALNAME - ld a, [W_TRAINERCLASS] + jr nz, .foundName + ld hl, wRivalName + ld a, [wTrainerClass] cp SONY1 - jr z, .rival + jr z, .foundName cp SONY2 - jr z, .rival + jr z, .foundName cp SONY3 - jr z, .rival + jr z, .foundName ld [wd0b5], a ld a, TRAINER_NAME ld [wNameListType], a @@ -18,7 +18,7 @@ GetTrainerName_: ; 13a58 (4:7a58) ld [wPredefBank], a call GetName ld hl, wcd6d -.rival - ld de, W_TRAINERNAME +.foundName + ld de, wTrainerName ld bc, $d jp CopyData diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm index 73d3bcc2..7adb20d8 100644 --- a/engine/battle/ghost_marowak_anim.asm +++ b/engine/battle/ghost_marowak_anim.asm @@ -1,21 +1,21 @@ -MarowakAnim: ; 708ca (1c:48ca) +MarowakAnim: ; animate the ghost being unveiled as a Marowak ld a, $e4 ld [rOBP1], a call CopyMonPicFromBGToSpriteVRAM ; cover the BG ghost pic with a sprite ghost pic that looks the same ; now that the ghost pic is being displayed using sprites, clear the ghost pic from the BG tilemap - hlCoord 12, 0 - ld bc, $707 + coord hl, 12, 0 + lb bc, 7, 7 call ClearScreenArea call Delay3 xor a ld [H_AUTOBGTRANSFERENABLED], a ; disable BG transfer so we don't see the Marowak too soon ; replace ghost pic with Marowak in BG ld a, MAROWAK - ld [wHPBarMaxHP], a + ld [wChangeMonPicEnemyTurnSpecies], a ld a, $1 ld [H_WHOSETURN], a - callab Func_79793 + callab ChangeMonPic ; alternate between black and light grey 8 times. ; this makes the ghost's body appear to flash ld d, $80 @@ -49,28 +49,28 @@ MarowakAnim: ; 708ca (1c:48ca) jp ClearSprites ; copies a mon pic's from background VRAM to sprite VRAM and sets up OAM -CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a) +CopyMonPicFromBGToSpriteVRAM: ld de, vFrontPic ld hl, vSprites ld bc, 7 * 7 call CopyVideoData ld a, $10 - ld [W_BASECOORDY], a + ld [wBaseCoordY], a ld a, $70 - ld [W_BASECOORDX], a + ld [wBaseCoordX], a ld hl, wOAMBuffer - ld bc, $606 + lb bc, 6, 6 ld d, $8 .oamLoop push bc - ld a, [W_BASECOORDY] + ld a, [wBaseCoordY] ld e, a .oamInnerLoop ld a, e add $8 ld e, a ld [hli], a - ld a, [W_BASECOORDX] + ld a, [wBaseCoordX] ld [hli], a ld a, d ld [hli], a @@ -80,9 +80,9 @@ CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a) dec c jr nz, .oamInnerLoop inc d - ld a, [W_BASECOORDX] + ld a, [wBaseCoordX] add $8 - ld [W_BASECOORDX], a + ld [wBaseCoordX], a pop bc dec b jr nz, .oamLoop diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm index 457cc4e1..bdd5d8f4 100644 --- a/engine/battle/init_battle_variables.asm +++ b/engine/battle/init_battle_variables.asm @@ -1,10 +1,10 @@ -InitBattleVariables: ; 525af (14:65af) +InitBattleVariables: ld a, [hTilesetType] - ld [wd0d4], a + ld [wSavedTilesetType], a xor a - ld [wcd6a], a + ld [wActionResultOrTookBattleTurn], a ld [wBattleResult], a - ld hl, wcc2b + ld hl, wPartyAndBillsPCSavedMenuItem ld [hli], a ld [hli], a ld [hli], a @@ -13,28 +13,26 @@ 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 - ld [hli], a - ld [hl], a - ld hl, wccd3 + ld hl, wPlayerHPBarColor + ld [hli], a ; wPlayerHPBarColor + ld [hl], a ; wEnemyHPBarColor + ld hl, wCanEvolveFlags ld b, $3c .loop ld [hli], a dec b jr nz, .loop - inc a - ld [wccd9], a - ld a, [W_CURMAP] + inc a ; POUND + ld [wTestBattlePlayerSelectedMove], a + ld a, [wCurMap] cp SAFARI_ZONE_EAST jr c, .notSafariBattle cp SAFARI_ZONE_REST_HOUSE_1 jr nc, .notSafariBattle - ld a, $2 ; safari battle - ld [W_BATTLETYPE], a + ld a, BATTLE_TYPE_SAFARI + ld [wBattleType], a .notSafariBattle - ld hl, PlayBattleMusic - ld b, BANK(PlayBattleMusic) - jp Bankswitch + jpab PlayBattleMusic diff --git a/engine/battle/link_battle_versus_text.asm b/engine/battle/link_battle_versus_text.asm index 7320da29..76559117 100644 --- a/engine/battle/link_battle_versus_text.asm +++ b/engine/battle/link_battle_versus_text.asm @@ -1,18 +1,18 @@ ; display "[player] VS [enemy]" text box with pokeballs representing their parties next to the names -DisplayLinkBattleVersusTextBox: ; 372d6 (d:72d6) +DisplayLinkBattleVersusTextBox: call LoadTextBoxTilePatterns - hlCoord 3, 4 - ld b, $7 - ld c, $c + coord hl, 3, 4 + ld b, 7 + ld c, 12 call TextBoxBorder - hlCoord 4, 5 + coord hl, 4, 5 ld de, wPlayerName call PlaceString - hlCoord 4, 10 + coord hl, 4, 10 ld de, wLinkEnemyTrainerName call PlaceString ; place bold "VS" tiles between the names - hlCoord 9, 8 + coord hl, 9, 8 ld a, $69 ld [hli], a ld [hl], $6a diff --git a/engine/battle/moveEffects/conversion_effect.asm b/engine/battle/moveEffects/conversion_effect.asm index 511df2fd..9c347876 100644 --- a/engine/battle/moveEffects/conversion_effect.asm +++ b/engine/battle/moveEffects/conversion_effect.asm @@ -1,18 +1,19 @@ -ConversionEffect_: ; 139a3 (4:79a3) +ConversionEffect_: ld hl, wEnemyMonType1 ld de, wBattleMonType1 ld a, [H_WHOSETURN] and a - ld a, [W_ENEMYBATTSTATUS1] - jr z, .asm_139b8 + ld a, [wEnemyBattleStatus1] + jr z, .conversionEffect push hl ld h, d ld l, e pop de - ld a, [W_PLAYERBATTSTATUS1] -.asm_139b8 + ld a, [wPlayerBattleStatus1] +.conversionEffect bit Invulnerable, a ; is mon immune to typical attacks (dig/fly) jr nz, PrintButItFailedText +; copy target's types to user ld a, [hli] ld [de], a inc de @@ -23,12 +24,12 @@ ConversionEffect_: ; 139a3 (4:79a3) ld hl, ConvertedTypeText jp PrintText -ConvertedTypeText: ; 139cd (4:79cd) +ConvertedTypeText: TX_FAR _ConvertedTypeText db "@" -PrintButItFailedText: ; 139d2 (4:79d2) +PrintButItFailedText: ld hl, PrintButItFailedText_ -CallBankF: ; 139d5 (4:79d5) +CallBankF: ld b, BANK(PrintButItFailedText_) jp Bankswitch diff --git a/engine/battle/moveEffects/drain_hp_effect.asm b/engine/battle/moveEffects/drain_hp_effect.asm index 517d53d1..e5f4681a 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 +DrainHPEffect_: + ld hl, wDamage 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 @@ -36,12 +36,12 @@ DrainHPEffect_: ; 783f (1:783f) dec bc ld [bc], a ; add damage to attacker's HP and copy new HP to wHPBarNewHP - ld a, [W_DAMAGE + 1] + ld a, [wDamage + 1] ld b, [hl] add b ld [hld], a ld [wHPBarNewHP], a - ld a, [W_DAMAGE] + ld a, [wDamage] ld b, [hl] adc b ld [hli], a @@ -71,10 +71,10 @@ DrainHPEffect_: ; 783f (1:783f) .next ld a, [H_WHOSETURN] and a - hlCoord 10, 9 + coord hl, 10, 9 ld a, $1 jr z, .next2 - hlCoord 2, 2 + coord hl, 2, 2 xor a .next2 ld [wHPBarType], a @@ -85,9 +85,9 @@ DrainHPEffect_: ; 783f (1:783f) ld hl, SuckedHealthText ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVEEFFECT] + ld a, [wPlayerMoveEffect] jr z, .next3 - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] .next3 cp DREAM_EATER_EFFECT jr nz, .printText @@ -95,10 +95,10 @@ DrainHPEffect_: ; 783f (1:783f) .printText jp PrintText -SuckedHealthText: ; 78dc (1:78dc) +SuckedHealthText: TX_FAR _SuckedHealthText db "@" -DreamWasEatenText: ; 78e1 (1:78e1) +DreamWasEatenText: TX_FAR _DreamWasEatenText db "@" diff --git a/engine/battle/moveEffects/focus_energy_effect.asm b/engine/battle/moveEffects/focus_energy_effect.asm index f01e61cc..69301d8e 100644 --- a/engine/battle/moveEffects/focus_energy_effect.asm +++ b/engine/battle/moveEffects/focus_energy_effect.asm @@ -1,9 +1,9 @@ -FocusEnergyEffect_: ; 27f86 (9:7f86) - ld hl, W_PLAYERBATTSTATUS2 +FocusEnergyEffect_: + ld hl, wPlayerBattleStatus2 ld a, [H_WHOSETURN] and a jr z, .notEnemy - ld hl, W_ENEMYBATTSTATUS2 + ld hl, wEnemyBattleStatus2 .notEnemy bit GettingPumped, [hl] ; is mon already using focus energy? jr nz, .alreadyUsing @@ -12,13 +12,11 @@ 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_) - jp Bankswitch + jpab PrintButItFailedText_ -GettingPumpedText: ; 27fb3 (9:7fb3) - db $0a +GettingPumpedText: + TX_DELAY TX_FAR _GettingPumpedText db "@" diff --git a/engine/battle/moveEffects/haze_effect.asm b/engine/battle/moveEffects/haze_effect.asm index 2343e784..06907bcc 100644 --- a/engine/battle/moveEffects/haze_effect.asm +++ b/engine/battle/moveEffects/haze_effect.asm @@ -1,59 +1,64 @@ -HazeEffect_: ; 139da (4:79da) +HazeEffect_: ld a, $7 +; store 7 on every stat mod ld hl, wPlayerMonAttackMod call ResetStatMods ld hl, wEnemyMonAttackMod call ResetStatMods +; copy unmodified stats to battle stats ld hl, wPlayerMonUnmodifiedAttack ld de, wBattleMonAttack call ResetStats ld hl, wEnemyMonUnmodifiedAttack ld de, wEnemyMonAttack call ResetStats +; cure non-volatile status, but only for the target ld hl, wEnemyMonStatus ld de, wEnemySelectedMove ld a, [H_WHOSETURN] and a - jr z, .asm_13a09 + jr z, .cureStatuses ld hl, wBattleMonStatus - dec de + dec de ; wPlayerSelectedMove -.asm_13a09 +.cureStatuses ld a, [hl] ld [hl], $0 - and $27 - jr z, .asm_13a13 + and SLP | (1 << FRZ) + jr z, .cureVolatileStatuses +; prevent the Pokemon from executing a move if it was asleep or frozen ld a, $ff ld [de], a -.asm_13a13 +.cureVolatileStatuses xor a - ld [W_PLAYERDISABLEDMOVE], a - ld [W_ENEMYDISABLEDMOVE], a - ld hl, wccee + ld [wPlayerDisabledMove], a + ld [wEnemyDisabledMove], a + ld hl, wPlayerDisabledMoveNumber ld [hli], a ld [hl], a - ld hl, W_PLAYERBATTSTATUS1 - call CureStatuses - ld hl, W_ENEMYBATTSTATUS1 - call CureStatuses + ld hl, wPlayerBattleStatus1 + call CureVolatileStatuses + ld hl, wEnemyBattleStatus1 + call CureVolatileStatuses ld hl, PlayCurrentMoveAnimation call CallBankF ld hl, StatusChangesEliminatedText jp PrintText -CureStatuses: ; 13a37 (4:7a37) +CureVolatileStatuses: res Confused, [hl] inc hl ; BATTSTATUS2 ld a, [hl] - and (1 << UsingRage) | (1 << NeedsToRecharge) | (1 << HasSubstituteUp) | (1 << 3) ; clear all but these from BATTSTATUS2 + ; clear UsingXAccuracy, ProtectedByMist, GettingPumped, and Seeded statuses + 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 ld [hl], a ret -ResetStatMods: ; 13a43 (4:7a43) +ResetStatMods: ld b, $8 .loop ld [hli], a @@ -61,7 +66,7 @@ ResetStatMods: ; 13a43 (4:7a43) jr nz, .loop ret -ResetStats: ; 13a4a (4:7a4a) +ResetStats: ld b, $8 .loop ld a, [hli] @@ -71,6 +76,6 @@ ResetStats: ; 13a4a (4:7a4a) jr nz, .loop ret -StatusChangesEliminatedText: ; 13a53 (4:7a53) +StatusChangesEliminatedText: TX_FAR _StatusChangesEliminatedText db "@" diff --git a/engine/battle/moveEffects/heal_effect.asm b/engine/battle/moveEffects/heal_effect.asm index 22d482e7..b7d8283f 100644 --- a/engine/battle/moveEffects/heal_effect.asm +++ b/engine/battle/moveEffects/heal_effect.asm @@ -1,25 +1,26 @@ -HealEffect_: ; 3b9ec (e:79ec) +HealEffect_: ld a, [H_WHOSETURN] and a ld de, wBattleMonHP ld hl, wBattleMonMaxHP - ld a, [W_PLAYERMOVENUM] - jr z, .asm_3ba03 + ld a, [wPlayerMoveNum] + jr z, .healEffect ld de, wEnemyMonHP ld hl, wEnemyMonMaxHP - ld a, [W_ENEMYMOVENUM] -.asm_3ba03 + ld a, [wEnemyMoveNum] +.healEffect ld b, a ld a, [de] - cp [hl] + cp [hl] ; most significant bytes comparison is ignored + ; causes the move to miss if max HP is 255 or 511 points higher than the current HP inc de inc hl ld a, [de] sbc [hl] - jp z, .failed + jp z, .failed ; no effect if user's HP is already at its maximum ld a, b cp REST - jr nz, .asm_3ba37 + jr nz, .healHP push hl push de push af @@ -28,31 +29,33 @@ HealEffect_: ; 3b9ec (e:79ec) ld hl, wBattleMonStatus ld a, [H_WHOSETURN] and a - jr z, .asm_3ba25 + jr z, .restEffect ld hl, wEnemyMonStatus -.asm_3ba25 +.restEffect ld a, [hl] and a - ld [hl], 2 ; Number of turns from Rest - ld hl, StartedSleepingEffect - jr z, .asm_3ba31 - ld hl, FellAsleepBecameHealthyText -.asm_3ba31 + ld [hl], 2 ; clear status and set number of turns asleep to 2 + ld hl, StartedSleepingEffect ; if mon didn't have an status + jr z, .printRestText + ld hl, FellAsleepBecameHealthyText ; if mon had an status +.printRestText call PrintText pop af pop de pop hl -.asm_3ba37 +.healHP ld a, [hld] ld [wHPBarMaxHP], a ld c, a ld a, [hl] ld [wHPBarMaxHP+1], a ld b, a - jr z, .asm_3ba47 + jr z, .gotHPAmountToHeal +; Recover and Softboiled only heal for half the mon's max HP srl b rr c -.asm_3ba47 +.gotHPAmountToHeal +; update HP ld a, [de] ld [wHPBarOldHP], a add c @@ -72,7 +75,8 @@ HealEffect_: ; 3b9ec (e:79ec) dec hl ld a, [de] sbc [hl] - jr c, .asm_3ba6f + jr c, .playAnim +; copy max HP to current HP if an overflow ocurred ld a, [hli] ld [de], a ld [wHPBarNewHP+1], a @@ -80,17 +84,17 @@ HealEffect_: ; 3b9ec (e:79ec) ld a, [hl] ld [de], a ld [wHPBarNewHP], a -.asm_3ba6f +.playAnim ld hl, PlayCurrentMoveAnimation call BankswitchEtoF ld a, [H_WHOSETURN] and a - hlCoord 10, 9 + coord hl, 10, 9 ld a, $1 - jr z, .asm_3ba83 - hlCoord 2, 2 + jr z, .updateHPBar + coord hl, 2, 2 xor a -.asm_3ba83 +.updateHPBar ld [wHPBarType], a predef UpdateHPBar2 ld hl, DrawHUDsAndHPBars @@ -103,14 +107,14 @@ HealEffect_: ; 3b9ec (e:79ec) ld hl, PrintButItFailedText_ jp BankswitchEtoF -StartedSleepingEffect: ; 3baa2 (e:7aa2) +StartedSleepingEffect: TX_FAR _StartedSleepingEffect db "@" -FellAsleepBecameHealthyText: ; 3baa7 (e:7aa7) +FellAsleepBecameHealthyText: TX_FAR _FellAsleepBecameHealthyText db "@" -RegainedHealthText: ; 3baac (e:7aac) +RegainedHealthText: TX_FAR _RegainedHealthText db "@" diff --git a/engine/battle/moveEffects/leech_seed_effect.asm b/engine/battle/moveEffects/leech_seed_effect.asm index a257d143..0f3a2666 100644 --- a/engine/battle/moveEffects/leech_seed_effect.asm +++ b/engine/battle/moveEffects/leech_seed_effect.asm @@ -1,39 +1,40 @@ -LeechSeedEffect_: ; 2bea9 (a:7ea9) +LeechSeedEffect_: callab MoveHitTest - ld a, [W_MOVEMISSED] ; W_MOVEMISSED + ld a, [wMoveMissed] and a - jr nz, .asm_2bee7 - ld hl, W_ENEMYBATTSTATUS2 ; W_ENEMYBATTSTATUS2 - ld de, wEnemyMonType1 ; wcfea (aliases: wEnemyMonType) - ld a, [H_WHOSETURN] ; $fff3 + jr nz, .moveMissed + ld hl, wEnemyBattleStatus2 + ld de, wEnemyMonType1 + ld a, [H_WHOSETURN] and a - jr z, .asm_2bec8 - ld hl, W_PLAYERBATTSTATUS2 ; W_PLAYERBATTSTATUS2 - ld de, wBattleMonType1 ; wd019 (aliases: wBattleMonType) -.asm_2bec8 + jr z, .leechSeedEffect + ld hl, wPlayerBattleStatus2 + ld de, wBattleMonType1 +.leechSeedEffect +; miss if the target is grass-type or already seeded ld a, [de] cp GRASS - jr z, .asm_2bee7 + jr z, .moveMissed inc de ld a, [de] cp GRASS - jr z, .asm_2bee7 + jr z, .moveMissed bit Seeded, [hl] - jr nz, .asm_2bee7 + jr nz, .moveMissed set Seeded, [hl] callab PlayCurrentMoveAnimation - ld hl, WasSeededText ; $7ef2 + ld hl, WasSeededText jp PrintText -.asm_2bee7 - ld c, $32 +.moveMissed + ld c, 50 call DelayFrames - ld hl, EvadedAttackText ; $7ef7 + ld hl, EvadedAttackText jp PrintText -WasSeededText: ; 2bef2 (a:7ef2) +WasSeededText: TX_FAR _WasSeededText db "@" -EvadedAttackText: ; 2bef7 (a:7ef7) +EvadedAttackText: TX_FAR _EvadedAttackText db "@" diff --git a/engine/battle/moveEffects/mist_effect.asm b/engine/battle/moveEffects/mist_effect.asm index adee1dfd..b92777de 100644 --- a/engine/battle/moveEffects/mist_effect.asm +++ b/engine/battle/moveEffects/mist_effect.asm @@ -1,21 +1,19 @@ -MistEffect_: ; 33f2b (c:7f2b) - ld hl, W_PLAYERBATTSTATUS2 - ld a, [$fff3] +MistEffect_: + ld hl, wPlayerBattleStatus2 + ld a, [H_WHOSETURN] and a - jr z, .asm_33f36 - ld hl, W_ENEMYBATTSTATUS2 -.asm_33f36 + jr z, .mistEffect + ld hl, wEnemyBattleStatus2 +.mistEffect bit ProtectedByMist, [hl] ; is mon protected by mist? - jr nz, .asm_33f4a + jr nz, .mistAlreadyInUse set ProtectedByMist, [hl] ; mon is now protected by mist callab PlayCurrentMoveAnimation ld hl, ShroudedInMistText jp PrintText -.asm_33f4a - ld hl, PrintButItFailedText_ - ld b, BANK(PrintButItFailedText_) - jp Bankswitch +.mistAlreadyInUse + jpab PrintButItFailedText_ -ShroudedInMistText: ; 33f52 (c:7f52) +ShroudedInMistText: TX_FAR _ShroudedInMistText db "@" diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm index 84418e33..827e2197 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 +OneHitKOEffect_: + ld hl, wDamage xor a ld [hli], a ld [hl], a ; set the damage output to zero @@ -7,12 +7,13 @@ OneHitKOEffect_: ; 33f57 (c:7f57) ld [wCriticalHitOrOHKO], a ld hl, wBattleMonSpeed + 1 ld de, wEnemyMonSpeed + 1 - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - jr z, .asm_33f72 + jr z, .compareSpeed ld hl, wEnemyMonSpeed + 1 ld de, wBattleMonSpeed + 1 -.asm_33f72 +.compareSpeed +; set damage to 65535 and OHKO flag is the user's current speed is higher than the target's ld a, [de] dec de ld b, a @@ -22,15 +23,16 @@ OneHitKOEffect_: ; 33f57 (c:7f57) ld b, a ld a, [hl] sbc b - jr c, .asm_33f8a - ld hl, W_DAMAGE + jr c, .userIsSlower + ld hl, wDamage ld a, $ff ld [hli], a ld [hl], a ld a, $2 ld [wCriticalHitOrOHKO], a ret -.asm_33f8a +.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 [wMoveMissed], a ret diff --git a/engine/battle/moveEffects/paralyze_effect.asm b/engine/battle/moveEffects/paralyze_effect.asm index 69acbb01..95979ae6 100644 --- a/engine/battle/moveEffects/paralyze_effect.asm +++ b/engine/battle/moveEffects/paralyze_effect.asm @@ -1,11 +1,11 @@ -ParalyzeEffect_: ; 52601 (14:6601) +ParalyzeEffect_: ld hl, wEnemyMonStatus - ld de, W_PLAYERMOVETYPE + ld de, wPlayerMoveType ld a, [H_WHOSETURN] and a jp z, .next - ld hl, wBattleMonStatus - ld de, W_ENEMYMOVETYPE + ld hl, wBattleMonStatus + ld de, wEnemyMoveType .next ld a, [hl] and a ; does the target already have a status ailment? @@ -28,7 +28,7 @@ ParalyzeEffect_: ; 52601 (14:6601) push hl callab MoveHitTest pop hl - ld a, [W_MOVEMISSED] + ld a, [wMoveMissed] and a jr nz, .didntAffect set PAR, [hl] @@ -36,18 +36,12 @@ ParalyzeEffect_: ; 52601 (14:6601) ld c, 30 call DelayFrames callab PlayCurrentMoveAnimation - ld hl, PrintMayNotAttackText - ld b, BANK(PrintMayNotAttackText) - jp Bankswitch + jpab PrintMayNotAttackText .didntAffect ld c, 50 call DelayFrames - ld hl, PrintDidntAffectText - ld b, BANK(PrintDidntAffectText) - jp Bankswitch + jpab PrintDidntAffectText .doesntAffect ld c, 50 call DelayFrames - ld hl, PrintDoesntAffectText - ld b, BANK(PrintDoesntAffectText) - jp Bankswitch + jpab PrintDoesntAffectText diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm index 75a005ed..e5daf014 100644 --- a/engine/battle/moveEffects/pay_day_effect.asm +++ b/engine/battle/moveEffects/pay_day_effect.asm @@ -1,20 +1,22 @@ -PayDayEffect_ ; 2feb8 (b:7eb8) +PayDayEffect_: xor a ld hl, wcd6d ld [hli], a ld a, [H_WHOSETURN] and a ld a, [wBattleMonLevel] - jr z, .asm_2fec8 + jr z, .payDayEffect ld a, [wEnemyMonLevel] -.asm_2fec8 +.payDayEffect +; level * 2 add a ld [H_DIVIDEND + 3], a xor a ld [H_DIVIDEND], a ld [H_DIVIDEND + 1], a ld [H_DIVIDEND + 2], a - ld a, $64 +; convert to BCD + ld a, 100 ld [H_DIVISOR], a ld b, $4 call Divide @@ -22,7 +24,7 @@ PayDayEffect_ ; 2feb8 (b:7eb8) ld [hli], a ld a, [H_REMAINDER] ld [H_DIVIDEND + 3], a - ld a, $a + ld a, 10 ld [H_DIVISOR], a ld b, $4 call Divide @@ -38,6 +40,6 @@ PayDayEffect_ ; 2feb8 (b:7eb8) ld hl, CoinsScatteredText jp PrintText -CoinsScatteredText: ; 2ff04 (b:7f04) +CoinsScatteredText: TX_FAR _CoinsScatteredText db "@" diff --git a/engine/battle/moveEffects/recoil_effect.asm b/engine/battle/moveEffects/recoil_effect.asm index 0460b208..7fc90c44 100644 --- a/engine/battle/moveEffects/recoil_effect.asm +++ b/engine/battle/moveEffects/recoil_effect.asm @@ -1,36 +1,37 @@ -RecoilEffect_: ; 1392c (4:792c) +RecoilEffect_: ld a, [H_WHOSETURN] and a - ld a, [W_PLAYERMOVENUM] + ld a, [wPlayerMoveNum] ld hl, wBattleMonMaxHP - jr z, .asm_1393d - ld a, [W_ENEMYMOVENUM] + jr z, .recoilEffect + ld a, [wEnemyMoveNum] ld hl, wEnemyMonMaxHP -.asm_1393d +.recoilEffect ld d, a - ld a, [W_DAMAGE] + ld a, [wDamage] ld b, a - ld a, [W_DAMAGE + 1] + ld a, [wDamage + 1] ld c, a srl b rr c ld a, d - cp STRUGGLE - jr z, .asm_13953 + cp STRUGGLE ; struggle deals 50% recoil damage + jr z, .gotRecoilDamage srl b rr c -.asm_13953 +.gotRecoilDamage ld a, b or c - jr nz, .asm_13958 - inc c -.asm_13958 + jr nz, .updateHP + inc c ; minimum recoil damage is 1 +.updateHP +; substract HP from user due to the recoil damage ld a, [hli] ld [wHPBarMaxHP+1], a ld a, [hl] ld [wHPBarMaxHP], a push bc - ld bc, $fff2 + ld bc, wBattleMonHP - wBattleMonMaxHP add hl, bc pop bc ld a, [hl] @@ -43,26 +44,27 @@ RecoilEffect_: ; 1392c (4:792c) sbc b ld [hl], a ld [wHPBarNewHP+1], a - jr nc, .asm_13982 + jr nc, .getHPBarCoords +; if recoil damage is higher than the Pokemon's HP, set its HP to 0 xor a ld [hli], a ld [hl], a ld hl, wHPBarNewHP ld [hli], a ld [hl], a -.asm_13982 - hlCoord 10, 9 +.getHPBarCoords + coord hl, 10, 9 ld a, [H_WHOSETURN] and a ld a, $1 - jr z, .asm_13990 - hlCoord 2, 2 + jr z, .updateHPBar + coord hl, 2, 2 xor a -.asm_13990 +.updateHPBar ld [wHPBarType], a predef UpdateHPBar2 ld hl, HitWithRecoilText jp PrintText -HitWithRecoilText: ; 1399e (4:799e) +HitWithRecoilText: TX_FAR _HitWithRecoilText db "@" diff --git a/engine/battle/moveEffects/reflect_light_screen_effect.asm b/engine/battle/moveEffects/reflect_light_screen_effect.asm index 39a2c154..b45fbe20 100644 --- a/engine/battle/moveEffects/reflect_light_screen_effect.asm +++ b/engine/battle/moveEffects/reflect_light_screen_effect.asm @@ -1,12 +1,12 @@ -ReflectLightScreenEffect_: ; 3bb97 (e:7b97) - ld hl, W_PLAYERBATTSTATUS3 - ld de, W_PLAYERMOVEEFFECT +ReflectLightScreenEffect_: + ld hl, wPlayerBattleStatus3 + ld de, wPlayerMoveEffect ld a, [H_WHOSETURN] and a - jr z, .asm_3bba8 - ld hl, W_ENEMYBATTSTATUS3 - ld de, W_ENEMYMOVEEFFECT -.asm_3bba8 + jr z, .reflectLightScreenEffect + ld hl, wEnemyBattleStatus3 + ld de, wEnemyMoveEffect +.reflectLightScreenEffect ld a, [de] cp LIGHT_SCREEN_EFFECT jr nz, .reflect @@ -14,32 +14,32 @@ ReflectLightScreenEffect_: ; 3bb97 (e:7b97) jr nz, .moveFailed set HasLightScreenUp, [hl] ; mon is now protected by light screen ld hl, LightScreenProtectedText - jr .asm_3bbc1 + jr .playAnim .reflect bit HasReflectUp, [hl] ; is mon already protected by reflect? jr nz, .moveFailed set HasReflectUp, [hl] ; mon is now protected by reflect ld hl, ReflectGainedArmorText -.asm_3bbc1 +.playAnim push hl ld hl, PlayCurrentMoveAnimation call BankswitchEtoF pop hl jp PrintText .moveFailed - ld c, $32 + ld c, 50 call DelayFrames ld hl, PrintButItFailedText_ jp BankswitchEtoF -LightScreenProtectedText: ; 3bbd7 (e:7bd7) +LightScreenProtectedText: TX_FAR _LightScreenProtectedText db "@" -ReflectGainedArmorText: ; 3bbdc (e:7bdc) +ReflectGainedArmorText: TX_FAR _ReflectGainedArmorText db "@" -BankswitchEtoF: ; 3bbe1 (e:7be1) +BankswitchEtoF: ld b, BANK(BattleCore) jp Bankswitch diff --git a/engine/battle/moveEffects/substitute_effect.asm b/engine/battle/moveEffects/substitute_effect.asm index e88def4a..03314ebf 100644 --- a/engine/battle/moveEffects/substitute_effect.asm +++ b/engine/battle/moveEffects/substitute_effect.asm @@ -1,61 +1,61 @@ -SubstituteEffect_: ; 17dad (5:7dad) +SubstituteEffect_: ld c, 50 call DelayFrames ld hl, wBattleMonMaxHP ld de, wPlayerSubstituteHP - ld bc, W_PLAYERBATTSTATUS2 + ld bc, wPlayerBattleStatus2 ld a, [H_WHOSETURN] and a jr z, .notEnemy ld hl, wEnemyMonMaxHP ld de, wEnemySubstituteHP - ld bc, W_ENEMYBATTSTATUS2 + ld bc, wEnemyBattleStatus2 .notEnemy - ld a, [bc] ;load flags - bit HasSubstituteUp, a ;user already has substitute? - jr nz, .alreadyHasSubstitute ;skip this code if so - ;user doesn't have a substitute [yet] + ld a, [bc] + bit HasSubstituteUp, a ; user already has substitute? + jr nz, .alreadyHasSubstitute +; quarter health to remove from user +; assumes max HP is 1023 or lower push bc - ld a, [hli] ;load max hp + ld a, [hli] ld b, [hl] - srl a ;max hp / 4, [quarter health to remove from user] - rr b srl a rr b + srl a + rr b ; max hp / 4 push de ld de, wBattleMonHP - wBattleMonMaxHP - add hl, de ; point hl to current HP + add hl, de ; point hl to current HP low byte pop de ld a, b - ld [de], a ;save copy of HP to subtract in ccd7/ccd8 [how much HP substitute has] - ld a, [hld] ;load current hp - sub b ;subtract [max hp / 4] - ld d, a ;save low byte result in D + ld [de], a ; save copy of HP to subtract in ccd7/ccd8 [how much HP substitute has] + ld a, [hld] +; subtract [max hp / 4] to current HP + sub b + ld d, a ld a, [hl] - sbc a, 0 ;borrow from high byte if needed + sbc 0 pop bc - jr c, .notEnoughHP ;underflow means user would be left with negative health - ;bug: note since it only brances on carry, it will possibly leave user with 0HP + 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 ;store high byte HP - ld [hl], d ;store low byte HP + ldi [hl], a ; save resulting HP after substraction into current HP + ld [hl], d ld h, b ld l, c - set HasSubstituteUp, [hl] ;set bit 4 of flags, user now has substitute - ld a, [W_OPTIONS] ;load options - bit 7, a ;battle animation is enabled? - ld hl, PlayCurrentMoveAnimation ;animation enabled: 0F:7BA8 + set HasSubstituteUp, [hl] + ld a, [wOptions] + bit 7, a ; battle animation is enabled? + ld hl, PlayCurrentMoveAnimation ld b, BANK(PlayCurrentMoveAnimation) jr z, .animationEnabled - ld hl, AnimationSubstitute ;animation disabled: 1E:56E0 + ld hl, AnimationSubstitute ld b, BANK(AnimationSubstitute) .animationEnabled - call Bankswitch ;jump to routine depending on animation setting + call Bankswitch ; jump to routine depending on animation setting ld hl, SubstituteText call PrintText - ld hl, DrawHUDsAndHPBars - ld b, BANK(DrawHUDsAndHPBars) - jp Bankswitch + jpab DrawHUDsAndHPBars .alreadyHasSubstitute ld hl, HasSubstituteText jr .printText @@ -64,14 +64,14 @@ SubstituteEffect_: ; 17dad (5:7dad) .printText jp PrintText -SubstituteText: ; 17e1d (5:7e1d) +SubstituteText: TX_FAR _SubstituteText db "@" -HasSubstituteText: ; 17e22 (5:7e22) +HasSubstituteText: TX_FAR _HasSubstituteText db "@" -TooWeakSubstituteText: ; 17e27 (5:7e27) +TooWeakSubstituteText: TX_FAR _TooWeakSubstituteText db "@" diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm index 6e25712a..45f8c910 100644 --- a/engine/battle/moveEffects/transform_effect.asm +++ b/engine/battle/moveEffects/transform_effect.asm @@ -1,55 +1,59 @@ -TransformEffect_: ; 3bab1 (e:7ab1) +TransformEffect_: ld hl, wBattleMonSpecies ld de, wEnemyMonSpecies - ld bc, W_ENEMYBATTSTATUS3 - ld a, [W_ENEMYBATTSTATUS1] + ld bc, wEnemyBattleStatus3 + ld a, [wEnemyBattleStatus1] ld a, [H_WHOSETURN] and a - jr nz, .asm_3bad1 + jr nz, .hitTest ld hl, wEnemyMonSpecies ld de, wBattleMonSpecies - ld bc, W_PLAYERBATTSTATUS3 + ld bc, wPlayerBattleStatus3 ld [wPlayerMoveListIndex], a - ld a, [W_PLAYERBATTSTATUS1] -.asm_3bad1 + ld a, [wPlayerBattleStatus1] +.hitTest bit Invulnerable, a ; is mon invulnerable to typical attacks? (fly/dig) jp nz, .failed push hl push de push bc - ld hl, W_PLAYERBATTSTATUS2 + ld hl, wPlayerBattleStatus2 ld a, [H_WHOSETURN] and a - jr z, .asm_3bae4 - ld hl, W_ENEMYBATTSTATUS2 -.asm_3bae4 + jr z, .transformEffect + ld hl, wEnemyBattleStatus2 +.transformEffect +; animation(s) played are different if target has Substitute up bit HasSubstituteUp, [hl] push af - ld hl, Func_79747 - ld b, BANK(Func_79747) + ld hl, HideSubstituteShowMonAnim + ld b, BANK(HideSubstituteShowMonAnim) call nz, Bankswitch - ld a, [W_OPTIONS] + ld a, [wOptions] add a ld hl, PlayCurrentMoveAnimation ld b, BANK(PlayCurrentMoveAnimation) - jr nc, .asm_3baff + jr nc, .gotAnimToPlay ld hl, AnimationTransformMon ld b, BANK(AnimationTransformMon) -.asm_3baff +.gotAnimToPlay call Bankswitch - ld hl, Func_79771 - ld b, BANK(Func_79771) + ld hl, ReshowSubstituteAnim + ld b, BANK(ReshowSubstituteAnim) pop af call nz, Bankswitch pop bc ld a, [bc] - set Transformed, a + set Transformed, a ; mon is now Transformed ld [bc], a pop de pop hl push hl +; transform user into opposing Pokemon +; species ld a, [hl] ld [de], a +; type 1, type 2, catch rate, and moves ld bc, $5 add hl, bc inc de @@ -62,20 +66,23 @@ TransformEffect_: ; 3bab1 (e:7ab1) call CopyData ld a, [H_WHOSETURN] and a - jr z, .asm_3bb32 + jr z, .next +; save enemy mon DVs at wTransformedEnemyMonOriginalDVs ld a, [de] - ld [wcceb], a + ld [wTransformedEnemyMonOriginalDVs], a inc de ld a, [de] - ld [wccec], a + ld [wTransformedEnemyMonOriginalDVs + 1], a dec de -.asm_3bb32 +.next +; DVs ld a, [hli] ld [de], a inc de ld a, [hli] ld [de], a inc de +; Attack, Defense, Speed, and Special stats inc hl inc hl inc hl @@ -84,48 +91,51 @@ TransformEffect_: ; 3bab1 (e:7ab1) inc de ld bc, $8 call CopyData - ld bc, $ffef - add hl, bc - ld b, $4 -.asm_3bb4a + ld bc, wBattleMonMoves - wBattleMonPP + add hl, bc ; ld hl, wBattleMonMoves + ld b, NUM_MOVES +.copyPPLoop +; 5 PP for all moves ld a, [hli] and a - jr z, .asm_3bb57 + jr z, .lessThanFourMoves ld a, $5 ld [de], a inc de dec b - jr nz, .asm_3bb4a - jr .asm_3bb5d -.asm_3bb57 + jr nz, .copyPPLoop + jr .copyStats +.lessThanFourMoves +; 0 PP for blank moves xor a ld [de], a inc de dec b - jr nz, .asm_3bb57 -.asm_3bb5d + jr nz, .lessThanFourMoves +.copyStats +; original (unmodified) stats and stat mods pop hl ld a, [hl] ld [wd11e], a call GetMonName ld hl, wEnemyMonUnmodifiedAttack ld de, wPlayerMonUnmodifiedAttack - call .copyBasedOnTurn + call .copyBasedOnTurn ; original (unmodified) stats ld hl, wEnemyMonStatMods ld de, wPlayerMonStatMods - call .copyBasedOnTurn + call .copyBasedOnTurn ; stat mods ld hl, TransformedText jp PrintText .copyBasedOnTurn ld a, [H_WHOSETURN] and a - jr z, .asm_3bb86 + jr z, .gotStatsOrModsToCopy push hl ld h, d ld l, e pop de -.asm_3bb86 +.gotStatsOrModsToCopy ld bc, $8 jp CopyData @@ -133,6 +143,6 @@ TransformEffect_: ; 3bab1 (e:7ab1) ld hl, PrintButItFailedText_ jp BankswitchEtoF -TransformedText: ; 3bb92 (e:7b92) +TransformedText: TX_FAR _TransformedText db "@" diff --git a/engine/battle/print_type.asm b/engine/battle/print_type.asm index 38c701a8..f717f871 100644 --- a/engine/battle/print_type.asm +++ b/engine/battle/print_type.asm @@ -1,16 +1,16 @@ ; [wd0b5] = pokemon ID ; hl = dest addr -PrintMonType: ; 27d6b (9:7d6b) +PrintMonType: call GetPredefRegisters push hl call GetMonHeader pop hl push hl - ld a, [W_MONHTYPE1] + ld a, [wMonHType1] call PrintType - ld a, [W_MONHTYPE1] + ld a, [wMonHType1] ld b, a - ld a, [W_MONHTYPE2] + ld a, [wMonHType2] cp b pop hl jr z, EraseType2Text @@ -19,25 +19,25 @@ PrintMonType: ; 27d6b (9:7d6b) ; a = type ; hl = dest addr -PrintType: ; 27d89 (9:7d89) +PrintType: push hl jr PrintType_ ; erase "TYPE2/" if the mon only has 1 type -EraseType2Text: ; 27d8c (9:7d8c) +EraseType2Text: ld a, " " ld bc, $13 add hl, bc ld bc, $6 jp FillMemory -PrintMoveType: ; 27d98 (9:7d98) +PrintMoveType: call GetPredefRegisters push hl - ld a, [W_PLAYERMOVETYPE] + ld a, [wPlayerMoveType] ; fall through -PrintType_: ; 27d9f (9:7d9f) +PrintType_: add a ld hl, TypeNames ld e, a diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index f1e3aaf1..3672d8dc 100644..100755 --- a/engine/battle/read_trainer_party.asm +++ b/engine/battle/read_trainer_party.asm @@ -1,4 +1,4 @@ -ReadTrainer: ; 39c53 (e:5c53) +ReadTrainer: ; don't change any moves in a link battle ld a,[wLinkState] @@ -15,7 +15,7 @@ ReadTrainer: ; 39c53 (e:5c53) ld [hl],a ; get the pointer to trainer data for this class - ld a,[W_CUROPPONENT] + ld a,[wCurOpponent] sub $C9 ; convert value from pokemon to trainer add a,a ld hl,TrainerDataPointers @@ -25,7 +25,7 @@ ReadTrainer: ; 39c53 (e:5c53) ld a,[hli] ld h,[hl] ld l,a - ld a,[W_TRAINERNO] + ld a,[wTrainerNo] ld b,a ; At this point b contains the trainer number, ; and hl points to the trainer class. @@ -43,20 +43,20 @@ ReadTrainer: ; 39c53 (e:5c53) ; if the first byte of trainer data is FF, ; - each pokemon has a specific level ; (as opposed to the whole team being of the same level) -; - if [W_LONEATTACKNO] != 0, one pokemon on the team has a special move +; - if [wLoneAttackNo] != 0, one pokemon on the team has a special move ; else the first byte is the level of every pokemon on the team .IterateTrainer ld a,[hli] cp $FF ; is the trainer special? jr z,.SpecialTrainer ; if so, check for special moves - ld [W_CURENEMYLVL],a + ld [wCurEnemyLVL],a .LoopTrainerData ld a,[hli] and a ; have we reached the end of the trainer data? jr z,.FinishUp ld [wcf91],a ; write species somewhere (XXX why?) - ld a,1 - ld [wcc49],a + ld a,ENEMY_PARTY_DATA + ld [wMonDataLocation],a push hl call AddPartyMon pop hl @@ -65,22 +65,22 @@ ReadTrainer: ; 39c53 (e:5c53) ; if this code is being run: ; - each pokemon has a specific level ; (as opposed to the whole team being of the same level) -; - if [W_LONEATTACKNO] != 0, one pokemon on the team has a special move +; - if [wLoneAttackNo] != 0, one pokemon on the team has a special move ld a,[hli] and a ; have we reached the end of the trainer data? jr z,.AddLoneMove - ld [W_CURENEMYLVL],a + ld [wCurEnemyLVL],a ld a,[hli] ld [wcf91],a - ld a,1 - ld [wcc49],a + ld a,ENEMY_PARTY_DATA + ld [wMonDataLocation],a push hl call AddPartyMon pop hl jr .SpecialTrainer .AddLoneMove ; does the trainer have a single monster with a different move - ld a,[W_LONEATTACKNO] ; Brock is 01, Misty is 02, Erika is 04, etc + ld a,[wLoneAttackNo] ; Brock is 01, Misty is 02, Erika is 04, etc and a jr z,.AddTeamMove dec a @@ -100,8 +100,8 @@ ReadTrainer: ; 39c53 (e:5c53) ; check if our trainer's team has special moves ; get trainer class number - ld a,[W_CUROPPONENT] - sub $C8 + ld a,[wCurOpponent] + sub 200 ld b,a ld hl,TeamMoves @@ -130,7 +130,7 @@ ReadTrainer: ; 39c53 (e:5c53) ld [wEnemyMon1Moves + 2],a ; starter - ld a,[W_RIVALSTARTER] + ld a,[wRivalStarter] cp STARTER3 ld b,MEGA_DRAIN jr z,.GiveStarterMove @@ -141,24 +141,26 @@ ReadTrainer: ; 39c53 (e:5c53) .GiveStarterMove ld a,b ld [wEnemyMon6Moves + 2],a -.FinishUp ; XXX this needs documenting - xor a ; clear D079-D07B - ld de,wd079 +.FinishUp +; clear wAmountMoneyWon addresses + xor a + ld de,wAmountMoneyWon ld [de],a inc de ld [de],a inc de ld [de],a - ld a,[W_CURENEMYLVL] + ld a,[wCurEnemyLVL] ld b,a .LastLoop - ld hl,wd047 - ld c,2 +; update wAmountMoneyWon addresses (money to win) based on enemy's level + ld hl,wTrainerBaseMoney + 1 + ld c,2 ; wAmountMoneyWon is a 3-byte number push bc predef AddBCDPredef pop bc inc de inc de dec b - jr nz,.LastLoop - ret
\ No newline at end of file + jr nz,.LastLoop ; repeat wCurEnemyLVL times + ret diff --git a/engine/battle/safari_zone.asm b/engine/battle/safari_zone.asm index 6b0e2220..1eb1a615 100755 --- a/engine/battle/safari_zone.asm +++ b/engine/battle/safari_zone.asm @@ -1,4 +1,4 @@ -PrintSafariZoneBattleText: ; 4277 (1:4277) +PrintSafariZoneBattleText: ld hl, wSafariBaitFactor ld a, [hl] and a @@ -18,7 +18,7 @@ PrintSafariZoneBattleText: ; 4277 (1:4277) ld a, [wEnemyMonSpecies] ld [wd0b5], a call GetMonHeader - ld a, [W_MONHCATCHRATE] + ld a, [wMonHCatchRate] ld [wEnemyMonCatchRate], a pop hl .asm_429f @@ -27,10 +27,10 @@ PrintSafariZoneBattleText: ; 4277 (1:4277) pop hl jp PrintText -SafariZoneEatingText: ; 42a7 (1:42a7) +SafariZoneEatingText: TX_FAR _SafariZoneEatingText db "@" -SafariZoneAngryText: ; 42ac (1:42ac) +SafariZoneAngryText: TX_FAR _SafariZoneAngryText db "@" diff --git a/engine/battle/save_trainer_name.asm b/engine/battle/save_trainer_name.asm index 84ef1f69..7e2c911c 100644 --- a/engine/battle/save_trainer_name.asm +++ b/engine/battle/save_trainer_name.asm @@ -1,6 +1,6 @@ -SaveTrainerName: ; 27e4a (9:7e4a) +SaveTrainerName: ld hl,TrainerNamePointers - ld a,[W_TRAINERCLASS] + ld a,[wTrainerClass] dec a ld c,a ld b,0 @@ -18,95 +18,95 @@ SaveTrainerName: ; 27e4a (9:7e4a) jr nz,.CopyCharacter ret -TrainerNamePointers: ; 27e64 (9:7e64) +TrainerNamePointers: ; what is the point of these? dw YoungsterName dw BugCatcherName dw LassName - dw W_TRAINERNAME + dw wTrainerName dw JrTrainerMName dw JrTrainerFName dw PokemaniacName dw SuperNerdName - dw W_TRAINERNAME - dw W_TRAINERNAME + dw wTrainerName + dw wTrainerName dw BurglarName dw EngineerName dw JugglerXName - dw W_TRAINERNAME + dw wTrainerName dw SwimmerName - dw W_TRAINERNAME - dw W_TRAINERNAME + dw wTrainerName + dw wTrainerName dw BeautyName - dw W_TRAINERNAME + dw wTrainerName dw RockerName dw JugglerName - dw W_TRAINERNAME - dw W_TRAINERNAME + dw wTrainerName + dw wTrainerName dw BlackbeltName - dw W_TRAINERNAME + dw wTrainerName dw ProfOakName dw ChiefName dw ScientistName - dw W_TRAINERNAME + dw wTrainerName dw RocketName dw CooltrainerMName dw CooltrainerFName - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME - dw W_TRAINERNAME + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName + dw wTrainerName -YoungsterName: ; 27ec2 (9:7ec2) +YoungsterName: db "YOUNGSTER@" -BugCatcherName: ; 27ecc (9:7ecc) +BugCatcherName: db "BUG CATCHER@" -LassName: ; 27ed8 (9:7ed8) +LassName: db "LASS@" -JrTrainerMName: ; 27edd (9:7edd) +JrTrainerMName: db "JR.TRAINER♂@" -JrTrainerFName: ; 27ee9 (9:7ee9) +JrTrainerFName: db "JR.TRAINER♀@" -PokemaniacName: ; 27ef5 (9:7ef5) +PokemaniacName: db "POKéMANIAC@" -SuperNerdName: ; 27f00 (9:7f00) +SuperNerdName: db "SUPER NERD@" -BurglarName: ; 27f0b (9:7f0b) +BurglarName: db "BURGLAR@" -EngineerName: ; 27f13 (9:7f13) +EngineerName: db "ENGINEER@" -JugglerXName: ; 27f1c (9:7f1c) +JugglerXName: db "JUGGLER@" -SwimmerName: ; 27f24 (9:7f24) +SwimmerName: db "SWIMMER@" -BeautyName: ; 27f2c (9:7f2c) +BeautyName: db "BEAUTY@" -RockerName: ; 27f33 (9:7f33) +RockerName: db "ROCKER@" -JugglerName: ; 27f3a (9:7f3a) +JugglerName: db "JUGGLER@" -BlackbeltName: ; 27f42 (9:7f42) +BlackbeltName: db "BLACKBELT@" -ProfOakName: ; 27f4c (9:7f4c) +ProfOakName: db "PROF.OAK@" -ChiefName: ; 27f55 (9:7f55) +ChiefName: db "CHIEF@" -ScientistName: ; 27f5b (9:7f5b) +ScientistName: db "SCIENTIST@" -RocketName: ; 27f65 (9:7f65) +RocketName: db "ROCKET@" -CooltrainerMName: ; 27f6c (9:7f6c) +CooltrainerMName: db "COOLTRAINER♂@" -CooltrainerFName: ; 27f79 (9:7f79) +CooltrainerFName: db "COOLTRAINER♀@" diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm index dae4ad42..98521528 100644 --- a/engine/battle/scale_sprites.asm +++ b/engine/battle/scale_sprites.asm @@ -1,16 +1,16 @@ ; scales both uncompressed sprite chunks by two in every dimension (creating 2x2 output pixels per input pixel) ; assumes that input sprite chunks are 4x4 tiles, and the rightmost and bottommost 4 pixels will be ignored ; resulting in a 7*7 tile output sprite chunk -ScaleSpriteByTwo: ; 2fe40 (b:7e40) - ld de, S_SPRITEBUFFER1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped - ld hl, S_SPRITEBUFFER0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer +ScaleSpriteByTwo: + ld de, sSpriteBuffer1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped + ld hl, sSpriteBuffer0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer call ScaleLastSpriteColumnByTwo ; last tile column is special case call ScaleFirstThreeSpriteColumnsByTwo ; scale first 3 tile columns - ld de, S_SPRITEBUFFER2 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped - ld hl, S_SPRITEBUFFER1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer + ld de, sSpriteBuffer2 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped + ld hl, sSpriteBuffer1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer call ScaleLastSpriteColumnByTwo ; last tile column is special case -ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55) +ScaleFirstThreeSpriteColumnsByTwo: ld b, $3 ; 3 tile columns .columnLoop ld c, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows @@ -39,18 +39,18 @@ ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55) jr nz, .columnLoop ret -ScaleLastSpriteColumnByTwo: ; 2fe7d (b:7e7d) +ScaleLastSpriteColumnByTwo: 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 @@ -61,7 +61,7 @@ ScaleLastSpriteColumnByTwo: ; 2fe7d (b:7e7d) ; scales the given 4 bits in a (4x1 pixels) to 2 output bytes (8x2 pixels) ; hl: destination pointer ; bc: destination pointer offset (added after the two bytes have been written) -ScalePixelsByTwo: ; 2fe97 (b:7e97) +ScalePixelsByTwo: push hl and $f ld hl, DuplicateBitsTable @@ -78,7 +78,7 @@ ScalePixelsByTwo: ; 2fe97 (b:7e97) ret ; repeats each input bit twice -DuplicateBitsTable: ; 2fea8 (b:7ea8) +DuplicateBitsTable: db $00, $03, $0c, $0f db $30, $33, $3c, $3f db $c0, $c3, $cc, $cf diff --git a/engine/battle/scroll_draw_trainer_pic.asm b/engine/battle/scroll_draw_trainer_pic.asm index 18df86e0..98893dcf 100644 --- a/engine/battle/scroll_draw_trainer_pic.asm +++ b/engine/battle/scroll_draw_trainer_pic.asm @@ -1,12 +1,12 @@ -_ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3) +_ScrollTrainerPicAfterBattle: ; Load the enemy trainer's pic and scrolls it into ; the screen from the right. xor a ld [wEnemyMonSpecies2], a - ld b, $1 - call GoPAL_SET + ld b, SET_PAL_BATTLE + call RunPaletteCommand callab _LoadTrainerPic - hlCoord 19, 0 + coord hl, 19, 0 ld c, $0 .scrollLoop inc c @@ -32,7 +32,7 @@ _ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3) jr .scrollLoop ; write one 7-tile column of the trainer pic to the tilemap -DrawTrainerPicColumn: ; 39707 (e:5707) +DrawTrainerPicColumn: push hl push de push bc diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm index 191cfd5e..b175fcaf 100644 --- a/engine/battle/trainer_ai.asm +++ b/engine/battle/trainer_ai.asm @@ -1,25 +1,25 @@ ; creates a set of moves that may be used and returns its address in hl ; unused slots are filled with 0, all used slots may be chosen with equal probability -AIEnemyTrainerChooseMoves: ; 39719 (e:5719) +AIEnemyTrainerChooseMoves: ld a, $a - ld hl, wHPBarMaxHP ; init temporary move selection array. Only the moves with the lowest numbers are chosen in the end + ld hl, wBuffer ; init temporary move selection array. Only the moves with the lowest numbers are chosen in the end ld [hli], a ; move 1 ld [hli], a ; move 2 ld [hli], a ; move 3 ld [hl], a ; move 4 - ld a, [W_ENEMYDISABLEDMOVE] ; forbid disabled move (if any) + ld a, [wEnemyDisabledMove] ; forbid disabled move (if any) swap a and $f jr z, .noMoveDisabled - ld hl, wHPBarMaxHP + ld hl, wBuffer dec a ld c, a ld b, $0 add hl, bc ; advance pointer to forbidden move ld [hl], $50 ; forbid (highly discourage) disabled move .noMoveDisabled - ld hl, TrainerClassMoveChoiceModifications ; 589B - ld a, [W_TRAINERCLASS] + ld hl, TrainerClassMoveChoiceModifications + ld a, [wTrainerClass] ld b, a .loopTrainerClasses dec b @@ -40,11 +40,11 @@ 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 - ld b, $0 + ld b, 0 add hl, bc ; skip to pointer ld a, [hli] ; read pointer into hl ld h, [hl] @@ -53,9 +53,9 @@ AIEnemyTrainerChooseMoves: ; 39719 (e:5719) push de jp [hl] ; execute modification function .loopFindMinimumEntries ; all entries will be decremented sequentially until one of them is zero - ld hl, wHPBarMaxHP ; temp move selection array + ld hl, wBuffer ; temp move selection array ld de, wEnemyMonMoves ; enemy moves - ld c, $4 + ld c, NUM_MOVES .loopDecrementEntries ld a, [de] inc de @@ -73,15 +73,15 @@ AIEnemyTrainerChooseMoves: ; 39719 (e:5719) inc [hl] dec hl inc a - cp $5 + cp NUM_MOVES + 1 jr nz, .loopUndoPartialIteration - ld hl, wHPBarMaxHP ; temp move selection array + ld hl, wBuffer ; temp move selection array ld de, wEnemyMonMoves ; enemy moves - ld c, $4 + ld c, NUM_MOVES .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] @@ -97,20 +97,20 @@ AIEnemyTrainerChooseMoves: ; 39719 (e:5719) inc de dec c jr nz, .filterMinimalEntries - ld hl, wHPBarMaxHP ; use created temporary array as move set + ld hl, wBuffer ; use created temporary array as move set ret .useOriginalMoveSet ld hl, wEnemyMonMoves ; use original move set ret -AIMoveChoiceModificationFunctionPointers: ; 397a3 (e:57a3) +AIMoveChoiceModificationFunctionPointers: dw AIMoveChoiceModification1 dw AIMoveChoiceModification2 dw AIMoveChoiceModification3 dw AIMoveChoiceModification4 ; unused, does nothing ; discourages moves that cause no damage but only a status ailment if player's mon already has one -AIMoveChoiceModification1: ; 397ab (e:57ab) +AIMoveChoiceModification1: ld a, [wBattleMonStatus] and a ret z ; return if no status ailment on player's mon @@ -126,10 +126,10 @@ AIMoveChoiceModification1: ; 397ab (e:57ab) ret z ; no more moves in move set inc de call ReadMove - ld a, [W_ENEMYMOVEPOWER] + ld a, [wEnemyMovePower] and a jr nz, .nextMove - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] push hl push de push bc @@ -145,7 +145,7 @@ AIMoveChoiceModification1: ; 397ab (e:57ab) ld [hl], a jr .nextMove -StatusAilmentMoveEffects ; 57e2 +StatusAilmentMoveEffects: db $01 ; unused sleep effect db SLEEP_EFFECT db POISON_EFFECT @@ -155,9 +155,9 @@ StatusAilmentMoveEffects ; 57e2 ; slightly encourage moves with specific effects. ; in particular, stat-modifying moves and other move effects ; that fall in-bewteen -AIMoveChoiceModification2: ; 397e7 (e:57e7) +AIMoveChoiceModification2: 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 @@ -171,7 +171,7 @@ AIMoveChoiceModification2: ; 397e7 (e:57e7) ret z ; no more moves in move set inc de call ReadMove - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] cp ATTACK_UP1_EFFECT jr c, .nextMove cp BIDE_EFFECT @@ -182,16 +182,16 @@ AIMoveChoiceModification2: ; 397e7 (e:57e7) jr c, .preferMove jr .nextMove .preferMove - dec [hl] ; sligthly encourage this move + dec [hl] ; slightly encourage this move jr .nextMove ; encourages moves that are effective against the player's mon (even if non-damaging). ; discourage damaging moves that are ineffective or not very effective against the player's mon, ; unless there's no damaging move that deals at least neutral damage -AIMoveChoiceModification3: ; 39817 (e:5817) +AIMoveChoiceModification3: ld hl, wBuffer - 1 ; temp move selection array (-1 byte offset) ld de, wEnemyMonMoves ; enemy moves - ld b, $5 + ld b, NUM_MOVES + 1 .nextMove dec b ret z ; processed all 4 moves @@ -208,7 +208,7 @@ AIMoveChoiceModification3: ; 39817 (e:5817) pop de pop bc pop hl - ld a, [wd11e] + ld a, [wTypeEffectiveness] cp $10 jr z, .nextMove jr c, .notEffectiveMove @@ -218,7 +218,7 @@ AIMoveChoiceModification3: ; 39817 (e:5817) push hl push de push bc - ld a, [W_ENEMYMOVETYPE] + ld a, [wEnemyMoveType] ld d, a ld hl, wEnemyMonMoves ; enemy moves ld b, NUM_MOVES + 1 @@ -230,17 +230,17 @@ AIMoveChoiceModification3: ; 39817 (e:5817) and a jr z, .done call ReadMove - ld a, [W_ENEMYMOVEEFFECT] + ld a, [wEnemyMoveEffect] cp SUPER_FANG_EFFECT jr z, .betterMoveFound ; Super Fang is considered to be a better move cp SPECIAL_DAMAGE_EFFECT jr z, .betterMoveFound ; any special damage moves are considered to be better moves cp FLY_EFFECT jr z, .betterMoveFound ; Fly is considered to be a better move - ld a, [W_ENEMYMOVETYPE] + ld a, [wEnemyMoveType] cp d jr z, .loopMoves - ld a, [W_ENEMYMOVEPOWER] + ld a, [wEnemyMovePower] and a jr nz, .betterMoveFound ; damaging moves of a different type are considered to be better moves jr .loopMoves @@ -255,18 +255,18 @@ AIMoveChoiceModification3: ; 39817 (e:5817) jr z, .nextMove inc [hl] ; sligthly discourage this move jr .nextMove -AIMoveChoiceModification4: ; 39883 (e:5883) +AIMoveChoiceModification4: ret -ReadMove: ; 39884 (e:5884) +ReadMove: push hl push de push bc dec a ld hl,Moves - ld bc,6 + ld bc,MoveEnd - Moves call AddNTimes - ld de,W_ENEMYMOVENUM + ld de,wEnemyMoveNum call CopyData pop bc pop de @@ -275,13 +275,13 @@ ReadMove: ; 39884 (e:5884) ; move choice modification methods that are applied for each trainer class ; 0 is sentinel value -TrainerClassMoveChoiceModifications: ; 3989b (e:589b) +TrainerClassMoveChoiceModifications: db 0 ; YOUNGSTER db 1,0 ; BUG CATCHER db 1,0 ; LASS db 1,3,0 ; SAILOR - db 1,0 ; JR__TRAINER_M - db 1,0 ; JR__TRAINER_F + db 1,0 ; JR_TRAINER_M + db 1,0 ; JR_TRAINER_F db 1,2,3,0; POKEMANIAC db 1,2,0 ; SUPER_NERD db 1,0 ; HIKER @@ -311,7 +311,7 @@ TrainerClassMoveChoiceModifications: ; 3989b (e:589b) db 1,0 ; BRUNO db 1,0 ; BROCK db 1,3,0 ; MISTY - db 1,3,0 ; LT__SURGE + db 1,3,0 ; LT_SURGE db 1,3,0 ; ERIKA db 1,3,0 ; KOGA db 1,3,0 ; BLAINE @@ -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" @@ -336,16 +336,15 @@ INCLUDE "data/trainer_moves.asm" INCLUDE "data/trainer_parties.asm" -TrainerAI: ; 3a52e (e:652e) -;XXX called at 34964, 3c342, 3c398 +TrainerAI: and a - ld a,[W_ISINBATTLE] + ld a,[wIsInBattle] dec a ret z ; if not a trainer, we're done here ld a,[wLinkState] cp LINK_STATE_BATTLING ret z - ld a,[W_TRAINERCLASS] ; what trainer class is this? + ld a,[wTrainerClass] ; what trainer class is this? dec a ld c,a ld b,0 @@ -369,7 +368,7 @@ TrainerAI: ; 3a52e (e:652e) call Random jp [hl] -TrainerAIPointers: ; 3a55c (e:655c) +TrainerAIPointers: ; one entry per trainer class ; first byte, number of times (per Pokémon) it can occur ; next two bytes, pointer to AI subroutine for trainer class @@ -421,27 +420,27 @@ TrainerAIPointers: ; 3a55c (e:655c) dbw 2,AgathaAI ; agatha dbw 1,LanceAI ; lance -JugglerAI: ; 3a5e9 (e:65e9) +JugglerAI: cp $40 ret nc jp AISwitchIfEnoughMons -BlackbeltAI: ; 3a5ef (e:65ef) +BlackbeltAI: cp $20 ret nc jp AIUseXAttack -GiovanniAI: ; 3a5f5 (e:65f5) +GiovanniAI: cp $40 ret nc jp AIUseGuardSpec -CooltrainerMAI: ; 3a5fb (e:65fb) +CooltrainerMAI: cp $40 ret nc jp AIUseXAttack -CooltrainerFAI: ; 3a601 (e:6601) +CooltrainerFAI: cp $40 ld a,$A call AICheckIfHPBelowFraction @@ -451,24 +450,24 @@ CooltrainerFAI: ; 3a601 (e:6601) ret nc jp AISwitchIfEnoughMons -BrockAI: ; 3a614 (e:6614) +BrockAI: ; if his active monster has a status condition, use a full heal ld a,[wEnemyMonStatus] and a ret z jp AIUseFullHeal -MistyAI: ; 3a61c (e:661c) +MistyAI: cp $40 ret nc jp AIUseXDefend -LtSurgeAI: ; 3a622 (e:6622) +LtSurgeAI: cp $40 ret nc jp AIUseXSpeed -ErikaAI: ; 3a628 (e:6628) +ErikaAI: cp $80 ret nc ld a,$A @@ -476,17 +475,17 @@ ErikaAI: ; 3a628 (e:6628) ret nc jp AIUseSuperPotion -KogaAI: ; 3a634 (e:6634) +KogaAI: cp $40 ret nc jp AIUseXAttack -BlaineAI: ; 3a63a (e:663a) +BlaineAI: cp $40 ret nc jp AIUseSuperPotion -SabrinaAI: ; 3a640 (e:6640) +SabrinaAI: cp $40 ret nc ld a,$A @@ -494,7 +493,7 @@ SabrinaAI: ; 3a640 (e:6640) ret nc jp AIUseHyperPotion -Sony2AI: ; 3a64c (e:664c) +Sony2AI: cp $20 ret nc ld a,5 @@ -502,7 +501,7 @@ Sony2AI: ; 3a64c (e:664c) ret nc jp AIUsePotion -Sony3AI: ; 3a658 (e:6658) +Sony3AI: cp $20 ret nc ld a,5 @@ -510,7 +509,7 @@ Sony3AI: ; 3a658 (e:6658) ret nc jp AIUseFullRestore -LoreleiAI: ; 3a664 (e:6664) +LoreleiAI: cp $80 ret nc ld a,5 @@ -518,12 +517,12 @@ LoreleiAI: ; 3a664 (e:6664) ret nc jp AIUseSuperPotion -BrunoAI: ; 3a670 (e:6670) +BrunoAI: cp $40 ret nc jp AIUseXDefend -AgathaAI: ; 3a676 (e:6676) +AgathaAI: cp $14 jp c,AISwitchIfEnoughMons cp $80 @@ -533,7 +532,7 @@ AgathaAI: ; 3a676 (e:6676) ret nc jp AIUseSuperPotion -LanceAI: ; 3a687 (e:6687) +LanceAI: cp $80 ret nc ld a,5 @@ -541,26 +540,26 @@ LanceAI: ; 3a687 (e:6687) ret nc jp AIUseHyperPotion -GenericAI: ; 3a693 (e:6693) +GenericAI: and a ; clear carry ret ; end of individual trainer AI routines -DecrementAICount: ; 3a695 (e:6695) +DecrementAICount: ld hl,wAICount dec [hl] scf ret -Func_3a69b: ; 3a69b (e:669b) - ld a,(SFX_08_3e - SFX_Headers_08) / 3 +AIPlayRestoringSFX: + ld a,SFX_HEAL_AILMENT jp PlaySoundWaitForCurrent -AIUseFullRestore: ; 3a6a0 (e:66a0) +AIUseFullRestore: call AICureStatus ld a,FULL_RESTORE - ld [wcf05],a + ld [wAIItem],a ld de,wHPBarOldHP ld hl,wEnemyMonHP + 1 ld a,[hld] @@ -581,27 +580,27 @@ AIUseFullRestore: ; 3a6a0 (e:66a0) ld [wEnemyMonHP],a jr AIPrintItemUseAndUpdateHPBar -AIUsePotion: ; 3a6ca (e:66ca) +AIUsePotion: ; enemy trainer heals his monster with a potion ld a,POTION ld b,20 jr AIRecoverHP -AIUseSuperPotion: ; 3a6d0 (e:66d0) +AIUseSuperPotion: ; enemy trainer heals his monster with a super potion ld a,SUPER_POTION ld b,50 jr AIRecoverHP -AIUseHyperPotion: ; 3a6d6 (e:66d6) +AIUseHyperPotion: ; enemy trainer heals his monster with a hyper potion ld a,HYPER_POTION ld b,200 ; fallthrough -AIRecoverHP: ; 3a6da (e:66da) +AIRecoverHP: ; heal b HP and print "trainer used $(a) on pokemon!" - ld [wcf05],a + ld [wAIItem],a ld hl,wEnemyMonHP + 1 ld a,[hl] ld [wHPBarOldHP],a @@ -640,15 +639,15 @@ AIRecoverHP: ; 3a6da (e:66da) ld [wHPBarNewHP+1],a ; fallthrough -AIPrintItemUseAndUpdateHPBar: ; 3a718 (e:6718) +AIPrintItemUseAndUpdateHPBar: call AIPrintItemUse_ - hlCoord 2, 2 + coord hl, 2, 2 xor a ld [wHPBarType],a predef UpdateHPBar2 jp DecrementAICount -AISwitchIfEnoughMons: ; 3a72a (e:672a) +AISwitchIfEnoughMons: ; enemy trainer switches if there are 3 or more unfainted mons in party ld a,[wEnemyPartyCount] ld c,a @@ -666,7 +665,7 @@ AISwitchIfEnoughMons: ; 3a72a (e:672a) inc d .Fainted push bc - ld bc,$2C + ld bc, wEnemyMon2 - wEnemyMon1 add hl,bc pop bc dec c @@ -678,7 +677,7 @@ AISwitchIfEnoughMons: ; 3a72a (e:672a) and a ret -SwitchEnemyMon: ; 3a74b (e:674b) +SwitchEnemyMon: ; prepare to withdraw the active monster: copy hp, number, and status to roster @@ -695,11 +694,13 @@ SwitchEnemyMon: ; 3a74b (e:674b) ld hl, AIBattleWithdrawText call PrintText + ; This wFirstMonsNotOutYet variable is abused to prevent the player from + ; switching in a new mon in response to this switch. ld a,1 - ld [wd11d],a + ld [wFirstMonsNotOutYet],a callab EnemySendOut xor a - ld [wd11d],a + ld [wFirstMonsNotOutYet],a ld a,[wLinkState] cp LINK_STATE_BATTLING @@ -707,17 +708,17 @@ SwitchEnemyMon: ; 3a74b (e:674b) scf ret -AIBattleWithdrawText: ; 3a781 (e:6781) +AIBattleWithdrawText: TX_FAR _AIBattleWithdrawText db "@" -AIUseFullHeal: ; 3a786 (e:6786) - call Func_3a69b +AIUseFullHeal: + call AIPlayRestoringSFX call AICureStatus ld a,FULL_HEAL jp AIPrintItemUse -AICureStatus: ; 3a791 (e:6791) +AICureStatus: ; cures the status of enemy's active pokemon ld a,[wEnemyMonPartyPos] ld hl,wEnemyMon1Status @@ -726,32 +727,32 @@ AICureStatus: ; 3a791 (e:6791) xor a ld [hl],a ; clear status in enemy team roster ld [wEnemyMonStatus],a ; clear status of active enemy - ld hl,W_ENEMYBATTSTATUS3 + ld hl,wEnemyBattleStatus3 res 0,[hl] ret -AIUseXAccuracy: ; 0x3a7a8 unused - call Func_3a69b - ld hl,W_ENEMYBATTSTATUS2 +AIUseXAccuracy: ; unused + call AIPlayRestoringSFX + ld hl,wEnemyBattleStatus2 set 0,[hl] ld a,X_ACCURACY jp AIPrintItemUse -AIUseGuardSpec: ; 3a7b5 (e:67b5) - call Func_3a69b - ld hl,W_ENEMYBATTSTATUS2 +AIUseGuardSpec: + call AIPlayRestoringSFX + ld hl,wEnemyBattleStatus2 set 1,[hl] - ld a,GUARD_SPEC_ + ld a,GUARD_SPEC jp AIPrintItemUse -AIUseDireHit: ; 0x3a7c2 unused - call Func_3a69b - ld hl,W_ENEMYBATTSTATUS2 +AIUseDireHit: ; unused + call AIPlayRestoringSFX + ld hl,wEnemyBattleStatus2 set 2,[hl] ld a,DIRE_HIT jp AIPrintItemUse -AICheckIfHPBelowFraction: ; 3a7cf (e:67cf) +AICheckIfHPBelowFraction: ; return carry if enemy trainer's current HP is below 1 / a of the maximum ld [H_DIVISOR],a ld hl,wEnemyMonMaxHP @@ -777,38 +778,38 @@ AICheckIfHPBelowFraction: ; 3a7cf (e:67cf) sub c ret -AIUseXAttack: ; 3a7f2 (e:67f2) +AIUseXAttack: ld b,$A ld a,X_ATTACK jr AIIncreaseStat -AIUseXDefend: ; 3a7f8 (e:67f8) +AIUseXDefend: ld b,$B ld a,X_DEFEND jr AIIncreaseStat -AIUseXSpeed: ; 3a7fe (e:67fe) +AIUseXSpeed: ld b,$C ld a,X_SPEED jr AIIncreaseStat -AIUseXSpecial: ; 3a804 (e:6804) +AIUseXSpecial: ld b,$D ld a,X_SPECIAL ; fallthrough -AIIncreaseStat: ; 3a808 (e:6808) - ld [wcf05],a +AIIncreaseStat: + ld [wAIItem],a push bc call AIPrintItemUse_ pop bc - ld hl,W_ENEMYMOVEEFFECT + ld hl,wEnemyMoveEffect ld a,[hld] push af ld a,[hl] push af push hl - ld a,$AF + ld a,ANIM_AF ld [hli],a ld [hl],b callab StatModifierUpEffect @@ -819,19 +820,19 @@ AIIncreaseStat: ; 3a808 (e:6808) ld [hl],a jp DecrementAICount -AIPrintItemUse: ; 3a82c (e:682c) - ld [wcf05],a +AIPrintItemUse: + ld [wAIItem],a call AIPrintItemUse_ jp DecrementAICount -AIPrintItemUse_: ; 3a835 (e:6835) -; print "x used [wcf05] on z!" - ld a,[wcf05] +AIPrintItemUse_: +; print "x used [wAIItem] on z!" + ld a,[wAIItem] ld [wd11e],a call GetItemName ld hl, AIBattleUseItemText jp PrintText -AIBattleUseItemText: ; 3a844 (e:6844) +AIBattleUseItemText: TX_FAR _AIBattleUseItemText db "@" diff --git a/engine/battle/trainer_pic_money_pointers.asm b/engine/battle/trainer_pic_money_pointers.asm index 3d32eb00..37678e74 100644..100755 --- a/engine/battle/trainer_pic_money_pointers.asm +++ b/engine/battle/trainer_pic_money_pointers.asm @@ -1,4 +1,4 @@ -TrainerPicAndMoneyPointers: ; 39914 (e:5914) +TrainerPicAndMoneyPointers: ; trainer pic pointers and base money. ; money received after battle = base money × level of highest-level enemy mon dw YoungsterPic @@ -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/unused_stats_functions.asm b/engine/battle/unused_stats_functions.asm index 23ddbc20..55f78fd3 100644 --- a/engine/battle/unused_stats_functions.asm +++ b/engine/battle/unused_stats_functions.asm @@ -1,5 +1,5 @@ ; does nothing since no stats are ever selected (barring glitches) -DoubleSelectedStats: ; 39680 (e:5680) +DoubleSelectedStats: ld a, [H_WHOSETURN] and a ld a, [wPlayerStatsToDouble] @@ -29,7 +29,7 @@ DoubleSelectedStats: ; 39680 (e:5680) ret ; does nothing since no stats are ever selected (barring glitches) -HalveSelectedStats: ; 396a7 (e:56a7) +HalveSelectedStats: ld a, [H_WHOSETURN] and a ld a, [wPlayerStatsToHalve] diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm index 03119b90..231c46e7 100644 --- a/engine/battle/wild_encounters.asm +++ b/engine/battle/wild_encounters.asm @@ -1,6 +1,6 @@ ; try to initiate a wild pokemon encounter ; returns success in Z -TryDoWildEncounter: ; 13870 (4:7870) +TryDoWildEncounter: ld a, [wNPCMovementScriptPointerTableNum] and a ret nz @@ -18,33 +18,33 @@ TryDoWildEncounter: ; 13870 (4:7870) jr z, .CantEncounter ld a, [wRepelRemainingSteps] and a - jr z, .asm_1389e + jr z, .next dec a jr z, .lastRepelStep ld [wRepelRemainingSteps], a -.asm_1389e -; determine if wild pokmon can appear in the half-block were standing in +.next +; 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 + coord hl, 9, 9 ld c, [hl] - ld a, [W_GRASSTILE] + ld a, [wGrassTile] cp c - ld a, [W_GRASSRATE] + ld a, [wGrassRate] jr z, .CanEncounter ld a, $14 ; in all tilesets with a water tile, this is its id cp c - ld a, [W_WATERRATE] + ld a, [wWaterRate] 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. - ld a, [W_CURMAP] +; 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, [wCurMap] cp REDS_HOUSE_1F ; is this an indoor map? jr c, .CantEncounter2 - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] cp FOREST ; Viridian Forest/Safari Zone jr z, .CantEncounter2 - ld a, [W_GRASSRATE] + ld a, [wGrassRate] .CanEncounter ; compare encounter chance with a random number to determine if there will be an encounter ld b, a @@ -61,20 +61,20 @@ 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? + ld hl, wGrassMons + 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 + ld hl, wWaterMons ; 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 + ld b, 0 add hl, bc ld a, [hli] - ld [W_CURENEMYLVL], a + ld [wCurEnemyLVL], a ld a, [hl] ld [wcf91], a ld [wEnemyMonSpecies2], a @@ -83,14 +83,14 @@ TryDoWildEncounter: ; 13870 (4:7870) jr z, .willEncounter ld a, [wPartyMon1Level] ld b, a - ld a, [W_CURENEMYLVL] + ld a, [wCurEnemyLVL] cp b jr c, .CantEncounter2 ; repel prevents encounters if the leading party mon's level is higher than the wild mon jr .willEncounter .lastRepelStep ld [wRepelRemainingSteps], a - ld a, $d2 - ld [H_DOWNARROWBLINKCNT2], a + ld a, TEXT_REPEL_WORE_OFF + ld [hSpriteIndexOrTextID], a call EnableAutoTextBoxDrawing call DisplayTextID .CantEncounter2 @@ -101,7 +101,7 @@ TryDoWildEncounter: ; 13870 (4:7870) xor a ret -WildMonEncounterSlotChances: ; 13918 (4:7918) +WildMonEncounterSlotChances: ; There are 10 slots for wild pokemon, and this is the table that defines how common each of ; those 10 slots is. A random number is generated and then the first byte of each pair in this ; table is compared against that random number. If the random number is less than or equal diff --git a/engine/bcd.asm b/engine/bcd.asm new file mode 100644 index 00000000..3e693e1f --- /dev/null +++ b/engine/bcd.asm @@ -0,0 +1,212 @@ +DivideBCDPredef:: +DivideBCDPredef2:: +DivideBCDPredef3:: +DivideBCDPredef4:: + call GetPredefRegisters + +DivideBCD:: + xor a + ld [$ffa5], a + ld [$ffa6], a + ld [$ffa7], a + ld d, $1 +.asm_f72a + ld a, [$ffa2] + and $f0 + jr nz, .asm_f75b + inc d + ld a, [$ffa2] + swap a + and $f0 + ld b, a + ld a, [$ffa3] + swap a + ld [$ffa3], a + and $f + or b + ld [$ffa2], a + ld a, [$ffa3] + and $f0 + ld b, a + ld a, [$ffa4] + swap a + ld [$ffa4], a + and $f + or b + ld [$ffa3], a + ld a, [$ffa4] + and $f0 + ld [$ffa4], a + jr .asm_f72a +.asm_f75b + push de + push de + call DivideBCD_f800 + pop de + ld a, b + swap a + and $f0 + ld [$ffa5], a + dec d + jr z, .asm_f7bc + push de + call DivideBCD_f7d7 + call DivideBCD_f800 + pop de + ld a, [$ffa5] + or b + ld [$ffa5], a + dec d + jr z, .asm_f7bc + push de + call DivideBCD_f7d7 + call DivideBCD_f800 + pop de + ld a, b + swap a + and $f0 + ld [$ffa6], a + dec d + jr z, .asm_f7bc + push de + call DivideBCD_f7d7 + call DivideBCD_f800 + pop de + ld a, [$ffa6] + or b + ld [$ffa6], a + dec d + jr z, .asm_f7bc + push de + call DivideBCD_f7d7 + call DivideBCD_f800 + pop de + ld a, b + swap a + and $f0 + ld [$ffa7], a + dec d + jr z, .asm_f7bc + push de + call DivideBCD_f7d7 + call DivideBCD_f800 + pop de + ld a, [$ffa7] + or b + ld [$ffa7], a +.asm_f7bc + ld a, [$ffa5] + ld [$ffa2], a + ld a, [$ffa6] + ld [$ffa3], a + ld a, [$ffa7] + ld [$ffa4], a + pop de + ld a, $6 + sub d + and a + ret z +.asm_f7ce + push af + call DivideBCD_f7d7 + pop af + dec a + jr nz, .asm_f7ce + ret + +DivideBCD_f7d7: + ld a, [$ffa4] + swap a + and $f + ld b, a + ld a, [$ffa3] + swap a + ld [$ffa3], a + and $f0 + or b + ld [$ffa4], a + ld a, [$ffa3] + and $f + ld b, a + ld a, [$ffa2] + swap a + ld [$ffa2], a + and $f0 + or b + ld [$ffa3], a + ld a, [$ffa2] + and $f + ld [$ffa2], a + ret + +DivideBCD_f800: + ld bc, $3 +.asm_f803 + ld de, $ff9f + ld hl, $ffa2 + push bc + call StringCmp + pop bc + ret c + inc b + ld de, $ffa1 + ld hl, $ffa4 + push bc + call SubBCD + pop bc + jr .asm_f803 + + +AddBCDPredef:: + call GetPredefRegisters + +AddBCD:: + and a + ld b, c +.add + ld a, [de] + adc [hl] + daa + ld [de], a + dec de + dec hl + dec c + jr nz, .add + jr nc, .done + ld a, $99 + inc de +.fill + ld [de], a + inc de + dec b + jr nz, .fill +.done + ret + + +SubBCDPredef:: + call GetPredefRegisters + +SubBCD:: + and a + ld b, c +.sub + ld a, [de] + sbc [hl] + daa + ld [de], a + dec de + dec hl + dec c + jr nz, .sub + jr nc, .done + ld a, $00 + inc de +.fill + ld [de], a + inc de + dec b + jr nz, .fill + scf +.done + ret diff --git a/engine/black_out.asm b/engine/black_out.asm new file mode 100644 index 00000000..6c358ce3 --- /dev/null +++ b/engine/black_out.asm @@ -0,0 +1,46 @@ +ResetStatusAndHalveMoneyOnBlackout:: +; Reset player status on blackout. + xor a + ld [wBattleResult], a + ld [wWalkBikeSurfState], a + ld [wIsInBattle], a + ld [wMapPalOffset], a + ld [wNPCMovementScriptFunctionNum], a + ld [hJoyHeld], a + ld [wNPCMovementScriptPointerTableNum], a + ld [wFlags_0xcd60], a + + ld [hMoney], a + ld [hMoney + 1], a + ld [hMoney + 2], a + call HasEnoughMoney + jr c, .lostmoney ; never happens + + ; Halve the player's money. + ld a, [wPlayerMoney] + ld [hMoney], a + ld a, [wPlayerMoney + 1] + ld [hMoney + 1], a + ld a, [wPlayerMoney + 2] + ld [hMoney + 2], a + xor a + ld [hDivideBCDDivisor], a + ld [hDivideBCDDivisor + 1], a + ld a, 2 + ld [hDivideBCDDivisor + 2], a + predef DivideBCDPredef3 + ld a, [hDivideBCDQuotient] + ld [wPlayerMoney], a + ld a, [hDivideBCDQuotient + 1] + ld [wPlayerMoney + 1], a + ld a, [hDivideBCDQuotient + 2] + ld [wPlayerMoney + 2], a + +.lostmoney + ld hl, wd732 + set 2, [hl] + res 3, [hl] + set 6, [hl] + ld a, %11111111 + ld [wJoyIgnore], a + predef_jump HealParty diff --git a/engine/cable_club.asm b/engine/cable_club.asm index 2cfb1734..474dbd11 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -1,19 +1,19 @@ -; performs the appropriate action when the player uses the gameboy on the table in the Colosseum or Trade Centre -; In the Colosseum, it starts a battle. In the Trade Centre, it displays the trade selection screen. +; performs the appropriate action when the player uses the gameboy on the table in the Colosseum or Trade Center +; In the Colosseum, it starts a battle. In the Trade Center, it displays the trade selection screen. ; Before doing either action, it swaps random numbers, trainer names and party data with the other gameboy. -CableClub_DoBattleOrTrade: ; 5317 (1:5317) - ld c, $50 +CableClub_DoBattleOrTrade: + ld c, 80 call DelayFrames call ClearScreen call UpdateSprites call LoadFontTilePatterns call LoadHpBarAndStatusTilePatterns call LoadTrainerInfoTextBoxTiles - hlCoord 3, 8 + coord hl, 3, 8 ld b, 2 ld c, 12 call CableClub_TextBoxBorder - hlCoord 4, 10 + coord hl, 4, 10 ld de, PleaseWaitString call PlaceString ld hl, wPlayerNumHits @@ -23,14 +23,14 @@ CableClub_DoBattleOrTrade: ; 5317 (1:5317) ; fall through ; This is called after completing a trade. -CableClub_DoBattleOrTradeAgain: ; 5345 +CableClub_DoBattleOrTradeAgain: ld hl, wSerialPlayerDataBlock ld a, SERIAL_PREAMBLE_BYTE ld b, 6 -.writePlayeDataBlockPreambleLoop +.writePlayerDataBlockPreambleLoop ld [hli], a dec b - jr nz, .writePlayeDataBlockPreambleLoop + jr nz, .writePlayerDataBlockPreambleLoop ld hl, wSerialRandomNumberListBlock ld a, SERIAL_PREAMBLE_BYTE ld b, 7 @@ -57,8 +57,8 @@ CableClub_DoBattleOrTradeAgain: ; 5345 ld [hli], a dec b jr nz, .zeroPlayerDataPatchListLoop - ld hl, W_GRASSRATE - ld bc, W_TRAINERHEADERPTR - W_GRASSRATE + ld hl, wGrassRate + ld bc, wTrainerHeaderPtr - wGrassRate .zeroEnemyPartyLoop xor a ld [hli], a @@ -96,7 +96,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345 ld a, SERIAL_PATCH_LIST_PART_TERMINATOR ld [de], a ; end of part 1 inc de - ld bc, $100 + lb bc, 1, 0 jr .patchPartyMonsLoop .finishedPatchingPlayerData ld a, SERIAL_PATCH_LIST_PART_TERMINATOR @@ -176,7 +176,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345 jr z, .findStartOfEnemyNameLoop dec hl ld de, wLinkEnemyTrainerName - ld c, 11 + ld c, NAME_LENGTH .copyEnemyNameLoop ld a, [hli] cp SERIAL_NO_DATA_BYTE @@ -186,7 +186,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345 dec c jr nz, .copyEnemyNameLoop ld de, wEnemyPartyCount - ld bc, W_TRAINERHEADERPTR - wEnemyPartyCount + ld bc, wTrainerHeaderPtr - wEnemyPartyCount .copyEnemyPartyLoop ld a, [hli] cp SERIAL_NO_DATA_BYTE @@ -256,9 +256,9 @@ CableClub_DoBattleOrTradeAgain: ; 5345 dec c jr nz, .unpatchEnemyMonsLoop ld a, wEnemyMonOT % $100 - ld [wcf8d], a + ld [wUnusedCF8D], a ld a, wEnemyMonOT / $100 - ld [wcf8e], a + ld [wUnusedCF8D + 1], a xor a ld [wTradeCenterPointerTableIndex], a ld a, $ff @@ -271,25 +271,25 @@ CableClub_DoBattleOrTradeAgain: ; 5345 cp LINK_STATE_START_BATTLE ld a, LINK_STATE_TRADING ld [wLinkState], a - jr nz, .asm_5506 + jr nz, .trading ld a, LINK_STATE_BATTLING ld [wLinkState], a - ld a, SONY1 + $c8 - ld [W_CUROPPONENT], a + ld a, OPP_SONY1 + ld [wCurOpponent], a call ClearScreen call Delay3 - ld hl, W_OPTIONS + ld hl, wOptions res 7, [hl] predef InitOpponent predef HealParty jp ReturnToCableClubRoom -.asm_5506 +.trading ld c, BANK(Music_GameCorner) ld a, MUSIC_GAME_CORNER call PlayMusic jr CallCurrentTradeCenterFunction -PleaseWaitString: ; 550f (1:550f) +PleaseWaitString: db "PLEASE WAIT!@" CallCurrentTradeCenterFunction: @@ -297,7 +297,7 @@ CallCurrentTradeCenterFunction: ld b, 0 ld a, [wTradeCenterPointerTableIndex] cp $ff - jp z, LoadTitlescreenGraphics + jp z, DisplayTitleScreen add a ld c, a add hl, bc @@ -317,7 +317,7 @@ TradeCenter_SelectMon: ld [hli], a ld [hli], a ld [hl], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld [wCurrentMenuItem], a ld [wLastMenuItem], a ld [wMenuJoypadPollCount], a @@ -326,7 +326,7 @@ TradeCenter_SelectMon: jp .playerMonMenu .enemyMonMenu xor a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a inc a ld [wWhichTradeMonSelectionMenu], a ld a, D_DOWN | D_LEFT | A_BUTTON @@ -357,9 +357,9 @@ TradeCenter_SelectMon: dec a ld [wCurrentMenuItem], a .displayEnemyMonStats - ld a, $1 - ld [wd11b], a - callab Func_39bd5 + ld a, INIT_ENEMYOT_LIST + ld [wInitListType], a + callab InitList ; the list isn't used ld hl, wEnemyMons call TradeCenter_DisplayStats jp .getNewInput @@ -390,7 +390,7 @@ TradeCenter_SelectMon: .playerMonMenu xor a ; player mon menu ld [wWhichTradeMonSelectionMenu], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld a, D_DOWN | D_RIGHT | A_BUTTON ld [wMenuWatchedKeys], a ld a, [wPartyCount] @@ -399,8 +399,8 @@ TradeCenter_SelectMon: ld [wTopMenuItemY], a ld a, 1 ld [wTopMenuItemX], a - hlCoord 1, 1 - ld bc, $0601 + coord hl, 1, 1 + lb bc, 6, 1 call ClearScreenArea .playerMonMenu_HandleInput ld hl, hFlags_0xFFF6 @@ -416,9 +416,9 @@ TradeCenter_SelectMon: jr z, .playerMonMenu_ANotPressed jp .chosePlayerMon ; jump if A button pressed ; unreachable code - ld a, $4 - ld [wd11b], a - callab Func_39bd5 + ld a, INIT_PLAYEROT_LIST + ld [wInitListType], a + callab InitList ; the list isn't used call TradeCenter_DisplayStats jp .getNewInput .playerMonMenu_ANotPressed @@ -464,11 +464,11 @@ TradeCenter_SelectMon: dec a .displayStatsTradeMenu push af - hlCoord 0, 14 + coord hl, 0, 14 ld b, 2 ld c, 18 call CableClub_TextBoxBorder - hlCoord 2, 16 + coord hl, 2, 16 ld de, .statsTrade call PlaceString xor a @@ -511,9 +511,9 @@ TradeCenter_SelectMon: .displayPlayerMonStats pop af ld [wCurrentMenuItem], a - ld a, $4 - ld [wd11b], a - callab Func_39bd5 + ld a, INIT_PLAYEROT_LIST + ld [wInitListType], a + callab InitList ; the list isn't used call TradeCenter_DisplayStats call LoadScreenTilesFromBuffer1 jp .playerMonMenu @@ -547,11 +547,11 @@ TradeCenter_SelectMon: ld a, " " ld [hl], a .cancelMenuItem_Loop - ld a, $ed ; filled arrow cursor + ld a, "▶" ; filled arrow cursor Coorda 1, 16 .cancelMenuItem_JoypadLoop call JoypadLowSensitivity - ld a, [$ffb5] + ld a, [hJoy5] and a ; pressed anything? jr z, .cancelMenuItem_JoypadLoop bit 0, a ; A button pressed? @@ -566,7 +566,7 @@ TradeCenter_SelectMon: ld [wCurrentMenuItem], a jp .playerMonMenu .cancelMenuItem_APressed - ld a, $ec ; unfilled arrow cursor + ld a, "▷" ; unfilled arrow cursor Coorda 1, 16 ld a, $f ld [wSerialExchangeNybbleSendData], a @@ -576,7 +576,7 @@ TradeCenter_SelectMon: jr nz, .cancelMenuItem_Loop ; fall through -ReturnToCableClubRoom: ; 577d (1:577d) +ReturnToCableClubRoom: call GBPalWhiteOutWithDelay3 ld hl, wFontLoaded ld a, [hl] @@ -588,7 +588,7 @@ ReturnToCableClubRoom: ; 577d (1:577d) dec a ld [wDestinationWarpID], a call LoadMapData - callba ClearVariablesAfterLoadingMapData + callba ClearVariablesOnEnterMap pop hl pop af ld [hl], a @@ -596,15 +596,15 @@ ReturnToCableClubRoom: ; 577d (1:577d) ret TradeCenter_DrawCancelBox: - hlCoord 11, 15 + coord hl, 11, 15 ld a, $7e - ld bc, 2 * 20 + 9 + ld bc, 2 * SCREEN_WIDTH + 9 call FillMemory - hlCoord 0, 15 + coord hl, 0, 15 ld b, 1 ld c, 9 call CableClub_TextBoxBorder - hlCoord 2, 16 + coord hl, 2, 16 ld de, CancelTextString jp PlaceString @@ -613,10 +613,10 @@ CancelTextString: TradeCenter_PlaceSelectedEnemyMonMenuCursor: ld a, [wSerialSyncAndExchangeNybbleReceiveData] - hlCoord 1, 9 - ld bc, 20 + coord hl, 1, 9 + ld bc, SCREEN_WIDTH call AddNTimes - ld [hl], $ec ; cursor + ld [hl], "▷" ; cursor ret TradeCenter_DisplayStats: @@ -630,24 +630,24 @@ TradeCenter_DisplayStats: jp TradeCenter_DrawCancelBox TradeCenter_DrawPartyLists: - hlCoord 0, 0 + coord hl, 0, 0 ld b, 6 ld c, 18 call CableClub_TextBoxBorder - hlCoord 0, 8 + coord hl, 0, 8 ld b, 6 ld c, 18 call CableClub_TextBoxBorder - hlCoord 5, 0 + coord hl, 5, 0 ld de, wPlayerName call PlaceString - hlCoord 5, 8 + coord hl, 5, 8 ld de, wLinkEnemyTrainerName call PlaceString - hlCoord 2, 1 + coord hl, 2, 1 ld de, wPartySpecies call TradeCenter_PrintPartyListNames - hlCoord 2, 9 + coord hl, 2, 9 ld de, wEnemyPartyMons ; fall through @@ -682,9 +682,9 @@ TradeCenter_Trade: xor a ld [wSerialExchangeNybbleSendData + 1], a ; unnecessary ld [wSerialExchangeNybbleReceiveData], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld [wMenuJoypadPollCount], a - hlCoord 0, 12 + coord hl, 0, 12 ld b, 4 ld c, 18 call CableClub_TextBoxBorder @@ -698,7 +698,7 @@ TradeCenter_Trade: call GetMonName ld hl, wcd6d ld de, wNameOfPlayerMonToBeTraded - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld a, [wTradingWhichEnemyMon] ld hl, wEnemyPartyMons @@ -709,11 +709,11 @@ TradeCenter_Trade: ld [wd11e], a call GetMonName ld hl, WillBeTradedText - bcCoord 1, 14 + coord bc, 1, 14 call TextCommandProcessor call SaveScreenTilesToBuffer1 - hlCoord 10, 7 - ld bc, $080b + coord hl, 10, 7 + lb bc, 8, 11 ld a, TRADE_CANCEL_MENU ld [wTwoOptionMenuID], a ld a, TWO_OPTION_MENU @@ -726,11 +726,11 @@ TradeCenter_Trade: ; if trade cancelled ld a, $1 ld [wSerialExchangeNybbleSendData], a - hlCoord 0, 12 + coord hl, 0, 12 ld b, 4 ld c, 18 call CableClub_TextBoxBorder - hlCoord 1, 14 + coord hl, 1, 14 ld de, TradeCanceled call PlaceString call Serial_PrintWaitingTextAndSyncAndExchangeNybble @@ -743,11 +743,11 @@ TradeCenter_Trade: dec a ; did the other person cancel? jr nz, .doTrade ; if the other person cancelled - hlCoord 0, 12 + coord hl, 0, 12 ld b, 4 ld c, 18 call CableClub_TextBoxBorder - hlCoord 1, 14 + coord hl, 1, 14 ld de, TradeCanceled call PlaceString jp .tradeCancelled @@ -756,7 +756,7 @@ TradeCenter_Trade: ld hl, wPartyMonOT call SkipFixedLengthTextEntries ld de, wTradedPlayerMonOT - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wPartyMon1Species ld a, [wTradingWhichPlayerMon] @@ -772,7 +772,7 @@ TradeCenter_Trade: ld hl, wEnemyMonOT call SkipFixedLengthTextEntries ld de, wTradedEnemyMonOT - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wEnemyMons ld a, [wTradingWhichEnemyMon] @@ -793,7 +793,7 @@ TradeCenter_Trade: ld a, [hl] ld [wTradedPlayerMonSpecies], a xor a - ld [wcf95], a + ld [wRemoveMonFromBox], a call RemovePokemon ld a, [wTradingWhichEnemyMon] ld c, a @@ -816,7 +816,7 @@ TradeCenter_Trade: dec a ld [wWhichPokemon], a ld a, $1 - ld [wccd4], a + ld [wForceEvolution], a ld a, [wTradingWhichEnemyMon] ld hl, wEnemyPartyMons ld b, 0 @@ -824,19 +824,19 @@ TradeCenter_Trade: add hl, bc ld a, [hl] ld [wTradedEnemyMonSpecies], a - ld a, $a - ld [wMusicHeaderPointer], a + ld a, 10 + ld [wAudioFadeOutControl], a ld a, $2 - ld [wc0f0], a + ld [wAudioSavedROMBank], a ld a, MUSIC_SAFARI_ZONE - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld c, 100 call DelayFrames call ClearScreen call LoadHpBarAndStatusTilePatterns xor a - ld [wcc5b], a + ld [wUnusedCC5B], a ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .usingExternalClock @@ -851,11 +851,11 @@ TradeCenter_Trade: call Serial_PrintWaitingTextAndSyncAndExchangeNybble ld c, 40 call DelayFrames - hlCoord 0, 12 + coord hl, 0, 12 ld b, 4 ld c, 18 call CableClub_TextBoxBorder - hlCoord 1, 14 + coord hl, 1, 14 ld de, TradeCompleted call PlaceString predef SaveSAVtoSRAM2 @@ -871,7 +871,7 @@ TradeCenter_Trade: ld [wTradeCenterPointerTableIndex], a jp CallCurrentTradeCenterFunction -WillBeTradedText: ; 5a24 (1:5a24) +WillBeTradedText: TX_FAR _WillBeTradedText db "@" @@ -882,11 +882,11 @@ TradeCanceled: db "Too bad! The trade" next "was canceled!@" -TradeCenterPointerTable: ; 5a5b (1:5a5b) +TradeCenterPointerTable: dw TradeCenter_SelectMon dw TradeCenter_Trade -CableClub_Run: ; 5a5f (1:5a5f) +CableClub_Run: ld a, [wLinkState] cp LINK_STATE_START_TRADE jr z, .doBattleOrTrade @@ -900,38 +900,38 @@ CableClub_Run: ; 5a5f (1:5a5f) call CableClub_DoBattleOrTrade ld hl, Club_GFX ld a, h - ld [W_TILESETGFXPTR + 1], a + ld [wTilesetGfxPtr + 1], a ld a, l - ld [W_TILESETGFXPTR], a + ld [wTilesetGfxPtr], a ld a, Bank(Club_GFX) - ld [W_TILESETBANK], a + ld [wTilesetBank], a ld hl, Club_Coll ld a, h - ld [W_TILESETCOLLISIONPTR + 1], a + ld [wTilesetCollisionPtr + 1], a ld a, l - ld [W_TILESETCOLLISIONPTR], a + ld [wTilesetCollisionPtr], a xor a - ld [W_GRASSRATE], a + ld [wGrassRate], a inc a ; LINK_STATE_IN_CABLE_CLUB ld [wLinkState], a - ld [$ffb5], a - ld a, $a - ld [wMusicHeaderPointer], a + ld [hJoy5], a + ld a, 10 + ld [wAudioFadeOutControl], a ld a, BANK(Music_Celadon) - ld [wc0f0], a + ld [wAudioSavedROMBank], a ld a, MUSIC_CELADON - ld [wc0ee], a + ld [wNewSoundID], a jp PlaySound -EmptyFunc3: ; 5aaf (1:5aaf) +EmptyFunc3: ret -Diploma_TextBoxBorder: ; 5ab0 (1:5ab0) +Diploma_TextBoxBorder: call GetPredefRegisters ; b = height ; c = width -CableClub_TextBoxBorder: ; 5ab3 (1:5ab3) +CableClub_TextBoxBorder: push hl ld a, $78 ; border upper left corner tile ld [hli], a @@ -962,10 +962,16 @@ CableClub_TextBoxBorder: ; 5ab3 (1:5ab3) ret ; c = width -CableClub_DrawHorizontalLine: ; 5ae0 (1:5ae0) +CableClub_DrawHorizontalLine: ld d, c -.asm_5ae1 +.loop ld [hli], a dec d - jr nz, .asm_5ae1 + jr nz, .loop ret + +LoadTrainerInfoTextBoxTiles: + ld de, TrainerInfoTextBoxTileGraphics + ld hl, vChars2 + $760 + lb bc, BANK(TrainerInfoTextBoxTileGraphics), (TrainerInfoTextBoxTileGraphicsEnd - TrainerInfoTextBoxTileGraphics) / $10 + jp CopyVideoData diff --git a/engine/clear_save.asm b/engine/clear_save.asm index 66d7e920..b47cd6c4 100755 --- a/engine/clear_save.asm +++ b/engine/clear_save.asm @@ -1,12 +1,12 @@ -DoClearSaveDialogue: ; 1c98a (7:498a) +DoClearSaveDialogue: call ClearScreen - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call LoadFontTilePatterns call LoadTextBoxTilePatterns ld hl, ClearSaveDataText call PrintText - hlCoord 14, 7 - ld bc, $80f + coord hl, 14, 7 + lb bc, 8, 15 ld a, NO_YES_MENU ld [wTwoOptionMenuID], a ld a, TWO_OPTION_MENU @@ -18,6 +18,6 @@ DoClearSaveDialogue: ; 1c98a (7:498a) callba ClearSAV jp Init -ClearSaveDataText: ; 1c9c1 (7:49c1) +ClearSaveDataText: TX_FAR _ClearSaveDataText db "@" diff --git a/engine/debug1.asm b/engine/debug1.asm new file mode 100644 index 00000000..a5eb7dde --- /dev/null +++ b/engine/debug1.asm @@ -0,0 +1,33 @@ +; This function appears to never be used. +; It is likely a debugging feature to give the player Tsunekazu Ishihara's +; favorite Pokemon. This is indicated by the overpowered Exeggutor, which +; Ishihara (president of Creatures Inc.) said was his favorite Pokemon in an ABC +; interview on February 8, 2000. +; "Exeggutor is my favorite. That's because I was always using this character +; while I was debugging the program." +; http://www.ign.com/articles/2000/02/09/abc-news-pokamon-chat-transcript + +SetIshiharaTeam: + ld de, IshiharaTeam +.loop + ld a, [de] + cp $ff + ret z + ld [wcf91], a + inc de + ld a, [de] + ld [wCurEnemyLVL], a + inc de + call AddPartyMon + jr .loop + +IshiharaTeam: + db EXEGGUTOR,90 + db MEW,20 + db JOLTEON,56 + db DUGTRIO,56 + db ARTICUNO,57 + db $FF + +EmptyFunc: + ret diff --git a/engine/display_pokedex.asm b/engine/display_pokedex.asm new file mode 100644 index 00000000..96a2dd6c --- /dev/null +++ b/engine/display_pokedex.asm @@ -0,0 +1,19 @@ +_DisplayPokedex: + ld hl, wd730 + set 6, [hl] + predef ShowPokedexData + ld hl, wd730 + res 6, [hl] + call ReloadMapData + ld c, 10 + call DelayFrames + predef IndexToPokedex + ld a, [wd11e] + dec a + ld c, a + ld b, FLAG_SET + ld hl, wPokedexSeen + predef FlagActionPredef + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ret diff --git a/engine/display_text_id_init.asm b/engine/display_text_id_init.asm new file mode 100644 index 00000000..312d6329 --- /dev/null +++ b/engine/display_text_id_init.asm @@ -0,0 +1,78 @@ +; function that performs initialization for DisplayTextID +DisplayTextIDInit: + xor a + ld [wListMenuID],a + ld a,[wAutoTextBoxDrawingControl] + bit 0,a + jr nz,.skipDrawingTextBoxBorder + ld a,[hSpriteIndexOrTextID] ; text ID (or sprite ID) + and a + jr nz,.notStartMenu +; if text ID is 0 (i.e. the start menu) +; Note that the start menu text border is also drawn in the function directly +; below this, so this seems unnecessary. + CheckEvent EVENT_GOT_POKEDEX +; start menu with pokedex + coord hl, 10, 0 + ld b,$0e + ld c,$08 + jr nz,.drawTextBoxBorder +; start menu without pokedex + coord hl, 10, 0 + ld b,$0c + ld c,$08 + jr .drawTextBoxBorder +; if text ID is not 0 (i.e. not the start menu) then do a standard dialogue text box +.notStartMenu + coord hl, 0, 12 + ld b,$04 + ld c,$12 +.drawTextBoxBorder + call TextBoxBorder +.skipDrawingTextBoxBorder + ld hl,wFontLoaded + set 0,[hl] + ld hl,wFlags_0xcd60 + bit 4,[hl] + res 4,[hl] + jr nz,.skipMovingSprites + call UpdateSprites +.skipMovingSprites +; loop to copy C1X9 (direction the sprite is facing) to C2X9 for each sprite +; this is done because when you talk to an NPC, they turn to look your way +; the original direction they were facing must be restored after the dialogue is over + ld hl,wSpriteStateData1 + $19 + ld c,$0f + ld de,$0010 +.spriteFacingDirectionCopyLoop + ld a,[hl] + inc h + ld [hl],a + dec h + add hl,de + dec c + jr nz,.spriteFacingDirectionCopyLoop +; loop to force all the sprites in the middle of animation to stand still +; (so that they don't like they're frozen mid-step during the dialogue) + ld hl,wSpriteStateData1 + 2 + ld de,$0010 + ld c,e +.spriteStandStillLoop + ld a,[hl] + cp a,$ff ; is the sprite visible? + jr z,.nextSprite +; if it is visible + and a,$fc + ld [hl],a +.nextSprite + add hl,de + dec c + jr nz,.spriteStandStillLoop + ld b,$9c ; window background address + call CopyScreenTileBufferToVRAM ; transfer background in WRAM to VRAM + xor a + ld [hWY],a ; put the window on the screen + call LoadFontTilePatterns + ld a,$01 + ld [H_AUTOBGTRANSFERENABLED],a ; enable continuous WRAM to VRAM transfer each V-blank + ret diff --git a/engine/evolution.asm b/engine/evolution.asm index 7ae88fdf..a2c52765 100755 --- a/engine/evolution.asm +++ b/engine/evolution.asm @@ -1,4 +1,4 @@ -Func_7bde9: ; 7bde9 (1e:7de9) +EvolveMon: push hl push de push bc @@ -8,72 +8,72 @@ Func_7bde9: ; 7bde9 (1e:7de9) push af xor a ld [wLowHealthAlarm], a - ld [wc02a], a + ld [wChannelSoundIDs + Ch4], a dec a - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld a, (SFX_08_3c - SFX_Headers_08) / 3 + ld [H_AUTOBGTRANSFERENABLED], a + ld a, SFX_TINK 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 - ld a, [wHPBarMaxHP + 1] + ld a, [wEvoOldSpecies] + ld [wWholeScreenPaletteMonSpecies], a + ld c, 0 + call EvolutionSetWholeScreenPalette + ld a, [wEvoNewSpecies] ld [wcf91], a ld [wd0b5], a - call Func_7beb9 + call Evolution_LoadPic ld de, vFrontPic ld hl, vBackPic ld bc, 7 * 7 call CopyVideoData - ld a, [wHPBarMaxHP] + ld a, [wEvoOldSpecies] ld [wcf91], a ld [wd0b5], a - call Func_7beb9 + call Evolution_LoadPic ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld a, [wHPBarMaxHP] + ld [H_AUTOBGTRANSFERENABLED], a + ld a, [wEvoOldSpecies] call PlayCry call WaitForSoundToFinish ld c, BANK(Music_SafariZone) ld a, MUSIC_SAFARI_ZONE call PlayMusic - ld c, $50 + ld c, 80 call DelayFrames - ld c, $1 - call Func_7beb4 - ld bc, $110 -.asm_7be63 + ld c, 1 ; set PAL_BLACK instead of mon palette + call EvolutionSetWholeScreenPalette + lb bc, $1, $10 +.animLoop push bc - call asm_7befa - jr c, .asm_7bea9 - call asm_7bec2 + call Evolution_CheckForCancel + jr c, .evolutionCancelled + call Evolution_BackAndForthAnim pop bc inc b dec c dec c - jr nz, .asm_7be63 + jr nz, .animLoop xor a - ld [wHPBarOldHP + 1], a + ld [wEvoCancelled], a ld a, $31 - ld [wHPBarOldHP], a - call Func_7bed6 - ld a, [wHPBarMaxHP + 1] -.asm_7be81 - ld [wcf1d], a + ld [wEvoMonTileOffset], a + call Evolution_ChangeMonPic ; show the new species pic + ld a, [wEvoNewSpecies] +.done + ld [wWholeScreenPaletteMonSpecies], a ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound - ld a, [wcf1d] + ld a, [wWholeScreenPaletteMonSpecies] call PlayCry - ld c, $0 - call Func_7beb4 + ld c, 0 + call EvolutionSetWholeScreenPalette pop af ld [wd0b5], a pop af @@ -81,77 +81,80 @@ Func_7bde9: ; 7bde9 (1e:7de9) pop bc pop de pop hl - ld a, [wHPBarOldHP + 1] + ld a, [wEvoCancelled] and a ret z scf ret -.asm_7bea9 +.evolutionCancelled pop bc - ld a, $1 - ld [wHPBarOldHP + 1], a - ld a, [wHPBarMaxHP] - jr .asm_7be81 + ld a, 1 + ld [wEvoCancelled], a + ld a, [wEvoOldSpecies] + jr .done -Func_7beb4: ; 7beb4 (1e:7eb4) - ld b, $b - jp GoPAL_SET +EvolutionSetWholeScreenPalette: + ld b, SET_PAL_POKEMON_WHOLE_SCREEN + jp RunPaletteCommand -Func_7beb9: ; 7beb9 (1e:7eb9) +Evolution_LoadPic: call GetMonHeader - hlCoord 7, 2 + coord hl, 7, 2 jp LoadFlippedFrontSpriteByMonIndex -asm_7bec2: ; 7bec2 (1e:7ec2) + +Evolution_BackAndForthAnim: +; show the mon change back and forth between the new and old species b times ld a, $31 - ld [wHPBarOldHP], a - call Func_7bed6 - ld a, $cf - ld [wHPBarOldHP], a - call Func_7bed6 + ld [wEvoMonTileOffset], a + call Evolution_ChangeMonPic + ld a, -$31 + ld [wEvoMonTileOffset], a + call Evolution_ChangeMonPic dec b - jr nz, asm_7bec2 + jr nz, Evolution_BackAndForthAnim ret -Func_7bed6: ; 7bed6 (1e:7ed6) +Evolution_ChangeMonPic: push bc xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - hlCoord 7, 2 - ld bc, $707 - ld de, $d -.asm_7bee3 + ld [H_AUTOBGTRANSFERENABLED], a + coord hl, 7, 2 + lb bc, 7, 7 + ld de, SCREEN_WIDTH - 7 +.loop push bc -.asm_7bee4 - ld a, [wHPBarOldHP] +.innerLoop + ld a, [wEvoMonTileOffset] add [hl] ld [hli], a dec c - jr nz, .asm_7bee4 + jr nz, .innerLoop pop bc add hl, de dec b - jr nz, .asm_7bee3 - ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + jr nz, .loop + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 pop bc ret -asm_7befa: ; 7befa (1e:7efa) + +Evolution_CheckForCancel: call DelayFrame push bc call JoypadLowSensitivity ld a, [hJoy5] pop bc - and $2 - jr nz, .asm_7bf0d -.asm_7bf08 + and B_BUTTON + jr nz, .pressedB +.notAllowedToCancel dec c - jr nz, asm_7befa + jr nz, Evolution_CheckForCancel and a ret -.asm_7bf0d - ld a, [wccd4] +.pressedB + ld a, [wForceEvolution] and a - jr nz, .asm_7bf08 + jr nz, .notAllowedToCancel scf ret diff --git a/engine/evolve_trade.asm b/engine/evolve_trade.asm index ec230677..e17fc05c 100755 --- a/engine/evolve_trade.asm +++ b/engine/evolve_trade.asm @@ -1,4 +1,4 @@ -EvolveTradeMon: ; 17d7d (5:7d7d) +EvolveTradeMon: ; Verify the TradeMon's species name before ; attempting to initiate a trade evolution. @@ -31,11 +31,11 @@ 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 [wForceEvolution], a ld a, LINK_STATE_TRADING ld [wLinkState], a callab TryEvolvingMon diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm index 23bffa8d..f50f8081 100755 --- a/engine/evos_moves.asm +++ b/engine/evos_moves.asm @@ -1,20 +1,20 @@ ; try to evolve the mon in [wWhichPokemon] -TryEvolvingMon: ; 3ad0e (e:6d0e) - ld hl, wccd3 +TryEvolvingMon: + ld hl, wCanEvolveFlags xor a ld [hl], a ld a, [wWhichPokemon] ld c, a - ld b, $1 + ld b, FLAG_SET call Evolution_FlagAction ; this is only called after battle ; it is supposed to do level up evolutions, though there is a bug that allows item evolutions to occur -EvolutionAfterBattle: ; 3ad1c (e:6d1c) +EvolutionAfterBattle: ld a, [hTilesetType] push af xor a - ld [wd121], a + ld [wEvolutionOccurred], a dec a ld [wWhichPokemon], a push hl @@ -31,17 +31,17 @@ Evolution_PartyMonLoop: ; loop over party mons ld a, [hl] cp $ff ; have we reached the end of the party? jp z, .done - ld [wHPBarMaxHP], a + ld [wEvoOldSpecies], a push hl ld a, [wWhichPokemon] ld c, a - ld hl, wccd3 - ld b, $2 + ld hl, wCanEvolveFlags + ld b, FLAG_TEST call Evolution_FlagAction ld a, c and a ; is the mon's bit set? jp z, Evolution_PartyMonLoop ; if not, go to the next mon - ld a, [wHPBarMaxHP] + ld a, [wEvoOldSpecies] dec a ld b, 0 ld hl, EvosMovesPointerTable @@ -55,8 +55,8 @@ Evolution_PartyMonLoop: ; loop over party mons push hl ld a, [wcf91] push af - xor a - ld [wcc49], a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation], a call LoadMonData pop af ld [wcf91], a @@ -76,7 +76,7 @@ Evolution_PartyMonLoop: ; loop over party mons ld a, b cp EV_ITEM jr z, .checkItemEvo - ld a, [wccd4] + ld a, [wForceEvolution] and a jr nz, Evolution_PartyMonLoop ld a, b @@ -91,7 +91,7 @@ Evolution_PartyMonLoop: ; loop over party mons ld a, [wLoadedMonLevel] cp b ; is the mon's level greater than the evolution requirement? jp c, Evolution_PartyMonLoop ; if so, go the next mon - jr .asm_3adb6 + jr .doEvolution .checkItemEvo ld a, [hli] ld b, a ; evolution item @@ -104,32 +104,32 @@ Evolution_PartyMonLoop: ; loop over party mons ld a, [wLoadedMonLevel] cp b ; is the mon's level greater than the evolution requirement? jp c, .nextEvoEntry2 ; if so, go the next evolution entry -.asm_3adb6 - ld [W_CURENEMYLVL], a - ld a, $1 - ld [wd121], a +.doEvolution + ld [wCurEnemyLVL], a + ld a, 1 + ld [wEvolutionOccurred], a push hl ld a, [hl] - ld [wHPBarMaxHP + 1], a + ld [wEvoNewSpecies], a ld a, [wWhichPokemon] ld hl, wPartyMonNicks call GetPartyMonName call CopyStringToCF4B ld hl, IsEvolvingText call PrintText - ld c, $32 + ld c, 50 call DelayFrames xor a ld [H_AUTOBGTRANSFERENABLED], a - ld hl, wTileMap - ld bc, $c14 + coord hl, 0, 0 + lb bc, 12, 20 call ClearScreenArea ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a ld a, $ff ld [wUpdateSpritesEnabled], a call ClearSprites - callab Func_7bde9 + callab EvolveMon jp c, CancelledEvolution ld hl, EvolvedText call PrintText @@ -137,7 +137,7 @@ Evolution_PartyMonLoop: ; loop over party mons ld a, [hl] ld [wd0b5], a ld [wLoadedMonSpecies], a - ld [wHPBarMaxHP + 1], a + ld [wEvoNewSpecies], a ld a, MONSTER_NAME ld [wNameListType], a ld a, BANK(TrainerNames) ; bank is not used for monster names @@ -145,11 +145,11 @@ Evolution_PartyMonLoop: ; loop over party mons call GetName push hl ld hl, IntoText - call Func_3c59 - ld a, (SFX_02_3b - SFX_Headers_02) / 3 + call PrintText_NoCreatingTextBox + ld a, SFX_GET_ITEM_2 call PlaySoundWaitForCurrent call WaitForSoundToFinish - ld c, $28 + ld c, 40 call DelayFrames call ClearScreen call RenameEvolvedMon @@ -161,12 +161,12 @@ Evolution_PartyMonLoop: ; loop over party mons ld a, [wd11e] dec a ld hl, BaseStats - ld bc, $1c + ld bc, MonBaseStatsEnd - MonBaseStats call AddNTimes - ld de, W_MONHEADER + ld de, wMonHeader call CopyData ld a, [wd0b5] - ld [W_MONHDEXNUM], a + ld [wMonHIndex], a pop af ld [wd11e], a ld hl, wLoadedMonHPExp - 1 @@ -206,18 +206,18 @@ Evolution_PartyMonLoop: ; loop over party mons ld a, [wd0b5] ld [wd11e], a xor a - ld [wcc49], a + ld [wMonDataLocation], a call LearnMoveFromLevelUp pop hl predef SetPartyMonTypes - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] and a call z, Evolution_ReloadTilesetTilePatterns predef IndexToPokedex ld a, [wd11e] dec a ld c, a - ld b, $1 + ld b, FLAG_SET ld hl, wPokedexOwned push bc call Evolution_FlagAction @@ -249,20 +249,20 @@ Evolution_PartyMonLoop: ; loop over party mons ld a, [wLinkState] cp LINK_STATE_TRADING ret z - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] and a ret nz - ld a, [wd121] + ld a, [wEvolutionOccurred] and a call nz, PlayDefaultMusic ret -; checks if the evolved mon's name is different from the standard name (i.e. it has a nickname) -; if so, rename it to is evolved form's standard name -RenameEvolvedMon: ; 3aef7 (e:6ef7) +RenameEvolvedMon: +; Renames the mon to its new, evolved form's standard name unless it had a +; nickname, in which case the nickname is kept. ld a, [wd0b5] push af - ld a, [W_MONHDEXNUM] + ld a, [wMonHIndex] ld [wd0b5], a call GetName pop af @@ -275,10 +275,10 @@ RenameEvolvedMon: ; 3aef7 (e:6ef7) cp [hl] inc hl ret nz - cp $50 + cp "@" jr nz, .compareNamesLoop ld a, [wWhichPokemon] - ld bc, $b + ld bc, NAME_LENGTH ld hl, wPartyMonNicks call AddNTimes push hl @@ -287,7 +287,7 @@ RenameEvolvedMon: ; 3aef7 (e:6ef7) pop de jp CopyData -CancelledEvolution: ; 3af2e (e:6f2e) +CancelledEvolution: ld hl, StoppedEvolvingText call PrintText call ClearScreen @@ -295,29 +295,29 @@ CancelledEvolution: ; 3af2e (e:6f2e) call Evolution_ReloadTilesetTilePatterns jp Evolution_PartyMonLoop -EvolvedText: ; 3af3e (e:6f3e) +EvolvedText: TX_FAR _EvolvedText db "@" -IntoText: ; 3af43 (e:6f43) +IntoText: TX_FAR _IntoText db "@" -StoppedEvolvingText: ; 3af48 (e:6f48) +StoppedEvolvingText: TX_FAR _StoppedEvolvingText db "@" -IsEvolvingText: ; 3af4d (e:6f4d) +IsEvolvingText: TX_FAR _IsEvolvingText db "@" -Evolution_ReloadTilesetTilePatterns: ; 3af52 (e:6f52) +Evolution_ReloadTilesetTilePatterns: ld a, [wLinkState] cp LINK_STATE_TRADING ret z jp ReloadTilesetTilePatterns -LearnMoveFromLevelUp: ; 3af5b (e:6f5b) +LearnMoveFromLevelUp: ld hl, EvosMovesPointerTable ld a, [wd11e] ; species ld [wcf91], a @@ -340,23 +340,24 @@ LearnMoveFromLevelUp: ; 3af5b (e:6f5b) and a ; have we reached the end of the learn set? jr z, .done ; if we've reached the end of the learn set, jump ld b, a ; level the move is learnt at - ld a, [W_CURENEMYLVL] + ld a, [wCurEnemyLVL] cp b ; is the move learnt at the mon's current level? ld a, [hli] ; move ID jr nz, .learnSetLoop ld d, a ; ID of move to learn - ld a, [wcc49] + ld a, [wMonDataLocation] and a jr nz, .next -; if [wcc49] is 0, get the address of the mon's current moves -; there is no reason to make this conditional because the code wouldn't work properly without doing this -; every call to this function sets [wcc49] to 0 +; If [wMonDataLocation] is 0 (PLAYER_PARTY_DATA), get the address of the mon's +; current moves in party data. Every call to this function sets +; [wMonDataLocation] to 0 because other data locations are not supported. +; If it is not 0, this function will not work properly. ld hl, wPartyMon1Moves ld a, [wWhichPokemon] ld bc, wPartyMon2 - wPartyMon1 call AddNTimes .next - ld b, $4 + ld b, NUM_MOVES .checkCurrentMovesLoop ; check if the move to learn is already known ld a, [hli] cp d @@ -374,16 +375,15 @@ LearnMoveFromLevelUp: ; 3af5b (e:6f5b) ld [wd11e], a ret -; writes the moves a mon has at level [W_CURENEMYLVL] to [de] +; writes the moves a mon has at level [wCurEnemyLVL] to [de] ; move slots are being filled up sequentially and shifted if all slots are full -; [wHPBarMaxHP]: (?) -WriteMonMoves: ; 3afb8 (e:6fb8) +WriteMonMoves: call GetPredefRegisters push hl push de push bc ld hl, EvosMovesPointerTable - ld b, $0 + ld b, 0 ld a, [wcf91] ; cur mon ID dec a add a @@ -407,28 +407,33 @@ WriteMonMoves: ; 3afb8 (e:6fb8) and a jp z, .done ; end of list ld b, a - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL + ld a, [wCurEnemyLVL] cp b jp c, .done ; mon level < move level (assumption: learnset is sorted by level) - ld a, [wHPBarMaxHP] + ld a, [wLearningMovesFromDayCare] and a jr z, .skipMinLevelCheck - ld a, [wWhichTrade] ; wWhichTrade (min move level) + ld a, [wDayCareStartLevel] cp b jr nc, .nextMove2 ; min level >= move level + .skipMinLevelCheck + +; check if the move is already known push de - ld c, $4 -.moveAlreadyLearnedCheckLoop + ld c, NUM_MOVES +.alreadyKnowsCheckLoop ld a, [de] inc de cp [hl] jr z, .nextMove dec c - jr nz, .moveAlreadyLearnedCheckLoop + jr nz, .alreadyKnowsCheckLoop + +; try to find an empty move slot pop de push de - ld c, $4 + ld c, NUM_MOVES .findEmptySlotLoop ld a, [de] and a @@ -436,47 +441,55 @@ WriteMonMoves: ; 3afb8 (e:6fb8) inc de dec c jr nz, .findEmptySlotLoop - pop de ; no empty move slots found + +; no empty move slots found + pop de push de push hl ld h, d ld l, e call WriteMonMoves_ShiftMoveData ; shift all moves one up (deleting move 1) - ld a, [wHPBarMaxHP] + ld a, [wLearningMovesFromDayCare] and a jr z, .writeMoveToSlot + +; shift PP as well if learning moves from day care push de - ld bc, $12 + ld bc, wPartyMon1PP - (wPartyMon1Moves + 3) add hl, bc ld d, h ld e, l call WriteMonMoves_ShiftMoveData ; shift all move PP data one up pop de + .writeMoveToSlot pop hl .writeMoveToSlot2 ld a, [hl] ld [de], a - ld a, [wHPBarMaxHP] + ld a, [wLearningMovesFromDayCare] and a jr z, .nextMove - push hl ; write move PP value + +; write move PP value if learning moves from day care + push hl ld a, [hl] - ld hl, $15 + ld hl, wPartyMon1PP - wPartyMon1Moves add hl, de push hl dec a ld hl, Moves - ld bc, $6 + ld bc, MoveEnd - Moves call AddNTimes - ld de, wHPBarMaxHP + ld de, wBuffer ld a, BANK(Moves) call FarCopyData - ld a, [wHPBarNewHP + 1] + ld a, [wBuffer + 5] pop hl ld [hl], a pop hl jr .nextMove + .done pop bc pop de @@ -484,17 +497,17 @@ WriteMonMoves: ; 3afb8 (e:6fb8) ret ; shifts all move data one up (freeing 4th move slot) -WriteMonMoves_ShiftMoveData: ; 3b04e (e:704e) - ld c, $3 -.asm_3b050 +WriteMonMoves_ShiftMoveData: + ld c, NUM_MOVES - 1 +.loop inc de ld a, [de] ld [hli], a dec c - jr nz, .asm_3b050 + jr nz, .loop ret -Evolution_FlagAction: ; 3b057 (e:7057) +Evolution_FlagAction: predef_jump FlagActionPredef INCLUDE "data/evos_moves.asm" diff --git a/engine/experience.asm b/engine/experience.asm index 68d22843..2efc13de 100755 --- a/engine/experience.asm +++ b/engine/experience.asm @@ -1,5 +1,5 @@ ; calculates the level a mon should be based on its current exp -CalcLevelFromExperience: ; 58f43 (16:4f43) +CalcLevelFromExperience: ld a, [wLoadedMonSpecies] ld [wd0b5], a call GetMonHeader @@ -10,15 +10,15 @@ CalcLevelFromExperience: ; 58f43 (16:4f43) push hl ld hl, wLoadedMonExp + 2 ; current exp ; compare exp needed for level d with current exp - ld a, [H_MULTIPLICAND + 2] + ld a, [hExperience + 2] ld c, a ld a, [hld] sub c - ld a, [H_MULTIPLICAND + 1] + ld a, [hExperience + 1] ld c, a ld a, [hld] sbc c - ld a, [H_MULTIPLICAND] + ld a, [hExperience] ld c, a ld a, [hl] sbc c @@ -28,118 +28,122 @@ CalcLevelFromExperience: ; 58f43 (16:4f43) ret ; calculates the amount of experience needed for level d -CalcExperience: ; 58f6a (16:4f6a) - ld a, [W_MONHGROWTHRATE] +CalcExperience: + ld a, [wMonHGrowthRate] add a add a ld c, a - ld b, $0 + ld b, 0 ld hl, GrowthRateTable 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_QUOTIENT + 1] push af - ld a, [H_MULTIPLICAND+1] + ld a, [H_QUOTIENT + 2] push af - ld a, [H_MULTIPLICAND+2] + ld a, [H_QUOTIENT + 3] push af 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_PRODUCT + 1] push af - ld a, [H_MULTIPLICAND+1] + ld a, [H_PRODUCT + 2] push af - ld a, [H_MULTIPLICAND+2] + ld a, [H_PRODUCT + 3] push af ld a, [hli] push af xor a - ld [H_MULTIPLICAND], a ; $ff96 - ld [H_MULTIPLICAND+1], a + ld [H_MULTIPLICAND], a + ld [H_MULTIPLICAND + 1], a ld a, d - ld [H_MULTIPLICAND+2], a + ld [H_MULTIPLICAND + 2], a ld a, [hli] ld [H_MULTIPLIER], a call Multiply ld b, [hl] - ld a, [H_MULTIPLICAND+2] + ld a, [H_PRODUCT + 3] sub b - ld [H_MULTIPLICAND+2], a + ld [H_PRODUCT + 3], a ld b, $0 - ld a, [H_MULTIPLICAND+1] + ld a, [H_PRODUCT + 2] sbc b - ld [H_MULTIPLICAND+1], a - ld a, [H_MULTIPLICAND] ; $ff96 + ld [H_PRODUCT + 2], a + ld a, [H_PRODUCT + 1] sbc b - ld [H_MULTIPLICAND], a ; $ff96 + ld [H_PRODUCT + 1], a +; The difference of the linear term and the constant term consists of 3 bytes +; starting at H_PRODUCT + 1. Below, hExperience (an alias of that address) will +; be used instead for the further work of adding or subtracting the squared +; term and adding the cubed term. pop af and $80 jr nz, .subtractSquaredTerm ; check sign pop bc - ld a, [H_MULTIPLICAND+2] + ld a, [hExperience + 2] add b - ld [H_MULTIPLICAND+2], a + ld [hExperience + 2], a pop bc - ld a, [H_MULTIPLICAND+1] + ld a, [hExperience + 1] adc b - ld [H_MULTIPLICAND+1], a + ld [hExperience + 1], a pop bc - ld a, [H_MULTIPLICAND] + ld a, [hExperience] adc b - ld [H_MULTIPLICAND], a + ld [hExperience], a jr .addCubedTerm .subtractSquaredTerm pop bc - ld a, [H_MULTIPLICAND+2] + ld a, [hExperience + 2] sub b - ld [H_MULTIPLICAND+2], a + ld [hExperience + 2], a pop bc - ld a, [H_MULTIPLICAND+1] + ld a, [hExperience + 1] sbc b - ld [H_MULTIPLICAND+1], a + ld [hExperience + 1], a pop bc - ld a, [H_MULTIPLICAND] + ld a, [hExperience] sbc b - ld [H_MULTIPLICAND], a + ld [hExperience], a .addCubedTerm pop bc - ld a, [H_MULTIPLICAND+2] + ld a, [hExperience + 2] add b - ld [H_MULTIPLICAND+2], a + ld [hExperience + 2], a pop bc - ld a, [H_MULTIPLICAND+1] + ld a, [hExperience + 1] adc b - ld [H_MULTIPLICAND+1], a + ld [hExperience + 1], a pop bc - ld a, [H_MULTIPLICAND] + ld a, [hExperience] adc b - ld [H_MULTIPLICAND], a + ld [hExperience], a ret ; calculates d*d -CalcDSquared: ; 59010 (16:5010) +CalcDSquared: xor a - ld [H_MULTIPLICAND], a ; $ff96 (aliases: H_NUMTOPRINT) - ld [H_MULTIPLICAND+1], a + ld [H_MULTIPLICAND], a + 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_MULTIPLICAND + 2], a + ld [H_MULTIPLIER], a jp Multiply ; each entry has the following scheme: @@ -147,7 +151,7 @@ CalcDSquared: ; 59010 (16:5010) ; resulting in ; (a*n^3)/b + sign*c*n^2 + d*n - e ; where sign = -1 <=> S=1 -GrowthRateTable: ; 5901d (16:501d) +GrowthRateTable: db $11,$00,$00,$00 ; medium fast n^3 db $34,$0A,$00,$1E ; (unused?) 3/4 n^3 + 10 n^2 - 30 db $34,$14,$00,$46 ; (unused?) 3/4 n^3 + 20 n^2 - 70 diff --git a/engine/flag_action.asm b/engine/flag_action.asm new file mode 100644 index 00000000..dc516887 --- /dev/null +++ b/engine/flag_action.asm @@ -0,0 +1,73 @@ +FlagActionPredef: + call GetPredefRegisters + +FlagAction: +; Perform action b on bit c +; in the bitfield at hl. +; 0: reset +; 1: set +; 2: read +; Return the result in c. + + push hl + push de + push bc + + ; bit + ld a, c + ld d, a + and 7 + ld e, a + + ; byte + ld a, d + srl a + srl a + srl a + add l + ld l, a + jr nc, .ok + inc h +.ok + + ; d = 1 << e (bitmask) + inc e + ld d, 1 +.shift + dec e + jr z, .shifted + sla d + jr .shift +.shifted + + ld a, b + and a + jr z, .reset + cp 2 + jr z, .read + +.set + ld b, [hl] + ld a, d + or b + ld [hl], a + jr .done + +.reset + ld b, [hl] + ld a, d + xor $ff + and b + ld [hl], a + jr .done + +.read + ld b, [hl] + ld a, d + and b +.done + pop bc + pop de + pop hl + ld c, a + ret diff --git a/engine/game_corner_slots.asm b/engine/game_corner_slots.asm index 52f61daf..3c5b3a10 100755 --- a/engine/game_corner_slots.asm +++ b/engine/game_corner_slots.asm @@ -1,5 +1,5 @@ -StartSlotMachine: ; 37e2d (d:7e2d) - ld a, [wTrainerSpriteOffset] +StartSlotMachine: + ld a, [wHiddenObjectFunctionArgument] cp $fd jr z, .printOutOfOrder cp $fe @@ -7,33 +7,33 @@ StartSlotMachine: ; 37e2d (d:7e2d) cp $ff jr z, .printSomeonesKeys callba AbleToPlaySlotsCheck - ld a, [wTrainerSpriteOffset] + ld a, [wCanPlaySlots] and a ret z - ld a, [wUnknownSlotVar] + ld a, [wLuckySlotHiddenObjectIndex] ld b, a - ld a, [wTrainerFacingDirection] + ld a, [wHiddenObjectIndex] inc a cp b - jr z, .asm_37e58 - ld a, $fd - jr .asm_37e5a -.asm_37e58 - ld a, $fa -.asm_37e5a - ld [wcc5b], a + jr z, .match + ld a, 253 + jr .next +.match + ld a, 250 +.next + ld [wSlotMachineSevenAndBarModeChance], a ld a, [H_LOADEDROMBANK] - ld [wcc5e], a + ld [wSlotMachineSavedROMBank], a 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 @@ -41,14 +41,14 @@ StartSlotMachine: ; 37e2d (d:7e2d) call PrintPredefTextID ret -GameCornerOutOfOrderText: ; 37e79 (d:7e79) +GameCornerOutOfOrderText: TX_FAR _GameCornerOutOfOrderText db "@" -GameCornerOutToLunchText: ; 37e7e (d:7e7e) +GameCornerOutToLunchText: TX_FAR _GameCornerOutToLunchText db "@" -GameCornerSomeonesKeysText: ; 37e83 (d:7e83) +GameCornerSomeonesKeysText: TX_FAR _GameCornerSomeonesKeysText db "@" diff --git a/engine/game_corner_slots2.asm b/engine/game_corner_slots2.asm index 66e51237..6bbaf72d 100755 --- a/engine/game_corner_slots2.asm +++ b/engine/game_corner_slots2.asm @@ -1,31 +1,31 @@ -AbleToPlaySlotsCheck ; 2ff09 (b:7f09) +AbleToPlaySlotsCheck: ld a, [wSpriteStateData1 + 2] and $8 jr z, .done ; not able ld b, COIN_CASE - predef IsItemInBag_ ; IsItemInBag_ + predef GetQuantityOfItemInBag 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 call PrintPredefTextID xor a .done - ld [wWhichTrade], a + ld [wCanPlaySlots], a ret -GameCornerCoinCaseText: ; 2ff32 (b:7f32) +GameCornerCoinCaseText: TX_FAR _GameCornerCoinCaseText db "@" -GameCornerNoCoinsText: ; 2ff37 (b:7f37) +GameCornerNoCoinsText: TX_FAR _GameCornerNoCoinsText db "@" diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm index d0f1bbac..5226072b 100755 --- a/engine/gamefreak.asm +++ b/engine/gamefreak.asm @@ -1,94 +1,105 @@ -LoadShootingStarGraphics: ; 70000 (1c:4000) +LoadShootingStarGraphics: 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 + lb bc, BANK(AnimationTileset2), $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 + lb bc, BANK(AnimationTileset2), $01 call CopyVideoData - ld de, FallingStar ; $4190 + ld de, FallingStar ld hl, vChars1 + $220 - ld bc, (BANK(FallingStar) << 8) + $01 + lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / $10 call CopyVideoData - ld hl, GameFreakLogoOAMData ; $4140 + ld hl, GameFreakLogoOAMData ld de, wOAMBuffer + $60 - ld bc, $40 + ld bc, GameFreakLogoOAMDataEnd - GameFreakLogoOAMData call CopyData - ld hl, GameFreakShootingStarOAMData ; $4180 + ld hl, GameFreakShootingStarOAMData ld de, wOAMBuffer - ld bc, $10 + ld bc, GameFreakShootingStarOAMDataEnd - GameFreakShootingStarOAMData jp CopyData -AnimateShootingStar: ; 70044 (1c:4044) +AnimateShootingStar: call LoadShootingStarGraphics - ld a, (SFX_1f_67 - SFX_Headers_1f) / 3 + ld a, SFX_SHOOTING_STAR call PlaySound + +; Move the big star down and left across the screen. ld hl, wOAMBuffer - ld bc, $a004 -.asm_70052 + lb bc, $a0, $4 +.bigStarLoop push hl push bc -.asm_70054 - ld a, [hl] - add $4 +.bigStarInnerLoop + ld a, [hl] ; Y + add 4 ld [hli], a - ld a, [hl] - add $fc + ld a, [hl] ; X + add -4 ld [hli], a inc hl inc hl dec c - jr nz, .asm_70054 - ld c, $1 + jr nz, .bigStarInnerLoop + ld c, 1 call CheckForUserInterruption pop bc pop hl ret c ld a, [hl] - cp $50 - jr nz, .asm_70070 - jr .asm_70052 -.asm_70070 + cp 80 + jr nz, .next + jr .bigStarLoop +.next cp b - jr nz, .asm_70052 + jr nz, .bigStarLoop + +; Clear big star OAM. ld hl, wOAMBuffer - ld c, $4 - ld de, $4 -.asm_7007b - ld [hl], $a0 + ld c, 4 + ld de, 4 +.clearOAMLoop + ld [hl], 160 add hl, de dec c - jr nz, .asm_7007b - ld b, $3 -.asm_70083 - ld hl, rOBP0 ; $ff48 + jr nz, .clearOAMLoop + +; Make Gamefreak logo flash. + ld b, 3 +.flashLogoLoop + ld hl, rOBP0 rrc [hl] rrc [hl] - ld c, $a + ld c, 10 call CheckForUserInterruption ret c dec b - jr nz, .asm_70083 + jr nz, .flashLogoLoop + +; Copy 24 instances of the small stars OAM data. +; Note that their coordinates put them off-screen. ld de, wOAMBuffer - ld a, $18 -.asm_70098 + ld a, 24 +.initSmallStarsOAMLoop push af - ld hl, OAMData_700ee ; $40ee - ld bc, $4 + ld hl, SmallStarsOAM + ld bc, SmallStarsOAMEnd - SmallStarsOAM call CopyData pop af dec a - jr nz, .asm_70098 + jr nz, .initSmallStarsOAMLoop + +; Animate the small stars falling from the Gamefreak logo. xor a - ld [wWhichTrade], a ; wWhichTrade - ld hl, PointerTable_700f2 ; $40f2 - ld c, $6 -.asm_700af + ld [wMoveDownSmallStarsOAMCount], a + ld hl, SmallStarsWaveCoordsPointerTable + ld c, 6 +.smallStarsLoop ld a, [hli] ld e, a ld a, [hli] @@ -96,103 +107,112 @@ AnimateShootingStar: ; 70044 (1c:4044) push bc push hl ld hl, wOAMBuffer + $50 - ld c, $4 -.asm_700ba + ld c, 4 +.smallStarsInnerLoop ; introduce new wave of 4 small stars OAM entries ld a, [de] cp $ff - jr z, .asm_700d5 - ld [hli], a + jr z, .next2 + ld [hli], a ; Y inc de ld a, [de] - ld [hli], a + ld [hli], a ; X inc de inc hl inc hl dec c - jr nz, .asm_700ba - ld a, [wWhichTrade] ; wWhichTrade - cp $18 - jr z, .asm_700d5 - add $6 - ld [wWhichTrade], a ; wWhichTrade -.asm_700d5 - call Func_7011f + jr nz, .smallStarsInnerLoop + ld a, [wMoveDownSmallStarsOAMCount] + cp 24 + jr z, .next2 + add 6 ; should be 4, but the extra 2 aren't visible on screen + ld [wMoveDownSmallStarsOAMCount], a +.next2 + call MoveDownSmallStars push af + +; shift the existing OAM entries down to make room for the next wave ld hl, wOAMBuffer + $10 ld de, wOAMBuffer ld bc, $50 call CopyData + pop af pop hl pop bc ret c dec c - jr nz, .asm_700af + jr nz, .smallStarsLoop and a ret -OAMData_700ee: ; 700ee (1c:40ee) +SmallStarsOAM: db $00,$00,$A2,$90 +SmallStarsOAMEnd: + +SmallStarsWaveCoordsPointerTable: + dw SmallStarsWave1Coords + dw SmallStarsWave2Coords + dw SmallStarsWave3Coords + dw SmallStarsWave4Coords + dw SmallStarsEmptyWave + dw SmallStarsEmptyWave -PointerTable_700f2: ; 700f2 (1c:40f2) - dw OAMData_700fe - dw OAMData_70106 - dw OAMData_7010e - dw OAMData_70116 - dw OAMData_7011e - dw OAMData_7011e +; The stars that fall from the Gamefreak logo come in 4 waves of 4 OAM entries. +; These arrays contain the Y and X coordinates of each OAM entry. -; each entry is only half of an OAM tile -OAMData_700fe: ; 700fe (1c:40fe) +SmallStarsWave1Coords: db $68,$30 db $68,$40 db $68,$58 db $68,$78 -OAMData_70106: ; 70106 (1c:4106) +SmallStarsWave2Coords: db $68,$38 db $68,$48 db $68,$60 db $68,$70 -OAMData_7010e: ; 7010e (1c:410e) +SmallStarsWave3Coords: db $68,$34 db $68,$4C db $68,$54 db $68,$64 -OAMData_70116: ; 70116 (1c:4116) +SmallStarsWave4Coords: db $68,$3C db $68,$5C db $68,$6C db $68,$74 -OAMData_7011e: ; 7011e (1c:411e) +SmallStarsEmptyWave: db $FF -Func_7011f: ; 7011f (1c:411f) - ld b, $8 -.asm_70121 +MoveDownSmallStars: + ld b, 8 +.loop ld hl, wOAMBuffer + $5c - ld a, [wWhichTrade] ; wWhichTrade - ld de, $fffc + ld a, [wMoveDownSmallStarsOAMCount] + ld de, -4 ld c, a -.asm_7012b - inc [hl] +.innerLoop + inc [hl] ; Y add hl, de dec c - jr nz, .asm_7012b - ld a, [rOBP1] ; $ff49 - xor $a0 - ld [rOBP1], a ; $ff49 - ld c, $3 + jr nz, .innerLoop +; Toggle the palette so that the lower star in the small stars tile blinks in +; and out. + ld a, [rOBP1] + xor %10100000 + ld [rOBP1], a + + ld c, 3 call CheckForUserInterruption ret c dec b - jr nz, .asm_70121 + jr nz, .loop ret -GameFreakLogoOAMData: ; 70140 (1c:4140) +GameFreakLogoOAMData: db $48,$50,$8D,$00 db $48,$58,$8E,$00 db $50,$50,$8F,$00 @@ -209,12 +229,15 @@ GameFreakLogoOAMData: ; 70140 (1c:4140) db $60,$68,$83,$00 db $60,$70,$81,$00 db $60,$78,$86,$00 +GameFreakLogoOAMDataEnd: -GameFreakShootingStarOAMData: ; 70180 (1c:4180) +GameFreakShootingStarOAMData: db $00,$A0,$A0,$10 db $00,$A8,$A0,$30 db $08,$A0,$A1,$10 db $08,$A8,$A1,$30 +GameFreakShootingStarOAMDataEnd: -FallingStar: ; 70190 (1c:4190) +FallingStar: INCBIN "gfx/falling_star.2bpp" +FallingStarEnd: diff --git a/engine/get_bag_item_quantity.asm b/engine/get_bag_item_quantity.asm new file mode 100644 index 00000000..f10df1a0 --- /dev/null +++ b/engine/get_bag_item_quantity.asm @@ -0,0 +1,18 @@ +GetQuantityOfItemInBag: +; In: b = item ID +; Out: b = how many of that item are in the bag + call GetPredefRegisters + ld hl, wNumBagItems +.loop + inc hl + ld a, [hli] + cp $ff + jr z, .notInBag + cp b + jr nz, .loop + ld a, [hl] + ld b, a + ret +.notInBag + ld b, 0 + ret diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm index 64876d22..49596782 100755 --- a/engine/give_pokemon.asm +++ b/engine/give_pokemon.asm @@ -1,54 +1,57 @@ -_GivePokemon: ; 4fda5 (13:7da5) +_GivePokemon: +; returns success in carry +; and whether the mon was added to the party in [wAddedToParty] call EnableAutoTextBoxDrawing xor a - ld [wccd3], a - ld a, [wPartyCount] ; wPartyCount + ld [wAddedToParty], a + ld a, [wPartyCount] cp PARTY_LENGTH - jr c, .asm_4fe01 - ld a, [W_NUMINBOX] ; wda80 + jr c, .addToParty + ld a, [wNumInBox] cp MONS_PER_BOX - jr nc, .asm_4fdf9 + jr nc, .boxFull +; add to box xor a - ld [W_ENEMYBATTSTATUS3], a ; W_ENEMYBATTSTATUS3 + ld [wEnemyBattleStatus3], a ld a, [wcf91] ld [wEnemyMonSpecies2], a callab LoadEnemyMonData call SetPokedexOwnedFlag callab SendNewMonToBox ld hl, wcf4b - ld a, [wd5a0] + ld a, [wCurrentBoxNum] and $7f cp 9 - jr c, .asm_4fdec + jr c, .singleDigitBoxNum sub 9 ld [hl], "1" inc hl add "0" - jr .asm_4fdee -.asm_4fdec + jr .next +.singleDigitBoxNum add "1" -.asm_4fdee +.next ld [hli], a ld [hl], "@" ld hl, SetToBoxText call PrintText scf ret -.asm_4fdf9 +.boxFull ld hl, BoxIsFullText call PrintText and a ret -.asm_4fe01 +.addToParty call SetPokedexOwnedFlag call AddPartyMon - ld a, $1 + ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld [wccd3], a + ld [wAddedToParty], a scf ret -SetPokedexOwnedFlag: ; 4fe11 (13:7e11) +SetPokedexOwnedFlag: ld a, [wcf91] push af ld [wd11e], a @@ -56,8 +59,8 @@ SetPokedexOwnedFlag: ; 4fe11 (13:7e11) ld a, [wd11e] dec a ld c, a - ld hl, wPokedexOwned ; wPokedexOwned - ld b, $1 + ld hl, wPokedexOwned + ld b, FLAG_SET predef FlagActionPredef pop af ld [wd11e], a @@ -65,15 +68,15 @@ SetPokedexOwnedFlag: ; 4fe11 (13:7e11) ld hl, GotMonText jp PrintText -GotMonText: ; 4fe39 (13:7e39) +GotMonText: TX_FAR _GotMonText - db $0b + TX_SFX_ITEM_1 db "@" -SetToBoxText: ; 4fe3f (13:7e3f) +SetToBoxText: TX_FAR _SetToBoxText db "@" -BoxIsFullText: ; 4fe44 (13:7e44) +BoxIsFullText: TX_FAR _BoxIsFullText db "@" diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index 30979118..9eb4edc5 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -1,5 +1,5 @@ -AnimateHallOfFame: ; 701a0 (1c:41a0) - call Func_70423 +AnimateHallOfFame: + call HoFFadeOutScreenAndMusic call ClearScreen ld c, 100 call DelayFrames @@ -8,10 +8,10 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) call DisableLCD ld hl,vBGMap0 ld bc, $800 - ld a, $7f + ld a, " " call FillMemory call EnableLCD - ld hl, rLCDC ; $ff40 + ld hl, rLCDC set 3, [hl] xor a ld hl, wHallOfFame @@ -20,17 +20,17 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) xor a ld [wUpdateSpritesEnabled], a ld [hTilesetType], a - ld [W_SPRITEFLIPPED], a - ld [wd358], a - ld [wTrainerScreenY], a + ld [wSpriteFlipped], a + ld [wLetterPrintingDelayFlags], a ; no delay + ld [wHoFMonOrPlayer], a ; mon inc a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld hl, wd5a2 + ld [H_AUTOBGTRANSFERENABLED], a + ld hl, wNumHoFTeams ld a, [hl] inc a - jr z, .asm_701eb + jr z, .skipInc ; don't wrap around to 0 inc [hl] -.asm_701eb +.skipInc ld a, $90 ld [hWY], a ld c, BANK(Music_HallOfFame) @@ -38,30 +38,30 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) call PlayMusic ld hl, wPartySpecies ld c, $ff -.asm_701fb +.partyMonLoop ld a, [hli] cp $ff - jr z, .asm_70241 + jr z, .doneShowingParty inc c push hl push bc - ld [wWhichTrade], a ; wWhichTrade + ld [wHoFMonSpecies], a ld a, c - ld [wTrainerEngageDistance], a - ld hl, wPartyMon1Level ; wPartyMon1Level + ld [wHoFPartyMonIndex], a + 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 [wHoFMonLevel], a + call HoFShowMonOrPlayer + call HoFDisplayAndRecordMonInfo + ld c, 80 call DelayFrames - hlCoord 2, 13 - ld b, $3 - ld c, $e + coord hl, 2, 13 + ld b, 3 + ld c, 14 call TextBoxBorder - hlCoord 4, 15 + coord hl, 4, 15 ld de, HallOfFameText call PlaceString ld c, 180 @@ -69,8 +69,8 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) call GBFadeOutToWhite pop bc pop hl - jr .asm_701fb -.asm_70241 + jr .partyMonLoop +.doneShowingParty ld a, c inc a ld hl, wHallOfFame @@ -79,117 +79,120 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) ld [hl], $ff call SaveHallOfFameTeams xor a - ld [wWhichTrade], a ; wWhichTrade + ld [wHoFMonSpecies], a inc a - ld [wTrainerScreenY], a - call Func_70278 - call Func_70377 - call Func_70423 + ld [wHoFMonOrPlayer], a ; player + call HoFShowMonOrPlayer + call HoFDisplayPlayerStats + call HoFFadeOutScreenAndMusic xor a ld [hWY], a - ld hl, rLCDC ; $ff40 + ld hl, rLCDC res 3, [hl] ret -HallOfFameText: ; 7026b (1c:426b) +HallOfFameText: db "HALL OF FAME@" -Func_70278: ; 70278 (1c:4278) +HoFShowMonOrPlayer: call ClearScreen ld a, $d0 ld [hSCY], a ld a, $c0 ld [hSCX], a - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wHoFMonSpecies] ld [wcf91], a ld [wd0b5], a ld [wBattleMonSpecies2], a - ld [wcf1d], a - ld a, [wTrainerScreenY] + ld [wWholeScreenPaletteMonSpecies], a + ld a, [wHoFMonOrPlayer] and a - jr z, .asm_7029d - call Func_7033e - jr .asm_702ab -.asm_7029d - hlCoord 12, 5 + jr z, .showMon +; show player + call HoFLoadPlayerPics + jr .next1 +.showMon + coord hl, 12, 5 call GetMonHeader call LoadFrontSpriteByMonIndex predef LoadMonBackPic -.asm_702ab - ld b, $b - ld c, $0 - call GoPAL_SET - ld a, $e4 - ld [rBGP], a ; $ff47 - ld c, $31 - call Func_7036d +.next1 + ld b, SET_PAL_POKEMON_WHOLE_SCREEN + ld c, 0 + call RunPaletteCommand + ld a, %11100100 + ld [rBGP], a + ld c, $31 ; back pic + call HoFLoadMonPlayerPicTileIDs ld d, $a0 - ld e, $4 + ld e, 4 ld a, [wOnSGB] and a - jr z, .asm_702c7 - sla e -.asm_702c7 - call .asm_702d5 + jr z, .next2 + sla e ; scroll more slowly on SGB +.next2 + call .ScrollPic ; scroll back pic left xor a ld [hSCY], a - ld c, a - call Func_7036d - ld d, $0 - ld e, $fc -.asm_702d5 + ld c, a ; front pic + call HoFLoadMonPlayerPicTileIDs + ld d, 0 + ld e, -4 +; scroll front pic right + +.ScrollPic call DelayFrame ld a, [hSCX] add e ld [hSCX], a cp d - jr nz, .asm_702d5 + jr nz, .ScrollPic ret -Func_702e1: ; 702e1 (1c:42e1) - ld a, [wTrainerEngageDistance] - ld hl, wPartyMonNicks ; wPartyMonNicks +HoFDisplayAndRecordMonInfo: + ld a, [wHoFPartyMonIndex] + ld hl, wPartyMonNicks call GetPartyMonName - call Func_702f0 - jp Func_70404 + call HoFDisplayMonInfo + jp HoFRecordMonInfo -Func_702f0: ; 702f0 (1c:42f0) - hlCoord 0, 2 - ld b, $9 - ld c, $a +HoFDisplayMonInfo: + coord hl, 0, 2 + ld b, 9 + ld c, 10 call TextBoxBorder - hlCoord 2, 6 + coord hl, 2, 6 ld de, HoFMonInfoText call PlaceString - hlCoord 1, 4 + coord hl, 1, 4 ld de, wcd6d call PlaceString - ld a, [wTrainerFacingDirection] - hlCoord 8, 7 + ld a, [wHoFMonLevel] + coord hl, 8, 7 call PrintLevelCommon - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wHoFMonSpecies] ld [wd0b5], a - hlCoord 3, 9 + coord hl, 3, 9 predef PrintMonType - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wHoFMonSpecies] jp PlayCry -HoFMonInfoText: ; 70329 (1c:4329) +HoFMonInfoText: db "LEVEL/" next "TYPE1/" next "TYPE2/@" -Func_7033e: ; 7033e (1c:433e) - ld de, RedPicFront ; $6ede +HoFLoadPlayerPics: + ld de, RedPicFront ld a, BANK(RedPicFront) call UncompressSpriteFromDE - ld hl, S_SPRITEBUFFER1 - ld de, $a000 + ld hl, sSpriteBuffer1 + ld de, sSpriteBuffer0 ld bc, $310 call CopyData ld de, vFrontPic call InterlaceMergeSpriteBuffers - ld de, RedPicBack ; $7e0a + ld de, RedPicBack ld a, BANK(RedPicBack) call UncompressSpriteFromDE predef ScaleSpriteByTwo @@ -197,89 +200,89 @@ Func_7033e: ; 7033e (1c:433e) call InterlaceMergeSpriteBuffers ld c, $1 -Func_7036d: ; 7036d (1c:436d) - ld b, $0 - hlCoord 12, 5 +HoFLoadMonPlayerPicTileIDs: +; c = base tile ID + ld b, 0 + coord hl, 12, 5 predef_jump CopyTileIDsFromList -Func_70377: ; 70377 (1c:4377) - ld hl, wd747 - set 3, [hl] +HoFDisplayPlayerStats: + SetEvent EVENT_HALL_OF_FAME_DEX_RATING predef DisplayDexRating - hlCoord 0, 4 - ld b, $6 - ld c, $a + coord hl, 0, 4 + ld b, 6 + ld c, 10 call TextBoxBorder - hlCoord 5, 0 - ld b, $2 - ld c, $9 + coord hl, 5, 0 + ld b, 2 + ld c, 9 call TextBoxBorder - hlCoord 7, 2 - ld de, wPlayerName ; wd158 + coord hl, 7, 2 + ld de, wPlayerName call PlaceString - hlCoord 1, 6 + coord hl, 1, 6 ld de, HoFPlayTimeText call PlaceString - hlCoord 5, 7 - ld de, W_PLAYTIMEHOURS + 1 - ld bc, $103 + coord hl, 5, 7 + ld de, wPlayTimeHours + lb bc, 1, 3 call PrintNumber ld [hl], $6d inc hl - ld de, W_PLAYTIMEMINUTES + 1 - ld bc, $8102 + ld de, wPlayTimeMinutes + lb bc, LEADING_ZEROES | 1, 2 call PrintNumber - hlCoord 1, 9 + coord hl, 1, 9 ld de, HoFMoneyText call PlaceString - hlCoord 4, 10 - ld de, wPlayerMoney ; wPlayerMoney + coord hl, 4, 10 + ld de, wPlayerMoney ld c, $a3 call PrintBCDNumber ld hl, DexSeenOwnedText - call Func_703e2 + call HoFPrintTextAndDelay ld hl, DexRatingText - call Func_703e2 - ld hl, wcc5d + call HoFPrintTextAndDelay + ld hl, wDexRatingText -Func_703e2: ; 703e2 (1c:43e2) +HoFPrintTextAndDelay: call PrintText - ld c, $78 + ld c, 120 jp DelayFrames -HoFPlayTimeText: ; 703ea (1c:43ea) +HoFPlayTimeText: db "PLAY TIME@" -HoFMoneyText: ; 703f4 (1c:43f4) +HoFMoneyText: db "MONEY@" -DexSeenOwnedText: ; 703fa (1c:43fa) +DexSeenOwnedText: TX_FAR _DexSeenOwnedText db "@" -DexRatingText: ; 703ff (1c:43ff) +DexRatingText: TX_FAR _DexRatingText db "@" -Func_70404: ; 70404 (1c:4404) +HoFRecordMonInfo: ld hl, wHallOfFame ld bc, HOF_MON - ld a, [wTrainerEngageDistance] + ld a, [wHoFPartyMonIndex] call AddNTimes - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wHoFMonSpecies] ld [hli], a - ld a, [wTrainerFacingDirection] + ld a, [wHoFMonLevel] ld [hli], a ld e, l ld d, h ld hl, wcd6d - ld bc, $b + ld bc, NAME_LENGTH jp CopyData -Func_70423: ; 70423 (1c:4423) - ld a, $a - ld [wcfc8], a - ld [wcfc9], a +HoFFadeOutScreenAndMusic: + ld a, 10 + ld [wAudioFadeOutCounterReloadValue], a + ld [wAudioFadeOutCounter], a ld a, $ff - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a jp GBFadeOutToWhite diff --git a/engine/heal_party.asm b/engine/heal_party.asm new file mode 100644 index 00000000..7aaa1bd1 --- /dev/null +++ b/engine/heal_party.asm @@ -0,0 +1,99 @@ +HealParty: +; Restore HP and PP. + + ld hl, wPartySpecies + ld de, wPartyMon1HP +.healmon + ld a, [hli] + cp $ff + jr z, .done + + push hl + push de + + ld hl, wPartyMon1Status - wPartyMon1HP + add hl, de + xor a + ld [hl], a + + push de + ld b, NUM_MOVES ; A Pokémon has 4 moves +.pp + ld hl, wPartyMon1Moves - wPartyMon1HP + add hl, de + + ld a, [hl] + and a + jr z, .nextmove + + dec a + ld hl, wPartyMon1PP - wPartyMon1HP + add hl, de + + push hl + push de + push bc + + ld hl, Moves + ld bc, MoveEnd - Moves + call AddNTimes + ld de, wcd6d + ld a, BANK(Moves) + call FarCopyData + ld a, [wcd6d + 5] ; PP is byte 5 of move data + + pop bc + pop de + pop hl + + inc de + push bc + ld b, a + ld a, [hl] + and $c0 + add b + ld [hl], a + pop bc + +.nextmove + dec b + jr nz, .pp + pop de + + ld hl, wPartyMon1MaxHP - wPartyMon1HP + add hl, de + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + + pop de + pop hl + + push hl + ld bc, wPartyMon2 - wPartyMon1 + ld h, d + ld l, e + add hl, bc + ld d, h + ld e, l + pop hl + jr .healmon + +.done + xor a + ld [wWhichPokemon], a + ld [wd11e], a + + ld a, [wPartyCount] + ld b, a +.ppup + push bc + call RestoreBonusPP + pop bc + ld hl, wWhichPokemon + inc [hl] + dec b + jr nz, .ppup + ret diff --git a/engine/hidden_object_functions14.asm b/engine/hidden_object_functions14.asm index a162c905..f8cdf44e 100755 --- a/engine/hidden_object_functions14.asm +++ b/engine/hidden_object_functions14.asm @@ -1,17 +1,17 @@ -PrintNotebookText: ; 52996 (14:6996) +PrintNotebookText: call EnableAutoTextBoxDrawing ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld a, [wTrainerSpriteOffset] + ld a, [wHiddenObjectFunctionArgument] jp PrintPredefTextID -TMNotebook: ; 529a4 (14:69a4) +TMNotebook: TX_FAR TMNotebookText - db $0d + TX_WAIT db "@" -ViridianSchoolNotebook: ; 529aa (14:69aa) - db $08 ; asm +ViridianSchoolNotebook: + TX_ASM ld hl, ViridianSchoolNotebookText1 call PrintText call TurnPageSchoolNotebook @@ -31,7 +31,7 @@ ViridianSchoolNotebook: ; 529aa (14:69aa) .doneReading jp TextScriptEnd -TurnPageSchoolNotebook: ; 529db (14:69db) +TurnPageSchoolNotebook: ld hl, TurnPageText call PrintText call YesNoChoice @@ -39,66 +39,62 @@ TurnPageSchoolNotebook: ; 529db (14:69db) and a ret -TurnPageText: ; 529e9 (14:69e9) +TurnPageText: TX_FAR _TurnPageText db "@" -ViridianSchoolNotebookText5: ; 529ee (14:69ee) +ViridianSchoolNotebookText5: TX_FAR _ViridianSchoolNotebookText5 - db $0d + TX_WAIT db "@" -ViridianSchoolNotebookText1: ; 529f4 (14:69f4) +ViridianSchoolNotebookText1: TX_FAR _ViridianSchoolNotebookText1 db "@" -ViridianSchoolNotebookText2: ; 529f9 (14:69f9) +ViridianSchoolNotebookText2: TX_FAR _ViridianSchoolNotebookText2 db "@" -ViridianSchoolNotebookText3: ; 529fe (14:69fe) +ViridianSchoolNotebookText3: TX_FAR _ViridianSchoolNotebookText3 db "@" -ViridianSchoolNotebookText4: ; 52a03 (14:6a03) +ViridianSchoolNotebookText4: TX_FAR _ViridianSchoolNotebookText4 db "@" -PrintFightingDojoText2: ; 52a08 (14:6a08) +PrintFightingDojoText2: call EnableAutoTextBoxDrawing - ld a, $37 - jp PrintPredefTextID + tx_pre_jump EnemiesOnEverySideText -FightingDojoText_52a10: ; 52a10 (14:6a10) - TX_FAR _FightingDojoText_52a10 +EnemiesOnEverySideText: + TX_FAR _EnemiesOnEverySideText db "@" -PrintFightingDojoText3: ; 52a15 (14:6a15) +PrintFightingDojoText3: call EnableAutoTextBoxDrawing - ld a, $38 - jp PrintPredefTextID + tx_pre_jump WhatGoesAroundComesAroundText -FightingDojoText_52a1d: ; 52a1d (14:6a1d) - TX_FAR _FightingDojoText_52a1d +WhatGoesAroundComesAroundText: + TX_FAR _WhatGoesAroundComesAroundText db "@" -PrintFightingDojoText: ; 52a22 (14:6a22) +PrintFightingDojoText: call EnableAutoTextBoxDrawing - ld a, $36 - jp PrintPredefTextID + tx_pre_jump FightingDojoText -FightingDojoText: ; 52a2a (14:6a2a) +FightingDojoText: TX_FAR _FightingDojoText db "@" -PrintIndigoPlateauHQText: ; 52a2f (14:6a2f) +PrintIndigoPlateauHQText: 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) +IndigoPlateauHQText: TX_FAR _IndigoPlateauHQText db "@" diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm index 9dbcbf98..1b571d35 100755 --- a/engine/hidden_object_functions17.asm +++ b/engine/hidden_object_functions17.asm @@ -1,67 +1,62 @@ -PrintRedsNESText: ; 5db79 (17:5b79) +PrintRedSNESText: call EnableAutoTextBoxDrawing - ld a, $4 ; RedBedroomSNESText - jp PrintPredefTextID + tx_pre_jump RedBedroomSNESText -RedBedroomSNESText: ; 5db81 (17:5b81) +RedBedroomSNESText: TX_FAR _RedBedroomSNESText db "@" -OpenRedsPC: ; 5db86 (17:5b86) +OpenRedsPC: call EnableAutoTextBoxDrawing - ld a, $3 - jp PrintPredefTextID + tx_pre_jump RedBedroomPCText -RedBedroomPC: ; 5db8e (17:5b8e) - db $fc ; FuncTX_ItemStoragePC +RedBedroomPCText: + TX_PLAYERS_PC -Route15GateLeftBinoculars: ; 5db8f (17:5b8f) +Route15GateLeftBinoculars: 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 jp DisplayMonFrontSpriteInBox -Route15UpstairsBinocularsText: ; 5dba8 (17:5ba8) +Route15UpstairsBinocularsText: TX_FAR _Route15UpstairsBinocularsText db "@" -AerodactylFossil: ; 5dbad (17:5bad) +AerodactylFossil: ld a, FOSSIL_AERODACTYL ld [wcf91], a call DisplayMonFrontSpriteInBox call EnableAutoTextBoxDrawing - ld a, $9 - call PrintPredefTextID + tx_pre AerodactylFossilText ret -AerodactylFossilText: ; 5dbbe (17:5bbe) +AerodactylFossilText: TX_FAR _AerodactylFossilText db "@" -KabutopsFossil: ; 5bdc3 (17:5bc3) +KabutopsFossil: ld a, FOSSIL_KABUTOPS ld [wcf91], a call DisplayMonFrontSpriteInBox call EnableAutoTextBoxDrawing - ld a, $b - call PrintPredefTextID + tx_pre KabutopsFossilText ret -KabutopsFossilText: ; 5dbd4 (17:5bd4) +KabutopsFossilText: TX_FAR _KabutopsFossilText db "@" -DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9) +DisplayMonFrontSpriteInBox: ; 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 a, 1 + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a ld [hWY], a @@ -76,9 +71,9 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9) ld de, vChars1 + $310 call LoadMonFrontSprite ld a, $80 - ld [$ffe1], a - hlCoord 10, 11 - predef Func_3f073 + ld [hStartTileID], a + coord hl, 10, 11 + predef AnimateSendingOutMon call WaitForTextScrollButtonPress call LoadScreenTilesFromBuffer1 call Delay3 @@ -86,267 +81,267 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9) ld [hWY], a ret -PrintBlackboardLinkCableText: ; 5dc1a (17:5c1a) +PrintBlackboardLinkCableText: call EnableAutoTextBoxDrawing ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld a, [wWhichTrade] + ld a, [wHiddenObjectFunctionArgument] call PrintPredefTextID ret -LinkCableHelp: ; 5dc29 (17:5c29) - db $08 ; asm +LinkCableHelp: + TX_ASM call SaveScreenTilesToBuffer1 ld hl, LinkCableHelpText1 call PrintText xor a - ld [W_ANIMATIONID], a + ld [wMenuItemOffset], a ; not used ld [wCurrentMenuItem], a ld [wLastMenuItem], a - ld a, $3 + ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a - ld a, $3 + ld a, 3 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a -.asm_5c51 +.linkHelpLoop ld hl, wd730 set 6, [hl] - ld hl, wTileMap - ld b, $8 - ld c, $d + coord hl, 0, 0 + ld b, 8 + ld c, 13 call TextBoxBorder - ld hl, wTileMap + $2a + coord hl, 2, 2 ld de, HowToLinkText call PlaceString ld hl, LinkCableHelpText2 call PrintText call HandleMenuInput - bit 1, a - jr nz, .asm_5dc93 ; 0x5dc74 $1d + bit 1, a ; pressed b + jr nz, .exit ld a, [wCurrentMenuItem] - cp $3 - jr z, .asm_5dc93 ; 0x5dc7b $16 + cp 3 ; pressed a on "STOP READING" + jr z, .exit ld hl, wd730 res 6, [hl] ld hl, LinkCableInfoTexts add a - ld d, $0 + ld d, 0 ld e, a add hl, de ld a, [hli] ld h, [hl] ld l, a call PrintText - jp .asm_5c51 -.asm_5dc93 + jp .linkHelpLoop +.exit ld hl, wd730 res 6, [hl] call LoadScreenTilesFromBuffer1 jp TextScriptEnd -LinkCableHelpText1: ; 5dc9e (17:5c9e) +LinkCableHelpText1: TX_FAR _LinkCableHelpText1 db "@" -LinkCableHelpText2: ; 5dca3 (17:5ca3) +LinkCableHelpText2: TX_FAR _LinkCableHelpText2 db "@" -HowToLinkText: ; 5dca8 (17:5ca8) +HowToLinkText: db "HOW TO LINK" next "COLOSSEUM" next "TRADE CENTER" next "STOP READING@" -LinkCableInfoTexts: ; 5dcd8 (17:5cd8) +LinkCableInfoTexts: dw LinkCableInfoText1 dw LinkCableInfoText2 dw LinkCableInfoText3 -LinkCableInfoText1: ; 5dcde (17:5cde) +LinkCableInfoText1: TX_FAR _LinkCableInfoText1 db "@" -LinkCableInfoText2: ; 5dce3 (17:5ce3) +LinkCableInfoText2: TX_FAR _LinkCableInfoText2 db "@" -LinkCableInfoText3: ; 5dce8 (17:5ce8) +LinkCableInfoText3: TX_FAR _LinkCableInfoText3 db "@" -ViridianSchoolBlackboard: ; 5dced (17:5ced) - db $08 ; asm +ViridianSchoolBlackboard: + TX_ASM call SaveScreenTilesToBuffer1 ld hl, ViridianSchoolBlackboardText1 call PrintText xor a - ld [W_ANIMATIONID], a + ld [wMenuItemOffset], a ld [wCurrentMenuItem], a ld [wLastMenuItem], a - ld a, $33 + ld a, D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a - ld a, $2 + ld a, 2 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a -.asm_5dd15 +.blackboardLoop ld hl, wd730 set 6, [hl] - ld hl, wTileMap - ld bc, $060a + coord hl, 0, 0 + lb bc, 6, 10 call TextBoxBorder - ld hl, wTileMap + $29 + coord hl, 1, 2 ld de, StatusAilmentText1 call PlaceString - ld hl, wTileMap + $2e + coord hl, 6, 2 ld de, StatusAilmentText2 call PlaceString ld hl, ViridianSchoolBlackboardText2 call PrintText - call HandleMenuInput - bit 1, a + call HandleMenuInput ; pressing up and down is handled in here + bit 1, a ; pressed b jr nz, .exitBlackboard - bit 4, a - jr z, .asm_5dd5c - ld a, $2 + bit 4, a ; pressed right + jr z, .didNotPressRight + ; move cursor to right column + ld a, 2 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $6 + ld a, 6 ld [wTopMenuItemX], a - ld a, $3 - ld [W_ANIMATIONID], a - jr .asm_5dd15 -.asm_5dd5c - bit 5, a - jr z, .asm_5dd75 - ld a, $2 + ld a, 3 ; in the the right column, use an offset to prevent overlap + ld [wMenuItemOffset], a + jr .blackboardLoop +.didNotPressRight + bit 5, a ; pressed left + jr z, .didNotPressLeftOrRight + ; move cursor to left column + ld a, 2 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a xor a - ld [W_ANIMATIONID], a - jr .asm_5dd15 -.asm_5dd75 + ld [wMenuItemOffset], a + jr .blackboardLoop +.didNotPressLeftOrRight ld a, [wCurrentMenuItem] ld b, a - ld a, [W_ANIMATIONID] + ld a, [wMenuItemOffset] add b - cp $5 + cp 5 ; cursor is pointing to "QUIT" jr z, .exitBlackboard + ; we must have pressed a on a status condition + ; so print the text ld hl, wd730 res 6, [hl] ld hl, ViridianBlackboardStatusPointers add a - ld d, $0 + ld d, 0 ld e, a add hl, de ld a, [hli] ld h, [hl] ld l, a call PrintText - jp .asm_5dd15 + jp .blackboardLoop .exitBlackboard ld hl, wd730 res 6, [hl] call LoadScreenTilesFromBuffer1 jp TextScriptEnd -ViridianSchoolBlackboardText1: ; 5dda2 (17:5da2) +ViridianSchoolBlackboardText1: TX_FAR _ViridianSchoolBlackboardText1 db "@" -ViridianSchoolBlackboardText2: ; 5dda7 (17:5da7) +ViridianSchoolBlackboardText2: TX_FAR _ViridianSchoolBlackboardText2 db "@" -StatusAilmentText1: ; 5ddac (17:5dac) +StatusAilmentText1: db " SLP" next " PSN" next " PAR@" -StatusAilmentText2: ; 5ddbb (17:5dbb) +StatusAilmentText2: db " BRN" next " FRZ" next " QUIT@@" -ViridianBlackboardStatusPointers: ; 5ddcc (17:5ddc) +ViridianBlackboardStatusPointers: dw ViridianBlackboardSleepText dw ViridianBlackboardPoisonText - dw ViridianBlackbaordPrlzText + dw ViridianBlackboardPrlzText dw ViridianBlackboardBurnText dw ViridianBlackboardFrozenText -ViridianBlackboardSleepText: ; 5ddd6 (17:5dd6) +ViridianBlackboardSleepText: TX_FAR _ViridianBlackboardSleepText db "@" -ViridianBlackboardPoisonText: ; 5dddb (17:5ddb) +ViridianBlackboardPoisonText: TX_FAR _ViridianBlackboardPoisonText db "@" -ViridianBlackbaordPrlzText: ; 5dde0 (17:5de0) - TX_FAR _ViridianBlackbaordPrlzText +ViridianBlackboardPrlzText: + TX_FAR _ViridianBlackboardPrlzText db "@" -ViridianBlackboardBurnText: ; 5dde5 (17:5de5) +ViridianBlackboardBurnText: TX_FAR _ViridianBlackboardBurnText db "@" -ViridianBlackboardFrozenText: ; 5ddea (17:5dea) +ViridianBlackboardFrozenText: TX_FAR _ViridianBlackboardFrozenText db "@" -PrintTrashText: ; 5ddef (17:5def) +PrintTrashText: call EnableAutoTextBoxDrawing - ld a, $26 - jp PrintPredefTextID + tx_pre_jump VermilionGymTrashText -VermilionGymTrashText: ; 5ddf7 (17:5df7) +VermilionGymTrashText: TX_FAR _VermilionGymTrashText db "@" -GymTrashScript: ; 5ddfc (17:5dfc) +GymTrashScript: call EnableAutoTextBoxDrawing - ld a, [wWhichTrade] ; wWhichTrade - ld [wcd5b], a + ld a, [wHiddenObjectFunctionArgument] + ld [wGymTrashCanIndex], a ; Don't do the trash can puzzle if it's already been done. - ld a, [wd773] - bit 0, a + CheckEvent EVENT_2ND_LOCK_OPENED jr z, .ok - ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash) - jp PrintPredefTextID + tx_pre_jump VermilionGymTrashText .ok - bit 1, a + CheckEventReuseA EVENT_1ST_LOCK_OPENED jr nz, .trySecondLock - ld a, [wd743] + ld a, [wFirstLockTrashCanIndex] ld b, a - ld a, [wcd5b] + ld a, [wGymTrashCanIndex] cp b jr z, .openFirstLock - ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash) + tx_pre_id VermilionGymTrashText jr .done .openFirstLock ; Next can is trying for the second switch. - ld hl, wd773 - set 1, [hl] + SetEvent EVENT_1ST_LOCK_OPENED - ld hl, GymTrashCans ; $5e7d - ld a, [wcd5b] + ld hl, GymTrashCans + ld a, [wGymTrashCanIndex] ; * 5 ld b, a add a @@ -358,12 +353,21 @@ GymTrashScript: ; 5ddfc (17:5dfc) add hl, de ld a, [hli] - ld [$ffdb], a +; There is a bug in this code. It should calculate a value in the range [0, 3] +; but if the mask and random number don't have any 1 bits in common, then +; the result of the AND will be 0. When 1 is subtracted from that, the value +; will become $ff. This will result in 255 being added to hl, which will cause +; hl to point to one of the zero bytes that pad the end of the ROM bank. +; Trash can 0 was intended to be able to have the second lock only when the +; first lock was in trash can 1 or 3. However, due to this bug, trash can 0 can +; have the second lock regardless of which trash can had the first lock. + + ld [hGymTrashCanRandNumMask], a push hl call Random swap a ld b, a - ld a, [$ffdb] + ld a, [hGymTrashCanRandNumMask] and b dec a pop hl @@ -373,42 +377,46 @@ GymTrashScript: ; 5ddfc (17:5dfc) add hl, de ld a, [hl] and $f - ld [wd744], a + ld [wSecondLockTrashCanIndex], a - ld a, $3b ; DisplayTextID $3b = VermilionGymTrashSuccesText1 (first lock opened!) + tx_pre_id VermilionGymTrashSuccessText1 jr .done .trySecondLock - ld a, [wd744] + ld a, [wSecondLockTrashCanIndex] ld b, a - ld a, [wcd5b] + ld a, [wGymTrashCanIndex] cp b jr z, .openSecondLock ; Reset the cans. - ld hl, wd773 - res 1, [hl] + ResetEvent EVENT_1ST_LOCK_OPENED call Random and $e - ld [wd743], a + ld [wFirstLockTrashCanIndex], a - ld a, $3e ; DisplayTextID $3e = VermilionGymTrashFailText (locks reset!) + tx_pre_id VermilionGymTrashFailText jr .done .openSecondLock ; Completed the trash can puzzle. - ld hl, wd773 - set 0, [hl] - ld hl, wd126 + SetEvent EVENT_2ND_LOCK_OPENED + ld hl, wCurrentMapScriptFlags set 6, [hl] - ld a, $3d ; DisplayTextID $3d = VermilionGymTrashSuccesText3 (2nd lock opened!) + tx_pre_id VermilionGymTrashSuccessText3 .done jp PrintPredefTextID -GymTrashCans: ; 5de7d (17:5e7d) +GymTrashCans: +; byte 0: mask for random number +; bytes 1-4: indices of the trash cans that can have the second lock +; (but see the comment above explaining a bug regarding this) +; Note that the mask is simply the number of valid trash can indices that +; follow. The remaining bytes are filled with 0 to pad the length of each entry +; to 5 bytes. db 2, 1, 3, 0, 0 ; 0 db 3, 0, 2, 4, 0 ; 1 db 2, 1, 5, 0, 0 ; 2 @@ -424,43 +432,44 @@ GymTrashCans: ; 5de7d (17:5e7d) db 2, 9, 13, 0, 0 ; 12 db 3, 10, 12, 14, 0 ; 13 db 2, 11, 13, 0, 0 ; 14 -; 5dec8 -VermilionGymTrashSuccesText1: ; 5dec8 (17:5ec8) - TX_FAR _VermilionGymTrashSuccesText1 - db $08 ; asm +VermilionGymTrashSuccessText1: + TX_FAR _VermilionGymTrashSuccessText1 + TX_ASM call WaitForSoundToFinish - ld a, (SFX_02_49 - SFX_Headers_02) / 3 + ld a, SFX_SWITCH call PlaySound call WaitForSoundToFinish jp TextScriptEnd -VermilionGymTrashSuccesText2: ; 5dedb (17:5edb) - TX_FAR _VermilionGymTrashSuccesText2 +; unused +VermilionGymTrashSuccessText2: + TX_FAR _VermilionGymTrashSuccessText2 db "@" -UnnamedText_5dee0: ; 5dee0 (17:5ee0) - db $08 ; asm +; unused +VermilionGymTrashSuccesPlaySfx: + TX_ASM call WaitForSoundToFinish - ld a, (SFX_02_49 - SFX_Headers_02) / 3 + ld a, SFX_SWITCH call PlaySound call WaitForSoundToFinish jp TextScriptEnd -VermilionGymTrashSuccesText3: ; 5deef (17:5eef) - TX_FAR _VermilionGymTrashSuccesText3 - db $08 ; asm +VermilionGymTrashSuccessText3: + TX_FAR _VermilionGymTrashSuccessText3 + TX_ASM call WaitForSoundToFinish - ld a, (SFX_02_57 - SFX_Headers_02) / 3 + ld a, SFX_GO_INSIDE call PlaySound call WaitForSoundToFinish jp TextScriptEnd -VermilionGymTrashFailText: ; 5df02 (17:5f02) +VermilionGymTrashFailText: TX_FAR _VermilionGymTrashFailText - db $08 ; asm + TX_ASM call WaitForSoundToFinish - ld a, (SFX_02_51 - SFX_Headers_02) / 3 + ld a, SFX_DENIED call PlaySound call WaitForSoundToFinish jp TextScriptEnd diff --git a/engine/hidden_object_functions18.asm b/engine/hidden_object_functions18.asm index 7696626f..c6fb3109 100755 --- a/engine/hidden_object_functions18.asm +++ b/engine/hidden_object_functions18.asm @@ -1,34 +1,34 @@ -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 +GymStatues: +; if in a gym and have the corresponding badge, a = GymStatueText2_id and jp PrintPredefTextID +; if in a gym and don’t have the corresponding badge, a = GymStatueText1_id and jp PrintPredefTextID ; else ret call EnableAutoTextBoxDrawing ld a, [wSpriteStateData1 + 9] - cp $4 + cp SPRITE_FACING_UP ret nz ld hl, .BadgeFlags - ld a, [W_CURMAP] + ld a, [wCurMap] 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] + ld a, [wBeatGymFlags] 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) +.BadgeFlags: db PEWTER_GYM, %00000001 db CERULEAN_GYM, %00000010 db VERMILION_GYM,%00000100 @@ -39,151 +39,160 @@ GymStatues: ; 62419 (18:6419) db VIRIDIAN_GYM, %10000000 db $ff -GymStatueText1: ; 62453 (18:6453) +GymStatueText1: TX_FAR _GymStatueText1 db "@" -GymStatueText2: ; 62458 (18:6458) +GymStatueText2: TX_FAR _GymStatueText2 db "@" -PrintBenchGuyText: ; 6245d (18:645d) +PrintBenchGuyText: call EnableAutoTextBoxDrawing - ld hl, PokeCenterMapIDList - ld a, [W_CURMAP] + ld hl, BenchGuyTextPointers + ld a, [wCurMap] 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: + db VIRIDIAN_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre ViridianCityPokecenterBenchGuyText + db PEWTER_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre PewterCityPokecenterBenchGuyText + db CERULEAN_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre CeruleanCityPokecenterBenchGuyText + db LAVENDER_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre LavenderCityPokecenterBenchGuyText + db VERMILION_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre VermilionCityPokecenterBenchGuyText + db CELADON_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre CeladonCityPokecenterBenchGuyText + db CELADON_HOTEL, SPRITE_FACING_LEFT + db_tx_pre CeladonCityHotelText + db FUCHSIA_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre FuchsiaCityPokecenterBenchGuyText + db CINNABAR_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre CinnabarIslandPokecenterBenchGuyText + db SAFFRON_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre SaffronCityPokecenterBenchGuyText + db MT_MOON_POKECENTER, SPRITE_FACING_LEFT + db_tx_pre MtMoonPokecenterBenchGuyText + db ROCK_TUNNEL_POKECENTER,SPRITE_FACING_LEFT + db_tx_pre RockTunnelPokecenterBenchGuyText db $FF -ViridianCityPokecenterBenchGuyText: ; 624a3 (18:64a3) +ViridianCityPokecenterBenchGuyText: TX_FAR _ViridianCityPokecenterGuyText db "@" -PewterCityPokecenterBenchGuyText: ; 624a8 (18:64a8) +PewterCityPokecenterBenchGuyText: TX_FAR _PewterCityPokecenterGuyText db "@" -CeruleanCityPokecenterBenchGuyText: ; 624ad (18:64ad) +CeruleanCityPokecenterBenchGuyText: TX_FAR _CeruleanPokecenterGuyText db "@" -LavenderCityPokecenterBenchGuyText: ; 624b2 (18:64b2) +LavenderCityPokecenterBenchGuyText: TX_FAR _LavenderPokecenterGuyText db "@" -MtMoonPokecenterBenchGuyText: ; 624b7 (18:64b7) +MtMoonPokecenterBenchGuyText: TX_FAR _MtMoonPokecenterBenchGuyText db "@" -RockTunnelPokecenterBenchGuyText: ; 624bc (18:64bc) +RockTunnelPokecenterBenchGuyText: TX_FAR _RockTunnelPokecenterGuyText db "@" -UnusedBenchGuyText1: ; 624c1 (18:64c1) +UnusedBenchGuyText1: TX_FAR _UnusedBenchGuyText1 db "@" -UnusedBenchGuyText2: ; 624c6 (18:64c6) +UnusedBenchGuyText2: TX_FAR _UnusedBenchGuyText2 db "@" -UnusedBenchGuyText3: ; 624cb (18:64cb) +UnusedBenchGuyText3: TX_FAR _UnusedBenchGuyText3 db "@" -VermilionCityPokecenterBenchGuyText: ; 624d0 (18:64d0) +VermilionCityPokecenterBenchGuyText: TX_FAR _VermilionPokecenterGuyText db "@" -CeladonCityPokecenterBenchGuyText: ; 624d5 (18:64d5) +CeladonCityPokecenterBenchGuyText: TX_FAR _CeladonCityPokecenterGuyText db "@" -FuchsiaCityPokecenterBenchGuyText: ; 624da (18:64da) +FuchsiaCityPokecenterBenchGuyText: TX_FAR _FuchsiaCityPokecenterGuyText db "@" -CinnabarIslandPokecenterBenchGuyText: ; 624df (18:64df) +CinnabarIslandPokecenterBenchGuyText: TX_FAR _CinnabarPokecenterGuyText db "@" -SaffronCityPokecenterBenchGuyText: ; 624e4 (18:64e4) - db $8 ; asm - ld a, [wd838] - bit 7, a +SaffronCityPokecenterBenchGuyText: + TX_ASM + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SaffronCityPokecenterBenchGuyText2 - jr nz, .asm_624f2 ; 0x624ed $3 + jr nz, .asm_624f2 ld hl, SaffronCityPokecenterBenchGuyText1 .asm_624f2 call PrintText jp TextScriptEnd -SaffronCityPokecenterBenchGuyText1: ; 624f8 (18:64f8) +SaffronCityPokecenterBenchGuyText1: TX_FAR _SaffronCityPokecenterGuyText1 db "@" -SaffronCityPokecenterBenchGuyText2: ; 624fd (18:64fd) +SaffronCityPokecenterBenchGuyText2: TX_FAR _SaffronCityPokecenterGuyText2 db "@" -CeladonCityHotelText: ; 62502 (18:6502) +CeladonCityHotelText: TX_FAR _CeladonCityHotelText db "@" ret -TerminatorText_62508: ; 62508 (18:6508) +UnusedPredefText: db "@" -PrintBookcaseText: ; 6509 (18:6509) +PrintBookcaseText: call EnableAutoTextBoxDrawing - ld a, $e ; BookcaseText - jp PrintPredefTextID + tx_pre_jump BookcaseText -BookcaseText: ; 62511 (18:6511) +BookcaseText: TX_FAR _BookcaseText db "@" -OpenPokemonCenterPC: ; 62516 (18:6516) +OpenPokemonCenterPC: 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) - db $F9 ; FuncTX_PokemonCenterPC +PokemonCenterPCText: + TX_POKECENTER_PC diff --git a/engine/hidden_object_functions3.asm b/engine/hidden_object_functions3.asm index c471c7bb..aaedcbca 100755 --- a/engine/hidden_object_functions3.asm +++ b/engine/hidden_object_functions3.asm @@ -1,10 +1,10 @@ ; prints text for bookshelves in buildings without sign events -PrintBookshelfText: ; fb50 (3:7b50) +PrintBookshelfText: ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction cp SPRITE_FACING_UP jr nz, .noMatch ; facing up - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] ld b, a aCoord 8, 7 ld c, a @@ -34,86 +34,101 @@ PrintBookshelfText: ; fb50 (3:7b50) .noMatch ld a, $ff ld [$ffdb], a - ld b, BANK(PrintCardKeyText) - ld hl, PrintCardKeyText - jp Bankswitch + jpba PrintCardKeyText ; 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 +BookshelfTileIDs: + db PLATEAU, $30 + db_tx_pre IndigoPlateauStatues + db HOUSE, $3D + db_tx_pre TownMapText + db HOUSE, $1E + db_tx_pre BookOrSculptureText + db MANSION, $32 + db_tx_pre BookOrSculptureText + db REDS_HOUSE_1, $32 + db_tx_pre BookOrSculptureText + db LAB, $28 + db_tx_pre BookOrSculptureText + db LOBBY, $16 + db_tx_pre ElevatorText + db GYM, $1D + db_tx_pre BookOrSculptureText + db DOJO, $1D + db_tx_pre BookOrSculptureText + db GATE, $22 + db_tx_pre BookOrSculptureText + db MART, $54 + db_tx_pre PokemonStuffText + db MART, $55 + db_tx_pre PokemonStuffText + db POKECENTER, $54 + db_tx_pre PokemonStuffText + db POKECENTER, $55 + db_tx_pre PokemonStuffText + db LOBBY, $50 + db_tx_pre PokemonStuffText + db LOBBY, $52 + db_tx_pre PokemonStuffText + db SHIP, $36 + db_tx_pre BookOrSculptureText db $FF -IndigoPlateauStatues: ; fbbf (3:7bbf) - db $08 ; asm +IndigoPlateauStatues: + TX_ASM ld hl, IndigoPlateauStatuesText1 call PrintText - ld a, [W_XCOORD] + ld a, [wXCoord] bit 0, a ld hl, IndigoPlateauStatuesText2 - jr nz, .asm_fbd3 + jr nz, .ok ld hl, IndigoPlateauStatuesText3 -.asm_fbd3 +.ok call PrintText jp TextScriptEnd -IndigoPlateauStatuesText1: ; fbd9 (3:7bd9) +IndigoPlateauStatuesText1: TX_FAR _IndigoPlateauStatuesText1 db "@" -IndigoPlateauStatuesText2: ; fbde (3:7bde) +IndigoPlateauStatuesText2: TX_FAR _IndigoPlateauStatuesText2 db "@" -IndigoPlateauStatuesText3: ; fbe3 (3:7be3) +IndigoPlateauStatuesText3: TX_FAR _IndigoPlateauStatuesText3 db "@" -BookOrSculptureText: ; fbe8 (3:7be8) - db $08 ; asm +BookOrSculptureText: + TX_ASM ld hl, PokemonBooksText - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] cp MANSION ; Celadon Mansion tileset - jr nz, .asm_fbfd - ld a, [wTileMap + $80] + jr nz, .ok + aCoord 8, 6 cp $38 - jr nz, .asm_fbfd + jr nz, .ok ld hl, DiglettSculptureText -.asm_fbfd +.ok call PrintText jp TextScriptEnd -PokemonBooksText: ; fc03 (3:7c03) +PokemonBooksText: TX_FAR _PokemonBooksText db "@" -DiglettSculptureText: ; fc08 (3:7c08) +DiglettSculptureText: TX_FAR _DiglettSculptureText db "@" -ElevatorText: ; fc0d (3:7c0d) +ElevatorText: TX_FAR _ElevatorText db "@" -TownMapText: ; fc12 (3:7c12) +TownMapText: TX_FAR _TownMapText - db $06 - db $08 ; asm + TX_BLINK + TX_ASM ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, wd730 @@ -133,6 +148,6 @@ TownMapText: ; fc12 (3:7c12) push af jp CloseTextDisplay -PokemonStuffText: ; fc45 (3:7c45) +PokemonStuffText: TX_FAR _PokemonStuffText db "@" diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm index f97190de..f04c1deb 100755 --- a/engine/hidden_object_functions7.asm +++ b/engine/hidden_object_functions7.asm @@ -1,149 +1,146 @@ -PrintNewBikeText: ; 1e94b (7:694b) +PrintNewBikeText: call EnableAutoTextBoxDrawing - ld a, $39 - jp PrintPredefTextID + tx_pre_jump NewBicycleText -NewBicycleText: ; 1e953 (7:6953) +NewBicycleText: TX_FAR _NewBicycleText db "@" -DisplayOakLabLeftPoster: ; 1e958 (7:6958) +DisplayOakLabLeftPoster: call EnableAutoTextBoxDrawing - ld a, $05 ; PushStartText - jp PrintPredefTextID + tx_pre_jump PushStartText -PushStartText: ; 1e960 (7:6960) +PushStartText: TX_FAR _PushStartText db "@" -DisplayOakLabRightPoster: ; 1e965 (7:6965) +DisplayOakLabRightPoster: call EnableAutoTextBoxDrawing ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits - ld a, [wd11e] - cp $2 - ld a, $6 ; SaveOptionText - jr c, .asm_1e97b - ld a, $7 ; StrengthsAndWeaknessesText -.asm_1e97b + ld a, [wNumSetBits] + cp 2 + tx_pre_id SaveOptionText + jr c, .ownLessThanTwo + ; own two or more mon + tx_pre_id StrengthsAndWeaknessesText +.ownLessThanTwo jp PrintPredefTextID -SaveOptionText: ; 1e97e (7:697e) +SaveOptionText: TX_FAR _SaveOptionText db "@" -StrengthsAndWeaknessesText: ; 1e983 (7:6983) +StrengthsAndWeaknessesText: TX_FAR _StrengthsAndWeaknessesText db "@" -SafariZoneCheck: ; 1e988 (7:6988) - ld hl, wd790 - bit 7, [hl] - jr z, asm_1e9ab - ld a, [W_NUMSAFARIBALLS] ; W_NUMSAFARIBALLS +SafariZoneCheck: + CheckEventHL EVENT_IN_SAFARI_ZONE ; if we are not in the Safari Zone, + jr z, SafariZoneGameStillGoing ; don't bother printing game over text + ld a, [wNumSafariBalls] and a - jr z, asm_1e9b0 - jr asm_1e9ab + jr z, SafariZoneGameOver + jr SafariZoneGameStillGoing -SafariZoneCheckSteps: ; 1e997 (7:6997) - ld a, [wSafariSteps] ; wd70d +SafariZoneCheckSteps: + 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, SafariZoneGameOver 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 +SafariZoneGameStillGoing: xor a ld [wSafariZoneGameOver], a ret -asm_1e9b0: ; 1e9b0 (7:69b0) + +SafariZoneGameOver: call EnableAutoTextBoxDrawing xor a - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a dec a call PlaySound - ld c, BANK(SFX_02_5f) - ld a, (SFX_02_5f - SFX_Headers_02) / 3 + ld c, BANK(SFX_Safari_Zone_PA) + ld a, SFX_SAFARI_ZONE_PA call PlayMusic -.asm_1e9c2 - ld a, [wc02a] - cp $b9 - jr nz, .asm_1e9c2 - ld a, $d3 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +.waitForMusicToPlay + ld a, [wChannelSoundIDs + Ch4] + cp SFX_SAFARI_ZONE_PA + jr nz, .waitForMusicToPlay + ld a, TEXT_SAFARI_GAME_OVER + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [wd528], a + ld [wPlayerMovingDirection], a ld a, SAFARI_ZONE_ENTRANCE - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [hWarpDestinationMap], a ld a, $3 ld [wDestinationWarpID], a ld a, $5 - ld [W_SAFARIZONEENTRANCECURSCRIPT], a - ld hl, wd790 - set 6, [hl] - ld a, $1 + ld [wSafariZoneEntranceCurScript], a + SetEvent EVENT_SAFARI_GAME_OVER + ld a, 1 ld [wSafariZoneGameOver], a ret -PrintSafariGameOverText: ; 1e9ed (7:69ed) +PrintSafariGameOverText: xor a ld [wJoyIgnore], a ld hl, SafariGameOverText jp PrintText -SafariGameOverText: ; 1e9f7 (7:69f7) - db $08 ; asm - ld a, [W_NUMSAFARIBALLS] ; W_NUMSAFARIBALLS +SafariGameOverText: + TX_ASM + ld a, [wNumSafariBalls] and a - jr z, .asm_1ea04 + jr z, .noMoreSafariBalls ld hl, TimesUpText call PrintText -.asm_1ea04 +.noMoreSafariBalls ld hl, GameOverText call PrintText jp TextScriptEnd -TimesUpText: ; 1ea0d (7:6a0d) +TimesUpText: TX_FAR _TimesUpText db "@" -GameOverText: ; 1ea12 (7:6a12) +GameOverText: TX_FAR _GameOverText db "@" -PrintCinnabarQuiz: ; 1ea17 (7:6a17) +PrintCinnabarQuiz: 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 +CinnabarGymQuiz: + TX_ASM xor a - ld [wda38], a - ld a, [wWhichTrade] ; wWhichTrade + ld [wOpponentAfterWrongAnswer], a + ld a, [wHiddenObjectFunctionArgument] push af and $f - ld [$ffdb], a + ld [hGymGateIndex], a pop af and $f0 swap a ld [$ffdc], a ld hl, CinnabarGymQuizIntroText call PrintText - ld a, [$ffdb] + ld a, [hGymGateIndex] dec a add a - ld d, $0 + ld d, 0 ld e, a ld hl, CinnabarQuizQuestions add hl, de @@ -151,16 +148,16 @@ CinnabarGymQuiz: ; 1ea25 (7:6a25) ld h, [hl] ld l, a call PrintText - ld a, $1 + ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a call CinnabarGymQuiz_1ea92 jp TextScriptEnd -CinnabarGymQuizIntroText: ; 1ea5b (7:6a5b) +CinnabarGymQuizIntroText: TX_FAR _CinnabarGymQuizIntroText db "@" -CinnabarQuizQuestions: ; 1ea60 (7:6a60) +CinnabarQuizQuestions: dw CinnabarQuizQuestionsText1 dw CinnabarQuizQuestionsText2 dw CinnabarQuizQuestionsText3 @@ -168,136 +165,143 @@ CinnabarQuizQuestions: ; 1ea60 (7:6a60) dw CinnabarQuizQuestionsText5 dw CinnabarQuizQuestionsText6 -CinnabarQuizQuestionsText1: ; 1ea6c (7:6a6c) +CinnabarQuizQuestionsText1: TX_FAR _CinnabarQuizQuestionsText1 db "@" -CinnabarQuizQuestionsText2: ; 1ea71 (7:6a71) +CinnabarQuizQuestionsText2: TX_FAR _CinnabarQuizQuestionsText2 db "@" -CinnabarQuizQuestionsText3: ; 1ea76 (7:6a76) +CinnabarQuizQuestionsText3: TX_FAR _CinnabarQuizQuestionsText3 db "@" -CinnabarQuizQuestionsText4: ; 1ea7b (7:6a7b) +CinnabarQuizQuestionsText4: TX_FAR _CinnabarQuizQuestionsText4 db "@" -CinnabarQuizQuestionsText5: ; 1ea80 (7:6a80) +CinnabarQuizQuestionsText5: TX_FAR _CinnabarQuizQuestionsText5 db "@" -CinnabarQuizQuestionsText6: ; 1ea85 (7:6a85) +CinnabarQuizQuestionsText6: TX_FAR _CinnabarQuizQuestionsText6 db "@" -CinnabarGymQuiz_1ea8a: ; 1ea8a (7:6a8a) - ld hl, wd79c +CinnabarGymGateFlagAction: + EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED predef_jump FlagActionPredef -CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92) +CinnabarGymQuiz_1ea92: call YesNoChoice ld a, [$ffdc] ld c, a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp c - jr nz, .asm_1eab8 - ld hl, wd126 + jr nz, .wrongAnswer + ld hl, wCurrentMapScriptFlags set 5, [hl] - ld a, [$ffdb] + ld a, [hGymGateIndex] ld [$ffe0], a ld hl, CinnabarGymQuizCorrectText call PrintText ld a, [$ffe0] + AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0 ld c, a - ld b, $1 - call CinnabarGymQuiz_1ea8a - jp CinnabarGymQuiz_1eb0a -.asm_1eab8 + ld b, FLAG_SET + call CinnabarGymGateFlagAction + jp UpdateCinnabarGymGateTileBlocks_ +.wrongAnswer call WaitForSoundToFinish - ld a, (SFX_02_51 - SFX_Headers_02) / 3 + ld a, SFX_DENIED call PlaySound call WaitForSoundToFinish ld hl, CinnabarGymQuizIncorrectText call PrintText - ld a, [$ffdb] + ld a, [hGymGateIndex] add $2 + AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2 ld c, a - ld b, $2 - ld hl, wd79a + ld b, FLAG_TEST + EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0 predef FlagActionPredef ld a, c and a ret nz - ld a, [$ffdb] + ld a, [hGymGateIndex] add $2 - ld [wda38], a + ld [wOpponentAfterWrongAnswer], a ret -CinnabarGymQuizCorrectText: ; 1eae3 (7:6ae3) - db $0b +CinnabarGymQuizCorrectText: + TX_SFX_ITEM_1 TX_FAR _CinnabarGymQuizCorrectText - db $06,$08 + TX_BLINK + TX_ASM ld a, [$ffe0] + AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0 ld c, a - ld b, $2 - call CinnabarGymQuiz_1ea8a + ld b, FLAG_TEST + call CinnabarGymGateFlagAction ld a, c and a jp nz, TextScriptEnd call WaitForSoundToFinish - ld a, (SFX_02_57 - SFX_Headers_02) / 3 + ld a, SFX_GO_INSIDE call PlaySound call WaitForSoundToFinish jp TextScriptEnd -CinnabarGymQuizIncorrectText: ; 1eb05 (7:6b05) +CinnabarGymQuizIncorrectText: TX_FAR _CinnabarGymQuizIncorrectText db "@" -CinnabarGymQuiz_1eb0a: ; 1eb0a (7:6b0a) - ld a, $6 - ld [$ffdb], a -.asm_1eb0e - ld a, [$ffdb] +UpdateCinnabarGymGateTileBlocks_: +; Update the overworld map with open floor blocks or locked gate blocks +; depending on event flags. + ld a, 6 + ld [hGymGateIndex], a +.loop + ld a, [hGymGateIndex] dec a add a add a - ld d, $0 + ld d, 0 ld e, a - ld hl, CinnabarGymGateCoords ; $6b48 + ld hl, CinnabarGymGateCoords add hl, de ld a, [hli] ld b, [hl] ld c, a inc hl ld a, [hl] - ld [wd12f], a + ld [wGymGateTileBlock], a push bc - ld a, [$ffdb] + ld a, [hGymGateIndex] ld [$ffe0], a + AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0 ld c, a - ld b, $2 - call CinnabarGymQuiz_1ea8a + ld b, FLAG_TEST + call CinnabarGymGateFlagAction ld a, c and a - jr nz, .asm_1eb36 - ld a, [wd12f] - jr .asm_1eb38 -.asm_1eb36 + jr nz, .unlocked + ld a, [wGymGateTileBlock] + jr .next +.unlocked ld a, $e -.asm_1eb38 +.next pop bc - ld [wd09f], a + ld [wNewTileBlockID], a predef ReplaceTileBlock - ld hl, $ffdb + ld hl, hGymGateIndex dec [hl] - jr nz, .asm_1eb0e + jr nz, .loop ret -CinnabarGymGateCoords: ; 1eb48 (7:6b48) +CinnabarGymGateCoords: ; format: x-coord, y-coord, direction, padding ; direction: $54 = horizontal gate, $5f = vertical gate db $09,$03,$54,$00 @@ -307,164 +311,157 @@ CinnabarGymGateCoords: ; 1eb48 (7:6b48) db $02,$06,$54,$00 db $02,$03,$54,$00 -PrintMagazinesText: ; 1eb60 (7:6b60) +PrintMagazinesText: call EnableAutoTextBoxDrawing - ld a, $30 - call PrintPredefTextID + tx_pre MagazinesText ret -MagazinesText: ; 1eb69 (7:6b69) +MagazinesText: TX_FAR _MagazinesText db "@" -BillsHousePC: ; 1eb6e (7:6b6e) +BillsHousePC: call EnableAutoTextBoxDrawing ld a, [wSpriteStateData1 + 9] - cp $4 + cp SPRITE_FACING_UP ret nz - ld a, [wd7f2] - bit 7, a - jr nz, .asm_1ebd2 - bit 3, a - jr nz, .asm_1eb86 - bit 6, a - jr nz, .asm_1eb8b -.asm_1eb86 - ld a, $2d - jp PrintPredefTextID -.asm_1eb8b + CheckEvent EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING + jr nz, .displayBillsHousePokemonList + CheckEventReuseA EVENT_USED_CELL_SEPARATOR_ON_BILL + jr nz, .displayBillsHouseMonitorText + CheckEventReuseA EVENT_BILL_SAID_USE_CELL_SEPARATOR + jr nz, .doCellSeparator +.displayBillsHouseMonitorText + tx_pre_jump BillsHouseMonitorText +.doCellSeparator ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - 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 + ld a, SFX_TINK call PlaySound call WaitForSoundToFinish - ld c, $50 + ld c, 80 call DelayFrames - ld a, (SFX_02_48 - SFX_Headers_02) / 3 + ld a, SFX_SHRINK call PlaySound call WaitForSoundToFinish - ld c, $30 + ld c, 48 call DelayFrames - ld a, (SFX_02_3c - SFX_Headers_02) / 3 + ld a, SFX_TINK call PlaySound call WaitForSoundToFinish - ld c, $20 + ld c, 32 call DelayFrames - ld a, (SFX_02_3a - SFX_Headers_02) / 3 + ld a, SFX_GET_ITEM_1 call PlaySound call WaitForSoundToFinish call PlayDefaultMusic - ld hl, wd7f2 - set 3, [hl] + SetEvent EVENT_USED_CELL_SEPARATOR_ON_BILL ret -.asm_1ebd2 +.displayBillsHousePokemonList ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld a, $2f - call PrintPredefTextID + tx_pre BillsHousePokemonList ret -BillsHouseMonitorText: ; 1ebdd (7:6bdd) +BillsHouseMonitorText: TX_FAR _BillsHouseMonitorText db "@" -BillsHouseInitiatedText: ; 1ebe2 (7:6be2) +BillsHouseInitiatedText: TX_FAR _BillsHouseInitiatedText - db $06 - db $08 ; asm + TX_BLINK + TX_ASM ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound - ld c, $10 + ld c, 16 call DelayFrames - ld a, (SFX_02_49 - SFX_Headers_02) / 3 + ld a, SFX_SWITCH call PlaySound call WaitForSoundToFinish - ld c, $3c + ld c, 60 call DelayFrames jp TextScriptEnd -BillsHousePokemonList: ; 1ec05 (7:6c05) - db $08 ; asm +BillsHousePokemonList: + TX_ASM call SaveScreenTilesToBuffer1 ld hl, BillsHousePokemonListText1 call PrintText xor a - ld [W_ANIMATIONID], a + ld [wMenuItemOffset], a ; not used ld [wCurrentMenuItem], a ld [wLastMenuItem], a - ld a, $3 + ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a - ld a, $4 + ld a, 4 ld [wMaxMenuItem], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a -.asm_1ec2d +.billsPokemonLoop ld hl, wd730 set 6, [hl] - ld hl, wTileMap - ld b, $a - ld c, $9 + coord hl, 0, 0 + ld b, 10 + ld c, 9 call TextBoxBorder - ld hl, wTileMap + $2a + coord hl, 2, 2 ld de, BillsMonListText call PlaceString ld hl, BillsHousePokemonListText2 call PrintText call SaveScreenTilesToBuffer2 call HandleMenuInput - bit 1, a - jr nz, .asm_1ec74 + bit 1, a ; pressed b + jr nz, .cancel ld a, [wCurrentMenuItem] add EEVEE cp EEVEE - jr z, .asm_1ec6c + jr z, .displayPokedex cp FLAREON - jr z, .asm_1ec6c + jr z, .displayPokedex cp JOLTEON - jr z, .asm_1ec6c + jr z, .displayPokedex cp VAPOREON - jr z, .asm_1ec6c - jr .asm_1ec74 -.asm_1ec6c + jr z, .displayPokedex + jr .cancel +.displayPokedex call DisplayPokedex call LoadScreenTilesFromBuffer2 - jr .asm_1ec2d -.asm_1ec74 + jr .billsPokemonLoop +.cancel ld hl, wd730 res 6, [hl] call LoadScreenTilesFromBuffer2 jp TextScriptEnd -BillsHousePokemonListText1: ; 1ec7f (7:6c7f) +BillsHousePokemonListText1: TX_FAR _BillsHousePokemonListText1 db "@" -BillsMonListText: ; 1ec84 (7:6c84) +BillsMonListText: db "EEVEE" next "FLAREON" next "JOLTEON" next "VAPOREON" next "CANCEL@" -BillsHousePokemonListText2: ; 1ecaa (7:6caa) +BillsHousePokemonListText2: TX_FAR _BillsHousePokemonListText2 db "@" -DisplayOakLabEmailText: ; 1ecaf (7:6caf) +DisplayOakLabEmailText: 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) +OakLabEmailText: TX_FAR _OakLabEmailText db "@" diff --git a/engine/hp_bar.asm b/engine/hp_bar.asm index 333b0b90..221bd7a9 100755 --- a/engine/hp_bar.asm +++ b/engine/hp_bar.asm @@ -1,9 +1,9 @@ -HPBarLength: ; f9dc (3:79dc) +HPBarLength: call GetPredefRegisters ; calculates bc * 48 / de, the number of pixels the HP bar has ; the result is always at least 1 -GetHPBarLength: ; f9df (3:79df) +GetHPBarLength: push hl xor a ld hl, H_MULTIPLICAND @@ -45,7 +45,7 @@ GetHPBarLength: ; f9df (3:79df) ret ; predef $48 -UpdateHPBar: ; fa1d (3:7a1d) +UpdateHPBar: UpdateHPBar2: push hl ld hl, wHPBarOldHP @@ -87,6 +87,7 @@ UpdateHPBar2: call UpdateHPBar_CompareNewHPToOldHP jr z, .animateHPBarDone jr nc, .HPIncrease +; HP decrease dec bc ; subtract 1 HP ld a, c ld [wHPBarNewHP], a @@ -95,7 +96,7 @@ UpdateHPBar2: call UpdateHPBar_CalcOldNewHPBarPixels ld a, e sub d ; calc pixel difference - jr .asm_fa7e + jr .ok .HPIncrease inc bc ; add 1 HP ld a, c @@ -105,7 +106,7 @@ UpdateHPBar2: call UpdateHPBar_CalcOldNewHPBarPixels ld a, d sub e ; calc pixel difference -.asm_fa7e +.ok call UpdateHPBar_PrintHPNumber and a jr z, .noPixelDifference @@ -136,14 +137,14 @@ UpdateHPBar2: ; animates the HP bar going up or down for (a) ticks (two waiting frames each) ; stops prematurely if bar is filled up ; e: current health (in pixels) to start with -UpdateHPBar_AnimateHPBar: ; fab1 (3:7ab1) +UpdateHPBar_AnimateHPBar: push hl .barAnimationLoop push af push de ld d, $6 call DrawHPBar - ld c, $2 + ld c, 2 call DelayFrames pop de ld a, [wHPBarDelta] ; +1 or -1 @@ -162,7 +163,7 @@ UpdateHPBar_AnimateHPBar: ; fab1 (3:7ab1) ret ; compares old HP and new HP and sets c and z flags accordingly -UpdateHPBar_CompareNewHPToOldHP: ; fad1 (3:7ad1) +UpdateHPBar_CompareNewHPToOldHP: ld a, d sub b ret nz @@ -171,7 +172,7 @@ UpdateHPBar_CompareNewHPToOldHP: ; fad1 (3:7ad1) ret ; calcs HP difference between bc and de (into de) -UpdateHPBar_CalcHPDifference: ; fad7 (3:7ad7) +UpdateHPBar_CalcHPDifference: ld a, d sub b jr c, .oldHPGreater @@ -200,38 +201,39 @@ UpdateHPBar_CalcHPDifference: ; fad7 (3:7ad7) ld de, $0 ret -UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5) +UpdateHPBar_PrintHPNumber: push af push de ld a, [wHPBarType] and a - jr z, .asm_fb2d + jr z, .done ; don't print number in enemy HUD +; convert from little-endian to big-endian for PrintNumber ld a, [wHPBarOldHP] - ld [wcef1], a - ld a, [wHPBarOldHP+1] - ld [wcef0], a + ld [wHPBarTempHP + 1], a + ld a, [wHPBarOldHP + 1] + ld [wHPBarTempHP], a push hl ld a, [hFlags_0xFFF6] bit 0, a jr z, .asm_fb15 ld de, $9 - jr .asm_fb18 + jr .next .asm_fb15 ld de, $15 -.asm_fb18 +.next add hl, de push hl - ld a, $7f + ld a, " " ld [hli], a ld [hli], a ld [hli], a pop hl - ld de, wcef0 - ld bc, $203 + ld de, wHPBarTempHP + lb bc, 2, 3 call PrintNumber call DelayFrame pop hl -.asm_fb2d +.done pop de pop af ret @@ -239,7 +241,7 @@ UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5) ; calcs number of HP bar pixels for old and new HP value ; d: new pixels ; e: old pixels -UpdateHPBar_CalcOldNewHPBarPixels: ; fb30 (3:7b30) +UpdateHPBar_CalcOldNewHPBarPixels: push hl ld hl, wHPBarMaxHP ld a, [hli] ; max HP into de diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm index cb03a074..a1fe85bc 100755 --- a/engine/in_game_trades.asm +++ b/engine/in_game_trades.asm @@ -1,4 +1,4 @@ -DoInGameTradeDialogue: ; 71ad9 (1c:5ad9) +DoInGameTradeDialogue: ; trigger the trade offer/action specified by wWhichTrade call SaveScreenTilesToBuffer2 ld hl,TradeMons @@ -17,12 +17,12 @@ DoInGameTradeDialogue: ; 71ad9 (1c:5ad9) ld a,[hli] push af ld de,wInGameTradeMonNick - ld bc,$000b + ld bc, NAME_LENGTH call CopyData pop af ld l,a - ld h,$0 - ld de,InGameTradeTextPointers ; $5d64 + ld h,0 + ld de,InGameTradeTextPointers add hl,hl add hl,de ld a,[hli] @@ -38,7 +38,7 @@ DoInGameTradeDialogue: ; 71ad9 (1c:5ad9) ld hl,wCompletedInGameTradeFlags ld a,[wWhichTrade] ld c,a - ld b,$2 + ld b,FLAG_TEST predef FlagActionPredef ld a,c and a @@ -75,20 +75,20 @@ DoInGameTradeDialogue: ; 71ad9 (1c:5ad9) jp PrintText ; copies name of species a to hl -InGameTrade_GetMonName: ; 71b6a (1c:5b6a) +InGameTrade_GetMonName: push de ld [wd11e],a call GetMonName ld hl,wcd6d pop de - ld bc,$b + ld bc, NAME_LENGTH jp CopyData INCLUDE "data/trades.asm" -InGameTrade_DoTrade: ; 71c07 (1c:5c07) - xor a - ld [wd07d],a +InGameTrade_DoTrade: + xor a ; NORMAL_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a dec a ld [wUpdateSpritesEnabled],a call DisplayPartyMenu @@ -105,36 +105,36 @@ InGameTrade_DoTrade: ; 71c07 (1c:5c07) jr nz,.tradeFailed ; jump if the selected mon's species is not the required one ld a,[wWhichPokemon] ld hl,wPartyMon1Level - ld bc,$002c + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld a,[hl] - ld [W_CURENEMYLVL],a + ld [wCurEnemyLVL],a ld hl,wCompletedInGameTradeFlags ld a,[wWhichTrade] ld c,a - ld b,$1 + ld b,FLAG_SET predef FlagActionPredef ld hl, ConnectCableText call PrintText ld a,[wWhichPokemon] push af - ld a,[W_CURENEMYLVL] + ld a,[wCurEnemyLVL] push af call LoadHpBarAndStatusTilePatterns call InGameTrade_PrepareTradeData predef InternalClockTradeAnim pop af - ld [W_CURENEMYLVL],a + ld [wCurEnemyLVL],a pop af ld [wWhichPokemon],a ld a,[wInGameTradeReceiveMonSpecies] ld [wcf91],a xor a - ld [wcc49],a - ld [wcf95],a + ld [wMonDataLocation],a ; not used + ld [wRemoveMonFromBox],a call RemovePokemon - ld a,$80 - ld [wcc49],a + ld a,$80 ; prevent the player from naming the mon + ld [wMonDataLocation],a call AddPartyMon call InGameTrade_CopyDataToReceivedMon callab EvolveTradeMon @@ -150,7 +150,7 @@ InGameTrade_DoTrade: ; 71c07 (1c:5c07) ld [wInGameTradeTextPointerTableIndex],a ret -InGameTrade_RestoreScreen: ; 71ca2 (1c:5ca2) +InGameTrade_RestoreScreen: call GBPalWhiteOutWithDelay3 call RestoreScreenTilesAndReloadTilePatterns call ReloadTilesetTilePatterns @@ -159,27 +159,25 @@ InGameTrade_RestoreScreen: ; 71ca2 (1c:5ca2) call LoadGBPal ld c, 10 call DelayFrames - ld b, BANK(LoadWildData) - ld hl, LoadWildData - jp Bankswitch + jpba LoadWildData -InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1) +InGameTrade_PrepareTradeData: ld hl, wTradedPlayerMonSpecies ld a, [wInGameTradeGiveMonSpecies] ld [hli], a ; wTradedPlayerMonSpecies ld a, [wInGameTradeReceiveMonSpecies] ld [hl], a ; wTradedEnemyMonSpecies ld hl, wPartyMonOT - ld bc, $b + ld bc, NAME_LENGTH ld a, [wWhichPokemon] call AddNTimes ld de, wTradedPlayerMonOT - ld bc, $b + ld bc, NAME_LENGTH call InGameTrade_CopyData ld hl, InGameTrade_TrainerString - ld de, wcd4e + ld de, wTradedEnemyMonOT call InGameTrade_CopyData - ld de, W_GRASSRATE + ld de, wLinkEnemyTrainerName call InGameTrade_CopyData ld hl, wPartyMon1OTID ld bc, wPartyMon2 - wPartyMon1 @@ -193,7 +191,7 @@ InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1) ld de, wTradedEnemyMonOTID jp CopyData -InGameTrade_CopyData: ; 71d11 (1c:5d11) +InGameTrade_CopyData: push hl push bc call CopyData @@ -201,18 +199,18 @@ InGameTrade_CopyData: ; 71d11 (1c:5d11) pop hl ret -InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19) +InGameTrade_CopyDataToReceivedMon: ld hl, wPartyMonNicks - ld bc, $b + ld bc, NAME_LENGTH call InGameTrade_GetReceivedMonPointer ld hl, wInGameTradeMonNick - ld bc, $b + ld bc, NAME_LENGTH call CopyData ld hl, wPartyMonOT - ld bc, $b + ld bc, NAME_LENGTH call InGameTrade_GetReceivedMonPointer ld hl, InGameTrade_TrainerString - ld bc, $b + ld bc, NAME_LENGTH call CopyData ld hl, wPartyMon1OTID ld bc, wPartyMon2 - wPartyMon1 @@ -223,7 +221,7 @@ InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19) ; the received mon's index is (partyCount - 1), ; so this adds bc to hl (partyCount - 1) times and moves the result to de -InGameTrade_GetReceivedMonPointer: ; 71d4f (1c:5d4f) +InGameTrade_GetReceivedMonPointer: ld a, [wPartyCount] dec a call AddNTimes @@ -231,100 +229,102 @@ InGameTrade_GetReceivedMonPointer: ; 71d4f (1c:5d4f) ld d, h ret -InGameTrade_TrainerString: ; 71d59 (1c:5d59) +InGameTrade_TrainerString: ; "TRAINER@@@@@@@@@@" db $5d, "@@@@@@@@@@" -InGameTradeTextPointers: ; 71d64 (1c:5d64) +InGameTradeTextPointers: dw TradeTextPointers1 dw TradeTextPointers2 dw TradeTextPointers3 -TradeTextPointers1: ; 71d6a (1c:5d6a) +TradeTextPointers1: dw WannaTrade1Text dw NoTrade1Text dw WrongMon1Text dw Thanks1Text dw AfterTrade1Text -TradeTextPointers2: ; 71d74 (1c:5d74) +TradeTextPointers2: dw WannaTrade2Text dw NoTrade2Text dw WrongMon2Text dw Thanks2Text dw AfterTrade2Text -TradeTextPointers3: ; 71d7e (1c:5d7e) +TradeTextPointers3: dw WannaTrade3Text dw NoTrade3Text dw WrongMon3Text dw Thanks3Text dw AfterTrade3Text -ConnectCableText: ; 71d88 (1c:5d88) +ConnectCableText: TX_FAR _ConnectCableText db "@" -TradedForText: ; 71d8d (1c:5d8d) +TradedForText: TX_FAR _TradedForText - db $11, $a, "@" + TX_SFX_KEY_ITEM + TX_DELAY + db "@" -WannaTrade1Text: ; 71d94 (1c:5d94) +WannaTrade1Text: TX_FAR _WannaTrade1Text db "@" -NoTrade1Text: ; 71d99 (1c:5d99) +NoTrade1Text: TX_FAR _NoTrade1Text db "@" -WrongMon1Text: ; 71d9e (1c:5d9e) +WrongMon1Text: TX_FAR _WrongMon1Text db "@" -Thanks1Text: ; 71da3 (1c:5da3) +Thanks1Text: TX_FAR _Thanks1Text db "@" -AfterTrade1Text: ; 71da8 (1c:5da8) +AfterTrade1Text: TX_FAR _AfterTrade1Text db "@" -WannaTrade2Text: ; 71dad (1c:5dad) +WannaTrade2Text: TX_FAR _WannaTrade2Text db "@" -NoTrade2Text: ; 71db2 (1c:5db2) +NoTrade2Text: TX_FAR _NoTrade2Text db "@" -WrongMon2Text: ; 71db7 (1c:5db7) +WrongMon2Text: TX_FAR _WrongMon2Text db "@" -Thanks2Text: ; 71dbc (1c:5dbc) +Thanks2Text: TX_FAR _Thanks2Text db "@" -AfterTrade2Text: ; 71dc1 (1c:5dc1) +AfterTrade2Text: TX_FAR _AfterTrade2Text db "@" -WannaTrade3Text: ; 71dc6 (1c:5dc6) +WannaTrade3Text: TX_FAR _WannaTrade3Text db "@" -NoTrade3Text: ; 71dcb (1c:5dcb) +NoTrade3Text: TX_FAR _NoTrade3Text db "@" -WrongMon3Text: ; 71dd0 (1c:5dd0) +WrongMon3Text: TX_FAR _WrongMon3Text db "@" -Thanks3Text: ; 71dd5 (1c:5dd5) +Thanks3Text: TX_FAR _Thanks3Text db "@" -AfterTrade3Text: ; 71dda (1c:5dda) +AfterTrade3Text: TX_FAR _AfterTrade3Text db "@" diff --git a/engine/init_player_data.asm b/engine/init_player_data.asm new file mode 100644 index 00000000..c576e65a --- /dev/null +++ b/engine/init_player_data.asm @@ -0,0 +1,55 @@ +InitPlayerData: +InitPlayerData2: + + call Random + ld a, [hRandomSub] + ld [wPlayerID], a + + call Random + ld a, [hRandomAdd] + ld [wPlayerID + 1], a + + ld a, $ff + ld [wUnusedD71B], a + + ld hl, wPartyCount + call InitializeEmptyList + ld hl, wNumInBox + call InitializeEmptyList + ld hl, wNumBagItems + call InitializeEmptyList + ld hl, wNumBoxItems + call InitializeEmptyList + +START_MONEY EQU $3000 + ld hl, wPlayerMoney + 1 + ld a, START_MONEY / $100 + ld [hld], a + xor a + ld [hli], a + inc hl + ld [hl], a + + ld [wMonDataLocation], a + + ld hl, wObtainedBadges + ld [hli], a + + ld [hl], a + + ld hl, wPlayerCoins + ld [hli], a + ld [hl], a + + ld hl, wGameProgressFlags + ld bc, wGameProgressFlagsEnd - wGameProgressFlags + call FillMemory ; clear all game progress flags + + jp InitializeMissableObjectsFlags + +InitializeEmptyList: + xor a ; count + ld [hli], a + dec a ; terminator + ld [hl], a + ret diff --git a/engine/intro.asm b/engine/intro.asm index 7c0464d3..ed532681 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -1,4 +1,8 @@ -PlayIntro: ; 41682 (10:5682) +MOVE_GENGAR_RIGHT EQU $00 +MOVE_GENGAR_LEFT EQU $01 +MOVE_NIDORINO_RIGHT EQU $ff + +PlayIntro: xor a ld [hJoyHeld], a inc a @@ -13,36 +17,36 @@ PlayIntro: ; 41682 (10:5682) call DelayFrame ret -PlayIntroScene: ; 4169d (10:569d) - ld b, $7 - call GoPAL_SET +PlayIntroScene: + ld b, SET_PAL_NIDORINO_INTRO + call RunPaletteCommand ld a, %11100100 ld [rBGP], a ld [rOBP0], a ld [rOBP1], a xor a ld [hSCX], a - ld b, $3 - call Func_4183f + ld b, $3 ; Gengar tiles + call IntroCopyTiles ld a, 0 - ld [W_BASECOORDX], a + ld [wBaseCoordX], a ld a, 80 - ld [W_BASECOORDY], a - ld bc, $606 - call Func_417c7 - ld de, $28ff - call Func_4180e + ld [wBaseCoordY], a + lb bc, 6, 6 + call InitIntroNidorinoOAM + lb de, 80 / 2, MOVE_NIDORINO_RIGHT + call IntroMoveMon ret c ; hip - ld a, (SFX_1f_5f - SFX_Headers_1f) / 3 + ld a, SFX_INTRO_HIP call PlaySound xor a - ld [wd09f], a + ld [wIntroNidorinoBaseTile], a ld de, IntroNidorinoAnimation1 call AnimateIntroNidorino ; hop - ld a, (SFX_1f_60 - SFX_Headers_1f) / 3 + ld a, SFX_INTRO_HOP call PlaySound ld de, IntroNidorinoAnimation2 call AnimateIntroNidorino @@ -51,12 +55,12 @@ PlayIntroScene: ; 4169d (10:569d) ret c ; hip - ld a, (SFX_1f_5f - SFX_Headers_1f) / 3 + ld a, SFX_INTRO_HIP call PlaySound ld de, IntroNidorinoAnimation1 call AnimateIntroNidorino ; hop - ld a, (SFX_1f_60 - SFX_Headers_1f) / 3 + ld a, SFX_INTRO_HOP call PlaySound ld de, IntroNidorinoAnimation2 call AnimateIntroNidorino @@ -66,291 +70,298 @@ PlayIntroScene: ; 4169d (10:569d) ; raise ld b, $4 - call Func_4183f - ld a, (SFX_1f_61 - SFX_Headers_1f) / 3 + call IntroCopyTiles + ld a, SFX_INTRO_RAISE call PlaySound - ld de, $401 - call Func_4180e + lb de, 8 / 2, MOVE_GENGAR_LEFT + call IntroMoveMon ld c, $1e call CheckForUserInterruption ret c ; slash ld b, $5 - call Func_4183f - ld a, (SFX_1f_62 - SFX_Headers_1f) / 3 + call IntroCopyTiles + ld a, SFX_INTRO_CRASH call PlaySound - ld de, $800 - call Func_4180e + lb de, 16 / 2, MOVE_GENGAR_RIGHT + call IntroMoveMon ; hip - ld a, (SFX_1f_5f - SFX_Headers_1f) / 3 + ld a, SFX_INTRO_HIP call PlaySound ld a, $24 - ld [wd09f], a + ld [wIntroNidorinoBaseTile], a ld de, IntroNidorinoAnimation3 call AnimateIntroNidorino ld c, $1e call CheckForUserInterruption ret c - ld de, $401 - call Func_4180e + lb de, 8 / 2, MOVE_GENGAR_LEFT + call IntroMoveMon ld b, $3 - call Func_4183f + call IntroCopyTiles ld c, $3c call CheckForUserInterruption ret c ; hip - ld a, (SFX_1f_5f - SFX_Headers_1f) / 3 + ld a, SFX_INTRO_HIP call PlaySound xor a - ld [wd09f], a - ld de, IntroNidorinoAnimation4 ; $5931 + ld [wIntroNidorinoBaseTile], a + ld de, IntroNidorinoAnimation4 call AnimateIntroNidorino ; hop - ld a, (SFX_1f_60 - SFX_Headers_1f) / 3 + ld a, SFX_INTRO_HOP call PlaySound - ld de, IntroNidorinoAnimation5 ; $593c + ld de, IntroNidorinoAnimation5 call AnimateIntroNidorino ld c, $14 call CheckForUserInterruption ret c ld a, $24 - ld [wd09f], a - ld de, IntroNidorinoAnimation6 ; $5947 + ld [wIntroNidorinoBaseTile], a + ld de, IntroNidorinoAnimation6 call AnimateIntroNidorino ld c, $1e call CheckForUserInterruption ret c ; lunge - ld a, (SFX_1f_5e - SFX_Headers_1f) / 3 + ld a, SFX_INTRO_LUNGE call PlaySound ld a, $48 - ld [wd09f], a - ld de, IntroNidorinoAnimation7 ; $5950 + ld [wIntroNidorinoBaseTile], a + ld de, IntroNidorinoAnimation7 jp AnimateIntroNidorino -AnimateIntroNidorino: ; 41793 (10:5793) +AnimateIntroNidorino: ld a, [de] cp $50 ret z - ld [W_BASECOORDY], a ; wd082 + ld [wBaseCoordY], a inc de ld a, [de] - ld [W_BASECOORDX], a ; wd081 + ld [wBaseCoordX], a push de - ld c, $24 - call Func_417ae + ld c, 6 * 6 + call UpdateIntroNidorinoOAM ld c, 5 call DelayFrames pop de inc de jr AnimateIntroNidorino -Func_417ae: ; 417ae (10:57ae) +UpdateIntroNidorinoOAM: ld hl, wOAMBuffer - ld a, [wd09f] + ld a, [wIntroNidorinoBaseTile] ld d, a -.asm_417b5 - ld a, [W_BASECOORDY] ; wd082 +.loop + ld a, [wBaseCoordY] add [hl] - ld [hli], a - ld a, [W_BASECOORDX] ; wd081 + ld [hli], a ; Y + ld a, [wBaseCoordX] add [hl] - ld [hli], a + ld [hli], a ; X ld a, d - ld [hli], a + ld [hli], a ; tile inc hl inc d dec c - jr nz, .asm_417b5 + jr nz, .loop ret -Func_417c7: ; 417c7 (10:57c7) +InitIntroNidorinoOAM: ld hl, wOAMBuffer - ld d, $0 -.asm_417cc + ld d, 0 +.loop push bc - ld a, [W_BASECOORDY] ; wd082 + ld a, [wBaseCoordY] ld e, a -.asm_417d1 +.innerLoop ld a, e - add $8 + add 8 ld e, a - ld [hli], a - ld a, [W_BASECOORDX] ; wd081 - ld [hli], a + ld [hli], a ; Y + ld a, [wBaseCoordX] + ld [hli], a ; X ld a, d - ld [hli], a + ld [hli], a ; tile ld a, $80 - ld [hli], a + ld [hli], a ; attributes inc d dec c - jr nz, .asm_417d1 - ld a, [W_BASECOORDX] ; wd081 - add $8 - ld [W_BASECOORDX], a ; wd081 + jr nz, .innerLoop + ld a, [wBaseCoordX] + add 8 + ld [wBaseCoordX], a pop bc dec b - jr nz, .asm_417cc + jr nz, .loop ret -Func_417f0: ; 417f0 (10:57f0) +IntroClearScreen: ld hl, vBGMap1 ld bc, $240 - jr asm_417fe + jr IntroClearCommon -Func_417f8: ; 417f8 (10:57f8) - hlCoord 0, 4 - ld bc, $c8 -asm_417fe: ; 417fe (10:57fe) +IntroClearMiddleOfScreen: +; clear the area of the tile map between the black bars on the top and bottom + coord hl, 0, 4 + ld bc, SCREEN_WIDTH * 10 + +IntroClearCommon: ld [hl], $0 inc hl dec bc ld a, b or c - jr nz, asm_417fe + jr nz, IntroClearCommon ret -Func_41807: ; 41807 (10:5807) +IntroPlaceBlackTiles: ld a, $1 -.asm_41809 +.loop ld [hli], a dec c - jr nz, .asm_41809 + jr nz, .loop ret -Func_4180e: ; 4180e (10:580e) +IntroMoveMon: +; d = number of times to move the mon (2 pixels each time) +; e: $00 = move Gengar right, $01 = move Gengar left, $ff = move Nidorino right ld a, e cp $ff - jr z, .asm_4181d + jr z, .moveNidorinoRight cp $1 - jr z, .asm_4182d + jr z, .moveGengarLeft +; move Gengar right ld a, [hSCX] dec a dec a - jr .asm_41831 -.asm_4181d + jr .next +.moveNidorinoRight push de - ld a, $2 - ld [W_BASECOORDX], a ; wd081 + ld a, 2 + ld [wBaseCoordX], a xor a - ld [W_BASECOORDY], a ; wd082 - ld c, $24 - call Func_417ae + ld [wBaseCoordY], a + ld c, 6 * 6 + call UpdateIntroNidorinoOAM pop de -.asm_4182d +.moveGengarLeft ld a, [hSCX] inc a inc a -.asm_41831 +.next ld [hSCX], a push de - ld c, $2 + ld c, 2 call CheckForUserInterruption pop de ret c dec d - jr nz, Func_4180e + jr nz, IntroMoveMon ret -Func_4183f: ; 4183f (10:583f) - hlCoord 13, 7 +IntroCopyTiles: + coord hl, 13, 7 -CopyTileIDsFromList_ZeroBaseTileID: ; 41842 (10:5842) - ld c, $0 +CopyTileIDsFromList_ZeroBaseTileID: + ld c, 0 predef_jump CopyTileIDsFromList -Func_41849: ; 41849 (10:5849) - predef Func_79869 +PlayMoveSoundB: +; unused + predef GetMoveSoundB ld a, b jp PlaySound -LoadIntroGraphics: ; 41852 (10:5852) - ld hl, FightIntroBackMon ; $5a99 +LoadIntroGraphics: + ld hl, FightIntroBackMon ld de, vChars2 - ld bc, $600 + ld bc, FightIntroBackMonEnd - FightIntroBackMon ld a, BANK(FightIntroBackMon) call FarCopyData2 - ld hl, GameFreakIntro ; $5959 + ld hl, GameFreakIntro ld de, vChars2 + $600 - ld bc, $140 + ld bc, GameFreakIntroEnd - GameFreakIntro ld a, BANK(GameFreakIntro) call FarCopyData2 - ld hl, GameFreakIntro ; $5959 + ld hl, GameFreakIntro ld de, vChars1 - ld bc, $140 + ld bc, GameFreakIntroEnd - GameFreakIntro ld a, BANK(GameFreakIntro) call FarCopyData2 - ld hl, FightIntroFrontMon ; $6099 + ld hl, FightIntroFrontMon ld de, vChars0 - ld bc, $6c0 + ld bc, FightIntroFrontMonEnd - FightIntroFrontMon ld a, BANK(FightIntroFrontMon) jp FarCopyData2 -PlayShootingStar: ; 4188a (10:588a) - ld b, $c - call GoPAL_SET +PlayShootingStar: + ld b, SET_PAL_GAME_FREAK_INTRO + call RunPaletteCommand callba LoadCopyrightAndTextBoxTiles - ld a, $e4 - ld [rBGP], a ; $ff47 - ld c, $b4 + ld a, %11100100 + ld [rBGP], a + ld c, 180 call DelayFrames call ClearScreen call DisableLCD xor a - ld [W_CUROPPONENT], a ; wd059 - call Func_418e9 + ld [wCurOpponent], a + call IntroDrawBlackBars 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 + jr c, .next ; skip the delay if the user interrupted the animation + ld c, 40 call DelayFrames -.asm_418d0 +.next ld a, BANK(Music_IntroBattle) - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, MUSIC_INTRO_BATTLE - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound - call Func_417f8 + call IntroClearMiddleOfScreen call ClearSprites jp Delay3 -Func_418e9: ; 418e9 (10:58e9) - call Func_417f0 - ld hl, wTileMap - ld c, $50 - call Func_41807 - hlCoord 0, 14 - ld c, $50 - call Func_41807 +IntroDrawBlackBars: +; clear the screen and draw black bars on the top and bottom + call IntroClearScreen + coord hl, 0, 0 + ld c, SCREEN_WIDTH * 4 + call IntroPlaceBlackTiles + coord hl, 0, 14 + ld c, SCREEN_WIDTH * 4 + call IntroPlaceBlackTiles ld hl, vBGMap1 ld c, $80 - call Func_41807 + call IntroPlaceBlackTiles ld hl, vBGMap1 + $1c0 ld c, $80 - jp Func_41807 + jp IntroPlaceBlackTiles -Func_4190c: ; 4190c (10:590c) +EmptyFunc4: ret -IntroNidorinoAnimation0: ; 4190d (10:590d) +IntroNidorinoAnimation0: db 0, 0 db $50 -IntroNidorinoAnimation1: ; 41910 (10:5910) +IntroNidorinoAnimation1: ; This is a sequence of pixel movements for part of the Nidorino animation. This ; list describes how Nidorino should hop. ; First byte is y movement, second byte is x movement @@ -361,7 +372,7 @@ IntroNidorinoAnimation1: ; 41910 (10:5910) db 2, 2 db $50 ; list terminator -IntroNidorinoAnimation2: ; 4191b (10:591b) +IntroNidorinoAnimation2: ; This is a sequence of pixel movements for part of the Nidorino animation. ; First byte is y movement, second byte is x movement db 0, 0 @@ -371,7 +382,7 @@ IntroNidorinoAnimation2: ; 4191b (10:591b) db 2, -2 db $50 ; list terminator -IntroNidorinoAnimation3: ; 41926 (10:5926) +IntroNidorinoAnimation3: ; This is a sequence of pixel movements for part of the Nidorino animation. ; First byte is y movement, second byte is x movement db 0, 0 @@ -381,7 +392,7 @@ IntroNidorinoAnimation3: ; 41926 (10:5926) db 12, 6 db $50 ; list terminator -IntroNidorinoAnimation4: ; 41931 (10:5931) +IntroNidorinoAnimation4: ; This is a sequence of pixel movements for part of the Nidorino animation. ; First byte is y movement, second byte is x movement db 0, 0 @@ -391,7 +402,7 @@ IntroNidorinoAnimation4: ; 41931 (10:5931) db 8, -4 db $50 ; list terminator -IntroNidorinoAnimation5: ; 4193c (10:593c) +IntroNidorinoAnimation5: ; This is a sequence of pixel movements for part of the Nidorino animation. ; First byte is y movement, second byte is x movement db 0, 0 @@ -401,7 +412,7 @@ IntroNidorinoAnimation5: ; 4193c (10:593c) db 8, 4 db $50 ; list terminator -IntroNidorinoAnimation6: ; 41947 (10:5947) +IntroNidorinoAnimation6: ; This is a sequence of pixel movements for part of the Nidorino animation. ; First byte is y movement, second byte is x movement db 0, 0 @@ -410,7 +421,7 @@ IntroNidorinoAnimation6: ; 41947 (10:5947) db 0, 0 db $50 ; list terminator -IntroNidorinoAnimation7: ; 41950 (10:5950) +IntroNidorinoAnimation7: ; This is a sequence of pixel movements for part of the Nidorino animation. ; First byte is y movement, second byte is x movement db -8, -16 @@ -419,25 +430,29 @@ IntroNidorinoAnimation7: ; 41950 (10:5950) db -4, -10 db $50 ; list terminator -GameFreakIntro: ; 41959 (10:5959) +GameFreakIntro: INCBIN "gfx/gamefreak_intro.2bpp" INCBIN "gfx/gamefreak_logo.2bpp" ds $10 ; blank tile +GameFreakIntroEnd: -FightIntroBackMon: ; 41a99 (10:5a99) +FightIntroBackMon: INCBIN "gfx/intro_fight.2bpp" +FightIntroBackMonEnd: -FightIntroFrontMon: ; 42099 (10:6099) +FightIntroFrontMon: IF DEF(_RED) INCBIN "gfx/red/intro_nido_1.6x6.2bpp" INCBIN "gfx/red/intro_nido_2.6x6.2bpp" INCBIN "gfx/red/intro_nido_3.6x6.2bpp" - ds $10 ; blank tile ENDC IF DEF(_BLUE) INCBIN "gfx/blue/intro_purin_1.6x6.2bpp" INCBIN "gfx/blue/intro_purin_2.6x6.2bpp" INCBIN "gfx/blue/intro_purin_3.6x6.2bpp" - ds $10 ; blank tile ENDC + +FightIntroFrontMonEnd: + + ds $10 ; blank tile diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm new file mode 100644 index 00000000..1294ed8d --- /dev/null +++ b/engine/items/inventory.asm @@ -0,0 +1,150 @@ +; function to add an item (in varying quantities) to the player's bag or PC box +; INPUT: +; hl = address of inventory (either wNumBagItems or wNumBoxItems) +; [wcf91] = item ID +; [wItemQuantity] = item quantity +; sets carry flag if successful, unsets carry flag if unsuccessful +AddItemToInventory_: + ld a,[wItemQuantity] ; a = item quantity + push af + push bc + push de + push hl + push hl + ld d,PC_ITEM_CAPACITY ; how many items the PC can hold + ld a,wNumBagItems & $FF + cp l + jr nz,.checkIfInventoryFull + ld a,wNumBagItems >> 8 + cp h + jr nz,.checkIfInventoryFull +; if the destination is the bag + ld d,BAG_ITEM_CAPACITY ; how many items the bag can hold +.checkIfInventoryFull + ld a,[hl] + sub d + ld d,a + ld a,[hli] + and a + jr z,.addNewItem +.loop + ld a,[hli] + ld b,a ; b = ID of current item in table + ld a,[wcf91] ; a = ID of item being added + cp b ; does the current item in the table match the item being added? + jp z,.increaseItemQuantity ; if so, increase the item's quantity + inc hl + ld a,[hl] + cp a,$ff ; is it the end of the table? + jr nz,.loop +.addNewItem ; add an item not yet in the inventory + pop hl + ld a,d + and a ; is there room for a new item slot? + jr z,.done +; if there is room + inc [hl] ; increment the number of items in the inventory + ld a,[hl] ; the number of items will be the index of the new item + add a + dec a + ld c,a + ld b,0 + add hl,bc ; hl = address to store the item + ld a,[wcf91] + ld [hli],a ; store item ID + ld a,[wItemQuantity] + ld [hli],a ; store item quantity + ld [hl],$ff ; store terminator + jp .success +.increaseItemQuantity ; increase the quantity of an item already in the inventory + ld a,[wItemQuantity] + ld b,a ; b = quantity to add + ld a,[hl] ; a = existing item quantity + add b ; a = new item quantity + cp a,100 + jp c,.storeNewQuantity ; if the new quantity is less than 100, store it +; if the new quantity is greater than or equal to 100, +; try to max out the current slot and add the rest in a new slot + sub a,99 + ld [wItemQuantity],a ; a = amount left over (to put in the new slot) + ld a,d + and a ; is there room for a new item slot? + jr z,.increaseItemQuantityFailed +; if so, store 99 in the current slot and store the rest in a new slot + ld a,99 + ld [hli],a + jp .loop +.increaseItemQuantityFailed + pop hl + and a + jr .done +.storeNewQuantity + ld [hl],a + pop hl +.success + scf +.done + pop hl + pop de + pop bc + pop bc + ld a,b + ld [wItemQuantity],a ; restore the initial value from when the function was called + ret + +; function to remove an item (in varying quantities) from the player's bag or PC box +; INPUT: +; hl = address of inventory (either wNumBagItems or wNumBoxItems) +; [wWhichPokemon] = index (within the inventory) of the item to remove +; [wItemQuantity] = quantity to remove +RemoveItemFromInventory_: + push hl + inc hl + ld a,[wWhichPokemon] ; index (within the inventory) of the item being removed + sla a + add l + ld l,a + jr nc,.noCarry + inc h +.noCarry + inc hl + ld a,[wItemQuantity] ; quantity being removed + ld e,a + ld a,[hl] ; a = current quantity + sub e + ld [hld],a ; store new quantity + ld [wMaxItemQuantity],a + and a + jr nz,.skipMovingUpSlots +; if the remaining quantity is 0, +; remove the emptied item slot and move up all the following item slots +.moveSlotsUp + ld e,l + ld d,h + inc de + inc de ; de = address of the slot following the emptied one +.loop ; loop to move up the following slots + ld a,[de] + inc de + ld [hli],a + cp a,$ff + jr nz,.loop +; update menu info + xor a + ld [wListScrollOffset],a + ld [wCurrentMenuItem],a + ld [wBagSavedMenuItem],a + ld [wSavedListScrollOffset],a + pop hl + ld a,[hl] ; a = number of items in inventory + dec a ; decrement the number of items + ld [hl],a ; store new number of items + ld [wListCount],a + cp a,2 + jr c,.done + ld [wMaxMenuItem],a + jr .done +.skipMovingUpSlots + pop hl +.done + ret diff --git a/engine/items/itemfinder.asm b/engine/items/itemfinder.asm index d7e5b3ce..7c15d4bb 100755 --- a/engine/items/itemfinder.asm +++ b/engine/items/itemfinder.asm @@ -1,16 +1,16 @@ -HiddenItemNear: ; 7481f (1d:481f) +HiddenItemNear: ld hl, HiddenItemCoords - ld b, $0 -.asm_74824 - ld de, $0003 - ld a, [W_CURMAP] + ld b, 0 +.loop + ld de, 3 + ld a, [wCurMap] call IsInRestOfArray ret nc ; return if current map has no hidden items push bc push hl - ld hl, wd6f0 + ld hl, wObtainedHiddenItemsFlags ld c, b - ld b, $2 + ld b, FLAG_TEST predef FlagActionPredef ld a, c pop hl @@ -22,28 +22,30 @@ HiddenItemNear: ; 7481f (1d:481f) inc hl ld e, [hl] inc hl - jr nz, .asm_74824 ; 0x74845 $dd - ld a, [W_YCOORD] - call Func_7486b + jr nz, .loop ; if the item has already been obtained +; check if the item is within 4-5 tiles (depending on the direction of item) + ld a, [wYCoord] + call Sub5ClampTo0 cp d - jr nc, .asm_74824 ; 0x7484e $d4 - ld a, [W_YCOORD] - add $4 + jr nc, .loop + ld a, [wYCoord] + add 4 cp d - jr c, .asm_74824 ; 0x74856 $cc - ld a, [W_XCOORD] - call Func_7486b + jr c, .loop + ld a, [wXCoord] + call Sub5ClampTo0 cp e - jr nc, .asm_74824 ; 0x7485f $c3 - ld a, [W_XCOORD] - add $5 + jr nc, .loop + ld a, [wXCoord] + add 5 cp e - jr c, .asm_74824 ; 0x74867 $bb + jr c, .loop scf ret -Func_7486b: ; 7486b (1d:486b) - sub $5 +Sub5ClampTo0: +; subtract 5 but clamp to 0 + sub 5 cp $f0 ret c xor a diff --git a/engine/items/items.asm b/engine/items/items.asm index 21e6e924..f8873a6e 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -1,7 +1,7 @@ -UseItem_: ; d5c7 (3:55c7) +UseItem_: ld a,1 - ld [wcd6a],a - ld a,[wcf91] ;contains item_ID + ld [wActionResultOrTookBattleTurn],a ; initialise to success value + ld a,[wcf91] ;contains item_ID cp a,HM_01 jp nc,ItemUseTMHM ld hl,ItemUsePtrTable @@ -15,7 +15,7 @@ UseItem_: ; d5c7 (3:55c7) ld l,a jp [hl] -ItemUsePtrTable: ; d5e1 (3:55e1) +ItemUsePtrTable: dw ItemUseBall ; MASTER_BALL dw ItemUseBall ; ULTRA_BALL dw ItemUseBall ; GREAT_BALL @@ -70,7 +70,7 @@ ItemUsePtrTable: ; d5e1 (3:55e1) dw ItemUseMedicine ; FULL_HEAL dw ItemUseMedicine ; REVIVE dw ItemUseMedicine ; MAX_REVIVE - dw ItemUseGuardSpec ; GUARD_SPEC_ + dw ItemUseGuardSpec ; GUARD_SPEC dw ItemUseSuperRepel ; SUPER_REPL dw ItemUseMaxRepel ; MAX_REPEL dw ItemUseDireHit ; DIRE_HIT @@ -78,7 +78,7 @@ ItemUsePtrTable: ; d5e1 (3:55e1) dw ItemUseMedicine ; FRESH_WATER dw ItemUseMedicine ; SODA_POP dw ItemUseMedicine ; LEMONADE - dw UnusableItem ; S_S__TICKET + dw UnusableItem ; S_S_TICKET dw UnusableItem ; GOLD_TEETH dw ItemUseXStat ; X_ATTACK dw ItemUseXStat ; X_DEFEND @@ -90,108 +90,154 @@ ItemUsePtrTable: ; d5e1 (3:55e1) dw UnusableItem ; SILPH_SCOPE dw ItemUsePokeflute ; POKE_FLUTE dw UnusableItem ; LIFT_KEY - dw UnusableItem ; EXP__ALL - dw OldRodCode ; OLD_ROD - dw GoodRodCode ; GOOD_ROD - dw SuperRodCode ; SUPER_ROD + dw UnusableItem ; EXP_ALL + dw ItemUseOldRod ; OLD_ROD + dw ItemUseGoodRod ; GOOD_ROD + dw ItemUseSuperRod ; SUPER_ROD dw ItemUsePPUp ; PP_UP (real one) dw ItemUsePPRestore ; ETHER dw ItemUsePPRestore ; MAX_ETHER dw ItemUsePPRestore ; ELIXER dw ItemUsePPRestore ; MAX_ELIXER -ItemUseBall: ; d687 (3:5687) - ld a,[W_ISINBATTLE] +ItemUseBall: + +; Balls can't be used out of battle. + ld a,[wIsInBattle] and a - jp z,ItemUseNotTime ; not in battle + jp z,ItemUseNotTime + +; Balls can't catch trainers' Pokémon. dec a jp nz,ThrowBallAtTrainerMon - ld a,[W_BATTLETYPE] + +; If this is for the old man battle, skip checking if the party & box are full. + ld a,[wBattleType] dec a - jr z,.UseBall - ld a,[wPartyCount] ;is Party full? + jr z,.canUseBall + + ld a,[wPartyCount] ; is party full? cp a,PARTY_LENGTH - jr nz,.UseBall - ld a,[W_NUMINBOX] ;is Box full? + jr nz,.canUseBall + ld a,[wNumInBox] ; is box full? cp a,MONS_PER_BOX jp z,BoxFullCannotThrowBall -.UseBall ;$56a7 -;ok, you can use a ball + +.canUseBall xor a - ld [wd11c],a - ld a,[W_BATTLETYPE] - cp a,2 ;SafariBattle + ld [wCapturedMonSpecies],a + + ld a,[wBattleType] + cp a,BATTLE_TYPE_SAFARI jr nz,.skipSafariZoneCode + .safariZone - ; remove a Safari Ball from inventory - ld hl,W_NUMSAFARIBALLS - dec [hl] -.skipSafariZoneCode ;$56b6 - call GoPAL_SET_CF1C - ld a,$43 - ld [wd11e],a - call LoadScreenTilesFromBuffer1 ;restore screenBuffer from Backup + ld hl,wNumSafariBalls + dec [hl] ; remove a Safari Ball + +.skipSafariZoneCode + call RunDefaultPaletteCommand + + ld a,$43 ; successful capture value + ld [wPokeBallAnimData],a + + call LoadScreenTilesFromBuffer1 ld hl,ItemUseText00 call PrintText + +; If the player is fighting an unidentified ghost, set the value that indicates +; the Pokémon can't be caught and skip the capture calculations. callab IsGhostBattle - ld b,$10 - jp z,.next12 - ld a,[W_BATTLETYPE] + ld b,$10 ; can't be caught value + jp z,.setAnimData + + ld a,[wBattleType] dec a jr nz,.notOldManBattle + .oldManBattle - ld hl,W_GRASSRATE + ld hl,wGrassRate 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 - ld a,[W_CURMAP] + ld bc,NAME_LENGTH + call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno. glitch) + jp .captured + +.notOldManBattle +; If the player is fighting the ghost Marowak, set the value that indicates the +; Pokémon can't be caught and skip the capture calculations. + ld a,[wCurMap] cp a,POKEMONTOWER_6 jr nz,.loop ld a,[wEnemyMonSpecies2] cp a,MAROWAK - ld b,$10 - jp z,.next12 -; if not fighting ghost Marowak, loop until a random number in the current -; pokeball's allowed range is found -.loop ;$56fa + ld b,$10 ; can't be caught value + jp z,.setAnimData + +; Get the first random number. Let it be called Rand1. +; Rand1 must be within a certain range according the kind of ball being thrown. +; The ranges are as follows. +; Poké Ball: [0, 255] +; Great Ball: [0, 200] +; Ultra/Safari Ball: [0, 150] +; Loop until an acceptable number is found. + +.loop call Random ld b,a + +; Get the item ID. ld hl,wcf91 ld a,[hl] + +; The Master Ball always succeeds. cp a,MASTER_BALL - jp z,.BallSuccess ;$578b + jp z,.captured + +; Anything will do for the basic Poké Ball. cp a,POKE_BALL jr z,.checkForAilments + +; If it's a Great/Ultra/Safari Ball and Rand1 is greater than 200, try again. ld a,200 cp b - jr c,.loop ;get only numbers <= 200 for Great Ball + jr c,.loop + +; Less than or equal to 200 is good enough for a Great Ball. ld a,[hl] cp a,GREAT_BALL jr z,.checkForAilments - ld a,150 ;get only numbers <= 150 for Ultra Ball + +; If it's an Ultra/Safari Ball and Rand1 is greater than 150, try again. + ld a,150 cp b jr c,.loop -.checkForAilments ;$571a -; 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. -; for the others, a random number from 0-11 ensures a catch. - ld a,[wEnemyMonStatus] ;status ailments + +.checkForAilments +; Pokémon can be caught more easily with a status ailment. +; Depending on the status ailment, a certain value will be subtracted from +; Rand1. Let this value be called Status. +; The larger Status is, the more easily the Pokémon can be caught. +; no status ailment: Status = 0 +; Burn/Paralysis/Poison: Status = 12 +; Freeze/Sleep: Status = 25 +; If Status is greater than Rand1, the Pokémon will be caught for sure. + ld a,[wEnemyMonStatus] and a - jr z,.noAilments - and a, 1 << FRZ | SLP ;is frozen and/or asleep? + jr z,.skipAilmentValueSubtraction ; no ailments + and a, 1 << FRZ | SLP ld c,12 jr z,.notFrozenOrAsleep ld c,25 -.notFrozenOrAsleep ;$5728 +.notFrozenOrAsleep ld a,b sub c - jp c,.BallSuccess ;$578b + jp c,.captured ld b,a -.noAilments ;$572e - push bc ;save RANDOM number + +.skipAilmentValueSubtraction + push bc ; save (Rand1 - Status) + +; Calculate MaxHP * 255. xor a ld [H_MULTIPLICAND],a ld hl,wEnemyMonMaxHP @@ -201,125 +247,182 @@ ItemUseBall: ; d687 (3:5687) ld [H_MULTIPLICAND + 2],a ld a,255 ld [H_MULTIPLIER],a - call Multiply ; MaxHP * 255 + call Multiply + +; Determine BallFactor. It's 8 for Great Balls and 12 for the others. ld a,[wcf91] cp a,GREAT_BALL - ld a,12 ;any other BallFactor - jr nz,.next7 + ld a,12 + jr nz,.skip1 ld a,8 -.next7 ;$574d + +.skip1 +; Note that the results of all division operations are floored. + +; Calculate (MaxHP * 255) / BallFactor. ld [H_DIVISOR],a - ld b,4 ; number of bytes in dividend + ld b,4 ; number of bytes in dividend call Divide + +; Divide the enemy's current HP by 4. HP is not supposed to exceed 999 so +; the result should fit in a. If the division results in a quotient of 0, +; change it to 1. ld hl,wEnemyMonHP ld a,[hli] ld b,a ld a,[hl] - -; explanation: we have a 16-bit value equal to [b << 8 | a]. -; This number is divided by 4. The result is 8 bit (reg. a). -; Always bigger than zero. srl b rr a srl b - rr a ; a = current HP / 4 + rr a and a - jr nz,.next8 + jr nz,.skip2 inc a -.next8 ;$5766 + +.skip2 +; Let W = ((MaxHP * 255) / BallFactor) / max(HP / 4, 1). Calculate W. ld [H_DIVISOR],a ld b,4 - call Divide ; ((MaxHP * 255) / BallFactor) / (CurHP / 4) + call Divide + +; If W > 255, store 255 in [H_QUOTIENT + 3]. +; Let X = min(W, 255) = [H_QUOTIENT + 3]. ld a,[H_QUOTIENT + 2] and a - jr z,.next9 + jr z,.skip3 ld a,255 ld [H_QUOTIENT + 3],a -.next9 ;$5776 - pop bc - ld a,[wEnemyMonCatchRate] ;enemy: Catch Rate + +.skip3 + pop bc ; b = Rand1 - Status + +; If Rand1 - Status > CatchRate, the ball fails to capture the Pokémon. + ld a,[wEnemyMonCatchRate] cp b - jr c,.next10 + jr c,.failedToCapture + +; If W > 255, the ball captures the Pokémon. ld a,[H_QUOTIENT + 2] and a - jr nz,.BallSuccess ; if ((MaxHP * 255) / BallFactor) / (CurHP / 4) > 0x255, automatic success - call Random + jr nz,.captured + + call Random ; Let this random number be called Rand2. + +; If Rand2 > X, the ball fails to capture the Pokémon. ld b,a ld a,[H_QUOTIENT + 3] cp b - jr c,.next10 -.BallSuccess ;$578b - jr .BallSuccess2 -.next10 ;$578d + jr c,.failedToCapture + +.captured + jr .skipShakeCalculations + +.failedToCapture ld a,[H_QUOTIENT + 3] - ld [wd11e],a + ld [wPokeBallCaptureCalcTemp],a ; Save X. + +; Calculate CatchRate * 100. xor a ld [H_MULTIPLICAND],a ld [H_MULTIPLICAND + 1],a - ld a,[wEnemyMonCatchRate] ;enemy: Catch Rate + ld a,[wEnemyMonCatchRate] ld [H_MULTIPLICAND + 2],a ld a,100 ld [H_MULTIPLIER],a - call Multiply ; CatchRate * 100 + call Multiply + +; Determine BallFactor2. +; Poké Ball: BallFactor2 = 255 +; Great Ball: BallFactor2 = 200 +; Ultra/Safari Ball: BallFactor2 = 150 ld a,[wcf91] ld b,255 cp a,POKE_BALL - jr z,.next11 + jr z,.skip4 ld b,200 cp a,GREAT_BALL - jr z,.next11 + jr z,.skip4 ld b,150 cp a,ULTRA_BALL - jr z,.next11 -.next11 ;$57b8 + jr z,.skip4 + +.skip4 +; Let Y = (CatchRate * 100) / BallFactor2. Calculate Y. ld a,b ld [H_DIVISOR],a ld b,4 call Divide + +; If Y > 255, there are 3 shakes. +; Note that this shouldn't be possible. +; The maximum value of Y is (255 * 100) / 150 = 170. ld a,[H_QUOTIENT + 2] and a - ld b,$63 - jr nz,.next12 - ld a,[wd11e] + ld b,$63 ; 3 shakes + jr nz,.setAnimData + +; Calculate X * Y. + ld a,[wPokeBallCaptureCalcTemp] ld [H_MULTIPLIER],a call Multiply + +; Calculate (X * Y) / 255. ld a,255 ld [H_DIVISOR],a ld b,4 call Divide - ld a,[wEnemyMonStatus] ;status ailments + +; Determine Status2. +; no status ailment: Status2 = 0 +; Burn/Paralysis/Poison: Status2 = 5 +; Freeze/Sleep: Status2 = 10 + ld a,[wEnemyMonStatus] and a - jr z,.next13 + jr z,.skip5 and a, 1 << FRZ | SLP ld b,5 - jr z,.next14 + jr z,.addAilmentValue ld b,10 -.next14 ;$57e6 + +.addAilmentValue +; If the Pokémon has a status ailment, add Status2. ld a,[H_QUOTIENT + 3] add b ld [H_QUOTIENT + 3],a -.next13 ;$57eb + +.skip5 +; Finally determine the number of shakes. +; Let Z = ((X * Y) / 255) + Status2 = [H_QUOTIENT + 3]. +; The number of shakes depend on the range Z is in. +; 0 ≤ Z < 10: 0 shakes (the ball misses) +; 10 ≤ Z < 30: 1 shake +; 30 ≤ Z < 70: 2 shakes +; 70 ≤ Z: 3 shakes ld a,[H_QUOTIENT + 3] cp a,10 ld b,$20 - jr c,.next12 + jr c,.setAnimData cp a,30 ld b,$61 - jr c,.next12 + jr c,.setAnimData cp a,70 ld b,$62 - jr c,.next12 + jr c,.setAnimData ld b,$63 -.next12 ;$5801 + +.setAnimData ld a,b - ld [wd11e],a -.BallSuccess2 ;$5805 + ld [wPokeBallAnimData],a + +.skipShakeCalculations ld c,20 call DelayFrames + +; Do the animation. ld a,TOSS_ANIM - ld [W_ANIMATIONID],a + ld [wAnimationID],a xor a - ld [$fff3],a + ld [H_WHOSETURN],a ld [wAnimationType],a ld [wDamageMultipliers],a ld a,[wWhichPokemon] @@ -331,51 +434,67 @@ ItemUseBall: ; d687 (3:5687) ld [wcf91],a pop af ld [wWhichPokemon],a - ld a,[wd11e] + +; Determine the message to display from the animation. + ld a,[wPokeBallAnimData] cp a,$10 ld hl,ItemUseBallText00 - jp z,.printText0 + jp z,.printMessage cp a,$20 ld hl,ItemUseBallText01 - jp z,.printText0 + jp z,.printMessage cp a,$61 ld hl,ItemUseBallText02 - jp z,.printText0 + jp z,.printMessage cp a,$62 ld hl,ItemUseBallText03 - jp z,.printText0 + jp z,.printMessage cp a,$63 ld hl,ItemUseBallText04 - jp z,.printText0 - ld hl,wEnemyMonHP ;current HP + jp z,.printMessage + +; Save current HP. + ld hl,wEnemyMonHP ld a,[hli] push af ld a,[hli] - push af ;backup currentHP... + push af + +; Save status ailment. inc hl ld a,[hl] - push af ;...and status ailments + push af + push hl - ld hl,W_ENEMYBATTSTATUS3 + +; If the Pokémon is transformed, the Pokémon is assumed to be a Ditto. +; This is a bug because a wild Pokémon could have used Transform via +; Mirror Move even though the only wild Pokémon that knows Transform is Ditto. + ld hl,wEnemyBattleStatus3 bit Transformed,[hl] - jr z,.next15 - ld a,$4c + jr z,.notTransformed + ld a,DITTO ld [wEnemyMonSpecies2],a - jr .next16 -.next15 ;$5871 + jr .skip6 + +.notTransformed +; If the Pokémon is not transformed, set the transformed bit and copy the +; DVs to wTransformedEnemyMonOriginalDVs so that LoadEnemyMonData won't generate +; new DVs. set Transformed,[hl] - ld hl,wcceb + ld hl,wTransformedEnemyMonOriginalDVs ld a,[wEnemyMonDVs] ld [hli],a ld a,[wEnemyMonDVs + 1] ld [hl],a -.next16 ;$587e + +.skip6 ld a,[wcf91] push af ld a,[wEnemyMonSpecies2] ld [wcf91],a ld a,[wEnemyMonLevel] - ld [W_CURENEMYLVL],a + ld [wCurEnemyLVL],a callab LoadEnemyMonData pop af ld [wcf91],a @@ -387,124 +506,136 @@ ItemUseBall: ; d687 (3:5687) ld [hld],a pop af ld [hl],a - ld a,[wEnemyMonSpecies] ;enemy - ld [wd11c],a + ld a,[wEnemyMonSpecies] + ld [wCapturedMonSpecies],a ld [wcf91],a ld [wd11e],a - ld a,[W_BATTLETYPE] - dec a - jr z,.printText1 + ld a,[wBattleType] + dec a ; is this the old man battle? + jr z,.oldManCaughtMon ; if so, don't give the player the caught Pokémon + ld hl,ItemUseBallText05 call PrintText + +; Add the caught Pokémon to the Pokédex. predef IndexToPokedex ld a,[wd11e] dec a ld c,a - ld b,2 - ld hl,wPokedexOwned ;Dex_own_flags (pokemon) + ld b,FLAG_TEST + ld hl,wPokedexOwned predef FlagActionPredef ld a,c push af ld a,[wd11e] dec a ld c,a - ld b,1 + ld b,FLAG_SET predef FlagActionPredef pop af - and a - jr nz,.checkParty + + and a ; was the Pokémon already in the Pokédex? + jr nz,.skipShowingPokedexData ; if so, don't show the Pokédex data + ld hl,ItemUseBallText06 call PrintText call ClearSprites - ld a,[wEnemyMonSpecies] ;caught mon_ID + ld a,[wEnemyMonSpecies] ld [wd11e],a predef ShowPokedexData -.checkParty ;$58f4 + +.skipShowingPokedexData ld a,[wPartyCount] - cp a,PARTY_LENGTH ;is party full? + cp a,PARTY_LENGTH ; is party full? jr z,.sendToBox - xor a - ld [wcc49],a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation],a call ClearSprites - call AddPartyMon ;add mon to Party - jr .End -.sendToBox ;$5907 + call AddPartyMon + jr .done + +.sendToBox call ClearSprites call SendNewMonToBox ld hl,ItemUseBallText07 - ld a,[wd7f1] - bit 0,a ;already met Bill? - jr nz,.sendToBox2 + CheckEvent EVENT_MET_BILL + jr nz,.printTransferredToPCText ld hl,ItemUseBallText08 -.sendToBox2 ;$591a +.printTransferredToPCText call PrintText - jr .End -.printText1 ;$591f + jr .done + +.oldManCaughtMon ld hl,ItemUseBallText05 -.printText0 ;$5922 + +.printMessage call PrintText call ClearSprites -.End ;$5928 - ld a,[W_BATTLETYPE] - and a - ret nz + +.done + ld a,[wBattleType] + and a ; is this the old man battle? + ret nz ; if so, don't remove a ball from the bag + +; Remove a ball from the bag. ld hl,wNumBagItems inc a - ld [wcf96],a - jp RemoveItemFromInventory ;remove ITEM (XXX) -ItemUseBallText00: ; d937 (3:5937) + ld [wItemQuantity],a + jp RemoveItemFromInventory + +ItemUseBallText00: ;"It dodged the thrown ball!" ;"This pokemon can't be caught" TX_FAR _ItemUseBallText00 db "@" -ItemUseBallText01: ; d93c (3:593c) +ItemUseBallText01: ;"You missed the pokemon!" TX_FAR _ItemUseBallText01 db "@" -ItemUseBallText02: ; d941 (3:5941) +ItemUseBallText02: ;"Darn! The pokemon broke free!" TX_FAR _ItemUseBallText02 db "@" -ItemUseBallText03: ; d946 (3:5946) +ItemUseBallText03: ;"Aww! It appeared to be caught!" TX_FAR _ItemUseBallText03 db "@" -ItemUseBallText04: ; d94b (3:594b) +ItemUseBallText04: ;"Shoot! It was so close too!" TX_FAR _ItemUseBallText04 db "@" -ItemUseBallText05: ; d950 (3:5950) +ItemUseBallText05: ;"All right! {MonName} was caught!" ;play sound TX_FAR _ItemUseBallText05 - db $12,$06 + TX_SFX_CAUGHT_MON + TX_BLINK db "@" -ItemUseBallText07: ; d957 (3:5957) +ItemUseBallText07: ;"X was transferred to Bill's PC" TX_FAR _ItemUseBallText07 db "@" -ItemUseBallText08: ; d95c (3:595c) +ItemUseBallText08: ;"X was transferred to someone's PC" TX_FAR _ItemUseBallText08 db "@" -ItemUseBallText06: ; d961 (3:5961) +ItemUseBallText06: ;"New DEX data will be added..." ;play sound TX_FAR _ItemUseBallText06 - db $13,$06 + TX_SFX_DEX_PAGE_ADDED + TX_BLINK db "@" -ItemUseTownMap: ; d968 (3:5968) - ld a,[W_ISINBATTLE] +ItemUseTownMap: + ld a,[wIsInBattle] and a jp nz,ItemUseNotTime - ld b, BANK(DisplayTownMap) - ld hl, DisplayTownMap - jp Bankswitch ; display Town Map + jpba DisplayTownMap -ItemUseBicycle: ; d977 (3:5977) - ld a,[W_ISINBATTLE] +ItemUseBicycle: + ld a,[wIsInBattle] and a jp nz,ItemUseNotTime ld a,[wWalkBikeSurfState] @@ -534,7 +665,7 @@ ItemUseBicycle: ; d977 (3:5977) jp PrintText ; used for Surf out-of-battle effect -ItemUseSurfboard: ; d9b4 (3:59b4) +ItemUseSurfboard: ld a,[wWalkBikeSurfState] ld [wWalkBikeSurfStateCopy],a cp a,2 ; is the player already surfing? @@ -556,17 +687,17 @@ ItemUseSurfboard: ; d9b4 (3:59b4) jp PrintText .tryToStopSurfing xor a - ld [$ff8c],a + ld [hSpriteIndexOrTextID],a ld d,16 ; talking range in pixels (normal range) call IsSpriteInFrontOfPlayer2 res 7,[hl] - ld a,[$ff8c] + ld a,[hSpriteIndexOrTextID] and a ; is there a sprite in the way? jr nz,.cannotStopSurfing ld hl,TilePairCollisionsWater call CheckForTilePairCollisions jr c,.cannotStopSurfing - ld hl,W_TILESETCOLLISIONPTR ; pointer to list of passable tiles + ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles ld a,[hli] ld h,[hl] ld l,a ; hl now points to passable tiles @@ -593,14 +724,14 @@ ItemUseSurfboard: ; d9b4 (3:59b4) jp LoadWalkingPlayerSpriteGraphics ; uses a simulated button press to make the player move forward .makePlayerMoveForward - ld a,[wd52a] ; direction the player is going - bit 3,a + ld a,[wPlayerDirection] ; direction the player is going + bit PLAYER_DIR_BIT_UP,a ld b,D_UP jr nz,.storeSimulatedButtonPress - bit 2,a + bit PLAYER_DIR_BIT_DOWN,a ld b,D_DOWN jr nz,.storeSimulatedButtonPress - bit 1,a + bit PLAYER_DIR_BIT_LEFT,a ld b,D_LEFT jr nz,.storeSimulatedButtonPress ld b,D_RIGHT @@ -613,28 +744,28 @@ ItemUseSurfboard: ; d9b4 (3:59b4) ld [wSimulatedJoypadStatesIndex],a ret -SurfingGotOnText: ; da4c (3:5a4c) +SurfingGotOnText: TX_FAR _SurfingGotOnText db "@" -SurfingNoPlaceToGetOffText: ; da51 (3:5a51) +SurfingNoPlaceToGetOffText: TX_FAR _SurfingNoPlaceToGetOffText db "@" -ItemUsePokedex: ; da56 (3:5a56) +ItemUsePokedex: predef_jump ShowPokedexMenu -ItemUseEvoStone: ; da5b (3:5a5b) - ld a,[W_ISINBATTLE] +ItemUseEvoStone: + ld a,[wIsInBattle] and a jp nz,ItemUseNotTime ld a,[wWhichPokemon] push af ld a,[wcf91] - ld [wd156],a + ld [wEvoStoneItemID],a push af - ld a,$05 ; evolution stone party menu - ld [wd07d],a + ld a,EVO_STONE_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a ld a,$ff ld [wUpdateSpritesEnabled],a call DisplayPartyMenu @@ -643,34 +774,34 @@ ItemUseEvoStone: ; da5b (3:5a5b) ld a,b ld [wcf91],a 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 + ld [wForceEvolution],a + ld a,SFX_HEAL_AILMENT + call PlaySoundWaitForCurrent + call WaitForSoundToFinish callab TryEvolvingMon ; try to evolve pokemon - ld a,[wd121] + ld a,[wEvolutionOccurred] and a jr z,.noEffect pop af ld [wWhichPokemon],a ld hl,wNumBagItems ld a,1 ; remove 1 stone - ld [wcf96],a + ld [wItemQuantity],a jp RemoveItemFromInventory .noEffect call ItemUseNoEffect .canceledItemUse xor a - ld [wcd6a],a + ld [wActionResultOrTookBattleTurn],a ; item not used pop af ret -ItemUseVitamin: ; dab4 (3:5ab4) - ld a,[W_ISINBATTLE] +ItemUseVitamin: + ld a,[wIsInBattle] and a jp nz,ItemUseNotTime -ItemUseMedicine: ; dabb (3:5abb) +ItemUseMedicine: ld a,[wPartyCount] and a jp z,.emptyParty @@ -678,11 +809,11 @@ ItemUseMedicine: ; dabb (3:5abb) push af ld a,[wcf91] push af - ld a,$01 - ld [wd07d],a ; item use party menu + ld a,USE_ITEM_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a ld a,$ff ld [wUpdateSpritesEnabled],a - ld a,[wd152] + ld a,[wPseudoItemID] and a ; using Softboiled? jr z,.notUsingSoftboiled ; if using softboiled @@ -691,7 +822,7 @@ ItemUseMedicine: ; dabb (3:5abb) .emptyParty ld hl,.emptyPartyText xor a - ld [wcd6a],a ; item use failed + ld [wActionResultOrTookBattleTurn],a ; item use failed jp PrintText .emptyPartyText text "You don't have" @@ -706,7 +837,7 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,[wWhichPokemon] call AddNTimes ld a,[wWhichPokemon] - ld [wcf06],a + ld [wUsedItemOnWhichPokemon],a ld d,a ld a,[wcf91] ld e,a @@ -715,7 +846,7 @@ ItemUseMedicine: ; dabb (3:5abb) ld [wcf91],a pop af ld [wWhichPokemon],a - ld a,[wd152] + ld a,[wPseudoItemID] and a ; using Softboiled? jr z,.checkItemType ; if using softboiled @@ -734,25 +865,25 @@ ItemUseMedicine: ; dabb (3:5abb) jr nc,.healHP ; if it's a Full Restore or one of the potions ; fall through if it's one of the status-specifc healing items .cureStatusAilment - ld bc,4 + ld bc,wPartyMon1Status - wPartyMon1 add hl,bc ; hl now points to status ld a,[wcf91] - ld bc,$f008 + lb bc, ANTIDOTE_MSG, 1 << PSN cp a,ANTIDOTE jr z,.checkMonStatus - ld bc,$f110 + lb bc, BURN_HEAL_MSG, 1 << BRN cp a,BURN_HEAL jr z,.checkMonStatus - ld bc,$f220 + lb bc, ICE_HEAL_MSG, 1 << FRZ cp a,ICE_HEAL jr z,.checkMonStatus - ld bc,$f307 + lb bc, AWAKENING_MSG, SLP cp a,AWAKENING jr z,.checkMonStatus - ld bc,$f440 + lb bc, PARALYZ_HEAL_MSG, 1 << PAR cp a,PARLYZ_HEAL jr z,.checkMonStatus - ld bc,$f6ff ; Full Heal + lb bc, FULL_HEAL_MSG, $ff ; Full Heal .checkMonStatus ld a,[hl] ; pokemon's status and c ; does the pokemon have a status ailment the item can cure? @@ -761,7 +892,7 @@ ItemUseMedicine: ; dabb (3:5abb) xor a ld [hl],a ; remove the status ailment in the party data ld a,b - ld [wd07d],a ; the message to display for the item used + ld [wPartyMenuTypeOrMessageID],a ; the message to display for the item used ld a,[wPlayerMonNumber] cp d ; is pokemon the item was used on active in battle? jp nz,.doneHealing @@ -769,13 +900,13 @@ ItemUseMedicine: ; dabb (3:5abb) xor a ld [wBattleMonStatus],a ; remove the status ailment in the in-battle pokemon data push hl - ld hl,W_PLAYERBATTSTATUS3 + ld hl,wPlayerBattleStatus3 res BadlyPoisoned,[hl] ; heal Toxic status pop hl - ld bc,30 + ld bc,wPartyMon1Stats - wPartyMon1Status add hl,bc ; hl now points to party stats - ld de,wBattleMonMaxHP - ld bc,10 + ld de,wBattleMonStats + ld bc,NUM_STATS * 2 call CopyData ; copy party stats to in-battle stat data predef DoubleOrHalveSelectedStats jp .doneHealing @@ -797,24 +928,24 @@ ItemUseMedicine: ; dabb (3:5abb) jr z,.updateInBattleFaintedData jp .healingItemNoEffect .updateInBattleFaintedData - ld a,[W_ISINBATTLE] + ld a,[wIsInBattle] and a jr z,.compareCurrentHPToMaxHP push hl push de push bc - ld a,[wcf06] + ld a,[wUsedItemOnWhichPokemon] ld c,a ld hl,wPartyFoughtCurrentEnemyFlags - ld b,$02 + ld b,FLAG_TEST predef FlagActionPredef ld a,c and a jr z,.next - ld a,[wcf06] + ld a,[wUsedItemOnWhichPokemon] ld c,a ld hl,wPartyGainExpFlags - ld b,$01 + ld b,FLAG_SET predef FlagActionPredef .next pop bc @@ -830,7 +961,7 @@ ItemUseMedicine: ; dabb (3:5abb) .compareCurrentHPToMaxHP push hl push bc - ld bc,32 + ld bc,wPartyMon1MaxHP - (wPartyMon1HP + 1) add hl,bc ; hl now points to max HP pop bc ld a,[hli] @@ -859,16 +990,16 @@ ItemUseMedicine: ; dabb (3:5abb) .notFullHP ; if the pokemon's current HP doesn't equal its max HP xor a ld [wLowHealthAlarm],a ;disable low health alarm - ld [wc02a],a + ld [wChannelSoundIDs + Ch4],a push hl push de - ld bc,32 + ld bc,wPartyMon1MaxHP - (wPartyMon1HP + 1) add hl,bc ; hl now points to max HP ld a,[hli] ld [wHPBarMaxHP+1],a ld a,[hl] ld [wHPBarMaxHP],a ; max HP stored at wHPBarMaxHP (2 bytes, big-endian) - ld a,[wd152] + ld a,[wPseudoItemID] and a ; using Softboiled? jp z,.notUsingSoftboiled2 ; if using softboiled @@ -895,7 +1026,7 @@ ItemUseMedicine: ; dabb (3:5abb) ld [H_DIVISOR],a ld b,2 ; number of bytes call Divide ; get 1/5 of max HP of pokemon that used Softboiled - ld bc,wPartyMon1HP - wPartyMon1MaxHP + ld bc,(wPartyMon1HP + 1) - (wPartyMon1MaxHP + 1) add hl,bc ; hl now points to LSB of current HP of pokemon that used Softboiled ; subtract 1/5 of max HP from current HP of pokemon that used Softboiled ld a,[H_QUOTIENT + 3] @@ -913,12 +1044,12 @@ ItemUseMedicine: ; dabb (3:5abb) sbc b ld [hl],a ld [wHPBarNewHP+1],a - hlCoord 4, 1 + coord hl, 4, 1 ld a,[wWhichPokemon] - ld bc,2 * 20 + ld bc,2 * SCREEN_WIDTH 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 + ld a,SFX_HEAL_HP + call PlaySoundWaitForCurrent ld a,[hFlags_0xFFF6] set 0,a ld [hFlags_0xFFF6],a @@ -974,7 +1105,7 @@ ItemUseMedicine: ; dabb (3:5abb) inc hl ld d,h ld e,l ; de now points to current HP - ld hl,33 + ld hl,(wPartyMon1MaxHP + 1) - (wPartyMon1HP + 1) add hl,de ; hl now points to max HP ld a,[wcf91] cp a,REVIVE @@ -1021,7 +1152,7 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,[wcf91] cp a,FULL_RESTORE jr nz,.updateInBattleData - ld bc,-31 + ld bc,wPartyMon1Status - (wPartyMon1MaxHP + 1) add hl,bc xor a ld [hl],a ; remove the status ailment in the party data @@ -1044,7 +1175,7 @@ ItemUseMedicine: ; dabb (3:5abb) ld [wBattleMonStatus],a ; remove the status ailment in the in-battle pokemon data .calculateHPBarCoords ld hl,wOAMBuffer + $90 - ld bc,2 * 20 + ld bc,2 * SCREEN_WIDTH inc d .calculateHPBarCoordsLoop add hl,bc @@ -1055,7 +1186,7 @@ ItemUseMedicine: ; dabb (3:5abb) call ItemUseNoEffect jp .done .doneHealing - ld a,[wd152] + ld a,[wPseudoItemID] and a ; using Softboiled? jr nz,.skipRemovingItem ; no item to remove if using Softboiled push hl @@ -1067,8 +1198,8 @@ ItemUseMedicine: ; dabb (3:5abb) jr c,.playStatusAilmentCuringSound cp a,FULL_HEAL jr z,.playStatusAilmentCuringSound - ld a,(SFX_02_3d - SFX_Headers_02) / 3 ; HP healing sound - call PlaySoundWaitForCurrent ; play sound + ld a,SFX_HEAL_HP + call PlaySoundWaitForCurrent ld a,[hFlags_0xFFF6] set 0,a ld [hFlags_0xFFF6],a @@ -1078,18 +1209,18 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,[hFlags_0xFFF6] res 0,a ld [hFlags_0xFFF6],a - ld a,$f7 ; revived message - ld [wd07d],a + ld a,REVIVE_MSG + ld [wPartyMenuTypeOrMessageID],a ld a,[wcf91] cp a,REVIVE jr z,.showHealingItemMessage cp a,MAX_REVIVE jr z,.showHealingItemMessage - ld a,$f5 ; standard HP healed message - ld [wd07d],a + ld a,POTION_MSG + ld [wPartyMenuTypeOrMessageID],a jr .showHealingItemMessage .playStatusAilmentCuringSound - ld a,(SFX_02_3e - SFX_Headers_02) / 3 ; status ailment curing sound + ld a,SFX_HEAL_AILMENT call PlaySoundWaitForCurrent .showHealingItemMessage xor a @@ -1106,16 +1237,16 @@ ItemUseMedicine: ; dabb (3:5abb) jr .done .canceledItemUse xor a - ld [wcd6a],a ; item use failed + ld [wActionResultOrTookBattleTurn],a ; item use failed pop af pop af .done - ld a,[wd152] + ld a,[wPseudoItemID] and a ; using Softboiled? ret nz ; if so, return call GBPalWhiteOut - call z,GoPAL_SET_CF1C - ld a,[W_ISINBATTLE] + call z,RunDefaultPaletteCommand + ld a,[wIsInBattle] and a ret nz jp ReloadMapData @@ -1124,10 +1255,10 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,[hl] ld [wd0b5],a ld [wd11e],a - ld bc,33 + ld bc,wPartyMon1Level - wPartyMon1 add hl,bc ; hl now points to level ld a,[hl] ; a = level - ld [W_CURENEMYLVL],a ; store level + ld [wCurEnemyLVL],a ; store level call GetMonHeader push de ld a,d @@ -1141,7 +1272,7 @@ ItemUseMedicine: ; dabb (3:5abb) push hl sub a,HP_UP add a - ld bc,17 + ld bc,wPartyMon1HPExp - wPartyMon1 add hl,bc add l ld l,a @@ -1178,8 +1309,8 @@ ItemUseMedicine: ; dabb (3:5abb) ld de,wcf4b 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 + ld a,SFX_HEAL_AILMENT + call PlaySound ld hl,VitaminStatRoseText call PrintText jp RemoveUsedItem @@ -1189,38 +1320,38 @@ ItemUseMedicine: ; dabb (3:5abb) call PrintText jp GBPalWhiteOut .recalculateStats - ld bc,34 + ld bc,wPartyMon1Stats - wPartyMon1 add hl,bc ld d,h ld e,l ; de now points to stats - ld bc,-18 - add hl,bc ; hl now points to byte 3 of experience + ld bc,(wPartyMon1Exp + 2) - wPartyMon1Stats + add hl,bc ; hl now points to LSB of experience ld b,1 jp CalcStats ; recalculate stats .useRareCandy push hl - ld bc,33 + ld bc,wPartyMon1Level - wPartyMon1 add hl,bc ; hl now points to level ld a,[hl] ; a = level cp a, MAX_LEVEL jr z,.vitaminNoEffect ; can't raise level above 100 inc a ld [hl],a ; store incremented level - ld [W_CURENEMYLVL],a + ld [wCurEnemyLVL],a push hl push de ld d,a callab CalcExperience ; calculate experience for next level and store it at $ff96 pop de pop hl - ld bc,-19 - add hl,bc ; hl now points to experience + ld bc,wPartyMon1Exp - wPartyMon1Level + add hl,bc ; hl now points to MSB of experience ; update experience to minimum for new level - ld a,[$ff96] + ld a,[hExperience] ld [hli],a - ld a,[$ff97] + ld a,[hExperience + 1] ld [hli],a - ld a,[$ff98] + ld a,[hExperience + 2] ld [hl],a pop hl ld a,[wWhichPokemon] @@ -1229,7 +1360,7 @@ ItemUseMedicine: ; dabb (3:5abb) push af push de push hl - ld bc,34 + ld bc,wPartyMon1MaxHP - wPartyMon1 add hl,bc ; hl now points to MSB of max HP ld a,[hli] ld b,a @@ -1239,8 +1370,8 @@ ItemUseMedicine: ; dabb (3:5abb) push hl call .recalculateStats pop hl - ld bc,35 ; hl now points to LSB of max HP - add hl,bc + ld bc,(wPartyMon1MaxHP + 1) - wPartyMon1 + add hl,bc ; hl now points to LSB of max HP pop bc ld a,[hld] sub c @@ -1249,33 +1380,33 @@ ItemUseMedicine: ; dabb (3:5abb) sbc b ld b,a ; bc = the amount of max HP gained from leveling up ; add the amount gained to the current HP - ld de,-32 - add hl,de ; hl now points to MSB of current HP + ld de,(wPartyMon1HP + 1) - wPartyMon1MaxHP + add hl,de ; hl now points to LSB of current HP ld a,[hl] add c ld [hld],a ld a,[hl] adc b ld [hl],a - ld a,$f8 ; level up message - ld [wd07d],a + ld a,RARE_CANDY_MSG + ld [wPartyMenuTypeOrMessageID],a call RedrawPartyMenu pop de ld a,d ld [wWhichPokemon],a ld a,e ld [wd11e],a - xor a - ld [wcc49],a ; load from player's party + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation],a call LoadMonData ld d,$01 callab PrintStatsBox ; display new stats text box call WaitForTextScrollButtonPress ; wait for button press - xor a - ld [wcc49],a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation],a predef LearnMoveFromLevelUp ; learn level up move, if any xor a - ld [wccd4],a + ld [wForceEvolution],a callab TryEvolvingMon ; evolve pokemon, if appropriate ld a,$01 ld [wUpdateSpritesEnabled],a @@ -1285,22 +1416,22 @@ ItemUseMedicine: ; dabb (3:5abb) ld [wWhichPokemon],a jp RemoveUsedItem -VitaminStatRoseText: ; df24 (3:5f24) +VitaminStatRoseText: TX_FAR _VitaminStatRoseText db "@" -VitaminNoEffectText: ; df29 (3:5f29) +VitaminNoEffectText: TX_FAR _VitaminNoEffectText db "@" -VitaminText: ; df2e (3:5f2e) +VitaminText: db "HEALTH@" db "ATTACK@" db "DEFENSE@" db "SPEED@" db "SPECIAL@" -ItemUseBait: ; df52 (3:5f52) +ItemUseBait: ld hl,ThrewBaitText call PrintText ld hl,wEnemyMonCatchRate ; catch rate @@ -1310,7 +1441,7 @@ ItemUseBait: ; df52 (3:5f52) ld de,wSafariEscapeFactor ; escape factor jr BaitRockCommon -ItemUseRock: ; df67 (3:5f67) +ItemUseRock: ld hl,ThrewRockText call PrintText ld hl,wEnemyMonCatchRate ; catch rate @@ -1324,10 +1455,10 @@ ItemUseRock: ; df67 (3:5f67) ld hl,wSafariEscapeFactor ; escape factor ld de,wSafariBaitFactor ; bait factor -BaitRockCommon: ; df7f (3:5f7f) - ld [W_ANIMATIONID],a +BaitRockCommon: + ld [wAnimationID],a xor a - ld [wcc5b],a + ld [wAnimationType],a ld [H_WHOSETURN],a ld [de],a ; zero escape factor (for bait), zero bait factor (for rock) .randomLoop ; loop until a random number less than 5 is generated @@ -1347,23 +1478,23 @@ BaitRockCommon: ; df7f (3:5f7f) ld c,70 jp DelayFrames -ThrewBaitText: ; dfa5 (3:5fa5) +ThrewBaitText: TX_FAR _ThrewBaitText db "@" -ThrewRockText: ; dfaa (3:5faa) +ThrewRockText: TX_FAR _ThrewRockText db "@" ; also used for Dig out-of-battle effect -ItemUseEscapeRope: ; dfaf (3:5faf) - ld a,[W_ISINBATTLE] +ItemUseEscapeRope: + ld a,[wIsInBattle] and a jr nz,.notUsable - ld a,[W_CURMAP] + ld a,[wCurMap] cp a,AGATHAS_ROOM jr z,.notUsable - ld a,[W_CURMAPTILESET] + ld a,[wCurMapTileset] ld b,a ld hl,EscapeRopeTilesets .loop @@ -1377,15 +1508,14 @@ ItemUseEscapeRope: ; dfaf (3:5faf) set 6,[hl] ld hl,wd72e res 4,[hl] - ld hl,wd790 - res 7,[hl] ; unset Safari Zone bit + ResetEvent EVENT_IN_SAFARI_ZONE xor a - ld [W_NUMSAFARIBALLS],a - ld [W_SAFARIZONEENTRANCECURSCRIPT],a + ld [wNumSafariBalls],a + ld [wSafariZoneEntranceCurScript],a inc a ld [wEscapedFromBattle],a - ld [wcd6a],a ; item used - ld a,[wd152] + ld [wActionResultOrTookBattleTurn],a ; item used + ld a,[wPseudoItemID] and a ; using Dig? ret nz ; if so, return call ItemUseReloadOverworldData @@ -1395,15 +1525,15 @@ ItemUseEscapeRope: ; dfaf (3:5faf) .notUsable jp ItemUseNotTime -EscapeRopeTilesets: ; dffd (3:5ffd) +EscapeRopeTilesets: db FOREST, CEMETERY, CAVERN, FACILITY, INTERIOR db $ff ; terminator -ItemUseRepel: ; e003 (3:6003) +ItemUseRepel: ld b,100 -ItemUseRepelCommon: ; e005 (3:6005) - ld a,[W_ISINBATTLE] +ItemUseRepelCommon: + ld a,[wIsInBattle] and a jp nz,ItemUseNotTime ld a,b @@ -1411,21 +1541,21 @@ ItemUseRepelCommon: ; e005 (3:6005) jp PrintItemUseTextAndRemoveItem ; handles X Accuracy item -ItemUseXAccuracy: ; e013 (3:6013) - ld a,[W_ISINBATTLE] +ItemUseXAccuracy: + ld a,[wIsInBattle] and a jp z,ItemUseNotTime - ld hl,W_PLAYERBATTSTATUS2 + ld hl,wPlayerBattleStatus2 set UsingXAccuracy,[hl] ; X Accuracy bit jp PrintItemUseTextAndRemoveItem ; This function is bugged and never works. It always jumps to ItemUseNotTime. ; The Card Key is handled in a different way. -ItemUseCardKey: ; e022 (3:6022) +ItemUseCardKey: xor a - ld [wd71f],a + ld [wUnusedD71F],a call GetTileAndCoordsInFrontOfPlayer - ld a,[GetTileAndCoordsInFrontOfPlayer] ; $4586 + ld a,[GetTileAndCoordsInFrontOfPlayer] cp a,$18 jr nz,.next0 ld hl,CardKeyTable1 @@ -1440,7 +1570,7 @@ ItemUseCardKey: ; e022 (3:6022) jp nz,ItemUseNotTime ld hl,CardKeyTable3 .next1 - ld a,[W_CURMAP] + ld a,[wCurMap] ld b,a .loop ld a,[hli] @@ -1455,7 +1585,7 @@ ItemUseCardKey: ; e022 (3:6022) cp e jr nz,.nextEntry3 ld a,[hl] - ld [wd71f],a + ld [wUnusedD71F],a jr .done .nextEntry1 inc hl @@ -1481,7 +1611,7 @@ ItemUseCardKey: ; e022 (3:6022) ; 02: X ; 03: ID? -CardKeyTable1: ; e072 (3:6072) +CardKeyTable1: db SILPH_CO_2F,$04,$04,$00 db SILPH_CO_2F,$04,$05,$01 db SILPH_CO_4F,$0C,$04,$02 @@ -1494,7 +1624,7 @@ CardKeyTable1: ; e072 (3:6072) db SILPH_CO_10F,$08,$0B,$09 db $ff -CardKeyTable2: ; e09b (3:609b) +CardKeyTable2: db SILPH_CO_3F,$08,$09,$0A db SILPH_CO_3F,$09,$09,$0B db SILPH_CO_5F,$04,$07,$0C @@ -1507,64 +1637,64 @@ CardKeyTable2: ; e09b (3:609b) db SILPH_CO_9F,$09,$03,$13 db $ff -CardKeyTable3: ; e0c4 (3:60c4) +CardKeyTable3: db SILPH_CO_11F,$08,$09,$14 db SILPH_CO_11F,$09,$09,$15 db $ff -ItemUsePokedoll: ; e0cd (3:60cd) - ld a,[W_ISINBATTLE] +ItemUsePokedoll: + ld a,[wIsInBattle] dec a jp nz,ItemUseNotTime ld a,$01 ld [wEscapedFromBattle],a jp PrintItemUseTextAndRemoveItem -ItemUseGuardSpec: ; e0dc (3:60dc) - ld a,[W_ISINBATTLE] +ItemUseGuardSpec: + ld a,[wIsInBattle] and a jp z,ItemUseNotTime - ld hl,W_PLAYERBATTSTATUS2 + ld hl,wPlayerBattleStatus2 set ProtectedByMist,[hl] ; Mist bit jp PrintItemUseTextAndRemoveItem -ItemUseSuperRepel: ; e0eb (3:60eb) +ItemUseSuperRepel: ld b,200 jp ItemUseRepelCommon -ItemUseMaxRepel: ; e0f0 (3:60f0) +ItemUseMaxRepel: ld b,250 jp ItemUseRepelCommon -ItemUseDireHit: ; e0f5 (3:60f5) - ld a,[W_ISINBATTLE] +ItemUseDireHit: + ld a,[wIsInBattle] and a jp z,ItemUseNotTime - ld hl,W_PLAYERBATTSTATUS2 + ld hl,wPlayerBattleStatus2 set GettingPumped,[hl] ; Focus Energy bit jp PrintItemUseTextAndRemoveItem -ItemUseXStat: ; e104 (3:6104) - ld a,[W_ISINBATTLE] +ItemUseXStat: + ld a,[wIsInBattle] and a jr nz,.inBattle call ItemUseNotTime ld a,2 - ld [wcd6a],a ; item not used + ld [wActionResultOrTookBattleTurn],a ; item not used ret .inBattle - ld hl,W_PLAYERMOVENUM + ld hl,wPlayerMoveNum ld a,[hli] - push af ; save [W_PLAYERMOVENUM] + push af ; save [wPlayerMoveNum] ld a,[hl] - push af ; save [W_PLAYERMOVEEFFECT] + push af ; save [wPlayerMoveEffect] push hl ld a,[wcf91] sub a,X_ATTACK - ATTACK_UP1_EFFECT ld [hl],a ; store player move effect call PrintItemUseTextAndRemoveItem ld a,XSTATITEM_ANIM ; X stat item animation ID - ld [W_PLAYERMOVENUM],a + ld [wPlayerMoveNum],a call LoadScreenTilesFromBuffer1 ; restore saved screen call Delay3 xor a @@ -1572,22 +1702,21 @@ ItemUseXStat: ; e104 (3:6104) callba StatModifierUpEffect ; do stat increase move pop hl pop af - ld [hld],a ; restore [W_PLAYERMOVEEFFECT] + ld [hld],a ; restore [wPlayerMoveEffect] pop af - ld [hl],a ; restore [W_PLAYERMOVENUM] + ld [hl],a ; restore [wPlayerMoveNum] ret -ItemUsePokeflute: ; e140 (3:6140) - ld a,[W_ISINBATTLE] +ItemUsePokeflute: + ld a,[wIsInBattle] and a jr nz,.inBattle ; if not in battle call ItemUseReloadOverworldData - ld a,[W_CURMAP] + ld a,[wCurMap] cp a,ROUTE_12 jr nz,.notRoute12 - ld a,[wd7d8] - bit 7,a ; has the player beaten Route 12 Snorlax yet? + CheckEvent EVENT_BEAT_ROUTE12_SNORLAX jr nz,.noSnorlaxToWakeUp ; if the player hasn't beaten Route 12 Snorlax ld hl,Route12SnorlaxFluteCoords @@ -1595,14 +1724,12 @@ ItemUsePokeflute: ; e140 (3:6140) jr nc,.noSnorlaxToWakeUp ld hl,PlayedFluteHadEffectText call PrintText - ld hl,wd7d8 - set 6,[hl] ; trigger Snorlax fight (handled by map script) + SetEvent EVENT_FIGHT_ROUTE12_SNORLAX ret .notRoute12 cp a,ROUTE_16 jr nz,.noSnorlaxToWakeUp - ld a,[wd7e0] - bit 1,a ; has the player beaten Route 16 Snorlax yet? + CheckEvent EVENT_BEAT_ROUTE16_SNORLAX jr nz,.noSnorlaxToWakeUp ; if the player hasn't beaten Route 16 Snorlax ld hl,Route16SnorlaxFluteCoords @@ -1610,19 +1737,18 @@ ItemUsePokeflute: ; e140 (3:6140) jr nc,.noSnorlaxToWakeUp ld hl,PlayedFluteHadEffectText call PrintText - ld hl,wd7e0 - set 0,[hl] ; trigger Snorlax fight (handled by map script) + SetEvent EVENT_FIGHT_ROUTE16_SNORLAX ret .noSnorlaxToWakeUp ld hl,PlayedFluteNoEffectText jp PrintText .inBattle xor a - ld [wWhichTrade],a ; initialize variable that indicates if any pokemon were woken up to zero - ld b,~SLP & $FF + ld [wWereAnyMonsAsleep],a + ld b,~SLP & $ff ld hl,wPartyMon1Status call WakeUpEntireParty - ld a,[W_ISINBATTLE] + ld a,[wIsInBattle] dec a ; is it a trainer battle? jr z,.skipWakingUpEnemyParty ; if it's a trainer battle @@ -1638,7 +1764,7 @@ ItemUsePokeflute: ; e140 (3:6140) and b ; remove Sleep status ld [hl],a call LoadScreenTilesFromBuffer2 ; restore saved screen - ld a,[wWhichTrade] + ld a,[wWereAnyMonsAsleep] and a ; were any pokemon asleep before playing the flute? ld hl,PlayedFluteNoEffectText jp z,PrintText ; if no pokemon were asleep @@ -1651,7 +1777,7 @@ ItemUsePokeflute: ; e140 (3:6140) call WaitForSoundToFinish ; wait for sound to end callba Music_PokeFluteInBattle ; play in-battle pokeflute music .musicWaitLoop ; wait for music to finish playing - ld a,[wc02c] + ld a,[wChannelSoundIDs + Ch6] and a ; music off? jr nz,.musicWaitLoop .skipMusic @@ -1662,10 +1788,10 @@ ItemUsePokeflute: ; e140 (3:6140) ; INPUT: ; hl must point to status of first pokemon in party (player's or enemy's) ; b must equal ~SLP -; [wWhichTrade] should be initialized to 0 +; [wWereAnyMonsAsleep] should be initialized to 0 ; OUTPUT: -; [wWhichTrade]: set to 1 if any pokemon were asleep -WakeUpEntireParty: ; e1e5 (3:61e5) +; [wWereAnyMonsAsleep]: set to 1 if any pokemon were asleep +WakeUpEntireParty: ld de,44 ld c,6 .loop @@ -1674,7 +1800,7 @@ WakeUpEntireParty: ; e1e5 (3:61e5) and a,SLP ; is pokemon asleep? jr z,.notAsleep ld a,1 - ld [wWhichTrade],a ; indicate that a pokemon had to be woken up + ld [wWereAnyMonsAsleep],a ; indicate that a pokemon had to be woken up .notAsleep pop af and b ; remove Sleep status @@ -1687,7 +1813,7 @@ WakeUpEntireParty: ; e1e5 (3:61e5) ; Format: ; 00: Y ; 01: X -Route12SnorlaxFluteCoords: ; e1fd (3:61fd) +Route12SnorlaxFluteCoords: db 62,9 ; one space West of Snorlax db 61,10 ; one space North of Snorlax db 63,10 ; one space South of Snorlax @@ -1697,59 +1823,59 @@ Route12SnorlaxFluteCoords: ; e1fd (3:61fd) ; Format: ; 00: Y ; 01: X -Route16SnorlaxFluteCoords: ; e206 (3:6206) +Route16SnorlaxFluteCoords: db 10,27 ; one space East of Snorlax db 10,25 ; one space West of Snorlax db $ff ; terminator -PlayedFluteNoEffectText: ; e20b (3:620b) +PlayedFluteNoEffectText: TX_FAR _PlayedFluteNoEffectText db "@" -FluteWokeUpText: ; e210 (3:6210) +FluteWokeUpText: TX_FAR _FluteWokeUpText db "@" -PlayedFluteHadEffectText: ; e215 (3:6215) +PlayedFluteHadEffectText: TX_FAR _PlayedFluteHadEffectText - db $06 - db $08 - ld a,[W_ISINBATTLE] + TX_BLINK + TX_ASM + ld a,[wIsInBattle] and a jr nz,.done ; play out-of-battle pokeflute music ld a,$ff call PlaySound ; turn off music - ld a, (SFX_02_5e - SFX_Headers_02) / 3 - ld c, BANK(SFX_02_5e) - call PlayMusic ; play music + ld a, SFX_POKEFLUE + ld c, BANK(SFX_Pokeflute) + call PlayMusic .musicWaitLoop ; wait for music to finish playing - ld a,[wc028] - cp a,$b8 + ld a,[wChannelSoundIDs + Ch2] + cp a, SFX_POKEFLUE jr z,.musicWaitLoop call PlayDefaultMusic ; start playing normal music again .done jp TextScriptEnd ; end text -ItemUseCoinCase: ; e23a (3:623a) - ld a,[W_ISINBATTLE] +ItemUseCoinCase: + ld a,[wIsInBattle] and a jp nz,ItemUseNotTime ld hl,CoinCaseNumCoinsText jp PrintText -CoinCaseNumCoinsText: ; e247 (3:6247) +CoinCaseNumCoinsText: TX_FAR _CoinCaseNumCoinsText db "@" -OldRodCode: ; e24c (3:624c) +ItemUseOldRod: call FishingInit jp c, ItemUseNotTime - ld bc, (5 << 8) | MAGIKARP + lb bc, 5, MAGIKARP ld a, $1 ; set bite - jr RodResponse ; 0xe257 $34 + jr RodResponse -GoodRodCode: ; e259 (3:6259) +ItemUseGoodRod: call FishingInit jp c,ItemUseNotTime .RandomLoop @@ -1777,23 +1903,23 @@ GoodRodCode: ; e259 (3:6259) INCLUDE "data/good_rod.asm" -SuperRodCode: ; e283 (3:6283) +ItemUseSuperRod: call FishingInit jp c, ItemUseNotTime - call ReadSuperRodData ; 0xe8ea + call ReadSuperRodData ld a, e -RodResponse: ; e28d (3:628d) - ld [wWhichTrade], a +RodResponse: + ld [wRodResponse], a dec a ; is there a bite? jr nz, .next ; if yes, store level and species data ld a, 1 - ld [W_MOVEMISSED], a + ld [wMoveMissed], a ld a, b ; level - ld [W_CURENEMYLVL], a + ld [wCurEnemyLVL], a ld a, c ; species - ld [W_CUROPPONENT], a + ld [wCurOpponent], a .next ld hl, wWalkBikeSurfState @@ -1801,7 +1927,7 @@ RodResponse: ; e28d (3:628d) push af push hl ld [hl], 0 - callba Func_707b6 + callba FishingAnim pop hl pop af ld [hl], a @@ -1809,8 +1935,8 @@ RodResponse: ; e28d (3:628d) ; checks if fishing is possible and if so, runs initialization code common to all rods ; unsets carry if fishing is possible, sets carry if not -FishingInit: ; e2b4 (3:62b4) - ld a,[W_ISINBATTLE] +FishingInit: + ld a,[wIsInBattle] and a jr z,.notInBattle scf ; can't fish during battle @@ -1824,8 +1950,8 @@ FishingInit: ; e2b4 (3:62b4) call ItemUseReloadOverworldData ld hl,ItemUseText00 call PrintText - ld a,(SFX_02_3e - SFX_Headers_02) / 3 - call PlaySound ; play sound + ld a,SFX_HEAL_AILMENT + call PlaySound ld c,80 call DelayFrames and a @@ -1834,11 +1960,11 @@ FishingInit: ; e2b4 (3:62b4) scf ; can't fish when surfing ret -ItemUseOaksParcel: ; e2de (3:62de) +ItemUseOaksParcel: jp ItemUseNotYoursToUse -ItemUseItemfinder: ; e2e1 (3:62e1) - ld a,[W_ISINBATTLE] +ItemUseItemfinder: + ld a,[wIsInBattle] and a jp nz,ItemUseNotTime call ItemUseReloadOverworldData @@ -1847,50 +1973,50 @@ ItemUseItemfinder: ; e2e1 (3:62e1) jr nc,.printText ; if no hidden items ld c,4 .loop - ld a,(SFX_02_4a - SFX_Headers_02) / 3 - call PlaySoundWaitForCurrent ; play sound - ld a,(SFX_02_5a - SFX_Headers_02) / 3 - call PlaySoundWaitForCurrent ; play sound + ld a,SFX_HEALING_MACHINE + call PlaySoundWaitForCurrent + ld a,SFX_PURCHASE + call PlaySoundWaitForCurrent dec c jr nz,.loop ld hl,ItemfinderFoundItemText .printText jp PrintText -ItemfinderFoundItemText: ; e30d (3:630d) +ItemfinderFoundItemText: TX_FAR _ItemfinderFoundItemText db "@" -ItemfinderFoundNothingText: ; e312 (3:6312) +ItemfinderFoundNothingText: TX_FAR _ItemfinderFoundNothingText db "@" -ItemUsePPUp: ; e317 (3:6317) - ld a,[W_ISINBATTLE] +ItemUsePPUp: + ld a,[wIsInBattle] and a jp nz,ItemUseNotTime -ItemUsePPRestore: ; e31e (3:631e) +ItemUsePPRestore: ld a,[wWhichPokemon] push af ld a,[wcf91] - ld [wWhichTrade],a + ld [wPPRestoreItem],a .chooseMon xor a ld [wUpdateSpritesEnabled],a - ld a,$01 ; item use party menu - ld [wd07d],a + ld a,USE_ITEM_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a call DisplayPartyMenu jr nc,.chooseMove jp .itemNotUsed .chooseMove - ld a,[wWhichTrade] + ld a,[wPPRestoreItem] cp a,ELIXER jp nc,.useElixir ; if Elixir or Max Elixir ld a,$02 ld [wMoveMenuType],a ld hl,RaisePPWhichTechniqueText - ld a,[wWhichTrade] + ld a,[wPPRestoreItem] cp a,ETHER ; is it a PP Up? jr c,.printWhichTechniqueMessage ; if so, print the raise PP message ld hl,RestorePPWhichTechniqueText ; otherwise, print the restore PP message @@ -1903,7 +2029,7 @@ ItemUsePPRestore: ; e31e (3:631e) ld [wPlayerMoveListIndex],a jr nz,.chooseMon ld hl,wPartyMon1Moves - ld bc,44 + ld bc, wPartyMon2 - wPartyMon1 call GetSelectedMoveOffset push hl ld a,[hl] @@ -1911,11 +2037,11 @@ ItemUsePPRestore: ; e31e (3:631e) call GetMoveName call CopyStringToCF4B ; copy name to wcf4b pop hl - ld a,[wWhichTrade] + ld a,[wPPRestoreItem] cp a,ETHER jr nc,.useEther ; if Ether or Max Ether .usePPUp - ld bc,21 + ld bc,wPartyMon1PP - wPartyMon1Moves add hl,bc ld a,[hl] ; move PP cp a,3 << 6 ; have 3 PP Ups already been used? @@ -1936,7 +2062,7 @@ ItemUsePPRestore: ; e31e (3:631e) pop af ld [wWhichPokemon],a call GBPalWhiteOut - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand jp RemoveUsedItem .afterRestoringPP ; after using a (Max) Ether/Elixir ld a,[wWhichPokemon] @@ -1945,13 +2071,13 @@ ItemUsePPRestore: ; e31e (3:631e) cp b ; is the pokemon whose PP was restored active in battle? jr nz,.skipUpdatingInBattleData ld hl,wPartyMon1PP - ld bc,44 + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld de,wBattleMonPP ld bc,4 call CopyData ; copy party data to in-battle data .skipUpdatingInBattleData - ld a,(SFX_02_3e - SFX_Headers_02) / 3 + ld a,SFX_HEAL_AILMENT call PlaySound ld hl,PPRestoredText call PrintText @@ -1963,17 +2089,17 @@ ItemUsePPRestore: ; e31e (3:631e) ; unsets zero flag if PP was restored, sets zero flag if not ; however, this is bugged for Max Ethers and Max Elixirs (see below) .restorePP - xor a - ld [wcc49],a ; party pokemon + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation],a call GetMaxPP ld hl,wPartyMon1Moves - ld bc,44 + ld bc, wPartyMon2 - wPartyMon1 call GetSelectedMoveOffset - ld bc,21 + ld bc, wPartyMon1PP - wPartyMon1Moves add hl,bc ; hl now points to move's PP - ld a,[wd11e] - ld b,a ; b = max PP - ld a,[wWhichTrade] + ld a,[wMaxPP] + ld b,a + ld a,[wPPRestoreItem] cp a,MAX_ETHER jr z,.fullyRestorePP ld a,[hl] ; move PP @@ -2005,7 +2131,7 @@ ItemUsePPRestore: ; e31e (3:631e) jr .storeNewAmount .useElixir ; decrement the item ID so that ELIXER becomes ETHER and MAX_ELIXER becomes MAX_ETHER - ld hl,wWhichTrade + ld hl,wPPRestoreItem dec [hl] dec [hl] xor a @@ -2017,7 +2143,7 @@ ItemUsePPRestore: ; e31e (3:631e) .elixirLoop push bc ld hl,wPartyMon1Moves - ld bc,44 + ld bc, wPartyMon2 - wPartyMon1 call GetSelectedMoveOffset ld a,[hl] and a ; does the current slot have a move? @@ -2040,38 +2166,38 @@ ItemUsePPRestore: ; e31e (3:631e) call ItemUseNoEffect .itemNotUsed call GBPalWhiteOut - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand pop af xor a - ld [wcd6a],a ; item use failed + ld [wActionResultOrTookBattleTurn],a ; item use failed ret -RaisePPWhichTechniqueText: ; e45d (3:645d) +RaisePPWhichTechniqueText: TX_FAR _RaisePPWhichTechniqueText db "@" -RestorePPWhichTechniqueText: ; e462 (3:6462) +RestorePPWhichTechniqueText: TX_FAR _RestorePPWhichTechniqueText db "@" -PPMaxedOutText: ; e467 (3:6467) +PPMaxedOutText: TX_FAR _PPMaxedOutText db "@" -PPIncreasedText: ; e46c (3:646c) +PPIncreasedText: TX_FAR _PPIncreasedText db "@" -PPRestoredText: ; e471 (3:6471) +PPRestoredText: TX_FAR _PPRestoredText db "@" ; for items that can't be used from the Item menu -UnusableItem: ; e476 (3:6476) +UnusableItem: jp ItemUseNotTime -ItemUseTMHM: ; e479 (3:6479) - ld a,[W_ISINBATTLE] +ItemUseTMHM: + ld a,[wIsInBattle] and a jp nz,ItemUseNotTime ld a,[wcf91] @@ -2095,8 +2221,8 @@ ItemUseTMHM: ; e479 (3:6479) call PrintText ld hl,TeachMachineMoveText call PrintText - hlCoord 14, 7 - ld bc,$080f + coord hl, 14, 7 + lb bc, 8, 15 ld a,TWO_OPTION_MENU ld [wTextBoxID],a call DisplayTextBoxID ; yes/no menu @@ -2104,7 +2230,7 @@ ItemUseTMHM: ; e479 (3:6479) and a jr z,.useMachine ld a,2 - ld [wcd6a],a ; item not used + ld [wActionResultOrTookBattleTurn],a ; item not used ret .useMachine ld a,[wWhichPokemon] @@ -2113,16 +2239,16 @@ ItemUseTMHM: ; e479 (3:6479) push af .chooseMon ld hl,wcf4b - ld de,wd036 + ld de,wTempMoveNameBuffer ld bc,14 - call CopyData + call CopyData ; save the move name because DisplayPartyMenu will overwrite it ld a,$ff ld [wUpdateSpritesEnabled],a - ld a,$03 ; teach TM/HM party menu - ld [wd07d],a + ld a,TMHM_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a call DisplayPartyMenu push af - ld hl,wd036 + ld hl,wTempMoveNameBuffer ld de,wcf4b ld bc,14 call CopyData @@ -2133,7 +2259,7 @@ ItemUseTMHM: ; e479 (3:6479) pop af call GBPalWhiteOutWithDelay3 call ClearSprites - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand jp LoadScreenTilesFromBuffer1 ; restore saved screen .checkIfAbleToLearnMove predef CanLearnTM ; check if the pokemon can learn the move @@ -2146,8 +2272,8 @@ ItemUseTMHM: ; e479 (3:6479) and a ; can the pokemon learn the move? jr nz,.checkIfAlreadyLearnedMove ; if the pokemon can't learn the move - ld a,(SFX_02_51 - SFX_Headers_02) / 3 - call PlaySoundWaitForCurrent ; play sound + ld a,SFX_DENIED + call PlaySoundWaitForCurrent ld hl,MonCannotLearnMachineMoveText call PrintText jr .chooseMon @@ -2167,53 +2293,53 @@ ItemUseTMHM: ; e479 (3:6479) ret c jp RemoveUsedItem -BootedUpTMText: ; e54f (3:654f) +BootedUpTMText: TX_FAR _BootedUpTMText db "@" -BootedUpHMText: ; e554 (3:6554) +BootedUpHMText: TX_FAR _BootedUpHMText db "@" -TeachMachineMoveText: ; e559 (3:6559) +TeachMachineMoveText: TX_FAR _TeachMachineMoveText db "@" -MonCannotLearnMachineMoveText: ; e55e (3:655e) +MonCannotLearnMachineMoveText: TX_FAR _MonCannotLearnMachineMoveText db "@" -PrintItemUseTextAndRemoveItem: ; e563 (3:6563) +PrintItemUseTextAndRemoveItem: ld hl,ItemUseText00 call PrintText - ld a,(SFX_02_3e - SFX_Headers_02) / 3 - call PlaySound ; play sound + ld a,SFX_HEAL_AILMENT + call PlaySound call WaitForTextScrollButtonPress ; wait for button press -RemoveUsedItem: ; e571 (3:6571) +RemoveUsedItem: ld hl,wNumBagItems ld a,1 ; one item - ld [wcf96],a ; store quantity + ld [wItemQuantity],a jp RemoveItemFromInventory -ItemUseNoEffect: ; e57c (3:657c) +ItemUseNoEffect: ld hl,ItemUseNoEffectText jr ItemUseFailed -ItemUseNotTime: ; e581 (3:6581) +ItemUseNotTime: ld hl,ItemUseNotTimeText jr ItemUseFailed -ItemUseNotYoursToUse: ; e586 (3:6586) +ItemUseNotYoursToUse: ld hl,ItemUseNotYoursToUseText jr ItemUseFailed -ThrowBallAtTrainerMon: ; e58b (3:658b) - call GoPAL_SET_CF1C +ThrowBallAtTrainerMon: + call RunDefaultPaletteCommand call LoadScreenTilesFromBuffer1 ; restore saved screen call Delay3 ld a,TOSS_ANIM - ld [W_ANIMATIONID],a + ld [wAnimationID],a predef MoveAnimation ; do animation ld hl,ThrowBallAtTrainerMonText1 call PrintText @@ -2221,69 +2347,69 @@ ThrowBallAtTrainerMon: ; e58b (3:658b) call PrintText jr RemoveUsedItem -NoCyclingAllowedHere: ; e5ac (3:65ac) +NoCyclingAllowedHere: ld hl,NoCyclingAllowedHereText jr ItemUseFailed -BoxFullCannotThrowBall: ; e5b1 (3:65b1) +BoxFullCannotThrowBall: ld hl,BoxFullCannotThrowBallText jr ItemUseFailed -SurfingAttemptFailed: ; e5b6 (3:65b6) +SurfingAttemptFailed: ld hl,NoSurfingHereText -ItemUseFailed: ; e5b9 (3:65b9) +ItemUseFailed: xor a - ld [wcd6a],a ; item use failed + ld [wActionResultOrTookBattleTurn],a ; item use failed jp PrintText -ItemUseNotTimeText: ; e5c0 (3:65c0) +ItemUseNotTimeText: TX_FAR _ItemUseNotTimeText db "@" -ItemUseNotYoursToUseText: ; e5c5 (3:65c5) +ItemUseNotYoursToUseText: TX_FAR _ItemUseNotYoursToUseText db "@" -ItemUseNoEffectText: ; e5ca (3:65ca) +ItemUseNoEffectText: TX_FAR _ItemUseNoEffectText db "@" -ThrowBallAtTrainerMonText1: ; e5cf (3:65cf) +ThrowBallAtTrainerMonText1: TX_FAR _ThrowBallAtTrainerMonText1 db "@" -ThrowBallAtTrainerMonText2: ; e5d4 (3:65d4) +ThrowBallAtTrainerMonText2: TX_FAR _ThrowBallAtTrainerMonText2 db "@" -NoCyclingAllowedHereText: ; e5d9 (3:65d9) +NoCyclingAllowedHereText: TX_FAR _NoCyclingAllowedHereText db "@" -NoSurfingHereText: ; e5de (3:65de) +NoSurfingHereText: TX_FAR _NoSurfingHereText db "@" -BoxFullCannotThrowBallText: ; e5e3 (3:65e3) +BoxFullCannotThrowBallText: TX_FAR _BoxFullCannotThrowBallText db "@" -ItemUseText00: ; e5e8 (3:65e8) +ItemUseText00: TX_FAR _ItemUseText001 - db $05 + TX_LINE TX_FAR _ItemUseText002 db "@" -GotOnBicycleText: ; e5f2 (3:65f2) +GotOnBicycleText: TX_FAR _GotOnBicycleText1 - db $05 + TX_LINE TX_FAR _GotOnBicycleText2 db "@" -GotOffBicycleText: ; e5fc (3:65fc) +GotOffBicycleText: TX_FAR _GotOffBicycleText1 - db $05 + TX_LINE TX_FAR _GotOffBicycleText2 db "@" @@ -2291,23 +2417,20 @@ GotOffBicycleText: ; e5fc (3:65fc) ; also, when a PP Up is used, it increases the current PP by one PP Up bonus ; INPUT: ; [wWhichPokemon] = index of pokemon in party -; [wd11e] = mode -; 0: Pokemon Center healing -; 1: using a PP Up ; [wCurrentMenuItem] = index of move (when using a PP Up) -RestoreBonusPP: ; e606 (3:6606) +RestoreBonusPP: ld hl,wPartyMon1Moves - ld bc,44 + ld bc, wPartyMon2 - wPartyMon1 ld a,[wWhichPokemon] call AddNTimes push hl - ld de,wcd78 - 1 - predef LoadMovePPs ; loads the normal max PP of each of the pokemon's moves to wcd78 + ld de,wNormalMaxPPList - 1 + predef LoadMovePPs ; loads the normal max PP of each of the pokemon's moves to wNormalMaxPPList pop hl - ld c,21 + ld c, wPartyMon1PP - wPartyMon1Moves ld b,0 add hl,bc ; hl now points to move 1 PP - ld de,wcd78 + ld de,wNormalMaxPPList ld b,0 ; initialize move counter to zero ; loop through the pokemon's moves .loop @@ -2315,7 +2438,7 @@ RestoreBonusPP: ; e606 (3:6606) ld a,b cp a,5 ; reached the end of the pokemon's moves? ret z ; if so, return - ld a,[wd11e] + ld a,[wUsingPPUp] dec a ; using a PP Up? jr nz,.skipMenuItemIDCheck ; if using a PP Up, check if this is the move it's being used on @@ -2337,9 +2460,7 @@ RestoreBonusPP: ; e606 (3:6606) ; INPUT: ; [de] = normal max PP ; [hl] = move PP -; [wd11e] = max number of times to add bonus -; set to 1 when using a PP Up, set to 255 otherwise -AddBonusPP: ; e642 (3:6642) +AddBonusPP: push bc ld a,[de] ; normal max PP of move ld [H_DIVIDEND + 3],a @@ -2366,9 +2487,9 @@ AddBonusPP: ; e642 (3:6642) .addAmount add b ld b,a - ld a,[wd11e] - dec a - jr z,.done + ld a,[wUsingPPUp] + dec a ; is the player using a PP Up right now? + jr z,.done ; if so, only add the bonus once dec c jr nz,.loop .done @@ -2379,7 +2500,7 @@ AddBonusPP: ; e642 (3:6642) ; gets max PP of a pokemon's move (including PP from PP Ups) ; INPUT: ; [wWhichPokemon] = index of pokemon within party/box -; [wcc49] = pokemon source +; [wMonDataLocation] = pokemon source ; 00: player's party ; 01: enemy's party ; 02: current box @@ -2387,9 +2508,9 @@ AddBonusPP: ; e642 (3:6642) ; 04: player's in-battle pokemon ; [wCurrentMenuItem] = move index ; OUTPUT: -; [wd11e] = max PP -GetMaxPP: ; e677 (3:6677) - ld a,[wcc49] +; [wMaxPP] = max PP +GetMaxPP: + ld a,[wMonDataLocation] and a ld hl,wPartyMon1Moves ld bc,wPartyMon2 - wPartyMon1 @@ -2415,21 +2536,21 @@ GetMaxPP: ; e677 (3:6677) dec a push hl ld hl,Moves - ld bc,6 + ld bc,MoveEnd - Moves call AddNTimes ld de,wcd6d ld a,BANK(Moves) call FarCopyData - ld de,wcd72 + ld de,wcd6d + 5 ; PP is byte 5 of move data ld a,[de] ld b,a ; b = normal max PP pop hl push bc - ld bc,21 ; PP offset if not player's in-battle pokemon data - ld a,[wcc49] + ld bc,wPartyMon1PP - wPartyMon1Moves ; PP offset if not player's in-battle pokemon data + ld a,[wMonDataLocation] cp a,4 ; player's in-battle pokemon? jr nz,.addPPOffset - ld bc,17 ; PP offset if player's in-battle pokemon data + ld bc,wBattleMonPP - wBattleMonMoves ; PP offset if player's in-battle pokemon data .addPPOffset add hl,bc ld a,[hl] ; a = current PP @@ -2440,19 +2561,19 @@ GetMaxPP: ; e677 (3:6677) ld l,e inc hl ; hl = wcd73 ld [hl],a - xor a - ld [wd11e],a ; no limit on PP Up amount + xor a ; add the bonus for the existing PP Up count + ld [wUsingPPUp],a call AddBonusPP ; add bonus PP from PP Ups ld a,[hl] and a,%00111111 ; mask out the PP Up count - ld [wd11e],a ; store max PP + ld [wMaxPP],a ; store max PP ret -GetSelectedMoveOffset: ; e6e3 (3:66e3) +GetSelectedMoveOffset: ld a,[wWhichPokemon] call AddNTimes -GetSelectedMoveOffset2: ; e6e9 (3:66e9) +GetSelectedMoveOffset2: ld a,[wCurrentMenuItem] ld c,a ld b,0 @@ -2464,10 +2585,10 @@ GetSelectedMoveOffset2: ; e6e9 (3:66e9) ; hl = address of inventory (either wNumBagItems or wNumBoxItems) ; [wcf91] = item ID ; [wWhichPokemon] = index of item within inventory -; [wcf96] = quantity to toss +; [wItemQuantity] = quantity to toss ; OUTPUT: ; clears carry flag if the item is tossed, sets carry flag if not -TossItem_: ; e6f1 (3:66f1) +TossItem_: push hl ld a,[wcf91] call IsItemHM @@ -2475,7 +2596,7 @@ TossItem_: ; e6f1 (3:66f1) jr c,.tooImportantToToss push hl call IsKeyItem_ - ld a,[wd124] + ld a,[wIsKeyItem] pop hl and a jr nz,.tooImportantToToss @@ -2486,16 +2607,16 @@ TossItem_: ; e6f1 (3:66f1) call CopyStringToCF4B ; copy name to wcf4b ld hl,IsItOKToTossItemText call PrintText - hlCoord 14, 7 - ld bc,$080f + coord hl, 14, 7 + lb bc, 8, 15 ld a,TWO_OPTION_MENU ld [wTextBoxID],a call DisplayTextBoxID ; yes/no menu - ld a,[wd12e] - cp a,2 + ld a,[wMenuExitMethod] + cp a,CHOSE_SECOND_ITEM pop hl scf - ret z + ret z ; return if the player chose No ; if the player chose Yes push hl ld a,[wWhichPokemon] @@ -2517,15 +2638,15 @@ TossItem_: ; e6f1 (3:66f1) scf ret -ThrewAwayItemText: ; e755 (3:6755) +ThrewAwayItemText: TX_FAR _ThrewAwayItemText db "@" -IsItOKToTossItemText: ; e75a (3:675a) +IsItOKToTossItemText: TX_FAR _IsItOKToTossItemText db "@" -TooImportantToTossText: ; e75f (3:675f) +TooImportantToTossText: TX_FAR _TooImportantToTossText db "@" @@ -2533,27 +2654,27 @@ TooImportantToTossText: ; e75f (3:675f) ; INPUT: ; [wcf91] = item ID ; OUTPUT: -; [wd124] = result +; [wIsKeyItem] = result ; 00: item is not key item ; 01: item is key item -IsKeyItem_: ; e764 (3:6764) +IsKeyItem_: ld a,$01 - ld [wd124],a + ld [wIsKeyItem],a ld a,[wcf91] cp a,HM_01 ; is the item an HM or TM? jr nc,.checkIfItemIsHM ; if the item is not an HM or TM push af ld hl,KeyItemBitfield - ld de,wHPBarMaxHP + ld de,wBuffer ld bc,15 ; only 11 bytes are actually used call CopyData pop af dec a ld c,a - ld hl,wHPBarMaxHP - ld b,$02 ; test bit - predef FlagActionPredef ; bitfield operation function + ld hl,wBuffer + ld b,FLAG_TEST + predef FlagActionPredef ld a,c and a ret nz @@ -2562,13 +2683,13 @@ IsKeyItem_: ; e764 (3:6764) call IsItemHM ret c xor a - ld [wd124],a + ld [wIsKeyItem],a ret INCLUDE "data/key_items.asm" -SendNewMonToBox: ; e7a4 (3:67a4) - ld de, W_NUMINBOX ; wda80 +SendNewMonToBox: + ld de, wNumInBox ld a, [de] inc a ld [de], a @@ -2586,74 +2707,74 @@ SendNewMonToBox: ; e7a4 (3:67a4) jr nz, .asm_e7b1 call GetMonHeader ld hl, wBoxMonOT - ld bc, $b - ld a, [W_NUMINBOX] ; wda80 + ld bc, NAME_LENGTH + ld a, [wNumInBox] dec a jr z, .asm_e7ee dec a call AddNTimes push hl - ld bc, $b + ld bc, NAME_LENGTH add hl, bc ld d, h ld e, l pop hl - ld a, [W_NUMINBOX] ; wda80 + ld a, [wNumInBox] dec a ld b, a .asm_e7db push bc push hl - ld bc, $b + ld bc, NAME_LENGTH call CopyData pop hl ld d, h ld e, l - ld bc, $fff5 + ld bc, -NAME_LENGTH add hl, bc pop bc dec b jr nz, .asm_e7db .asm_e7ee - ld hl, wPlayerName ; wd158 + ld hl, wPlayerName ld de, wBoxMonOT - ld bc, $b + ld bc, NAME_LENGTH call CopyData - ld a, [W_NUMINBOX] ; wda80 + ld a, [wNumInBox] dec a jr z, .asm_e82a ld hl, wBoxMonNicks - ld bc, $b + ld bc, NAME_LENGTH dec a call AddNTimes push hl - ld bc, $b + ld bc, NAME_LENGTH add hl, bc ld d, h ld e, l pop hl - ld a, [W_NUMINBOX] ; wda80 + ld a, [wNumInBox] dec a ld b, a .asm_e817 push bc push hl - ld bc, $b + ld bc, NAME_LENGTH call CopyData pop hl ld d, h ld e, l - ld bc, $fff5 + ld bc, -NAME_LENGTH add hl, bc pop bc dec b jr nz, .asm_e817 .asm_e82a ld hl, wBoxMonNicks - ld a, $2 - ld [wd07d], a + ld a, NAME_MON_SCREEN + ld [wNamingScreenType], a predef AskName - ld a, [W_NUMINBOX] ; wda80 + ld a, [wNumInBox] dec a jr z, .asm_e867 ld hl, wBoxMons @@ -2666,7 +2787,7 @@ SendNewMonToBox: ; e7a4 (3:67a4) ld d, h ld e, l pop hl - ld a, [W_NUMINBOX] ; wda80 + ld a, [wNumInBox] dec a ld b, a .asm_e854 @@ -2677,19 +2798,19 @@ SendNewMonToBox: ; e7a4 (3:67a4) pop hl ld d, h ld e, l - ld bc, $ffdf + ld bc, wBoxMon1 - wBoxMon2 add hl, bc pop bc 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 + ld bc, wEnemyMonDVs - wEnemyMon call CopyData - ld hl, wPlayerID ; wPlayerID + ld hl, wPlayerID ld a, [hli] ld [de], a inc de @@ -2697,21 +2818,21 @@ SendNewMonToBox: ; e7a4 (3:67a4) ld [de], a inc de push de - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL + ld a, [wCurEnemyLVL] ld d, a callab CalcExperience pop de - ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND) + ld a, [hExperience] ld [de], a inc de - ld a, [$ff97] + ld a, [hExperience + 1] ld [de], a inc de - ld a, [$ff98] + ld a, [hExperience + 2] ld [de], a inc de xor a - ld b, $a + ld b, NUM_STATS * 2 .asm_e89f ld [de], a inc de @@ -2723,8 +2844,8 @@ SendNewMonToBox: ; e7a4 (3:67a4) inc de ld a, [hli] ld [de], a - ld hl, wEnemyMonPP ; wcffe - ld b, $4 + ld hl, wEnemyMonPP + ld b, NUM_MOVES .asm_e8b1 ld a, [hli] inc de @@ -2736,13 +2857,13 @@ SendNewMonToBox: ; e7a4 (3:67a4) ; checks if the tile in front of the player is a shore or water tile ; used for surfing and fishing ; unsets carry if it is, sets carry if not -IsNextTileShoreOrWater: ; e8b8 (3:68b8) - ld a, [W_CURMAPTILESET] +IsNextTileShoreOrWater: + ld a, [wCurMapTileset] ld hl, WaterTilesets ld de,1 call IsInArray jr nc, .notShoreOrWater - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] cp SHIP_PORT ; Vermilion Dock tileset ld a, [wTileInFrontOfPlayer] ; tile in front of player jr z, .skipShoreTiles ; if it's the Vermilion Dock tileset @@ -2761,15 +2882,15 @@ IsNextTileShoreOrWater: ; e8b8 (3:68b8) ret ; tilesets with water -WaterTilesets: ; e8e0 (3:68e0) +WaterTilesets: db OVERWORLD, FOREST, DOJO, GYM, SHIP, SHIP_PORT, CAVERN, FACILITY, PLATEAU db $ff ; terminator -ReadSuperRodData: ; e8ea (3:68ea) +ReadSuperRodData: ; return e = 2 if no fish on this map ; return e = 1 if a bite, bc = level,species ; return e = 0 if no bite - ld a, [W_CURMAP] + ld a, [wCurMap] ld de, 3 ; each fishing group is three bytes wide ld hl, SuperRodData call IsInArray @@ -2777,7 +2898,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 +2911,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 @@ -2814,13 +2935,13 @@ INCLUDE "data/super_rod.asm" ; reloads map view and processes sprite data ; for items that cause the overworld to be displayed -ItemUseReloadOverworldData: ; e9c5 (3:69c5) +ItemUseReloadOverworldData: call LoadCurrentMapView jp UpdateSprites ; creates a list at wBuffer of maps where the mon in [wd11e] can be found. ; this is used by the pokedex to display locations the mon can be found on the map. -FindWildLocationsOfMon: ; e9cb (3:69cb) +FindWildLocationsOfMon: ld hl, WildDataPointers ld de, wBuffer ld c, $0 @@ -2849,7 +2970,7 @@ FindWildLocationsOfMon: ; e9cb (3:69cb) ld [de], a ret -CheckMapForMon: ; e9f0 (3:69f0) +CheckMapForMon: inc hl ld b, $a .loop diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm index 7c5c56fa..80e6bf3c 100755 --- a/engine/items/tm_prices.asm +++ b/engine/items/tm_prices.asm @@ -1,12 +1,11 @@ -GetMachinePrice: ; 7bf86 (1e:7f86) +GetMachinePrice: ; Input: [wcf91] = Item Id of a TM -; Output: Stores the 2-byte TM price in [H_DOWNARROWBLINKCNT1] and [H_DOWNARROWBLINKCNT2] -; as a BCD +; Output: Stores the TM price at hItemPrice ld a, [wcf91] ; a contains TM item id sub TM_01 ret c ld d, a - ld hl, TechnicalMachinePrices ; $7fa7 + ld hl, TechnicalMachinePrices srl a ld c, a ld b, 0 @@ -17,10 +16,10 @@ GetMachinePrice: ; 7bf86 (1e:7f86) swap a .highNybbleIsPrice and $f0 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hItemPrice + 1], a xor a - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b - ld [$ff8d], a + ld [hItemPrice], a + ld [hItemPrice + 2], a ret INCLUDE "data/tm_prices.asm" diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm index 0fcc5710..7ccaa232 100755 --- a/engine/items/tmhm.asm +++ b/engine/items/tmhm.asm @@ -1,5 +1,5 @@ ; checks if the mon in [wWhichPokemon] already knows the move in [wMoveNum] -CheckIfMoveIsKnown: ; 2fe18 (b:7e18) +CheckIfMoveIsKnown: ld a, [wWhichPokemon] ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 @@ -21,6 +21,6 @@ CheckIfMoveIsKnown: ; 2fe18 (b:7e18) scf ret -AlreadyKnowsText: ; 2fe3b (b:7e3b) +AlreadyKnowsText: TX_FAR _AlreadyKnowsText db "@" diff --git a/engine/items/tms.asm b/engine/items/tms.asm index 511aab5b..da1b5e72 100755 --- a/engine/items/tms.asm +++ b/engine/items/tms.asm @@ -1,9 +1,9 @@ ; tests if mon [wcf91] can learn move [wMoveNum] -CanLearnTM: ; 1373e (4:773e) +CanLearnTM: ld a, [wcf91] ld [wd0b5], a call GetMonHeader - ld hl, W_MONHLEARNSET + ld hl, wMonHLearnset push hl ld a, [wMoveNum] ld b, a @@ -17,12 +17,12 @@ CanLearnTM: ; 1373e (4:773e) jr .findTMloop .TMfoundLoop pop hl - ld b, $2 ; read corresponding bit from TM compatibility array + ld b, FLAG_TEST predef_jump FlagActionPredef ; converts TM/HM number in wd11e into move number ; HMs start at 51 -TMToMove: ; 13763 (4:7763) +TMToMove: ld a, [wd11e] dec a ld hl, TechnicalMachines diff --git a/engine/learn_move.asm b/engine/learn_move.asm index 75056edb..ba73d4c0 100755 --- a/engine/learn_move.asm +++ b/engine/learn_move.asm @@ -1,28 +1,28 @@ -LearnMove: ; 6e43 (1:6e43) +LearnMove: call SaveScreenTilesToBuffer1 ld a, [wWhichPokemon] ld hl, wPartyMonNicks call GetPartyMonName ld hl, wcd6d - ld de, wd036 - ld bc, $b + ld de, wLearnMoveMonName + ld bc, NAME_LENGTH call CopyData -DontAbandonLearning: ; 6e5b (1:6e5b) +DontAbandonLearning: ld hl, wPartyMon1Moves - ld bc, $2c + ld bc, wPartyMon2Moves - wPartyMon1Moves ld a, [wWhichPokemon] call AddNTimes ld d, h ld e, l - ld b, $4 -.asm_6e6b + ld b, NUM_MOVES +.findEmptyMoveSlotLoop ld a, [hl] and a - jr z, .asm_6e8b + jr z, .next inc hl dec b - jr nz, .asm_6e6b + jr nz, .findEmptyMoveSlotLoop push de call TryingToLearn pop de @@ -35,25 +35,25 @@ DontAbandonLearning: ; 6e5b (1:6e5b) call PrintText pop de pop hl -.asm_6e8b +.next ld a, [wMoveNum] ld [hl], a - ld bc, $15 + ld bc, wPartyMon1PP - wPartyMon1Moves add hl, bc push hl push de dec a ld hl, Moves - ld bc, $6 + ld bc, MoveEnd - Moves call AddNTimes - ld de, wHPBarMaxHP + ld de, wBuffer ld a, BANK(Moves) call FarCopyData - ld a, [wHPBarNewHP + 1] + ld a, [wBuffer + 5] ; a = move's max PP pop de pop hl ld [hl], a - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] and a jp z, PrintLearnedMove ld a, [wWhichPokemon] @@ -66,18 +66,18 @@ DontAbandonLearning: ; 6e5b (1:6e5b) ld de, wBattleMonMoves ld bc, NUM_MOVES call CopyData - ld bc, $11 + ld bc, wPartyMon1PP - wPartyMon1OTID add hl, bc ld de, wBattleMonPP - ld bc, $4 + ld bc, NUM_MOVES call CopyData jp PrintLearnedMove -AbandonLearning: ; 6eda (1:6eda) +AbandonLearning: ld hl, AbandonLearningText call PrintText - hlCoord 14, 7 - ld bc, $80f + coord hl, 14, 7 + lb bc, 8, 15 ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID ; yes/no menu @@ -86,21 +86,21 @@ AbandonLearning: ; 6eda (1:6eda) jp nz, DontAbandonLearning ld hl, DidNotLearnText call PrintText - ld b, $0 + ld b, 0 ret -PrintLearnedMove: ; 6efe (1:6efe) +PrintLearnedMove: ld hl, LearnedMove1Text call PrintText - ld b, $1 + ld b, 1 ret -TryingToLearn: ; 6f07 (1:6f07) +TryingToLearn: push hl ld hl, TryingToLearnText call PrintText - hlCoord 14, 7 - ld bc, $80f + coord hl, 14, 7 + lb bc, 8, 15 ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID ; yes/no menu @@ -108,7 +108,7 @@ TryingToLearn: ; 6f07 (1:6f07) ld a, [wCurrentMenuItem] rra ret c - ld bc, $fffc + ld bc, -NUM_MOVES add hl, bc push hl ld de, wMoves @@ -116,15 +116,15 @@ TryingToLearn: ; 6f07 (1:6f07) call CopyData callab FormatMovesString pop hl -.asm_6f39 +.loop push hl ld hl, WhichMoveToForgetText call PrintText - hlCoord 4, 7 - ld b, $4 - ld c, $e + coord hl, 4, 7 + ld b, 4 + ld c, 14 call TextBoxBorder - hlCoord 6, 8 + coord hl, 6, 8 ld de, wMovesString ld a, [hFlags_0xFFF6] set 2, a @@ -134,18 +134,18 @@ TryingToLearn: ; 6f07 (1:6f07) res 2, a ld [hFlags_0xFFF6], a ld hl, wTopMenuItemY - ld a, $8 - ld [hli], a - ld a, $5 - ld [hli], a + ld a, 8 + ld [hli], a ; wTopMenuItemY + ld a, 5 + ld [hli], a ; wTopMenuItemX xor a - ld [hli], a + ld [hli], a ; wCurrentMenuItem inc hl - ld a, [wcd6c] - ld [hli], a - ld a, $3 - ld [hli], a - ld [hl], $0 + ld a, [wNumMovesMinusOne] + ld [hli], a ; wMaxMenuItem + ld a, A_BUTTON | B_BUTTON + ld [hli], a ; wMenuWatchedKeys + ld [hl], 0 ; wLastMenuItem ld hl, hFlags_0xFFF6 set 1, [hl] call HandleMenuInput @@ -155,12 +155,12 @@ TryingToLearn: ; 6f07 (1:6f07) call LoadScreenTilesFromBuffer1 pop af pop hl - bit 1, a - jr nz, .asm_6fab + bit 1, a ; pressed b + jr nz, .cancel push hl ld a, [wCurrentMenuItem] ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hl] push af @@ -169,56 +169,58 @@ TryingToLearn: ; 6f07 (1:6f07) pop bc pop de ld a, d - jr c, .asm_6fa2 + jr c, .hm pop hl add hl, bc and a ret -.asm_6fa2 +.hm ld hl, HMCantDeleteText call PrintText pop hl - jr .asm_6f39 -.asm_6fab + jr .loop +.cancel scf ret -LearnedMove1Text: ; 6fb4 (1:6fb4) +LearnedMove1Text: TX_FAR _LearnedMove1Text - db $b,6,"@" + TX_SFX_ITEM_1 ; plays SFX_GET_ITEM_1 in the pary menu (rare candy) and plays SFX_LEVEL_UP in battle + TX_BLINK + db "@" -WhichMoveToForgetText: ; 6fb4 (1:6fb4) +WhichMoveToForgetText: TX_FAR _WhichMoveToForgetText db "@" -AbandonLearningText: ; 6fb9 (1:6fb9) +AbandonLearningText: TX_FAR _AbandonLearningText db "@" -DidNotLearnText: ; 6fbe (1:6fbe) +DidNotLearnText: TX_FAR _DidNotLearnText db "@" -TryingToLearnText: ; 6fc3 (1:6fc3) +TryingToLearnText: TX_FAR _TryingToLearnText db "@" -OneTwoAndText: ; 6fc8 (1:6fc8) +OneTwoAndText: TX_FAR _OneTwoAndText - db $a - db $8 - ld a, (SFX_02_58 - SFX_Headers_02) / 3 + TX_DELAY + TX_ASM + ld a, SFX_SWAP call PlaySoundWaitForCurrent ld hl, PoofText ret -PoofText: ; 6fd7 (1:6fd7) +PoofText: TX_FAR _PoofText - db $a -ForgotAndText: ; 6fdc (1:6fdc) + TX_DELAY +ForgotAndText: TX_FAR _ForgotAndText db "@" -HMCantDeleteText: ; 6fe1 (1:6fe1) +HMCantDeleteText: TX_FAR _HMCantDeleteText db "@" diff --git a/engine/load_mon_data.asm b/engine/load_mon_data.asm new file mode 100644 index 00000000..a71a81c5 --- /dev/null +++ b/engine/load_mon_data.asm @@ -0,0 +1,49 @@ +LoadMonData_: +; Load monster [wWhichPokemon] from list [wMonDataLocation]: +; 0: partymon +; 1: enemymon +; 2: boxmon +; 3: daycaremon +; Return monster id at wcf91 and its data at wLoadedMon. +; Also load base stats at wMonHeader for convenience. + + ld a, [wDayCareMonSpecies] + ld [wcf91], a + ld a, [wMonDataLocation] + cp DAYCARE_DATA + jr z, .GetMonHeader + + ld a, [wWhichPokemon] + ld e, a + callab GetMonSpecies + +.GetMonHeader + ld a, [wcf91] + ld [wd0b5], a ; input for GetMonHeader + call GetMonHeader + + ld hl, wPartyMons + ld bc, wPartyMon2 - wPartyMon1 + ld a, [wMonDataLocation] + cp ENEMY_PARTY_DATA + jr c, .getMonEntry + + ld hl, wEnemyMons + jr z, .getMonEntry + + cp 2 + ld hl, wBoxMons + ld bc, wBoxMon2 - wBoxMon1 + jr z, .getMonEntry + + ld hl, wDayCareMon + jr .copyMonData + +.getMonEntry + ld a, [wWhichPokemon] + call AddNTimes + +.copyMonData + ld de, wLoadedMon + ld bc, wPartyMon2 - wPartyMon1 + jp CopyData diff --git a/engine/load_pokedex_tiles.asm b/engine/load_pokedex_tiles.asm index e8205ef8..637b7a24 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) +LoadPokedexTilePatterns: call LoadHpBarAndStatusTilePatterns - ld de,PokedexTileGraphics ; $6488 + ld de,PokedexTileGraphics ld hl,vChars2 + $600 - ld bc,(BANK(PokedexTileGraphics) << 8) + $12 + lb bc, BANK(PokedexTileGraphics), (PokedexTileGraphicsEnd - PokedexTileGraphics) / $10 call CopyVideoData - ld de,PokeballTileGraphics ; $697e + ld de,PokeballTileGraphics ld hl,vChars2 + $720 - ld bc,(BANK(PokeballTileGraphics) << 8) + $01 + lb bc, BANK(PokeballTileGraphics), $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..85a546e1 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -1,90 +1,87 @@ -Func_213c8:: ; 213c8 (8:53c8) +DisplayPCMainMenu:: xor a ld [H_AUTOBGTRANSFERENABLED], a call SaveScreenTilesToBuffer2 - ld a, [wd5a2] + ld a, [wNumHoFTeams] and a - jr nz, .asm_213f3 - ld a, [wd74b] - bit 5, a - jr z, .asm_213ea - ld a, [wd5a2] + jr nz, .leaguePCAvailable + CheckEvent EVENT_GOT_POKEDEX + jr z, .noOaksPC + ld a, [wNumHoFTeams] and a - jr nz, .asm_213f3 - ld hl, wTileMap - ld b, $8 - ld c, $e - jr .asm_213fa -.asm_213ea - ld hl, wTileMap - ld b, $6 - ld c, $e - jr .asm_213fa -.asm_213f3 - ld hl, wTileMap - ld b, $a - ld c, $e -.asm_213fa + jr nz, .leaguePCAvailable + coord hl, 0, 0 + ld b, 8 + ld c, 14 + jr .next +.noOaksPC + coord hl, 0, 0 + ld b, 6 + ld c, 14 + jr .next +.leaguePCAvailable + coord hl, 0, 0 + ld b, 10 + ld c, 14 +.next call TextBoxBorder call UpdateSprites - ld a, $3 + ld a, 3 ld [wMaxMenuItem], a - ld a, [wd7f1] - bit 0, a - jr nz, .asm_21414 - hlCoord 2, 2 + CheckEvent EVENT_MET_BILL + jr nz, .metBill + coord hl, 2, 2 ld de, SomeonesPCText - jr .asm_2141a -.asm_21414 - hlCoord 2, 2 + jr .next2 +.metBill + coord hl, 2, 2 ld de, BillsPCText -.asm_2141a +.next2 call PlaceString - hlCoord 2, 4 + coord hl, 2, 4 ld de, wPlayerName call PlaceString ld l, c ld h, b ld de, PlayersPCText call PlaceString - ld a, [wd74b] - bit 5, a - jr z, .asm_21462 - hlCoord 2, 6 + CheckEvent EVENT_GOT_POKEDEX + jr z, .noOaksPC2 + coord hl, 2, 6 ld de, OaksPCText call PlaceString - ld a, [wd5a2] + ld a, [wNumHoFTeams] and a - jr z, .asm_2145a - ld a, $4 + jr z, .noLeaguePC + ld a, 4 ld [wMaxMenuItem], a - hlCoord 2, 8 + coord hl, 2, 8 ld de, PKMNLeaguePCText call PlaceString - hlCoord 2, 10 + coord hl, 2, 10 ld de, LogOffPCText - jr .asm_2146d -.asm_2145a - hlCoord 2, 8 + jr .next3 +.noLeaguePC + coord hl, 2, 8 ld de, LogOffPCText - jr .asm_2146d -.asm_21462 + jr .next3 +.noOaksPC2 ld a, $2 ld [wMaxMenuItem], a - hlCoord 2, 6 + coord hl, 2, 6 ld de, LogOffPCText -.asm_2146d +.next3 call PlaceString - ld a, $3 + ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a - ld a, $2 + ld a, 2 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a xor a ld [wCurrentMenuItem], a ld [wLastMenuItem], a - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a ret @@ -95,107 +92,109 @@ OaksPCText: db "PROF.OAK's PC@" PKMNLeaguePCText: db $4a, "LEAGUE@" LogOffPCText: db "LOG OFF@" -BillsPC_:: ; 0x214c2 +BillsPC_:: ld hl, wd730 set 6, [hl] xor a - ld [wccd3], a + ld [wParentMenuItem], a inc a ; MONSTER_NAME ld [wNameListType], a call LoadHpBarAndStatusTilePatterns ld a, [wListScrollOffset] push af ld a, [wFlags_0xcd60] - bit 3, a + bit 3, a ; accessing Bill's PC through another PC? jr nz, BillsPCMenu +; accessing it directly ld a, $99 call PlaySound ld hl, SwitchOnText call PrintText -Func_214e8: ; 214e8 (8:54e8) BillsPCMenu: - ld a, [wccd3] + ld a, [wParentMenuItem] ld [wCurrentMenuItem], a ld hl, vChars2 + $780 ld de, PokeballTileGraphics - ld bc, (BANK(PokeballTileGraphics) << 8) + $01 + lb bc, BANK(PokeballTileGraphics), $01 call CopyVideoData call LoadScreenTilesFromBuffer2DisableBGTransfer - ld hl, wTileMap - ld b, $a - ld c, $c + coord hl, 0, 0 + ld b, 10 + ld c, 12 call TextBoxBorder - hlCoord 2, 2 + coord hl, 2, 2 ld de, BillsPCMenuText call PlaceString ld hl, wTopMenuItemY - ld a, $2 - ld [hli], a + ld a, 2 + ld [hli], a ; wTopMenuItemY dec a - ld [hli], a + ld [hli], a ; wTopMenuItemX inc hl inc hl - ld a, $4 - ld [hli], a - ld a, $3 - ld [hli], a + ld a, 4 + ld [hli], a ; wMaxMenuItem + ld a, A_BUTTON | B_BUTTON + ld [hli], a ; wMenuWatchedKeys xor a - ld [hli], a - ld [hli], a + ld [hli], a ; wLastMenuItem + ld [hli], a ; wPartyAndBillsPCSavedMenuItem ld hl, wListScrollOffset - ld [hli], a - ld [hl], a + ld [hli], a ; wListScrollOffset + ld [hl], a ; wMenuWatchMovingOutOfBounds ld [wPlayerMonNumber], a ld hl, WhatText call PrintText - hlCoord 9, 14 - ld b, $2 - ld c, $9 + coord hl, 9, 14 + ld b, 2 + ld c, 9 call TextBoxBorder - ld a, [wd5a0] + ld a, [wCurrentBoxNum] and $7f cp 9 - jr c, .asm_2154f + jr c, .singleDigitBoxNum +; two digit box num sub 9 - hlCoord 17, 16 + coord hl, 17, 16 ld [hl], "1" add "0" - jr .asm_21551 -.asm_2154f + jr .next +.singleDigitBoxNum add "1" -.asm_21551 +.next Coorda 18, 16 - hlCoord 10, 16 + coord hl, 10, 16 ld de, BoxNoPCText call PlaceString - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 call HandleMenuInput bit 1, a - jp nz, Func_21588 ; b button + jp nz, ExitBillsPC ; b button call PlaceUnfilledArrowMenuCursor ld a, [wCurrentMenuItem] - ld [wccd3], a + ld [wParentMenuItem], a and a - jp z, Func_21618 ; withdraw + jp z, BillsPCWithdraw ; withdraw cp $1 - jp z, Func_215ac ; deposit + jp z, BillsPCDeposit ; deposit cp $2 - jp z, Func_21673 ; release + jp z, BillsPCRelease ; release cp $3 - jp z, Func_216b3 ; change box + jp z, BillsPCChangeBox ; change box -Func_21588: ; 21588 (8:5588) +ExitBillsPC: ld a, [wFlags_0xcd60] - bit 3, a - jr nz, .asm_2159a + bit 3, a ; accessing Bill's PC through another PC? + jr nz, .next +; accessing it directly call LoadTextBoxTilePatterns ld a, $9a call PlaySound call WaitForSoundToFinish -.asm_2159a +.next ld hl, wFlags_0xcd60 res 5, [hl] call LoadScreenTilesFromBuffer2 @@ -205,166 +204,164 @@ Func_21588: ; 21588 (8:5588) res 6, [hl] ret -Func_215ac: ; 215ac (8:55ac) BillsPCDeposit: ld a, [wPartyCount] dec a - jr nz, .asm_215bb + jr nz, .partyLargeEnough ld hl, CantDepositLastMonText call PrintText jp BillsPCMenu -.asm_215bb - ld a, [W_NUMINBOX] +.partyLargeEnough + ld a, [wNumInBox] cp MONS_PER_BOX - jr nz, .asm_215cb + jr nz, .boxNotFull ld hl, BoxFullText call PrintText jp BillsPCMenu -.asm_215cb +.boxNotFull ld hl, wPartyCount - call Func_216be + call DisplayMonListMenu jp c, BillsPCMenu - call Func_2174b + call DisplayDepositWithdrawMenu jp nc, BillsPCMenu ld a, [wcf91] call GetCryData call PlaySoundWaitForCurrent - ld a, $1 - ld [wcf95], a - call Func_3a68 + ld a, PARTY_TO_BOX + ld [wMoveMonType], a + call MoveMon xor a - ld [wcf95], a + ld [wRemoveMonFromBox], a call RemovePokemon call WaitForSoundToFinish - ld hl, wWhichTrade - ld a, [wd5a0] + ld hl, wBoxNumString + ld a, [wCurrentBoxNum] and $7f cp 9 - jr c, .asm_2160a + jr c, .singleDigitBoxNum sub 9 ld [hl], "1" inc hl add "0" - jr .asm_2160c -.asm_2160a + jr .next +.singleDigitBoxNum add "1" -.asm_2160c +.next ld [hli], a - ld [hl], $50 + ld [hl], "@" ld hl, MonWasStoredText call PrintText jp BillsPCMenu -Func_21618: ; 21618 (8:5618) - ld a, [W_NUMINBOX] +BillsPCWithdraw: + ld a, [wNumInBox] and a - jr nz, .asm_21627 + jr nz, .boxNotEmpty ld hl, NoMonText call PrintText - jp Func_214e8 -.asm_21627 + jp BillsPCMenu +.boxNotEmpty ld a, [wPartyCount] cp PARTY_LENGTH - jr nz, .asm_21637 + jr nz, .partyNotFull ld hl, CantTakeMonText call PrintText - jp Func_214e8 -.asm_21637 - ld hl, W_NUMINBOX - call Func_216be - jp c, Func_214e8 - call Func_2174b - jp nc, Func_214e8 + jp BillsPCMenu +.partyNotFull + ld hl, wNumInBox + call DisplayMonListMenu + jp c, BillsPCMenu + call DisplayDepositWithdrawMenu + jp nc, BillsPCMenu ld a, [wWhichPokemon] ld hl, wBoxMonNicks call GetPartyMonName ld a, [wcf91] call GetCryData call PlaySoundWaitForCurrent - xor a - ld [wcf95], a - call Func_3a68 - ld a, $1 - ld [wcf95], a + xor a ; BOX_TO_PARTY + ld [wMoveMonType], a + call MoveMon + ld a, 1 + ld [wRemoveMonFromBox], a call RemovePokemon call WaitForSoundToFinish ld hl, MonIsTakenOutText call PrintText - jp Func_214e8 + jp BillsPCMenu -Func_21673: ; 21673 (8:5673) - ld a, [W_NUMINBOX] +BillsPCRelease: + ld a, [wNumInBox] and a - jr nz, .asm_21682 + jr nz, .loop ld hl, NoMonText call PrintText - jp Func_214e8 -.asm_21682 - ld hl, W_NUMINBOX - call Func_216be - jp c, Func_214e8 + jp BillsPCMenu +.loop + ld hl, wNumInBox + call DisplayMonListMenu + jp c, BillsPCMenu ld hl, OnceReleasedText call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_21682 + jr nz, .loop inc a - ld [wcf95], a + ld [wRemoveMonFromBox], a call RemovePokemon call WaitForSoundToFinish ld a, [wcf91] call PlayCry ld hl, MonWasReleasedText call PrintText - jp Func_214e8 + jp BillsPCMenu -Func_216b3: ; 216b3 (8:56b3) +BillsPCChangeBox: callba ChangeBox - jp Func_214e8 + jp BillsPCMenu -Func_216be: ; 216be (8:56be) +DisplayMonListMenu: ld a, l - ld [wList], a + ld [wListPointer], a ld a, h - ld [wList + 1], a + ld [wListPointer + 1], a xor a - ld [wcf93], a + ld [wPrintItemPrices], a ld [wListMenuID], a inc a ; MONSTER_NAME ld [wNameListType], a - ld a, [wcc2b] + ld a, [wPartyAndBillsPCSavedMenuItem] ld [wCurrentMenuItem], a call DisplayListMenuID ld a, [wCurrentMenuItem] - ld [wcc2b], a + ld [wPartyAndBillsPCSavedMenuItem], a ret -BillsPCMenuText: ; 216e1 (8:56e1) +BillsPCMenuText: db "WITHDRAW ", $4a next "DEPOSIT ", $4a next "RELEASE ", $4a next "CHANGE BOX" -IF DEF(_YELLOW) - next "PRINT BOX" -ENDC next "SEE YA!" db "@" -BoxNoPCText: ; 21713 (8:5713) +BoxNoPCText: db "BOX No.@" -Func_2171b:: ; 2171b (8:571b) +KnowsHMMove:: +; returns whether mon with party index [wWhichPokemon] knows an HM move ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 - jr .asm_21729 ; 0x21721 $6 + jr .next +; unreachable ld hl, wBoxMon1Moves ld bc, wBoxMon2 - wBoxMon1 -.asm_21729 +.next ld a, [wWhichPokemon] call AddNTimes ld b, NUM_MOVES -.asm_21731 +.loop ld a, [hli] push hl push bc @@ -375,11 +372,11 @@ Func_2171b:: ; 2171b (8:571b) pop hl ret c dec b - jr nz, .asm_21731 ; 0x21741 $ee + jr nz, .loop and a ret -HMMoveArray: ; 21745 (8:5745) +HMMoveArray: db CUT db FLY db SURF @@ -387,72 +384,72 @@ HMMoveArray: ; 21745 (8:5745) db FLASH db -1 -Func_2174b: ; 2174b (8:574b) - hlCoord 9, 10 - ld b, $6 - ld c, $9 +DisplayDepositWithdrawMenu: + coord hl, 9, 10 + ld b, 6 + ld c, 9 call TextBoxBorder - ld a, [wccd3] - and a + ld a, [wParentMenuItem] + and a ; was the Deposit or Withdraw item selected in the parent menu? ld de, DepositPCText - jr nz, .asm_21761 + jr nz, .next ld de, WithdrawPCText -.asm_21761 - hlCoord 11, 12 +.next + coord hl, 11, 12 call PlaceString - hlCoord 11, 14 + coord hl, 11, 14 ld de, StatsCancelPCText call PlaceString ld hl, wTopMenuItemY - ld a, $c - ld [hli], a - ld a, $a - ld [hli], a + ld a, 12 + ld [hli], a ; wTopMenuItemY + ld a, 10 + ld [hli], a ; wTopMenuItemX xor a - ld [hli], a + ld [hli], a ; wCurrentMenuItem inc hl - ld a, $2 - ld [hli], a - ld a, $3 - ld [hli], a + ld a, 2 + ld [hli], a ; wMaxMenuItem + ld a, A_BUTTON | B_BUTTON + ld [hli], a ; wMenuWatchedKeys xor a - ld [hl], a + ld [hl], a ; wLastMenuItem ld hl, wListScrollOffset - ld [hli], a - ld [hl], a + ld [hli], a ; wListScrollOffset + ld [hl], a ; wMenuWatchMovingOutOfBounds ld [wPlayerMonNumber], a - ld [wcc2b], a -.asm_2178f + ld [wPartyAndBillsPCSavedMenuItem], a +.loop call HandleMenuInput - bit 1, a - jr nz, .asm_2179f + bit 1, a ; pressed B? + jr nz, .exit ld a, [wCurrentMenuItem] and a - jr z, .asm_217a1 + jr z, .choseDepositWithdraw dec a - jr z, .asm_217a3 -.asm_2179f + jr z, .viewStats +.exit and a ret -.asm_217a1 +.choseDepositWithdraw scf ret -.asm_217a3 +.viewStats call SaveScreenTilesToBuffer1 - ld a, [wccd3] + ld a, [wParentMenuItem] and a - ld a, $0 - jr nz, .asm_217b0 - ld a, $2 -.asm_217b0 - ld [wcc49], a + ld a, PLAYER_PARTY_DATA + jr nz, .next2 + ld a, BOX_DATA +.next2 + ld [wMonDataLocation], a predef StatusScreen predef StatusScreen2 call LoadScreenTilesFromBuffer1 call ReloadTilesetTilePatterns - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call LoadGBPal - jr .asm_2178f + jr .loop DepositPCText: db "DEPOSIT@" WithdrawPCText: db "WITHDRAW@" @@ -460,91 +457,89 @@ StatsCancelPCText: db "STATS" next "CANCEL@" -SwitchOnText: ; 0x217e9 +SwitchOnText: TX_FAR _SwitchOnText db "@" -WhatText: ; 0x217ee +WhatText: TX_FAR _WhatText db "@" -DepositWhichMonText: ; 0x217f3 +DepositWhichMonText: TX_FAR _DepositWhichMonText db "@" -MonWasStoredText: ; 0x217f8 +MonWasStoredText: TX_FAR _MonWasStoredText db "@" -CantDepositLastMonText: ; 0x217fd +CantDepositLastMonText: TX_FAR _CantDepositLastMonText db "@" -BoxFullText: ; 0x21802 +BoxFullText: TX_FAR _BoxFullText db "@" -MonIsTakenOutText: ; 0x21807 +MonIsTakenOutText: TX_FAR _MonIsTakenOutText db "@" -NoMonText: ; 0x2180c +NoMonText: TX_FAR _NoMonText db "@" -CantTakeMonText: ; 0x21811 +CantTakeMonText: TX_FAR _CantTakeMonText db "@" -ReleaseWhichMonText: ; 0x21816 +ReleaseWhichMonText: TX_FAR _ReleaseWhichMonText db "@" -OnceReleasedText: ; 0x2181b +OnceReleasedText: TX_FAR _OnceReleasedText db "@" -MonWasReleasedText: ; 0x21820 +MonWasReleasedText: TX_FAR _MonWasReleasedText db "@" -CableClubLeftGameboy:: ; 5824 (8:5825) +CableClubLeftGameboy:: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK ret z ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction cp SPRITE_FACING_RIGHT ret nz - ld a, [W_CURMAP] - cp BATTLE_CENTER + ld a, [wCurMap] + cp TRADE_CENTER ld a, LINK_STATE_START_TRADE - jr z, .asm_2183a + jr z, .next inc a ; LINK_STATE_START_BATTLE -.asm_2183a +.next ld [wLinkState], a call EnableAutoTextBoxDrawing - ld a, $22 ; JustAMomentText - jp PrintPredefTextID + tx_pre_jump JustAMomentText -CableClubRightGameboy:: ; 5845 (8:5845) +CableClubRightGameboy:: ld a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK ret z ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction cp SPRITE_FACING_LEFT ret nz - ld a, [W_CURMAP] - cp BATTLE_CENTER + ld a, [wCurMap] + cp TRADE_CENTER ld a, LINK_STATE_START_TRADE - jr z, .asm_2185a + jr z, .next inc a ; LINK_STATE_START_BATTLE -.asm_2185a +.next ld [wLinkState], a call EnableAutoTextBoxDrawing - ld a, $22 ; JustAMomentText - jp PrintPredefTextID + tx_pre_jump JustAMomentText -JustAMomentText:: ; 21865 (8:5865) +JustAMomentText:: TX_FAR _JustAMomentText db "@" @@ -552,9 +547,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:: db $FD ; FuncTX_BillsPC diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm index 1624ed70..09ba123e 100755 --- a/engine/menu/diploma.asm +++ b/engine/menu/diploma.asm @@ -1,4 +1,4 @@ -DisplayDiploma: ; 566e2 (15:66e2) +DisplayDiploma: call SaveScreenTilesToBuffer2 call GBPalWhiteOutWithDelay3 call ClearScreen @@ -7,15 +7,15 @@ 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) call FarCopyData2 - ld hl, wTileMap - ld bc, $1012 + coord hl, 0, 0 + lb bc, 16, 18 predef Diploma_TextBoxBorder - ld hl, DiplomaTextPointersAndCoords ; $6784 + ld hl, DiplomaTextPointersAndCoords ld c, $5 .asm_56715 push bc @@ -32,31 +32,35 @@ DisplayDiploma: ; 566e2 (15:66e2) inc hl pop bc dec c - jr nz, .asm_56715 ; 0x56725 $ee - hlCoord 10, 4 + jr nz, .asm_56715 + coord hl, 10, 4 ld de, wPlayerName call PlaceString - callba Func_44dd + callba DrawPlayerCharacter + +; Move the player 33 pixels right and set the priority bit so he appears +; behind the background layer. ld hl, wOAMBuffer + $01 - ld bc, $8028 -.asm_5673e - ld a, [hl] - add $21 + lb bc, $80, $28 +.adjustPlayerGfxLoop + ld a, [hl] ; X + add 33 ld [hli], a inc hl ld a, b - ld [hli], a + ld [hli], a ; attributes inc hl dec c - jr nz, .asm_5673e ; 0x56747 $f5 + jr nz, .adjustPlayerGfxLoop + call EnableLCD callba LoadTrainerInfoTextBoxTiles - ld b, $8 - call GoPAL_SET + ld b, SET_PAL_GENERIC + call RunPaletteCommand call Delay3 call GBPalNormal ld a, $90 - ld [$ff48], a + ld [rOBP0], a call WaitForTextScrollButtonPress ld hl, wd730 res 6, [hl] @@ -65,27 +69,29 @@ DisplayDiploma: ; 566e2 (15:66e2) call Delay3 jp GBPalNormal -Func_56777: ; 56777 (15:6777) +UnusedPlayerNameLengthFunc: +; Unused function that does a calculation involving the length of the player's +; name. ld hl, wPlayerName ld bc, $ff00 -.asm_5677d +.loop ld a, [hli] - cp $50 + cp "@" ret z dec c - jr .asm_5677d ; 0x56782 $f9 + jr .loop -DiplomaTextPointersAndCoords: ; 56784 (15:6784) +DiplomaTextPointersAndCoords: dw DiplomaText - dw wTileMap + $2d + dwCoord 5, 2 dw DiplomaPlayer - dw wTileMap + $53 + dwCoord 3, 4 dw DiplomaEmptyText - dw wTileMap + $5f + dwCoord 15, 4 dw DiplomaCongrats - dw wTileMap + $7a + dwCoord 2, 6 dw DiplomaGameFreak - dw wTileMap + $149 + dwCoord 9, 16 DiplomaText: db $70,"Diploma",$70,"@" diff --git a/engine/menu/draw_badges.asm b/engine/menu/draw_badges.asm new file mode 100644 index 00000000..9e6262a0 --- /dev/null +++ b/engine/menu/draw_badges.asm @@ -0,0 +1,120 @@ +DrawBadges: +; Draw 4x2 gym leader faces, with the faces replaced by +; badges if they are owned. Used in the player status screen. + +; In Japanese versions, names are displayed above faces. +; Instead of removing relevant code, the name graphics were erased. + +; Tile ids for face/badge graphics. + ld de, wBadgeOrFaceTiles + ld hl, .FaceBadgeTiles + ld bc, 8 + call CopyData + +; Booleans for each badge. + ld hl, wTempObtainedBadgesBooleans + ld bc, 8 + xor a + call FillMemory + +; Alter these based on owned badges. + ld de, wTempObtainedBadgesBooleans + ld hl, wBadgeOrFaceTiles + ld a, [wObtainedBadges] + ld b, a + ld c, 8 +.CheckBadge + srl b + jr nc, .NextBadge + ld a, [hl] + add 4 ; Badge graphics are after each face + ld [hl], a + ld a, 1 + ld [de], a +.NextBadge + inc hl + inc de + dec c + jr nz, .CheckBadge + +; Draw two rows of badges. + ld hl, wBadgeNumberTile + ld a, $d8 ; [1] + ld [hli], a + ld [hl], $60 ; First name + + coord hl, 2, 11 + ld de, wTempObtainedBadgesBooleans + call .DrawBadgeRow + + coord hl, 2, 14 + ld de, wTempObtainedBadgesBooleans + 4 +; call .DrawBadgeRow +; ret + +.DrawBadgeRow +; Draw 4 badges. + + ld c, 4 +.DrawBadge + push de + push hl + +; Badge no. + ld a, [wBadgeNumberTile] + ld [hli], a + inc a + ld [wBadgeNumberTile], a + +; Names aren't printed if the badge is owned. + ld a, [de] + and a + ld a, [wBadgeNameTile] + jr nz, .SkipName + call .PlaceTiles + jr .PlaceBadge + +.SkipName + inc a + inc a + inc hl + +.PlaceBadge + ld [wBadgeNameTile], a + ld de, SCREEN_WIDTH - 1 + add hl, de + ld a, [wBadgeOrFaceTiles] + call .PlaceTiles + add hl, de + call .PlaceTiles + +; Shift badge array back one byte. + push bc + ld hl, wBadgeOrFaceTiles + 1 + ld de, wBadgeOrFaceTiles + ld bc, 8 + call CopyData + pop bc + + pop hl + ld de, 4 + add hl, de + + pop de + inc de + dec c + jr nz, .DrawBadge + ret + +.PlaceTiles + ld [hli], a + inc a + ld [hl], a + inc a + ret + +.FaceBadgeTiles + db $20, $28, $30, $38, $40, $48, $50, $58 + +GymLeaderFaceAndBadgeTileGraphics: + INCBIN "gfx/badges.2bpp" diff --git a/engine/menu/draw_start_menu.asm b/engine/menu/draw_start_menu.asm new file mode 100644 index 00000000..4df9de27 --- /dev/null +++ b/engine/menu/draw_start_menu.asm @@ -0,0 +1,89 @@ +; function that displays the start menu +DrawStartMenu: + CheckEvent EVENT_GOT_POKEDEX +; menu with pokedex + coord hl, 10, 0 + ld b,$0e + ld c,$08 + jr nz,.drawTextBoxBorder +; shorter menu if the player doesn't have the pokedex + coord hl, 10, 0 + ld b,$0c + ld c,$08 +.drawTextBoxBorder + call TextBoxBorder + ld a,D_DOWN | D_UP | START | B_BUTTON | A_BUTTON + ld [wMenuWatchedKeys],a + ld a,$02 + ld [wTopMenuItemY],a ; Y position of first menu choice + ld a,$0b + ld [wTopMenuItemX],a ; X position of first menu choice + ld a,[wBattleAndStartSavedMenuItem] ; remembered menu selection from last time + ld [wCurrentMenuItem],a + ld [wLastMenuItem],a + xor a + ld [wMenuWatchMovingOutOfBounds],a + ld hl,wd730 + set 6,[hl] ; no pauses between printing each letter + coord hl, 12, 2 + CheckEvent EVENT_GOT_POKEDEX +; case for not having pokdex + ld a,$06 + jr z,.storeMenuItemCount +; case for having pokedex + ld de,StartMenuPokedexText + call PrintStartMenuItem + ld a,$07 +.storeMenuItemCount + ld [wMaxMenuItem],a ; number of menu items + ld de,StartMenuPokemonText + call PrintStartMenuItem + ld de,StartMenuItemText + call PrintStartMenuItem + ld de,wPlayerName ; player's name + call PrintStartMenuItem + ld a,[wd72e] + bit 6,a ; is the player using the link feature? +; case for not using link feature + ld de,StartMenuSaveText + jr z,.printSaveOrResetText +; case for using link feature + ld de,StartMenuResetText +.printSaveOrResetText + call PrintStartMenuItem + ld de,StartMenuOptionText + call PrintStartMenuItem + ld de,StartMenuExitText + call PlaceString + ld hl,wd730 + res 6,[hl] ; turn pauses between printing letters back on + ret + +StartMenuPokedexText: + db "POKéDEX@" + +StartMenuPokemonText: + db "POKéMON@" + +StartMenuItemText: + db "ITEM@" + +StartMenuSaveText: + db "SAVE@" + +StartMenuResetText: + db "RESET@" + +StartMenuExitText: + db "EXIT@" + +StartMenuOptionText: + db "OPTION@" + +PrintStartMenuItem: + push hl + call PlaceString + pop hl + ld de,SCREEN_WIDTH * 2 + add hl,de + ret diff --git a/engine/menu/league_pc.asm b/engine/menu/league_pc.asm index a6dd7021..170c0ef3 100755 --- a/engine/menu/league_pc.asm +++ b/engine/menu/league_pc.asm @@ -1,4 +1,4 @@ -PKMNLeaguePC: ; 0x7657e +PKMNLeaguePC: ld hl, AccessedHoFPCText call PrintText ld hl, wd730 @@ -10,33 +10,35 @@ PKMNLeaguePC: ; 0x7657e push af xor a ld [hTilesetType], a - ld [W_SPRITEFLIPPED], a + ld [wSpriteFlipped], a ld [wUpdateSpritesEnabled], a - ld [wTrainerScreenX], a - ld [wcd42], a - ld a, [wd5a2] + ld [wHoFTeamIndex2], a + ld [wHoFTeamNo], a + ld a, [wNumHoFTeams] ld b, a - cp NUM_HOF_TEAMS + 1 - jr c, .first - ld b, NUM_HOF_TEAMS + cp HOF_TEAM_CAPACITY + 1 + jr c, .loop +; If the total number of hall of fame teams is greater than the storage +; capacity, then calculate the number of the first team that is still recorded. + ld b, HOF_TEAM_CAPACITY sub b - ld [wcd42], a -.first - ld hl, wcd42 + ld [wHoFTeamNo], a +.loop + ld hl, wHoFTeamNo inc [hl] push bc - ld a, [wTrainerScreenX] - ld [wWhichTrade], a + ld a, [wHoFTeamIndex2] + ld [wHoFTeamIndex], a callba LoadHallOfFameTeams - call Func_765e5 + call LeaguePCShowTeam pop bc - jr c, .second - ld hl, wTrainerScreenX + jr c, .doneShowingTeams + ld hl, wHoFTeamIndex2 inc [hl] ld a, [hl] cp b - jr nz, .first -.second + jr nz, .loop +.doneShowingTeams pop af ld [hTilesetType], a pop af @@ -45,14 +47,14 @@ PKMNLeaguePC: ; 0x7657e res 6, [hl] call GBPalWhiteOutWithDelay3 call ClearScreen - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand jp GBPalNormal -Func_765e5: ; 765e5 (1d:65e5) +LeaguePCShowTeam: ld c, PARTY_LENGTH .loop push bc - call Func_76610 + call LeaguePCShowMon call WaitForTextScrollButtonPress ld a, [hJoyHeld] bit 1, a @@ -75,46 +77,44 @@ Func_765e5: ; 765e5 (1d:65e5) scf ret -Func_76610: ; 76610 (1d:6610) +LeaguePCShowMon: call GBPalWhiteOutWithDelay3 call ClearScreen ld hl, wHallOfFame ld a, [hli] - ld [wWhichTrade], a + ld [wHoFMonSpecies], a ld [wcf91], a ld [wd0b5], a ld [wBattleMonSpecies2], a - ld [wcf1d], a + ld [wWholeScreenPaletteMonSpecies], a ld a, [hli] - ld [wTrainerFacingDirection], a + ld [wHoFMonLevel], a ld de, wcd6d - ld bc, $000B + ld bc, NAME_LENGTH call CopyData - ld b, $0B + ld b, SET_PAL_POKEMON_WHOLE_SCREEN ld c, 0 - call GoPAL_SET - hlCoord 12, 5 + call RunPaletteCommand + coord hl, 12, 5 call GetMonHeader call LoadFrontSpriteByMonIndex call GBPalNormal - hlCoord 0, 13 + coord hl, 0, 13 ld b, 2 ld c, $12 call TextBoxBorder - hlCoord 1, 15 + coord hl, 1, 15 ld de, HallOfFameNoText call PlaceString - hlCoord 16, 15 - ld de, wcd42 - ld bc, $0103 + coord hl, 16, 15 + ld de, wHoFTeamNo + lb bc, 1, 3 call PrintNumber - ld b, BANK(Func_702f0) - ld hl, Func_702f0 - jp Bankswitch + jpba HoFDisplayMonInfo -HallOfFameNoText: ; 76670 (1d:6670) +HallOfFameNoText: db "HALL OF FAME No @" -AccessedHoFPCText: ; 76683 (1d:6683) +AccessedHoFPCText: TX_FAR _AccessedHoFPCText db "@" diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index 756c7755..cd4198b6 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -1,58 +1,58 @@ -MainMenu: ; 5af2 (1:5af2) +MainMenu: ; Check save file - call Func_5bff + call InitOptions xor a - ld [wd08a],a + ld [wOptionsInitialized],a inc a - ld [wd088],a - call Func_609e - jr nc,.next0 + ld [wSaveFileStatus],a + call CheckForPlayerNameInSRAM + jr nc,.mainMenuLoop - ; Predef 52 loads the save from SRAM to RAM predef LoadSAV -.next0 +.mainMenuLoop ld c,20 call DelayFrames xor a ; LINK_STATE_NONE ld [wLinkState],a - ld hl,wcc2b + ld hl,wPartyAndBillsPCSavedMenuItem ld [hli],a ld [hli],a ld [hli],a ld [hl],a - ld [W_ANIMATIONID],a + ld [wDefaultMap],a ld hl,wd72e res 6,[hl] call ClearScreen - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call LoadTextBoxTilePatterns call LoadFontTilePatterns ld hl,wd730 set 6,[hl] - ld a,[wd088] + ld a,[wSaveFileStatus] cp a,1 - jr z,.next1 - hlCoord 0, 0 + jr z,.noSaveFile +; there's a save file + coord hl, 0, 0 ld b,6 ld c,13 call TextBoxBorder - hlCoord 2, 2 + coord hl, 2, 2 ld de,ContinueText call PlaceString jr .next2 -.next1 - hlCoord 0, 0 +.noSaveFile + coord hl, 0, 0 ld b,4 ld c,13 call TextBoxBorder - hlCoord 2, 2 + coord hl, 2, 2 ld de,NewGameText call PlaceString .next2 ld hl,wd730 res 6,[hl] - call UpdateSprites ; OAM? + call UpdateSprites xor a ld [wCurrentMenuItem],a ld [wLastMenuItem],a @@ -61,36 +61,38 @@ MainMenu: ; 5af2 (1:5af2) ld [wTopMenuItemX],a inc a ld [wTopMenuItemY],a - ld a,$B + ld a,A_BUTTON | B_BUTTON | START ld [wMenuWatchedKeys],a - ld a,[wd088] + ld a,[wSaveFileStatus] ld [wMaxMenuItem],a call HandleMenuInput - bit 1,a - jp nz,LoadTitlescreenGraphics ; load title screen (gfx and arrangement) + bit 1,a ; pressed B? + jp nz,DisplayTitleScreen ; if so, go back to the title screen ld c,20 call DelayFrames ld a,[wCurrentMenuItem] ld b,a - ld a,[wd088] + ld a,[wSaveFileStatus] cp a,2 - jp z,.next3 - inc b ; adjust MenuArrow_Counter -.next3 + jp z,.skipInc +; If there's no save file, increment the current menu item so that the numbers +; are the same whether or not there's a save file. + inc b +.skipInc ld a,b and a - jr z,.next4 ; if press_A on Continue + jr z,.choseContinue cp a,1 - jp z,Func_5d52 ; if press_A on NewGame - call DisplayOptionMenu ; if press_a on Options + jp z,StartNewGame + call DisplayOptionMenu ld a,1 - ld [wd08a],a - jp .next0 -.next4 - call ContinueGame - ld hl,wd126 + ld [wOptionsInitialized],a + jp .mainMenuLoop +.choseContinue + call DisplayContinueGameInfo + ld hl,wCurrentMapScriptFlags set 5,[hl] -.next6 +.inputLoop xor a ld [hJoyPressed],a ld [hJoyReleased],a @@ -98,21 +100,21 @@ MainMenu: ; 5af2 (1:5af2) call Joypad ld a,[hJoyHeld] bit 0,a - jr nz,.next5 + jr nz,.pressedA bit 1,a - jp nz,.next0 - jr .next6 -.next5 + jp nz,.mainMenuLoop ; pressed B + jr .inputLoop +.pressedA call GBPalWhiteOutWithDelay3 call ClearScreen - ld a,4 - ld [wd52a],a + ld a,PLAYER_DIR_DOWN + ld [wPlayerDirection],a ld c,10 call DelayFrames - ld a,[wd5a2] + ld a,[wNumHoFTeams] and a jp z,SpecialEnterMap - ld a,[W_CURMAP] ; map ID + ld a,[wCurMap] ; map ID cp a,HALL_OF_FAME jp nz,SpecialEnterMap xor a @@ -121,16 +123,17 @@ MainMenu: ; 5af2 (1:5af2) set 2,[hl] ; fly warp or dungeon warp call SpecialWarpIn jp SpecialEnterMap -Func_5bff: ; 5bff (1:5bff) - ld a,1 - ld [wd358],a - ld a,3 - ld [W_OPTIONS],a + +InitOptions: + ld a,1 ; no delay + ld [wLetterPrintingDelayFlags],a + ld a,3 ; medium speed + ld [wOptions],a ret -LinkMenu: ; 5c0a (1:5c0a) +LinkMenu: xor a - ld [wd358], a + ld [wLetterPrintingDelayFlags], a ld hl, wd72e set 6, [hl] ld hl, TextTerminator_6b20 @@ -138,16 +141,16 @@ LinkMenu: ; 5c0a (1:5c0a) call SaveScreenTilesToBuffer1 ld hl, WhereWouldYouLikeText call PrintText - hlCoord 5, 5 + coord hl, 5, 5 ld b, $6 ld c, $d call TextBoxBorder call UpdateSprites - hlCoord 7, 7 - ld de, TradeCenterText + coord hl, 7, 7 + ld de, CableClubOptionsText call PlaceString xor a - ld [wcd37], a + ld [wUnusedCD37], a ld [wd72d], a ld hl, wTopMenuItemY ld a, $7 @@ -160,7 +163,8 @@ LinkMenu: ; 5c0a (1:5c0a) ld a, $2 ld [hli], a inc a - ld [hli], a + ; ld a, A_BUTTON | B_BUTTON + ld [hli], a ; wMenuWatchedKeys xor a ld [hl], a .waitForInputLoop @@ -208,7 +212,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 @@ -254,28 +258,28 @@ LinkMenu: ; 5c0a (1:5c0a) ld [wWalkBikeSurfState], a ; start walking ld a, [wCurrentMenuItem] and a - ld a, TRADE_CENTER + ld a, COLOSSEUM jr nz, .next - ld a, BATTLE_CENTER + ld a, TRADE_CENTER .next 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 a, [wDefaultMap] ld [wDestinationMap], a call SpecialWarpIn - ld c, $14 + ld c, 20 call DelayFrames xor a ld [wMenuJoypadPollCount], a ld [wSerialExchangeNybbleSendData], a inc a ; LINK_STATE_IN_CABLE_CLUB ld [wLinkState], a - ld [wcc47], a + ld [wEnteringCableClub], a jr SpecialEnterMap .choseCancel xor a @@ -288,27 +292,27 @@ LinkMenu: ; 5c0a (1:5c0a) res 6, [hl] ret -WhereWouldYouLikeText: ; 5d43 (1:5d43) +WhereWouldYouLikeText: TX_FAR _WhereWouldYouLikeText db "@" -PleaseWaitText: ; 5d48 (1:5d48) +PleaseWaitText: TX_FAR _PleaseWaitText db "@" -LinkCanceledText: ; 5d4d (1:5d4d) +LinkCanceledText: TX_FAR _LinkCanceledText db "@" -Func_5d52: ; 5d52 (1:5d52) +StartNewGame: 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 -SpecialEnterMap: ; 5d5f (1:5d5f) +SpecialEnterMap: xor a ld [hJoyPressed], a ld [hJoyHeld], a @@ -319,144 +323,144 @@ SpecialEnterMap: ; 5d5f (1:5d5f) call ResetPlayerSpriteData ld c, 20 call DelayFrames - ld a, [wcc47] + ld a, [wEnteringCableClub] and a ret nz jp EnterMap -ContinueText: ; 5d7e (1:5d7e) +ContinueText: db "CONTINUE", $4e -NewGameText: ; 5d87 (1:5d87) - db "NEW GAME", $4e - db "OPTION@" +NewGameText: + db "NEW GAME" + next "OPTION@" -TradeCenterText: ; 5d97 (1:5d97) - db "TRADE CENTER", $4e - db "COLOSSEUM", $4e - db "CANCEL@" +CableClubOptionsText: + db "TRADE CENTER" + next "COLOSSEUM" + next "CANCEL@" -ContinueGame: ; 5db5 (1:5db5) +DisplayContinueGameInfo: xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - hlCoord 4, 7 - ld b, $8 - ld c, $e + ld [H_AUTOBGTRANSFERENABLED], a + coord hl, 4, 7 + ld b, 8 + ld c, 14 call TextBoxBorder - hlCoord 5, 9 + coord hl, 5, 9 ld de, SaveScreenInfoText call PlaceString - hlCoord 12, 9 - ld de, wPlayerName ; wd158 + coord hl, 12, 9 + ld de, wPlayerName call PlaceString - hlCoord 17, 11 - call Func_5e2f - hlCoord 16, 13 - call Func_5e42 - hlCoord 13, 15 - call Func_5e55 - ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld c, $1e + coord hl, 17, 11 + call PrintNumBadges + coord hl, 16, 13 + call PrintNumOwnedMons + coord hl, 13, 15 + call PrintPlayTime + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a + ld c, 30 jp DelayFrames -PrintSaveScreenText: ; 5def (1:5def) +PrintSaveScreenText: xor a ld [H_AUTOBGTRANSFERENABLED], a - ld hl, wTileMap + $4 + coord hl, 4, 0 ld b, $8 ld c, $e call TextBoxBorder call LoadTextBoxTilePatterns call UpdateSprites - ld hl, wTileMap + $2d + coord hl, 5, 2 ld de, SaveScreenInfoText call PlaceString - ld hl, wTileMap + $34 + coord hl, 12, 2 ld de, wPlayerName call PlaceString - ld hl, wTileMap + $61 - call Func_5e2f - ld hl, wTileMap + $88 - call Func_5e42 - ld hl, wTileMap + $ad - call Func_5e55 + coord hl, 17, 4 + call PrintNumBadges + coord hl, 16, 6 + call PrintNumOwnedMons + coord hl, 13, 8 + call PrintPlayTime ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a - ld c, $1e + ld c, 30 jp DelayFrames -Func_5e2f: ; 5e2f (1:5e2f) +PrintNumBadges: push hl - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges ld b, $1 call CountSetBits pop hl - ld de, wd11e - ld bc, $102 + ld de, wNumSetBits + lb bc, 1, 2 jp PrintNumber -Func_5e42: ; 5e42 (1:5e42) +PrintNumOwnedMons: push hl - ld hl, wPokedexOwned ; wPokedexOwned + ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits pop hl - ld de, wd11e - ld bc, $103 + ld de, wNumSetBits + lb bc, 1, 3 jp PrintNumber -Func_5e55: ; 5e55 (1:5e55) - ld de, W_PLAYTIMEHOURS + 1 - ld bc, $103 +PrintPlayTime: + ld de, wPlayTimeHours + lb bc, 1, 3 call PrintNumber ld [hl], $6d inc hl - ld de, W_PLAYTIMEMINUTES + 1 - ld bc, $8102 + ld de, wPlayTimeMinutes + lb bc, LEADING_ZEROES | 1, 2 jp PrintNumber -SaveScreenInfoText: ; 5e6a (1:5e6a) +SaveScreenInfoText: db "PLAYER" next "BADGES " next "#DEX " next "TIME@" -DisplayOptionMenu: ; 5e8a (1:5e8a) - hlCoord 0, 0 +DisplayOptionMenu: + coord hl, 0, 0 ld b,3 ld c,18 call TextBoxBorder - hlCoord 0, 5 + coord hl, 0, 5 ld b,3 ld c,18 call TextBoxBorder - hlCoord 0, 10 + coord hl, 0, 10 ld b,3 ld c,18 call TextBoxBorder - hlCoord 1, 1 + coord hl, 1, 1 ld de,TextSpeedOptionText call PlaceString - hlCoord 1, 6 + coord hl, 1, 6 ld de,BattleAnimationOptionText call PlaceString - hlCoord 1, 11 + coord hl, 1, 11 ld de,BattleStyleOptionText call PlaceString - hlCoord 2, 16 + coord hl, 2, 16 ld de,OptionMenuCancelText call PlaceString xor a ld [wCurrentMenuItem],a ld [wLastMenuItem],a inc a - ld [wd358],a - ld [wTrainerScreenY],a + ld [wLetterPrintingDelayFlags],a + ld [wUnusedCD40],a ld a,3 ; text speed cursor Y coordinate ld [wTopMenuItemY],a call SetCursorPositionsFromOptions - ld a,[wWhichTrade] ; text speed cursor X coordinate + ld a,[wOptionsTextSpeedCursorX] ; text speed cursor X coordinate ld [wTopMenuItemX],a ld a,$01 ld [H_AUTOBGTRANSFERENABLED],a ; enable auto background transfer @@ -468,7 +472,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a) call JoypadLowSensitivity ld a,[hJoy5] ld b,a - and a,%11111011 ; any key besides select pressed? + and a,A_BUTTON | B_BUTTON | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ; any key besides select pressed? jr z,.getJoypadStateLoop bit 1,b ; B button pressed? jr nz,.exitMenu @@ -480,8 +484,8 @@ DisplayOptionMenu: ; 5e8a (1:5e8a) cp a,16 ; is the cursor on Cancel? jr nz,.loop .exitMenu - ld a,(SFX_02_40 - SFX_Headers_02) / 3 - call PlaySound ; play sound + ld a,SFX_PRESS_AB + call PlaySound ret .eraseOldMenuCursor ld [wTopMenuItemX],a @@ -506,7 +510,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a) .downPressed cp a,16 ld b,-13 - ld hl,wWhichTrade + ld hl,wOptionsTextSpeedCursorX jr z,.updateMenuVariables ld b,5 cp a,3 @@ -521,7 +525,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a) .upPressed cp a,8 ld b,-5 - ld hl,wWhichTrade + ld hl,wOptionsTextSpeedCursorX jr z,.updateMenuVariables cp a,13 inc hl @@ -540,17 +544,17 @@ DisplayOptionMenu: ; 5e8a (1:5e8a) call PlaceUnfilledArrowMenuCursor jp .loop .cursorInBattleAnimation - ld a,[wTrainerEngageDistance] ; battle animation cursor X coordinate + ld a,[wOptionsBattleAnimCursorX] ; battle animation cursor X coordinate xor a,$0b ; toggle between 1 and 10 - ld [wTrainerEngageDistance],a + ld [wOptionsBattleAnimCursorX],a jp .eraseOldMenuCursor .cursorInBattleStyle - ld a,[wTrainerFacingDirection] ; battle style cursor X coordinate + ld a,[wOptionsBattleStyleCursorX] ; battle style cursor X coordinate xor a,$0b ; toggle between 1 and 10 - ld [wTrainerFacingDirection],a + ld [wOptionsBattleStyleCursorX],a jp .eraseOldMenuCursor .pressedLeftInTextSpeed - ld a,[wWhichTrade] ; text speed cursor X coordinate + ld a,[wOptionsTextSpeedCursorX] ; text speed cursor X coordinate cp a,1 jr z,.updateTextSpeedXCoord cp a,7 @@ -561,7 +565,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a) sub a,7 jr .updateTextSpeedXCoord .pressedRightInTextSpeed - ld a,[wWhichTrade] ; text speed cursor X coordinate + ld a,[wOptionsTextSpeedCursorX] ; text speed cursor X coordinate cp a,14 jr z,.updateTextSpeedXCoord cp a,7 @@ -571,28 +575,28 @@ DisplayOptionMenu: ; 5e8a (1:5e8a) .fromFastToMedium add a,6 .updateTextSpeedXCoord - ld [wWhichTrade],a ; text speed cursor X coordinate + ld [wOptionsTextSpeedCursorX],a ; text speed cursor X coordinate jp .eraseOldMenuCursor -TextSpeedOptionText: ; 5fc0 (1:5fc0) +TextSpeedOptionText: db "TEXT SPEED" next " FAST MEDIUM SLOW@" -BattleAnimationOptionText: ; 5fde (1:5fde) +BattleAnimationOptionText: db "BATTLE ANIMATION" next " ON OFF@" -BattleStyleOptionText: ; 5ffd (1:5ffd) +BattleStyleOptionText: db "BATTLE STYLE" next " SHIFT SET@" -OptionMenuCancelText: ; 6018 (1:6018) +OptionMenuCancelText: db "CANCEL@" ; sets the options variable according to the current placement of the menu cursors in the options menu -SetOptionsFromCursorPositions: ; 601f (1:601f) +SetOptionsFromCursorPositions: ld hl,TextSpeedOptionData - ld a,[wWhichTrade] ; text speed cursor X coordinate + ld a,[wOptionsTextSpeedCursorX] ; text speed cursor X coordinate ld c,a .loop ld a,[hli] @@ -603,7 +607,7 @@ SetOptionsFromCursorPositions: ; 601f (1:601f) .textSpeedMatchFound ld a,[hl] ld d,a - ld a,[wTrainerEngageDistance] ; battle animation cursor X coordinate + ld a,[wOptionsBattleAnimCursorX] ; battle animation cursor X coordinate dec a jr z,.battleAnimationOn .battleAnimationOff @@ -612,7 +616,7 @@ SetOptionsFromCursorPositions: ; 601f (1:601f) .battleAnimationOn res 7,d .checkBattleStyle - ld a,[wTrainerFacingDirection] ; battle style cursor X coordinate + ld a,[wOptionsBattleStyleCursorX] ; battle style cursor X coordinate dec a jr z,.battleStyleShift .battleStyleSet @@ -622,13 +626,13 @@ SetOptionsFromCursorPositions: ; 601f (1:601f) res 6,d .storeOptions ld a,d - ld [W_OPTIONS],a + ld [wOptions],a ret ; reads the options variable and places menu cursors in the correct positions within the options menu -SetCursorPositionsFromOptions: ; 604c (1:604c) +SetCursorPositionsFromOptions: ld hl,TextSpeedOptionData + 1 - ld a,[W_OPTIONS] + ld a,[wOptions] ld c,a and a,$3f push bc @@ -637,27 +641,27 @@ SetCursorPositionsFromOptions: ; 604c (1:604c) pop bc dec hl ld a,[hl] - ld [wWhichTrade],a ; text speed cursor X coordinate - hlCoord 0, 3 + ld [wOptionsTextSpeedCursorX],a ; text speed cursor X coordinate + coord hl, 0, 3 call .placeUnfilledRightArrow sla c ld a,1 ; On jr nc,.storeBattleAnimationCursorX ld a,10 ; Off .storeBattleAnimationCursorX - ld [wTrainerEngageDistance],a ; battle animation cursor X coordinate - hlCoord 0, 8 + ld [wOptionsBattleAnimCursorX],a ; battle animation cursor X coordinate + coord hl, 0, 8 call .placeUnfilledRightArrow sla c ld a,1 jr nc,.storeBattleStyleCursorX ld a,10 .storeBattleStyleCursorX - ld [wTrainerFacingDirection],a ; battle style cursor X coordinate - hlCoord 0, 13 + ld [wOptionsBattleStyleCursorX],a ; battle style cursor X coordinate + coord hl, 0, 13 call .placeUnfilledRightArrow ; cursor in front of Cancel - hlCoord 0, 16 + coord hl, 0, 16 ld a,1 .placeUnfilledRightArrow ld e,a @@ -670,35 +674,39 @@ SetCursorPositionsFromOptions: ; 604c (1:604c) ; Format: ; 00: X coordinate of menu cursor ; 01: delay after printing a letter (in frames) -TextSpeedOptionData: ; 6096 (1:6096) +TextSpeedOptionData: db 14,5 ; Slow db 7,3 ; Medium db 1,1 ; Fast db 7 ; default X coordinate (Medium) db $ff ; terminator -Func_609e: ; 609e (1:609e) - ld a, $a - ld [$0], a +CheckForPlayerNameInSRAM: +; Check if the player name data in SRAM has a string terminator character +; (indicating that a name may have been saved there) and return whether it does +; in carry. + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a ld a, $1 - ld [$6000], a - ld [$4000], a - ld b, $b - ld hl, $a598 -.asm_60b0 + ld [MBC1SRamBankingMode], a + ld [MBC1SRamBank], a + ld b, NAME_LENGTH + ld hl, sPlayerName +.loop ld a, [hli] - cp $50 - jr z, .asm_60c1 + cp "@" + jr z, .found dec b - jr nz, .asm_60b0 + jr nz, .loop +; not found xor a - ld [$0], a - ld [$6000], a + ld [MBC1SRamEnable], a + ld [MBC1SRamBankingMode], a and a ret -.asm_60c1 +.found xor a - ld [$0], a - ld [$6000], a + ld [MBC1SRamEnable], a + ld [MBC1SRamBankingMode], a scf ret diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index df862d69..2628da48 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -1,131 +1,131 @@ -AskName: ; 64eb (1:64eb) +AskName: call SaveScreenTilesToBuffer1 call GetPredefRegisters push hl - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] dec a - ld hl, wTileMap - ld b, $4 - ld c, $b - call z, ClearScreenArea ; only if in wild batle + coord hl, 0, 0 + ld b, 4 + ld c, 11 + call z, ClearScreenArea ; only if in wild battle ld a, [wcf91] ld [wd11e], a call GetMonName ld hl, DoYouWantToNicknameText call PrintText - hlCoord 14, 7 - ld bc, $80f + coord hl, 14, 7 + lb bc, 8, 15 ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID pop hl ld a, [wCurrentMenuItem] and a - jr nz, .asm_654c + jr nz, .declinedNickname ld a, [wUpdateSpritesEnabled] push af xor a ld [wUpdateSpritesEnabled], a push hl - ld a, $2 - ld [wd07d], a + ld a, NAME_MON_SCREEN + ld [wNamingScreenType], a call DisplayNamingScreen - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] and a - jr nz, .asm_653e + jr nz, .inBattle call ReloadMapSpriteTilePatterns -.asm_653e +.inBattle call LoadScreenTilesFromBuffer1 pop hl pop af ld [wUpdateSpritesEnabled], a ld a, [wcf4b] - cp $50 + cp "@" ret nz -.asm_654c +.declinedNickname ld d, h ld e, l ld hl, wcd6d - ld bc, $000b + ld bc, NAME_LENGTH jp CopyData -DoYouWantToNicknameText: ; 0x6557 +DoYouWantToNicknameText: TX_FAR _DoYouWantToNicknameText db "@" -Func_655c: ; 655c (1:655c) - ld hl, wHPBarMaxHP +DisplayNameRaterScreen: + ld hl, wBuffer xor a ld [wUpdateSpritesEnabled], a - ld a, $2 - ld [wd07d], a + ld a, NAME_MON_SCREEN + ld [wNamingScreenType], a call DisplayNamingScreen call GBPalWhiteOutWithDelay3 call RestoreScreenTilesAndReloadTilePatterns call LoadGBPal ld a, [wcf4b] - cp $50 - jr z, .asm_6594 + cp "@" + jr z, .playerCancelled ld hl, wPartyMonNicks - ld bc, $b + ld bc, NAME_LENGTH ld a, [wWhichPokemon] call AddNTimes ld e, l ld d, h - ld hl, wHPBarMaxHP - ld bc, $b + ld hl, wBuffer + ld bc, NAME_LENGTH call CopyData and a ret -.asm_6594 +.playerCancelled scf ret -DisplayNamingScreen: ; 6596 (1:6596) +DisplayNamingScreen: push hl ld hl, wd730 set 6, [hl] call GBPalWhiteOutWithDelay3 call ClearScreen call UpdateSprites - ld b, $8 - call GoPAL_SET + ld b, SET_PAL_GENERIC + call RunPaletteCommand call LoadHpBarAndStatusTilePatterns call LoadEDTile callba LoadMonPartySpriteGfx - hlCoord 0, 4 - ld b, $9 - ld c, $12 + coord hl, 0, 4 + ld b, 9 + ld c, 18 call TextBoxBorder call PrintNamingText - ld a, $3 + ld a, 3 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a ld [wLastMenuItem], a ld [wCurrentMenuItem], a ld a, $ff ld [wMenuWatchedKeys], a - ld a, $7 + ld a, 7 ld [wMaxMenuItem], a - ld a, $50 + ld a, "@" ld [wcf4b], a xor a - ld hl, wHPBarMaxHP + 1 + ld hl, wNamingScreenSubmitName ld [hli], a ld [hli], a - ld [wPartyMonAnimCounter], a -.asm_65ed + ld [wAnimCounter], a +.selectReturnPoint call PrintAlphabet call GBPalNormal -.asm_65f3 - ld a, [wHPBarMaxHP + 1] +.ABStartReturnPoint + ld a, [wNamingScreenSubmitName] and a - jr nz, .asm_662d - call Func_680e -.asm_65fc + jr nz, .submitNickname + call PrintNicknameAndUnderscores +.dPadReturnPoint call PlaceMenuCursor -.asm_65ff +.inputLoop ld a, [wCurrentMenuItem] push af callba AnimatePartyMon_ForceSpeed1 @@ -134,17 +134,17 @@ DisplayNamingScreen: ; 6596 (1:6596) call JoypadLowSensitivity ld a, [hJoyPressed] and a - jr z, .asm_65ff - ld hl, .unknownPointerTable_665e -.asm_661a + jr z, .inputLoop + ld hl, .namingScreenButtonFunctions +.checkForPressedButton sla a - jr c, .asm_6624 + jr c, .foundPressedButton inc hl inc hl inc hl inc hl - jr .asm_661a -.asm_6624 + jr .checkForPressedButton +.foundPressedButton ld a, [hli] ld e, a ld a, [hli] @@ -153,272 +153,279 @@ DisplayNamingScreen: ; 6596 (1:6596) ld h, [hl] ld l, a push de - jp [hl] -.asm_662d + jp hl + +.submitNickname pop de ld hl, wcf4b - ld bc, $b + ld bc, NAME_LENGTH call CopyData call GBPalWhiteOutWithDelay3 call ClearScreen call ClearSprites - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call GBPalNormal xor a - ld [W_SUBANIMTRANSFORM], a + ld [wAnimCounter], a ld hl, wd730 res 6, [hl] - ld a, [W_ISINBATTLE] + ld a, [wIsInBattle] and a jp z, LoadTextBoxTilePatterns - ld hl, LoadHudTilePatterns - ld b, BANK(LoadHudTilePatterns) - jp Bankswitch + jpab LoadHudTilePatterns -.unknownPointerTable_665e: ; 665e (1:665e) - dw .asm_65fc - dw .asm_673e - dw .asm_65fc - dw .asm_672c - dw .asm_65fc - dw .asm_6718 - dw .asm_65fc - dw .asm_6702 - dw .asm_65f3 - dw .asm_668c - dw .asm_65ed - dw .asm_6683 - dw .asm_65f3 - dw .deleteLetter - dw .asm_65f3 - dw .asm_6692 +.namingScreenButtonFunctions + dw .dPadReturnPoint + dw .pressedDown + dw .dPadReturnPoint + dw .pressedUp + dw .dPadReturnPoint + dw .pressedLeft + dw .dPadReturnPoint + dw .pressedRight + dw .ABStartReturnPoint + dw .pressedStart + dw .selectReturnPoint + dw .pressedSelect + dw .ABStartReturnPoint + dw .pressedB + dw .ABStartReturnPoint + dw .pressedA -.asm_667e +.pressedA_changedCase pop de - ld de, .asm_65ed ; $65ed + ld de, .selectReturnPoint push de -.asm_6683 - ld a, [wHPBarOldHP] +.pressedSelect + ld a, [wAlphabetCase] xor $1 - ld [wHPBarOldHP], a + ld [wAlphabetCase], a ret -.asm_668c - ld a, $1 - ld [wHPBarMaxHP + 1], a + +.pressedStart + ld a, 1 + ld [wNamingScreenSubmitName], a ret -.asm_6692 + +.pressedA ld a, [wCurrentMenuItem] - cp $5 - jr nz, .asm_66a0 + cp $5 ; "ED" row + jr nz, .didNotPressED ld a, [wTopMenuItemX] - cp $11 - jr z, .asm_668c -.asm_66a0 + cp $11 ; "ED" column + jr z, .pressedStart +.didNotPressED ld a, [wCurrentMenuItem] - cp $6 - jr nz, .asm_66ae + cp $6 ; case switch row + jr nz, .didNotPressCaseSwtich ld a, [wTopMenuItemX] - cp $1 - jr z, .asm_667e -.asm_66ae + cp $1 ; case switch column + jr z, .pressedA_changedCase +.didNotPressCaseSwtich ld hl, wMenuCursorLocation ld a, [hli] ld h, [hl] ld l, a inc hl ld a, [hl] - ld [wHPBarNewHP], a + ld [wNamingScreenLetter], a call CalcStringLength - ld a, [wHPBarNewHP] + ld a, [wNamingScreenLetter] cp $e5 - ld de, Dakutens ; $6885 - jr z, .asm_66e3 + ld de, Dakutens + jr z, .dakutensAndHandakutens cp $e4 - ld de, Handakutens ; $68d6 - jr z, .asm_66e3 - ld a, [wd07d] - cp $2 + ld de, Handakutens + jr z, .dakutensAndHandakutens + ld a, [wNamingScreenType] + cp NAME_MON_SCREEN jr nc, .checkMonNameLength - ld a, [wHPBarMaxHP] + ld a, [wNamingScreenNameLength] cp $7 ; max length of player/rival names jr .checkNameLength .checkMonNameLength - ld a, [wHPBarMaxHP] + ld a, [wNamingScreenNameLength] cp $a ; max length of pokemon nicknames .checkNameLength jr c, .addLetter ret -.asm_66e3 + +.dakutensAndHandakutens push hl - call Func_6871 + call DakutensAndHandakutens pop hl ret nc dec hl .addLetter - ld a, [wHPBarNewHP] + ld a, [wNamingScreenLetter] ld [hli], a - ld [hl], $50 - ld a, (SFX_02_40 - SFX_Headers_02) / 3 + ld [hl], "@" + ld a, SFX_PRESS_AB call PlaySound ret -.deleteLetter - ld a, [wHPBarMaxHP] +.pressedB + ld a, [wNamingScreenNameLength] and a ret z call CalcStringLength dec hl - ld [hl], $50 + ld [hl], "@" ret -.asm_6702 +.pressedRight ld a, [wCurrentMenuItem] cp $6 - ret z + ret z ; can't scroll right on bottom row ld a, [wTopMenuItemX] - cp $11 - jp z, .asm_6714 + cp $11 ; max + jp z, .wrapToFirstColumn inc a inc a - jr .asm_6755 -.asm_6714 + jr .done +.wrapToFirstColumn ld a, $1 - jr .asm_6755 -.asm_6718 + jr .done +.pressedLeft ld a, [wCurrentMenuItem] cp $6 - ret z + ret z ; can't scroll right on bottom row ld a, [wTopMenuItemX] dec a - jp z, .asm_6728 + jp z, .wrapToLastColumn dec a - jr .asm_6755 -.asm_6728 - ld a, $11 - jr .asm_6755 -.asm_672c + jr .done +.wrapToLastColumn + ld a, $11 ; max + jr .done +.pressedUp ld a, [wCurrentMenuItem] dec a ld [wCurrentMenuItem], a and a ret nz - ld a, $6 + ld a, $6 ; wrap to bottom row ld [wCurrentMenuItem], a - ld a, $1 - jr .asm_6755 -.asm_673e + ld a, $1 ; force left column + jr .done +.pressedDown ld a, [wCurrentMenuItem] inc a ld [wCurrentMenuItem], a cp $7 - jr nz, .asm_6750 + jr nz, .wrapToTopRow ld a, $1 ld [wCurrentMenuItem], a - jr .asm_6755 -.asm_6750 + jr .done +.wrapToTopRow cp $6 ret nz ld a, $1 -.asm_6755 +.done ld [wTopMenuItemX], a jp EraseMenuCursor -LoadEDTile: ; 675b (1:675b) +LoadEDTile: ld de, ED_Tile ld hl, vFont + $700 - ld bc, $1 + ld bc, (ED_TileEnd - ED_Tile) / $8 + ; to fix the graphical bug on poor emulators + ;lb bc, BANK(ED_Tile), (ED_TileEnd - ED_Tile) / $8 jp CopyVideoDataDouble -ED_Tile: ; 6767 (1:6767) +ED_Tile: INCBIN "gfx/ED_tile.1bpp" +ED_TileEnd: -PrintAlphabet: ; 676f (1:676f) +PrintAlphabet: xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld a, [wHPBarOldHP] + ld [H_AUTOBGTRANSFERENABLED], a + ld a, [wAlphabetCase] and a - ld de, LowerCaseAlphabet ; $679e - jr nz, .asm_677e - ld de, UpperCaseAlphabet ; $67d6 -.asm_677e - hlCoord 2, 5 - ld bc, $509 -.asm_6784 + ld de, LowerCaseAlphabet + jr nz, .lowercase + ld de, UpperCaseAlphabet +.lowercase + coord hl, 2, 5 + lb bc, 5, 9 ; 5 rows, 9 columns +.outerLoop push bc -.asm_6785 +.innerLoop ld a, [de] ld [hli], a inc hl inc de dec c - jr nz, .asm_6785 - ld bc, $16 + jr nz, .innerLoop + ld bc, SCREEN_WIDTH + 2 add hl, bc pop bc dec b - jr nz, .asm_6784 + jr nz, .outerLoop call PlaceString ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a jp Delay3 -LowerCaseAlphabet: ; 679e (1:679e) - db "abcdefghijklmnopqrstuvwxyz ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥UPPER CASE@" +LowerCaseAlphabet: + db "abcdefghijklmnopqrstuvwxyz ×():;[]",$e1,$e2,"-?!♂♀/⠄,¥UPPER CASE@" -UpperCaseAlphabet: ; 67d6 (1:67d6) - db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥lower case@" +UpperCaseAlphabet: + db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/⠄,¥lower case@" -Func_680e: ; 680e (1:680e) +PrintNicknameAndUnderscores: call CalcStringLength ld a, c - ld [wHPBarMaxHP], a - hlCoord 10, 2 - ld bc, $10a + ld [wNamingScreenNameLength], a + coord hl, 10, 2 + lb bc, 1, 10 call ClearScreenArea - hlCoord 10, 2 + coord hl, 10, 2 ld de, wcf4b call PlaceString - hlCoord 10, 3 - ld a, [wd07d] - cp $2 - jr nc, .asm_6835 - ld b, $7 - jr .asm_6837 -.asm_6835 - ld b, $a -.asm_6837 - ld a, $76 -.asm_6839 + coord hl, 10, 3 + ld a, [wNamingScreenType] + cp NAME_MON_SCREEN + jr nc, .pokemon1 + ld b, 7 ; player or rival max name length + jr .playerOrRival1 +.pokemon1 + ld b, 10 ; pokemon max name length +.playerOrRival1 + ld a, $76 ; underscore tile id +.placeUnderscoreLoop ld [hli], a dec b - jr nz, .asm_6839 - ld a, [wd07d] - cp $2 - ld a, [wHPBarMaxHP] - jr nc, .asm_684b - cp $7 - jr .asm_684d -.asm_684b - cp $a -.asm_684d - jr nz, .asm_6867 + jr nz, .placeUnderscoreLoop + ld a, [wNamingScreenType] + cp NAME_MON_SCREEN + ld a, [wNamingScreenNameLength] + jr nc, .pokemon2 + cp 7 ; player or rival max name length + jr .playerOrRival2 +.pokemon2 + cp 10 ; pokemon max name length +.playerOrRival2 + jr nz, .emptySpacesRemaining + ; when all spaces are filled, force the cursor onto the ED tile call EraseMenuCursor - ld a, $11 + ld a, $11 ; "ED" x coord ld [wTopMenuItemX], a - ld a, $5 + ld a, $5 ; "ED" y corrd ld [wCurrentMenuItem], a - ld a, [wd07d] - cp $2 - ld a, $9 - jr nc, .asm_6867 - ld a, $6 -.asm_6867 + ld a, [wNamingScreenType] + cp NAME_MON_SCREEN + ld a, 9 ; keep the last underscore raised + jr nc, .pokemon3 + ld a, 6 ; keep the last underscore raised +.pokemon3 +.emptySpacesRemaining ld c, a ld b, $0 - hlCoord 10, 3 + coord hl, 10, 3 add hl, bc - ld [hl], $77 + ld [hl], $77 ; raised underscore tile id ret -Func_6871: ; 6871 (1:6871) +DakutensAndHandakutens: push de call CalcStringLength dec hl @@ -429,10 +436,10 @@ Func_6871: ; 6871 (1:6871) ret nc inc hl ld a, [hl] - ld [wHPBarNewHP], a + ld [wNamingScreenLetter], a ret -Dakutens: ; 6885 (1:6885) +Dakutens: db "かが", "きぎ", "くぐ", "けげ", "こご" db "さざ", "しじ", "すず", "せぜ", "そぞ" db "ただ", "ちぢ", "つづ", "てで", "とど" @@ -443,26 +450,26 @@ Dakutens: ; 6885 (1:6885) db "ハバ", "ヒビ", "フブ", "へべ", "ホボ" db $ff -Handakutens: ; 68d6 (1:68d6) +Handakutens: db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ" db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ" db $ff ; calculates the length of the string at wcf4b and stores it in c -CalcStringLength: ; 68eb (1:68eb) +CalcStringLength: ld hl, wcf4b ld c, $0 -.asm_68f0 +.loop ld a, [hl] - cp $50 + cp "@" ret z inc hl inc c - jr .asm_68f0 + jr .loop -PrintNamingText: ; 68f8 (1:68f8) - hlCoord 0, 1 - ld a, [wd07d] +PrintNamingText: + coord hl, 0, 1 + ld a, [wNamingScreenType] ld de, YourTextString and a jr z, .notNickname @@ -476,12 +483,12 @@ PrintNamingText: ; 68f8 (1:68f8) pop af ld [wd11e], a call GetMonName - hlCoord 4, 1 + coord hl, 4, 1 call PlaceString ld hl, $1 add hl, bc ld [hl], $c9 - hlCoord 1, 3 + coord hl, 1, 3 ld de, NicknameTextString jr .placeString .notNickname @@ -492,14 +499,14 @@ PrintNamingText: ; 68f8 (1:68f8) .placeString jp PlaceString -YourTextString: ; 693f (1:693f) +YourTextString: db "YOUR @" -RivalsTextString: ; 6945 (1:6945) +RivalsTextString: db "RIVAL's @" -NameTextString: ; 694d (1:694d) +NameTextString: db "NAME?@" -NicknameTextString: ; 6953 (1:6953) +NicknameTextString: db "NICKNAME?@" diff --git a/engine/menu/oaks_pc.asm b/engine/menu/oaks_pc.asm index 6e7edda2..03c9b8f1 100755 --- a/engine/menu/oaks_pc.asm +++ b/engine/menu/oaks_pc.asm @@ -1,27 +1,28 @@ -OpenOaksPC: ; 1e915 (7:6915) +OpenOaksPC: call SaveScreenTilesToBuffer2 ld hl, AccessedOaksPCText call PrintText ld hl, GetDexRatedText call PrintText call YesNoChoice - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a - jr nz, .asm_1e932 + jr nz, .closePC predef DisplayDexRating -.asm_1e932 +.closePC ld hl, ClosedOaksPCText call PrintText jp LoadScreenTilesFromBuffer2 -GetDexRatedText: ; 1e93b (7:693b) +GetDexRatedText: TX_FAR _GetDexRatedText db "@" -ClosedOaksPCText: ; 1e940 (7:6940) +ClosedOaksPCText: TX_FAR _ClosedOaksPCText - db $0d,"@" + TX_WAIT + db "@" -AccessedOaksPCText: ; 1e946 (7:6946) +AccessedOaksPCText: TX_FAR _AccessedOaksPCText db "@" diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm index 242edd40..a35524ed 100755 --- a/engine/menu/party_menu.asm +++ b/engine/menu/party_menu.asm @@ -1,4 +1,4 @@ -; [wd07d] = menu type / message ID +; [wPartyMenuTypeOrMessageID] = menu type / message ID ; if less than $F0, it is a menu type ; menu types: ; 00: normal pokemon menu (e.g. Start menu) @@ -17,25 +17,25 @@ ; f6: health returned ; f7: revitalized ; f8: leveled up -DrawPartyMenu_: ; 12cd2 (4:6cd2) +DrawPartyMenu_: xor a ld [H_AUTOBGTRANSFERENABLED],a call ClearScreen - call UpdateSprites ; move sprites + call UpdateSprites callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics -RedrawPartyMenu_: ; 12ce3 (4:6ce3) - ld a,[wd07d] - cp a,$04 +RedrawPartyMenu_: + ld a,[wPartyMenuTypeOrMessageID] + cp a,SWAP_MONS_PARTY_MENU jp z,.printMessage call ErasePartyMenuCursors - callba SendBlkPacket_PartyMenu ; loads some data to wcf2e - hlCoord 3, 0 + callba InitPartyMenuBlkPacket + coord hl, 3, 0 ld de,wPartySpecies xor a ld c,a ld [hPartyMonIndex],a - ld [wcf2d],a + ld [wWhichPartyMenuHPBar],a .loop ld a,[de] cp a,$FF ; reached the terminator? @@ -70,15 +70,15 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) dec hl dec hl dec hl - ld a,$EC ; unfilled right arrow menu cursor + ld a,"▷" ; unfilled right arrow menu cursor ld [hli],a ; place the cursor inc hl inc hl .skipUnfilledRightArrow - ld a,[wd07d] ; menu type - cp a,$03 + ld a,[wPartyMenuTypeOrMessageID] ; menu type + cp a,TMHM_PARTY_MENU jr z,.teachMoveMenu - cp a,$05 + cp a,EVO_STONE_PARTY_MENU jr z,.evolutionStoneMenu push hl ld bc,14 ; 14 columns to the right @@ -87,7 +87,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) call PrintStatusCondition pop hl push hl - ld bc,20 + 1 ; down 1 row and right 1 column + ld bc,SCREEN_WIDTH + 1 ; down 1 row and right 1 column ld a,[hFlags_0xFFF6] set 0,a ld [hFlags_0xFFF6],a @@ -96,7 +96,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) ld a,[hFlags_0xFFF6] res 0,a ld [hFlags_0xFFF6],a - call SetPartyMenuHealthBarColor ; color the HP bar (on SGB) + call SetPartyMenuHPBarColor ; color the HP bar (on SGB) pop hl jr .printLevel .teachMoveMenu @@ -150,7 +150,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) ld l,a ld de,wcd6d ld a,BANK(EvosMovesPointerTable) - ld bc,13 + ld bc,Mon133_EvosEnd - Mon133_EvosMoves call FarCopyData ld hl,wcd6d ld de,.notAbleToEvolveText @@ -167,7 +167,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) dec hl dec hl ld b,[hl] - ld a,[wd156] ; evolution stone item ID + ld a,[wEvoStoneItemID] ; the stone the player used inc hl inc hl inc hl @@ -188,15 +188,15 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) .notAbleToEvolveText db "NOT ABLE@" .afterDrawingMonEntries - ld b,$0A - call GoPAL_SET + ld b, SET_PAL_PARTY_MENU + call RunPaletteCommand .printMessage ld hl,wd730 ld a,[hl] push af push hl set 6,[hl] ; turn off letter printing delay - ld a,[wd07d] ; message ID + ld a,[wPartyMenuTypeOrMessageID] ; message ID cp a,$F0 jr nc,.printItemUseMessage add a @@ -227,14 +227,14 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) ld h,[hl] ld l,a push hl - ld a,[wcf06] + ld a,[wUsedItemOnWhichPokemon] ld hl,wPartyMonNicks call GetPartyMonName pop hl call PrintText jr .done -PartyMenuItemUseMessagePointers: ; 12e61 (4:6e61) +PartyMenuItemUseMessagePointers: dw AntidoteText dw BurnHealText dw IceHealText @@ -245,7 +245,7 @@ PartyMenuItemUseMessagePointers: ; 12e61 (4:6e61) dw ReviveText dw RareCandyText -PartyMenuMessagePointers: ; 12e73 (4:6e73) +PartyMenuMessagePointers: dw PartyMenuNormalText dw PartyMenuItemUseText dw PartyMenuBattleText @@ -253,73 +253,73 @@ PartyMenuMessagePointers: ; 12e73 (4:6e73) dw PartyMenuSwapMonText dw PartyMenuItemUseText -PartyMenuNormalText: ; 12e7f (4:6e7f) +PartyMenuNormalText: TX_FAR _PartyMenuNormalText db "@" -PartyMenuItemUseText: ; 12e84 (4:6e84) +PartyMenuItemUseText: TX_FAR _PartyMenuItemUseText db "@" -PartyMenuBattleText: ; 12e89 (4:6e89) +PartyMenuBattleText: TX_FAR _PartyMenuBattleText db "@" -PartyMenuUseTMText: ; 12e8e (4:6e8e) +PartyMenuUseTMText: TX_FAR _PartyMenuUseTMText db "@" -PartyMenuSwapMonText: ; 12e93 (4:6e93) +PartyMenuSwapMonText: TX_FAR _PartyMenuSwapMonText db "@" -PotionText: ; 12e98 (4:6e98) +PotionText: TX_FAR _PotionText db "@" -AntidoteText: ; 12e9d (4:6e9d) +AntidoteText: TX_FAR _AntidoteText db "@" -ParlyzHealText: ; 12ea2 (4:6ea2) +ParlyzHealText: TX_FAR _ParlyzHealText db "@" -BurnHealText: ; 12ea7 (4:6ea7) +BurnHealText: TX_FAR _BurnHealText db "@" -IceHealText: ; 12eac (4:6eac) +IceHealText: TX_FAR _IceHealText db "@" -AwakeningText: ; 12eb1 (4:6eb1) +AwakeningText: TX_FAR _AwakeningText db "@" -FullHealText: ; 12eb6 (4:6eb6) +FullHealText: TX_FAR _FullHealText db "@" -ReviveText: ; 12ebb (4:6ebb) +ReviveText: TX_FAR _ReviveText db "@" -RareCandyText: ; 12ec0 (4:6ec0) +RareCandyText: TX_FAR _RareCandyText - db $0B - db $06 + TX_SFX_ITEM_1 ; probably supposed to play SFX_LEVEL_UP but the wrong music bank is loaded + TX_BLINK db "@" -SetPartyMenuHealthBarColor: ; 12ec7 (4:6ec7) - ld hl, wcf1f - ld a, [wcf2d] +SetPartyMenuHPBarColor: + ld hl, wPartyMenuHPBarColors + ld a, [wWhichPartyMenuHPBar] ld c, a - ld b, $0 + ld b, 0 add hl, bc call GetHealthBarColor - ld b, $fc - call GoPAL_SET - ld hl, wcf2d + ld b, UPDATE_PARTY_MENU_BLK_PACKET + call RunPaletteCommand + ld hl, wWhichPartyMenuHPBar inc [hl] ret diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm index 97895ca6..c9e2cf08 100755 --- a/engine/menu/pc.asm +++ b/engine/menu/pc.asm @@ -1,16 +1,16 @@ -ActivatePC: ; 17e2c (5:7e2c) - call SaveScreenTilesToBuffer2 ;XXX: copy background from wTileMap to wTileMapBackup2 - ld a, (SFX_02_45 - SFX_Headers_02) / 3 - call PlaySound ;XXX: play sound or stop music +ActivatePC: + call SaveScreenTilesToBuffer2 + ld a, SFX_TURN_ON_PC + 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 +PCMainMenu: + callba DisplayPCMainMenu ld hl, wFlags_0xcd60 set 5, [hl] call HandleMenuInput @@ -51,31 +51,30 @@ PCMainMenu: ; 17e48 (5:7e48) ld hl, wFlags_0xcd60 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 + ld a, SFX_ENTER_PC + 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 +OaksPC: + ld a, SFX_ENTER_PC + 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 +PKMNLeague: + ld a, SFX_ENTER_PC + 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 - ld a, [wd7f1] ;has to do with having met Bill - bit 0, a +BillsPC: + ld a, SFX_ENTER_PC + call PlaySound + call WaitForSoundToFinish + CheckEvent EVENT_MET_BILL jr nz, .billsPC ;if you've met bill, use that bill's instead of someone's ld hl, AccessedSomeonesPCText jr .printText @@ -84,59 +83,59 @@ BillsPC: ; 17ee4 (5:7ee4) .printText call PrintText callba BillsPC_ -ReloadMainMenu: ; 17f06 (5:7f06) +ReloadMainMenu: 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 +LogOff: + ld a, SFX_TURN_OFF_PC + call PlaySound + call WaitForSoundToFinish ld hl, wFlags_0xcd60 res 3, [hl] res 5, [hl] ret -TurnedOnPC1Text: ; 17f23 (5:7f23) +TurnedOnPC1Text: TX_FAR _TurnedOnPC1Text db "@" -AccessedBillsPCText: ; 17f28 (5:7f28) +AccessedBillsPCText: TX_FAR _AccessedBillsPCText db "@" -AccessedSomeonesPCText: ; 17f2d (5:7f2d) +AccessedSomeonesPCText: TX_FAR _AccessedSomeonesPCText db "@" -AccessedMyPCText: ; 17f32 (5:7f32) +AccessedMyPCText: TX_FAR _AccessedMyPCText db "@" -; removes one of the specified item ID [$FFdb] from bag (if existent) -RemoveItemByID: ; 17f37 (5:7f37) - ld hl, wBagItems ; wd31e - ld a, [$ffdb] +; removes one of the specified item ID [hItemToRemoveID] from bag (if existent) +RemoveItemByID: + ld hl, wBagItems + ld a, [hItemToRemoveID] ld b, a xor a - ld [$ffdc], a -.asm_17f40 + ld [hItemToRemoveIndex], a +.loop ld a, [hli] - cp $ff + cp -1 ; reached terminator? ret z cp b - jr z, .asm_17f4f + jr z, .foundItem inc hl - ld a, [$ffdc] + ld a, [hItemToRemoveIndex] inc a - ld [$ffdc], a - jr .asm_17f40 -.asm_17f4f + ld [hItemToRemoveIndex], a + jr .loop +.foundItem ld a, $1 - ld [wcf96], a - ld a, [$ffdc] - ld [wWhichPokemon], a ; wWhichPokemon - ld hl, wNumBagItems ; wNumBagItems + ld [wItemQuantity], a + ld a, [hItemToRemoveIndex] + ld [wWhichPokemon], a + ld hl, wNumBagItems jp RemoveItemFromInventory diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm index 147a27a4..bc2be4ef 100755 --- a/engine/menu/players_pc.asm +++ b/engine/menu/players_pc.asm @@ -1,301 +1,303 @@ -PlayerPC: ; 78e6 (1:78e6) +PlayerPC: ld hl, wd730 set 6, [hl] ld a, ITEM_NAME ld [wNameListType], a call SaveScreenTilesToBuffer1 xor a - ld [wcc2c], a - ld [wccd3], a + ld [wBagSavedMenuItem], a + ld [wParentMenuItem], a ld a, [wFlags_0xcd60] - bit 3, a - jr nz, Func_790c - ld a, (SFX_02_45 - SFX_Headers_02) / 3 + bit 3, a ; accessing player's PC through another PC? + jr nz, PlayerPCMenu +; accessing it directly + ld a, SFX_TURN_ON_PC call PlaySound ld hl, TurnedOnPC2Text call PrintText -Func_790c: ; 790c (1:790c) - ld a, [wccd3] +PlayerPCMenu: + ld a, [wParentMenuItem] ld [wCurrentMenuItem], a ld hl, wFlags_0xcd60 set 5, [hl] call LoadScreenTilesFromBuffer2 - ld hl, wTileMap + coord hl, 0, 0 ld b, $8 ld c, $e call TextBoxBorder call UpdateSprites - hlCoord 2, 2 + coord hl, 2, 2 ld de, PlayersPCMenuEntries call PlaceString ld hl, wTopMenuItemY - ld a, $2 - ld [hli], a + ld a, 2 + ld [hli], a ; wTopMenuItemY dec a - ld [hli], a + ld [hli], a ; wTopMenuItemX inc hl inc hl - ld a, $3 - ld [hli], a - ld a, $3 - ld [hli], a + ld a, 3 + ld [hli], a ; wMaxMenuItem + ld a, A_BUTTON | B_BUTTON + ld [hli], a ; wMenuWatchedKeys xor a ld [hl], a ld hl, wListScrollOffset - ld [hli], a - ld [hl], a + ld [hli], a ; wListScrollOffset + ld [hl], a ; wMenuWatchMovingOutOfBounds ld [wPlayerMonNumber], a ld hl, WhatDoYouWantText call PrintText call HandleMenuInput bit 1, a - jp nz, Func_796d + jp nz, ExitPlayerPC call PlaceUnfilledArrowMenuCursor ld a, [wCurrentMenuItem] - ld [wccd3], a + ld [wParentMenuItem], a and a - jp z, Func_7a12 + jp z, PlayerPCWithdraw dec a - jp z, Func_7995 + jp z, PlayerPCDeposit dec a - jp z, Func_7a8f + jp z, PlayerPCToss -Func_796d: ; 796d (1:796d) +ExitPlayerPC: ld a, [wFlags_0xcd60] - bit 3, a - jr nz, .asm_797c - ld a, (SFX_02_46 - SFX_Headers_02) / 3 + bit 3, a ; accessing player's PC through another PC? + jr nz, .next +; accessing it directly + ld a, SFX_TURN_OFF_PC call PlaySound call WaitForSoundToFinish -.asm_797c +.next ld hl, wFlags_0xcd60 res 5, [hl] call LoadScreenTilesFromBuffer2 xor a ld [wListScrollOffset], a - ld [wcc2c], a + ld [wBagSavedMenuItem], a ld hl, wd730 res 6, [hl] xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret -Func_7995: ; 7995 (1:7995) +PlayerPCDeposit: xor a ld [wCurrentMenuItem], a ld [wListScrollOffset], a ld a, [wNumBagItems] and a - jr nz, Func_79ab + jr nz, .loop ld hl, NothingToDepositText call PrintText - jp Func_790c - -Func_79ab: ; 79ab (1:79ab) + jp PlayerPCMenu +.loop ld hl, WhatToDepositText call PrintText ld hl, wNumBagItems ld a, l - ld [wList], a + ld [wListPointer], a ld a, h - ld [wList + 1], a + ld [wListPointer + 1], a xor a - ld [wcf93], a - ld a, $3 + ld [wPrintItemPrices], a + ld a, ITEMLISTMENU ld [wListMenuID], a call DisplayListMenuID - jp c, Func_790c + jp c, PlayerPCMenu call IsKeyItem - ld a, $1 - ld [wcf96], a - ld a, [wd124] + ld a, 1 + ld [wItemQuantity], a + ld a, [wIsKeyItem] and a - jr nz, .asm_79e7 + jr nz, .next +; if it's not a key item, there can be more than one of the item ld hl, DepositHowManyText call PrintText call DisplayChooseQuantityMenu cp $ff - jp z, Func_79ab -.asm_79e7 + jp z, .loop +.next ld hl, wNumBoxItems call AddItemToInventory - jr c, .asm_79f8 + jr c, .roomAvailable ld hl, NoRoomToStoreText call PrintText - jp Func_79ab -.asm_79f8 + jp .loop +.roomAvailable ld hl, wNumBagItems call RemoveItemFromInventory call WaitForSoundToFinish - ld a, (SFX_02_55 - SFX_Headers_02) / 3 + ld a, SFX_WITHDRAW_DEPOSIT call PlaySound call WaitForSoundToFinish ld hl, ItemWasStoredText call PrintText - jp Func_79ab + jp .loop -Func_7a12: ; 7a12 (1:7a12) +PlayerPCWithdraw: xor a ld [wCurrentMenuItem], a ld [wListScrollOffset], a ld a, [wNumBoxItems] and a - jr nz, Func_7a28 + jr nz, .loop ld hl, NothingStoredText call PrintText - jp Func_790c - -Func_7a28: ; 7a28 (1:7a28) + jp PlayerPCMenu +.loop ld hl, WhatToWithdrawText call PrintText ld hl, wNumBoxItems ld a, l - ld [wList], a + ld [wListPointer], a ld a, h - ld [wList + 1], a + ld [wListPointer + 1], a xor a - ld [wcf93], a - ld a, $3 + ld [wPrintItemPrices], a + ld a, ITEMLISTMENU ld [wListMenuID], a call DisplayListMenuID - jp c, Func_790c + jp c, PlayerPCMenu call IsKeyItem - ld a, $1 - ld [wcf96], a - ld a, [wd124] + ld a, 1 + ld [wItemQuantity], a + ld a, [wIsKeyItem] and a - jr nz, .asm_7a64 + jr nz, .next +; if it's not a key item, there can be more than one of the item ld hl, WithdrawHowManyText call PrintText call DisplayChooseQuantityMenu cp $ff - jp z, Func_7a28 -.asm_7a64 + jp z, .loop +.next ld hl, wNumBagItems call AddItemToInventory - jr c, .asm_7a75 + jr c, .roomAvailable ld hl, CantCarryMoreText call PrintText - jp Func_7a28 -.asm_7a75 + jp .loop +.roomAvailable ld hl, wNumBoxItems call RemoveItemFromInventory call WaitForSoundToFinish - ld a, (SFX_02_55 - SFX_Headers_02) / 3 + ld a, SFX_WITHDRAW_DEPOSIT call PlaySound call WaitForSoundToFinish ld hl, WithdrewItemText call PrintText - jp Func_7a28 + jp .loop -Func_7a8f: ; 7a8f (1:7a8f) +PlayerPCToss: xor a ld [wCurrentMenuItem], a ld [wListScrollOffset], a ld a, [wNumBoxItems] and a - jr nz, Func_7aa5 + jr nz, .loop ld hl, NothingStoredText call PrintText - jp Func_790c - -Func_7aa5: ; 7aa5 (1:7aa5) + jp PlayerPCMenu +.loop ld hl, WhatToTossText call PrintText ld hl, wNumBoxItems ld a, l - ld [wList], a + ld [wListPointer], a ld a, h - ld [wList + 1], a + ld [wListPointer + 1], a xor a - ld [wcf93], a - ld a, $3 + ld [wPrintItemPrices], a + ld a, ITEMLISTMENU ld [wListMenuID], a push hl call DisplayListMenuID pop hl - jp c, Func_790c + jp c, PlayerPCMenu push hl call IsKeyItem pop hl - ld a, $1 - ld [wcf96], a - ld a, [wd124] + ld a, 1 + ld [wItemQuantity], a + ld a, [wIsKeyItem] and a - jr nz, .asm_7aef + jr nz, .next ld a, [wcf91] call IsItemHM - jr c, .asm_7aef + jr c, .next +; if it's not a key item, there can be more than one of the item push hl ld hl, TossHowManyText call PrintText call DisplayChooseQuantityMenu pop hl cp $ff - jp z, Func_7aa5 -.asm_7aef - call TossItem - jp Func_7aa5 + jp z, .loop +.next + call TossItem ; disallows tossing key items + jp .loop -PlayersPCMenuEntries: ; 7af5 (1:7af5) +PlayersPCMenuEntries: db "WITHDRAW ITEM" next "DEPOSIT ITEM" next "TOSS ITEM" next "LOG OFF@" -TurnedOnPC2Text: ; 7b22 (1:7b22) +TurnedOnPC2Text: TX_FAR _TurnedOnPC2Text db "@" -WhatDoYouWantText: ; 7b27 (1:7b27) +WhatDoYouWantText: TX_FAR _WhatDoYouWantText db "@" -WhatToDepositText: ; 7b2c (1:7b2c) +WhatToDepositText: TX_FAR _WhatToDepositText db "@" -DepositHowManyText: ; 7b31 (1:7b31) +DepositHowManyText: TX_FAR _DepositHowManyText db "@" -ItemWasStoredText: ; 7b36 (1:7b36) +ItemWasStoredText: TX_FAR _ItemWasStoredText db "@" -NothingToDepositText: ; 7b3b (1:7b3b) +NothingToDepositText: TX_FAR _NothingToDepositText db "@" -NoRoomToStoreText: ; 7b40 (1:7b40) +NoRoomToStoreText: TX_FAR _NoRoomToStoreText db "@" -WhatToWithdrawText: ; 7b45 (1:7b45) +WhatToWithdrawText: TX_FAR _WhatToWithdrawText db "@" -WithdrawHowManyText: ; 7b4a (1:7b4a) +WithdrawHowManyText: TX_FAR _WithdrawHowManyText db "@" -WithdrewItemText: ; 7b4f (1:7b4f) +WithdrewItemText: TX_FAR _WithdrewItemText db "@" -NothingStoredText: ; 7b54 (1:7b54) +NothingStoredText: TX_FAR _NothingStoredText db "@" -CantCarryMoreText: ; 7b59 (1:7b59) +CantCarryMoreText: TX_FAR _CantCarryMoreText db "@" -WhatToTossText: ; 7b5e (1:7b5e) +WhatToTossText: TX_FAR _WhatToTossText db "@" -TossHowManyText: ; 7b63 (1:7b63) +TossHowManyText: TX_FAR _TossHowManyText db "@" diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index 4351ae4c..2da3a0f6 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -1,7 +1,7 @@ -ShowPokedexMenu: ; 40000 (10:4000) +ShowPokedexMenu: call GBPalWhiteOut call ClearScreen - call UpdateSprites ; move sprites + call UpdateSprites ld a,[wListScrollOffset] push af xor a @@ -12,8 +12,8 @@ ShowPokedexMenu: ; 40000 (10:4000) ld [wd11e],a ld [hJoy7],a .setUpGraphics - ld b,$08 - call GoPAL_SET + ld b, SET_PAL_GENERIC + call RunPaletteCommand callab LoadPokedexTilePatterns .doPokemonListMenu ld hl,wTopMenuItemY @@ -22,17 +22,17 @@ ShowPokedexMenu: ; 40000 (10:4000) xor a ld [hli],a ; top menu item X inc a - ld [wcc37],a + ld [wMenuWatchMovingOutOfBounds],a inc hl inc hl ld a,6 ld [hli],a ; max menu item ID - ld [hl],%00110011 ; menu watched keys (Left, Right, B button, A button) + ld [hl],D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON call HandlePokedexListMenu jr c,.goToSideMenu ; if the player chose a pokemon from the list .exitPokedex xor a - ld [wcc37],a + ld [wMenuWatchMovingOutOfBounds],a ld [wCurrentMenuItem],a ld [wLastMenuItem],a ld [hJoy7],a @@ -41,7 +41,7 @@ ShowPokedexMenu: ; 40000 (10:4000) pop af ld [wListScrollOffset],a call GBPalWhiteOutWithDelay3 - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand jp ReloadMapData .goToSideMenu call HandlePokedexSideMenu @@ -57,7 +57,7 @@ ShowPokedexMenu: ; 40000 (10:4000) ; 00: showed pokemon data or area ; 01: the player chose Quit ; 02: the pokemon has not been seen yet or the player pressed the B button -HandlePokedexSideMenu: ; 4006d (10:406d) +HandlePokedexSideMenu: call PlaceUnfilledArrowMenuCursor ld a,[wCurrentMenuItem] push af @@ -71,8 +71,8 @@ HandlePokedexSideMenu: ; 4006d (10:406d) ld [wd11e],a ld a,[wd11e] push af - ld a,[wWhichTrade] - push af + ld a,[wDexMaxSeenMon] + push af ; this doesn't need to be preserved ld hl,wPokedexSeen call IsPokemonBitSet ld b,2 @@ -88,10 +88,11 @@ HandlePokedexSideMenu: ; 4006d (10:406d) inc hl ld a,3 ld [hli],a ; max menu item ID + ;ld a, A_BUTTON | B_BUTTON ld [hli],a ; menu watched keys (A button and B button) xor a ld [hli],a ; old menu item ID - ld [wcc37],a + ld [wMenuWatchMovingOutOfBounds],a .handleMenuInput call HandleMenuInput bit 1,a ; was the B button pressed? @@ -108,7 +109,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d) ld b,1 .exitSideMenu pop af - ld [wWhichTrade],a + ld [wDexMaxSeenMon],a pop af ld [wd11e],a pop af @@ -118,30 +119,34 @@ HandlePokedexSideMenu: ; 4006d (10:406d) pop af ld [wCurrentMenuItem],a push bc - hlCoord 0, 3 + coord hl, 0, 3 ld de,20 - ld bc,$7f0d ; 13 blank tiles + lb bc, " ", 13 call DrawTileLine ; cover up the menu cursor in the pokemon list pop bc ret + .buttonBPressed push bc - hlCoord 15, 10 + coord hl, 15, 10 ld de,20 - ld bc,$7f07 ; 7 blank tiles + lb bc, " ", 7 call DrawTileLine ; cover up the menu cursor in the side menu pop bc jr .exitSideMenu + .choseData call ShowPokedexDataInternal ld b,0 jr .exitSideMenu + ; play pokemon cry .choseCry ld a,[wd11e] - call GetCryData ; get cry data - call PlaySound ; play sound + call GetCryData + call PlaySound jr .handleMenuInput + .choseArea predef LoadTownMap_Nest ; display pokemon areas ld b,0 @@ -149,47 +154,47 @@ HandlePokedexSideMenu: ; 4006d (10:406d) ; handles the list of pokemon on the left of the pokedex screen ; sets carry flag if player presses A, unsets carry flag if player presses B -HandlePokedexListMenu: ; 40111 (10:4111) +HandlePokedexListMenu: xor a ld [H_AUTOBGTRANSFERENABLED],a ; draw the horizontal line separating the seen and owned amounts from the menu - hlCoord 15, 8 - ld a,$7a ; horizontal line tile + coord hl, 15, 8 + ld a,"─" ld [hli],a ld [hli],a ld [hli],a ld [hli],a ld [hli],a - hlCoord 14, 0 + coord hl, 14, 0 ld [hl],$71 ; vertical line tile - hlCoord 14, 1 + coord hl, 14, 1 call DrawPokedexVerticalLine - hlCoord 14, 9 + coord hl, 14, 9 call DrawPokedexVerticalLine ld hl,wPokedexSeen ld b,wPokedexSeenEnd - wPokedexSeen call CountSetBits - ld de,wd11e - hlCoord 16, 3 - ld bc,$0103 + ld de, wNumSetBits + coord hl, 16, 3 + lb bc, 1, 3 call PrintNumber ; print number of seen pokemon ld hl,wPokedexOwned ld b,wPokedexOwnedEnd - wPokedexOwned call CountSetBits - ld de,wd11e - hlCoord 16, 6 - ld bc,$0103 + ld de, wNumSetBits + coord hl, 16, 6 + lb bc, 1, 3 call PrintNumber ; print number of owned pokemon - hlCoord 16, 2 + coord hl, 16, 2 ld de,PokedexSeenText call PlaceString - hlCoord 16, 5 + coord hl, 16, 5 ld de,PokedexOwnText call PlaceString - hlCoord 1, 1 + coord hl, 1, 1 ld de,PokedexContentsText call PlaceString - hlCoord 16, 10 + coord hl, 16, 10 ld de,PokedexMenuItemsText call PlaceString ; find the highest pokedex number among the pokemon the player has seen @@ -205,20 +210,21 @@ HandlePokedexListMenu: ; 40111 (10:4111) dec c jr nz,.maxSeenPokemonInnerLoop jr .maxSeenPokemonLoop + .storeMaxSeenPokemon ld a,b - ld [wWhichTrade],a ; max seen pokemon + ld [wDexMaxSeenMon],a .loop xor a ld [H_AUTOBGTRANSFERENABLED],a - hlCoord 4, 2 - ld bc,$0e0a + coord hl, 4, 2 + lb bc, 14, 10 call ClearScreenArea - hlCoord 1, 3 + coord hl, 1, 3 ld a,[wListScrollOffset] ld [wd11e],a ld d,7 - ld a,[wWhichTrade] + ld a,[wDexMaxSeenMon] cp a,7 jr nc,.printPokemonLoop ld d,a @@ -233,12 +239,12 @@ HandlePokedexListMenu: ; 40111 (10:4111) push af push de push hl - ld de,-20 + ld de,-SCREEN_WIDTH add hl,de ld de,wd11e - ld bc,$8103 + lb bc, LEADING_ZEROES | 1, 3 call PrintNumber ; print the pokedex number - ld de,20 + ld de,SCREEN_WIDTH add hl,de dec hl push hl @@ -266,7 +272,7 @@ HandlePokedexListMenu: ; 40111 (10:4111) inc hl call PlaceString pop hl - ld bc,2 * 20 + ld bc,2 * SCREEN_WIDTH add hl,bc pop de pop af @@ -294,9 +300,9 @@ HandlePokedexListMenu: ; 40111 (10:4111) bit 7,a ; was Down pressed? jr z,.checkIfRightPressed .downPressed ; scroll down one row - ld a,[wWhichTrade] + ld a,[wDexMaxSeenMon] cp a,7 - jp c,.loop + jp c,.loop ; can't if the list is shorter than 7 sub a,7 ld b,a ld a,[wListScrollOffset] @@ -309,9 +315,9 @@ HandlePokedexListMenu: ; 40111 (10:4111) bit 4,a ; was Right pressed? jr z,.checkIfLeftPressed .rightPressed ; scroll down 7 rows - ld a,[wWhichTrade] + ld a,[wDexMaxSeenMon] cp a,7 - jp c,.loop + jp c,.loop ; can't if the list is shorter than 7 sub a,6 ld b,a ld a,[wListScrollOffset] @@ -341,9 +347,9 @@ HandlePokedexListMenu: ; 40111 (10:4111) and a ret -DrawPokedexVerticalLine: ; 4028e (10:428e) +DrawPokedexVerticalLine: ld c,9 ; height of line - ld de,20 ; width of screen + ld de,SCREEN_WIDTH ld a,$71 ; vertical line tile .loop ld [hl],a @@ -353,78 +359,80 @@ DrawPokedexVerticalLine: ; 4028e (10:428e) jr nz,.loop ret -PokedexSeenText: ; 4029d (10:429d) +PokedexSeenText: db "SEEN@" -PokedexOwnText: ; 402a2 (10:42a2) +PokedexOwnText: db "OWN@" -PokedexContentsText: ; 402a6 (10:42a6) +PokedexContentsText: db "CONTENTS@" -PokedexMenuItemsText: ; 402af (10:42af) +PokedexMenuItemsText: db "DATA" next "CRY" next "AREA" -IF DEF(_YELLOW) - next "PRNT" -ENDC next "QUIT@" ; tests if a pokemon's bit is set in the seen or owned pokemon bit fields ; INPUT: ; [wd11e] = pokedex number ; hl = address of bit field -IsPokemonBitSet: ; 402c2 (10:42c2) +IsPokemonBitSet: ld a,[wd11e] dec a ld c,a - ld b,2 + ld b,FLAG_TEST predef FlagActionPredef ld a,c and a ret ; function to display pokedex data from outside the pokedex -ShowPokedexData: ; 402d1 (10:42d1) +ShowPokedexData: call GBPalWhiteOutWithDelay3 call ClearScreen call UpdateSprites callab LoadPokedexTilePatterns ; load pokedex tiles ; function to display pokedex data from inside the pokedex -ShowPokedexDataInternal: ; 402e2 (10:42e2) +ShowPokedexDataInternal: ld hl,wd72c set 1,[hl] ld a,$33 ; 3/7 volume - ld [$ff24],a + ld [rNR50],a call GBPalWhiteOut ; zero all palettes call ClearScreen ld a,[wd11e] ; pokemon ID ld [wcf91],a push af - ld b,04 - call GoPAL_SET + ld b, SET_PAL_POKEDEX + call RunPaletteCommand pop af ld [wd11e],a ld a,[hTilesetType] push af xor a ld [hTilesetType],a - hlCoord 0, 0 + + coord hl, 0, 0 ld de,1 - ld bc,$6414 + lb bc, $64, SCREEN_WIDTH call DrawTileLine ; draw top border - hlCoord 0, 17 - ld b,$6f + + coord hl, 0, 17 + ld b, $6f call DrawTileLine ; draw bottom border - hlCoord 0, 1 + + coord hl, 0, 1 ld de,20 - ld bc,$6610 + lb bc, $66, $10 call DrawTileLine ; draw left border - hlCoord 19, 1 + + coord hl, 19, 1 ld b,$67 call DrawTileLine ; draw right border + ld a,$63 ; upper left corner tile Coorda 0, 0 ld a,$65 ; upper right corner tile @@ -433,15 +441,19 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) Coorda 0, 17 ld a,$6e ; lower right corner tile Coorda 19, 17 - hlCoord 0, 9 + + coord hl, 0, 9 ld de,PokedexDataDividerLine call PlaceString ; draw horizontal divider line - hlCoord 9, 6 + + coord hl, 9, 6 ld de,HeightWeightText call PlaceString + call GetMonName - hlCoord 9, 2 + coord hl, 9, 2 call PlaceString + ld hl,PokedexEntryPointers ld a,[wd11e] dec a @@ -452,22 +464,26 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) ld a,[hli] ld e,a ld d,[hl] ; de = address of pokedex entry - hlCoord 9, 4 + + coord hl, 9, 4 call PlaceString ; print species name + ld h,b ld l,c push de ld a,[wd11e] push af call IndexToPokedex - hlCoord 2, 8 + + coord hl, 2, 8 ld a, "№" ld [hli],a - ld a,$f2 + ld a,"⠄" ld [hli],a ld de,wd11e - ld bc,$8103 + lb bc, LEADING_ZEROES | 1, 3 call PrintNumber ; print pokedex number + ld hl,wPokedexOwned call IsPokemonBitSet pop af @@ -475,35 +491,39 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) ld a,[wcf91] ld [wd0b5],a pop de + push af push bc push de push hl + call Delay3 call GBPalNormal call GetMonHeader ; load pokemon picture location - hlCoord 1, 1 + coord hl, 1, 1 call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture ld a,[wcf91] call PlayCry ; play pokemon cry + pop hl pop de pop bc pop af + ld a,c and a jp z,.waitForButtonPress ; if the pokemon has not been owned, don't print the height, weight, or description inc de ; de = address of feet (height) ld a,[de] ; reads feet, but a is overwritten without being used - hlCoord 12, 6 - ld bc,$0102 + coord hl, 12, 6 + lb bc, 1, 2 call PrintNumber ; print feet (height) ld a,$60 ; feet symbol tile (one tick) ld [hl],a inc de inc de ; de = address of inches (height) - hlCoord 15, 6 - ld bc,$8102 + coord hl, 15, 6 + lb bc, LEADING_ZEROES | 1, 2 call PrintNumber ; print inches (height) ld a,$61 ; inches symbol tile (two ticks) ld [hl],a @@ -512,25 +532,25 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) inc de inc de ; de = address of upper byte of weight push de -; put weight in big-endian order at $ff8b - ld hl,$ff8b - ld a,[hl] ; save existing value of [$ff8b] +; put weight in big-endian order at hDexWeight + ld hl,hDexWeight + ld a,[hl] ; save existing value of [hDexWeight] push af ld a,[de] ; a = upper byte of weight - ld [hli],a ; store upper byte of weight in [$ff8b] - ld a,[hl] ; save existing value of [$ff8c] + ld [hli],a ; store upper byte of weight in [hDexWeight] + ld a,[hl] ; save existing value of [hDexWeight + 1] push af dec de ld a,[de] ; a = lower byte of weight - ld [hl],a ; store lower byte of weight in [$ff8c] - ld de,$ff8b - hlCoord 11, 8 - ld bc,$0205 ; no leading zeroes, right-aligned, 2 bytes, 5 digits + ld [hl],a ; store lower byte of weight in [hDexWeight + 1] + ld de,hDexWeight + coord hl, 11, 8 + lb bc, 2, 5 ; 2 bytes, 5 digits call PrintNumber ; print weight - hlCoord 14, 8 - ld a,[$ff8c] + coord hl, 14, 8 + ld a,[hDexWeight + 1] sub a,10 - ld a,[$ff8b] + ld a,[hDexWeight] sbc a,0 jr nc,.next ld [hl],"0" ; if the weight is less than 10, put a 0 before the decimal point @@ -538,14 +558,14 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) inc hl ld a,[hli] ld [hld],a ; make space for the decimal point by moving the last digit forward one tile - ld [hl],$f2 ; decimal point tile + ld [hl],"⠄" ; decimal point tile pop af - ld [$ff8c],a ; restore original value of [$ff8c] + ld [hDexWeight + 1],a ; restore original value of [hDexWeight + 1] pop af - ld [$ff8b],a ; restore original value of [$ff8b] + ld [hDexWeight],a ; restore original value of [hDexWeight] pop hl inc hl ; hl = address of pokedex description text - bcCoord 1, 11 + coord bc, 1, 11 ld a,2 ld [$fff4],a call TextCommandProcessor ; print pokedex description text @@ -554,35 +574,36 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) .waitForButtonPress call JoypadLowSensitivity ld a,[hJoy5] - and a,%00000011 ; A button and B button + and a,A_BUTTON | B_BUTTON jr z,.waitForButtonPress pop af ld [hTilesetType],a call GBPalWhiteOut call ClearScreen - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call LoadTextBoxTilePatterns call GBPalNormal ld hl,wd72c res 1,[hl] ld a,$77 ; max volume - ld [$ff24],a + ld [rNR50],a ret -HeightWeightText: ; 40448 (10:4448) - db "HT ?",$60,"??",$61,$4E,"WT ???lb@" +HeightWeightText: + db "HT ?",$60,"??",$61 + next "WT ???lb@" ; XXX does anything point to this? -Unknown_4045D: ; 4045d (10:445d) - db $54,$50 +PokeText: + db "#@" ; horizontal line that divides the pokedex text description from the rest of the data -PokedexDataDividerLine: ; 4045f (10:445f) +PokedexDataDividerLine: db $68,$69,$6B,$69,$6B db $69,$6B,$69,$6B,$6B db $6B,$6B,$69,$6B,$69 db $6B,$69,$6B,$69,$6A - db $50 + db "@" ; draws a line of tiles ; INPUT: @@ -590,7 +611,7 @@ PokedexDataDividerLine: ; 4045f (10:445f) ; c = number of tile ID's to write ; de = amount to destination address after each tile (1 for horizontal, 20 for vertical) ; hl = destination address -DrawTileLine: ; 40474 (10:4474) +DrawTileLine: push bc push de .loop @@ -604,7 +625,7 @@ DrawTileLine: ; 40474 (10:4474) INCLUDE "data/pokedex_entries.asm" -PokedexToIndex: ; 40ff9 (10:4ff9) +PokedexToIndex: ; converts the Pokédex number at wd11e to an index push bc push hl @@ -625,7 +646,7 @@ PokedexToIndex: ; 40ff9 (10:4ff9) pop bc ret -IndexToPokedex: ; 41010 (10:5010) +IndexToPokedex: ; converts the indexédex number at wd11e to a Pokédex number push bc push hl diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm index 0e904200..f6ca013b 100755 --- a/engine/menu/prize_menu.asm +++ b/engine/menu/prize_menu.asm @@ -1,4 +1,4 @@ -CeladonPrizeMenu: ; 5271b (14:671b) +CeladonPrizeMenu: ld b,COIN_CASE call IsItemInBag jr nz,.havingCoinCase @@ -13,7 +13,7 @@ CeladonPrizeMenu: ; 5271b (14:671b) xor a ld [wCurrentMenuItem],a ld [wLastMenuItem],a - ld a,$03 + ld a,A_BUTTON | B_BUTTON ld [wMenuWatchedKeys],a ld a,$03 ld [wMaxMenuItem],a @@ -21,55 +21,55 @@ CeladonPrizeMenu: ; 5271b (14:671b) ld [wTopMenuItemY],a ld a,$01 ld [wTopMenuItemX],a - call PrintPrizePrice ; 687A - hlCoord 0, 2 - ld b,$08 - ld c,$10 + call PrintPrizePrice + coord hl, 0, 2 + ld b, 8 + ld c, 16 call TextBoxBorder - call GetPrizeMenuId ;678E + call GetPrizeMenuId call UpdateSprites ld hl,WhichPrizeTextPtr call PrintText call HandleMenuInput ; menu choice handler bit 1,a ; keypress = B (Cancel) - jr nz,.NoChoice + jr nz, .noChoice ld a,[wCurrentMenuItem] - cp a,$03 ; "NO,THANKS" choice - jr z,.NoChoice - call HandlePrizeChoice ; 14:68C6 -.NoChoice + cp 3 ; "NO,THANKS" choice + jr z, .noChoice + call HandlePrizeChoice +.noChoice ld hl,wd730 res 6,[hl] ret -RequireCoinCaseTextPtr: ; 5277e (14:677e) +RequireCoinCaseTextPtr: TX_FAR _RequireCoinCaseText - db $0D + TX_WAIT db "@" -ExchangeCoinsForPrizesTextPtr: ; 52784 (14:6784) +ExchangeCoinsForPrizesTextPtr: TX_FAR _ExchangeCoinsForPrizesText db "@" -WhichPrizeTextPtr: ; 52789 (14:6789) +WhichPrizeTextPtr: TX_FAR _WhichPrizeText db "@" -GetPrizeMenuId: ; 5278e (14:678e) +GetPrizeMenuId: ; determine which one among the three ; prize-texts has been selected -; using the text ID (stored in [$FF8C]) +; using the text ID (stored in [hSpriteIndexOrTextID]) ; load the three prizes at wd13d-wd13f ; load the three prices at wd141-wd146 ; display the three prizes' names ; (distinguishing between Pokemon names ; and Items (specifically TMs) names) - ld a,[$FF8C] - sub a,$03 ; prize-texts' id are 3, 4 and 5 - ld [wd12f],a ; prize-texts' id (relative, i.e. 0, 1 or 2) + ld a,[hSpriteIndexOrTextID] + sub 3 ; prize-texts' id are 3, 4 and 5 + ld [wWhichPrizeWindow],a ; prize-texts' id (relative, i.e. 0, 1 or 2) add a add a - ld d,$00 + ld d,0 ld e,a ld hl,PrizeDifferentMenuPtrs add hl,de @@ -78,223 +78,229 @@ GetPrizeMenuId: ; 5278e (14:678e) ld e,a inc hl push hl - ld hl,W_PRIZE1 - call CopyString ; XXX what does this do + ld hl,wPrize1 + call CopyString pop hl ld a,[hli] ld h,[hl] ld l,a - ld de,wd141 - ld bc,$0006 + ld de,wPrize1Price + ld bc,6 call CopyData - ld a,[wd12f] - cp a,$02 ;is TM_menu? + ld a,[wWhichPrizeWindow] + cp 2 ;is TM_menu? jr nz,.putMonName - ld a,[W_PRIZE1] + ld a,[wPrize1] ld [wd11e],a call GetItemName - hlCoord 2, 4 + coord hl, 2, 4 call PlaceString - ld a,[W_PRIZE2] + ld a,[wPrize2] ld [wd11e],a call GetItemName - hlCoord 2, 6 + coord hl, 2, 6 call PlaceString - ld a,[W_PRIZE3] + ld a,[wPrize3] ld [wd11e],a call GetItemName - hlCoord 2, 8 + coord hl, 2, 8 call PlaceString jr .putNoThanksText -.putMonName ; 14:67EC - ld a,[W_PRIZE1] +.putMonName + ld a,[wPrize1] ld [wd11e],a call GetMonName - hlCoord 2, 4 + coord hl, 2, 4 call PlaceString - ld a,[W_PRIZE2] + ld a,[wPrize2] ld [wd11e],a call GetMonName - hlCoord 2, 6 + coord hl, 2, 6 call PlaceString - ld a,[W_PRIZE3] + ld a,[wPrize3] ld [wd11e],a call GetMonName - hlCoord 2, 8 + coord hl, 2, 8 call PlaceString -.putNoThanksText ; 14:6819 - hlCoord 2, 10 +.putNoThanksText + coord hl, 2, 10 ld de,NoThanksText call PlaceString ; put prices on the right side of the textbox - ld de,wd141 - hlCoord 13, 5 + ld de,wPrize1Price + coord hl, 13, 5 ; reg. c: ; [low nybble] number of bytes ; [bit 765 = %100] space-padding (not zero-padding) ld c,(1 << 7 | 2) ; Function $15CD displays BCD value (same routine ; used by text-command $02) - call PrintBCDNumber ; Print_BCD - ld de,wd143 - hlCoord 13, 7 - ld c,(%1 << 7 | 2) call PrintBCDNumber - ld de,wd145 - hlCoord 13, 9 + ld de,wPrize2Price + coord hl, 13, 7 + ld c,(1 << 7 | 2) + call PrintBCDNumber + ld de,wPrize3Price + coord hl, 13, 9 ld c,(1 << 7 | 2) jp PrintBCDNumber INCLUDE "data/prizes.asm" -PrintPrizePrice: ; 5287a (14:687a) - hlCoord 11, 0 - ld b,$01 - ld c,$07 +PrintPrizePrice: + coord hl, 11, 0 + ld b, 1 + ld c, 7 call TextBoxBorder - call UpdateSprites ; XXX save OAM? - hlCoord 12, 0 - ld de,.CoinText + call UpdateSprites + coord hl, 12, 0 + ld de, .CoinString call PlaceString - hlCoord 13, 1 - ld de,.SixSpacesText + coord hl, 13, 1 + ld de, .SixSpacesString call PlaceString - hlCoord 13, 1 + coord hl, 13, 1 ld de,wPlayerCoins ld c,%10000010 call PrintBCDNumber ret -.CoinText ; 14:68A5 +.CoinString: db "COIN@" -.SixSpacesText ; 14:68AA +.SixSpacesString: db " @" -LoadCoinsToSubtract: ; 528b1 (14:68b1) - ld a,[wd139] ; backup of selected menu_entry +LoadCoinsToSubtract: + ld a,[wWhichPrize] add a - ld d,$00 + ld d,0 ld e,a - ld hl,wd141 ; first prize's price + ld hl,wPrize1Price add hl,de ; get selected prize's price xor a - ld [$FF9F],a + ld [hUnusedCoinsByte],a ld a,[hli] - ld [$FFA0],a + ld [hCoins],a ld a,[hl] - ld [$FFA1],a + ld [hCoins + 1],a ret -HandlePrizeChoice: ; 528c6 (14:68c6) - ld a,[wCurrentMenuItem] ; selected menu_entry - ld [wd139],a - ld d,$00 +HandlePrizeChoice: + ld a,[wCurrentMenuItem] + ld [wWhichPrize],a + ld d,0 ld e,a - ld hl,W_PRIZE1 + ld hl,wPrize1 add hl,de ld a,[hl] ld [wd11e],a - ld a,[wd12f] - cp a,$02 ; is prize a TM? - jr nz,.GetMonName + ld a,[wWhichPrizeWindow] + cp 2 ; is prize a TM? + jr nz, .getMonName call GetItemName - jr .GivePrize -.GetMonName ; 14:68E3 + jr .givePrize +.getMonName call GetMonName -.GivePrize ; 14:68E6 +.givePrize ld hl,SoYouWantPrizeTextPtr call PrintText - call YesNoChoice ; yes/no textbox + call YesNoChoice ld a,[wCurrentMenuItem] ; yes/no answer (Y=0, N=1) and a - jr nz,.PrintOhFineThen + jr nz, .printOhFineThen call LoadCoinsToSubtract call HasEnoughCoins - jr c,.NotEnoughCoins - ld a,[wd12f] - cp a,$02 - jr nz,.GiveMon + jr c, .notEnoughCoins + ld a,[wWhichPrizeWindow] + cp $02 + jr nz, .giveMon ld a,[wd11e] ld b,a ld a,1 ld c,a - call GiveItem ; GiveItem - jr nc,.BagFull - jr .SubtractCoins -.GiveMon ; 14:6912 + call GiveItem + jr nc, .bagFull + jr .subtractCoins +.giveMon ld a,[wd11e] ld [wcf91],a push af - call GetPrizeMonLevel ; 14:6977 + call GetPrizeMonLevel ld c,a pop af ld b,a call GivePokemon + +; If either the party or box was full, wait after displaying message. push af - ld a,[wccd3] ; XXX is there room? + ld a,[wAddedToParty] and a call z,WaitForTextScrollButtonPress pop af + +; If the mon couldn't be given to the player (because both the party and box +; were full), return without subtracting coins. ret nc -.SubtractCoins ; 14:692C + +.subtractCoins call LoadCoinsToSubtract - ld hl,$FFA1 + ld hl,hCoins + 1 ld de,wPlayerCoins + 1 ld c,$02 ; how many bytes - predef SubBCDPredef ; subtract coins (BCD daa operations) + predef SubBCDPredef jp PrintPrizePrice -.BagFull +.bagFull ld hl,PrizeRoomBagIsFullTextPtr jp PrintText -.NotEnoughCoins ; 14:6945 +.notEnoughCoins ld hl,SorryNeedMoreCoinsText jp PrintText -.PrintOhFineThen ; 14:694B +.printOhFineThen ld hl,OhFineThenTextPtr jp PrintText -UnknownData52951: ; 52951 (14:6951) +UnknownPrizeData: ; XXX what's this? db $00,$01,$00,$01,$00,$01,$00,$00,$01 -HereYouGoTextPtr: ; 5295a (14:695a) +HereYouGoTextPtr: TX_FAR _HereYouGoText - db $0D + TX_WAIT db "@" -SoYouWantPrizeTextPtr: ; 52960 (14:6960) +SoYouWantPrizeTextPtr: TX_FAR _SoYouWantPrizeText db "@" -SorryNeedMoreCoinsText: ; 52965 (14:6965) +SorryNeedMoreCoinsText: TX_FAR _SorryNeedMoreCoinsText - db $0D + TX_WAIT db "@" -PrizeRoomBagIsFullTextPtr: ; 5296b (14:696b) +PrizeRoomBagIsFullTextPtr: TX_FAR _OopsYouDontHaveEnoughRoomText - db $0D + TX_WAIT db "@" -OhFineThenTextPtr: ; 52971 (14:6971) +OhFineThenTextPtr: TX_FAR _OhFineThenText - db $0D ; wait keypress (A/B) without blink + TX_WAIT db "@" -GetPrizeMonLevel: ; 52977 (14:6977) +GetPrizeMonLevel: ld a,[wcf91] ld b,a ld hl,PrizeMonLevelDictionary -.loop ; 14:697E +.loop ld a,[hli] cp b jr z,.matchFound inc hl jr .loop -.matchFound ; 14:6985 +.matchFound ld a,[hl] - ld [W_CURENEMYLVL],a + ld [wCurEnemyLVL],a ret INCLUDE "data/prize_mon_levels.asm" diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm index da17822b..029d8c01 100755 --- a/engine/menu/start_menu.asm +++ b/engine/menu/start_menu.asm @@ -1,16 +1,16 @@ -DisplayStartMenu:: ; 2acd (0:2acd) - ld a,$04 ; hardcoded Bank, not sure what's it refers to +DisplayStartMenu:: + 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 + ld a, SFX_START_MENU call PlaySound -RedisplayStartMenu:: ; 2adf (0:2adf) +RedisplayStartMenu:: callba DrawStartMenu callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone - call UpdateSprites ; move sprites + call UpdateSprites .loop call HandleMenuInput ld b,a @@ -24,8 +24,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf) and a jr nz,.loop ; if the player pressed tried to go past the top item, wrap around to the bottom - ld a,[wd74b] - bit 5,a ; does the player have the pokedex? + CheckEvent EVENT_GOT_POKEDEX ld a,6 ; there are 7 menu items with the pokedex, so the max index is 6 jr nz,.wrapMenuItemId dec a ; there are only 6 menu items without the pokedex @@ -37,8 +36,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf) bit 7,a jr z,.buttonPressed ; if the player pressed tried to go past the bottom item, wrap around to the top - ld a,[wd74b] - bit 5,a ; does the player have the pokedex? + CheckEvent EVENT_GOT_POKEDEX ld a,[wCurrentMenuItem] ld c,7 ; there are 7 menu items with the pokedex jr nz,.checkIfPastBottom @@ -54,13 +52,12 @@ RedisplayStartMenu:: ; 2adf (0:2adf) .buttonPressed ; A, B, or Start button pressed call PlaceUnfilledArrowMenuCursor ld a,[wCurrentMenuItem] - ld [wcc2d],a ; save current menu item ID + ld [wBattleAndStartSavedMenuItem],a ; save current menu selection ld a,b and a,%00001010 ; was the Start button or B button pressed? jp nz,CloseStartMenu call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2 - ld a,[wd74b] - bit 5,a ; does the player have the pokedex? + CheckEvent EVENT_GOT_POKEDEX ld a,[wCurrentMenuItem] jr nz,.displayMenuItem inc a ; adjust position to account for missing pokedex menu item @@ -79,7 +76,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf) jp z,StartMenu_Option ; EXIT falls through to here -CloseStartMenu:: ; 2b70 (0:2b70) +CloseStartMenu:: call Joypad ld a,[hJoyPressed] bit 0,a ; was A button newly pressed? diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index 589224ab..251d7ae4 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -1,4 +1,4 @@ -StartMenu_Pokedex: ; 13095 (4:7095) +StartMenu_Pokedex: predef ShowPokedexMenu call LoadScreenTilesFromBuffer2 ; restore saved screen call Delay3 @@ -6,20 +6,20 @@ StartMenu_Pokedex: ; 13095 (4:7095) call UpdateSprites jp RedisplayStartMenu -StartMenu_Pokemon: ; 130a9 (4:70a9) +StartMenu_Pokemon: ld a,[wPartyCount] and a jp z,RedisplayStartMenu xor a ld [wMenuItemToSwap],a - ld [wd07d],a + ld [wPartyMenuTypeOrMessageID],a ld [wUpdateSpritesEnabled],a call DisplayPartyMenu jr .checkIfPokemonChosen .loop xor a ld [wMenuItemToSwap],a - ld [wd07d],a + ld [wPartyMenuTypeOrMessageID],a call GoBackToPartyMenu .checkIfPokemonChosen jr nc,.chosePokemon @@ -33,14 +33,14 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) ld a,FIELD_MOVE_MON_MENU ld [wTextBoxID],a call DisplayTextBoxID ; display pokemon menu options - ld hl,wWhichTrade - ld bc,$020c ; max menu item ID, top menu item Y + ld hl,wFieldMoves + lb bc, 2, 12 ; max menu item ID, top menu item Y ld e,5 .adjustMenuVariablesLoop dec e jr z,.storeMenuVariables ld a,[hli] - and a + and a ; end of field moves? jr z,.storeMenuVariables inc b dec c @@ -50,14 +50,14 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) ld hl,wTopMenuItemY ld a,c ld [hli],a ; top menu item Y - ld a,[$fff7] + ld a,[hFieldMoveMonMenuTopMenuItemX] ld [hli],a ; top menu item X xor a ld [hli],a ; current menu item ID inc hl ld a,b ld [hli],a ; max menu item ID - ld a,%00000011 ; A button, B button + ld a,A_BUTTON | B_BUTTON ld [hli],a ; menu watched keys xor a ld [hl],a @@ -81,22 +81,22 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) jp z,.choseStats ld c,a ld b,0 - ld hl,wWhichTrade + ld hl,wFieldMoves add hl,bc jp .choseOutOfBattleMove .choseSwitch ld a,[wPartyCount] cp a,2 ; is there more than one pokemon in the party? jp c,StartMenu_Pokemon ; if not, no switching - call SwitchPartyMon_Stats - ld a,$04 ; swap pokemon positions menu - ld [wd07d],a + call SwitchPartyMon_InitVarOrSwapData ; init [wMenuItemToSwap] + ld a,SWAP_MONS_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a call GoBackToPartyMenu jp .checkIfPokemonChosen .choseStats call ClearSprites - xor a - ld [wcc49],a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation],a predef StatusScreen predef StatusScreen2 call ReloadMapData @@ -117,7 +117,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) ld a,[hli] ld h,[hl] ld l,a - ld a,[W_OBTAINEDBADGES] ; badges obtained + ld a,[wObtainedBadges] ; badges obtained jp [hl] .outOfBattleMovePointers dw .cut @@ -153,23 +153,23 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) bit 1,a ; does the player have the Cascade Badge? jp z,.newBadgeRequired predef UsedCut - ld a,[wcd6a] + ld a,[wActionResultOrTookBattleTurn] and a jp z,.loop jp CloseTextDisplay .surf bit 4,a ; does the player have the Soul Badge? jp z,.newBadgeRequired - callba CheckForForcedBikeSurf + callba IsSurfingAllowed ld hl,wd728 bit 1,[hl] res 1,[hl] jp z,.loop ld a,SURFBOARD ld [wcf91],a - ld [wd152],a + ld [wPseudoItemID],a call UseItem - ld a,[wcd6a] + ld a,[wActionResultOrTookBattleTurn] and a jp z,.loop call GBPalWhiteOutWithDelay3 @@ -195,9 +195,9 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) .dig ld a,ESCAPE_ROPE ld [wcf91],a - ld [wd152],a + ld [wPseudoItemID],a call UseItem - ld a,[wcd6a] + ld a,[wActionResultOrTookBattleTurn] and a jp z,.loop call GBPalWhiteOutWithDelay3 @@ -222,7 +222,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) res 4,[hl] ld c,60 call DelayFrames - call GBPalWhiteOutWithDelay3 ; zero all three palettes and wait 3 V-blanks + call GBPalWhiteOutWithDelay3 jp .goBackToMap .warpToLastPokemonCenterText TX_FAR _WarpToLastPokemonCenterText @@ -256,14 +256,14 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) ld a,[H_QUOTIENT + 2] sbc b jp nc,.notHealthyEnough - ld a,[wcc2b] + ld a,[wPartyAndBillsPCSavedMenuItem] push af ld a,POTION ld [wcf91],a - ld [wd152],a + ld [wPseudoItemID],a call UseItem pop af - ld [wcc2b],a + ld [wPartyAndBillsPCSavedMenuItem],a jp .loop .notHealthyEnough ; if current HP is less than 1/5 of max HP ld hl,.notHealthyEnoughText @@ -284,8 +284,8 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) db "@" ; writes a blank tile to all possible menu cursor positions on the party menu -ErasePartyMenuCursors: ; 132ed (4:72ed) - hlCoord 0, 1 +ErasePartyMenuCursors: + coord hl, 0, 1 ld bc,2 * 20 ; menu cursor positions are 2 rows apart ld a,6 ; 6 menu cursor positions .loop @@ -295,11 +295,11 @@ ErasePartyMenuCursors: ; 132ed (4:72ed) jr nz,.loop ret -ItemMenuLoop: ; 132fc (4:72fc) +ItemMenuLoop: call LoadScreenTilesFromBuffer2DisableBGTransfer ; restore saved screen - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand -StartMenu_Item: ; 13302 (4:7302) +StartMenu_Item: ld a,[wLinkState] dec a ; is the player in the Colosseum or Trade Centre? jr nz,.notInCableClubRoom @@ -308,24 +308,24 @@ StartMenu_Item: ; 13302 (4:7302) jr .exitMenu .notInCableClubRoom ld bc,wNumBagItems - ld hl,wList + ld hl,wListPointer ld a,c ld [hli],a - ld [hl],b ; store item bag pointer at wList (for DisplayListMenuID) + ld [hl],b ; store item bag pointer in wListPointer (for DisplayListMenuID) xor a - ld [wcf93],a + ld [wPrintItemPrices],a ld a,ITEMLISTMENU ld [wListMenuID],a - ld a,[wcc2c] + ld a,[wBagSavedMenuItem] ld [wCurrentMenuItem],a call DisplayListMenuID ld a,[wCurrentMenuItem] - ld [wcc2c],a + ld [wBagSavedMenuItem],a jr nc,.choseItem .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) @@ -354,7 +354,7 @@ StartMenu_Item: ; 13302 (4:7302) inc hl inc a ; a = 1 ld [hli],a ; max menu item ID - ld a,%00000011 ; A button, B button + ld a,A_BUTTON | B_BUTTON ld [hli],a ; menu watched keys xor a ld [hl],a ; old menu item id @@ -381,8 +381,8 @@ StartMenu_Item: ; 13302 (4:7302) ld a,[wCurrentMenuItem] and a jr nz,.tossItem -.useItem - ld [wd152],a +; use item + ld [wPseudoItemID],a ; a must be 0 due to above conditional jump ld a,[wcf91] cp a,HM_01 jr nc,.useItem_partyMenu @@ -399,9 +399,9 @@ StartMenu_Item: ; 13302 (4:7302) jp ItemMenuLoop .useItem_closeMenu xor a - ld [wd152],a + ld [wPseudoItemID],a call UseItem - ld a,[wcd6a] + ld a,[wActionResultOrTookBattleTurn] and a jp z,ItemMenuLoop jp CloseStartMenu @@ -409,7 +409,7 @@ StartMenu_Item: ; 13302 (4:7302) ld a,[wUpdateSpritesEnabled] push af call UseItem - ld a,[wcd6a] + ld a,[wActionResultOrTookBattleTurn] cp a,$02 jp z,.partyMenuNotDisplayed call GBPalWhiteOutWithDelay3 @@ -423,7 +423,7 @@ StartMenu_Item: ; 13302 (4:7302) jp ItemMenuLoop .tossItem call IsKeyItem - ld a,[wd124] + ld a,[wIsKeyItem] and a jr nz,.skipAskingQuantity ld a,[wcf91] @@ -438,16 +438,16 @@ StartMenu_Item: ; 13302 (4:7302) .tossZeroItems jp ItemMenuLoop -CannotUseItemsHereText: ; 1342a (4:742a) +CannotUseItemsHereText: TX_FAR _CannotUseItemsHereText db "@" -CannotGetOffHereText: ; 1342f (4:742f) +CannotGetOffHereText: TX_FAR _CannotGetOffHereText db "@" ; items which bring up the party menu when used -UsableItems_PartyMenu: ; 13434 (4:7434) +UsableItems_PartyMenu: db MOON_STONE db ANTIDOTE db BURN_HEAL @@ -487,7 +487,7 @@ UsableItems_PartyMenu: ; 13434 (4:7434) db $ff ; items which close the item menu when used -UsableItems_CloseMenu: ; 13459 (4:7459) +UsableItems_CloseMenu: db ESCAPE_ROPE db ITEMFINDER db POKE_FLUTE @@ -496,24 +496,24 @@ UsableItems_CloseMenu: ; 13459 (4:7459) db SUPER_ROD db $ff -StartMenu_TrainerInfo: ; 13460 (4:7460) +StartMenu_TrainerInfo: call GBPalWhiteOut call ClearScreen - call UpdateSprites ; move sprites + call UpdateSprites ld a,[hTilesetType] push af xor a ld [hTilesetType],a call DrawTrainerInfo predef DrawBadges ; draw badges - ld b,$0d - call GoPAL_SET + ld b, SET_PAL_TRAINER_CARD + call RunPaletteCommand call GBPalNormal call WaitForTextScrollButtonPress ; wait for button press call GBPalWhiteOut call LoadFontTilePatterns call LoadScreenTilesFromBuffer2 ; restore saved screen - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call ReloadMapData call LoadGBPal pop af @@ -521,39 +521,39 @@ StartMenu_TrainerInfo: ; 13460 (4:7460) jp RedisplayStartMenu ; loads tile patterns and draws everything except for gym leader faces / badges -DrawTrainerInfo: ; 1349a (4:749a) +DrawTrainerInfo: ld de,RedPicFront - ld bc,(BANK(RedPicFront) << 8) | $01 - predef Predef3B + lb bc, BANK(RedPicFront), $01 + predef DisplayPicCenteredOrUpperRight call DisableLCD - hlCoord 0, 2 + coord hl, 0, 2 ld a," " call TrainerInfo_DrawVerticalLine - hlCoord 1, 2 + coord hl, 1, 2 call TrainerInfo_DrawVerticalLine ld hl,vChars2 + $70 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,80 +562,80 @@ 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 - ld hl,wWhichTrade + ld hl,wTrainerInfoTextBoxWidthPlus1 ld a,18 + 1 ld [hli],a dec a ld [hli],a ld [hl],1 - hlCoord 0, 0 + coord hl, 0, 0 call TrainerInfo_DrawTextBox - ld hl,wWhichTrade + ld hl,wTrainerInfoTextBoxWidthPlus1 ld a,16 + 1 ld [hli],a dec a ld [hli],a ld [hl],3 - hlCoord 1, 10 + coord hl, 1, 10 call TrainerInfo_DrawTextBox - hlCoord 0, 10 + coord hl, 0, 10 ld a,$d7 call TrainerInfo_DrawVerticalLine - hlCoord 19, 10 + coord hl, 19, 10 call TrainerInfo_DrawVerticalLine - hlCoord 6, 9 + coord hl, 6, 9 ld de,TrainerInfo_BadgesText call PlaceString - hlCoord 2, 2 + coord hl, 2, 2 ld de,TrainerInfo_NameMoneyTimeText call PlaceString - hlCoord 7, 2 + coord hl, 7, 2 ld de,wPlayerName call PlaceString - hlCoord 8, 4 + coord hl, 8, 4 ld de,wPlayerMoney ld c,$e3 call PrintBCDNumber - hlCoord 9, 6 - ld de,W_PLAYTIMEHOURS + 1 ; hours - ld bc,$4103 + coord hl, 9, 6 + ld de,wPlayTimeHours ; hours + lb bc, LEFT_ALIGN | 1, 3 call PrintNumber ld [hl],$d6 ; colon tile ID inc hl - ld de,W_PLAYTIMEMINUTES + 1 ; minutes - ld bc,$8102 + ld de,wPlayTimeMinutes ; minutes + lb bc, LEADING_ZEROES | 1, 2 jp PrintNumber -TrainerInfo_FarCopyData: ; 1357f (4:757f) - ld a,$0b +TrainerInfo_FarCopyData: + ld a,BANK(TrainerInfoTextBoxTileGraphics) jp FarCopyData2 -TrainerInfo_NameMoneyTimeText: ; 13584 (4:7584) +TrainerInfo_NameMoneyTimeText: db "NAME/" next "MONEY/" next "TIME/@" ; $76 is a circle tile -TrainerInfo_BadgesText: ; 13597 (4:7597) +TrainerInfo_BadgesText: db $76,"BADGES",$76,"@" ; draws a text box on the trainer info screen ; height is always 6 ; INPUT: ; hl = destination address -; [wWhichTrade] = width + 1 -; [wTrainerEngageDistance] = width -; [wTrainerFacingDirection] = distance from the end of a text box row to the start of the next -TrainerInfo_DrawTextBox: ; 135a0 (4:75a0) +; [wTrainerInfoTextBoxWidthPlus1] = width +; [wTrainerInfoTextBoxWidth] = width - 1 +; [wTrainerInfoTextBoxNextRowOffset] = distance from the end of a text box row to the start of the next +TrainerInfo_DrawTextBox: ld a,$79 ; upper left corner tile ID - ld de,$7a7b ; top edge and upper right corner tile ID's + lb de, $7a, $7b ; top edge and upper right corner tile ID's call TrainerInfo_DrawHorizontalEdge ; draw top edge call TrainerInfo_NextTextBoxRow - ld a,[wWhichTrade] ; width of the text box plus one + ld a,[wTrainerInfoTextBoxWidthPlus1] ld e,a ld d,0 ld c,6 ; height of the text box @@ -647,11 +647,11 @@ TrainerInfo_DrawTextBox: ; 135a0 (4:75a0) dec c jr nz,.loop ld a,$7d ; lower left corner tile ID - ld de,$777e ; bottom edge and lower right corner tile ID's + lb de,$77, $7e ; bottom edge and lower right corner tile ID's -TrainerInfo_DrawHorizontalEdge: ; 135c3 (4:75c3) +TrainerInfo_DrawHorizontalEdge: ld [hli],a ; place left corner tile - ld a,[wTrainerEngageDistance] ; width of the text box + ld a,[wTrainerInfoTextBoxWidth] ld c,a ld a,d .loop @@ -662,8 +662,8 @@ TrainerInfo_DrawHorizontalEdge: ; 135c3 (4:75c3) ld [hl],a ; place right corner tile ret -TrainerInfo_NextTextBoxRow: ; 135d0 (4:75d0) - ld a,[wTrainerFacingDirection] ; distance to the start of the next row +TrainerInfo_NextTextBoxRow: + ld a,[wTrainerInfoTextBoxNextRowOffset] ; distance to the start of the next row .loop inc hl dec a @@ -674,8 +674,8 @@ TrainerInfo_NextTextBoxRow: ; 135d0 (4:75d0) ; INPUT: ; hl = address of top tile in the line ; a = tile ID -TrainerInfo_DrawVerticalLine: ; 135d8 (4:75d8) - ld de,20 +TrainerInfo_DrawVerticalLine: + ld de,SCREEN_WIDTH ld c,8 .loop ld [hl],a @@ -684,7 +684,7 @@ TrainerInfo_DrawVerticalLine: ; 135d8 (4:75d8) jr nz,.loop ret -StartMenu_SaveReset: ; 135e3 (4:75e3) +StartMenu_SaveReset: ld a,[wd72e] bit 6,a ; is the player using the link feature? jp nz,Init @@ -692,7 +692,7 @@ StartMenu_SaveReset: ; 135e3 (4:75e3) call LoadScreenTilesFromBuffer2 ; restore saved screen jp HoldTextDisplayOpen -StartMenu_Option: ; 135f6 (4:75f6) +StartMenu_Option: xor a ld [H_AUTOBGTRANSFERENABLED],a call ClearScreen @@ -703,63 +703,66 @@ StartMenu_Option: ; 135f6 (4:75f6) call UpdateSprites jp RedisplayStartMenu -SwitchPartyMon: ; 13613 (4:7613) - call SwitchPartyMon_Stats - ld a, [wWhichTrade] ; wWhichTrade - call SwitchPartyMon_OAM - ld a, [wCurrentMenuItem] ; wCurrentMenuItem - call SwitchPartyMon_OAM +SwitchPartyMon: + call SwitchPartyMon_InitVarOrSwapData ; swap data + ld a, [wSwappedMenuItem] + call SwitchPartyMon_ClearGfx + ld a, [wCurrentMenuItem] + call SwitchPartyMon_ClearGfx jp RedrawPartyMenu_ -SwitchPartyMon_OAM: ; 13625 (4:7625) +SwitchPartyMon_ClearGfx: push af - ld hl, wTileMap - ld bc, $28 + coord hl, 0, 0 + ld bc, SCREEN_WIDTH * 2 call AddNTimes - ld c, $28 - ld a, $7f -.asm_13633 + ld c, SCREEN_WIDTH * 2 + ld a, " " +.clearMonBGLoop ; clear the mon's row in the party menu ld [hli], a dec c - jr nz, .asm_13633 + jr nz, .clearMonBGLoop pop af ld hl, wOAMBuffer ld bc, $10 call AddNTimes ld de, $4 ld c, e -.asm_13645 +.clearMonOAMLoop ld [hl], $a0 add hl, de dec c - jr nz, .asm_13645 + jr nz, .clearMonOAMLoop call WaitForSoundToFinish - ld a, (SFX_02_58 - SFX_Headers_02) / 3 + ld a, SFX_SWAP jp PlaySound -SwitchPartyMon_Stats: ; 13653 (4:7653) +SwitchPartyMon_InitVarOrSwapData: +; This is used to initialise [wMenuItemToSwap] and to actually swap the data. ld a, [wMenuItemToSwap] - and a - jr nz, .asm_13661 - ld a, [wWhichPokemon] ; wWhichPokemon - inc a + and a ; has [wMenuItemToSwap] been initialised yet? + jr nz, .pickedMonsToSwap +; If not, initialise [wMenuItemToSwap] so that it matches the current mon. + ld a, [wWhichPokemon] + inc a ; [wMenuItemToSwap] counts from 1 ld [wMenuItemToSwap], a ret -.asm_13661 +.pickedMonsToSwap xor a - ld [wd07d], a + ld [wPartyMenuTypeOrMessageID], a ld a, [wMenuItemToSwap] dec a ld b, a - ld a, [wCurrentMenuItem] ; wCurrentMenuItem - ld [wWhichTrade], a ; wWhichTrade - cp b - jr nz, .asm_1367b + ld a, [wCurrentMenuItem] + ld [wSwappedMenuItem], a + cp b ; swapping a mon with itself? + jr nz, .swappingDifferentMons +; can't swap a mon with itself xor a ld [wMenuItemToSwap], a - ld [wd07d], a + ld [wPartyMenuTypeOrMessageID], a ret -.asm_1367b +.swappingDifferentMons ld a, b ld [wMenuItemToSwap], a push hl @@ -767,85 +770,85 @@ 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 + jr nc, .noCarry inc h -.asm_1368e +.noCarry ld a, [wMenuItemToSwap] add e ld e, a - jr nc, .asm_13696 + jr nc, .noCarry2 inc d -.asm_13696 +.noCarry2 ld a, [hl] - ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + ld [hSwapTemp], a ld a, [de] ld [hl], a - ld a, [H_DIVIDEND] ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + ld a, [hSwapTemp] ld [de], a ld hl, wPartyMons ld bc, wPartyMon2 - wPartyMon1 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] call AddNTimes push hl ld de, wSwitchPartyMonTempBuffer - ld bc, $2c + ld bc, wPartyMon2 - wPartyMon1 call CopyData ld hl, wPartyMons - ld bc, $2c + ld bc, wPartyMon2 - wPartyMon1 ld a, [wMenuItemToSwap] call AddNTimes pop de push hl - ld bc, $2c + ld bc, wPartyMon2 - wPartyMon1 call CopyData pop de ld hl, wSwitchPartyMonTempBuffer - ld bc, $2c + ld bc, wPartyMon2 - wPartyMon1 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 + ld bc, NAME_LENGTH call CopyData - ld hl, wPartyMonOT ; wd273 + ld hl, wPartyMonOT ld a, [wMenuItemToSwap] call SkipFixedLengthTextEntries pop de push hl - ld bc, $b + ld bc, NAME_LENGTH call CopyData pop de ld hl, wSwitchPartyMonTempBuffer - ld bc, $b + ld bc, NAME_LENGTH 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 + ld bc, NAME_LENGTH call CopyData - ld hl, wPartyMonNicks ; wPartyMonNicks + ld hl, wPartyMonNicks ld a, [wMenuItemToSwap] call SkipFixedLengthTextEntries pop de push hl - ld bc, $b + ld bc, NAME_LENGTH call CopyData pop de ld hl, wSwitchPartyMonTempBuffer - ld bc, $b + ld bc, NAME_LENGTH call CopyData ld a, [wMenuItemToSwap] - ld [wWhichTrade], a ; wWhichTrade + ld [wSwappedMenuItem], a xor a ld [wMenuItemToSwap], a - ld [wd07d], a + ld [wPartyMenuTypeOrMessageID], a pop de pop hl ret diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index b5254694..ef94f13c 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -1,15 +1,15 @@ -DrawHP: ; 128ef (4:68ef) +DrawHP: ; Draws the HP bar in the stats screen call GetPredefRegisters ld a, $1 jr DrawHP_ -DrawHP2: ; 128f6 (4:68f6) +DrawHP2: ; Draws the HP bar in the party screen call GetPredefRegisters ld a, $2 -DrawHP_: ; 128fb (4:68fb) +DrawHP_: ld [wHPBarType], a push hl ld a, [wLoadedMonHP] @@ -50,12 +50,12 @@ DrawHP_: ; 128fb (4:68fb) .printFraction add hl, bc ld de, wLoadedMonHP - ld bc, $203 + lb bc, 2, 3 call PrintNumber ld a, "/" ld [hli], a ld de, wLoadedMonMaxHP - ld bc, $203 + lb bc, 2, 3 call PrintNumber pop hl pop de @@ -63,14 +63,15 @@ DrawHP_: ; 128fb (4:68fb) ; Predef 0x37 -StatusScreen: ; 12953 (4:6953) +StatusScreen: call LoadMonData - ld a, [wcc49] - cp $2 ; 2 means we're in a PC box - jr c, .DontRecalculate ; 0x1295b $14 + ld a, [wMonDataLocation] + cp BOX_DATA + jr c, .DontRecalculate +; mon is in a box or daycare ld a, [wLoadedMonBoxLevel] ld [wLoadedMonLevel], a - ld [W_CURENEMYLVL], a + ld [wCurEnemyLVL], a ld hl, wLoadedMonHPExp - 1 ld de, wLoadedMonStats ld b, $1 @@ -79,95 +80,95 @@ StatusScreen: ; 12953 (4:6953) ld hl, wd72c set 1, [hl] ld a, $33 - ld [$ff24], a ; Reduce the volume + ld [rNR50], 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 + lb bc, BANK(BattleHudTiles1), $03 call CopyVideoDataDouble ; ·│ :L and halfarrow line end - ld de, BattleHudTiles2 ; $6098 + ld de, BattleHudTiles2 ld hl, vChars2 + $780 - ld bc, (BANK(BattleHudTiles2) << 8) + $01 + lb bc, BANK(BattleHudTiles2), $01 call CopyVideoDataDouble ; │ - ld de, BattleHudTiles3 ; $60b0 + ld de, BattleHudTiles3 ld hl, vChars2 + $760 - ld bc, (BANK(BattleHudTiles3) << 8) + $02 + lb bc, BANK(BattleHudTiles3), $02 call CopyVideoDataDouble ; ─┘ ld de, PTile ld hl, vChars2 + $720 - ld bc,(BANK(PTile) << 8 | $01) + lb bc, BANK(PTile), (PTileEnd - PTile) / $8 call CopyVideoDataDouble ; P (for PP), inline ld a, [hTilesetType] push af xor a ld [hTilesetType], a - hlCoord 19, 1 - ld bc, $060a + coord hl, 19, 1 + lb bc, 6, 10 call DrawLineBox ; Draws the box around name, HP and status - ld de, $fffa + ld de, -6 add hl, de - ld [hl], $f2 ; . after No ("." is a different one) + ld [hl], "⠄" ; . after No ("." is a different one) dec hl ld [hl], "№" - hlCoord 19, 9 - ld bc, $0806 + coord hl, 19, 9 + lb bc, 8, 6 call DrawLineBox ; Draws the box around types, ID No. and OT - hlCoord 10, 9 + coord hl, 10, 9 ld de, Type1Text call PlaceString ; "TYPE1/" - hlCoord 11, 3 + coord hl, 11, 3 predef DrawHP - ld hl, wcf25 + ld hl, wStatusScreenHPBarColor call GetHealthBarColor - ld b, $3 - call GoPAL_SET ; SGB palette - hlCoord 16, 6 + ld b, SET_PAL_STATUS_SCREEN + call RunPaletteCommand + coord hl, 16, 6 ld de, wLoadedMonStatus call PrintStatusCondition - jr nz, .StatusWritten ; 0x129fc $9 - hlCoord 16, 6 + jr nz, .StatusWritten + coord hl, 16, 6 ld de, OKText call PlaceString ; "OK" .StatusWritten - hlCoord 9, 6 + coord hl, 9, 6 ld de, StatusText call PlaceString ; "STATUS/" - hlCoord 14, 2 + coord hl, 14, 2 call PrintLevel ; Pokémon level - ld a, [W_MONHDEXNUM] + ld a, [wMonHIndex] ld [wd11e], a ld [wd0b5], a predef IndexToPokedex - hlCoord 3, 7 + coord hl, 3, 7 ld de, wd11e - ld bc, $8103 ; Zero-padded, 3 + lb bc, LEADING_ZEROES | 1, 3 call PrintNumber ; Pokémon no. - hlCoord 11, 10 + coord hl, 11, 10 predef PrintMonType - ld hl, NamePointers2 ; $6a9d - call .unk_12a7e + ld hl, NamePointers2 + call .GetStringPointer ld d, h ld e, l - hlCoord 9, 1 + coord hl, 9, 1 call PlaceString ; Pokémon name - ld hl, OTPointers ; $6a95 - call .unk_12a7e + ld hl, OTPointers + call .GetStringPointer ld d, h ld e, l - hlCoord 12, 16 + coord hl, 12, 16 call PlaceString ; OT - hlCoord 12, 14 + coord hl, 12, 14 ld de, wLoadedMonOTID - ld bc, $8205 ; 5 + lb bc, LEADING_ZEROES | 2, 5 call PrintNumber ; ID Number ld d, $0 call PrintStatsBox call Delay3 call GBPalNormal - hlCoord 1, 0 + coord hl, 1, 0 call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture ld a, [wcf91] call PlayCry ; play Pokémon cry @@ -175,89 +176,92 @@ StatusScreen: ; 12953 (4:6953) pop af ld [hTilesetType], a ret -.unk_12a7e ; 0x12a7e ; I don't know what this does, iterates over pointers? - ld a, [wcc49] + +.GetStringPointer + ld a, [wMonDataLocation] add a ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hli] ld h, [hl] ld l, a - ld a, [wcc49] - cp $3 + ld a, [wMonDataLocation] + cp DAYCARE_DATA ret z ld a, [wWhichPokemon] jp SkipFixedLengthTextEntries -OTPointers: ; 12a95 (4:6a95) +OTPointers: dw wPartyMonOT dw wEnemyMonOT dw wBoxMonOT - dw W_DAYCAREMONOT + dw wDayCareMonOT -NamePointers2: ; 12a9d (4:6a9d) +NamePointers2: dw wPartyMonNicks dw wEnemyMonNicks dw wBoxMonNicks - dw W_DAYCAREMONNAME + dw wDayCareMonName -Type1Text: ; 12aa5 (4:6aa5) +Type1Text: db "TYPE1/", $4e -Type2Text: ; 12aac (4:6aac) +Type2Text: db "TYPE2/", $4e -IDNoText: ; 12ab3 (4:6ab3) - db $73, "№", "/", $4e +IDNoText: + db $73, "№/", $4e -OTText: ; 12ab7 (4:6ab7) - db "OT/", $4e, "@" +OTText: + db "OT/" + next "@" -StatusText: ; 12abc (4:6abc) +StatusText: db "STATUS/@" -OKText: ; 12ac4 (4:6ac4) +OKText: db "OK@" ; Draws a line starting from hl high b and wide c -DrawLineBox ; 0x12ac7 - ld de, $0014 ; New line +DrawLineBox: + ld de, SCREEN_WIDTH ; 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 -PTile: ; 12adc (4:6adc) ; This is a single 1bpp "P" tile +PTile: ; This is a single 1bpp "P" tile INCBIN "gfx/p_tile.1bpp" +PTileEnd: -PrintStatsBox: ; 12ae4 (4:6ae4) +PrintStatsBox: ld a, d and a ; a is 0 from the status screen - jr nz, .DifferentBox ; 0x12ae6 $12 - hlCoord 0, 8 - ld b, $8 - ld c, $8 + jr nz, .DifferentBox + coord hl, 0, 8 + ld b, 8 + ld c, 8 call TextBoxBorder ; Draws the box - hlCoord 1, 9 ; Start printing stats from here + coord hl, 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 - ld c, $9 + coord hl, 9, 2 + ld b, 8 + ld c, 9 call TextBoxBorder - hlCoord 11, 3 + coord hl, 11, 3 ld bc, $0018 .PrintStats push bc @@ -268,7 +272,7 @@ PrintStatsBox: ; 12ae4 (4:6ae4) pop bc add hl, bc ld de, wLoadedMonAttack - ld bc, $0203 ; three digits + lb bc, 2, 3 call PrintStat ld de, wLoadedMonDefense call PrintStat @@ -276,27 +280,27 @@ PrintStatsBox: ; 12ae4 (4:6ae4) call PrintStat ld de, wLoadedMonSpecial jp PrintNumber -PrintStat +PrintStat: push hl call PrintNumber pop hl - ld de, $0028 + ld de, SCREEN_WIDTH * 2 add hl, de ret -StatsText: ; 12b3a (4:6b3a) +StatsText: db "ATTACK" next "DEFENSE" next "SPEED" next "SPECIAL@" -StatusScreen2: ; 12b57 (4:6b57) +StatusScreen2: ld a, [hTilesetType] push af xor a ld [hTilesetType], a - ld [$ffba], a - ld bc, $0005 + ld [H_AUTOBGTRANSFERENABLED], a + ld bc, NUM_MOVES + 1 ld hl, wMoves call FillMemory ld hl, wLoadedMonMoves @@ -304,42 +308,42 @@ StatusScreen2: ; 12b57 (4:6b57) ld bc, NUM_MOVES call CopyData callab FormatMovesString - hlCoord 9, 2 - ld bc, $050a + coord hl, 9, 2 + lb bc, 5, 10 call ClearScreenArea ; Clear under name - hlCoord 19, 3 + coord hl, 19, 3 ld [hl], $78 - hlCoord 0, 8 - ld b, $8 - ld c, $12 + coord hl, 0, 8 + ld b, 8 + ld c, 18 call TextBoxBorder ; Draw move container - hlCoord 2, 9 + coord hl, 2, 9 ld de, wMovesString call PlaceString ; Print moves - ld a, [wcd6c] + ld a, [wNumMovesMinusOne] inc a ld c, a ld a, $4 sub c ld b, a ; Number of moves ? - hlCoord 11, 10 - ld de, $0028 - ld a, $72 - call Func_12ccb ; Print "PP" + coord hl, 11, 10 + ld de, SCREEN_WIDTH * 2 + ld a, $72 ; special P tile id + call StatusScreen_PrintPP ; Print "PP" ld a, b and a - jr z, .InitPP ; 0x12bb3 $6 + jr z, .InitPP ld c, a ld a, "-" - call Func_12ccb ; Fill the rest with -- -.InitPP ; 12bbb + call StatusScreen_PrintPP ; Fill the rest with -- +.InitPP ld hl, wLoadedMonMoves - deCoord 14, 10 - ld b, $0 -.PrintPP ; 12bc3 + coord de, 14, 10 + ld b, 0 +.PrintPP ld a, [hli] and a - jr z, .PPDone ; 0x12bc5 $4a + jr z, .PPDone push bc push hl push de @@ -356,24 +360,24 @@ StatusScreen2: ; 12b57 (4:6b57) pop de pop hl push hl - ld bc, $0014 + ld bc, wPartyMon1PP - wPartyMon1Moves - 1 add hl, bc ld a, [hl] and $3f - ld [wcd71], a + ld [wStatusScreenCurrentPP], a ld h, d ld l, e push hl - ld de, wcd71 - ld bc, $0102 + ld de, wStatusScreenCurrentPP + lb bc, 1, 2 call PrintNumber ld a, "/" ld [hli], a - ld de, wd11e - ld bc, $0102 + ld de, wMaxPP + lb bc, 1, 2 call PrintNumber pop hl - ld de, $0028 + ld de, SCREEN_WIDTH * 2 add hl, de ld d, h ld e, l @@ -382,19 +386,19 @@ 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 + coord hl, 9, 3 + ld de, StatusScreenExpText call PlaceString - ld a, [wLoadedMonLevel] ; level + ld a, [wLoadedMonLevel] push af cp MAX_LEVEL - jr z, .Level100 ; 0x12c20 $4 + jr z, .Level100 inc a ld [wLoadedMonLevel], a ; Increase temporarily if not 100 .Level100 - hlCoord 14, 6 + coord hl, 14, 6 ld [hl], $70 ; 1-tile "to" inc hl inc hl @@ -402,25 +406,25 @@ StatusScreen2: ; 12b57 (4:6b57) pop af ld [wLoadedMonLevel], a ld de, wLoadedMonExp - hlCoord 12, 4 - ld bc, $0307 + coord hl, 12, 4 + lb bc, 3, 7 call PrintNumber ; exp - call .asm_12c86 + call CalcExpToLevelUp ld de, wLoadedMonExp - hlCoord 7, 6 - ld bc, $0307 - call PrintNumber - hlCoord 9, 0 - call Func_12cc3 - hlCoord 9, 1 - call Func_12cc3 - ld a, [W_MONHDEXNUM] + coord hl, 7, 6 + lb bc, 3, 7 + call PrintNumber ; exp needed to level up + coord hl, 9, 0 + call StatusScreen_ClearName + coord hl, 9, 1 + call StatusScreen_ClearName + ld a, [wMonHIndex] ld [wd11e], a call GetMonName - hlCoord 9, 1 + coord hl, 9, 1 call PlaceString ld a, $1 - ld [$ffba], a + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 call WaitForTextScrollButtonPress ; wait for button pop af @@ -428,28 +432,29 @@ StatusScreen2: ; 12b57 (4:6b57) ld hl, wd72c res 1, [hl] ld a, $77 - ld [$ff24], a + ld [rNR50], a call GBPalWhiteOut jp ClearScreen -.asm_12c86 ; This does some magic with lvl/exp? - ld a, [wLoadedMonLevel] ; Load level + +CalcExpToLevelUp: + ld a, [wLoadedMonLevel] cp MAX_LEVEL - jr z, .asm_12ca7 ; 0x12c8b $1a ; If 100 + jr z, .atMaxLevel inc a ld d, a callab CalcExperience ld hl, wLoadedMonExp + 2 - ld a, [$ff98] + ld a, [hExperience + 2] sub [hl] ld [hld], a - ld a, [$ff97] + ld a, [hExperience + 1] sbc [hl] ld [hld], a - ld a, [$ff96] + ld a, [hExperience] sbc [hl] ld [hld], a ret -.asm_12ca7 +.atMaxLevel ld hl, wLoadedMonExp xor a ld [hli], a @@ -457,21 +462,20 @@ StatusScreen2: ; 12b57 (4:6b57) ld [hl], a ret -EXPPointsText: ; 12caf (4:6caf) - db "EXP POINTS", $4e - -LevelUpText: ; 12cba (4:6cba) - db "LEVEL UP@" +StatusScreenExpText: + db "EXP POINTS" + next "LEVEL UP@" -Func_12cc3: ; 12cc3 (4:6cc3) - ld bc, $a - ld a, $7f +StatusScreen_ClearName: + ld bc, 10 + ld a, " " jp FillMemory -Func_12ccb: ; 12ccb (4:6ccb) +StatusScreen_PrintPP: +; print PP or -- c times, going down two rows each time ld [hli], a ld [hld], a add hl, de dec c - jr nz, Func_12ccb + jr nz, StatusScreen_PrintPP ret diff --git a/engine/menu/swap_items.asm b/engine/menu/swap_items.asm new file mode 100644 index 00000000..b1fa78be --- /dev/null +++ b/engine/menu/swap_items.asm @@ -0,0 +1,149 @@ +HandleItemListSwapping: + ld a,[wListMenuID] + cp a,ITEMLISTMENU + jp nz,DisplayListMenuIDLoop ; only rearrange item list menus + push hl + ld hl,wListPointer + ld a,[hli] + ld h,[hl] + ld l,a + inc hl ; hl = beginning of list entries + ld a,[wCurrentMenuItem] + ld b,a + ld a,[wListScrollOffset] + add b + add a + ld c,a + ld b,0 + add hl,bc ; hl = address of currently selected item entry + ld a,[hl] + pop hl + inc a + jp z,DisplayListMenuIDLoop ; ignore attempts to swap the Cancel menu item + ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) + and a ; has the first item to swap already been chosen? + jr nz,.swapItems +; if not, set the currently selected item as the first item + ld a,[wCurrentMenuItem] + inc a + ld b,a + ld a,[wListScrollOffset] ; index of top (visible) menu item within the list + add b + ld [wMenuItemToSwap],a ; ID of item chosen for swapping (counts from 1) + ld c,20 + call DelayFrames + jp DisplayListMenuIDLoop +.swapItems + ld a,[wCurrentMenuItem] + inc a + ld b,a + ld a,[wListScrollOffset] + add b + ld b,a + ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) + cp b ; is the currently selected item the same as the first item to swap? + jp z,DisplayListMenuIDLoop ; ignore attempts to swap an item with itself + dec a + ld [wMenuItemToSwap],a ; ID of item chosen for swapping (counts from 1) + ld c,20 + call DelayFrames + push hl + push de + ld hl,wListPointer + ld a,[hli] + ld h,[hl] + ld l,a + inc hl ; hl = beginning of list entries + ld d,h + ld e,l ; de = beginning of list entries + ld a,[wCurrentMenuItem] + ld b,a + ld a,[wListScrollOffset] + add b + add a + ld c,a + ld b,0 + add hl,bc ; hl = address of currently selected item entry + ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) + add a + add e + ld e,a + jr nc,.noCarry + inc d +.noCarry ; de = address of first item to swap + ld a,[de] + ld b,a + ld a,[hli] + cp b + jr z,.swapSameItemType +.swapDifferentItems + ld [$ff95],a ; [$ff95] = second item ID + ld a,[hld] + ld [$ff96],a ; [$ff96] = second item quantity + ld a,[de] + ld [hli],a ; put first item ID in second item slot + inc de + ld a,[de] + ld [hl],a ; put first item quantity in second item slot + ld a,[$ff96] + ld [de],a ; put second item quantity in first item slot + dec de + ld a,[$ff95] + ld [de],a ; put second item ID in first item slot + xor a + ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped + pop de + pop hl + jp DisplayListMenuIDLoop +.swapSameItemType + inc de + ld a,[hl] + ld b,a + ld a,[de] + add b ; a = sum of both item quantities + cp a,100 ; is the sum too big for one item slot? + jr c,.combineItemSlots +; swap enough items from the first slot to max out the second slot if they can't be combined + sub a,99 + ld [de],a + ld a,99 + ld [hl],a + jr .done +.combineItemSlots + ld [hl],a ; put the sum in the second item slot + ld hl,wListPointer + ld a,[hli] + ld h,[hl] + ld l,a + dec [hl] ; decrease the number of items + ld a,[hl] + ld [wListCount],a ; update number of items variable + cp a,1 + jr nz,.skipSettingMaxMenuItemID + ld [wMaxMenuItem],a ; if the number of items is only one now, update the max menu item ID +.skipSettingMaxMenuItemID + dec de + ld h,d + ld l,e + inc hl + inc hl ; hl = address of item after first item to swap +.moveItemsUpLoop ; erase the first item slot and move up all the following item slots to fill the gap + ld a,[hli] + ld [de],a + inc de + inc a ; reached the $ff terminator? + jr z,.afterMovingItemsUp + ld a,[hli] + ld [de],a + inc de + jr .moveItemsUpLoop +.afterMovingItemsUp + xor a + ld [wListScrollOffset],a + ld [wCurrentMenuItem],a +.done + xor a + ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped + pop de + pop hl + jp DisplayListMenuIDLoop diff --git a/engine/menu/text_box.asm b/engine/menu/text_box.asm new file mode 100644 index 00000000..12067dd4 --- /dev/null +++ b/engine/menu/text_box.asm @@ -0,0 +1,767 @@ +; function to draw various text boxes +DisplayTextBoxID_: + ld a,[wTextBoxID] + cp a,TWO_OPTION_MENU + jp z,DisplayTwoOptionMenu + ld c,a + ld hl,TextBoxFunctionTable + ld de,3 + call SearchTextBoxTable + jr c,.functionTableMatch + ld hl,TextBoxCoordTable + ld de,5 + call SearchTextBoxTable + jr c,.coordTableMatch + ld hl,TextBoxTextAndCoordTable + ld de,9 + call SearchTextBoxTable + jr c,.textAndCoordTableMatch +.done + ret +.functionTableMatch + ld a,[hli] + ld h,[hl] + ld l,a ; hl = address of function + ld de,.done + push de + jp [hl] ; jump to the function +.coordTableMatch + call GetTextBoxIDCoords + call GetAddressOfScreenCoords + call TextBoxBorder + ret +.textAndCoordTableMatch + call GetTextBoxIDCoords + push hl + call GetAddressOfScreenCoords + call TextBoxBorder + pop hl + call GetTextBoxIDText + ld a,[wd730] + push af + ld a,[wd730] + set 6,a ; no pauses between printing each letter + ld [wd730],a + call PlaceString + pop af + ld [wd730],a + call UpdateSprites + ret + +; function to search a table terminated with $ff for a byte matching c in increments of de +; sets carry flag if a match is found and clears carry flag if not +SearchTextBoxTable: + dec de +.loop + ld a,[hli] + cp a,$ff + jr z,.notFound + cp c + jr z,.found + add hl,de + jr .loop +.found + scf +.notFound + ret + +; function to load coordinates from the TextBoxCoordTable or the TextBoxTextAndCoordTable +; INPUT: +; hl = address of coordinates +; OUTPUT: +; b = height +; c = width +; d = row of upper left corner +; e = column of upper left corner +GetTextBoxIDCoords: + ld a,[hli] ; column of upper left corner + ld e,a + ld a,[hli] ; row of upper left corner + ld d,a + ld a,[hli] ; column of lower right corner + sub e + dec a + ld c,a ; c = width + ld a,[hli] ; row of lower right corner + sub d + dec a + ld b,a ; b = height + ret + +; function to load a text address and text coordinates from the TextBoxTextAndCoordTable +GetTextBoxIDText: + ld a,[hli] + ld e,a + ld a,[hli] + ld d,a ; de = address of text + push de ; save text address + ld a,[hli] + ld e,a ; column of upper left corner of text + ld a,[hl] + ld d,a ; row of upper left corner of text + call GetAddressOfScreenCoords + pop de ; restore text address + ret + +; function to point hl to the screen coordinates +; INPUT: +; d = row +; e = column +; OUTPUT: +; hl = address of upper left corner of text box +GetAddressOfScreenCoords: + push bc + coord hl, 0, 0 + ld bc,20 +.loop ; loop to add d rows to the base address + ld a,d + and a + jr z,.addedRows + add hl,bc + dec d + jr .loop +.addedRows + pop bc + add hl,de + ret + +; Format: +; 00: text box ID +; 01-02: function address +TextBoxFunctionTable: + dbw MONEY_BOX, DisplayMoneyBox + dbw BUY_SELL_QUIT_MENU, DoBuySellQuitMenu + dbw FIELD_MOVE_MON_MENU, DisplayFieldMoveMonMenu + db $ff ; terminator + +; Format: +; 00: text box ID +; 01: column of upper left corner +; 02: row of upper left corner +; 03: column of lower right corner +; 04: row of lower right corner +TextBoxCoordTable: + db MESSAGE_BOX, 0, 12, 19, 17 + db $03, 0, 0, 19, 14 + db $07, 0, 0, 11, 6 + db LIST_MENU_BOX, 4, 2, 19, 12 + db $10, 7, 0, 19, 17 + db MON_SPRITE_POPUP, 6, 4, 14, 13 + db $ff ; terminator + +; Format: +; 00: text box ID +; 01: column of upper left corner +; 02: row of upper left corner +; 03: column of lower right corner +; 04: row of lower right corner +; 05-06: address of text +; 07: column of beginning of text +; 08: row of beginning of text +; table of window positions and corresponding text [key, start column, start row, end column, end row, text pointer [2 bytes], text column, text row] +TextBoxTextAndCoordTable: + db JP_MOCHIMONO_MENU_TEMPLATE + db 0,0,14,17 ; text box coordinates + dw JapaneseMochimonoText + db 3,0 ; text coordinates + + db USE_TOSS_MENU_TEMPLATE + db 13,10,19,14 ; text box coordinates + dw UseTossText + db 15,11 ; text coordinates + + db JP_SAVE_MESSAGE_MENU_TEMPLATE + db 0,0,7,5 ; text box coordinates + dw JapaneseSaveMessageText + db 2,2 ; text coordinates + + db JP_SPEED_OPTIONS_MENU_TEMPLATE + db 0,6,5,10 ; text box coordinates + dw JapaneseSpeedOptionsText + db 2,7 ; text coordinates + + db BATTLE_MENU_TEMPLATE + db 8,12,19,17 ; text box coordinates + dw BattleMenuText + db 10,14 ; text coordinates + + db SAFARI_BATTLE_MENU_TEMPLATE + db 0,12,19,17 ; text box coordinates + dw SafariZoneBattleMenuText + db 2,14 ; text coordinates + + db SWITCH_STATS_CANCEL_MENU_TEMPLATE + db 11,11,19,17 ; text box coordinates + dw SwitchStatsCancelText + db 13,12 ; text coordinates + + db BUY_SELL_QUIT_MENU_TEMPLATE + db 0,0,10,6 ; text box coordinates + dw BuySellQuitText + db 2,1 ; text coordinates + + db MONEY_BOX_TEMPLATE + db 11,0,19,2 ; text box coordinates + dw MoneyText + db 13,0 ; text coordinates + + db JP_AH_MENU_TEMPLATE + db 7,6,11,10 ; text box coordinates + dw JapaneseAhText + db 8,8 ; text coordinates + + db JP_POKEDEX_MENU_TEMPLATE + db 11,8,19,17 ; text box coordinates + dw JapanesePokedexMenu + db 12,10 ; text coordinates + +; note that there is no terminator + +BuySellQuitText: + db "BUY" + next "SELL" + next "QUIT@@" + +UseTossText: + db "USE" + next "TOSS@" + +JapaneseSaveMessageText: + db "きろく" + next "メッセージ@" + +JapaneseSpeedOptionsText: + db "はやい" + next "おそい@" + +MoneyText: + db "MONEY@" + +JapaneseMochimonoText: + db "もちもの@" + +JapaneseMainMenuText: + db "つづきから" + next "さいしょから@" + +BattleMenuText: + db "FIGHT ",$E1,$E2 + next "ITEM RUN@" + +SafariZoneBattleMenuText: + db "BALL× BAIT" + next "THROW ROCK RUN@" + +SwitchStatsCancelText: + db "SWITCH" + next "STATS" + next "CANCEL@" + +JapaneseAhText: + db "アッ!@" + +JapanesePokedexMenu: + db "データをみる" + next "なきごえ" + next "ぶんぷをみる" + next "キャンセル@" + +DisplayMoneyBox: + ld hl, wd730 + set 6, [hl] + ld a, MONEY_BOX_TEMPLATE + ld [wTextBoxID], a + call DisplayTextBoxID + coord hl, 13, 1 + ld b, 1 + ld c, 6 + call ClearScreenArea + coord hl, 12, 1 + ld de, wPlayerMoney + ld c, $a3 + call PrintBCDNumber + ld hl, wd730 + res 6, [hl] + ret + +CurrencyString: + db " ¥@" + +DoBuySellQuitMenu: + ld a, [wd730] + set 6, a ; no printing delay + ld [wd730], a + xor a + ld [wChosenMenuItem], a + ld a, BUY_SELL_QUIT_MENU_TEMPLATE + ld [wTextBoxID], a + call DisplayTextBoxID + ld a, A_BUTTON | B_BUTTON + ld [wMenuWatchedKeys], a + ld a, $2 + ld [wMaxMenuItem], a + ld a, $1 + ld [wTopMenuItemY], a + ld a, $1 + ld [wTopMenuItemX], a + xor a + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a + ld [wMenuWatchMovingOutOfBounds], a + ld a, [wd730] + res 6, a ; turn on the printing delay + ld [wd730], a + call HandleMenuInput + call PlaceUnfilledArrowMenuCursor + bit 0, a ; was A pressed? + jr nz, .pressedA + bit 1, a ; was B pressed? (always true since only A/B are watched) + jr z, .pressedA + ld a, CANCELLED_MENU + ld [wMenuExitMethod], a + jr .quit +.pressedA + ld a, CHOSE_MENU_ITEM + ld [wMenuExitMethod], a + ld a, [wCurrentMenuItem] + ld [wChosenMenuItem], a + ld b, a + ld a, [wMaxMenuItem] + cp b + jr z, .quit + ret +.quit + ld a, CANCELLED_MENU + ld [wMenuExitMethod], a + ld a, [wCurrentMenuItem] + ld [wChosenMenuItem], a + scf + ret + +; displays a menu with two options to choose from +; b = Y of upper left corner of text region +; c = X of upper left corner of text region +; hl = address where the text box border should be drawn +DisplayTwoOptionMenu: + push hl + ld a, [wd730] + set 6, a ; no printing delay + ld [wd730], a + +; pointless because both values are overwritten before they are read + xor a + ld [wChosenMenuItem], a + ld [wMenuExitMethod], a + + ld a, A_BUTTON | B_BUTTON + ld [wMenuWatchedKeys], a + ld a, $1 + ld [wMaxMenuItem], a + ld a, b + ld [wTopMenuItemY], a + ld a, c + ld [wTopMenuItemX], a + xor a + ld [wLastMenuItem], a + ld [wMenuWatchMovingOutOfBounds], a + push hl + ld hl, wTwoOptionMenuID + bit 7, [hl] ; select second menu item by default? + res 7, [hl] + jr z, .storeCurrentMenuItem + inc a +.storeCurrentMenuItem + ld [wCurrentMenuItem], a + pop hl + push hl + push hl + call TwoOptionMenu_SaveScreenTiles + ld a, [wTwoOptionMenuID] + ld hl, TwoOptionMenuStrings + ld e, a + ld d, $0 + ld a, $5 +.menuStringLoop + add hl, de + dec a + jr nz, .menuStringLoop + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld e, l + ld d, h + pop hl + push de + ld a, [wTwoOptionMenuID] + cp TRADE_CANCEL_MENU + jr nz, .notTradeCancelMenu + call CableClub_TextBoxBorder + jr .afterTextBoxBorder +.notTradeCancelMenu + call TextBoxBorder +.afterTextBoxBorder + call UpdateSprites + pop hl + ld a, [hli] + and a ; put blank line before first menu item? + ld bc, 20 + 2 + jr z, .noBlankLine + ld bc, 2 * 20 + 2 +.noBlankLine + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + pop hl + add hl, bc + call PlaceString + ld hl, wd730 + res 6, [hl] ; turn on the printing delay + ld a, [wTwoOptionMenuID] + cp NO_YES_MENU + jr nz, .notNoYesMenu +; No/Yes menu +; this menu type ignores the B button +; it only seems to be used when confirming the deletion of a save file + xor a + ld [wTwoOptionMenuID], a + ld a, [wFlags_0xcd60] + push af + push hl + ld hl, wFlags_0xcd60 + bit 5, [hl] + set 5, [hl] ; don't play sound when A or B is pressed in menu + pop hl +.noYesMenuInputLoop + call HandleMenuInput + bit 1, a ; A button pressed? + jr nz, .noYesMenuInputLoop ; try again if A was not pressed + pop af + pop hl + ld [wFlags_0xcd60], a + ld a, SFX_PRESS_AB + call PlaySound + jr .pressedAButton +.notNoYesMenu + xor a + ld [wTwoOptionMenuID], a + call HandleMenuInput + pop hl + bit 1, a ; A button pressed? + jr nz, .choseSecondMenuItem ; automatically choose the second option if B is pressed +.pressedAButton + ld a, [wCurrentMenuItem] + ld [wChosenMenuItem], a + and a + jr nz, .choseSecondMenuItem +; chose first menu item + ld a, CHOSE_FIRST_ITEM + ld [wMenuExitMethod], a + ld c, 15 + call DelayFrames + call TwoOptionMenu_RestoreScreenTiles + and a + ret +.choseSecondMenuItem + ld a, 1 + ld [wCurrentMenuItem], a + ld [wChosenMenuItem], a + ld a, CHOSE_SECOND_ITEM + ld [wMenuExitMethod], a + ld c, 15 + call DelayFrames + call TwoOptionMenu_RestoreScreenTiles + scf + ret + +; Some of the wider/taller two option menus will not have the screen areas +; they cover be fully saved/restored by the two functions below. +; The bottom and right edges of the menu may remain after the function returns. + +TwoOptionMenu_SaveScreenTiles: + ld de, wBuffer + lb bc, 5, 6 +.loop + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop + push bc + ld bc, SCREEN_WIDTH - 6 + add hl, bc + pop bc + ld c, $6 + dec b + jr nz, .loop + ret + +TwoOptionMenu_RestoreScreenTiles: + ld de, wBuffer + lb bc, 5, 6 +.loop + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .loop + push bc + ld bc, SCREEN_WIDTH - 6 + add hl, bc + pop bc + ld c, 6 + dec b + jr nz, .loop + call UpdateSprites + ret + +; Format: +; 00: byte width +; 01: byte height +; 02: byte put blank line before first menu item +; 03: word text pointer +TwoOptionMenuStrings: + db 4,3,0 + dw .YesNoMenu + db 6,3,0 + dw .NorthWestMenu + db 6,3,0 + dw .SouthEastMenu + db 6,3,0 + dw .YesNoMenu + db 6,3,0 + dw .NorthEastMenu + db 7,3,0 + dw .TradeCancelMenu + db 7,4,1 + dw .HealCancelMenu + db 4,3,0 + dw .NoYesMenu + +.NoYesMenu + db "NO" + next "YES@" +.YesNoMenu + db "YES" + next "NO@" +.NorthWestMenu + db "NORTH" + next "WEST@" +.SouthEastMenu + db "SOUTH" + next "EAST@" +.NorthEastMenu + db "NORTH" + next "EAST@" +.TradeCancelMenu + db "TRADE" + next "CANCEL@" +.HealCancelMenu + db "HEAL" + next "CANCEL@" + +DisplayFieldMoveMonMenu: + xor a + ld hl, wFieldMoves + ld [hli], a ; wFieldMoves + ld [hli], a ; wFieldMoves + 1 + ld [hli], a ; wFieldMoves + 2 + ld [hli], a ; wFieldMoves + 3 + ld [hli], a ; wNumFieldMoves + ld [hl], 12 ; wFieldMovesLeftmostXCoord + call GetMonFieldMoves + ld a, [wNumFieldMoves] + and a + jr nz, .fieldMovesExist + +; no field moves + coord hl, 11, 11 + ld b, 5 + ld c, 7 + call TextBoxBorder + call UpdateSprites + ld a, 12 + ld [hFieldMoveMonMenuTopMenuItemX], a + coord hl, 13, 12 + ld de, PokemonMenuEntries + jp PlaceString + +.fieldMovesExist + push af + +; Calculate the text box position and dimensions based on the leftmost X coord +; of the field move names before adjusting for the number of field moves. + coord hl, 0, 11 + ld a, [wFieldMovesLeftmostXCoord] + dec a + ld e, a + ld d, 0 + add hl, de + ld b, 5 + ld a, 18 + sub e + ld c, a + pop af + +; For each field move, move the top of the text box up 2 rows while the leaving +; the bottom of the text box at the bottom of the screen. + ld de, -SCREEN_WIDTH * 2 +.textBoxHeightLoop + add hl, de + inc b + inc b + dec a + jr nz, .textBoxHeightLoop + +; Make space for an extra blank row above the top field move. + ld de, -SCREEN_WIDTH + add hl, de + inc b + + call TextBoxBorder + call UpdateSprites + +; Calculate the position of the first field move name to print. + coord hl, 0, 12 + ld a, [wFieldMovesLeftmostXCoord] + inc a + ld e, a + ld d, 0 + add hl, de + ld de, -SCREEN_WIDTH * 2 + ld a, [wNumFieldMoves] +.calcFirstFieldMoveYLoop + add hl, de + dec a + jr nz, .calcFirstFieldMoveYLoop + + xor a + ld [wNumFieldMoves], a + ld de, wFieldMoves +.printNamesLoop + push hl + ld hl, FieldMoveNames + ld a, [de] + and a + jr z, .donePrintingNames + inc de + ld b, a ; index of name +.skipNamesLoop ; skip past names before the name we want + dec b + jr z, .reachedName +.skipNameLoop ; skip past current name + ld a, [hli] + cp "@" + jr nz, .skipNameLoop + jr .skipNamesLoop +.reachedName + ld b, h + ld c, l + pop hl + push de + ld d, b + ld e, c + call PlaceString + ld bc, SCREEN_WIDTH * 2 + add hl, bc + pop de + jr .printNamesLoop + +.donePrintingNames + pop hl + ld a, [wFieldMovesLeftmostXCoord] + ld [hFieldMoveMonMenuTopMenuItemX], a + coord hl, 0, 12 + ld a, [wFieldMovesLeftmostXCoord] + inc a + ld e, a + ld d, 0 + add hl, de + ld de, PokemonMenuEntries + jp PlaceString + +FieldMoveNames: + db "CUT@" + db "FLY@" + db "@" + db "SURF@" + db "STRENGTH@" + db "FLASH@" + db "DIG@" + db "TELEPORT@" + db "SOFTBOILED@" + +PokemonMenuEntries: + db "STATS" + next "SWITCH" + next "CANCEL@" + +GetMonFieldMoves: + ld a, [wWhichPokemon] + ld hl, wPartyMon1Moves + ld bc, wPartyMon2 - wPartyMon1 + call AddNTimes + ld d, h + ld e, l + ld c, NUM_MOVES + 1 + ld hl, wFieldMoves +.loop + push hl +.nextMove + dec c + jr z, .done + ld a, [de] ; move ID + and a + jr z, .done + ld b, a + inc de + ld hl, FieldMoveDisplayData +.fieldMoveLoop + ld a, [hli] + cp $ff + jr z, .nextMove ; if the move is not a field move + cp b + jr z, .foundFieldMove + inc hl + inc hl + jr .fieldMoveLoop +.foundFieldMove + ld a, b + ld [wLastFieldMoveID], a + ld a, [hli] ; field move name index + ld b, [hl] ; field move leftmost X coordinate + pop hl + ld [hli], a ; store name index in wFieldMoves + ld a, [wNumFieldMoves] + inc a + ld [wNumFieldMoves], a + ld a, [wFieldMovesLeftmostXCoord] + cp b + jr c, .skipUpdatingLeftmostXCoord + ld a, b + ld [wFieldMovesLeftmostXCoord], a +.skipUpdatingLeftmostXCoord + ld a, [wLastFieldMoveID] + ld b, a + jr .loop +.done + pop hl + ret + +; Format: [Move id], [name index], [leftmost tile] +; Move id = id of move +; Name index = index of name in FieldMoveNames +; Leftmost tile = -1 + tile column in which the first letter of the move's name should be displayed +; "SOFTBOILED" is $08 because it has 4 more letters than "SURF", for example, whose value is $0C +FieldMoveDisplayData: + db CUT, $01, $0C + db FLY, $02, $0C + db $B4, $03, $0C ; unused field move + db SURF, $04, $0C + db STRENGTH, $05, $0A + db FLASH, $06, $0C + db DIG, $07, $0C + db TELEPORT, $08, $0A + db SOFTBOILED, $09, $08 + db $ff ; list terminator diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm index 88cfcf65..aab4adf4 100755 --- a/engine/menu/vending_machine.asm +++ b/engine/menu/vending_machine.asm @@ -1,4 +1,4 @@ -VendingMachineMenu: ; 74ee0 (1d:4ee0) +VendingMachineMenu: ld hl, VendingMachineText1 call PrintText ld a, MONEY_BOX @@ -7,65 +7,66 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) xor a ld [wCurrentMenuItem], a ld [wLastMenuItem], a - ld a, $3 + ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a - ld a, $3 + ld a, 3 ld [wMaxMenuItem], a - ld a, $5 + ld a, 5 ld [wTopMenuItemY], a - ld a, $1 + ld a, 1 ld [wTopMenuItemX], a ld hl, wd730 set 6, [hl] - hlCoord 0, 3 - ld b, $8 - ld c, $c + coord hl, 0, 3 + ld b, 8 + ld c, 12 call TextBoxBorder call UpdateSprites - hlCoord 2, 5 + coord hl, 2, 5 ld de, DrinkText call PlaceString - hlCoord 9, 6 + coord hl, 9, 6 ld de, DrinkPriceText call PlaceString ld hl, wd730 res 6, [hl] call HandleMenuInput - bit 1, a - jr nz, .asm_74f93 + bit 1, a ; pressed B? + jr nz, .notThirsty ld a, [wCurrentMenuItem] - cp $3 - jr z, .asm_74f93 + cp 3 ; chose Cancel? + jr z, .notThirsty xor a - ld [$ff9f], a - ld [$ffa1], a + ld [hMoney], a + ld [hMoney + 2], a ld a, $2 - ld [$ffa0], a + ld [hMoney + 1], a call HasEnoughMoney jr nc, .enoughMoney ld hl, VendingMachineText4 jp PrintText .enoughMoney - call Func_74fe7 - ld a, [$ffdb] + call LoadVendingMachineItem + ld a, [hVendingMachineItem] ld b, a 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 + ld a, SFX_PUSH_BOULDER call PlaySound pop bc dec b jr nz, .playDeliverySound -.asm_74f72 + ld hl, VendingMachineText5 call PrintText - ld hl, $ffde + ld hl, hVendingMachinePrice + 2 ld de, wPlayerMoney + 2 ld c, $3 predef SubBCDPredef @@ -75,60 +76,64 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) .BagFull ld hl, VendingMachineText6 jp PrintText -.asm_74f93 +.notThirsty ld hl, VendingMachineText7 jp PrintText -VendingMachineText1: ; 74f99 (1d:4f99) +VendingMachineText1: TX_FAR _VendingMachineText1 db "@" -DrinkText: ; 74f9e (1d:4f9e) +DrinkText: db "FRESH WATER" next "SODA POP" next "LEMONADE" next "CANCEL@" -DrinkPriceText: ; 74fc3 (1d:4fc3) +DrinkPriceText: db "¥200" next "¥300" - next "¥350",$4E,"@" + next "¥350" + next "@" -VendingMachineText4: ; 74fd3 (1d:4fd3) +VendingMachineText4: TX_FAR _VendingMachineText4 db "@" -VendingMachineText5: ; 74fd8 (1d:4fd8) +VendingMachineText5: TX_FAR _VendingMachineText5 db "@" -VendingMachineText6: ; 74fdd (1d:4fdd) +VendingMachineText6: TX_FAR _VendingMachineText6 db "@" -VendingMachineText7: ; 74fe2 (1d:4fe2) +VendingMachineText7: TX_FAR _VendingMachineText7 db "@" -Func_74fe7: ; 74fe7 (1d:4fe7) +LoadVendingMachineItem: ld hl, VendingPrices ld a, [wCurrentMenuItem] add a add a - ld d, $0 + ld d, 0 ld e, a add hl, de ld a, [hli] - ld [$ffdb], a + ld [hVendingMachineItem], a ld a, [hli] - ld [$ffdc], a + ld [hVendingMachinePrice], a ld a, [hli] - ld [$ffdd], a + ld [hVendingMachinePrice + 1], a ld a, [hl] - ld [$ffde], a + ld [hVendingMachinePrice + 2], a ret -VendingPrices: ; 75000 (1d:5000) - db FRESH_WATER,$00,$02,$00 - db SODA_POP, $00,$03,$00 - db LEMONADE, $00,$03,$50 +VendingPrices: + db FRESH_WATER + money 200 + db SODA_POP + money 300 + db LEMONADE + money 350 diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm index e3323cfc..864ac136 100755 --- a/engine/mon_party_sprites.asm +++ b/engine/mon_party_sprites.asm @@ -1,23 +1,23 @@ -AnimatePartyMon_ForceSpeed1: ; 716f7 (1c:56f7) +AnimatePartyMon_ForceSpeed1: xor a ld [wCurrentMenuItem], a ld b, a inc a jr GetAnimationSpeed -; wcf1f contains the party mon's health bar colors +; wPartyMenuHPBarColors contains the party mon's health bar colors ; 0: green ; 1: yellow ; 2: red -AnimatePartyMon: ; 716ff (1c:56ff) - ld hl, wcf1f +AnimatePartyMon: + ld hl, wPartyMenuHPBarColors ld a, [wCurrentMenuItem] ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hl] -GetAnimationSpeed: ; 7170a (1c:570a) +GetAnimationSpeed: ld c, a ld hl, PartyMonSpeeds add hl, bc @@ -27,7 +27,7 @@ GetAnimationSpeed: ; 7170a (1c:570a) ld c, a add a ld b, a - ld a, [wPartyMonAnimCounter] + ld a, [wAnimCounter] and a jr z, .resetSprites cp c @@ -38,11 +38,11 @@ GetAnimationSpeed: ; 7170a (1c:570a) jr nz, .skipResetTimer xor a ; reset timer .skipResetTimer - ld [wPartyMonAnimCounter], a + ld [wAnimCounter], a jp DelayFrame .resetSprites push bc - ld hl, wcc5b + ld hl, wMonPartySpritesSavedOAM ld de, wOAMBuffer ld bc, $60 call CopyData @@ -85,15 +85,15 @@ GetAnimationSpeed: ; 7170a (1c:570a) ; The members of the PartyMonSpeeds array specify the number of V-blanks ; that each frame lasts for green HP, yellow HP, and red HP in order. ; On the naming screen, the yellow HP speed is always used. -PartyMonSpeeds: ; 71769 (1c:5769) - db $05,$10,$20 +PartyMonSpeeds: + db 5, 16, 32 -LoadMonPartySpriteGfx: ; 7176c (1c:576c) +LoadMonPartySpriteGfx: ; Load mon party sprite tile patterns into VRAM during V-blank. ld hl, MonPartySpritePointers ld a, $1c -LoadAnimSpriteGfx: ; 71771 (1c:5771) +LoadAnimSpriteGfx: ; Load animated sprite tile patterns into VRAM during V-blank. hl is the address ; of an array of structures that contain arguments for CopyVideoData and a is ; the number of structures in the array. @@ -125,14 +125,14 @@ LoadAnimSpriteGfx: ; 71771 (1c:5771) jr nz, .loop ret -LoadMonPartySpriteGfxWithLCDDisabled: ; 71791 (1c:5791) +LoadMonPartySpriteGfxWithLCDDisabled: ; Load mon party sprite tile patterns into VRAM immediately by disabling the ; LCD. call DisableLCD ld hl, MonPartySpritePointers ld a, $1c ld bc, $0 -.asm_7179c +.loop push af push bc push hl @@ -159,10 +159,10 @@ LoadMonPartySpriteGfxWithLCDDisabled: ; 71791 (1c:5791) ld c, a pop af dec a - jr nz, .asm_7179c + jr nz, .loop jp EnableLCD -MonPartySpritePointers: ; 717c0 (1c:57c0) +MonPartySpritePointers: dw SlowbroSprite + $c0 db $40 / $10 ; 40 bytes db BANK(SlowbroSprite) @@ -303,7 +303,7 @@ MonPartySpritePointers: ; 717c0 (1c:57c0) db BANK(MonPartySprites) dw vSprites + $780 -WriteMonPartySpriteOAMByPartyIndex: ; 71868 (1c:5868) +WriteMonPartySpriteOAMByPartyIndex: ; Write OAM blocks for the party mon in [hPartyMonIndex]. push hl push de @@ -315,24 +315,24 @@ WriteMonPartySpriteOAMByPartyIndex: ; 71868 (1c:5868) add hl, de ld a, [hl] call GetPartyMonSpriteID - ld [wcd5b], a + ld [wOAMBaseTile], a call WriteMonPartySpriteOAM pop bc pop de pop hl ret -WriteMonPartySpriteOAMBySpecies: ; 71882 (1c:5882) +WriteMonPartySpriteOAMBySpecies: ; Write OAM blocks for the party sprite of the species in ; [wMonPartySpriteSpecies]. xor a ld [hPartyMonIndex], a ld a, [wMonPartySpriteSpecies] call GetPartyMonSpriteID - ld [wcd5b], a + ld [wOAMBaseTile], a jr WriteMonPartySpriteOAM -UnusedPartyMonSpriteFunction: ; 71890 (1c:5890) +UnusedPartyMonSpriteFunction: ; This function is unused and doesn't appear to do anything useful. It looks ; like it may have been intended to load the tile patterns and OAM data for ; the mon party sprite associated with the species in [wcf91]. @@ -350,7 +350,7 @@ UnusedPartyMonSpriteFunction: ; 71890 (1c:5890) ld [wMonPartySpriteSpecies], a jr WriteMonPartySpriteOAMBySpecies -.LoadTilePatterns ; 718ac (1c:58ac) +.LoadTilePatterns push hl add a ld c, a @@ -370,9 +370,9 @@ UnusedPartyMonSpriteFunction: ; 71890 (1c:5890) pop hl jp CopyVideoData -WriteMonPartySpriteOAM: ; 718c3 (1c:58c3) +WriteMonPartySpriteOAM: ; Write the OAM blocks for the first animation frame into the OAM buffer and -; make a copy at wcc5b. +; make a copy at wMonPartySpritesSavedOAM. push af ld c, $10 ld h, wOAMBuffer / $100 @@ -392,11 +392,11 @@ WriteMonPartySpriteOAM: ; 718c3 (1c:58c3) ; we can flip back to it from the second frame by copying it back. .makeCopy ld hl, wOAMBuffer - ld de, wcc5b + ld de, wMonPartySpritesSavedOAM ld bc, $60 jp CopyData -GetPartyMonSpriteID: ; 718e9 (1c:58e9) +GetPartyMonSpriteID: ld [wd11e], a predef IndexToPokedex ld a, [wd11e] @@ -419,5 +419,5 @@ GetPartyMonSpriteID: ; 718e9 (1c:58e9) INCLUDE "data/mon_party_sprites.asm" -MonPartySprites: ; 71959 (1c:5959) +MonPartySprites: INCBIN "gfx/mon_ow_sprites.2bpp" diff --git a/engine/multiply_divide.asm b/engine/multiply_divide.asm index 4aa5fa26..52e86b36 100755 --- a/engine/multiply_divide.asm +++ b/engine/multiply_divide.asm @@ -1,143 +1,143 @@ -_Multiply: ; 37d41 (d:7d41) +_Multiply: ld a, $8 ld b, a xor a - ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) - ld [$ff9b], a - ld [H_SAVEDNUMTOPRINT], a ; $ff9c - ld [$ff9d], a - ld [$ff9e], a -.asm_37d4f - ld a, [H_REMAINDER] ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld [H_PRODUCT], a + ld [H_MULTIPLYBUFFER], a + ld [H_MULTIPLYBUFFER+1], a + ld [H_MULTIPLYBUFFER+2], a + ld [H_MULTIPLYBUFFER+3], a +.loop + ld a, [H_MULTIPLIER] srl a - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) - jr nc, .asm_37d77 - ld a, [$ff9e] + ld [H_MULTIPLIER], a ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + jr nc, .smallMultiplier + ld a, [H_MULTIPLYBUFFER+3] ld c, a - ld a, [$ff98] + ld a, [H_MULTIPLICAND+2] add c - ld [$ff9e], a - ld a, [$ff9d] + ld [H_MULTIPLYBUFFER+3], a + ld a, [H_MULTIPLYBUFFER+2] ld c, a - ld a, [$ff97] + ld a, [H_MULTIPLICAND+1] adc c - ld [$ff9d], a - ld a, [H_SAVEDNUMTOPRINT] ; $ff9c + ld [H_MULTIPLYBUFFER+2], a + ld a, [H_MULTIPLYBUFFER+1] ld c, a - ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND) + ld a, [H_MULTIPLICAND] ; (aliases: H_MULTIPLICAND) adc c - ld [H_SAVEDNUMTOPRINT], a ; $ff9c - ld a, [$ff9b] + ld [H_MULTIPLYBUFFER+1], a + ld a, [H_MULTIPLYBUFFER] ld c, a - ld a, [H_DIVIDEND] ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + ld a, [H_PRODUCT] ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) adc c - ld [$ff9b], a -.asm_37d77 + ld [H_MULTIPLYBUFFER], a +.smallMultiplier dec b - jr z, .asm_37d94 - ld a, [$ff98] + jr z, .done + ld a, [H_MULTIPLICAND+2] sla a - ld [$ff98], a - ld a, [$ff97] + ld [H_MULTIPLICAND+2], a + ld a, [H_MULTIPLICAND+1] rl a - ld [$ff97], a - ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND) + ld [H_MULTIPLICAND+1], a + ld a, [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_MULTIPLICAND], a + ld a, [H_PRODUCT] rl a - ld [H_DIVIDEND], a ; $ff95 (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, [$ff9b] - ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + ld [H_PRODUCT], a + jr .loop +.done + ld a, [H_MULTIPLYBUFFER+3] + ld [H_PRODUCT+3], a + ld a, [H_MULTIPLYBUFFER+2] + ld [H_PRODUCT+2], a + ld a, [H_MULTIPLYBUFFER+1] + ld [H_PRODUCT+1], a + ld a, [H_MULTIPLYBUFFER] + ld [H_PRODUCT], a ret -_Divide: ; 37da5 (d:7da5) +_Divide: xor a - ld [$ff9a], a - ld [$ff9b], a - ld [H_SAVEDNUMTOPRINT], a ; $ff9c - ld [$ff9d], a - ld [$ff9e], a + ld [H_DIVIDEBUFFER], a + ld [H_DIVIDEBUFFER+1], a + ld [H_DIVIDEBUFFER+2], a + ld [H_DIVIDEBUFFER+3], a + ld [H_DIVIDEBUFFER+4], a ld a, $9 ld e, a .asm_37db3 - ld a, [$ff9a] + ld a, [H_DIVIDEBUFFER] ld c, a - ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND) + ld a, [H_DIVIDEND+1] ; (aliases: H_MULTIPLICAND) sub c ld d, a - ld a, [H_REMAINDER] ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld a, [H_DIVISOR] ; (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 a, [$ff9e] + ld [H_DIVIDEND+1], a ; (aliases: H_MULTIPLICAND) + ld a, [H_DIVIDEBUFFER+4] inc a - ld [$ff9e], a + ld [H_DIVIDEBUFFER+4], a jr .asm_37db3 .asm_37dce ld a, b cp $1 jr z, .asm_37e18 - ld a, [$ff9e] + ld a, [H_DIVIDEBUFFER+4] sla a - ld [$ff9e], a - ld a, [$ff9d] + ld [H_DIVIDEBUFFER+4], a + ld a, [H_DIVIDEBUFFER+3] rl a - ld [$ff9d], a - ld a, [H_SAVEDNUMTOPRINT] ; $ff9c + ld [H_DIVIDEBUFFER+3], a + ld a, [H_DIVIDEBUFFER+2] rl a - ld [H_SAVEDNUMTOPRINT], a ; $ff9c - ld a, [$ff9b] + ld [H_DIVIDEBUFFER+2], a + ld a, [H_DIVIDEBUFFER+1] rl a - ld [$ff9b], a + ld [H_DIVIDEBUFFER+1], a dec e jr nz, .asm_37e04 ld a, $8 ld e, a - ld a, [$ff9a] - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld a, [H_DIVIDEBUFFER] + ld [H_DIVISOR], 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, [$ff97] - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) - ld a, [$ff98] - ld [$ff97], a + ld [H_DIVIDEBUFFER], a + ld a, [H_DIVIDEND+1] ; (aliases: H_MULTIPLICAND) + ld [H_DIVIDEND], a ; (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + ld a, [H_DIVIDEND+2] + ld [H_DIVIDEND+1], a ; (aliases: H_MULTIPLICAND) + ld a, [H_DIVIDEND+3] + ld [H_DIVIDEND+2], a .asm_37e04 ld a, e cp $1 jr nz, .asm_37e0a dec b .asm_37e0a - ld a, [H_REMAINDER] ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld a, [H_DIVISOR] ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) srl a - ld [H_REMAINDER], a ; $ff99 (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) - ld a, [$ff9a] + ld [H_DIVISOR], a ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld a, [H_DIVIDEBUFFER] rr a - ld [$ff9a], a + ld [H_DIVIDEBUFFER], 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, [$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, [$ff9b] - ld [H_DIVIDEND], a ; $ff95 (aliases: H_PRODUCT, H_PASTLEADINGZEROES, H_QUOTIENT) + ld a, [H_DIVIDEND+1] ; (aliases: H_MULTIPLICAND) + ld [H_REMAINDER], a ; (aliases: H_DIVISOR, H_MULTIPLIER, H_POWEROFTEN) + ld a, [H_DIVIDEBUFFER+4] + ld [H_QUOTIENT+3], a + ld a, [H_DIVIDEBUFFER+3] + ld [H_QUOTIENT+2], a + ld a, [H_DIVIDEBUFFER+2] + ld [H_QUOTIENT+1], a ; (aliases: H_MULTIPLICAND) + ld a, [H_DIVIDEBUFFER+1] + 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..43efecbc 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -1,12 +1,12 @@ -SetDefaultNames: ; 60ca (1:60ca) - ld a, [wd358] +SetDefaultNames: + ld a, [wLetterPrintingDelayFlags] push af - ld a, [W_OPTIONS] ; W_OPTIONS + ld a, [wOptions] push af ld a, [wd732] push af - ld hl, wPlayerName ; wd158 - ld bc, $d8a + ld hl, wPlayerName + ld bc, wBoxDataEnd - wPlayerName xor a call FillMemory ld hl, wSpriteStateData1 @@ -16,28 +16,28 @@ SetDefaultNames: ; 60ca (1:60ca) pop af ld [wd732], a pop af - ld [W_OPTIONS], a ; W_OPTIONS + ld [wOptions], a pop af - ld [wd358], a - ld a, [wd08a] + ld [wLetterPrintingDelayFlags], a + ld a, [wOptionsInitialized] and a - call z, Func_5bff + call z, InitOptions ld hl, NintenText - ld de, wPlayerName ; wd158 - ld bc, $b + ld de, wPlayerName + ld bc, NAME_LENGTH call CopyData ld hl, SonyText - ld de, W_RIVALNAME ; wd34a - ld bc, $b + ld de, wRivalName + ld bc, NAME_LENGTH jp CopyData -OakSpeech: ; 6115 (1:6115) +OakSpeech: ld a,$FF call PlaySound ; stop music - ld a, BANK(Music_Routes2) ; bank of song + ld a, BANK(Music_Routes2) ld c,a - ld a, MUSIC_ROUTES2 ; song # - call PlayMusic ; plays music + ld a, MUSIC_ROUTES2 + call PlayMusic call ClearScreen call LoadTextBoxTilePatterns call SetDefaultNames @@ -46,58 +46,57 @@ OakSpeech: ; 6115 (1:6115) ld a,POTION ld [wcf91],a ld a,1 - ld [wcf96],a + ld [wItemQuantity],a call AddItemToInventory ; give one potion - ld a,[W_ANIMATIONID] + ld a,[wDefaultMap] ld [wDestinationMap],a call SpecialWarpIn xor a ld [hTilesetType],a ld a,[wd732] - bit 1,a ; XXX when is bit 1 set? - jp nz,Func_61bc ; easter egg: skip the intro + bit 1,a ; possibly a debug mode bit + jp nz,.skipChoosingNames ld de,ProfOakPic - ld bc, (Bank(ProfOakPic) << 8) | $00 - call IntroPredef3B ; displays Oak pic? + lb bc, Bank(ProfOakPic), $00 + call IntroDisplayPicCenteredOrUpperRight call FadeInIntroPic ld hl,OakSpeechText1 - call PrintText ; prints text box + call PrintText call GBFadeOutToWhite call ClearScreen ld a,NIDORINO - ld [wd0b5],a ; pic displayed is stored at this location + ld [wd0b5],a ld [wcf91],a - call GetMonHeader ; this is also related to the pic - hlCoord 6, 4 ; position on tilemap the pic is displayed - call LoadFlippedFrontSpriteByMonIndex ; displays pic? + call GetMonHeader + coord hl, 6, 4 + call LoadFlippedFrontSpriteByMonIndex call MovePicLeft ld hl,OakSpeechText2 - call PrintText ; Prints text box + call PrintText call GBFadeOutToWhite call ClearScreen ld de,RedPicFront - ld bc,(Bank(RedPicFront) << 8) | $00 - call IntroPredef3B ; displays player pic? + lb bc, Bank(RedPicFront), $00 + call IntroDisplayPicCenteredOrUpperRight call MovePicLeft ld hl,IntroducePlayerText call PrintText - call LoadDefaultNamesPlayer ; brings up NewName/Red/etc menu + call ChoosePlayerName call GBFadeOutToWhite call ClearScreen ld de,Rival1Pic - ld bc,(Bank(Rival1Pic) << 8) | $00 - call IntroPredef3B ; displays rival pic + lb bc, Bank(Rival1Pic), $00 + call IntroDisplayPicCenteredOrUpperRight call FadeInIntroPic ld hl,IntroduceRivalText call PrintText - call LoadDefaultNamesRival - -Func_61bc: ; 61bc (1:61bc) + call ChooseRivalName +.skipChoosingNames call GBFadeOutToWhite call ClearScreen ld de,RedPicFront - ld bc,(Bank(RedPicFront) << 8) | $00 - call IntroPredef3B + lb bc, Bank(RedPicFront), $00 + call IntroDisplayPicCenteredOrUpperRight call GBFadeInFromWhite ld a,[wd72d] and a @@ -107,71 +106,71 @@ Func_61bc: ; 61bc (1:61bc) .next ld a,[H_LOADEDROMBANK] push af - ld a,(SFX_02_48 - SFX_Headers_02) / 3 + ld a,SFX_SHRINK 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 + lb bc, BANK(RedSprite), $0C call CopyVideoData ld de,ShrinkPic1 - ld bc,(BANK(ShrinkPic1) << 8) | $00 - call IntroPredef3B + lb bc, BANK(ShrinkPic1), $00 + call IntroDisplayPicCenteredOrUpperRight ld c,4 call DelayFrames ld de,ShrinkPic2 - ld bc,(BANK(ShrinkPic2) << 8) | $00 - call IntroPredef3B + lb bc, BANK(ShrinkPic2), $00 + call IntroDisplayPicCenteredOrUpperRight call ResetPlayerSpriteData ld a,[H_LOADEDROMBANK] push af ld a, BANK(Music_PalletTown) - ld [wc0ef],a - ld [wc0f0],a - ld a,$A - ld [wMusicHeaderPointer],a + ld [wAudioROMBank],a + ld [wAudioSavedROMBank],a + ld a, 10 + ld [wAudioFadeOutControl],a ld a,$FF - ld [wc0ee],a + ld [wNewSoundID],a 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 + coord hl, 6, 5 ld b,7 ld c,7 call ClearScreenArea call LoadTextBoxTilePatterns ld a,1 ld [wUpdateSpritesEnabled],a - ld c,$32 + ld c,50 call DelayFrames call GBFadeOutToWhite jp ClearScreen -OakSpeechText1: ; 6253 (1:6253) +OakSpeechText1: TX_FAR _OakSpeechText1 db "@" -OakSpeechText2: ; 6258 (1:6258) +OakSpeechText2: TX_FAR _OakSpeechText2A - db $14 ; play NIDORINA cry from TextCommandSounds + TX_CRY_NIDORINA TX_FAR _OakSpeechText2B db "@" -IntroducePlayerText: ; 6262 (1:6262) +IntroducePlayerText: TX_FAR _IntroducePlayerText db "@" -IntroduceRivalText: ; 6267 (1:6267) +IntroduceRivalText: TX_FAR _IntroduceRivalText db "@" -OakSpeechText3: ; 626c (1:626c) +OakSpeechText3: TX_FAR _OakSpeechText3 db "@" -FadeInIntroPic: ; 6271 (1:6271) +FadeInIntroPic: ld hl,IntroFadePalettes ld b,6 .next @@ -183,7 +182,7 @@ FadeInIntroPic: ; 6271 (1:6271) jr nz,.next ret -IntroFadePalettes: ; 6282 (1:6282) +IntroFadePalettes: db %01010100 db %10101000 db %11111100 @@ -191,31 +190,33 @@ IntroFadePalettes: ; 6282 (1:6282) db %11110100 db %11100100 -MovePicLeft: ; 6288 (1:6288) +MovePicLeft: ld a,119 - ld [$FF4B],a + ld [rWX],a call DelayFrame - ld a,$E4 + ld a,%11100100 ld [rBGP],a .next call DelayFrame - ld a,[$FF4B] + ld a,[rWX] sub 8 cp $FF ret z - ld [$FF4B],a + ld [rWX],a jr .next -Predef3B: ; 62a1 (1:62a1) +DisplayPicCenteredOrUpperRight: call GetPredefRegisters -IntroPredef3B: ; 62a4 (1:62a4) -; bank of sprite given in b +IntroDisplayPicCenteredOrUpperRight: +; b = bank +; de = address of compressed pic +; c: 0 = centred, non-zero = upper-right push bc ld a,b call UncompressSpriteFromDE - ld hl,S_SPRITEBUFFER1 - ld de,S_SPRITEBUFFER0 + ld hl,sSpriteBuffer1 + ld de,sSpriteBuffer0 ld bc,$310 call CopyData ld de,vFrontPic @@ -223,10 +224,10 @@ IntroPredef3B: ; 62a4 (1:62a4) pop bc ld a,c and a - hlCoord 15, 1 + coord hl, 15, 1 jr nz,.next - hlCoord 6, 4 + coord hl, 6, 4 .next xor a - ld [$FFE1],a - predef_jump Func_3f0c6 + ld [hStartTileID],a + predef_jump CopyUncompressedPicToTilemap diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm index 34d98fd7..1258c59b 100755 --- a/engine/oak_speech2.asm +++ b/engine/oak_speech2.asm @@ -1,195 +1,201 @@ -LoadDefaultNamesPlayer: ; 695d (1:695d) - call Func_6a12 - ld de, DefaultNamesPlayer ; $6aa8 +ChoosePlayerName: + call OakSpeechSlidePicRight + ld de, DefaultNamesPlayer call DisplayIntroNameTextBox - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a - jr z, .asm_697a - ld hl, DefaultNamesPlayerList ; $6af2 - call Func_6ad6 - ld de, wPlayerName ; wd158 - call Func_69ec - jr .asm_6999 -.asm_697a - ld hl, wPlayerName ; wd158 - xor a - ld [wd07d], a + jr z, .customName + ld hl, DefaultNamesPlayerList + call GetDefaultName + ld de, wPlayerName + call OakSpeechSlidePicLeft + jr .done +.customName + ld hl, wPlayerName + xor a ; NAME_PLAYER_SCREEN + ld [wNamingScreenType], a call DisplayNamingScreen ld a, [wcf4b] - cp $50 - jr z, .asm_697a + cp "@" + jr z, .customName call ClearScreen call Delay3 - ld de, RedPicFront ; $6ede + ld de, RedPicFront ld b, BANK(RedPicFront) - call IntroPredef3B -.asm_6999 + call IntroDisplayPicCenteredOrUpperRight +.done ld hl, YourNameIsText jp PrintText -YourNameIsText: ; 699f (1:699f) +YourNameIsText: TX_FAR _YourNameIsText db "@" -LoadDefaultNamesRival: ; 69a4 (1:69a4) - call Func_6a12 ; 0x69a4 call 0x6a12 +ChooseRivalName: + call OakSpeechSlidePicRight ld de, DefaultNamesRival call DisplayIntroNameTextBox - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a - jr z, .asm_69c1 + jr z, .customName ld hl, DefaultNamesRivalList - call Func_6ad6 - ld de, W_RIVALNAME ; wd34a - call Func_69ec - jr .asm_69e1 -.asm_69c1 - ld hl, W_RIVALNAME ; wd34a - ld a, $1 - ld [wd07d], a + call GetDefaultName + ld de, wRivalName + call OakSpeechSlidePicLeft + jr .done +.customName + ld hl, wRivalName + ld a, NAME_RIVAL_SCREEN + ld [wNamingScreenType], a call DisplayNamingScreen ld a, [wcf4b] - cp $50 - jr z, .asm_69c1 + cp "@" + jr z, .customName call ClearScreen call Delay3 - ld de, Rival1Pic ; $6049 + ld de, Rival1Pic ld b, $13 - call IntroPredef3B -.asm_69e1 + call IntroDisplayPicCenteredOrUpperRight +.done ld hl, HisNameIsText jp PrintText -HisNameIsText: ; 69e7 (1:69e7) +HisNameIsText: TX_FAR _HisNameIsText db "@" -Func_69ec: ; 69ec (1:69ec) +OakSpeechSlidePicLeft: push de - ld hl, wTileMap - ld bc, $c0b - call ClearScreenArea - ld c, $a + coord hl, 0, 0 + lb bc, 12, 11 + call ClearScreenArea ; clear the name list text box + ld c, 10 call DelayFrames pop de ld hl, wcd6d - ld bc, $b + ld bc, NAME_LENGTH call CopyData call Delay3 - hlCoord 12, 4 - ld de, $67d + coord hl, 12, 4 + lb de, 6, 6 * SCREEN_WIDTH + 5 ld a, $ff - jr asm_6a19 + jr OakSpeechSlidePicCommon -Func_6a12: ; 6a12 (1:6a12) - hlCoord 5, 4 - ld de, $67d +OakSpeechSlidePicRight: + coord hl, 5, 4 + lb de, 6, 6 * SCREEN_WIDTH + 5 xor a -asm_6a19: ; 6a19 (1:6a19) + +OakSpeechSlidePicCommon: push hl push de push bc - ld [$ff8d], a + ld [hSlideDirection], a ld a, d - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b + ld [hSlideAmount], a ld a, e - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSlidingRegionSize], a ld c, a - ld a, [$ff8d] + ld a, [hSlideDirection] and a - jr nz, .asm_6a2d - ld d, $0 + jr nz, .next +; If sliding right, point hl to the end of the pic's tiles. + ld d, 0 add hl, de -.asm_6a2d +.next ld d, h ld e, l -.asm_6a2f +.loop xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld a, [$ff8d] + ld [H_AUTOBGTRANSFERENABLED], a + ld a, [hSlideDirection] and a - jr nz, .asm_6a3c + jr nz, .slideLeft +; sliding right ld a, [hli] ld [hld], a dec hl - jr .asm_6a3f -.asm_6a3c + jr .next2 +.slideLeft ld a, [hld] ld [hli], a inc hl -.asm_6a3f +.next2 dec c - jr nz, .asm_6a2f - ld a, [$ff8d] + jr nz, .loop + ld a, [hSlideDirection] and a - jr z, .asm_6a4a + jr z, .next3 +; If sliding left, we need to zero the last tile in the pic (there is no need +; to take a corresponding action when sliding right because hl initially points +; to a 0 tile in that case). xor a dec hl ld [hl], a -.asm_6a4a - ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba +.next3 + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c + ld a, [hSlidingRegionSize] ld c, a ld h, d ld l, e - ld a, [$ff8d] + ld a, [hSlideDirection] and a - jr nz, .asm_6a5e + jr nz, .slideLeft2 inc hl - jr .asm_6a5f -.asm_6a5e + jr .next4 +.slideLeft2 dec hl -.asm_6a5f +.next4 ld d, h ld e, l - ld a, [H_DOWNARROWBLINKCNT1] ; $ff8b + ld a, [hSlideAmount] dec a - ld [H_DOWNARROWBLINKCNT1], a ; $ff8b - jr nz, .asm_6a2f + ld [hSlideAmount], a + jr nz, .loop pop bc pop de pop hl ret -DisplayIntroNameTextBox: ; 6a6c (1:6a6c) +DisplayIntroNameTextBox: push de - ld hl, wTileMap + coord hl, 0, 0 ld b, $a ld c, $9 call TextBoxBorder - hlCoord 3, 0 - ld de, .namestring ; $6aa3 + coord hl, 3, 0 + ld de, .namestring call PlaceString pop de - hlCoord 2, 2 + coord hl, 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 ; A_BUTTON inc a - ld [wTopMenuItemY], a ; wTopMenuItemY + ld [wTopMenuItemY], a inc a - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a jp HandleMenuInput -.namestring ; 6aa3 (1:6aa3) +.namestring db "NAME@" IF DEF(_RED) -DefaultNamesPlayer: ; 6aa8 (1:6aa8) +DefaultNamesPlayer: db "NEW NAME" next "RED" next "ASH" next "JACK" db "@" -DefaultNamesRival: ; 6abe (1:6abe) +DefaultNamesRival: db "NEW NAME" next "BLUE" next "GARY" @@ -198,14 +204,14 @@ DefaultNamesRival: ; 6abe (1:6abe) ENDC IF DEF(_BLUE) -DefaultNamesPlayer: ; 6aa8 (1:6aa8) +DefaultNamesPlayer: db "NEW NAME" next "BLUE" next "GARY" next "JOHN" db "@" -DefaultNamesRival: ; 6abe (1:6abe) +DefaultNamesRival: db "NEW NAME" next "RED" next "ASH" @@ -213,61 +219,54 @@ DefaultNamesRival: ; 6abe (1:6abe) db "@" ENDC -IF DEF(_YELLOW) -DefaultNamesPlayer: - db "NEW NAME" - next "YELLOW" - next "ASH" - next "JACK" - db "@" - -DefaultNamesRival: - db "NEW NAME" - next "BLUE" - next "GARY" - next "JOHN" - db "@" -ENDC - -Func_6ad6: ; 6ad6 (1:6ad6) +GetDefaultName: +; a = name index +; hl = name list ld b, a - ld c, $0 -.asm_6ad9 + ld c, 0 +.loop ld d, h ld e, l -.asm_6adb +.innerLoop ld a, [hli] - cp $50 - jr nz, .asm_6adb + cp "@" + jr nz, .innerLoop ld a, b cp c - jr z, .asm_6ae7 + jr z, .foundName inc c - jr .asm_6ad9 -.asm_6ae7 + jr .loop +.foundName ld h, d ld l, e ld de, wcd6d ld bc, $14 jp CopyData + IF DEF(_RED) -DefaultNamesPlayerList: ; 6af2 (1:6af2) - db "NEW NAME@RED@ASH@JACK@" -DefaultNamesRivalList: ; 6b08 (1:6b08) - db "NEW NAME@BLUE@GARY@JOHN@" +DefaultNamesPlayerList: + db "NEW NAME@" + db "RED@" + db "ASH@" + db "JACK@" +DefaultNamesRivalList: + db "NEW NAME@" + db "BLUE@" + db "GARY@" + db "JOHN@" ENDC IF DEF(_BLUE) -DefaultNamesPlayerList: ; 6af2 (1:6af2) - db "NEW NAME@BLUE@GARY@JOHN@" -DefaultNamesRivalList: ; 6b08 (1:6b08) - db "NEW NAME@RED@ASH@JACK@" -ENDC -IF DEF(_YELLOW) DefaultNamesPlayerList: - db "NEW NAME@YELLOW@ASH@JACK@" + db "NEW NAME@" + db "BLUE@" + db "GARY@" + db "JOHN@" DefaultNamesRivalList: - db "NEW NAME@BLUE@GARY@JOHN@" + db "NEW NAME@" + db "RED@" + db "ASH@" + db "JACK@" ENDC -TextTerminator_6b20: ; 6b20 (1:6b20) +TextTerminator_6b20: db "@" diff --git a/engine/oam_dma.asm b/engine/oam_dma.asm index 3de4d773..7326445e 100644 --- a/engine/oam_dma.asm +++ b/engine/oam_dma.asm @@ -15,11 +15,12 @@ WriteDMACodeToHRAM: DMARoutine: ; initiate DMA ld a, wOAMBuffer / $100 - ld [$ff46], a + ld [rDMA], a ; wait for DMA to finish ld a, $28 -.wait dec a +.wait + dec a jr nz, .wait ret DMARoutineEnd: diff --git a/engine/overworld/cable_club_npc.asm b/engine/overworld/cable_club_npc.asm index bdab41a6..08067412 100755 --- a/engine/overworld/cable_club_npc.asm +++ b/engine/overworld/cable_club_npc.asm @@ -1,15 +1,14 @@ -CableClubNPC: ; 71c5 (1:71c5) +CableClubNPC: ld hl, CableClubNPCWelcomeText call PrintText - ld a, [wd74b] - bit 5, a ; received pokedex? + CheckEvent EVENT_GOT_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 - jp Func_7298 + jp .didNotConnect .receivedPokedex ld a, $1 ld [wMenuJoypadPollCount], a @@ -57,7 +56,7 @@ CableClubNPC: ; 71c5 (1:71c5) jr nz, .choseNo callab SaveSAVtoSRAM call WaitForSoundToFinish - ld a, (SFX_02_5d - SFX_Headers_02) / 3 + ld a, SFX_SAVE call PlaySoundWaitForCurrent ld hl, CableClubNPCPleaseWaitText call PrintText @@ -72,31 +71,29 @@ CableClubNPC: ; 71c5 (1:71c5) ld hl, wUnknownSerialCounter ld a, [hli] inc a - jr nz, Func_72a8 ; 0x726b $3b + jr nz, .connected ld a, [hl] inc a - jr nz, Func_72a8 ; 0x726f $37 - ld b, $a -.asm_7273 + jr nz, .connected + ld b, 10 +.syncLoop call DelayFrame call Serial_SendZeroByte dec b - jr nz, .asm_7273 ; 0x727a $f7 + jr nz, .syncLoop call CloseLinkConnection ld hl, CableClubNPCLinkClosedBecauseOfInactivityText call PrintText - jr Func_7298 ; 0x7285 $11 + jr .didNotConnect .failedToEstablishConnection ld hl, CableClubNPCAreaReservedFor2FriendsLinkedByCableText call PrintText - jr Func_7298 ; 0x728d $9 + jr .didNotConnect .choseNo call CloseLinkConnection ld hl, CableClubNPCPleaseComeAgainText call PrintText - ; fall through - -Func_7298: ; 7298 (1:7298) +.didNotConnect xor a ld hl, wUnknownSerialCounter ld [hli], a @@ -106,44 +103,42 @@ Func_7298: ; 7298 (1:7298) xor a ld [wMenuJoypadPollCount], a ret - -Func_72a8: ; 72a8 (1:72a8) +.connected xor a ld [hld], a ld [hl], a - ld hl, LinkMenu - ld b, BANK(LinkMenu) - jp Bankswitch + jpab LinkMenu -CableClubNPCAreaReservedFor2FriendsLinkedByCableText: ; 72b3 (1:72b3) +CableClubNPCAreaReservedFor2FriendsLinkedByCableText: TX_FAR _CableClubNPCAreaReservedFor2FriendsLinkedByCableText db "@" -CableClubNPCWelcomeText: ; 72b8 (1:72b8) +CableClubNPCWelcomeText: TX_FAR _CableClubNPCWelcomeText db "@" -CableClubNPCPleaseApplyHereHaveToSaveText: ; 72bd (1:72bd) +CableClubNPCPleaseApplyHereHaveToSaveText: TX_FAR _CableClubNPCPleaseApplyHereHaveToSaveText db "@" -CableClubNPCPleaseWaitText: ; 72c2 (1:72c2) +CableClubNPCPleaseWaitText: TX_FAR _CableClubNPCPleaseWaitText - db $a, "@" + TX_DELAY + db "@" -CableClubNPCLinkClosedBecauseOfInactivityText: ; 72c8 (1:72c8) +CableClubNPCLinkClosedBecauseOfInactivityText: TX_FAR _CableClubNPCLinkClosedBecauseOfInactivityText db "@" -CableClubNPCPleaseComeAgainText: ; 72cd (1:72cd) +CableClubNPCPleaseComeAgainText: TX_FAR _CableClubNPCPleaseComeAgainText db "@" -CableClubNPCMakingPreparationsText: ; 72d2 (1:72d2) +CableClubNPCMakingPreparationsText: TX_FAR _CableClubNPCMakingPreparationsText db "@" -CloseLinkConnection: ; 72d7 (1:72d7) +CloseLinkConnection: call Delay3 ld a, CONNECTION_NOT_ESTABLISHED ld [hSerialConnectionStatus], a diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm index c4df0d51..35495c82 100755 --- a/engine/overworld/card_key.asm +++ b/engine/overworld/card_key.asm @@ -1,6 +1,6 @@ -PrintCardKeyText: ; 52673 (14:6673) +PrintCardKeyText: ld hl, SilphCoMapList - ld a, [W_CURMAP] + ld a, [wCurMap] ld b, a .silphCoMapListLoop ld a, [hli] @@ -15,7 +15,7 @@ PrintCardKeyText: ; 52673 (14:6673) cp $24 jr z, .cardKeyDoorInFrontOfPlayer ld b, a - ld a, [W_CURMAP] + ld a, [wCurMap] cp SILPH_CO_11F ret nz ld a, b @@ -27,8 +27,8 @@ PrintCardKeyText: ; 52673 (14:6673) jr z, .noCardKey call GetCoordsInFrontOfPlayer push de - ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a + tx_pre_id CardKeySuccessText + ld [hSpriteIndexOrTextID], a call PrintPredefTextID pop de srl d @@ -39,7 +39,7 @@ PrintCardKeyText: ; 52673 (14:6673) ld a, e ld c, a ld [wCardKeyDoorX], a - ld a, [W_CURMAP] + ld a, [wCurMap] cp SILPH_CO_11F jr nz, .notSilphCo11F ld a, $3 @@ -47,18 +47,18 @@ PrintCardKeyText: ; 52673 (14:6673) .notSilphCo11F ld a, $e .replaceCardKeyDoorTileBlock - ld [wd09f], a + ld [wNewTileBlockID], a predef ReplaceTileBlock - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] - ld a, (SFX_1f_57 - SFX_Headers_1f) / 3 + ld a, SFX_GO_INSIDE jp PlaySound .noCardKey - ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a + tx_pre_id CardKeyFailText + ld [hSpriteIndexOrTextID], a jp PrintPredefTextID -SilphCoMapList: ; 526e3 (14:66e3) +SilphCoMapList: db SILPH_CO_2F db SILPH_CO_3F db SILPH_CO_4F @@ -71,22 +71,22 @@ SilphCoMapList: ; 526e3 (14:66e3) db SILPH_CO_11F db $FF -CardKeySuccessText: ; 526ee (14:66ee) +CardKeySuccessText: TX_FAR _CardKeySuccessText1 - db $0b + TX_SFX_ITEM_1 TX_FAR _CardKeySuccessText2 db "@" -CardKeyFailText: ; 526f8 (14:66f8) +CardKeyFailText: TX_FAR _CardKeyFailText db "@" ; d = Y ; e = X -GetCoordsInFrontOfPlayer: ; 526fd (14:66fd) - ld a, [W_YCOORD] +GetCoordsInFrontOfPlayer: + ld a, [wYCoord] ld d, a - ld a, [W_XCOORD] + ld a, [wXCoord] ld e, a ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction and a diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm index eefa2176..13313746 100755 --- a/engine/overworld/cinnabar_lab.asm +++ b/engine/overworld/cinnabar_lab.asm @@ -1,37 +1,37 @@ -GiveFossilToCinnabarLab: ; 61006 (18:5006) +GiveFossilToCinnabarLab: ld hl, wd730 set 6, [hl] xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld a, $3 - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys - ld a, [wcd37] + ld [wCurrentMenuItem], a + ld a, A_BUTTON | B_BUTTON + ld [wMenuWatchedKeys], a + ld a, [wFilteredBagItemsCount] dec a - ld [wMaxMenuItem], a ; wMaxMenuItem - ld a, $2 - ld [wTopMenuItemY], a ; wTopMenuItemY - ld a, $1 - ld [wTopMenuItemX], a ; wTopMenuItemX - ld a, [wcd37] + ld [wMaxMenuItem], a + ld a, 2 + ld [wTopMenuItemY], a + ld a, 1 + ld [wTopMenuItemX], a + ld a, [wFilteredBagItemsCount] dec a - ld bc, $2 - ld hl, $3 + ld bc, 2 + ld hl, 3 call AddNTimes dec l ld b, l ld c, $d - ld hl, wTileMap + coord hl, 0, 0 call TextBoxBorder call UpdateSprites - call Func_610c2 + call PrintFossilsInBag ld hl, wd730 res 6, [hl] call HandleMenuInput - bit 1, a - jr nz, .asm_610a7 - ld hl, wcc5b - ld a, [wCurrentMenuItem] ; wCurrentMenuItem - ld d, $0 + bit 1, a ; pressed B? + jr nz, .cancelledGivingFossil + ld hl, wFilteredBagItems + ld a, [wCurrentMenuItem] + ld d, 0 ld e, a add hl, de ld a, [hl] @@ -48,77 +48,76 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006) .choseDomeFossil ld b, KABUTO .fossilSelected - ld [W_FOSSILITEM], a + ld [wFossilItem], a ld a, b - ld [W_FOSSILMON], a + ld [wFossilMon], a call LoadFossilItemAndMonName ld hl, LabFossil_610ae call PrintText call YesNoChoice - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a - jr nz, .asm_610a7 + jr nz, .cancelledGivingFossil ld hl, LabFossil_610b3 call PrintText - ld a, [W_FOSSILITEM] - ld [$ffdb], a + ld a, [wFossilItem] + ld [hItemToRemoveID], a callba RemoveItemByID ld hl, LabFossil_610b8 call PrintText - ld hl, wd7a3 - set 0, [hl] - set 1, [hl] + SetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL ret -.asm_610a7 +.cancelledGivingFossil ld hl, LabFossil_610bd call PrintText ret -LabFossil_610ae: ; 610ae (18:50ae) +LabFossil_610ae: TX_FAR _Lab4Text_610ae db "@" -LabFossil_610b3: ; 610b3 (18:50b3) +LabFossil_610b3: TX_FAR _Lab4Text_610b3 db "@" -LabFossil_610b8: ; 610b8 (18:50b8) +LabFossil_610b8: TX_FAR _Lab4Text_610b8 db "@" -LabFossil_610bd: ; 610bd (18:50bd) +LabFossil_610bd: TX_FAR _Lab4Text_610bd db "@" -Func_610c2: ; 610c2 (18:50c2) - ld hl, wcc5b +PrintFossilsInBag: +; Prints each fossil in the player's bag on a separate line in the menu. + ld hl, wFilteredBagItems xor a - ld [$ffdb], a -.asm_610c8 + ld [hItemCounter], a +.loop ld a, [hli] cp $ff ret z push hl ld [wd11e], a call GetItemName - hlCoord 2, 2 - ld a, [$ffdb] - ld bc, $28 + coord hl, 2, 2 + ld a, [hItemCounter] + ld bc, SCREEN_WIDTH * 2 call AddNTimes ld de, wcd6d call PlaceString - ld hl, $ffdb + ld hl, hItemCounter inc [hl] pop hl - jr .asm_610c8 + jr .loop ; loads the names of the fossil item and the resulting mon -LoadFossilItemAndMonName: ; 610eb (18:50eb) - ld a, [W_FOSSILMON] +LoadFossilItemAndMonName: + ld a, [wFossilMon] ld [wd11e], a call GetMonName call CopyStringToCF4B - ld a, [W_FOSSILITEM] + ld a, [wFossilItem] ld [wd11e], a call GetItemName ret diff --git a/engine/overworld/clear_variables.asm b/engine/overworld/clear_variables.asm new file mode 100644 index 00000000..9a59cc7c --- /dev/null +++ b/engine/overworld/clear_variables.asm @@ -0,0 +1,20 @@ +ClearVariablesOnEnterMap: + ld a, SCREEN_HEIGHT_PIXELS + ld [hWY], a + ld [rWY], a + xor a + ld [H_AUTOBGTRANSFERENABLED], a + ld [wStepCounter], a + ld [wLoneAttackNo], a + ld [hJoyPressed], a + ld [hJoyReleased], a + ld [hJoyHeld], a + ld [wActionResultOrTookBattleTurn], a + ld [wUnusedD5A3], a + ld hl, wCardKeyDoorY + ld [hli], a + ld [hl], a + ld hl, wWhichTrade + ld bc, wStandingOnWarpPadOrHole - wWhichTrade + call FillMemory + ret diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm index 7b92bca3..f6ae6468 100755 --- a/engine/overworld/cut.asm +++ b/engine/overworld/cut.asm @@ -1,43 +1,43 @@ -UsedCut: ; ef54 (3:6f54) +UsedCut: xor a - ld [wcd6a], a - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld [wActionResultOrTookBattleTurn], a ; initialise to failure value + ld a, [wCurMapTileset] and a ; OVERWORLD - jr z, .asm_ef6b + jr z, .overworld cp GYM - jr nz, .asm_ef77 + jr nz, .nothingToCut ld a, [wTileInFrontOfPlayer] cp $50 ; gym cut tree - jr nz, .asm_ef77 - jr asm_ef82 -.asm_ef6b + jr nz, .nothingToCut + jr .canCut +.overworld dec a ld a, [wTileInFrontOfPlayer] cp $3d ; cut tree - jr z, asm_ef82 + jr z, .canCut cp $52 ; grass - jr z, asm_ef82 -.asm_ef77 - ld hl, NothingToCutText + jr z, .canCut +.nothingToCut + ld hl, .NothingToCutText jp PrintText -NothingToCutText: ; ef7d (3:6f7d) +.NothingToCutText TX_FAR _NothingToCutText db "@" -asm_ef82: ; ef82 (3:6f82) - ld [wcd4d], a - ld a, $1 - ld [wcd6a], a - ld a, [wWhichPokemon] ; wWhichPokemon - ld hl, wPartyMonNicks ; wPartyMonNicks +.canCut + ld [wCutTile], a + ld a, 1 + ld [wActionResultOrTookBattleTurn], a ; used cut + ld a, [wWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName ld hl, wd730 set 6, [hl] call GBPalWhiteOutWithDelay3 call ClearSprites call RestoreScreenTilesAndReloadTilePatterns - ld a, $90 + ld a, SCREEN_HEIGHT_PIXELS ld [hWY], a call Delay3 call LoadGBPal @@ -53,79 +53,80 @@ asm_ef82: ; ef82 (3:6f82) res 6, [hl] ld a, $ff ld [wUpdateSpritesEnabled], a - call AnimateCutTree - ld de, CutTreeBlockSwaps ; $7100 - call Func_f09f + call InitCutAnimOAM + ld de, CutTreeBlockSwaps + call ReplaceTreeTileBlock call RedrawMapView - callba Func_79e96 + callba AnimCut ld a, $1 ld [wUpdateSpritesEnabled], a - ld a, (SFX_02_56 - SFX_Headers_02) / 3 + ld a, SFX_CUT call PlaySound ld a, $90 ld [hWY], a call UpdateSprites jp RedrawMapView -UsedCutText: ; eff2 (3:6ff2) +UsedCutText: TX_FAR _UsedCutText db "@" -AnimateCutTree: ; eff7 (3:6ff7) +InitCutAnimOAM: xor a - ld [wcd50], a - ld a, $e4 - ld [rOBP1], a ; $ff49 - ld a, [wcd4d] + ld [wWhichAnimationOffsets], a + ld a, %11100100 + ld [rOBP1], a + ld a, [wCutTile] cp $52 - jr z, .asm_f020 - ld de, Overworld_GFX + $2d0 ; $42d0 ; cuttable tree sprite top row + jr z, .grass +; tree + ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row ld hl, vChars1 + $7c0 - ld bc, (BANK(Overworld_GFX) << 8) + $02 + lb bc, BANK(Overworld_GFX), $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 + lb bc, BANK(Overworld_GFX), $02 call CopyVideoData - jr WriteCutTreeBoulderDustAnimationOAMBlock -.asm_f020 + jr WriteCutOrBoulderDustAnimationOAMBlock +.grass ld hl, vChars1 + $7c0 - call LoadCutTreeAnimationTilePattern + call LoadCutGrassAnimationTilePattern ld hl, vChars1 + $7d0 - call LoadCutTreeAnimationTilePattern + call LoadCutGrassAnimationTilePattern ld hl, vChars1 + $7e0 - call LoadCutTreeAnimationTilePattern + call LoadCutGrassAnimationTilePattern ld hl, vChars1 + $7f0 - call LoadCutTreeAnimationTilePattern - call WriteCutTreeBoulderDustAnimationOAMBlock + call LoadCutGrassAnimationTilePattern + call WriteCutOrBoulderDustAnimationOAMBlock ld hl, wOAMBuffer + $93 - ld de, $4 + ld de, 4 ld a, $30 ld c, e -.asm_f044 +.loop ld [hl], a add hl, de xor $60 dec c - jr nz, .asm_f044 + jr nz, .loop ret -LoadCutTreeAnimationTilePattern: ; f04c (3:704c) - ld de, AnimationTileset2 + $60 ; $474e ; tile depicting a leaf - ld bc, (BANK(AnimationTileset2) << 8) + $01 +LoadCutGrassAnimationTilePattern: + ld de, AnimationTileset2 + $60 ; tile depicting a leaf + lb bc, BANK(AnimationTileset2), $01 jp CopyVideoData -WriteCutTreeBoulderDustAnimationOAMBlock: ; f055 (3:7055) - call GetCutTreeBoulderDustAnimationOffsets +WriteCutOrBoulderDustAnimationOAMBlock: + call GetCutOrBoulderDustAnimationOffsets ld a, $9 - ld de, CutTreeBoulderDustAnimationTilesAndAttributes + ld de, CutOrBoulderDustAnimationTilesAndAttributes jp WriteOAMBlock -CutTreeBoulderDustAnimationTilesAndAttributes: ; f060 (3:7060) +CutOrBoulderDustAnimationTilesAndAttributes: db $FC,$10,$FD,$10 db $FE,$10,$FF,$10 -GetCutTreeBoulderDustAnimationOffsets: ; f068 (3:7068) +GetCutOrBoulderDustAnimationOffsets: ld hl, wSpriteStateData1 + 4 ld a, [hli] ; player's sprite screen Y position ld b, a @@ -138,12 +139,12 @@ GetCutTreeBoulderDustAnimationOffsets: ; f068 (3:7068) srl a ld e, a ld d, $0 ; de holds direction (00: down, 02: up, 04: left, 06: right) - ld a, [wcd50] + ld a, [wWhichAnimationOffsets] and a - ld hl, CutTreeAnimationOffsets - jr z, .asm_f084 + ld hl, CutAnimationOffsets + jr z, .next ld hl, BoulderDustAnimationOffsets -.asm_f084 +.next add hl, de ld e, [hl] inc hl @@ -156,14 +157,14 @@ GetCutTreeBoulderDustAnimationOffsets: ; f068 (3:7068) ld c, a ret -CutTreeAnimationOffsets: ; f08f (3:708f) +CutAnimationOffsets: ; Each pair represents the x and y pixels offsets from the player of where the cut tree animation should be drawn db 8, 36 ; player is facing down db 8, 4 ; player is facing up db -8, 20 ; player is facing left db 24, 20 ; player is facing right -BoulderDustAnimationOffsets: ; f097 (3:7097) +BoulderDustAnimationOffsets: ; Each pair represents the x and y pixels offsets from the player of where the cut tree animation should be drawn ; These offsets represent 2 blocks away from the player db 8, 52 ; player is facing down @@ -171,79 +172,83 @@ BoulderDustAnimationOffsets: ; f097 (3:7097) db -24, 20 ; player is facing left db 40, 20 ; player is facing right -Func_f09f: ; f09f (3:709f) +ReplaceTreeTileBlock: +; Determine the address of the tile block that contains the tile in front of the +; player (i.e. where the tree is) and replace it with the corresponding tile +; block that doesn't have the tree. push de - ld a, [W_CURMAPWIDTH] ; wd369 - add $6 + ld a, [wCurMapWidth] + add 6 ld c, a - ld b, $0 - ld d, $0 + ld b, 0 + ld d, 0 ld hl, wCurrentTileBlockMapViewPointer ld a, [hli] ld h, [hl] ld l, a add hl, bc - ld a, [wSpriteStateData1 + 9] + ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction 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 +; right + ld a, [wXBlockCoord] and a - jr z, .asm_f0e0 - jr .asm_f0ec -.asm_f0c7 - ld a, [W_YBLOCKCOORD] ; wd363 + jr z, .centerTileBlock + jr .rightOfCenter +.down + ld a, [wYBlockCoord] and a - jr z, .asm_f0e0 - jr .asm_f0df -.asm_f0cf - ld a, [W_YBLOCKCOORD] ; wd363 + jr z, .centerTileBlock + jr .belowCenter +.up + ld a, [wYBlockCoord] and a - jr z, .asm_f0e1 - jr .asm_f0e0 -.asm_f0d7 - ld a, [W_XBLOCKCOORD] ; wd364 + jr z, .aboveCenter + jr .centerTileBlock +.left + ld a, [wXBlockCoord] and a - jr z, .asm_f0e6 - jr .asm_f0e0 -.asm_f0df + jr z, .leftOfCenter + jr .centerTileBlock +.belowCenter add hl, bc -.asm_f0e0 +.centerTileBlock add hl, bc -.asm_f0e1 +.aboveCenter ld e, $2 add hl, de - jr .asm_f0f0 -.asm_f0e6 + jr .next +.leftOfCenter ld e, $1 add hl, bc add hl, de - jr .asm_f0f0 -.asm_f0ec + jr .next +.rightOfCenter ld e, $3 add hl, bc add hl, de -.asm_f0f0 +.next pop de ld a, [hl] ld c, a -.asm_f0f3 +.loop ; find the matching tile block in the array ld a, [de] inc de inc de cp $ff ret z cp c - jr nz, .asm_f0f3 + jr nz, .loop dec de - ld a, [de] + ld a, [de] ; replacement tile block from matching array entry ld [hl], a ret -CutTreeBlockSwaps: ; f100 (3:7100) +CutTreeBlockSwaps: ; first byte = tileset block containing the cut tree ; second byte = corresponding tileset block after the cut animation happens db $32, $6D diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm index de2b9d55..f16fed66 100755 --- a/engine/overworld/cut2.asm +++ b/engine/overworld/cut2.asm @@ -1,89 +1,89 @@ -Func_79e96: ; 79e96 (1e:5e96) - ld a, [wcd4d] +AnimCut: + ld a, [wCutTile] cp $52 - jr z, .asm_79ec8 + jr z, .grass ld c, $8 -.asm_79e9f +.cutTreeLoop push bc ld hl, wOAMBuffer + $91 - ld a, $1 - ld [wd08a], a - ld c, $2 + ld a, 1 + ld [wCoordAdjustmentAmount], a + ld c, 2 call AdjustOAMBlockXPos2 ld hl, wOAMBuffer + $99 - ld a, $ff - ld [wd08a], a - ld c, $2 + ld a, -1 + ld [wCoordAdjustmentAmount], 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 - jr nz, .asm_79e9f + jr nz, .cutTreeLoop ret -.asm_79ec8 - ld c, $2 -.asm_79eca +.grass + ld c, 2 +.cutGrassLoop push bc ld c, $8 - call Func_79eed - call Func_79f30 + call AnimCutGrass_UpdateOAMEntries + call AnimCutGrass_SwapOAMEntries ld c, $8 - call Func_79eed - call Func_79f30 + call AnimCutGrass_UpdateOAMEntries + call AnimCutGrass_SwapOAMEntries ld hl, wOAMBuffer + $90 - ld a, $2 - ld [wd08a], a - ld c, $4 + ld a, 2 + ld [wCoordAdjustmentAmount], a + ld c, 4 call AdjustOAMBlockYPos2 pop bc dec c - jr nz, .asm_79eca + jr nz, .cutGrassLoop ret -Func_79eed: ; 79eed (1e:5eed) +AnimCutGrass_UpdateOAMEntries: push bc ld hl, wOAMBuffer + $91 - ld a, $1 - ld [wd08a], a - ld c, $1 + ld a, 1 + ld [wCoordAdjustmentAmount], a + ld c, 1 call AdjustOAMBlockXPos2 ld hl, wOAMBuffer + $95 - ld a, $2 - ld [wd08a], a - ld c, $1 + ld a, 2 + ld [wCoordAdjustmentAmount], a + ld c, 1 call AdjustOAMBlockXPos2 ld hl, wOAMBuffer + $99 - ld a, $fe - ld [wd08a], a - ld c, $1 + ld a, -2 + ld [wCoordAdjustmentAmount], a + ld c, 1 call AdjustOAMBlockXPos2 ld hl, wOAMBuffer + $9d - ld a, $ff - ld [wd08a], a - ld c, $1 + ld a, -1 + ld [wCoordAdjustmentAmount], 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 - jr nz, Func_79eed + jr nz, AnimCutGrass_UpdateOAMEntries ret -Func_79f30: ; 79f30 (1e:5f30) +AnimCutGrass_SwapOAMEntries: ld hl, wOAMBuffer + $90 - ld de, wHPBarMaxHP + ld de, wBuffer ld bc, $8 call CopyData ld hl, wOAMBuffer + $98 ld de, wOAMBuffer + $90 ld bc, $8 call CopyData - ld hl, wHPBarMaxHP + ld hl, wBuffer ld de, wOAMBuffer + $98 ld bc, $8 jp CopyData diff --git a/engine/overworld/daycare_exp.asm b/engine/overworld/daycare_exp.asm new file mode 100644 index 00000000..dbe4023a --- /dev/null +++ b/engine/overworld/daycare_exp.asm @@ -0,0 +1,18 @@ +IncrementDayCareMonExp: + ld a, [wDayCareInUse] + and a + ret z + ld hl, wDayCareMonExp + 2 + inc [hl] + ret nz + dec hl + inc [hl] + ret nz + dec hl + inc [hl] + ld a, [hl] + cp $50 + ret c + ld a, $50 + ld [hl], a + ret diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm index ac345af9..c39e096d 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) +IsPlayerStandingOnDoorTile: push de - ld hl, DoorTileIDPointers ; $662c - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld hl, DoorTileIDPointers + ld a, [wCurMapTileset] ld de, $3 call IsInArray pop de @@ -25,64 +25,51 @@ IsPlayerStandingOnDoorTile: ; 1a609 (6:6609) and a ret -DoorTileIDPointers: ; 1a62c (6:662c) - db OVERWORLD - dw OverworldDoorTileIDs - db FOREST - dw ForestDoorTileIDs - db MART - dw MartDoorTileIDs - db HOUSE - dw HouseDoorTileIDs - db FOREST_GATE - dw TilesetMuseumDoorTileIDs - db MUSEUM - dw TilesetMuseumDoorTileIDs - db GATE - dw TilesetMuseumDoorTileIDs - db SHIP - dw ShipDoorTileIDs - db LOBBY - dw LobbyDoorTileIDs - db MANSION - dw MansionDoorTileIDs - db LAB - dw LabDoorTileIDs - db FACILITY - dw FacilityDoorTileIDs - db PLATEAU - dw PlateauDoorTileIDs +DoorTileIDPointers: + dbw OVERWORLD, OverworldDoorTileIDs + dbw FOREST, ForestDoorTileIDs + dbw MART, MartDoorTileIDs + dbw HOUSE, HouseDoorTileIDs + dbw FOREST_GATE, TilesetMuseumDoorTileIDs + dbw MUSEUM, TilesetMuseumDoorTileIDs + dbw GATE, TilesetMuseumDoorTileIDs + dbw SHIP, ShipDoorTileIDs + dbw LOBBY, LobbyDoorTileIDs + dbw MANSION, MansionDoorTileIDs + dbw LAB, LabDoorTileIDs + dbw FACILITY, FacilityDoorTileIDs + dbw PLATEAU, PlateauDoorTileIDs db $ff -OverworldDoorTileIDs: ; 1a654 (6:6654) +OverworldDoorTileIDs: db $1B,$58,$00 -ForestDoorTileIDs: ; 1a657 (6:6657) +ForestDoorTileIDs: db $3a,$00 -MartDoorTileIDs: ; 1a659 (6:6659) +MartDoorTileIDs: db $5e,$00 -HouseDoorTileIDs: ; 1a65b (6:665b) +HouseDoorTileIDs: db $54,$00 -TilesetMuseumDoorTileIDs: ; 1a65d (6:665d) +TilesetMuseumDoorTileIDs: db $3b,$00 -ShipDoorTileIDs: ; 1a65f (6:665f) +ShipDoorTileIDs: db $1e,$00 -LobbyDoorTileIDs: ; 1a661 (6:6661) +LobbyDoorTileIDs: db $1c,$38,$1a,$00 -MansionDoorTileIDs: ; 1a665 (6:6665) +MansionDoorTileIDs: db $1a,$1c,$53,$00 -LabDoorTileIDs: ; 1a669 (6:6669) +LabDoorTileIDs: db $34,$00 -FacilityDoorTileIDs: ; 1a66b (6:666b) +FacilityDoorTileIDs: db $43,$58,$1b,$00 -PlateauDoorTileIDs: ; 1a66f (6:666f) +PlateauDoorTileIDs: db $3b,$1b,$00 diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm index 3a23d410..7ff4ff71 100755 --- a/engine/overworld/elevator.asm +++ b/engine/overworld/elevator.asm @@ -1,46 +1,48 @@ -ShakeElevator: ; 7bf15 (1e:7f15) - ld de, $ffe0 - call Func_7bf64 - ld de, $240 - call Func_7bf64 +ShakeElevator: + ld de, -$20 + call ShakeElevatorRedrawRow + ld de, SCREEN_HEIGHT * $20 + call ShakeElevatorRedrawRow call Delay3 ld a, $ff call PlaySound ld a, [hSCY] ld d, a ld e, $1 - ; number of times to play collision sfx - ld b, $64 -.asm_7bf30 + ld b, 100 +.shakeLoop ; scroll the BG up and down and play a sound effect ld a, e xor $fe ld e, a add d ld [hSCY], a push bc - ld c, BANK(SFX_02_5b) - ld a, (SFX_02_5b - SFX_Headers_02) / 3 + ld c, BANK(SFX_Collision_1) + ld a, SFX_COLLISION call PlayMusic pop bc - ld c, $2 + ld c, 2 call DelayFrames dec b - jr nz, .asm_7bf30 + jr nz, .shakeLoop ld a, d ld [hSCY], a ld a, $ff call PlaySound - ld c, BANK(SFX_02_5f) - ld a, (SFX_02_5f - SFX_Headers_02) / 3 + ld c, BANK(SFX_Safari_Zone_PA) + ld a, SFX_SAFARI_ZONE_PA call PlayMusic -.asm_7bf57 - ld a, [wc02a] - cp $b9 - jr z, .asm_7bf57 +.musicLoop + ld a, [wChannelSoundIDs + Ch4] + cp SFX_SAFARI_ZONE_PA + jr z, .musicLoop call UpdateSprites jp PlayDefaultMusic -Func_7bf64: ; 7bf64 (1e:7f64) +ShakeElevatorRedrawRow: +; This function is used to redraw certain portions of the screen, but it does +; not appear to ever result in any visible effect, so this function seems to +; be pointless. ld hl, wMapViewVRAMPointer + 1 ld a, [hld] push af @@ -54,7 +56,7 @@ Func_7bf64: ; 7bf64 (1e:7f64) add hl, de ld a, h and $3 - or $98 + or vBGMap0 / $100 ld d, a ld a, l pop hl diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index 7106063b..ac4276bd 100755 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -1,30 +1,33 @@ -EmotionBubble: ; 17c47 (5:7c47) - ld a, [wcd50] +EmotionBubble: + ld a, [wWhichEmotionBubble] ld c, a - ld b, $0 - ld hl, EmotionBubblesPointerTable ; $7caf + ld b, 0 + ld hl, EmotionBubblesPointerTable add hl, bc add hl, bc ld e, [hl] inc hl ld d, [hl] ld hl, vChars1 + $780 - ld bc, (BANK(EmotionBubblesPointerTable) << 8) + $04 + lb bc, BANK(EmotionBubbles), $04 call CopyVideoData ld a, [wUpdateSpritesEnabled] push af ld a, $ff ld [wUpdateSpritesEnabled], a ld a, [wd736] - bit 6, a - ld hl, wOAMBuffer + $8f - ld de, wOAMBuffer + $9f - jr z, .asm_17c7a - ld hl, wOAMBuffer + $7f - ld de, wOAMBuffer + $8f -.asm_17c7a + bit 6, a ; are the last 4 OAM entries reserved for a shadow or fishing rod? + ld hl, wOAMBuffer + 4 * 35 + $3 ; $8f + ld de, wOAMBuffer + 4 * 39 + $3 ; $9f + jr z, .next + ld hl, wOAMBuffer + 4 * 31 + $3 ; $7f + ld de, wOAMBuffer + 4 * 35 + $3 ; $8f + +; Copy OAM data 16 bytes forward to make room for emotion bubble OAM data at the +; start of the OAM buffer. +.next ld bc, $90 -.asm_17c7d +.loop ld a, [hl] ld [de], a dec hl @@ -32,12 +35,14 @@ EmotionBubble: ; 17c47 (5:7c47) dec bc ld a, c or b - jr nz, .asm_17c7d + jr nz, .loop + +; get the screen coordinates of the sprite the bubble is to be displayed above ld hl, wSpriteStateData1 + 4 - ld a, [wcd4f] + ld a, [wEmotionBubbleSpriteIndex] swap a ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hli] ld b, a @@ -45,24 +50,25 @@ 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 call DelayFrame jp UpdateSprites -EmotionBubblesPointerTable: ; 17caf (5:7caf) +EmotionBubblesPointerTable: dw EmotionBubbles dw EmotionBubbles + $40 dw EmotionBubbles + $80 -EmotionBubblesOAM: ; 17cb5 (5:7cb5) +EmotionBubblesOAM: db $F8,$00,$F9,$00 db $FA,$00,$FB,$00 -EmotionBubbles: ; 17cbd (5:7cbd) +EmotionBubbles: INCBIN "gfx/emotion_bubbles.2bpp" diff --git a/engine/overworld/field_move_messages.asm b/engine/overworld/field_move_messages.asm new file mode 100644 index 00000000..69914bfc --- /dev/null +++ b/engine/overworld/field_move_messages.asm @@ -0,0 +1,57 @@ +PrintStrengthTxt: + ld hl, wd728 + set 0, [hl] + ld hl, UsedStrengthText + call PrintText + ld hl, CanMoveBouldersText + jp PrintText + +UsedStrengthText: + TX_FAR _UsedStrengthText + TX_ASM + ld a, [wcf91] + call PlayCry + call Delay3 + jp TextScriptEnd + +CanMoveBouldersText: + TX_FAR _CanMoveBouldersText + db "@" + +IsSurfingAllowed: +; Returns whether surfing is allowed in bit 1 of wd728. +; Surfing isn't allowed on the Cycling Road or in the lowest level of the +; Seafoam Islands before the current has been slowed with boulders. + ld hl, wd728 + set 1, [hl] + ld a, [wd732] + bit 5, a + jr nz, .forcedToRideBike + ld a, [wCurMap] + cp SEAFOAM_ISLANDS_5 + ret nz + CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE + ret z + ld hl, CoordsData_cdf7 + call ArePlayerCoordsInArray + ret nc + ld hl, wd728 + res 1, [hl] + ld hl, CurrentTooFastText + jp PrintText +.forcedToRideBike + ld hl, wd728 + res 1, [hl] + ld hl, CyclingIsFunText + jp PrintText + +CoordsData_cdf7: + db $0B,$07,$FF + +CurrentTooFastText: + TX_FAR _CurrentTooFastText + db "@" + +CyclingIsFunText: + TX_FAR _CyclingIsFunText + db "@" diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 90d306c3..38a44cfb 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -1,71 +1,71 @@ -AnimateHealingMachine: ; 70433 (1c:4433) - ld de, PokeCenterFlashingMonitorAndHealBall ; $44b7 +AnimateHealingMachine: + ld de, PokeCenterFlashingMonitorAndHealBall ld hl, vChars0 + $7c0 - ld bc, (BANK(PokeCenterFlashingMonitorAndHealBall) << 8) + $03 + lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03 ; loads one too many tiles call CopyVideoData ld hl, wUpdateSpritesEnabled ld a, [hl] 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 - call Func_70503 - ld a, $4 - ld [wMusicHeaderPointer], a + ld de, PokeCenterOAMData + call CopyHealingMachineOAM + ld a, 4 + ld [wAudioFadeOutControl], a ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound -.asm_70464 - ld a, [wMusicHeaderPointer] - and a - jr nz, .asm_70464 - ld a, [wPartyCount] ; wPartyCount +.waitLoop + ld a, [wAudioFadeOutControl] + and a ; is fade-out finished? + jr nz, .waitLoop ; if not, check again + ld a, [wPartyCount] ld b, a -.asm_7046e - call Func_70503 - ld a, (SFX_02_4a - SFX_Headers_02) / 3 +.partyLoop + call CopyHealingMachineOAM + ld a, SFX_HEALING_MACHINE call PlaySound - ld c, $1e + ld c, 30 call DelayFrames dec b - jr nz, .asm_7046e - ld a, [wc0ef] - cp $1f - ld [wc0f0], a - jr nz, .asm_70495 + jr nz, .partyLoop + ld a, [wAudioROMBank] + cp BANK(Audio3_UpdateMusic) + ld [wAudioSavedROMBank], a + jr nz, .next ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld a, BANK(Music_PkmnHealed) - ld [wc0ef], a -.asm_70495 + ld [wAudioROMBank], a +.next ld a, MUSIC_PKMN_HEALED - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld d, $28 call FlashSprite8Times -.asm_704a2 - ld a, [wc026] - cp MUSIC_PKMN_HEALED - jr z, .asm_704a2 - ld c, $20 +.waitLoop2 + ld a, [wChannelSoundIDs] + cp MUSIC_PKMN_HEALED ; is the healed music still playing? + jr z, .waitLoop2 ; if so, check gain + ld c, 32 call DelayFrames pop af - ld [rOBP1], a ; $ff49 + ld [rOBP1], a pop hl pop af ld [hl], a jp UpdateSprites -PokeCenterFlashingMonitorAndHealBall: ; 704b7 (1c:44b7) +PokeCenterFlashingMonitorAndHealBall: INCBIN "gfx/pokecenter_ball.2bpp" -PokeCenterOAMData: ; 704d7 (1c:44d7) +PokeCenterOAMData: db $24,$34,$7C,$10 ; heal machine monitor db $2B,$30,$7D,$10 ; pokeballs 1-6 db $2B,$38,$7D,$30 @@ -75,7 +75,7 @@ PokeCenterOAMData: ; 704d7 (1c:44d7) db $35,$38,$7D,$30 ; d = value to xor with palette -FlashSprite8Times: ; 704f3 (1c:44f3) +FlashSprite8Times: ld b, 8 .loop ld a, [rOBP1] @@ -87,7 +87,8 @@ FlashSprite8Times: ; 704f3 (1c:44f3) jr nz, .loop ret -Func_70503: ; 70503 (1c:4503) +CopyHealingMachineOAM: +; copy one OAM entry and advance the pointers ld a, [de] inc de ld [hli], a diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm index 17288a17..32783f83 100755 --- a/engine/overworld/hidden_items.asm +++ b/engine/overworld/hidden_items.asm @@ -1,45 +1,43 @@ -HiddenItems: ; 76688 (1d:6688) +HiddenItems: ld hl, HiddenItemCoords - call Func_76857 - ld [wTrainerScreenX], a - ld hl, wd6f0 - ld a, [wTrainerScreenX] + call FindHiddenItemOrCoinsIndex + ld [wHiddenItemOrCoinsIndex], a + ld hl, wObtainedHiddenItemsFlags + ld a, [wHiddenItemOrCoinsIndex] ld c, a - ld b, $2 + ld b, FLAG_TEST predef FlagActionPredef ld a, c and a ret nz call EnableAutoTextBoxDrawing - ld a, $1 + ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld a, [wWhichTrade] ; item ID + ld a, [wHiddenObjectFunctionArgument] ; 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? +FoundHiddenItemText: TX_FAR _FoundHiddenItemText - db $8 - ld a, [wWhichTrade] ; item ID + TX_ASM + ld a, [wHiddenObjectFunctionArgument] ; item ID ld b, a ld c, 1 call GiveItem - jr nc, .BagFull - ld hl, wd6f0 - ld a, [wTrainerScreenX] + jr nc, .bagFull + ld hl, wObtainedHiddenItemsFlags + ld a, [wHiddenItemOrCoinsIndex] ld c, a - ld b, $1 + ld b, FLAG_SET predef FlagActionPredef - ld a, (SFX_02_3b - SFX_Headers_02) / 3 - call PlaySoundWaitForCurrent ; play sound - call WaitForSoundToFinish ; wait for sound to finish playing + ld a, SFX_GET_ITEM_2 + call PlaySoundWaitForCurrent + call WaitForSoundToFinish jp TextScriptEnd -.BagFull +.bagFull call WaitForTextScrollButtonPress ; wait for button press xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -47,116 +45,117 @@ FoundHiddenItemText: ; 7675b (1d:675b) call PrintText jp TextScriptEnd -HiddenItemBagFullText: ; 76794 (1d:6794) +HiddenItemBagFullText: TX_FAR _HiddenItemBagFullText db "@" -HiddenCoins: ; 76799 (1d:6799) +HiddenCoins: ld b, COIN_CASE - predef IsItemInBag_ + predef GetQuantityOfItemInBag ld a, b and a ret z ld hl, HiddenCoinCoords - call Func_76857 - ld [wTrainerScreenX], a - ld hl, wd6fe - ld a, [wTrainerScreenX] + call FindHiddenItemOrCoinsIndex + ld [wHiddenItemOrCoinsIndex], a + ld hl, wObtainedHiddenCoinsFlags + ld a, [wHiddenItemOrCoinsIndex] ld c, a - ld b, $2 + ld b, FLAG_TEST predef FlagActionPredef ld a, c and a ret nz xor a - ld [$ff9f], a - ld [$ffa0], a - ld [$ffa1], a - ld a, [wWhichTrade] + ld [hUnusedCoinsByte], a + ld [hCoins], a + ld [hCoins + 1], a + ld a, [wHiddenObjectFunctionArgument] sub COIN cp 10 jr z, .bcd10 cp 20 jr z, .bcd20 cp 40 - jr z, .bcd20 + jr z, .bcd20 ; should be bcd40 jr .bcd100 .bcd10 ld a, $10 - ld [$ffa1], a - jr .bcddone + ld [hCoins + 1], a + jr .bcdDone .bcd20 ld a, $20 - ld [$ffa1], a - jr .bcddone + ld [hCoins + 1], a + jr .bcdDone .bcd40 ; due to a typo, this is never used ld a, $40 - ld [$ffa1], a - jr .bcddone + ld [hCoins + 1], a + jr .bcdDone .bcd100 ld a, $1 - ld [$ffa0], a -.bcddone + ld [hCoins], a +.bcdDone ld de, wPlayerCoins + 1 - ld hl, $ffa1 + ld hl, hCoins + 1 ld c, $2 predef AddBCDPredef - ld hl, wd6fe - ld a, [wTrainerScreenX] + ld hl, wObtainedHiddenCoinsFlags + ld a, [wHiddenItemOrCoinsIndex] ld c, a - ld b, $1 + ld b, FLAG_SET predef FlagActionPredef call EnableAutoTextBoxDrawing ld a, [wPlayerCoins] cp $99 - jr nz, .RoomInCoinCase + jr nz, .roomInCoinCase ld a, [wPlayerCoins + 1] cp $99 - jr nz, .RoomInCoinCase - ld a, $2c + jr nz, .roomInCoinCase + tx_pre_id DroppedHiddenCoinsText jr .done -.RoomInCoinCase - ld a, $2b +.roomInCoinCase + tx_pre_id FoundHiddenCoinsText .done jp PrintPredefTextID INCLUDE "data/hidden_coins.asm" -FoundHiddenCoinsText: ; 76847 (1d:6847) +FoundHiddenCoinsText: TX_FAR _FoundHiddenCoinsText - db $10,"@" + TX_SFX_ITEM_2 + db "@" -DroppedHiddenCoinsText: ; 7684d (1d:684d) +DroppedHiddenCoinsText: TX_FAR _FoundHiddenCoins2Text - db $10 + TX_SFX_ITEM_2 TX_FAR _DroppedHiddenCoinsText db "@" -Func_76857: ; 76857 (1d:6857) - ld a, [wTrainerScreenY] +FindHiddenItemOrCoinsIndex: + ld a, [wHiddenObjectY] ld d, a - ld a, [wTrainerScreenX] + ld a, [wHiddenObjectX] ld e, a - ld a, [W_CURMAP] + ld a, [wCurMap] ld b, a - ld c, $ff + ld c, -1 .loop inc c ld a, [hli] cp $ff ; end of the list? ret z ; if so, we're done here cp b - jr nz, .asm_76877 ; 0x7686b $a + jr nz, .next1 ld a, [hli] cp d - jr nz, .asm_76878 ; 0x7686f $7 + jr nz, .next2 ld a, [hli] cp e jr nz, .loop ld a, c ret -.asm_76877 +.next1 inc hl -.asm_76878 +.next2 inc hl jr .loop diff --git a/engine/overworld/hidden_objects.asm b/engine/overworld/hidden_objects.asm index ae67aeed..dcdf8537 100755 --- a/engine/overworld/hidden_objects.asm +++ b/engine/overworld/hidden_objects.asm @@ -1,4 +1,4 @@ -Func_46981: ; 46981 (11:6981) +IsPlayerOnDungeonWarp: xor a ld [wWhichDungeonWarp], a ld a, [wd72d] @@ -6,7 +6,7 @@ Func_46981: ; 46981 (11:6981) ret nz call ArePlayerCoordsInArray ret nc - ld a, [wWhichTrade] + ld a, [wCoordIndex] ld [wWhichDungeonWarp], a ld hl, wd72d set 4, [hl] @@ -15,7 +15,7 @@ Func_46981: ; 46981 (11:6981) ret ; if a hidden object was found, stores $00 in [$ffee], else stores $ff -CheckForHiddenObject: ; 469a0 (11:69a0) +CheckForHiddenObject: ld hl, $ffeb xor a ld [hli], a @@ -29,7 +29,7 @@ CheckForHiddenObject: ; 469a0 (11:69a0) ld b, a cp $ff jr z, .noMatch - ld a, [W_CURMAP] + ld a, [wCurMap] cp b jr z, .foundMatchingMap inc de @@ -58,7 +58,7 @@ CheckForHiddenObject: ; 469a0 (11:69a0) ld [wHiddenObjectX], a ld c, a call CheckIfCoordsInFrontOfPlayerMatch - ld a, [$ffea] + ld a, [hCoordsInFrontOfPlayerMatch] and a jr z, .foundMatchingObject inc hl @@ -85,8 +85,8 @@ CheckForHiddenObject: ; 469a0 (11:69a0) ret ; checks if the coordinates in front of the player's sprite match Y in b and X in c -; [$ffea] = $00 if they match, $ff if they don't match -CheckIfCoordsInFrontOfPlayerMatch: ; 46a01 (11:6a01) +; [hCoordsInFrontOfPlayerMatch] = $00 if they match, $ff if they don't match +CheckIfCoordsInFrontOfPlayerMatch: ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction cp SPRITE_FACING_UP jr z, .facingUp @@ -95,30 +95,30 @@ CheckIfCoordsInFrontOfPlayerMatch: ; 46a01 (11:6a01) cp SPRITE_FACING_RIGHT jr z, .facingRight ; facing down - ld a, [W_YCOORD] + ld a, [wYCoord] inc a jr .upDownCommon .facingUp - ld a, [W_YCOORD] + ld a, [wYCoord] dec a .upDownCommon cp b jr nz, .didNotMatch - ld a, [W_XCOORD] + ld a, [wXCoord] cp c jr nz, .didNotMatch jr .matched .facingLeft - ld a, [W_XCOORD] + ld a, [wXCoord] dec a jr .leftRightCommon .facingRight - ld a, [W_XCOORD] + ld a, [wXCoord] inc a .leftRightCommon cp c jr nz, .didNotMatch - ld a, [W_YCOORD] + ld a, [wYCoord] cp b jr nz, .didNotMatch .matched @@ -127,7 +127,7 @@ CheckIfCoordsInFrontOfPlayerMatch: ; 46a01 (11:6a01) .didNotMatch ld a, $ff .done - ld [$ffea], a + ld [hCoordsInFrontOfPlayerMatch], a ret INCLUDE "data/hidden_objects.asm" diff --git a/engine/overworld/is_player_just_outside_map.asm b/engine/overworld/is_player_just_outside_map.asm index 24e434b3..44690db0 100644 --- a/engine/overworld/is_player_just_outside_map.asm +++ b/engine/overworld/is_player_just_outside_map.asm @@ -1,13 +1,13 @@ ; returns whether the player is one tile outside the map in Z -IsPlayerJustOutsideMap: ; 128d8 (4:68d8) - ld a, [W_YCOORD] +IsPlayerJustOutsideMap: + ld a, [wYCoord] ld b, a - ld a, [W_CURMAPHEIGHT] + ld a, [wCurMapHeight] call .compareCoordWithMapDimension ret z - ld a, [W_XCOORD] + ld a, [wXCoord] ld b, a - ld a, [W_CURMAPWIDTH] + ld a, [wCurMapWidth] .compareCoordWithMapDimension add a cp b diff --git a/engine/overworld/item.asm b/engine/overworld/item.asm index a49fc268..9f19100a 100644 --- a/engine/overworld/item.asm +++ b/engine/overworld/item.asm @@ -1,9 +1,9 @@ -PickupItem: +PickUpItem: call EnableAutoTextBoxDrawing - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c + ld a, [hSpriteIndexOrTextID] ld b, a - ld hl, W_MISSABLEOBJECTLIST + ld hl, wMissableObjectList .missableObjectsListLoop ld a, [hli] cp $ff @@ -17,8 +17,8 @@ PickupItem: ld a, [hl] ld [$ffdb], a - ld hl, W_MAPSPRITEEXTRADATA - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c + ld hl, wMapSpriteExtraData + ld a, [hSpriteIndexOrTextID] dec a add a ld d, 0 @@ -31,7 +31,7 @@ PickupItem: jr nc, .BagFull ld a, [$ffdb] - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -46,7 +46,7 @@ PickupItem: FoundItemText: TX_FAR _FoundItemText - db $0B + TX_SFX_ITEM_1 db "@" NoMoreRoomForItemText: diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm index b8c19181..342540b2 100755 --- a/engine/overworld/ledges.asm +++ b/engine/overworld/ledges.asm @@ -1,8 +1,8 @@ -HandleLedges: ; 1a672 (6:6672) +HandleLedges: ld a, [wd736] bit 6, a ; already jumping down ledge ret nz - ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET + ld a, [wCurMapTileset] and a ; OVERWORLD ret nz predef GetTileAndCoordsInFrontOfPlayer @@ -50,12 +50,12 @@ HandleLedges: ; 1a672 (6:6672) ld a, $2 ld [wSimulatedJoypadStatesIndex], a call LoadHoppingShadowOAM - ld a, (SFX_02_4e - SFX_Headers_02) / 3 + ld a, SFX_LEDGE call PlaySound ret ; (player direction) (tile player standing on) (ledge tile) (input required) -LedgeTiles: ; 1a6cf (6:66cf) +LedgeTiles: db SPRITE_FACING_DOWN, $2C,$37,D_DOWN db SPRITE_FACING_DOWN, $39,$36,D_DOWN db SPRITE_FACING_DOWN, $39,$37,D_DOWN @@ -66,20 +66,21 @@ LedgeTiles: ; 1a6cf (6:66cf) db SPRITE_FACING_RIGHT,$39,$0D,D_RIGHT db $FF -LoadHoppingShadowOAM: ; 1a6f0 (6:66f0) +LoadHoppingShadowOAM: ld hl, vChars1 + $7f0 ld de, LedgeHoppingShadow - ld bc, (BANK(LedgeHoppingShadow) << 8) + $01 + lb bc, BANK(LedgeHoppingShadow), (LedgeHoppingShadowEnd - LedgeHoppingShadow) / $8 call CopyVideoDataDouble ld a, $9 - ld bc, $5448 ; b, c = y, x coordinates of shadow + lb bc, $54, $48 ; b, c = y, x coordinates of shadow ld de, LedgeHoppingShadowOAM call WriteOAMBlock ret -LedgeHoppingShadow: ; 1a708 (6:6708) +LedgeHoppingShadow: INCBIN "gfx/ledge_hopping_shadow.1bpp" +LedgeHoppingShadowEnd: -LedgeHoppingShadowOAM: ; 1a710 (6:6710) +LedgeHoppingShadowOAM: db $FF,$10,$FF,$20 db $FF,$40,$FF,$60 diff --git a/engine/overworld/map_sprite_functions1.asm b/engine/overworld/map_sprite_functions1.asm new file mode 100644 index 00000000..d1a411fa --- /dev/null +++ b/engine/overworld/map_sprite_functions1.asm @@ -0,0 +1,356 @@ +_UpdateSprites: + ld h, $c1 + inc h + ld a, $e ; wSpriteStateData2 + $0e +.spriteLoop + ld l, a + sub $e + ld c, a + ld [H_CURRENTSPRITEOFFSET], a + ld a, [hl] + and a + jr z, .skipSprite ; tests $c2Xe + push hl + push de + push bc + call .updateCurrentSprite + pop bc + pop de + pop hl +.skipSprite + ld a, l + add $10 ; move to next sprite + cp $e ; test for overflow (back at $0e) + jr nz, .spriteLoop + ret +.updateCurrentSprite + cp $1 + jp nz, UpdateNonPlayerSprite + jp UpdatePlayerSprite + +UpdateNonPlayerSprite: + dec a + swap a + ld [$ff93], a ; $10 * sprite# + ld a, [wNPCMovementScriptSpriteOffset] ; some sprite offset? + ld b, a + ld a, [H_CURRENTSPRITEOFFSET] + cp b + jr nz, .unequal + jp DoScriptedNPCMovement +.unequal + jp UpdateNPCSprite + +; This detects if the current sprite (whose offset is at H_CURRENTSPRITEOFFSET) +; is going to collide with another sprite by looping over the other sprites. +; The current sprite's offset will be labelled with i (e.g. $c1i0). +; The loop sprite's offset will labelled with j (e.g. $c1j0). +; +; Note that the Y coordinate of the sprite (in [$c1k4]) is one of the following +; 9 values when the sprite is aligned with the grid: $fc, $0c, $1c, $2c, ..., $7c. +; The reason that 4 is added below to the coordinate is to make it align with a +; multiple of $10 to make comparisons easier. +DetectCollisionBetweenSprites: + nop + + ld h, wSpriteStateData1 / $100 + ld a, [H_CURRENTSPRITEOFFSET] + add wSpriteStateData1 % $100 + ld l, a + + ld a, [hl] ; a = [$c1i0] (picture) (0 if slot is unused) + and a ; is this sprite slot slot used? + ret z ; return if not used + + ld a, l + add 3 + ld l, a + + ld a, [hli] ; a = [$c1i3] (delta Y) (-1, 0, or 1) + call SetSpriteCollisionValues + + ld a, [hli] ; a = [$C1i4] (Y screen coordinate) + add 4 ; align with multiple of $10 + +; The effect of the following 3 lines is to +; add 7 to a if moving south or +; subtract 7 from a if moving north. + add b + and $f0 + or c + + ld [$ff90], a ; store Y coordinate adjusted for direction of movement + + ld a, [hli] ; a = [$c1i5] (delta X) (-1, 0, or 1) + call SetSpriteCollisionValues + ld a, [hl] ; a = [$C1i6] (X screen coordinate) + +; The effect of the following 3 lines is to +; add 7 to a if moving east or +; subtract 7 from a if moving west. + add b + and $f0 + or c + + ld [$ff91], a ; store X coordinate adjusted for direction of movement + + ld a, l + add 7 + ld l, a + + xor a + ld [hld], a ; zero [$c1id] XXX what's [$c1id] for? + ld [hld], a ; zero [$c1ic] (directions in which collisions occurred) + + ld a, [$ff91] + ld [hld], a ; [$c1ib] = adjusted X coordinate + ld a, [$ff90] + ld [hl], a ; [$c1ia] = adjusted Y coordinate + + xor a ; zero the loop counter + +.loop + ld [$ff8f], a ; store loop counter + swap a + ld e, a + ld a, [H_CURRENTSPRITEOFFSET] + cp e ; does the loop sprite match the current sprite? + jp z, .next ; go to the next sprite if they match + + ld d, h + ld a, [de] ; a = [$c1j0] (picture) (0 if slot is unused) + and a ; is this sprite slot slot used? + jp z, .next ; go the next sprite if not used + + inc e + inc e + ld a, [de] ; a = [$c1j2] ($ff means the sprite is offscreen) + inc a + jp z, .next ; go the next sprite if offscreen + + ld a, [H_CURRENTSPRITEOFFSET] + add 10 + ld l, a + + inc e + ld a, [de] ; a = [$c1j3] (delta Y) + call SetSpriteCollisionValues + + inc e + ld a, [de] ; a = [$C1j4] (Y screen coordinate) + add 4 ; align with multiple of $10 + +; The effect of the following 3 lines is to +; add 7 to a if moving south or +; subtract 7 from a if moving north. + add b + and $f0 + or c + + sub [hl] ; subtract the adjusted Y coordinate of sprite i ([$c1ia]) from that of sprite j + +; calculate the absolute value of the difference to get the distance + jr nc, .noCarry1 + cpl + inc a +.noCarry1 + ld [$ff90], a ; store the distance between the two sprites' adjusted Y values + +; Use the carry flag set by the above subtraction to determine which sprite's +; Y coordinate is larger. This information is used later to set [$c1ic], +; which stores which direction the collision occurred in. +; The following 5 lines set the lowest 2 bits of c, which are later shifted left by 2. +; If sprite i's Y is larger, set lowest 2 bits of c to 10. +; If sprite j's Y is larger or both are equal, set lowest 2 bits of c to 01. + push af + rl c + pop af + ccf + rl c + +; If sprite i's delta Y is 0, then b = 7, else b = 9. + ld b, 7 + ld a, [hl] ; a = [$c1ia] (adjusted Y coordinate) + and $f + jr z, .next1 + ld b, 9 + +.next1 + ld a, [$ff90] ; a = distance between adjusted Y coordinates + sub b + ld [$ff92], a ; store distance adjusted using sprite i's direction + ld a, b + ld [$ff90], a ; store 7 or 9 depending on sprite i's delta Y + jr c, .checkXDistance + +; If sprite j's delta Y is 0, then b = 7, else b = 9. + ld b, 7 + dec e + ld a, [de] ; a = [$c1j3] (delta Y) + inc e + and a + jr z, .next2 + ld b, 9 + +.next2 + ld a, [$ff92] ; a = distance adjusted using sprite i's direction + sub b ; adjust distance using sprite j's direction + jr z, .checkXDistance + jr nc, .next ; go to next sprite if distance is still positive after both adjustments + +.checkXDistance + inc e + inc l + ld a, [de] ; a = [$c1j5] (delta X) + + push bc + + call SetSpriteCollisionValues + inc e + ld a, [de] ; a = [$c1j6] (X screen coordinate) + +; The effect of the following 3 lines is to +; add 7 to a if moving east or +; subtract 7 from a if moving west. + add b + and $f0 + or c + + pop bc + + sub [hl] ; subtract the adjusted X coordinate of sprite i ([$c1ib]) from that of sprite j + +; calculate the absolute value of the difference to get the distance + jr nc, .noCarry2 + cpl + inc a +.noCarry2 + ld [$ff91], a ; store the distance between the two sprites' adjusted X values + +; Use the carry flag set by the above subtraction to determine which sprite's +; X coordinate is larger. This information is used later to set [$c1ic], +; which stores which direction the collision occurred in. +; The following 5 lines set the lowest 2 bits of c. +; If sprite i's X is larger, set lowest 2 bits of c to 10. +; If sprite j's X is larger or both are equal, set lowest 2 bits of c to 01. + push af + rl c + pop af + ccf + rl c + +; If sprite i's delta X is 0, then b = 7, else b = 9. + ld b, 7 + ld a, [hl] ; a = [$c1ib] (adjusted X coordinate) + and $f + jr z, .next3 + ld b, 9 + +.next3 + ld a, [$ff91] ; a = distance between adjusted X coordinates + sub b + ld [$ff92], a ; store distance adjusted using sprite i's direction + ld a, b + ld [$ff91], a ; store 7 or 9 depending on sprite i's delta X + jr c, .collision + +; If sprite j's delta X is 0, then b = 7, else b = 9. + ld b, 7 + dec e + ld a, [de] ; a = [$c1j5] (delta X) + inc e + and a + jr z, .next4 + ld b, 9 + +.next4 + ld a, [$ff92] ; a = distance adjusted using sprite i's direction + sub b ; adjust distance using sprite j's direction + jr z, .collision + jr nc, .next ; go to next sprite if distance is still positive after both adjustments + +.collision + ld a, [$ff91] ; a = 7 or 9 depending on sprite i's delta X + ld b, a + ld a, [$ff90] ; a = 7 or 9 depending on sprite i's delta Y + inc l + +; If delta X isn't 0 and delta Y is 0, then b = %0011, else b = %1100. +; (note that normally if delta X isn't 0, then delta Y must be 0 and vice versa) + cp b + jr c, .next5 + ld b, %1100 + jr .next6 +.next5 + ld b, %0011 + +.next6 + ld a, c ; c has 2 bits set (one of bits 0-1 is set for the X axis and one of bits 2-3 for the Y axis) + and b ; we select either the bit in bits 0-1 or bits 2-3 based on the calculation immediately above + or [hl] ; or with existing collision direction bits in [$c1ic] + ld [hl], a ; store new value + ld a, c ; useless code because a is overwritten before being used again + +; set bit in [$c1ie] or [$c1if] to indicate which sprite the collision occurred with + inc l + inc l + ld a, [$ff8f] ; a = loop counter + ld de, SpriteCollisionBitTable + add a + add e + ld e, a + jr nc, .noCarry3 + inc d +.noCarry3 + ld a, [de] + or [hl] + ld [hli], a + inc de + ld a, [de] + or [hl] + ld [hl], a + +.next + ld a, [$ff8f] ; a = loop counter + inc a + cp $10 + jp nz, .loop + ret + +; takes delta X or delta Y in a +; b = delta X/Y +; c = 0 if delta X/Y is 0 +; c = 7 if delta X/Y is 1 +; c = 9 if delta X/Y is -1 +SetSpriteCollisionValues: + and a + ld b, 0 + ld c, 0 + jr z, .done + ld c, 9 + cp -1 + jr z, .ok + ld c, 7 + ld a, 0 +.ok + ld b, a +.done + ret + +SpriteCollisionBitTable: + db %00000000,%00000001 + db %00000000,%00000010 + db %00000000,%00000100 + db %00000000,%00001000 + db %00000000,%00010000 + db %00000000,%00100000 + db %00000000,%01000000 + db %00000000,%10000000 + db %00000001,%00000000 + db %00000010,%00000000 + db %00000100,%00000000 + db %00001000,%00000000 + db %00010000,%00000000 + db %00100000,%00000000 + db %01000000,%00000000 + db %10000000,%00000000 diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm index df39d112..05588321 100755 --- a/engine/overworld/map_sprites.asm +++ b/engine/overworld/map_sprites.asm @@ -8,7 +8,7 @@ ; fields, respectively, within loops. The X is the loop index. ; If there is an inner loop, Y is the inner loop index, i.e. $C1Y* and $C2Y* ; denote fields of the sprite slots interated over in the inner loop. -InitMapSprites: ; 1785b (5:785b) +InitMapSprites: call InitOutsideMapSprites ret c ; return if the map is an outside map (already handled by above call) ; if the map is an inside map (i.e. mapID >= $25) @@ -29,17 +29,17 @@ InitMapSprites: ; 1785b (5:785b) ; This is used for both inside and outside maps, since it is called by ; InitOutsideMapSprites. ; Loads tile pattern data for sprites into VRAM. -LoadMapSpriteTilePatterns: ; 17871 (5:7871) - ld a,[W_NUMSPRITES] +LoadMapSpriteTilePatterns: + ld a,[wNumSprites] and a ; are there any sprites? jr nz,.spritesExist ret .spritesExist - ld c,a ; c = [W_NUMSPRITES] + ld c,a ; c = [wNumSprites] ld b,$10 ; number of sprite slots ld hl,wSpriteStateData2 + $0d xor a - ld [$ff8e],a ; 4-tile sprite counter + ld [hFourTileSpriteCount],a .copyPictureIDLoop ; loop to copy picture ID from $C2XD to $C2XE ld a,[hli] ; $C2XD (sprite picture ID) ld [hld],a ; $C2XE @@ -98,14 +98,14 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871) cp a,SPRITE_BALL ; is it a 4-tile sprite? jr c,.notFourTileSprite pop af - ld a,[$ff8e] ; 4-tile sprite counter + ld a,[hFourTileSpriteCount] add a,11 jr .storeVRAMSlot .notFourTileSprite pop af .storeVRAMSlot ld [hl],a ; store VRAM slot at $C2XE - ld [$ff8d],a ; used to determine if it's 4-tile sprite later + ld [hVRAMSlot],a ; used to determine if it's 4-tile sprite later ld a,b ; a = current sprite picture ID dec a add a @@ -128,7 +128,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871) push bc ld hl,vNPCSprites ; VRAM base address ld bc,$c0 ; number of bytes per VRAM slot - ld a,[$ff8d] + ld a,[hVRAMSlot] cp a,11 ; is it a 4-tile sprite? jr nc,.fourTileSpriteVRAMAddr ld d,a @@ -142,13 +142,13 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871) jr .loadStillTilePattern .fourTileSpriteVRAMAddr ld hl,vSprites + $7c0 ; address for second 4-tile sprite - ld a,[$ff8e] ; 4-tile sprite counter - and a ; is it the first 4-tile sprite? + ld a,[hFourTileSpriteCount] + and a jr nz,.loadStillTilePattern ; if it's the first 4-tile sprite ld hl,vSprites + $780 ; address for first 4-tile sprite inc a - ld [$ff8e],a ; 4-tile sprite counter + ld [hFourTileSpriteCount],a .loadStillTilePattern pop bc pop de @@ -168,7 +168,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871) .skipFirstLoad pop de pop hl - ld a,[$ff8d] + ld a,[hVRAMSlot] cp a,11 ; is it a 4-tile sprite? jr nc,.skipSecondLoad ; if so, there is no second block push de @@ -236,7 +236,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871) ; de = pointer to sprite sheet ; bc = length in bytes ; a = ROM bank -ReadSpriteSheetData: ; 17971 (5:7971) +ReadSpriteSheetData: ld a,[hli] ld e,a ld a,[hli] @@ -250,8 +250,8 @@ ReadSpriteSheetData: ; 17971 (5:7971) ; Loads sprite set for outside maps (cities and routes) and sets VRAM slots. ; sets carry if the map is a city or route, unsets carry if not -InitOutsideMapSprites: ; 1797b (5:797b) - ld a,[W_CURMAP] +InitOutsideMapSprites: + ld a,[wCurMap] cp a,REDS_HOUSE_1F ; is the map a city or a route (map ID less than $25)? ret nc ; if not, return ld hl,MapSpriteSets @@ -267,12 +267,12 @@ InitOutsideMapSprites: ; 1797b (5:797b) ld a,[wFontLoaded] bit 0,a ; reloading upper half of tile patterns after displaying text? jr nz,.loadSpriteSet ; if so, forcibly reload the sprite set - ld a,[W_SPRITESETID] + ld a,[wSpriteSetID] cp b ; has the sprite set ID changed? jr z,.skipLoadingSpriteSet ; if not, don't load it again .loadSpriteSet ld a,b - ld [W_SPRITESETID],a + ld [wSpriteSetID],a dec a ld b,a sla a @@ -291,7 +291,7 @@ InitOutsideMapSprites: ; 1797b (5:797b) ld hl,wSpriteStateData2 + $0d ld a,SPRITE_RED ld [hl],a - ld bc,W_SPRITESET + ld bc,wSpriteSet ; Load the sprite set into RAM. ; This loop also fills $C2XD (sprite picture ID) where X is from $0 to $A ; with picture ID's. This is done so that LoadMapSpriteTilePatterns will @@ -317,13 +317,13 @@ InitOutsideMapSprites: ; 1797b (5:797b) ld [hl],a ; $C2XD (sprite picture ID) dec b jr nz,.zeroRemainingSlotsLoop - ld a,[W_NUMSPRITES] + ld a,[wNumSprites] push af ; save number of sprites ld a,11 ; 11 sprites in sprite set - ld [W_NUMSPRITES],a + ld [wNumSprites],a call LoadMapSpriteTilePatterns pop af - ld [W_NUMSPRITES],a ; restore number of sprites + ld [wNumSprites],a ; restore number of sprites ld hl,wSpriteStateData2 + $1e ld b,$0f ; The VRAM tile pattern slots that LoadMapSpriteTilePatterns set are in the @@ -352,7 +352,7 @@ InitOutsideMapSprites: ; 1797b (5:797b) and a ; is the sprite slot used? jr z,.skipGettingPictureIndex ; if the sprite slot is not used ld b,a ; b = picture ID - ld de,W_SPRITESET + ld de,wSpriteSet ; Loop to find the index of the sprite's picture ID within the sprite set. .getPictureIndexLoop inc c @@ -380,7 +380,7 @@ InitOutsideMapSprites: ; 1797b (5:797b) ; Chooses the correct sprite set ID depending on the player's position within ; the map for maps with two sprite sets. -GetSplitMapSpriteSetID: ; 17a1a (5:7a1a) +GetSplitMapSpriteSetID: cp a,$f8 jr z,.route20 ld hl,SplitMapSpriteSets @@ -399,10 +399,10 @@ GetSplitMapSpriteSetID: ; 17a1a (5:7a1a) ld b,a jr z,.eastWestDivide .northSouthDivide - ld a,[W_YCOORD] + ld a,[wYCoord] jr .compareCoord .eastWestDivide - ld a,[W_XCOORD] + ld a,[wXCoord] .compareCoord cp b jr c,.loadSpriteSetID @@ -415,7 +415,7 @@ GetSplitMapSpriteSetID: ; 17a1a (5:7a1a) ; Route 20 is a special case because the two map sections have a more complex ; shape instead of the map simply being split horizontally or vertically. .route20 - ld hl,W_XCOORD + ld hl,wXCoord ld a,[hl] cp a,$2b ld a,$01 @@ -430,7 +430,7 @@ GetSplitMapSpriteSetID: ; 17a1a (5:7a1a) jr nc,.next ld b,$0d .next - ld a,[W_YCOORD] + ld a,[wYCoord] cp b ld a,$0a ret c diff --git a/engine/overworld/missable_objects.asm b/engine/overworld/missable_objects.asm new file mode 100644 index 00000000..8587c0f7 --- /dev/null +++ b/engine/overworld/missable_objects.asm @@ -0,0 +1,215 @@ +MarkTownVisitedAndLoadMissableObjects: + ld a, [wCurMap] + cp ROUTE_1 + jr nc, .notInTown + ld c, a + ld b, FLAG_SET + ld hl, wTownVisitedFlag ; mark town as visited (for flying) + predef FlagActionPredef +.notInTown + ld hl, MapHSPointers + ld a, [wCurMap] + ld b, $0 + ld c, a + add hl, bc + add hl, bc + ld a, [hli] ; load missable objects pointer in hl + ld h, [hl] + ; fall through + +LoadMissableObjects: + ld l, a + push hl + ld de, MapHS00 ; calculate difference between out pointer and the base pointer + ld a, l + sub e + jr nc, .asm_f13c + dec h +.asm_f13c + ld l, a + ld a, h + sub d + ld h, a + ld a, h + ld [H_DIVIDEND], a + ld a, l + ld [H_DIVIDEND+1], a + xor a + ld [H_DIVIDEND+2], a + ld [H_DIVIDEND+3], a + ld a, $3 + 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, [wCurMap] + ld b, a + ld a, [H_DIVIDEND+3] + ld c, a ; store global offset in c + ld de, wMissableObjectList + pop hl +.writeMissableObjectsListLoop + ld a, [hli] + cp $ff + jr z, .done ; end of list + cp b + jr nz, .done ; not for current map anymore + ld a, [hli] + inc hl + ld [de], a ; write (map-local) sprite ID + inc de + ld a, c + inc c + ld [de], a ; write (global) missable object index + inc de + jr .writeMissableObjectsListLoop +.done + ld a, $ff + ld [de], a ; write sentinel + ret + +InitializeMissableObjectsFlags: + ld hl, wMissableObjectFlags + ld bc, wMissableObjectFlagsEnd - wMissableObjectFlags + xor a + call FillMemory ; clear missable objects flags + ld hl, MapHS00 + xor a + ld [wMissableObjectCounter], a +.missableObjectsLoop + ld a, [hli] + cp $ff ; end of list + ret z + push hl + inc hl + ld a, [hl] + cp Hide + jr nz, .skip + ld hl, wMissableObjectFlags + ld a, [wMissableObjectCounter] + ld c, a + ld b, FLAG_SET + call MissableObjectFlagAction ; set flag if Item is hidden +.skip + ld hl, wMissableObjectCounter + inc [hl] + pop hl + inc hl + inc hl + jr .missableObjectsLoop + +; tests if current sprite is a missable object that is hidden/has been removed +IsObjectHidden: + ld a, [H_CURRENTSPRITEOFFSET] + swap a + ld b, a + ld hl, wMissableObjectList +.loop + ld a, [hli] + cp $ff + jr z, .notHidden ; not missable -> not hidden + cp b + ld a, [hli] + jr nz, .loop + ld c, a + ld b, FLAG_TEST + ld hl, wMissableObjectFlags + call MissableObjectFlagAction + ld a, c + and a + jr nz, .hidden +.notHidden + xor a +.hidden + ld [$ffe5], a + ret + +; adds missable object (items, leg. pokemon, etc.) to the map +; [wMissableObjectIndex]: index of the missable object to be added (global index) +ShowObject: +ShowObject2: + ld hl, wMissableObjectFlags + ld a, [wMissableObjectIndex] + ld c, a + ld b, FLAG_RESET + call MissableObjectFlagAction ; reset "removed" flag + jp UpdateSprites + +; removes missable object (items, leg. pokemon, etc.) from the map +; [wMissableObjectIndex]: index of the missable object to be removed (global index) +HideObject: + ld hl, wMissableObjectFlags + ld a, [wMissableObjectIndex] + ld c, a + ld b, FLAG_SET + call MissableObjectFlagAction ; set "removed" flag + jp UpdateSprites + +MissableObjectFlagAction: +; identical to FlagAction + + push hl + push de + push bc + + ; bit + ld a, c + ld d, a + and 7 + ld e, a + + ; byte + ld a, d + srl a + srl a + srl a + add l + ld l, a + jr nc, .ok + inc h +.ok + + ; d = 1 << e (bitmask) + inc e + ld d, 1 +.shift + dec e + jr z, .shifted + sla d + jr .shift +.shifted + + ld a, b + and a + jr z, .reset + cp 2 + jr z, .read + +.set + ld a, [hl] + ld b, a + ld a, d + or b + ld [hl], a + jr .done + +.reset + ld a, [hl] + ld b, a + ld a, d + xor $ff + and b + ld [hl], a + jr .done + +.read + ld a, [hl] + ld b, a + ld a, d + and b + +.done + pop bc + pop de + pop hl + ld c, a + ret diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index c4482700..6d05859e 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -1,4 +1,4 @@ -UpdatePlayerSprite: ; 4e31 (1:4e31) +UpdatePlayerSprite: ld a, [wSpriteStateData2] and a jr z, .checkIfTextBoxInFrontOfSprite @@ -12,7 +12,7 @@ UpdatePlayerSprite: ; 4e31 (1:4e31) ; the maximum number for map tiles .checkIfTextBoxInFrontOfSprite aCoord 8, 9 - ld [$ff93], a + ld [hTilePlayerStandingOn], a cp $60 jr c, .lowerLeftTileIsMapTile .disableSprite @@ -21,52 +21,54 @@ UpdatePlayerSprite: ; 4e31 (1:4e31) ret .lowerLeftTileIsMapTile call DetectCollisionBetweenSprites - ld h, $c1 - ld a, [wWalkCounter] ; wcfc5 + ld h, wSpriteStateData1 / $100 + 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 - bit 3, a - jr z, .asm_4e6d - ld a, $4 - jr .asm_4e86 -.asm_4e6d - bit 1, a - jr z, .asm_4e75 - ld a, $8 - jr .asm_4e86 -.asm_4e75 - bit 0, a - jr z, .asm_4e7d - ld a, $c - jr .asm_4e86 -.asm_4e7d + jr nz, .moving + ld a, [wPlayerMovingDirection] +; check if down + bit PLAYER_DIR_BIT_DOWN, a + jr z, .checkIfUp + xor a ; ld a, SPRITE_FACING_DOWN + jr .next +.checkIfUp + bit PLAYER_DIR_BIT_UP, a + jr z, .checkIfLeft + ld a, SPRITE_FACING_UP + jr .next +.checkIfLeft + bit PLAYER_DIR_BIT_LEFT, a + jr z, .checkIfRight + ld a, SPRITE_FACING_LEFT + jr .next +.checkIfRight + bit PLAYER_DIR_BIT_RIGHT, a + jr z, .notMoving + ld a, SPRITE_FACING_RIGHT + jr .next +.notMoving +; zero the animation counters xor a ld [wSpriteStateData1 + 7], a ld [wSpriteStateData1 + 8], a - jr .asm_4eab -.asm_4e86 - ld [wSpriteStateData1 + 9], a + jr .calcImageIndex +.next + ld [wSpriteStateData1 + 9], a ; facing direction ld a, [wFontLoaded] bit 0, a - jr nz, .asm_4e7d -.asm_4e90 + jr nz, .notMoving +.moving ld a, [wd736] - bit 7, a - jr nz, .asm_4eb6 + bit 7, a ; is the player sprite spinning due to a spin tile? + jr nz, .skipSpriteAnim ld a, [H_CURRENTSPRITEOFFSET] add $7 ld l, a ld a, [hl] inc a ld [hl], a - cp $4 - jr nz, .asm_4eab + cp 4 + jr nz, .calcImageIndex xor a ld [hl], a inc hl @@ -74,28 +76,32 @@ UpdatePlayerSprite: ; 4e31 (1:4e31) inc a and $3 ld [hl], a -.asm_4eab +.calcImageIndex ld a, [wSpriteStateData1 + 8] ld b, a ld a, [wSpriteStateData1 + 9] add b ld [wSpriteStateData1 + 2], a -.asm_4eb6 - ld a, [$ff93] +.skipSpriteAnim +; If the player is standing on a grass tile, make the player's sprite have +; lower priority than the background so that it's partially obscured by the +; grass. Only the lower half of the sprite is permitted to have the priority +; bit set by later logic. + ld a, [hTilePlayerStandingOn] ld c, a - ld a, [W_GRASSTILE] + ld a, [wGrassTile] cp c ld a, $0 - jr nz, .asm_4ec3 + jr nz, .next2 ld a, $80 -.asm_4ec3 - ld [wSpriteStateData2 + $07], a +.next2 + ld [wSpriteStateData2 + 7], a ret -Func_4ec7: ; 4ec7 (1:4ec7) +UnusedReadSpriteDataFunction: push bc push af - ld a, [$ffda] + ld a, [H_CURRENTSPRITEOFFSET] ld c, a pop af add c @@ -103,12 +109,12 @@ Func_4ec7: ; 4ec7 (1:4ec7) pop bc ret -Func_4ed1: ; 4ed1 (1:4ed1) +UpdateNPCSprite: ld a, [H_CURRENTSPRITEOFFSET] swap a dec a add a - ld hl, W_MAPSPRITEDATA ; wd4e4 + ld hl, wMapSpriteData add l ld l, a ld a, [hl] ; read movement byte 2 @@ -127,8 +133,8 @@ Func_4ed1: ; 4ed1 (1:4ed1) ld l, a inc l ld a, [hl] ; c1x1 - bit 7, a - jp nz, InitializeSpriteFacingDirection ; c1x1 >= $80 + bit 7, a ; is the face player flag set? + jp nz, MakeNPCFacePlayer ld b, a ld a, [wFontLoaded] bit 0, a @@ -138,7 +144,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 @@ -148,40 +154,43 @@ Func_4ed1: ; 4ed1 (1:4ed1) ld l, a ld a, [hl] ; c2x6: movement byte 1 inc a - jr z, .asm_4f59 ; value $FF + jr z, .randomMovement ; value $FF inc a - jr z, .asm_4f59 ; value $FE + jr z, .randomMovement ; value $FE +; scripted movement dec a - ld [hl], a ; (temporarily) increment movement byte 1 + ld [hl], a ; increment movement byte 1 (movement data index) dec a push hl - ld hl, wcf0f - dec [hl] ; decrement wcf0f + ld hl, wNPCNumScriptedSteps + dec [hl] ; decrement wNPCNumScriptedSteps pop hl - ld de, wcc5b - call LoadDEPlusA ; a = [wcc5b + movement byte 1] + ld de, wNPCMovementDirections + call LoadDEPlusA ; a = [wNPCMovementDirections + movement byte 1] cp $e0 jp z, ChangeFacingDirection - cp $ff - jr nz, .asm_4f4b - ld [hl], a ; reset movement byte 1 to initial value + cp STAY + jr nz, .next +; reached end of wNPCMovementDirections list + ld [hl], a ; store $ff in movement byte 1, disabling scripted movement ld hl, wd730 res 0, [hl] xor a ld [wSimulatedJoypadStatesIndex], a ld [wWastedByteCD3A], a ret -.asm_4f4b - cp $fe - jr nz, .asm_4f5f +.next + cp WALK + jr nz, .determineDirection +; current NPC movement data is $fe. this seems buggy ld [hl], $1 ; set movement byte 1 to $1 - ld de, wcc5b - call LoadDEPlusA ; a = [wcc5b + $fe] (?) - jr .asm_4f5f -.asm_4f59 - call getTileSpriteStandsOn + ld de, wNPCMovementDirections + call LoadDEPlusA ; a = [wNPCMovementDirections + $fe] (?) + jr .determineDirection +.randomMovement + call GetTileSpriteStandsOn call Random -.asm_4f5f +.determineDirection ld b, a ld a, [wCurSpriteMovement2] cp $d0 @@ -199,11 +208,10 @@ Func_4ed1: ; 4ed1 (1:4ed1) cp $2 jr z, .moveLeft ; movement byte 2 = $2 only allows left or right .moveDown - ld de, 2*20 + ld de, 2*SCREEN_WIDTH add hl, de ; move tile pointer two rows down - ld de, $100 - - ld bc, $400 + lb de, 1, 0 + lb bc, 4, SPRITE_FACING_DOWN jr TryWalking .notDown cp $80 ; $40 <= a < $80: up (or right) @@ -212,10 +220,10 @@ 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*SCREEN_WIDTH add hl, de ; move tile pointer two rows up - ld de, $ff00 - ld bc, $804 + lb de, -1, 0 + lb bc, 8, SPRITE_FACING_UP jr TryWalking .notUp cp $c0 ; $80 <= a < $c0: left (or up) @@ -226,8 +234,8 @@ Func_4ed1: ; 4ed1 (1:4ed1) .moveLeft dec hl dec hl ; move tile pointer two columns left - ld de, $ff - ld bc, $208 + lb de, 0, -1 + lb bc, 2, SPRITE_FACING_LEFT jr TryWalking .notLeft ; $c0 <= a: right (or down) ld a, [wCurSpriteMovement2] @@ -236,12 +244,12 @@ Func_4ed1: ; 4ed1 (1:4ed1) .moveRight inc hl inc hl ; move tile pointer two columns right - ld de, $1 - ld bc, $10c + lb de, 0, 1 + lb bc, 1, SPRITE_FACING_RIGHT jr TryWalking ; changes facing direction by zeroing the movement delta and calling TryWalking -ChangeFacingDirection: ; 4fc8 (1:4fc8) +ChangeFacingDirection: ld de, $0 ; fall through @@ -249,9 +257,9 @@ ChangeFacingDirection: ; 4fc8 (1:4fc8) ; c: new facing direction (0,4,8 or $c) ; d: Y movement delta (-1, 0 or 1) ; e: X movement delta (-1, 0 or 1) -; hl: pointer to tile the sprite would wlak onto +; hl: pointer to tile the sprite would walk onto ; set carry on failure, clears carry on success -TryWalking: ; 4fcb (1:4fcb) +TryWalking: push hl ld h, $c1 ld a, [H_CURRENTSPRITEOFFSET] @@ -290,7 +298,7 @@ TryWalking: ; 4fcb (1:4fcb) jp UpdateSpriteImage ; update the walking animation parameters for a sprite that is currently walking -UpdateSpriteInWalkingAnimation: ; 4ffe (1:4ffe) +UpdateSpriteInWalkingAnimation: ld a, [H_CURRENTSPRITEOFFSET] add $7 ld l, a @@ -363,7 +371,7 @@ UpdateSpriteInWalkingAnimation: ; 4ffe (1:4ffe) ret ; update delay value (c2x8) for sprites in the delayed state (c1x1) -UpdateSpriteMovementDelay: ; 5057 (1:5057) +UpdateSpriteMovementDelay: ld h, $c2 ld a, [H_CURRENTSPRITEOFFSET] add $6 @@ -384,36 +392,40 @@ UpdateSpriteMovementDelay: ; 5057 (1:5057) inc a ld l, a ld [hl], $1 ; c1x1 = 1 (mark as ready to move) -notYetMoving: ; 5073 (1:5073) - ld h, $c1 +notYetMoving: + ld h, wSpriteStateData1 / $100 ld a, [H_CURRENTSPRITEOFFSET] add $8 ld l, a ld [hl], $0 ; c1x8 = 0 (walk animation frame) jp UpdateSpriteImage -InitializeSpriteFacingDirection: ; 507f (1:507f) +MakeNPCFacePlayer: +; Make an NPC face the player if the player has spoken to him or her. + +; Check if the behaviour of the NPC facing the player when spoken to is +; disabled. This is only done when rubbing the S.S. Anne captain's back. ld a, [wd72d] bit 5, a jr nz, notYetMoving res 7, [hl] - ld a, [wd52a] - bit 3, a + ld a, [wPlayerDirection] + bit PLAYER_DIR_BIT_UP, a jr z, .notFacingDown - ld c, $0 ; make sprite face down + ld c, SPRITE_FACING_DOWN jr .facingDirectionDetermined .notFacingDown - bit 2, a + bit PLAYER_DIR_BIT_DOWN, a jr z, .notFacingUp - ld c, $4 ; make sprite face up + ld c, SPRITE_FACING_UP jr .facingDirectionDetermined .notFacingUp - bit 1, a + bit PLAYER_DIR_BIT_LEFT, a jr z, .notFacingRight - ld c, $c ; make sprite face right + ld c, SPRITE_FACING_RIGHT jr .facingDirectionDetermined .notFacingRight - ld c, $8 ; make sprite face left + ld c, SPRITE_FACING_LEFT .facingDirectionDetermined ld a, [H_CURRENTSPRITEOFFSET] add $9 @@ -421,7 +433,7 @@ InitializeSpriteFacingDirection: ; 507f (1:507f) ld [hl], c ; c1x9: set facing direction jr notYetMoving -InitializeSpriteStatus: ; 50ad (1:50ad) +InitializeSpriteStatus: ld [hl], $1 ; $c1x1: set movement status to ready inc l ld [hl], $ff ; $c1x2: set sprite image to $ff (invisible/off screen) @@ -435,12 +447,12 @@ InitializeSpriteStatus: ; 50ad (1:50ad) ret ; calculates the spprite's scrren position form its map position and the player position -InitializeSpriteScreenPosition: ; 50bd (1:50bd) - ld h, $c2 +InitializeSpriteScreenPosition: + ld h, wSpriteStateData2 / $100 ld a, [H_CURRENTSPRITEOFFSET] add $4 ld l, a - ld a, [W_YCOORD] ; wd361 + ld a, [wYCoord] ld b, a ld a, [hl] ; c2x4 (Y position + 4) sub b ; relative to player position @@ -449,7 +461,7 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd) dec h ld [hli], a ; c1x4 (screen Y position) inc h - ld a, [W_XCOORD] ; wd362 + ld a, [wXCoord] ld b, a ld a, [hli] ; c2x6 (X position + 4) sub b ; relative to player position @@ -459,23 +471,23 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd) ret ; tests if sprite is off screen or otherwise unable to do anything -CheckSpriteAvailability: ; 50dc (1:50dc) +CheckSpriteAvailability: predef IsObjectHidden ld a, [$ffe5] and a jp nz, .spriteInvisible - ld h, $c2 + ld h, wSpriteStateData2 / $100 ld a, [H_CURRENTSPRITEOFFSET] add $6 ld l, a ld a, [hl] ; c2x6: movement byte 1 cp $fe - jr c, .skipXVisibilityTest ; movement byte 1 < $fe + jr c, .skipXVisibilityTest ; movement byte 1 < $fe (i.e. the sprite's movement is scripted) ld a, [H_CURRENTSPRITEOFFSET] add $4 ld l, a ld b, [hl] ; c2x4: Y pos (+4) - ld a, [W_YCOORD] ; wd361 + ld a, [wYCoord] cp b jr z, .skipYVisibilityTest jr nc, .spriteInvisible ; above screen region @@ -485,7 +497,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc) .skipYVisibilityTest inc l ld b, [hl] ; c2x5: X pos (+4) - ld a, [W_XCOORD] ; wd362 + ld a, [wXCoord] cp b jr z, .skipXVisibilityTest jr nc, .spriteInvisible ; left of screen region @@ -495,7 +507,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc) .skipXVisibilityTest ; make the sprite invisible if a text box is in front of it ; $5F is the maximum number for map tiles - call getTileSpriteStandsOn + call GetTileSpriteStandsOn ld d, $60 ld a, [hli] cp d @@ -503,7 +515,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 @@ -512,7 +524,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc) cp d jr c, .spriteVisible ; standing on tile with ID >=$60 (top right tile) .spriteInvisible - ld h, $c1 + ld h, wSpriteStateData1 / $100 ld a, [H_CURRENTSPRITEOFFSET] add $2 ld l, a @@ -521,7 +533,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 @@ -529,7 +541,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc) ld a, [H_CURRENTSPRITEOFFSET] add $7 ld l, a - ld a, [W_GRASSTILE] + ld a, [wGrassTile] cp c ld a, $0 jr nz, .notInGrass @@ -540,7 +552,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc) .done ret -UpdateSpriteImage: ; 5157 (1:5157) +UpdateSpriteImage: ld h, $c1 ld a, [H_CURRENTSPRITEOFFSET] add $8 @@ -565,20 +577,21 @@ UpdateSpriteImage: ; 5157 (1:5157) ; d: Y movement delta (-1, 0 or 1) ; e: X movement delta (-1, 0 or 1) ; set carry on failure, clears carry on success -CanWalkOntoTile: ; 516e (1:516e) - ld h, $c2 +CanWalkOntoTile: + ld h, wSpriteStateData2 / $100 ld a, [H_CURRENTSPRITEOFFSET] add $6 ld l, a ld a, [hl] ; c2x6 (movement byte 1) cp $fe - jr nc, .canMove ; values $fe and $ff + jr nc, .notScripted ; values $fe and $ff +; always allow walking if the movement is scripted and a ret -.canMove - ld a, [W_TILESETCOLLISIONPTR] +.notScripted + ld a, [wTilesetCollisionPtr] ld l, a - ld a, [W_TILESETCOLLISIONPTR+1] + ld a, [wTilesetCollisionPtr+1] ld h, a .tilePassableLoop ld a, [hli] @@ -593,7 +606,7 @@ CanWalkOntoTile: ; 516e (1:516e) ld a, [hl] ; $c2x6 (movement byte 1) inc a jr z, .impassable ; if $ff, no movement allowed (however, changing direction is) - ld h, $c1 + ld h, wSpriteStateData1 / $100 ld a, [H_CURRENTSPRITEOFFSET] add $4 ld l, a @@ -612,14 +625,14 @@ CanWalkOntoTile: ; 516e (1:516e) call DetectCollisionBetweenSprites pop bc pop de - ld h, $c1 + ld h, wSpriteStateData1 / $100 ld a, [H_CURRENTSPRITEOFFSET] add $c ld l, a ld a, [hl] ; c1xc (directions in which sprite collision would occur) and b ; check against chosen direction (1,2,4 or 8) jr nz, .impassable ; collision between sprites, don't go there - ld h, $c2 + ld h, wSpriteStateData2 / $100 ld a, [H_CURRENTSPRITEOFFSET] add $2 ld l, a @@ -675,8 +688,8 @@ CanWalkOntoTile: ; 516e (1:516e) ; calculates the tile pointer pointing to the tile the current sprite stancs on ; this is always the lower left tile of the 2x2 tile blocks all sprites are snapped to ; hl: output pointer -getTileSpriteStandsOn: ; 5207 (1:5207) - ld h, $c1 +GetTileSpriteStandsOn: + ld h, wSpriteStateData1 / $100 ld a, [H_CURRENTSPRITEOFFSET] add $4 ld l, a @@ -690,11 +703,11 @@ getTileSpriteStandsOn: ; 5207 (1:5207) ld a, [hl] ; c1x6: screen Y position srl a srl a - srl a ; screen X tile - add $14 ; screen X tile + 20 + srl a ; screen X tile + add SCREEN_WIDTH ; screen X tile + 20 ld d, $0 ld e, a - ld hl, wTileMap + coord hl, 0, 0 add hl, bc add hl, bc add hl, bc @@ -704,7 +717,7 @@ getTileSpriteStandsOn: ; 5207 (1:5207) ret ; loads [de+a] into a -LoadDEPlusA: ; 522f (1:522f) +LoadDEPlusA: add e ld e, a jr nc, .noCarry @@ -713,53 +726,58 @@ LoadDEPlusA: ; 522f (1:522f) ld a, [de] ret -Func_5236: ; 5236 (1:5236) +DoScriptedNPCMovement: +; This is an alternative method of scripting an NPC's movement and is only used +; a few times in the game. It is used when the NPC and player must walk together +; in sync, such as when the player is following the NPC somewhere. An NPC can't +; be moved in sync with the player using the other method. ld a, [wd730] bit 7, a ret z ld hl, wd72e bit 7, [hl] set 7, [hl] - jp z, Func_52a6 + jp z, InitScriptedNPCMovement ld hl, wNPCMovementDirections2 ld a, [wNPCMovementDirections2Index] add l ld l, a - jr nc, .asm_5251 + jr nc, .noCarry inc h -.asm_5251 +.noCarry ld a, [hl] - cp $40 - jr nz, .asm_525f - call Func_52b2 - ld c, $4 - ld a, $fe - jr .asm_5289 -.asm_525f - cp $0 - jr nz, .asm_526c - call Func_52b2 - ld c, $0 - ld a, $2 - jr .asm_5289 -.asm_526c - cp $80 - jr nz, .asm_5279 - call Func_52b7 - ld c, $8 - ld a, $fe - jr .asm_5289 -.asm_5279 - cp $c0 - jr nz, .asm_5286 - call Func_52b7 - ld c, $c - ld a, $2 - jr .asm_5289 -.asm_5286 +; check if moving up + cp NPC_MOVEMENT_UP + jr nz, .checkIfMovingDown + call GetSpriteScreenYPointer + ld c, SPRITE_FACING_UP + ld a, -2 + jr .move +.checkIfMovingDown + cp NPC_MOVEMENT_DOWN + jr nz, .checkIfMovingLeft + call GetSpriteScreenYPointer + ld c, SPRITE_FACING_DOWN + ld a, 2 + jr .move +.checkIfMovingLeft + cp NPC_MOVEMENT_LEFT + jr nz, .checkIfMovingRight + call GetSpriteScreenXPointer + ld c, SPRITE_FACING_LEFT + ld a, -2 + jr .move +.checkIfMovingRight + cp NPC_MOVEMENT_RIGHT + jr nz, .noMatch + call GetSpriteScreenXPointer + ld c, SPRITE_FACING_RIGHT + ld a, 2 + jr .move +.noMatch cp $ff ret -.asm_5289 +.move ld b, a ld a, [hl] add b @@ -768,33 +786,34 @@ Func_5236: ; 5236 (1:5236) add $9 ld l, a ld a, c - ld [hl], a - call Func_52c3 - ld hl, wcf18 + ld [hl], a ; facing direction + call AnimScriptedNPCMovement + ld hl, wScriptedNPCWalkCounter dec [hl] ret nz - ld a, $8 - ld [wcf18], a + ld a, 8 + ld [wScriptedNPCWalkCounter], a ld hl, wNPCMovementDirections2Index inc [hl] ret -Func_52a6: ; 52a6 (1:52a6) +InitScriptedNPCMovement: xor a ld [wNPCMovementDirections2Index], a - ld a, $8 - ld [wcf18], a - jp Func_52c3 + ld a, 8 + ld [wScriptedNPCWalkCounter], a + jp AnimScriptedNPCMovement -Func_52b2: ; 52b2 (1:52b2) +GetSpriteScreenYPointer: ld a, $4 ld b, a - jr asm_52ba + jr GetSpriteScreenXYPointerCommon -Func_52b7: ; 52b7 (1:52b7) +GetSpriteScreenXPointer: ld a, $6 ld b, a -asm_52ba: ; 52ba (1:52ba) + +GetSpriteScreenXYPointerCommon: ld hl, wSpriteStateData1 ld a, [H_CURRENTSPRITEOFFSET] add l @@ -802,12 +821,12 @@ asm_52ba: ; 52ba (1:52ba) ld l, a ret -Func_52c3: ; 52c3 (1:52c3) +AnimScriptedNPCMovement: ld hl, wSpriteStateData2 ld a, [H_CURRENTSPRITEOFFSET] add $e ld l, a - ld a, [hl] + ld a, [hl] ; VRAM slot dec a swap a ld b, a @@ -815,47 +834,47 @@ Func_52c3: ; 52c3 (1:52c3) ld a, [H_CURRENTSPRITEOFFSET] add $9 ld l, a - ld a, [hl] - cp $0 - jr z, .asm_52ea - cp $4 - jr z, .asm_52ea - cp $8 - jr z, .asm_52ea - cp $c - jr z, .asm_52ea + ld a, [hl] ; facing direction + cp SPRITE_FACING_DOWN + jr z, .anim + cp SPRITE_FACING_UP + jr z, .anim + cp SPRITE_FACING_LEFT + jr z, .anim + cp SPRITE_FACING_RIGHT + jr z, .anim ret -.asm_52ea +.anim add b ld b, a - ld [$ffe9], a - call Func_5301 + ld [hSpriteVRAMSlotAndFacing], a + call AdvanceScriptedNPCAnimFrameCounter ld hl, wSpriteStateData1 ld a, [H_CURRENTSPRITEOFFSET] add $2 ld l, a - ld a, [$ffe9] + ld a, [hSpriteVRAMSlotAndFacing] ld b, a - ld a, [$ffea] + ld a, [hSpriteAnimFrameCounter] add b ld [hl], a ret -Func_5301: ; 5301 (1:5301) +AdvanceScriptedNPCAnimFrameCounter: ld a, [H_CURRENTSPRITEOFFSET] add $7 ld l, a - ld a, [hl] + ld a, [hl] ; intra-animation frame counter inc a ld [hl], a - cp $4 + cp 4 ret nz xor a - ld [hl], a + ld [hl], a ; reset intra-animation frame counter inc l - ld a, [hl] + ld a, [hl] ; animation frame counter inc a and $3 ld [hl], a - ld [$ffea], a + ld [hSpriteAnimFrameCounter], a ret diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 84e39853..98d1b7a7 100755 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -1,4 +1,4 @@ -PlayerStepOutFromDoor: ; 1a3e0 (6:63e0) +PlayerStepOutFromDoor: ld hl, wd730 res 1, [hl] call IsPlayerStandingOnDoorTile @@ -27,7 +27,7 @@ PlayerStepOutFromDoor: ; 1a3e0 (6:63e0) res 7, [hl] ret -_EndNPCMovementScript: ; 1a41d (6:641d) +_EndNPCMovementScript: ld hl, wd730 res 7, [hl] ld hl, wd72e @@ -44,60 +44,66 @@ _EndNPCMovementScript: ; 1a41d (6:641d) ld [wSimulatedJoypadStatesEnd], a ret -ProfOakMovementScriptPointerTable: ; 1a442 (6:6442) - dw Func_1a44c - dw Func_1a485 - dw Func_1a4a1 - dw Func_1a4a6 - dw Func_1a4f4 +PalletMovementScriptPointerTable: + dw PalletMovementScript_OakMoveLeft + dw PalletMovementScript_PlayerMoveLeft + dw PalletMovementScript_WaitAndWalkToLab + dw PalletMovementScript_WalkToLab + dw PalletMovementScript_Done -Func_1a44c: ; 1a44c (6:644c) - ld a, [W_XCOORD] ; wd362 +PalletMovementScript_OakMoveLeft: + ld a, [wXCoord] sub $a - ld [wcca1], a - jr z, .asm_1a475 - ld b, $0 + ld [wNumStepsToTake], a + jr z, .playerOnLeftTile +; The player is on the right tile of the northern path out of Pallet Town and +; Prof. Oak is below. +; Make Prof. Oak step to the left. + ld b, 0 ld c, a ld hl, wNPCMovementDirections2 - ld a, $80 + ld a, NPC_MOVEMENT_LEFT call FillMemory ld [hl], $ff ld a, [wSpriteIndex] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a ld de, wNPCMovementDirections2 call MoveSprite ld a, $1 ld [wNPCMovementScriptFunctionNum], a - jr .asm_1a47a -.asm_1a475 + jr .done +; The player is on the left tile of the northern path out of Pallet Town and +; Prof. Oak is below. +; Prof. Oak is already where he needs to be. +.playerOnLeftTile ld a, $3 ld [wNPCMovementScriptFunctionNum], a -.asm_1a47a - ld hl, W_FLAGS_D733 +.done + ld hl, wFlags_D733 set 1, [hl] ld a, $fc ld [wJoyIgnore], a ret -Func_1a485: ; 1a485 (6:6485) +PalletMovementScript_PlayerMoveLeft: ld a, [wd730] - bit 0, a - ret nz - ld a, [wcca1] + bit 0, a ; is an NPC being moved by a script? + ret nz ; return if Oak is still moving + ld a, [wNumStepsToTake] ld [wSimulatedJoypadStatesIndex], a - ld [$ff95], a + ld [hNPCMovementDirections2Index], a predef ConvertNPCMovementDirectionsToJoypadMasks call StartSimulatingJoypadStates ld a, $2 ld [wNPCMovementScriptFunctionNum], a ret -Func_1a4a1: ; 1a4a1 (6:64a1) +PalletMovementScript_WaitAndWalkToLab: ld a, [wSimulatedJoypadStatesIndex] - and a + and a ; is the player done moving left yet? ret nz -Func_1a4a6: ; 1a4a6 (6:64a6) +PalletMovementScript_WalkToLab: xor a ld [wOverrideSimulatedJoypadStatesMask], a ld a, [wSpriteIndex] @@ -121,16 +127,16 @@ Func_1a4a6: ; 1a4a6 (6:64a6) ld [wNPCMovementScriptFunctionNum], a ret -RLEList_ProfOakWalkToLab: ; 1a4dc (6:64dc) - db $00, $05 - db $80, $01 - db $00, $05 - db $C0, $03 - db $40, $01 - db $E0, $01 +RLEList_ProfOakWalkToLab: + db NPC_MOVEMENT_DOWN, $05 + db NPC_MOVEMENT_LEFT, $01 + db NPC_MOVEMENT_DOWN, $05 + db NPC_MOVEMENT_RIGHT, $03 + db NPC_MOVEMENT_UP, $01 + db $E0, $01 ; stand still db $FF -RLEList_PlayerWalkToLab: ; 1a4e9 (6:64e9) +RLEList_PlayerWalkToLab: db D_UP, $02 db D_RIGHT, $03 db D_DOWN, $05 @@ -138,12 +144,12 @@ RLEList_PlayerWalkToLab: ; 1a4e9 (6:64e9) db D_DOWN, $06 db $FF -Func_1a4f4: ; 1a4f4 (6:64f4) +PalletMovementScript_Done: ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $0 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld hl, wd730 res 7, [hl] @@ -151,16 +157,16 @@ Func_1a4f4: ; 1a4f4 (6:64f4) res 7, [hl] jp EndNPCMovementScript -PewterMuseumGuyMovementScriptPointerTable: ; 1a510 (6:6510) - dw Func_1a514 - dw PewterMovementScriptDone +PewterMuseumGuyMovementScriptPointerTable: + dw PewterMovementScript_WalkToMuseum + dw PewterMovementScript_Done -Func_1a514: ; 1a514 (6:6514) +PewterMovementScript_WalkToMuseum: ld a, BANK(Music_MuseumGuy) - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, MUSIC_MUSEUM_GUY - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld a, [wSpriteIndex] swap a @@ -172,7 +178,7 @@ Func_1a514: ; 1a514 (6:6514) dec a ld [wSimulatedJoypadStatesIndex], a xor a - ld [wd12f], a + ld [wWhichPewterGuy], a predef PewterGuys ld hl, wNPCMovementDirections2 ld de, RLEList_PewterMuseumGuy @@ -183,21 +189,21 @@ Func_1a514: ; 1a514 (6:6514) ld [wNPCMovementScriptFunctionNum], a ret -RLEList_PewterMuseumPlayer: ; 1a559 (6:6559) +RLEList_PewterMuseumPlayer: db 0, $01 db D_UP, $03 db D_LEFT, $0D db D_UP, $06 db $FF -RLEList_PewterMuseumGuy: ; 1a562 (6:6562) - db $40, $06 - db $80, $0D - db $40, $03 - db $80, $01 +RLEList_PewterMuseumGuy: + db NPC_MOVEMENT_UP, $06 + db NPC_MOVEMENT_LEFT, $0D + db NPC_MOVEMENT_UP, $03 + db NPC_MOVEMENT_LEFT, $01 db $FF -PewterMovementScriptDone: ; 1a56b (6:656b) +PewterMovementScript_Done: ld a, [wSimulatedJoypadStatesIndex] and a ret nz @@ -207,16 +213,16 @@ PewterMovementScriptDone: ; 1a56b (6:656b) res 7, [hl] jp EndNPCMovementScript -PewterGymGuyMovementScriptPointerTable: ; 1a57d (6:657d) - dw Func_1a581 - dw PewterMovementScriptDone +PewterGymGuyMovementScriptPointerTable: + dw PewterMovementScript_WalkToGym + dw PewterMovementScript_Done -Func_1a581: ; 1a581 (6:6581) +PewterMovementScript_WalkToGym: ld a, BANK(Music_MuseumGuy) - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, MUSIC_MUSEUM_GUY - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld a, [wSpriteIndex] swap a @@ -228,8 +234,8 @@ Func_1a581: ; 1a581 (6:6581) call DecodeRLEList dec a ld [wSimulatedJoypadStatesIndex], a - ld a, $1 - ld [wd12f], a + ld a, 1 + ld [wWhichPewterGuy], a predef PewterGuys ld hl, wNPCMovementDirections2 ld de, RLEList_PewterGymGuy @@ -242,7 +248,7 @@ Func_1a581: ; 1a581 (6:6581) ld [wNPCMovementScriptFunctionNum], a ret -RLEList_PewterGymPlayer: ; 1a5cd (6:65cd) +RLEList_PewterGymPlayer: db 0, $01 db D_RIGHT, $02 db D_DOWN, $05 @@ -251,17 +257,17 @@ RLEList_PewterGymPlayer: ; 1a5cd (6:65cd) db D_LEFT, $0F db $FF -RLEList_PewterGymGuy: ; 1a5da (6:65da) - db $00, $02 - db $80, $0F - db $40, $05 - db $80, $0B - db $00, $05 - db $C0, $03 +RLEList_PewterGymGuy: + db NPC_MOVEMENT_DOWN, $02 + db NPC_MOVEMENT_LEFT, $0F + db NPC_MOVEMENT_UP, $05 + db NPC_MOVEMENT_LEFT, $0B + db NPC_MOVEMENT_DOWN, $05 + db NPC_MOVEMENT_RIGHT, $03 db $FF -FreezeEnemyTrainerSprite: ; 1a5e7 (6:65e7) - ld a, [W_CURMAP] +FreezeEnemyTrainerSprite: + ld a, [wCurMap] cp POKEMONTOWER_7 ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them ld hl, RivalIDs @@ -279,8 +285,8 @@ FreezeEnemyTrainerSprite: ; 1a5e7 (6:65e7) ld [H_SPRITEINDEX], a jp SetSpriteMovementBytesToFF -RivalIDs: ; 1a605 (6:6605) - db SONY1 + $c8 - db SONY2 + $c8 - db SONY3 + $c8 +RivalIDs: + db OPP_SONY1 + db OPP_SONY2 + db OPP_SONY3 db $ff diff --git a/engine/overworld/oaks_aide.asm b/engine/overworld/oaks_aide.asm index 68135287..f5068fda 100755 --- a/engine/overworld/oaks_aide.asm +++ b/engine/overworld/oaks_aide.asm @@ -1,71 +1,71 @@ -OaksAideScript ; 0x59035 +OaksAideScript: ld hl, OaksAideHiText call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_59086 ; 0x59042 $42 + jr nz, .choseNo ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits - ld a, [wd11e] - ld [$ffdd], a + ld a, [wNumSetBits] + ld [hOaksAideNumMonsOwned], a ld b, a - ld a, [$ffdb] + ld a, [hOaksAideRequirement] cp b - jr z, .asm_59059 ; 0x59055 $2 - jr nc, .asm_5907c ; 0x59057 $23 -.asm_59059 + jr z, .giveItem + jr nc, .notEnoughOwnedMons +.giveItem ld hl, OaksAideHereYouGoText call PrintText - ld a, [$ffdc] + ld a, [hOaksAideRewardItem] ld b, a ld c, 1 call GiveItem - jr nc, .BagFull + jr nc, .bagFull ld hl, OaksAideGotItemText call PrintText ld a, $1 - jr .asm_5908e ; 0x59071 $1b -.BagFull + jr .done +.bagFull ld hl, OaksAideNoRoomText call PrintText xor a - jr .asm_5908e ; 0x5907a $12 -.asm_5907c + jr .done +.notEnoughOwnedMons ld hl, OaksAideUhOhText call PrintText ld a, $80 - jr .asm_5908e ; 0x59084 $8 -.asm_59086 + jr .done +.choseNo ld hl, OaksAideComeBackText call PrintText ld a, $ff -.asm_5908e - ld [$ffdb], a +.done + ld [hOaksAideResult], a ret -OaksAideHiText: ; 59091 (16:5091) +OaksAideHiText: TX_FAR _OaksAideHiText db "@" -OaksAideUhOhText: ; 59096 (16:5096) +OaksAideUhOhText: TX_FAR _OaksAideUhOhText db "@" -OaksAideComeBackText: ; 5909b (16:509b) +OaksAideComeBackText: TX_FAR _OaksAideComeBackText db "@" -OaksAideHereYouGoText: ; 590a0 (16:50a0) +OaksAideHereYouGoText: TX_FAR _OaksAideHereYouGoText db "@" -OaksAideGotItemText: ; 590a5 (16:50a5) +OaksAideGotItemText: TX_FAR _OaksAideGotItemText - db $0b + TX_SFX_ITEM_1 db "@" -OaksAideNoRoomText: ; 590ab (16:50ab) +OaksAideNoRoomText: TX_FAR _OaksAideNoRoomText db "@" diff --git a/engine/overworld/oam.asm b/engine/overworld/oam.asm index b4247257..2c2a3dff 100644 --- a/engine/overworld/oam.asm +++ b/engine/overworld/oam.asm @@ -4,25 +4,26 @@ PrepareOAMData: ld a, [wUpdateSpritesEnabled] dec a - jr z, .asm_4b1e + jr z, .updateEnabled - cp 0 - 1 + cp -1 ret nz ld [wUpdateSpritesEnabled], a jp HideSprites -.asm_4b1e +.updateEnabled xor a - ld [$ff90], a -.asm_4b21 - ld [$ff8f], a + ld [hOAMBufferOffset], a + +.spriteLoop + ld [hSpriteOffset2], a ld d, wSpriteStateData1 / $100 - ld a, [$ff8f] + ld a, [hSpriteOffset2] ld e, a ld a, [de] ; c1x0 and a - jp z, .asm_4bad + jp z, .nextSprite inc e inc e @@ -31,21 +32,25 @@ PrepareOAMData: cp $ff ; off-screen (don't draw) jr nz, .visible - call Func_4bd1 - jr .asm_4bad + call GetSpriteScreenXY + jr .nextSprite .visible - cp $a0 + cp $a0 ; is the sprite unchanging like an item ball or boulder? jr c, .usefacing + +; unchanging and $f - add $10 - jr .asm_4b48 + add $10 ; skip to the second half of the table which doesn't account for facing direction + jr .next .usefacing and $f -.asm_4b48 + +.next ld l, a +; get sprite priority push de inc d ld a, e @@ -53,15 +58,15 @@ PrepareOAMData: ld e, a ld a, [de] ; c2x7 and $80 - ld [$ff94], a ; temp store sprite priority + ld [hSpritePriority], a ; temp store sprite priority pop de +; read the entry from the table ld h, 0 ld bc, SpriteFacingAndAnimationTable add hl, hl add hl, hl add hl, bc - ld a, [hli] ld c, a ld a, [hli] @@ -70,24 +75,25 @@ PrepareOAMData: ld h, [hl] ld l, a - call Func_4bd1 + call GetSpriteScreenXY - ld a, [$ff90] + ld a, [hOAMBufferOffset] ld e, a ld d, wOAMBuffer / $100 -.tile - ld a, [$ff92] ; temp for sprite Y position + +.tileLoop + ld a, [hSpriteScreenY] ; temp for sprite Y position add $10 ; Y=16 is top of screen (Y=0 is invisible) add [hl] ; add Y offset from table ld [de], a ; write new sprite OAM Y position inc hl - ld a, [$ff91] ; temp for sprite X position + ld a, [hSpriteScreenX] ; temp for sprite X position add $8 ; X=8 is left of screen (X=0 is invisible) add [hl] ; add X offset from table inc e ld [de], a ; write new sprite OAM X position inc e - ld a, [bc] ; read pattern number offset (accomodates orientation (offset 0,4 or 8) and animation (offset 0 or $80)) + ld a, [bc] ; read pattern number offset (accommodates orientation (offset 0,4 or 8) and animation (offset 0 or $80)) inc bc push bc ld b, a @@ -99,55 +105,60 @@ PrepareOAMData: ; Sprites $a and $b have one face (and therefore 4 tiles instead of 12). ; As a result, sprite $b's tile offset is less than normal. cp $b - jr nz, .offset + jr nz, .notFourTileSprite ld a, $a * 12 + 4 - jr .gotoffset + jr .next2 -.offset +.notFourTileSprite ; a *= 12 sla a sla a ld c, a sla a add c -.gotoffset - add b ; which frame + +.next2 + add b ; add the tile offset from the table (based on frame and facing direction) pop bc ld [de], a ; tile id inc hl inc e ld a, [hl] - bit 1, a ; sprite priority - jr z, .fg - ld a, [$ff94] ; facing priority + bit 1, a ; is the tile allowed to set the sprite priority bit? + jr z, .skipPriority + ld a, [hSpritePriority] or [hl] -.fg +.skipPriority inc hl ld [de], a inc e bit 0, a ; OAMFLAG_ENDOFDATA - jr z, .tile + jr z, .tileLoop ld a, e - ld [$ff90], a + ld [hOAMBufferOffset], a -.asm_4bad - ld a, [$ff8f] +.nextSprite + ld a, [hSpriteOffset2] add $10 cp $100 % $100 - jp nz, .asm_4b21 + jp nz, .spriteLoop ; Clear unused OAM. - ld a, [$ff90] + ld a, [hOAMBufferOffset] ld l, a ld h, wOAMBuffer / $100 ld de, $4 ld b, $a0 ld a, [wd736] - bit 6, a + bit 6, a ; jumping down ledge or fishing animation? ld a, $a0 jr z, .clear + +; Don't clear the last 4 entries because they are used for the shadow in the +; jumping down ledge animation and the rod in the fishing animation. ld a, $90 + .clear cp l ret z @@ -155,24 +166,24 @@ PrepareOAMData: add hl, de jr .clear -Func_4bd1: ; 4bd1 (1:4bd1) +GetSpriteScreenXY: inc e inc e ld a, [de] ; c1x4 - ld [$ff92], a + ld [hSpriteScreenY], a inc e inc e ld a, [de] ; c1x6 - ld [$ff91], a - ld a, $4 + ld [hSpriteScreenX], a + ld a, 4 add e ld e, a - ld a, [$ff92] - add $4 + ld a, [hSpriteScreenY] + add 4 and $f0 ld [de], a ; c1xa (y) inc e - ld a, [$ff91] + ld a, [hSpriteScreenX] and $f0 ld [de], a ; c1xb (x) ret diff --git a/engine/overworld/pewter_guys.asm b/engine/overworld/pewter_guys.asm index eb6dd5ac..532fa4bf 100755 --- a/engine/overworld/pewter_guys.asm +++ b/engine/overworld/pewter_guys.asm @@ -1,4 +1,4 @@ -PewterGuys: ; 37ca1 (d:7ca1) +PewterGuys: ld hl, wSimulatedJoypadStatesEnd ld a, [wSimulatedJoypadStatesIndex] dec a ; this decrement causes it to overwrite the last byte before $FF in the list @@ -9,7 +9,7 @@ PewterGuys: ; 37ca1 (d:7ca1) ld d, h ld e, l ld hl, PointerTable_37ce6 - ld a, [wd12f] + ld a, [wWhichPewterGuy] add a ld b, 0 ld c, a @@ -17,21 +17,21 @@ PewterGuys: ; 37ca1 (d:7ca1) ld a, [hli] ld h, [hl] ld l, a - ld a, [W_YCOORD] + ld a, [wYCoord] ld b, a - ld a, [W_XCOORD] + ld a, [wXCoord] ld c, a -.asm_37cc7 +.findMatchingCoordsLoop ld a, [hli] cp b - jr nz, .asm_37ce1 + jr nz, .nextEntry1 ld a, [hli] cp c - jr nz, .asm_37ce2 + jr nz, .nextEntry2 ld a, [hli] ld h, [hl] ld l, a -.asm_37cd2 +.copyMovementDataLoop ld a, [hli] cp $ff ret z @@ -40,22 +40,22 @@ PewterGuys: ; 37ca1 (d:7ca1) ld a, [wSimulatedJoypadStatesIndex] inc a ld [wSimulatedJoypadStatesIndex], a - jr .asm_37cd2 -.asm_37ce1 + jr .copyMovementDataLoop +.nextEntry1 inc hl -.asm_37ce2 +.nextEntry2 inc hl inc hl - jr .asm_37cc7 + jr .findMatchingCoordsLoop -PointerTable_37ce6: ; 37ce6 (d:7ce6) +PointerTable_37ce6: dw PewterMuseumGuyCoords dw PewterGymGuyCoords ; these are the four coordinates of the spaces below, above, to the left and ; to the right of the museum guy, and pointers to different movements for ; the player to make to get positioned before the main movement. -PewterMuseumGuyCoords: ; 37cea (d:7cea) +PewterMuseumGuyCoords: db 18, 27 dw .down db 16, 27 @@ -66,18 +66,19 @@ PewterMuseumGuyCoords: ; 37cea (d:7cea) dw .right .down - db $40, $40, $ff + db D_UP, D_UP, $ff .up - db $10, $20, $ff + db D_RIGHT, D_LEFT, $ff .left - db $40, $10, $ff + db D_UP, D_RIGHT, $ff .right - db $40, $20, $ff + db D_UP, D_LEFT, $ff ; these are the five coordinates which trigger the gym guy and pointers to ; different movements for the player to make to get positioned before the ; main movement -PewterGymGuyCoords: ; 37d06 (d:7d06) +; $00 is a pause +PewterGymGuyCoords: db 16, 34 dw .one db 17, 35 @@ -90,12 +91,12 @@ PewterGymGuyCoords: ; 37d06 (d:7d06) dw .five .one - db $20, $80, $80, $10, $ff + db D_LEFT, D_DOWN, D_DOWN, D_RIGHT, $ff .two - db $20, $80, $10, $20, $ff + db D_LEFT, D_DOWN, D_RIGHT, D_LEFT, $ff .three - db $20, $20, $20, $00, $00, $00, $00, $00, $00, $00, $00, $ff + db D_LEFT, D_LEFT, D_LEFT, $00, $00, $00, $00, $00, $00, $00, $00, $ff .four - db $20, $20, $40, $20, $ff + db D_LEFT, D_LEFT, D_UP, D_LEFT, $ff .five - db $20, $80, $20, $00, $00, $00, $00, $00, $00, $00, $00, $ff + db D_LEFT, D_DOWN, D_LEFT, $00, $00, $00, $00, $00, $00, $00, $00, $ff diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 6602cedd..a17e67bd 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -1,15 +1,15 @@ -EnterMapAnim: ; 70510 (1c:4510) - call InitFacingDirectionBuffer +EnterMapAnim: + call InitFacingDirectionList ld a, $ec ld [wSpriteStateData1 + 4], a ; player's sprite Y screen position call Delay3 push hl call GBFadeInFromWhite - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 bit 7, [hl] ; used fly out of battle? res 7, [hl] jr nz, .flyAnimation - ld a, (SFX_02_4c - SFX_Headers_02) / 3 + ld a, SFX_TELEPORT_ENTER_1 call PlaySound ld hl, wd732 bit 4, [hl] ; used dungeon warp? @@ -17,7 +17,7 @@ EnterMapAnim: ; 70510 (1c:4510) pop hl jr nz, .dungeonWarpAnimation call PlayerSpinWhileMovingDown - ld a, (SFX_02_4f - SFX_Headers_02) / 3 + ld a, SFX_TELEPORT_ENTER_2 call PlaySound call IsPlayerStandingOnWarpPadOrHole ld a, b @@ -32,7 +32,7 @@ EnterMapAnim: ; 70510 (1c:4510) ld a, $8 ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayEndValue ld [hl], $ff ; wPlayerSpinInPlaceAnimSoundID - ld hl, wcd48 + ld hl, wFacingDirectionList call PlayerSpinInPlace .restoreDefaultMusic call PlayDefaultMusic @@ -47,10 +47,10 @@ EnterMapAnim: ; 70510 (1c:4510) pop hl ld de, BirdSprite ld hl, vNPCSprites - ld bc, (BANK(BirdSprite) << 8) + $0c + lb bc, BANK(BirdSprite), $0c call CopyVideoData call LoadBirdSpriteGraphics - ld a, (SFX_02_50 - SFX_Headers_02) / 3 + ld a, SFX_FLY call PlaySound ld hl, wFlyAnimUsingCoordList xor a ; is using coord list @@ -58,12 +58,12 @@ 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 -FlyAnimationEnterScreenCoords: ; 70592 (1c:4592) +FlyAnimationEnterScreenCoords: ; y, x pairs ; This is the sequence of screen coordinates used by the overworld ; Fly animation when the player is entering a map. @@ -80,7 +80,7 @@ FlyAnimationEnterScreenCoords: ; 70592 (1c:4592) db $3C, $48 db $3C, $40 -PlayerSpinWhileMovingDown: ; 705aa (1c:45aa) +PlayerSpinWhileMovingDown: ld hl, wPlayerSpinWhileMovingUpOrDownAnimDeltaY ld a, $10 ld [hli], a ; wPlayerSpinWhileMovingUpOrDownAnimDeltaY @@ -90,8 +90,8 @@ PlayerSpinWhileMovingDown: ; 705aa (1c:45aa) ld [hl], a ; wPlayerSpinWhileMovingUpOrDownAnimFrameDelay jp PlayerSpinWhileMovingUpOrDown -_LeaveMapAnim: ; 705ba (1c:45ba) - call InitFacingDirectionBuffer +_LeaveMapAnim: + call InitFacingDirectionList call IsPlayerStandingOnWarpPadOrHole ld a, b and a @@ -99,7 +99,7 @@ _LeaveMapAnim: ; 705ba (1c:45ba) dec a jp nz, LeaveMapThroughHoleAnim .spinWhileMovingUp - ld a, (SFX_02_4b - SFX_Headers_02) / 3 + ld a, SFX_TELEPORT_EXIT_1 call PlaySound ld hl, wPlayerSpinWhileMovingUpOrDownAnimDeltaY ld a, -$10 @@ -133,8 +133,8 @@ _LeaveMapAnim: ; 705ba (1c:45ba) ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayDelta xor a ld [hli], a ; wPlayerSpinInPlaceAnimFrameDelayEndValue - ld [hl], (SFX_02_4d - SFX_Headers_02) / 3 ; wPlayerSpinInPlaceAnimSoundID - ld hl, wcd48 + ld [hl], SFX_TELEPORT_EXIT_2 ; wPlayerSpinInPlaceAnimSoundID + ld hl, wFacingDirectionList call PlayerSpinInPlace jr .spinWhileMovingUp .flyAnimation @@ -146,7 +146,7 @@ _LeaveMapAnim: ; 705ba (1c:45ba) ld [hli], a ; wFlyAnimCounter ld [hl], $c ; wFlyAnimBirdSpriteImageIndex call DoFlyAnimation - ld a, (SFX_02_50 - SFX_Headers_02) / 3 + ld a, SFX_FLY call PlaySound ld hl, wFlyAnimUsingCoordList xor a ; is using coord list @@ -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,12 +162,12 @@ _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 -FlyAnimationScreenCoords1: ; 7064f (1c:464f) +FlyAnimationScreenCoords1: ; y, x pairs ; This is the sequence of screen coordinates used by the first part ; of the Fly overworld animation. @@ -184,7 +184,7 @@ FlyAnimationScreenCoords1: ; 7064f (1c:464f) db $2A, $98 db $27, $A0 -FlyAnimationScreenCoords2: ; 70667 (1c:4667) +FlyAnimationScreenCoords2: ; y, x pairs ; This is the sequence of screen coordinates used by the second part ; of the Fly overworld animation. @@ -201,7 +201,7 @@ FlyAnimationScreenCoords2: ; 70667 (1c:4667) db $F0, $00 -LeaveMapThroughHoleAnim: ; 7067d (1c:467d) +LeaveMapThroughHoleAnim: ld a, $ff ld [wUpdateSpritesEnabled], a ; disable UpdateSprites ; shift upper half of player's sprite down 8 pixels and hide lower half @@ -214,7 +214,7 @@ LeaveMapThroughHoleAnim: ; 7067d (1c:467d) ld [wOAMBuffer + 1 * 4], a ld c, 2 call DelayFrames - ; hide lower half of player's sprite + ; hide upper half of player's sprite ld a, $a0 ld [wOAMBuffer + 2 * 4], a ld [wOAMBuffer + 3 * 4], a @@ -223,7 +223,7 @@ LeaveMapThroughHoleAnim: ; 7067d (1c:467d) ld [wUpdateSpritesEnabled], a ; enable UpdateSprites jp RestoreFacingDirectionAndYScreenPos -DoFlyAnimation: ; 706ae (1c:46ae) +DoFlyAnimation: ld a, [wFlyAnimBirdSpriteImageIndex] xor $1 ; make the bird flap its wings ld [wFlyAnimBirdSpriteImageIndex], a @@ -231,7 +231,7 @@ DoFlyAnimation: ; 706ae (1c:46ae) call Delay3 ld a, [wFlyAnimUsingCoordList] cp $ff - jr z, .asm_706cd + jr z, .skipCopyingCoords ; if the bird is flapping its wings in place ld hl, wSpriteStateData1 + 4 ld a, [de] inc de @@ -240,34 +240,35 @@ DoFlyAnimation: ; 706ae (1c:46ae) ld a, [de] inc de ld [hl], a -.asm_706cd +.skipCopyingCoords ld a, [wFlyAnimCounter] dec a ld [wFlyAnimCounter], a jr nz, DoFlyAnimation ret -LoadBirdSpriteGraphics: ; 706d7 (1c:46d7) - ld de, BirdSprite ; $4d80 +LoadBirdSpriteGraphics: + ld de, BirdSprite ld hl, vNPCSprites - ld bc, (BANK(BirdSprite) << 8) + $0c + lb bc, BANK(BirdSprite), $0c call CopyVideoData - ld de, BirdSprite + $c0 ; $4e40 ; moving amination sprite + ld de, BirdSprite + $c0 ; moving animation sprite ld hl, vNPCSprites2 - ld bc, (BANK(BirdSprite) << 8) + $0c + lb bc, BANK(BirdSprite), $0c jp CopyVideoData -InitFacingDirectionBuffer: ; 706ef (1c:46ef) +InitFacingDirectionList: ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images) - ld [wcd50], a + ld [wSavedPlayerFacingDirection], a ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position - ld [wcd4f], a + ld [wSavedPlayerScreenY], a ld hl, PlayerSpinningFacingOrder - ld de, wcd48 - ld bc, $4 + ld de, wFacingDirectionList + ld bc, 4 call CopyData ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction (image index is locked to standing images) - ld hl, wcd48 + ld hl, wFacingDirectionList +; find the place in the list that matches the current facing direction .loop cp [hl] inc hl @@ -275,34 +276,36 @@ InitFacingDirectionBuffer: ; 706ef (1c:46ef) dec hl ret -PlayerSpinningFacingOrder: ; 70713 (1c:4713) +PlayerSpinningFacingOrder: ; The order of the direction the player's sprite is facing when teleporting ; away. Creates a spinning effect. db SPRITE_FACING_DOWN, SPRITE_FACING_LEFT, SPRITE_FACING_UP, SPRITE_FACING_RIGHT -SpinPlayerSprite: ; 70717 (1c:4717) +SpinPlayerSprite: +; copy the current value from the list into the sprite data and rotate the list ld a, [hl] ld [wSpriteStateData1 + 2], a ; player's sprite facing direction (image index is locked to standing images) push hl - ld hl, wcd48 - ld de, wcd47 - ld bc, $4 + ld hl, wFacingDirectionList + ld de, wFacingDirectionList - 1 + ld bc, 4 call CopyData - ld a, [wcd47] - ld [wcd4b], a + ld a, [wFacingDirectionList - 1] + ld [wFacingDirectionList + 3], a pop hl ret -PlayerSpinInPlace: ; 70730 (1c:4730) +PlayerSpinInPlace: call SpinPlayerSprite ld a, [wPlayerSpinInPlaceAnimFrameDelay] ld c, a and $3 - jr nz, .asm_70743 + jr nz, .skipPlayingSound +; when the last delay was a multiple of 4, play a sound if there is one ld a, [wPlayerSpinInPlaceAnimSoundID] cp $ff call nz, PlaySound -.asm_70743 +.skipPlayingSound ld a, [wPlayerSpinInPlaceAnimFrameDelayDelta] add c ld [wPlayerSpinInPlaceAnimFrameDelay], a @@ -313,7 +316,7 @@ PlayerSpinInPlace: ; 70730 (1c:4730) call DelayFrames jr PlayerSpinInPlace -PlayerSpinWhileMovingUpOrDown: ; 70755 (1c:4755) +PlayerSpinWhileMovingUpOrDown: call SpinPlayerSprite ld a, [wPlayerSpinWhileMovingUpOrDownAnimDeltaY] ld c, a @@ -329,25 +332,25 @@ PlayerSpinWhileMovingUpOrDown: ; 70755 (1c:4755) call DelayFrames jr PlayerSpinWhileMovingUpOrDown -RestoreFacingDirectionAndYScreenPos: ; 70772 (1c:4772) - ld a, [wcd4f] +RestoreFacingDirectionAndYScreenPos: + ld a, [wSavedPlayerScreenY] ld [wSpriteStateData1 + 4], a - ld a, [wcd50] + ld a, [wSavedPlayerFacingDirection] ld [wSpriteStateData1 + 2], a ret ; if SGB, 2 frames, else 3 frames -GetPlayerTeleportAnimFrameDelay: ; 7077f (1c:477f) +GetPlayerTeleportAnimFrameDelay: ld a, [wOnSGB] xor $1 inc a inc a ret -IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787) +IsPlayerStandingOnWarpPadOrHole: ld b, 0 ld hl, .warpPadAndHoleData - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] ld c, a .loop ld a, [hli] @@ -367,99 +370,111 @@ IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787) ld b, [hl] .done ld a, b - ld [wcd5b], a + ld [wStandingOnWarpPadOrHole], a ret -; format: db tileset id, tile id, value to be put in wcd5b -.warpPadAndHoleData: ; 707a9 (1c:47a9) +; format: db tileset id, tile id, value to be put in [wStandingOnWarpPadOrHole] +.warpPadAndHoleData: db FACILITY, $20, 1 ; warp pad db FACILITY, $11, 2 ; hole db CAVERN, $22, 2 ; hole db INTERIOR, $55, 1 ; warp pad db $FF -Func_707b6: ; 707b6 (1c:47b6) - ld c, $a +FishingAnim: + ld c, 10 call DelayFrames ld hl, wd736 - set 6, [hl] - ld de, RedSprite ; $4180 + set 6, [hl] ; reserve the last 4 OAM entries + ld de, RedSprite ld hl, vNPCSprites - ld bc, (BANK(RedSprite) << 8) + $0c + lb bc, BANK(RedSprite), $c 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, FishingRodOAM 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, [wRodResponse] and a ld hl, NoNibbleText - jr z, .asm_70836 + jr z, .done cp $2 ld hl, NothingHereText - jr z, .asm_70836 - ld b, $a -.asm_707fe - ld hl, wSpriteStateData1 + 4 - call Func_70842 + jr z, .done + +; there was a bite + +; shake the player's sprite vertically + ld b, 10 +.loop + ld hl, wSpriteStateData1 + 4 ; player's sprite Y screen position + call .ShakePlayerSprite ld hl, wOAMBuffer + $9c - call Func_70842 + call .ShakePlayerSprite call Delay3 dec b - jr nz, .asm_707fe - ld a, [wSpriteStateData1 + 2] - cp $4 - jr nz, .asm_7081c + jr nz, .loop + +; If the player is facing up, hide the fishing rod so it doesn't overlap with +; the exclamation bubble that will be shown next. + ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction + cp SPRITE_FACING_UP + jr nz, .skipHidingFishingRod ld a, $a0 ld [wOAMBuffer + $9c], a -.asm_7081c - ld hl, wcd4f + +.skipHidingFishingRod + ld hl, wEmotionBubbleSpriteIndex xor a - ld [hli], a - ld [hl], a + ld [hli], a ; player's sprite + ld [hl], a ; EXCLAMATION_BUBBLE predef EmotionBubble - ld a, [wSpriteStateData1 + 2] - cp $4 - jr nz, .asm_70833 + +; If the player is facing up, unhide the fishing rod. + ld a, [wSpriteStateData1 + 2] ; player's sprite facing direction + cp SPRITE_FACING_UP + jr nz, .skipUnhidingFishingRod ld a, $44 ld [wOAMBuffer + $9c], a -.asm_70833 + +.skipUnhidingFishingRod ld hl, ItsABiteText -.asm_70836 + +.done call PrintText ld hl, wd736 - res 6, [hl] + res 6, [hl] ; unreserve the last 4 OAM entries call LoadFontTilePatterns ret -Func_70842: ; 70842 (1c:4842) +.ShakePlayerSprite ld a, [hl] xor $1 ld [hl], a ret -NoNibbleText: ; 70847 (1c:4847) +NoNibbleText: TX_FAR _NoNibbleText db "@" -NothingHereText: ; 7084c (1c:484c) +NothingHereText: TX_FAR _NothingHereText db "@" -ItsABiteText: ; 70851 (1c:4851) +ItsABiteText: TX_FAR _ItsABiteText db "@" -FishingRodGfxProperties: ; 70856 (1c:4856) +FishingRodOAM: ; specifies how the fishing rod should be drawn on the screen ; first byte = screen y coordinate ; second byte = screen x coordinate @@ -470,7 +485,7 @@ FishingRodGfxProperties: ; 70856 (1c:4856) db $50, $40, $FE, $00 ; player facing left db $50, $58, $FE, $20 ; player facing right ($20 means "horizontally flip the tile") -RedFishingTiles: ; 70866 (1c:4866) +RedFishingTiles: dw RedFishingTilesFront db 2, BANK(RedFishingTilesFront) dw vNPCSprites + $20 @@ -487,7 +502,7 @@ RedFishingTiles: ; 70866 (1c:4866) db 3, BANK(RedFishingRodTiles) dw vNPCSprites2 + $7d0 -_HandleMidJump: ; 7087e (1c:487e) +_HandleMidJump: ld a, [wPlayerJumpingYScreenCoordsIndex] ld c, a inc a @@ -519,6 +534,6 @@ _HandleMidJump: ; 7087e (1c:487e) ld [wJoyIgnore], a ret -PlayerJumpingYScreenCoords: ; 708ba (1c:48ba) +PlayerJumpingYScreenCoords: ; Sequence of y screen coordinates for player's sprite when jumping over a ledge. db $38, $36, $34, $32, $31, $30, $30, $30, $31, $32, $33, $34, $36, $38, $3C, $3C diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm new file mode 100644 index 00000000..79f755b9 --- /dev/null +++ b/engine/overworld/player_state.asm @@ -0,0 +1,463 @@ +; only used for setting bit 2 of wd736 upon entering a new map +IsPlayerStandingOnWarp: + ld a, [wNumberOfWarps] + and a + ret z + ld c, a + ld hl, wWarpEntries +.loop + ld a, [wYCoord] + cp [hl] + jr nz, .nextWarp1 + inc hl + ld a, [wXCoord] + cp [hl] + jr nz, .nextWarp2 + inc hl + ld a, [hli] ; target warp + ld [wDestinationWarpID], a + ld a, [hl] ; target map + ld [hWarpDestinationMap], a + ld hl, wd736 + set 2, [hl] ; standing on warp flag + ret +.nextWarp1 + inc hl +.nextWarp2 + inc hl + inc hl + inc hl + dec c + jr nz, .loop + ret + +CheckForceBikeOrSurf: + ld hl, wd732 + bit 5, [hl] + ret nz + ld hl, ForcedBikeOrSurfMaps + ld a, [wYCoord] + ld b, a + ld a, [wXCoord] + ld c, a + ld a, [wCurMap] + ld d, a +.loop + ld a, [hli] + cp $ff + ret z ;if we reach FF then it's not part of the list + cp d ;compare to current map + jr nz, .incorrectMap + ld a, [hli] + cp b ;compare y-coord + jr nz, .incorrectY + ld a, [hli] + cp c ;compare x-coord + jr nz, .loop ; incorrect x-coord, check next item + ld a, [wCurMap] + cp SEAFOAM_ISLANDS_4 + ld a, $2 + ld [wSeafoamIslands4CurScript], a + jr z, .forceSurfing + ld a, [wCurMap] + cp SEAFOAM_ISLANDS_5 + ld a, $2 + ld [wSeafoamIslands5CurScript], a + jr z, .forceSurfing + ;force bike riding + ld hl, wd732 + set 5, [hl] + ld a, $1 + ld [wWalkBikeSurfState], a + ld [wWalkBikeSurfStateCopy], a + jp ForceBikeOrSurf +.incorrectMap + inc hl +.incorrectY + inc hl + jr .loop +.forceSurfing + ld a, $2 + ld [wWalkBikeSurfState], a + ld [wWalkBikeSurfStateCopy], a + jp ForceBikeOrSurf + +INCLUDE "data/force_bike_surf.asm" + +IsPlayerFacingEdgeOfMap: + push hl + push de + push bc + ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction + srl a + ld c, a + ld b, $0 + ld hl, .functionPointerTable + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wYCoord] + ld b, a + ld a, [wXCoord] + ld c, a + ld de, .asm_c41e + push de + jp [hl] +.asm_c41e + pop bc + pop de + pop hl + ret + +.functionPointerTable + dw .facingDown + dw .facingUp + dw .facingLeft + dw .facingRight + +.facingDown + ld a, [wCurMapHeight] + add a + dec a + cp b + jr z, .setCarry + jr .resetCarry + +.facingUp + ld a, b + and a + jr z, .setCarry + jr .resetCarry + +.facingLeft + ld a, c + and a + jr z, .setCarry + jr .resetCarry + +.facingRight + ld a, [wCurMapWidth] + add a + dec a + cp c + jr z, .setCarry + jr .resetCarry +.resetCarry + and a + ret +.setCarry + scf + ret + +IsWarpTileInFrontOfPlayer: + push hl + push de + push bc + call _GetTileAndCoordsInFrontOfPlayer + ld a, [wCurMap] + cp SS_ANNE_5 + jr z, .ssAnne5 + ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction + srl a + ld c, a + ld b, 0 + ld hl, .warpTileListPointers + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wTileInFrontOfPlayer] + ld de, $1 + call IsInArray +.done + pop bc + pop de + pop hl + ret + +.warpTileListPointers: + dw .facingDownWarpTiles + dw .facingUpWarpTiles + dw .facingLeftWarpTiles + dw .facingRightWarpTiles + +.facingDownWarpTiles + db $01,$12,$17,$3D,$04,$18,$33,$FF + +.facingUpWarpTiles + db $01,$5C,$FF + +.facingLeftWarpTiles + db $1A,$4B,$FF + +.facingRightWarpTiles + db $0F,$4E,$FF + +.ssAnne5 + ld a, [wTileInFrontOfPlayer] + cp $15 + jr nz, .notSSAnne5Warp + scf + jr .done +.notSSAnne5Warp + and a + jr .done + +IsPlayerStandingOnDoorTileOrWarpTile: + push hl + push de + push bc + callba IsPlayerStandingOnDoorTile + jr c, .done + ld a, [wCurMapTileset] + add a + ld c, a + ld b, $0 + ld hl, WarpTileIDPointers + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $1 + aCoord 8, 9 + call IsInArray + jr nc, .done + ld hl, wd736 + res 2, [hl] +.done + pop bc + pop de + pop hl + ret + +INCLUDE "data/warp_tile_ids.asm" + +PrintSafariZoneSteps: + ld a, [wCurMap] + cp SAFARI_ZONE_EAST + ret c + cp UNKNOWN_DUNGEON_2 + ret nc + coord hl, 0, 0 + ld b, 3 + ld c, 7 + call TextBoxBorder + coord hl, 1, 1 + ld de, wSafariSteps + lb bc, 2, 3 + call PrintNumber + coord hl, 4, 1 + ld de, SafariSteps + call PlaceString + coord hl, 1, 3 + ld de, SafariBallText + call PlaceString + ld a, [wNumSafariBalls] + cp 10 + jr nc, .asm_c56d + coord hl, 5, 3 + ld a, " " + ld [hl], a +.asm_c56d + coord hl, 6, 3 + ld de, wNumSafariBalls + lb bc, 1, 2 + jp PrintNumber + +SafariSteps: + db "/500@" + +SafariBallText: + db "BALL×× @" + +GetTileAndCoordsInFrontOfPlayer: + call GetPredefRegisters + +_GetTileAndCoordsInFrontOfPlayer: + ld a, [wYCoord] + ld d, a + ld a, [wXCoord] + ld e, a + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + and a ; cp SPRITE_FACING_DOWN + jr nz, .notFacingDown +; facing down + aCoord 8, 11 + inc d + jr .storeTile +.notFacingDown + cp SPRITE_FACING_UP + jr nz, .notFacingUp +; facing up + aCoord 8, 7 + dec d + jr .storeTile +.notFacingUp + cp SPRITE_FACING_LEFT + jr nz, .notFacingLeft +; facing left + aCoord 6, 9 + dec e + jr .storeTile +.notFacingLeft + cp SPRITE_FACING_RIGHT + jr nz, .storeTile +; facing right + aCoord 10, 9 + inc e +.storeTile + ld c, a + ld [wTileInFrontOfPlayer], a + ret + +GetTileTwoStepsInFrontOfPlayer: + xor a + ld [$ffdb], a + ld hl, wYCoord + ld a, [hli] + ld d, a + ld e, [hl] + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + and a ; cp SPRITE_FACING_DOWN + jr nz, .notFacingDown +; facing down + ld hl, $ffdb + set 0, [hl] + aCoord 8, 13 + inc d + jr .storeTile +.notFacingDown + cp SPRITE_FACING_UP + jr nz, .notFacingUp +; facing up + ld hl, $ffdb + set 1, [hl] + aCoord 8, 5 + dec d + jr .storeTile +.notFacingUp + cp SPRITE_FACING_LEFT + jr nz, .notFacingLeft +; facing left + ld hl, $ffdb + set 2, [hl] + aCoord 4, 9 + dec e + jr .storeTile +.notFacingLeft + cp SPRITE_FACING_RIGHT + jr nz, .storeTile +; facing right + ld hl, $ffdb + set 3, [hl] + aCoord 12, 9 + inc e +.storeTile + ld c, a + ld [wTileInFrontOfBoulderAndBoulderCollisionResult], a + ld [wTileInFrontOfPlayer], a + ret + +CheckForCollisionWhenPushingBoulder: + call GetTileTwoStepsInFrontOfPlayer + ld hl, wTilesetCollisionPtr + ld a, [hli] + ld h, [hl] + ld l, a +.loop + ld a, [hli] + cp $ff + jr z, .done ; if the tile two steps ahead is not passable + cp c + jr nz, .loop + ld hl, TilePairCollisionsLand + call CheckForTilePairCollisions2 + ld a, $ff + jr c, .done ; if there is an elevation difference between the current tile and the one two steps ahead + ld a, [wTileInFrontOfBoulderAndBoulderCollisionResult] + cp $15 ; stairs tile + ld a, $ff + jr z, .done ; if the tile two steps ahead is stairs + call CheckForBoulderCollisionWithSprites +.done + ld [wTileInFrontOfBoulderAndBoulderCollisionResult], a + ret + +; sets a to $ff if there is a collision and $00 if there is no collision +CheckForBoulderCollisionWithSprites: + ld a, [wBoulderSpriteIndex] + dec a + swap a + ld d, 0 + ld e, a + ld hl, wSpriteStateData2 + $14 + add hl, de + ld a, [hli] ; map Y position + ld [$ffdc], a + ld a, [hl] ; map X position + ld [$ffdd], a + ld a, [wNumSprites] + ld c, a + ld de, $f + ld hl, wSpriteStateData2 + $14 + ld a, [$ffdb] + and $3 ; facing up or down? + jr z, .pushingHorizontallyLoop +.pushingVerticallyLoop + inc hl + ld a, [$ffdd] + cp [hl] + jr nz, .nextSprite1 ; if X coordinates don't match + dec hl + ld a, [hli] + ld b, a + ld a, [$ffdb] + rrca + jr c, .pushingDown +; pushing up + ld a, [$ffdc] + dec a + jr .compareYCoords +.pushingDown + ld a, [$ffdc] + inc a +.compareYCoords + cp b + jr z, .failure +.nextSprite1 + dec c + jr z, .success + add hl, de + jr .pushingVerticallyLoop +.pushingHorizontallyLoop + ld a, [hli] + ld b, a + ld a, [$ffdc] + cp b + jr nz, .nextSprite2 + ld b, [hl] + ld a, [$ffdb] + bit 2, a + jr nz, .pushingLeft +; pushing right + ld a, [$ffdd] + inc a + jr .compareXCoords +.pushingLeft + ld a, [$ffdd] + dec a +.compareXCoords + cp b + jr z, .failure +.nextSprite2 + dec c + jr z, .success + add hl, de + jr .pushingHorizontallyLoop +.failure + ld a, $ff + ret +.success + xor a + ret diff --git a/engine/overworld/poison.asm b/engine/overworld/poison.asm new file mode 100644 index 00000000..5d8eb9fd --- /dev/null +++ b/engine/overworld/poison.asm @@ -0,0 +1,112 @@ +ApplyOutOfBattlePoisonDamage: + ld a, [wd730] + add a + jp c, .noBlackOut ; no black out if joypad states are being simulated + ld a, [wPartyCount] + and a + jp z, .noBlackOut + call IncrementDayCareMonExp + ld a, [wStepCounter] + and $3 ; is the counter a multiple of 4? + jp nz, .noBlackOut ; only apply poison damage every fourth step + ld [wWhichPokemon], a + ld hl, wPartyMon1Status + ld de, wPartySpecies +.applyDamageLoop + ld a, [hl] + and (1 << PSN) + jr z, .nextMon2 ; not poisoned + dec hl + dec hl + ld a, [hld] + ld b, a + ld a, [hli] + or b + jr z, .nextMon ; already fainted +; subtract 1 from HP + ld a, [hl] + dec a + ld [hld], a + inc a + jr nz, .noBorrow +; borrow 1 from upper byte of HP + dec [hl] + inc hl + jr .nextMon +.noBorrow + ld a, [hli] + or [hl] + jr nz, .nextMon ; didn't faint from damage +; the mon fainted from the damage + push hl + inc hl + inc hl + ld [hl], a + ld a, [de] + ld [wd11e], a + push de + ld a, [wWhichPokemon] + ld hl, wPartyMonNicks + call GetPartyMonName + xor a + ld [wJoyIgnore], a + call EnableAutoTextBoxDrawing + ld a, TEXT_MON_FAINTED + ld [hSpriteIndexOrTextID], a + call DisplayTextID + pop de + pop hl +.nextMon + inc hl + inc hl +.nextMon2 + inc de + ld a, [de] + inc a + jr z, .applyDamageLoopDone + ld bc, wPartyMon2 - wPartyMon1 + add hl, bc + push hl + ld hl, wWhichPokemon + inc [hl] + pop hl + jr .applyDamageLoop +.applyDamageLoopDone + ld hl, wPartyMon1Status + ld a, [wPartyCount] + ld d, a + ld e, 0 +.countPoisonedLoop + ld a, [hl] + and (1 << PSN) + or e + ld e, a + ld bc, wPartyMon2 - wPartyMon1 + add hl, bc + dec d + jr nz, .countPoisonedLoop + ld a, e + and a ; are any party members poisoned? + jr z, .skipPoisonEffectAndSound + ld b, $2 + predef ChangeBGPalColor0_4Frames ; change BG white to dark grey for 4 frames + ld a, SFX_POISONED + call PlaySound +.skipPoisonEffectAndSound + predef AnyPartyAlive + ld a, d + and a + jr nz, .noBlackOut + call EnableAutoTextBoxDrawing + ld a, TEXT_BLACKED_OUT + ld [hSpriteIndexOrTextID], a + call DisplayTextID + ld hl, wd72e + set 5, [hl] + ld a, $ff + jr .done +.noBlackOut + xor a +.done + ld [wOutOfBattleBlackout], a + ret diff --git a/engine/overworld/pokecenter.asm b/engine/overworld/pokecenter.asm index 3c640d8e..f26bedf8 100755 --- a/engine/overworld/pokecenter.asm +++ b/engine/overworld/pokecenter.asm @@ -1,4 +1,4 @@ -DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6) +DisplayPokemonCenterDialogue_: call SaveScreenTilesToBuffer1 ; save screen ld hl, PokemonCenterWelcomeText call PrintText @@ -24,12 +24,12 @@ DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6) predef HealParty callba AnimateHealingMachine ; do the healing machine animation xor a - ld [wMusicHeaderPointer], a - ld a, [wc0f0] - ld [wc0ef], a - ld a, [wd35b] - ld [wcfca], a - ld [wc0ee], a + ld [wAudioFadeOutControl], a + ld a, [wAudioSavedROMBank] + ld [wAudioROMBank], a + ld a, [wMapMusicSoundID] + ld [wLastMusicSoundID], a + ld [wNewSoundID], a call PlaySound ld hl, PokemonFightingFitText call PrintText @@ -43,26 +43,26 @@ DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6) .done ld hl, PokemonCenterFarewellText call PrintText - jp UpdateSprites ; move sprites + jp UpdateSprites -PokemonCenterWelcomeText: ; 705d (1:705d) +PokemonCenterWelcomeText: TX_FAR _PokemonCenterWelcomeText db "@" -ShallWeHealYourPokemonText: ; 7062 (1:7062) - db $a +ShallWeHealYourPokemonText: + TX_DELAY TX_FAR _ShallWeHealYourPokemonText db "@" -NeedYourPokemonText: ; 7068 (1:7068) +NeedYourPokemonText: TX_FAR _NeedYourPokemonText db "@" -PokemonFightingFitText: ; 706d (1:706d) +PokemonFightingFitText: TX_FAR _PokemonFightingFitText db "@" -PokemonCenterFarewellText: ; 7072 (1:7072) - db $a +PokemonCenterFarewellText: + TX_DELAY TX_FAR _PokemonCenterFarewellText db "@" diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm index 8325b93f..823939b1 100755 --- a/engine/overworld/pokemart.asm +++ b/engine/overworld/pokemart.asm @@ -1,30 +1,34 @@ -DisplayPokemartDialogue_: ; 6c20 (1:6c20) +DisplayPokemartDialogue_: ld a,[wListScrollOffset] - ld [wd07e],a - call UpdateSprites ; move sprites + ld [wSavedListScrollOffset],a + call UpdateSprites xor a - ld [wcf0a],a ; flag that is set if something is sold or bought + ld [wBoughtOrSoldItemInMart],a .loop xor a ld [wListScrollOffset],a ld [wCurrentMenuItem],a ld [wPlayerMonNumber],a inc a - ld [wcf93],a + ld [wPrintItemPrices],a ld a,MONEY_BOX ld [wTextBoxID],a - call DisplayTextBoxID ; draw money text box + call DisplayTextBoxID ld a,BUY_SELL_QUIT_MENU ld [wTextBoxID],a - call DisplayTextBoxID ; do buy/sell/quit menu - ld hl,wd128 ; pointer to this pokemart's inventory + call DisplayTextBoxID + +; This code is useless. It copies the address of the pokemart's inventory to hl, +; but the address is never used. + ld hl,wItemListPointer ld a,[hli] ld l,[hl] - ld h,a ; hl = address of inventory - ld a,[wd12e] - cp a,$02 + ld h,a + + ld a,[wMenuExitMethod] + cp a,CANCELLED_MENU jp z,.done - ld a,[wd12d] ; ID of the chosen menu item + ld a,[wChosenMenuItem] and a ; buying? jp z,.buyMenu dec a ; selling? @@ -32,11 +36,14 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) dec a ; quitting? jp z,.done .sellMenu + +; the same variables are set again below, so this code has no effect xor a - ld [wcf93],a - ld a,$02 - ld [wd11b],a - callab Func_39bd5 + ld [wPrintItemPrices],a + ld a,INIT_BAG_ITEM_LIST + ld [wInitListType],a + callab InitList + ld a,[wNumBagItems] and a jp z,.bagEmpty @@ -50,19 +57,19 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) call DisplayTextBoxID ; draw money text box ld hl,wNumBagItems ld a,l - ld [wList],a + ld [wListPointer],a ld a,h - ld [wList + 1],a + ld [wListPointer + 1],a xor a - ld [wcf93],a + ld [wPrintItemPrices],a ld [wCurrentMenuItem],a ld a,ITEMLISTMENU ld [wListMenuID],a call DisplayListMenuID jp c,.returnToMainPokemartMenu ; if the player closed the menu .confirmItemSale ; if the player is trying to sell a specific item - call IsKeyItem ; check if item is unsellable - ld a,[wd124] + call IsKeyItem + ld a,[wIsKeyItem] and a jr nz,.unsellableItem ld a,[wcf91] @@ -70,30 +77,34 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) jr c,.unsellableItem ld a,PRICEDITEMLISTMENU ld [wListMenuID],a - ld [$ff8e],a ; halve prices when selling + ld [hHalveItemPrices],a ; halve prices when selling call DisplayChooseQuantityMenu inc a jr z,.sellMenuLoop ; if the player closed the choose quantity menu with the B button ld hl,PokemartTellSellPriceText - ld bc,$0e01 + lb bc, 14, 1 ; location that PrintText always prints to, this is useless call PrintText - hlCoord 14, 7 - ld bc,$080f + coord hl, 14, 7 + lb bc, 8, 15 ld a,TWO_OPTION_MENU ld [wTextBoxID],a call DisplayTextBoxID ; yes/no menu - ld a,[wd12e] - cp a,$02 - jr z,.sellMenuLoop ; if the player pressed the B button - ld a,[wd12d] ; ID of the chosen menu item + ld a,[wMenuExitMethod] + cp a,CHOSE_SECOND_ITEM + jr z,.sellMenuLoop ; if the player chose No or pressed the B button + +; The following code is supposed to check if the player chose No, but the above +; check already catches it. + ld a,[wChosenMenuItem] dec a - jr z,.sellMenuLoop ; if the player chose No + jr z,.sellMenuLoop + .sellItem - ld a,[wcf0a] ; flag that is set if something is sold or bought + ld a,[wBoughtOrSoldItemInMart] and a jr nz,.skipSettingFlag1 inc a - ld [wcf0a],a + ld [wBoughtOrSoldItemInMart],a .skipSettingFlag1 call AddAmountSoldToMoney ld hl,wNumBagItems @@ -106,39 +117,42 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) .bagEmpty ld hl,PokemartItemBagEmptyText call PrintText - call SaveScreenTilesToBuffer1 ; save screen + call SaveScreenTilesToBuffer1 jp .returnToMainPokemartMenu .buyMenu - ld a,$01 - ld [wcf93],a - ld a,$03 - ld [wd11b],a - callab Func_39bd5 + +; the same variables are set again below, so this code has no effect + ld a,1 + ld [wPrintItemPrices],a + ld a,INIT_OTHER_ITEM_LIST + ld [wInitListType],a + callab InitList + ld hl,PokemartBuyingGreetingText call PrintText - call SaveScreenTilesToBuffer1 ; save screen + call SaveScreenTilesToBuffer1 .buyMenuLoop - call LoadScreenTilesFromBuffer1 ; restore saved screen + call LoadScreenTilesFromBuffer1 ld a,MONEY_BOX ld [wTextBoxID],a - call DisplayTextBoxID ; draw money text box - ld hl,wStringBuffer2 + 11 + call DisplayTextBoxID + ld hl,wItemList ld a,l - ld [wList],a + ld [wListPointer],a ld a,h - ld [wList + 1],a + ld [wListPointer + 1],a xor a ld [wCurrentMenuItem],a inc a - ld [wcf93],a + ld [wPrintItemPrices],a inc a ; a = 2 (PRICEDITEMLISTMENU) ld [wListMenuID],a call DisplayListMenuID jr c,.returnToMainPokemartMenu ; if the player closed the menu - ld a,$63 - ld [wcf97],a + ld a,99 + ld [wMaxItemQuantity],a xor a - ld [$ff8e],a + ld [hHalveItemPrices],a ; don't halve item prices when buying call DisplayChooseQuantityMenu inc a jr z,.buyMenuLoop ; if the player closed the choose quantity menu with the B button @@ -148,17 +162,21 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) call CopyStringToCF4B ; copy name to wcf4b ld hl,PokemartTellBuyPriceText call PrintText - hlCoord 14, 7 - ld bc,$080f + coord hl, 14, 7 + lb bc, 8, 15 ld a,TWO_OPTION_MENU ld [wTextBoxID],a call DisplayTextBoxID ; yes/no menu - ld a,[wd12e] - cp a,$02 - jp z,.buyMenuLoop ; if the player pressed the B button - ld a,[wd12d] ; ID of the chosen menu item + ld a,[wMenuExitMethod] + cp a,CHOSE_SECOND_ITEM + jp z,.buyMenuLoop ; if the player chose No or pressed the B button + +; The following code is supposed to check if the player chose No, but the above +; check already catches it. + ld a,[wChosenMenuItem] dec a - jr z,.buyMenuLoop ; if the player chose No + jr z,.buyMenuLoop + .buyItem call .isThereEnoughMoney jr c,.notEnoughMoney @@ -166,13 +184,13 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) call AddItemToInventory jr nc,.bagFull call SubtractAmountPaidFromMoney - ld a,[wcf0a] ; flag that is set if something is sold or bought + ld a,[wBoughtOrSoldItemInMart] and a jr nz,.skipSettingFlag2 - ld a,$01 - ld [wcf0a],a + ld a,1 + ld [wBoughtOrSoldItemInMart],a .skipSettingFlag2 - ld a,(SFX_02_5a - SFX_Headers_02) / 3 + ld a,SFX_PURCHASE call PlaySoundWaitForCurrent call WaitForSoundToFinish ld hl,PokemartBoughtItemText @@ -182,13 +200,13 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) call LoadScreenTilesFromBuffer1 ld a,MONEY_BOX ld [wTextBoxID],a - call DisplayTextBoxID ; draw money text box + call DisplayTextBoxID ld hl,PokemartAnythingElseText call PrintText jp .loop .isThereEnoughMoney ld de,wPlayerMoney - ld hl,$ff9f ; item price + ld hl,hMoney ld c,3 ; length of money in bytes jp StringCmp .notEnoughMoney @@ -202,53 +220,53 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) .done ld hl,PokemartThankYouText call PrintText - ld a,$01 + ld a,1 ld [wUpdateSpritesEnabled],a - call UpdateSprites ; move sprites - ld a,[wd07e] + call UpdateSprites + ld a,[wSavedListScrollOffset] ld [wListScrollOffset],a ret -PokemartBuyingGreetingText: ; 6e0c (1:6e0c) +PokemartBuyingGreetingText: TX_FAR _PokemartBuyingGreetingText db "@" -PokemartTellBuyPriceText: ; 6e11 (1:6e11) +PokemartTellBuyPriceText: TX_FAR _PokemartTellBuyPriceText db "@" -PokemartBoughtItemText: ; 6e16 (1:6e16) +PokemartBoughtItemText: TX_FAR _PokemartBoughtItemText db "@" -PokemartNotEnoughMoneyText: ; 6e1b (1:6e1b) +PokemartNotEnoughMoneyText: TX_FAR _PokemartNotEnoughMoneyText db "@" -PokemartItemBagFullText: ; 6e20 (1:6e20) +PokemartItemBagFullText: TX_FAR _PokemartItemBagFullText db "@" -PokemonSellingGreetingText: ; 6e25 (1:6e25) +PokemonSellingGreetingText: TX_FAR _PokemonSellingGreetingText db "@" -PokemartTellSellPriceText: ; 6e2a (1:6e2a) +PokemartTellSellPriceText: TX_FAR _PokemartTellSellPriceText db "@" -PokemartItemBagEmptyText: ; 6e2f (1:6e2f) +PokemartItemBagEmptyText: TX_FAR _PokemartItemBagEmptyText db "@" -PokemartUnsellableItemText: ; 6e34 (1:6e34) +PokemartUnsellableItemText: TX_FAR _PokemartUnsellableItemText db "@" -PokemartThankYouText: ; 6e39 (1:6e39) +PokemartThankYouText: TX_FAR _PokemartThankYouText db "@" -PokemartAnythingElseText: ; 6e3e (1:6e3e) +PokemartAnythingElseText: TX_FAR _PokemartAnythingElseText db "@" diff --git a/engine/overworld/push_boulder.asm b/engine/overworld/push_boulder.asm new file mode 100644 index 00000000..c91605a8 --- /dev/null +++ b/engine/overworld/push_boulder.asm @@ -0,0 +1,105 @@ +TryPushingBoulder: + ld a, [wd728] + bit 0, a ; using Strength? + ret z + ld a, [wFlags_0xcd60] + bit 1, a ; has boulder dust animation from previous push played yet? + ret nz + xor a + ld [hSpriteIndexOrTextID], a + call IsSpriteInFrontOfPlayer + ld a, [hSpriteIndexOrTextID] + ld [wBoulderSpriteIndex], a + and a + jp z, ResetBoulderPushFlags + ld hl, wSpriteStateData1 + 1 + ld d, $0 + ld a, [hSpriteIndexOrTextID] + swap a + ld e, a + add hl, de + res 7, [hl] + call GetSpriteMovementByte2Pointer + ld a, [hl] + cp BOULDER_MOVEMENT_BYTE_2 + jp nz, ResetBoulderPushFlags + ld hl, wFlags_0xcd60 + bit 6, [hl] + set 6, [hl] ; indicate that the player has tried pushing + ret z ; the player must try pushing twice before the boulder will move + ld a, [hJoyHeld] + and D_RIGHT | D_LEFT | D_UP | D_DOWN + ret z + predef CheckForCollisionWhenPushingBoulder + ld a, [wTileInFrontOfBoulderAndBoulderCollisionResult] + and a ; was there a collision? + jp nz, ResetBoulderPushFlags + ld a, [hJoyHeld] + ld b, a + ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + cp SPRITE_FACING_UP + jr z, .pushBoulderUp + cp SPRITE_FACING_LEFT + jr z, .pushBoulderLeft + cp SPRITE_FACING_RIGHT + jr z, .pushBoulderRight +.pushBoulderDown + bit 7, b + ret z + ld de, PushBoulderDownMovementData + jr .done +.pushBoulderUp + bit 6, b + ret z + ld de, PushBoulderUpMovementData + jr .done +.pushBoulderLeft + bit 5, b + ret z + ld de, PushBoulderLeftMovementData + jr .done +.pushBoulderRight + bit 4, b + ret z + ld de, PushBoulderRightMovementData +.done + call MoveSprite + ld a, SFX_PUSH_BOULDER + call PlaySound + ld hl, wFlags_0xcd60 + set 1, [hl] + ret + +PushBoulderUpMovementData: + db NPC_MOVEMENT_UP,$FF + +PushBoulderDownMovementData: + db NPC_MOVEMENT_DOWN,$FF + +PushBoulderLeftMovementData: + db NPC_MOVEMENT_LEFT,$FF + +PushBoulderRightMovementData: + db NPC_MOVEMENT_RIGHT,$FF + +DoBoulderDustAnimation: + ld a, [wd730] + bit 0, a + ret nz + callab AnimateBoulderDust + call DiscardButtonPresses + ld [wJoyIgnore], a + call ResetBoulderPushFlags + set 7, [hl] + ld a, [wBoulderSpriteIndex] + ld [H_SPRITEINDEX], a + call GetSpriteMovementByte2Pointer + ld [hl], $10 + ld a, SFX_CUT + jp PlaySound + +ResetBoulderPushFlags: + ld hl, wFlags_0xcd60 + res 1, [hl] + res 6, [hl] + ret diff --git a/engine/overworld/saffron_guards.asm b/engine/overworld/saffron_guards.asm index 8e584a2d..3b26b6f8 100755 --- a/engine/overworld/saffron_guards.asm +++ b/engine/overworld/saffron_guards.asm @@ -1,4 +1,4 @@ -RemoveGuardDrink: ; 5a59f (16:659f) +RemoveGuardDrink: ld hl, GuardDrinksList .drinkLoop ld a, [hli] @@ -10,9 +10,7 @@ RemoveGuardDrink: ; 5a59f (16:659f) call IsItemInBag pop hl jr z, .drinkLoop - ld b, BANK(RemoveItemByID) - ld hl, RemoveItemByID - jp Bankswitch + jpba RemoveItemByID -GuardDrinksList: ; 5a5b7 (16:65b7) +GuardDrinksList: db FRESH_WATER, SODA_POP, LEMONADE, $00 diff --git a/engine/overworld/set_blackout_map.asm b/engine/overworld/set_blackout_map.asm new file mode 100644 index 00000000..9bfe82bd --- /dev/null +++ b/engine/overworld/set_blackout_map.asm @@ -0,0 +1,29 @@ +SetLastBlackoutMap: +; Set the map to return to when +; blacking out or using Teleport or Dig. +; Safari rest houses don't count. + + push hl + ld hl, SafariZoneRestHouses + ld a, [wCurMap] + ld b, a +.loop + ld a, [hli] + cp -1 + jr z, .notresthouse + cp b + jr nz, .loop + jr .done + +.notresthouse + ld a, [wLastMap] + ld [wLastBlackoutMap], a +.done + pop hl + ret + +SafariZoneRestHouses: + db SAFARI_ZONE_REST_HOUSE_2 + db SAFARI_ZONE_REST_HOUSE_3 + db SAFARI_ZONE_REST_HOUSE_4 + db -1 diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm index f1a8ecf9..712c53ed 100755 --- a/engine/overworld/ssanne.asm +++ b/engine/overworld/ssanne.asm @@ -1,6 +1,6 @@ -AnimateBoulderDust: ; 79f54 (1e:5f54) +AnimateBoulderDust: ld a, $1 - ld [wcd50], a ; select the boulder dust offsets + ld [wWhichAnimationOffsets], a ; select the boulder dust offsets ld a, [wUpdateSpritesEnabled] push af ld a, $ff @@ -8,14 +8,14 @@ AnimateBoulderDust: ; 79f54 (1e:5f54) ld a, %11100100 ld [rOBP1], a call LoadSmokeTileFourTimes - callba WriteCutTreeBoulderDustAnimationOAMBlock + callba WriteCutOrBoulderDustAnimationOAMBlock ld c, 8 ; number of steps in animation .loop push bc call GetMoveBoulderDustFunctionPointer ld bc, .returnAddress push bc - ld c, $4 + ld c, 4 jp [hl] .returnAddress ld a, [rOBP1] @@ -29,14 +29,14 @@ AnimateBoulderDust: ; 79f54 (1e:5f54) ld [wUpdateSpritesEnabled], a jp LoadPlayerSpriteGraphics -GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92) +GetMoveBoulderDustFunctionPointer: ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction ld hl, MoveBoulderDustFunctionPointerTable ld c, a ld b, $0 add hl, bc ld a, [hli] - ld [wd08a], a + ld [wCoordAdjustmentAmount], a ld a, [hli] ld e, a ld a, [hli] @@ -51,7 +51,7 @@ GetMoveBoulderDustFunctionPointer: ; 79f92 (1e:5f92) pop hl ret -MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0) +MoveBoulderDustFunctionPointerTable: ; facing down db $FF,$00 dw AdjustOAMBlockYPos @@ -68,7 +68,7 @@ MoveBoulderDustFunctionPointerTable: ; 79fb0 (1e:5fb0) db $FF,$01 dw AdjustOAMBlockXPos -LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0) +LoadSmokeTileFourTimes: ld hl, vChars1 + $7c0 ld c, $4 .loop @@ -83,10 +83,11 @@ LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0) jr nz, .loop ret -LoadSmokeTile: ; 79fd4 (1e:5fd4) - ld de, SSAnneSmokePuffTile ; $5fdd - ld bc, (BANK(SSAnneSmokePuffTile) << 8) + $01 +LoadSmokeTile: + ld de, SSAnneSmokePuffTile + lb bc, BANK(SSAnneSmokePuffTile), (SSAnneSmokePuffTileEnd - SSAnneSmokePuffTile) / $10 jp CopyVideoData -SSAnneSmokePuffTile: ; 79fdd (1e:5fdd) +SSAnneSmokePuffTile: INCBIN "gfx/ss_anne_smoke_puff.2bpp" +SSAnneSmokePuffTileEnd: diff --git a/engine/overworld/tileset_header.asm b/engine/overworld/tileset_header.asm new file mode 100644 index 00000000..6e33974f --- /dev/null +++ b/engine/overworld/tileset_header.asm @@ -0,0 +1,60 @@ +LoadTilesetHeader: + call GetPredefRegisters + push hl + ld d, 0 + ld a, [wCurMapTileset] + add a + add a + ld b, a + add a + add b ; a = tileset * 12 + jr nc, .noCarry + inc d +.noCarry + ld e, a + ld hl, Tilesets + add hl, de + ld de, wTilesetBank + ld c, $b +.copyTilesetHeaderLoop + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .copyTilesetHeaderLoop + ld a, [hl] + ld [hTilesetType], a + xor a + ld [$ffd8], a + pop hl + ld a, [wCurMapTileset] + push hl + push de + ld hl, DungeonTilesets + ld de, $1 + call IsInArray + pop de + pop hl + jr c, .asm_c797 + ld a, [wCurMapTileset] + ld b, a + ld a, [hPreviousTileset] + cp b + jr z, .done +.asm_c797 + ld a, [wDestinationWarpID] + cp $ff + jr z, .done + call LoadDestinationWarpPosition + ld a, [wYCoord] + and $1 + ld [wYBlockCoord], a + ld a, [wXCoord] + and $1 + ld [wXBlockCoord], a +.done + ret + +INCLUDE "data/dungeon_tilesets.asm" + +INCLUDE "data/tileset_headers.asm" diff --git a/engine/overworld/trainers.asm b/engine/overworld/trainers.asm index 4aaab3ed..655c6b2a 100755 --- a/engine/overworld/trainers.asm +++ b/engine/overworld/trainers.asm @@ -1,42 +1,42 @@ -_GetSpritePosition1: ; 567f9 (15:67f9) +_GetSpritePosition1: ld hl, wSpriteStateData1 ld de, $4 ld a, [wSpriteIndex] ld [H_SPRITEINDEX], a call GetSpriteDataPointer - ld a, [hli] + ld a, [hli] ; c1x4 (screen Y pos) ld [$ffeb], a inc hl - ld a, [hl] + ld a, [hl] ; c1x6 (screen X pos) ld [$ffec], a - ld de, $fe + ld de, (wSpriteStateData2 + $4) - (wSpriteStateData1 + $6) add hl, de - ld a, [hli] + ld a, [hli] ; c2x4 (map Y pos) ld [$ffed], a - ld a, [hl] + ld a, [hl] ; c2x5 (map X pos) ld [$ffee], a ret -_GetSpritePosition2: ; 56819 (15:6819) +_GetSpritePosition2: ld hl, wSpriteStateData1 ld de, $4 ld a, [wSpriteIndex] ld [H_SPRITEINDEX], a call GetSpriteDataPointer ld a, [hli] ; c1x4 (screen Y pos) - ld [wd130], a + ld [wSavedSpriteScreenY], a inc hl ld a, [hl] ; c1x6 (screen X pos) - ld [wd131], a - ld de, $104 - $6 + ld [wSavedSpriteScreenX], a + ld de, (wSpriteStateData2 + $4) - (wSpriteStateData1 + $6) add hl, de ld a, [hli] ; c2x4 (map Y pos) - ld [wd132], a + ld [wSavedSpriteMapY], a ld a, [hl] ; c2x5 (map X pos) - ld [wd133], a + ld [wSavedSpriteMapX], a ret -_SetSpritePosition1: ; 5683d (15:683d) +_SetSpritePosition1: ld hl, wSpriteStateData1 ld de, $4 ld a, [wSpriteIndex] @@ -47,7 +47,7 @@ _SetSpritePosition1: ; 5683d (15:683d) inc hl ld a, [$ffec] ; c1x6 (screen X pos) ld [hl], a - ld de, $104 - $6 + ld de, (wSpriteStateData2 + $4) - (wSpriteStateData1 + $6) add hl, de ld a, [$ffed] ; c2x4 (map Y pos) ld [hli], a @@ -55,36 +55,36 @@ _SetSpritePosition1: ; 5683d (15:683d) ld [hl], a ret -_SetSpritePosition2: ; 5685d (15:685d) +_SetSpritePosition2: ld hl, wSpriteStateData1 - ld de, $0004 + ld de, 4 ld a, [wSpriteIndex] ld [H_SPRITEINDEX], a call GetSpriteDataPointer - ld a, [wd130] - ld [hli], a + ld a, [wSavedSpriteScreenY] + ld [hli], a ; c1x4 (screen Y pos) inc hl - ld a, [wd131] - ld [hl], a - ld de, $00fe + ld a, [wSavedSpriteScreenX] + ld [hl], a ; c1x6 (screen X pos) + ld de, (wSpriteStateData2 + $4) - (wSpriteStateData1 + $6) add hl, de - ld a, [wd132] - ld [hli], a - ld a, [wd133] - ld [hl], a + ld a, [wSavedSpriteMapY] + ld [hli], a ; c2x4 (map Y pos) + ld a, [wSavedSpriteMapX] + ld [hl], a ; c2x5 (map X pos) ret -TrainerWalkUpToPlayer: ; 56881 (15:6881) +TrainerWalkUpToPlayer: ld a, [wSpriteIndex] swap a - ld [wTrainerSpriteOffset], a ; wWhichTrade + ld [wTrainerSpriteOffset], a call ReadTrainerScreenPosition ld a, [wTrainerFacingDirection] - and a + and a ; SPRITE_FACING_DOWN jr z, .facingDown - cp $4 + cp SPRITE_FACING_UP jr z, .facingUp - cp $8 + cp SPRITE_FACING_LEFT jr z, .facingLeft jr .facingRight .facingDown @@ -148,8 +148,8 @@ TrainerWalkUpToPlayer: ; 56881 (15:6881) jp MoveSprite_ ; input: de = offset within sprite entry -; output: de = pointer to sprite data -GetSpriteDataPointer: ; 56903 (15:6903) +; output: hl = pointer to sprite data +GetSpriteDataPointer: push de add hl, de ld a, [H_SPRITEINDEX] @@ -161,10 +161,10 @@ GetSpriteDataPointer: ; 56903 (15:6903) ret ; tests if this trainer is in the right position to engage the player and do so if she is. -TrainerEngage: ; 5690f (15:690f) +TrainerEngage: 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,57 +218,57 @@ 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 set 0, [hl] call EngageMapTrainer ld a, $ff -.noEngage: ; 56988 (15:6988) - ld [wTrainerSpriteOffset], a ; wWhichTrade +.noEngage + 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 +ReadTrainerScreenPosition: + ld a, [wTrainerSpriteOffset] add $4 ld d, $0 ld e, a ld hl, wSpriteStateData1 add hl, de - ld a, [hl] + ld a, [hl] ; c1x4 (sprite Y pos) ld [wTrainerScreenY], a - ld a, [wTrainerSpriteOffset] ; wWhichTrade + ld a, [wTrainerSpriteOffset] add $6 ld d, $0 ld e, a ld hl, wSpriteStateData1 add hl, de - ld a, [hl] + ld a, [hl] ; c1x6 (sprite X pos) ld [wTrainerScreenX], a ret ; checks if the sprite is properly lined up with the player with respect to the direction it's looking. Also checks the distance between player and sprite ; note that this does not necessarily mean the sprite is seeing the player, he could be behind it's back ; a: distance player to sprite -CheckSpriteCanSeePlayer: ; 569af (15:69af) +CheckSpriteCanSeePlayer: ld b, a - ld a, [wTrainerEngageDistance] ; sprite line of sight (engage distance) + ld a, [wTrainerEngageDistance] ; how far the trainer can see cp b jr nc, .checkIfLinedUp jr .notInLine ; player too far away .checkIfLinedUp ld a, [wTrainerFacingDirection] ; sprite facing direction - cp $0 ; down + cp SPRITE_FACING_DOWN jr z, .checkXCoord - cp $4 ; up + cp SPRITE_FACING_UP jr z, .checkXCoord - cp $8 ; left + cp SPRITE_FACING_LEFT jr z, .checkYCoord - cp $c ; right + cp SPRITE_FACING_RIGHT jr z, .checkYCoord jr .notInLine .checkXCoord @@ -290,11 +290,11 @@ CheckSpriteCanSeePlayer: ; 569af (15:69af) ret ; tests if the player is in front of the sprite (rather than behind it) -CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3) - ld a, [W_CURMAP] ; W_CURMAP +CheckPlayerIsInFrontOfSprite: + ld a, [wCurMap] 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 @@ -315,21 +315,21 @@ CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3) ld a, [hl] ; c1x6 (sprite screen X pos) ld [wTrainerScreenX], a ld a, [wTrainerFacingDirection] ; facing direction - cp $0 + cp SPRITE_FACING_DOWN jr nz, .notFacingDown ld a, [wTrainerScreenY] ; sprite screen Y pos cp $3c jr c, .engage ; sprite above player jr .noEngage ; sprite below player .notFacingDown - cp $4 + cp SPRITE_FACING_UP jr nz, .notFacingUp ld a, [wTrainerScreenY] ; sprite screen Y pos cp $3c jr nc, .engage ; sprite below player jr .noEngage ; sprite above player .notFacingUp - cp $8 + cp SPRITE_FACING_LEFT jr nz, .notFacingLeft ld a, [wTrainerScreenX] ; sprite screen X pos cp $40 @@ -345,5 +345,5 @@ CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3) .noEngage xor a .done - ld [wTrainerSpriteOffset], a ; wWhichTrade + ld [wTrainerSpriteOffset], a ret diff --git a/engine/overworld/update_map.asm b/engine/overworld/update_map.asm new file mode 100644 index 00000000..8577b9e7 --- /dev/null +++ b/engine/overworld/update_map.asm @@ -0,0 +1,126 @@ +; replaces a tile block with the one specified in [wNewTileBlockID] +; and redraws the map view if necessary +; b = Y +; c = X +ReplaceTileBlock: + call GetPredefRegisters + ld hl, wOverworldMap + ld a, [wCurMapWidth] + add $6 + ld e, a + ld d, $0 + add hl, de + add hl, de + add hl, de + ld e, $3 + add hl, de + ld e, a + ld a, b + and a + jr z, .addX +; add width * Y +.addWidthYTimesLoop + add hl, de + dec b + jr nz, .addWidthYTimesLoop +.addX + add hl, bc ; add X + ld a, [wNewTileBlockID] + ld [hl], a + ld a, [wCurrentTileBlockMapViewPointer] + ld c, a + ld a, [wCurrentTileBlockMapViewPointer + 1] + ld b, a + call CompareHLWithBC + ret c ; return if the replaced tile block is below the map view in memory + push hl + ld l, e + ld h, $0 + ld e, $6 + ld d, h + add hl, hl + add hl, hl + add hl, de + add hl, bc + pop bc + call CompareHLWithBC + ret c ; return if the replaced tile block is above the map view in memory + +RedrawMapView: + ld a, [wIsInBattle] + inc a + ret z + ld a, [H_AUTOBGTRANSFERENABLED] + push af + ld a, [hTilesetType] + push af + xor a + ld [H_AUTOBGTRANSFERENABLED], a + ld [hTilesetType], a ; no flower/water BG tile animations + call LoadCurrentMapView + call RunDefaultPaletteCommand + ld hl, wMapViewVRAMPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld de, -2 * 32 + add hl, de + ld a, h + and $3 + or $98 + ld a, l + ld [wBuffer], a + ld a, h + ld [wBuffer + 1], a ; this copy of the address is not used + ld a, 2 + ld [$ffbe], a + ld c, 9 ; number of rows of 2x2 tiles (this covers the whole screen) +.redrawRowLoop + push bc + push hl + push hl + ld hl, wTileMap - 2 * SCREEN_WIDTH + ld de, SCREEN_WIDTH + ld a, [$ffbe] +.calcWRAMAddrLoop + add hl, de + dec a + jr nz, .calcWRAMAddrLoop + call CopyToRedrawRowOrColumnSrcTiles + pop hl + ld de, $20 + ld a, [$ffbe] + ld c, a +.calcVRAMAddrLoop + add hl, de + ld a, h + and $3 + or $98 + dec c + jr nz, .calcVRAMAddrLoop + ld [hRedrawRowOrColumnDest + 1], a + ld a, l + ld [hRedrawRowOrColumnDest], a + ld a, REDRAW_ROW + ld [hRedrawRowOrColumnMode], a + call DelayFrame + ld hl, $ffbe + inc [hl] + inc [hl] + pop hl + pop bc + dec c + jr nz, .redrawRowLoop + pop af + ld [hTilesetType], a + pop af + ld [H_AUTOBGTRANSFERENABLED], a + ret + +CompareHLWithBC: + ld a, h + sub b + ret nz + ld a, l + sub c + ret diff --git a/engine/overworld/wild_mons.asm b/engine/overworld/wild_mons.asm new file mode 100644 index 00000000..6444ab7e --- /dev/null +++ b/engine/overworld/wild_mons.asm @@ -0,0 +1,33 @@ +LoadWildData: + ld hl,WildDataPointers + ld a,[wCurMap] + + ; get wild data for current map + ld c,a + ld b,0 + add hl,bc + add hl,bc + ld a,[hli] + ld h,[hl] + ld l,a ; hl now points to wild data for current map + ld a,[hli] + ld [wGrassRate],a + and a + jr z,.NoGrassData ; if no grass data, skip to surfing data + push hl + ld de,wGrassMons ; otherwise, load grass data + ld bc,$0014 + call CopyData + pop hl + ld bc,$0014 + add hl,bc +.NoGrassData + ld a,[hli] + ld [wWaterRate],a + and a + ret z ; if no water data, we're done + ld de,wWaterMons ; otherwise, load surfing data + ld bc,$0014 + jp CopyData + +INCLUDE "data/wild_mons.asm" diff --git a/engine/palettes.asm b/engine/palettes.asm index ed06cf4e..4785ade2 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -1,49 +1,49 @@ -Func_71ddf: ; 71ddf (1c:5ddf) +_RunPaletteCommand: call GetPredefRegisters ld a, b cp $ff - jr nz, .asm_71dea - ld a, [wcf1c] -.asm_71dea - cp $fc - jp z, Func_71fc2 + jr nz, .next + ld a, [wDefaultPaletteCommand] ; use default command if command ID is $ff +.next + cp UPDATE_PARTY_MENU_BLK_PACKET + jp z, UpdatePartyMenuBlkPacket ld l, a - ld h, $0 + ld h, 0 add hl, hl - ld de, PointerTable_71f73 + ld de, SetPalFunctions add hl, de ld a, [hli] ld h, [hl] ld l, a - ld de, Func_72156 + ld de, SendSGBPackets push de jp [hl] -SendPalPacket_Black: ; 71dff (1c:5dff) +SetPal_BattleBlack: ld hl, PalPacket_Black ld de, BlkPacket_Battle ret ; uses PalPacket_Empty to build a packet based on mon IDs and health color -BuildBattlePalPacket: ; 71e06 (1c:5e06) +SetPal_Battle: ld hl, PalPacket_Empty - ld de, wcf2d + ld de, wPalPacket ld bc, $10 call CopyData - ld a, [W_PLAYERBATTSTATUS3] + ld a, [wPlayerBattleStatus3] ld hl, wBattleMonSpecies call DeterminePaletteID ld b, a - ld a, [W_ENEMYBATTSTATUS3] + ld a, [wEnemyBattleStatus3] ld hl, wEnemyMonSpecies2 call DeterminePaletteID ld c, a - ld hl, wcf2e - ld a, [wcf1d] + ld hl, wPalPacket + 1 + ld a, [wPlayerHPBarColor] add PAL_GREENBAR ld [hli], a inc hl - ld a, [wcf1e] + ld a, [wEnemyHPBarColor] add PAL_GREENBAR ld [hli], a inc hl @@ -52,21 +52,21 @@ BuildBattlePalPacket: ; 71e06 (1c:5e06) inc hl ld a, c ld [hl], a - ld hl, wcf2d + ld hl, wPalPacket ld de, BlkPacket_Battle - ld a, $1 - ld [wcf1c], a + ld a, SET_PAL_BATTLE + ld [wDefaultPaletteCommand], a ret -SendPalPacket_TownMap: ; 71e48 (1c:5e48) +SetPal_TownMap: ld hl, PalPacket_TownMap ld de, BlkPacket_WholeScreen ret ; uses PalPacket_Empty to build a packet based the mon ID -BuildStatusScreenPalPacket: ; 71e4f (1c:5e4f) +SetPal_StatusScreen: ld hl, PalPacket_Empty - ld de, wcf2d + ld de, wPalPacket ld bc, $10 call CopyData ld a, [wcf91] @@ -76,75 +76,75 @@ BuildStatusScreenPalPacket: ; 71e4f (1c:5e4f) .pokemon call DeterminePaletteIDOutOfBattle push af - ld hl, wcf2e - ld a, [wcf25] - add $1f + ld hl, wPalPacket + 1 + ld a, [wStatusScreenHPBarColor] + add PAL_GREENBAR ld [hli], a inc hl pop af ld [hl], a - ld hl, wcf2d + ld hl, wPalPacket ld de, BlkPacket_StatusScreen ret -SendPalPacket_PartyMenu: ; 71e7b (1c:5e7b) +SetPal_PartyMenu: ld hl, PalPacket_PartyMenu - ld de, wcf2e + ld de, wPartyMenuBlkPacket ret -SendPalPacket_Pokedex: ; 71e82 (1c:5e82) +SetPal_Pokedex: ld hl, PalPacket_Pokedex - ld de, wcf2d + ld de, wPalPacket ld bc, $10 call CopyData ld a, [wcf91] call DeterminePaletteIDOutOfBattle - ld hl, wcf30 + ld hl, wPalPacket + 3 ld [hl], a - ld hl, wcf2d + ld hl, wPalPacket ld de, BlkPacket_Pokedex ret -SendPalPacket_Slots: ; 71e9f (1c:5e9f) +SetPal_Slots: ld hl, PalPacket_Slots ld de, BlkPacket_Slots ret -SendPalPacket_Titlescreen: ; 71ea6 (1c:5ea6) +SetPal_TitleScreen: ld hl, PalPacket_Titlescreen ld de, BlkPacket_Titlescreen ret ; used mostly for menus and the Oak intro -SendPalPacket_Generic: ; 71ead (1c:5ead) +SetPal_Generic: ld hl, PalPacket_Generic ld de, BlkPacket_WholeScreen ret -SendPalPacket_NidorinoIntro: ; 71eb4 (1c:5eb4) +SetPal_NidorinoIntro: ld hl, PalPacket_NidorinoIntro ld de, BlkPacket_NidorinoIntro ret -SendPalPacket_GameFreakIntro: ; 71ebb (1c:5ebb) +SetPal_GameFreakIntro: ld hl, PalPacket_GameFreakIntro ld de, BlkPacket_GameFreakIntro - ld a, $8 - ld [wcf1c], a + ld a, SET_PAL_GENERIC + ld [wDefaultPaletteCommand], a ret ; uses PalPacket_Empty to build a packet based on the current map -BuildOverworldPalPacket: ; 71ec7 (1c:5ec7) +SetPal_Overworld: ld hl, PalPacket_Empty - ld de, wcf2d + ld de, wPalPacket ld bc, $10 call CopyData - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] cp CEMETERY jr z, .PokemonTowerOrAgatha cp CAVERN jr z, .caveOrBruno - ld a, [W_CURMAP] + ld a, [wCurMap] cp REDS_HOUSE_1F jr c, .townOrRoute cp UNKNOWN_DUNGEON_2 @@ -162,12 +162,12 @@ BuildOverworldPalPacket: ; 71ec7 (1c:5ec7) jr c, .town ld a, PAL_ROUTE - 1 .town - inc a ; a town's pallete ID is its map ID + 1 - ld hl, wcf2e + inc a ; a town's palette ID is its map ID + 1 + ld hl, wPalPacket + 1 ld [hld], a ld de, BlkPacket_WholeScreen - ld a, $9 - ld [wcf1c], a + ld a, SET_PAL_OVERWORLD + ld [wDefaultPaletteCommand], a ret .PokemonTowerOrAgatha ld a, PAL_GREYMON - 1 @@ -181,137 +181,149 @@ BuildOverworldPalPacket: ; 71ec7 (1c:5ec7) ; used when a Pokemon is the only thing on the screen ; such as evolution, trading and the Hall of Fame -SendPokemonPalette_WholeScreen: ; 71f17 (1c:5f17) +SetPal_PokemonWholeScreen: push bc ld hl, PalPacket_Empty - ld de, wcf2d + ld de, wPalPacket ld bc, $10 call CopyData pop bc ld a, c and a - ld a, $1e - jr nz, .asm_71f31 - ld a, [wcf1d] + ld a, PAL_BLACK + jr nz, .next + ld a, [wWholeScreenPaletteMonSpecies] call DeterminePaletteIDOutOfBattle -.asm_71f31 - ld [wcf2e], a - ld hl, wcf2d +.next + ld [wPalPacket + 1], a + ld hl, wPalPacket ld de, BlkPacket_WholeScreen ret -BuildTrainerCardPalPacket: ; 71f3b (1c:5f3b) +SetPal_TrainerCard: ld hl, BlkPacket_TrainerCard - ld de, wcc5b + ld de, wTrainerCardBlkPacket ld bc, $40 call CopyData - ld de, LoopCounts_71f8f - ld hl, wcc5d - ld a, [W_OBTAINEDBADGES] - ld c, $8 -.asm_71f52 + ld de, BadgeBlkDataLengths + ld hl, wTrainerCardBlkPacket + 2 + ld a, [wObtainedBadges] + ld c, 8 +.badgeLoop srl a push af - jr c, .asm_71f62 + jr c, .haveBadge +; The player doens't have the badge, so zero the badge's blk data. push bc ld a, [de] ld c, a xor a -.asm_71f5b +.zeroBadgeDataLoop ld [hli], a dec c - jr nz, .asm_71f5b + jr nz, .zeroBadgeDataLoop pop bc - jr .asm_71f67 -.asm_71f62 + jr .nextBadge +.haveBadge +; The player does have the badge, so skip past the badge's blk data. ld a, [de] -.asm_71f63 +.skipBadgeDataLoop inc hl dec a - jr nz, .asm_71f63 -.asm_71f67 + jr nz, .skipBadgeDataLoop +.nextBadge pop af inc de dec c - jr nz, .asm_71f52 + jr nz, .badgeLoop ld hl, PalPacket_TrainerCard - ld de, wcc5b + ld de, wTrainerCardBlkPacket ret -PointerTable_71f73: ; 71f73 (1c:5f73) - dw SendPalPacket_Black - dw BuildBattlePalPacket - dw SendPalPacket_TownMap - dw BuildStatusScreenPalPacket - dw SendPalPacket_Pokedex - dw SendPalPacket_Slots - dw SendPalPacket_Titlescreen - dw SendPalPacket_NidorinoIntro - dw SendPalPacket_Generic - dw BuildOverworldPalPacket - dw SendPalPacket_PartyMenu - dw SendPokemonPalette_WholeScreen - dw SendPalPacket_GameFreakIntro - dw BuildTrainerCardPalPacket - -; each byte is the number of loops to make in .asm_71f5b for each badge -LoopCounts_71f8f: ; 71f8f (1c:5f8f) - db $06,$06,$06,$12,$06,$06,$06,$06 - -DeterminePaletteID: ; 71f97 (1c:5f97) - bit 3, a ; bit 3 of battle status 3, set if current Pokemon is transformed - ld a, PAL_GREYMON ; if yes, use Ditto's palette +SetPalFunctions: + dw SetPal_BattleBlack + dw SetPal_Battle + dw SetPal_TownMap + dw SetPal_StatusScreen + dw SetPal_Pokedex + dw SetPal_Slots + dw SetPal_TitleScreen + dw SetPal_NidorinoIntro + dw SetPal_Generic + dw SetPal_Overworld + dw SetPal_PartyMenu + dw SetPal_PokemonWholeScreen + dw SetPal_GameFreakIntro + dw SetPal_TrainerCard + +; The length of the blk data of each badge on the Trainer Card. +; The Rainbow Badge has 3 entries because of its many colors. +BadgeBlkDataLengths: + db 6 ; Boulder Badge + db 6 ; Cascade Badge + db 6 ; Thunder Badge + db 6 * 3 ; Rainbow Badge + db 6 ; Soul Badge + db 6 ; Marsh Badge + db 6 ; Volcano Badge + db 6 ; Earth Badge + +DeterminePaletteID: + bit Transformed, a ; a is battle status 3 + ld a, PAL_GREYMON ; if the mon has used Transform, use Ditto's palette ret nz ld a, [hl] -DeterminePaletteIDOutOfBattle: ; 71f9d (1c:5f9d) +DeterminePaletteIDOutOfBattle: ld [wd11e], a - and a - jr z, .idZero + and a ; is the mon index 0? + jr z, .skipDexNumConversion push bc - predef IndexToPokedex ; turn Pokemon ID number into Pokedex number + predef IndexToPokedex pop bc ld a, [wd11e] -.idZero +.skipDexNumConversion ld e, a - ld d, $00 - ld hl, MonsterPalettes ; not just for Pokemon, Trainers use it too + ld d, 0 + ld hl, MonsterPalettes ; not just for Pokemon, Trainers use it too add hl, de ld a, [hl] ret -SendBlkPacket_PartyMenu: ; 71fb6 (1c:5fb6) - ld hl, BlkPacket_PartyMenu ; $62f4 - ld de, wcf2e +InitPartyMenuBlkPacket: + ld hl, BlkPacket_PartyMenu + ld de, wPartyMenuBlkPacket ld bc, $30 jp CopyData -Func_71fc2: ; 71fc2 (1c:5fc2) - ld hl, wcf1f - ld a, [wcf2d] +UpdatePartyMenuBlkPacket: +; Update the blk packet with the palette of the HP bar that is +; specified in [wWhichPartyMenuHPBar]. + ld hl, wPartyMenuHPBarColors + ld a, [wWhichPartyMenuHPBar] ld e, a - ld d, $0 + ld d, 0 add hl, de ld e, l ld d, h ld a, [de] and a - ld e, $5 - jr z, .asm_71fdb + ld e, (1 << 2) | 1 ; green + jr z, .next dec a - ld e, $a - jr z, .asm_71fdb - ld e, $f -.asm_71fdb + ld e, (2 << 2) | 2 ; yellow + jr z, .next + ld e, (3 << 2) | 3 ; red +.next push de - ld hl, wcf37 - ld bc, $6 - ld a, [wcf2d] + ld hl, wPartyMenuBlkPacket + 8 + 1 + ld bc, 6 + ld a, [wWhichPartyMenuHPBar] call AddNTimes pop de ld [hl], e ret -SendSGBPacket: ; 71feb (1c:5feb) +SendSGBPacket: ;check number of packets ld a,[hl] and a,$07 @@ -321,17 +333,15 @@ SendSGBPacket: ; 71feb (1c:5feb) .loop2 ; save B for later use push bc -; load a non-zero value in $fff9 to disable the routine that checks actual -; joypad input (said routine, located at $15f, does nothing if $fff9 is not -; zero) - ld a,$01 - ld [$fff9],a +; disable ReadJoypad to prevent it from interfering with sending the packet + ld a, 1 + ld [hDisableJoypadPolling], a ; send RESET signal (P14=LOW, P15=LOW) xor a - ld [$ff00],a + ld [rJOYP],a ; set P14=HIGH, P15=HIGH ld a,$30 - ld [$ff00],a + ld [rJOYP],a ;load length of packets (16 bytes) ld b,$10 .nextByte @@ -348,10 +358,10 @@ SendSGBPacket: ; 71feb (1c:5feb) ; else (if 0th bit is zero) set P14=LOW,P15=HIGH (send bit 0) ld a,$20 .next0 - ld [$ff00],a + ld [rJOYP],a ; must set P14=HIGH,P15=HIGH between each "pulse" ld a,$30 - ld [$ff00],a + ld [rJOYP],a ; rotation will put next bit in 0th position (so we can always use command ; "bit 0,d" to fetch the bit that has to be sent) rr d @@ -362,12 +372,12 @@ SendSGBPacket: ; 71feb (1c:5feb) jr nz,.nextByte ; send bit 1 as a "stop bit" (end of parameter data) ld a,$20 - ld [$ff00],a + ld [rJOYP],a ; set P14=HIGH,P15=HIGH ld a,$30 - ld [$ff00],a + ld [rJOYP],a xor a - ld [$fff9],a + ld [hDisableJoypadPolling],a ; wait for about 70000 cycles call Wait7000 ; restore (previously pushed) number of packets @@ -378,44 +388,44 @@ SendSGBPacket: ; 71feb (1c:5feb) ; else send 16 more bytes jr .loop2 -LoadSGB: ; 7202b (1c:602b) +LoadSGB: xor a ld [wOnSGB], a call CheckSGB ret nc - ld a, $1 + ld a, 1 ld [wOnSGB], a ld a, [wGBC] and a - jr z, .asm_7203f + jr z, .notGBC ret -.asm_7203f +.notGBC di - call Func_72075 + call PrepareSuperNintendoVRAMTransfer ei - ld a, $1 - ld [wcf2d], a + ld a, 1 + ld [wCopyingSGBTileData], a ld de, ChrTrnPacket ld hl, SGBBorderGraphics - call Func_7210b + call CopyGfxToSuperNintendoVRAM xor a - ld [wcf2d], a + ld [wCopyingSGBTileData], a ld de, PctTrnPacket ld hl, BorderPalettes - call Func_7210b + call CopyGfxToSuperNintendoVRAM xor a - ld [wcf2d], a + ld [wCopyingSGBTileData], a ld de, PalTrnPacket ld hl, SuperPalettes - call Func_7210b + call CopyGfxToSuperNintendoVRAM call ClearVram ld hl, MaskEnCancelPacket jp SendSGBPacket -Func_72075: ; 72075 (1c:6075) - ld hl, PointerTable_72089 - ld c, $9 -.asm_7207a +PrepareSuperNintendoVRAMTransfer: + ld hl, .packetPointers + ld c, 9 +.loop push bc ld a, [hli] push hl @@ -426,10 +436,11 @@ Func_72075: ; 72075 (1c:6075) inc hl pop bc dec c - jr nz, .asm_7207a + jr nz, .loop ret -PointerTable_72089: ; 72089 (1c:6089) +.packetPointers +; Only the first packet is needed. dw MaskEnFreezePacket dw DataSnd_72548 dw DataSnd_72558 @@ -440,102 +451,103 @@ PointerTable_72089: ; 72089 (1c:6089) dw DataSnd_725a8 dw DataSnd_725b8 -CheckSGB: ; 7209b (1c:609b) +CheckSGB: +; Returns whether the game is running on an SGB in carry. ld hl, MltReq2Packet di call SendSGBPacket - ld a, $1 - ld [$fff9], a + ld a, 1 + ld [hDisableJoypadPolling], a ei call Wait7000 - ld a, [rJOYP] ; $ff0 + ld a, [rJOYP] and $3 cp $3 - jr nz, .asm_720fd + jr nz, .isSGB ld a, $20 - ld [rJOYP], a ; $ff0 - ld a, [rJOYP] ; $ff0 - ld a, [rJOYP] ; $ff0 + ld [rJOYP], a + ld a, [rJOYP] + ld a, [rJOYP] call Wait7000 call Wait7000 ld a, $30 - ld [rJOYP], a ; $ff0 + ld [rJOYP], a call Wait7000 call Wait7000 ld a, $10 - ld [rJOYP], a ; $ff0 - ld a, [rJOYP] ; $ff0 - ld a, [rJOYP] ; $ff0 - ld a, [rJOYP] ; $ff0 - ld a, [rJOYP] ; $ff0 - ld a, [rJOYP] ; $ff0 - ld a, [rJOYP] ; $ff0 + ld [rJOYP], a + ld a, [rJOYP] + ld a, [rJOYP] + ld a, [rJOYP] + ld a, [rJOYP] + ld a, [rJOYP] + ld a, [rJOYP] call Wait7000 call Wait7000 ld a, $30 - ld [rJOYP], a ; $ff0 - ld a, [rJOYP] ; $ff0 - ld a, [rJOYP] ; $ff0 - ld a, [rJOYP] ; $ff0 + ld [rJOYP], a + ld a, [rJOYP] + ld a, [rJOYP] + ld a, [rJOYP] call Wait7000 call Wait7000 - ld a, [rJOYP] ; $ff0 + ld a, [rJOYP] and $3 cp $3 - jr nz, .asm_720fd - call Func_72102 + jr nz, .isSGB + call SendMltReq1Packet and a ret -.asm_720fd - call Func_72102 +.isSGB + call SendMltReq1Packet scf ret -Func_72102: ; 72102 (1c:6102) +SendMltReq1Packet: ld hl, MltReq1Packet call SendSGBPacket jp Wait7000 -Func_7210b: ; 7210b (1c:610b) +CopyGfxToSuperNintendoVRAM: di push de call DisableLCD ld a, $e4 - ld [rBGP], a ; $ff47 + ld [rBGP], a ld de, vChars1 - ld a, [wcf2d] + ld a, [wCopyingSGBTileData] and a - jr z, .asm_72122 - call Func_72188 - jr .asm_72128 -.asm_72122 + jr z, .notCopyingTileData + call CopySGBBorderTiles + jr .next +.notCopyingTileData ld bc, $1000 call CopyData -.asm_72128 +.next ld hl, vBGMap0 ld de, $c ld a, $80 ld c, $d -.asm_72132 +.loop ld b, $14 -.asm_72134 +.innerLoop ld [hli], a inc a dec b - jr nz, .asm_72134 + jr nz, .innerLoop add hl, de dec c - jr nz, .asm_72132 + jr nz, .loop 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 -Wait7000: ; 7214a (1c:614a) +Wait7000: ; Each loop takes 9 cycles so this routine actually waits 63000 cycles. ld de, 7000 .loop @@ -548,27 +560,27 @@ Wait7000: ; 7214a (1c:614a) jr nz, .loop ret -Func_72156: ; 72156 (1c:6156) +SendSGBPackets: ld a, [wGBC] and a - jr z, .asm_72165 + jr z, .notGBC push de - call Func_7216d + call InitGBCPalettes pop hl - call Func_72187 + call EmptyFunc5 ret -.asm_72165 +.notGBC push de call SendSGBPacket pop hl jp SendSGBPacket -Func_7216d: ; 7216d (1c:616d) - ld a, $80 - ld [$ff68], a +InitGBCPalettes: + ld a, $80 ; index 0 with auto-increment + ld [rBGPI], a inc hl ld c, $20 -.asm_72174 +.loop ld a, [hli] inc hl add a @@ -576,37 +588,48 @@ Func_7216d: ; 7216d (1c:616d) add a ld de, SuperPalettes add e - jr nc, .asm_72180 + jr nc, .noCarry inc d -.asm_72180 +.noCarry ld a, [de] - ld [$ff69], a + ld [rBGPD], a dec c - jr nz, .asm_72174 + jr nz, .loop ret -Func_72187: ; 72187 (1c:6187) +EmptyFunc5: ret -Func_72188: ; 72188 (1c:6188) - ld b, $80 -.asm_7218a - ld c, $10 -.asm_7218c +CopySGBBorderTiles: +; SGB tile data is stored in a 4BPP planar format. +; Each tile is 32 bytes. The first 16 bytes contain bit planes 1 and 2, while +; the second 16 bytes contain bit planes 3 and 4. +; This function converts 2BPP planar data into this format by mapping +; 2BPP colors 0-3 to 4BPP colors 0-3. 4BPP colors 4-15 are not used. + ld b, 128 + +.tileLoop + +; Copy bit planes 1 and 2 of the tile data. + ld c, 16 +.copyLoop ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_7218c - ld c, $10 + jr nz, .copyLoop + +; Zero bit planes 3 and 4. + ld c, 16 xor a -.asm_72195 +.zeroLoop ld [de], a inc de dec c - jr nz, .asm_72195 + jr nz, .zeroLoop + dec b - jr nz, .asm_7218a + jr nz, .tileLoop ret INCLUDE "data/sgb_packets.asm" diff --git a/engine/pathfinding.asm b/engine/pathfinding.asm new file mode 100644 index 00000000..ba052d38 --- /dev/null +++ b/engine/pathfinding.asm @@ -0,0 +1,201 @@ +FindPathToPlayer: + xor a + ld hl, hFindPathNumSteps + ld [hli], a ; hFindPathNumSteps + ld [hli], a ; hFindPathFlags + ld [hli], a ; hFindPathYProgress + ld [hl], a ; hFindPathXProgress + ld hl, wNPCMovementDirections2 + ld de, $0 +.loop + ld a, [hFindPathYProgress] + ld b, a + ld a, [hNPCPlayerYDistance] ; Y distance in steps + call CalcDifference + ld d, a + and a + jr nz, .asm_f8da + ld a, [hFindPathFlags] + set 0, a ; current end of path matches the player's Y coordinate + ld [hFindPathFlags], a +.asm_f8da + ld a, [hFindPathXProgress] + ld b, a + ld a, [hNPCPlayerXDistance] ; X distance in steps + call CalcDifference + ld e, a + and a + jr nz, .asm_f8ec + ld a, [hFindPathFlags] + set 1, a ; current end of path matches the player's X coordinate + ld [hFindPathFlags], a +.asm_f8ec + ld a, [hFindPathFlags] + cp $3 ; has the end of the path reached the player's position? + jr z, .done +; Compare whether the X distance between the player and the current of the path +; is greater or if the Y distance is. Then, try to reduce whichever is greater. + ld a, e + cp d + jr c, .yDistanceGreater +; x distance is greater + ld a, [hNPCPlayerRelativePosFlags] + bit 1, a + jr nz, .playerIsLeftOfNPC + ld d, NPC_MOVEMENT_RIGHT + jr .next1 +.playerIsLeftOfNPC + ld d, NPC_MOVEMENT_LEFT +.next1 + ld a, [hFindPathXProgress] + add 1 + ld [hFindPathXProgress], a + jr .storeDirection +.yDistanceGreater + ld a, [hNPCPlayerRelativePosFlags] + bit 0, a + jr nz, .playerIsAboveNPC + ld d, NPC_MOVEMENT_DOWN + jr .next2 +.playerIsAboveNPC + ld d, NPC_MOVEMENT_UP +.next2 + ld a, [hFindPathYProgress] + add 1 + ld [hFindPathYProgress], a +.storeDirection + ld a, d + ld [hli], a + ld a, [hFindPathNumSteps] + inc a + ld [hFindPathNumSteps], a + jp .loop +.done + ld [hl], $ff + ret + +CalcPositionOfPlayerRelativeToNPC: + xor a + ld [hNPCPlayerRelativePosFlags], a + ld a, [wSpriteStateData1 + 4] ; player's sprite screen Y position in pixels + ld d, a + ld a, [wSpriteStateData1 + 6] ; player's sprite screen X position in pixels + ld e, a + ld hl, wSpriteStateData1 + ld a, [hNPCSpriteOffset] + add l + add $4 + ld l, a + jr nc, .noCarry + inc h +.noCarry + ld a, d + ld b, a + ld a, [hli] ; NPC sprite screen Y position in pixels + call CalcDifference + jr nc, .NPCSouthOfOrAlignedWithPlayer +.NPCNorthOfPlayer + push hl + ld hl, hNPCPlayerRelativePosFlags + bit 0, [hl] + set 0, [hl] + pop hl + jr .divideYDistance +.NPCSouthOfOrAlignedWithPlayer + push hl + ld hl, hNPCPlayerRelativePosFlags + bit 0, [hl] + res 0, [hl] + pop hl +.divideYDistance + push hl + ld hl, hDividend2 + ld [hli], a + ld a, 16 + ld [hli], a + call DivideBytes ; divide Y absolute distance by 16 + ld a, [hl] ; quotient + ld [hNPCPlayerYDistance], a + pop hl + inc hl + ld b, e + ld a, [hl] ; NPC sprite screen X position in pixels + call CalcDifference + jr nc, .NPCEastOfOrAlignedWithPlayer +.NPCWestOfPlayer + push hl + ld hl, hNPCPlayerRelativePosFlags + bit 1, [hl] + set 1, [hl] + pop hl + jr .divideXDistance +.NPCEastOfOrAlignedWithPlayer + push hl + ld hl, hNPCPlayerRelativePosFlags + bit 1, [hl] + res 1, [hl] + pop hl +.divideXDistance + ld [hDividend2], a + ld a, 16 + ld [hDivisor2], a + call DivideBytes ; divide X absolute distance by 16 + ld a, [hQuotient2] + ld [hNPCPlayerXDistance], a + ld a, [hNPCPlayerRelativePosPerspective] + and a + ret z + ld a, [hNPCPlayerRelativePosFlags] + cpl + and $3 + ld [hNPCPlayerRelativePosFlags], a + ret + +ConvertNPCMovementDirectionsToJoypadMasks: + ld a, [hNPCMovementDirections2Index] + ld [wNPCMovementDirections2Index], a + dec a + ld de, wSimulatedJoypadStatesEnd + ld hl, wNPCMovementDirections2 + add l + ld l, a + jr nc, .loop + inc h +.loop + ld a, [hld] + call ConvertNPCMovementDirectionToJoypadMask + ld [de], a + inc de + ld a, [hNPCMovementDirections2Index] + dec a + ld [hNPCMovementDirections2Index], a + jr nz, .loop + ret + +ConvertNPCMovementDirectionToJoypadMask: + push hl + ld b, a + ld hl, NPCMovementDirectionsToJoypadMasksTable +.loop + ld a, [hli] + cp $ff + jr z, .done + cp b + jr z, .loadJoypadMask + inc hl + jr .loop +.loadJoypadMask + ld a, [hl] +.done + pop hl + ret + +NPCMovementDirectionsToJoypadMasksTable: + db NPC_MOVEMENT_UP, D_UP + db NPC_MOVEMENT_DOWN, D_DOWN + db NPC_MOVEMENT_LEFT, D_LEFT + db NPC_MOVEMENT_RIGHT, D_RIGHT + db $ff + +; unreferenced + ret diff --git a/engine/play_time.asm b/engine/play_time.asm index 74da9c59..a5202cc6 100755 --- a/engine/play_time.asm +++ b/engine/play_time.asm @@ -1,42 +1,42 @@ -TrackPlayTime: ; 18dee (6:4dee) +TrackPlayTime: call CountDownIgnoreInputBitReset ld a, [wd732] bit 0, a ret z - ld a, [W_PLAYTIMEMINUTES] + ld a, [wPlayTimeMaxed] and a ret nz - ld a, [W_PLAYTIMEFRAMES] + ld a, [wPlayTimeFrames] inc a - ld [W_PLAYTIMEFRAMES], a + ld [wPlayTimeFrames], a cp 60 ret nz xor a - ld [W_PLAYTIMEFRAMES], a - ld a, [W_PLAYTIMESECONDS] + ld [wPlayTimeFrames], a + ld a, [wPlayTimeSeconds] inc a - ld [W_PLAYTIMESECONDS], a + ld [wPlayTimeSeconds], a cp 60 ret nz xor a - ld [W_PLAYTIMESECONDS], a - ld a, [W_PLAYTIMEMINUTES + 1] + ld [wPlayTimeSeconds], a + ld a, [wPlayTimeMinutes] inc a - ld [W_PLAYTIMEMINUTES + 1], a + ld [wPlayTimeMinutes], a cp 60 ret nz xor a - ld [W_PLAYTIMEMINUTES + 1], a - ld a, [W_PLAYTIMEHOURS + 1] + ld [wPlayTimeMinutes], a + ld a, [wPlayTimeHours] inc a - ld [W_PLAYTIMEHOURS + 1], a + ld [wPlayTimeHours], a cp $ff ret nz ld a, $ff - ld [W_PLAYTIMEMINUTES], a + ld [wPlayTimeMaxed], a ret -CountDownIgnoreInputBitReset: ; 18e36 (6:4e36) +CountDownIgnoreInputBitReset: ld a, [wIgnoreInputCounter] and a jr nz, .asm_18e40 diff --git a/engine/pokedex_rating.asm b/engine/pokedex_rating.asm index 080025c6..f8e29e5c 100755 --- a/engine/pokedex_rating.asm +++ b/engine/pokedex_rating.asm @@ -1,19 +1,19 @@ -DisplayDexRating: ; 44169 (11:4169) +DisplayDexRating: ld hl, wPokedexSeen ld b, wPokedexSeenEnd - wPokedexSeen call CountSetBits - ld a, [wd11e] ; result of CountSetBits (seen count) - ld [$FFDB], a + ld a, [wNumSetBits] + ld [hDexRatingNumMonsSeen], a ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits - ld a, [wd11e] ; result of CountSetBits (own count) - ld [$FFDC], a + ld a, [wNumSetBits] + ld [hDexRatingNumMonsOwned], a ld hl, DexRatingsTable .findRating ld a, [hli] ld b, a - ld a, [$FFDC] ; number of pokemon owned + ld a, [hDexRatingNumMonsOwned] cp b jr c, .foundRating inc hl @@ -23,42 +23,39 @@ DisplayDexRating: ; 44169 (11:4169) ld a, [hli] ld h, [hl] ld l, a ; load text pointer into hl - ld a, [wd747] - bit 3, a - res 3, a - ld [wd747], a - jr nz, .label3 + CheckAndResetEventA EVENT_HALL_OF_FAME_DEX_RATING + jr nz, .hallOfFame push hl ld hl, PokedexRatingText_441cc call PrintText pop hl call PrintText - callba Func_7d13b - jp WaitForTextScrollButtonPress ; wait for button press -.label3 - ld de, wcc5b - ld a, [$FFDB] + callba PlayPokedexRatingSfx + jp WaitForTextScrollButtonPress +.hallOfFame + ld de, wDexRatingNumMonsSeen + ld a, [hDexRatingNumMonsSeen] ld [de], a inc de - ld a, [$FFDC] + ld a, [hDexRatingNumMonsOwned] ld [de], a inc de -.label4 +.copyRatingTextLoop ld a, [hli] - cp a, $50 - jr z, .label5 + cp a, "@" + jr z, .doneCopying ld [de], a inc de - jr .label4 -.label5 + jr .copyRatingTextLoop +.doneCopying ld [de], a ret -PokedexRatingText_441cc: ; 441cc (11:41cc) +PokedexRatingText_441cc: TX_FAR _OaksLabText_441cc db "@" -DexRatingsTable: ; 441d1 (11:41d1) +DexRatingsTable: db 10 dw PokedexRatingText_44201 db 20 @@ -92,66 +89,66 @@ DexRatingsTable: ; 441d1 (11:41d1) db 152 dw PokedexRatingText_4424c -PokedexRatingText_44201: ; 44201 (11:4201) +PokedexRatingText_44201: TX_FAR _OaksLabText_44201 db "@" -PokedexRatingText_44206: ; 44206 (11:4206) +PokedexRatingText_44206: TX_FAR _OaksLabText_44206 db "@" -PokedexRatingText_4420b: ; 4420b (11:420b) +PokedexRatingText_4420b: TX_FAR _OaksLabText_4420b db "@" -PokedexRatingText_44210: ; 44210 (11:4210) +PokedexRatingText_44210: TX_FAR _OaksLabText_44210 db "@" -PokedexRatingText_44215: ; 44215 (11:4215) +PokedexRatingText_44215: TX_FAR _OaksLabText_44215 db "@" -PokedexRatingText_4421a: ; 4421a (11:421a) +PokedexRatingText_4421a: TX_FAR _OaksLabText_4421a db "@" -PokedexRatingText_4421f: ; 4421f (11:421f) +PokedexRatingText_4421f: TX_FAR _OaksLabText_4421f db "@" -PokedexRatingText_44224: ; 44224 (11:4224) +PokedexRatingText_44224: TX_FAR _OaksLabText_44224 db "@" -PokedexRatingText_44229: ; 44229 (11:4229) +PokedexRatingText_44229: TX_FAR _OaksLabText_44229 db "@" -PokedexRatingText_4422e: ; 4422e (11:422e) +PokedexRatingText_4422e: TX_FAR _OaksLabText_4422e db "@" -PokedexRatingText_44233: ; 44233 (11:4233) +PokedexRatingText_44233: TX_FAR _OaksLabText_44233 db "@" -PokedexRatingText_44238: ; 44238 (11:4238) +PokedexRatingText_44238: TX_FAR _OaksLabText_44238 db "@" -PokedexRatingText_4423d: ; 4423d (11:423d) +PokedexRatingText_4423d: TX_FAR _OaksLabText_4423d db "@" -PokedexRatingText_44242: ; 44242 (11:4242) +PokedexRatingText_44242: TX_FAR _OaksLabText_44242 db "@" -PokedexRatingText_44247: ; 44247 (11:4247) +PokedexRatingText_44247: TX_FAR _OaksLabText_44247 db "@" -PokedexRatingText_4424c: ; 4424c (11:424c) +PokedexRatingText_4424c: TX_FAR _OaksLabText_4424c db "@" diff --git a/engine/predefs.asm b/engine/predefs.asm index f6ecf018..605cba3a 100755 --- a/engine/predefs.asm +++ b/engine/predefs.asm @@ -27,10 +27,10 @@ GetPredefPointer: add a add e ld e,a - jr nc,.next + jr nc, .nocarry inc d -.next +.nocarry add hl,de ld d,h ld e,l @@ -49,18 +49,18 @@ GetPredefPointer: ret -PredefPointers:: ; 4fe79 (13:7e79) +PredefPointers:: ; 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 LoadMissableObjects + add_predef CopyDownscaledMonTiles + dbw $03,JumpMoveEffect ; wrong bank add_predef HealParty - add_predef MoveAnimation; 08 play move animation + add_predef MoveAnimation add_predef DivideBCDPredef add_predef DivideBCDPredef2 add_predef AddBCDPredef @@ -80,15 +80,15 @@ PredefPointers:: ; 4fe79 (13:7e79) add_predef LoadTilesetHeader add_predef LearnMoveFromLevelUp add_predef LearnMove - add_predef IsItemInBag_ - dbw $03,CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; for these two, the bank number is actually 0 - dbw $03,GiveItem + add_predef GetQuantityOfItemInBag + dbw $03,CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; home bank + dbw $03,GiveItem ; home bank add_predef ChangeBGPalColor0_4Frames add_predef FindPathToPlayer - add_predef Func_480ff + add_predef PredefShakeScreenVertically add_predef CalcPositionOfPlayerRelativeToNPC add_predef ConvertNPCMovementDirectionsToJoypadMasks - add_predef Func_48125 + add_predef PredefShakeScreenHorizontally add_predef UpdateHPBar add_predef HPBarLength add_predef Diploma_TextBoxBorder @@ -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 @@ -111,7 +111,7 @@ PredefPointers:: ; 4fe79 (13:7e79) add_predef InternalClockTradeAnim add_predef TrainerEngage add_predef IndexToPokedex - add_predef Predef3B; 3B display pic? + add_predef DisplayPicCenteredOrUpperRight add_predef UsedCut add_predef ShowPokedexData add_predef WriteMonMoves @@ -121,22 +121,22 @@ PredefPointers:: ; 4fe79 (13:7e79) add_predef SetPartyMonTypes add_predef CanLearnTM add_predef TMToMove - add_predef Func_71ddf - add_predef StarterDex ; 46 + add_predef _RunPaletteCommand + add_predef StarterDex add_predef _AddPartyMon add_predef UpdateHPBar2 add_predef DrawEnemyHUDAndHPBar add_predef LoadTownMap_Nest add_predef PrintMonType - add_predef EmotionBubble; 4C player exclamation + add_predef EmotionBubble add_predef EmptyFunc3; return immediately add_predef AskName add_predef PewterGuys add_predef SaveSAVtoSRAM2 - add_predef LoadSAVCheckSum2 + add_predef LoadSAV2 add_predef LoadSAV add_predef SaveSAVtoSRAM1 - add_predef DoInGameTradeDialogue ; 54 initiate trade + add_predef DoInGameTradeDialogue add_predef HallOfFamePC add_predef DisplayDexRating dbw $1E, _LeaveMapAnim ; wrong bank @@ -144,10 +144,10 @@ PredefPointers:: ; 4fe79 (13:7e79) add_predef GetTileTwoStepsInFrontOfPlayer add_predef CheckForCollisionWhenPushingBoulder add_predef PrintStrengthTxt - add_predef PickupItem + add_predef PickUpItem add_predef PrintMoveType add_predef LoadMovePPs - add_predef DrawHP ; 5F + add_predef DrawHP add_predef DrawHP2 - add_predef Func_1c9c6 + add_predef DisplayElevatorFloorMenu add_predef OaksAideScript diff --git a/engine/predefs12.asm b/engine/predefs12.asm index 90032a14..95f0ea25 100755 --- a/engine/predefs12.asm +++ b/engine/predefs12.asm @@ -1,65 +1,71 @@ ; b = new colour for BG colour 0 (usually white) for 4 frames -ChangeBGPalColor0_4Frames: ; 480eb (12:40eb) +ChangeBGPalColor0_4Frames: call GetPredefRegisters ld a, [rBGP] or b ld [rBGP], a - ld c, $4 + ld c, 4 call DelayFrames ld a, [rBGP] and %11111100 ld [rBGP], a ret -Func_480ff: ; 480ff (12:40ff) +PredefShakeScreenVertically: +; Moves the window down and then back in a sequence of progressively smaller +; numbers of pixels, starting at b. call GetPredefRegisters - ld a, $1 - ld [wd0a0], a + ld a, 1 + ld [wDisableVBlankWYUpdate], a xor a -.asm_48108 - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) - call Func_48119 - call Func_48119 +.loop + ld [$ff96], a + call .MutateWY + call .MutateWY dec b ld a, b - jr nz, .asm_48108 + jr nz, .loop xor a - ld [wd0a0], a + ld [wDisableVBlankWYUpdate], a ret -Func_48119: ; 48119 (12:4119) - ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND) +.MutateWY + ld a, [$ff96] xor b - ld [H_NUMTOPRINT], a ; $ff96 (aliases: H_MULTIPLICAND) - ld [rWY], a ; $ff4a - ld c, $3 + ld [$ff96], a + ld [rWY], a + ld c, 3 jp DelayFrames -Func_48125: ; 48125 (12:4125) +PredefShakeScreenHorizontally: +; Moves the window right and then back in a sequence of progressively smaller +; numbers of pixels, starting at b. call GetPredefRegisters xor a -.asm_48129 +.loop ld [$ff97], a - call Func_4813f - ld c, $1 + call .MutateWX + ld c, 1 call DelayFrames - call Func_4813f + call .MutateWX dec b ld a, b - jr nz, .asm_48129 - ld a, $7 - ld [rWX], a ; $ff4b + jr nz, .loop + +; restore normal WX + ld a, 7 + ld [rWX], a ret -Func_4813f: ; 4813f (12:413f) +.MutateWX ld a, [$ff97] xor b ld [$ff97], a bit 7, a - jr z, .asm_48149 - xor a -.asm_48149 - add $7 - ld [rWX], a ; $ff4b - ld c, $4 + jr z, .skipZeroing + xor a ; zero a if it's negative +.skipZeroing + add 7 + ld [rWX], a + ld c, 4 jp DelayFrames diff --git a/engine/predefs17.asm b/engine/predefs17.asm index 74977ee8..21289c6a 100755 --- a/engine/predefs17.asm +++ b/engine/predefs17.asm @@ -1,9 +1,9 @@ ; this function temporarily makes the starters (and Ivysaur) seen ; so that the full Pokedex information gets displayed in Oak's lab -StarterDex: ; 5c0dc (17:40dc) +StarterDex: 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/predefs17_2.asm b/engine/predefs17_2.asm index a2dac120..e9235f13 100755 --- a/engine/predefs17_2.asm +++ b/engine/predefs17_2.asm @@ -1,5 +1,5 @@ ; updates the types of a party mon (pointed to in hl) to the ones of the mon specified in wd11e -SetPartyMonTypes: ; 5db5e (17:5b5e) +SetPartyMonTypes: call GetPredefRegisters ld bc, wPartyMon1Type - wPartyMon1 ; $5 add hl, bc @@ -8,8 +8,8 @@ SetPartyMonTypes: ; 5db5e (17:5b5e) push hl call GetMonHeader pop hl - ld a, [W_MONHTYPE1] + ld a, [wMonHType1] ld [hli], a - ld a, [W_MONHTYPE2] + ld a, [wMonHType2] ld [hl], a ret diff --git a/engine/predefs7.asm b/engine/predefs7.asm index 9786c097..752bdd1a 100755 --- a/engine/predefs7.asm +++ b/engine/predefs7.asm @@ -1,30 +1,30 @@ -Func_1c9c6: ; 1c9c6 (7:49c6) +DisplayElevatorFloorMenu: ld hl, WhichFloorText call PrintText - ld hl, wStringBuffer2 + 11 + ld hl, wItemList ld a, l - ld [wList], a + ld [wListPointer], a ld a, h - ld [wList + 1], a + ld [wListPointer + 1], a ld a, [wListScrollOffset] push af xor a ld [wCurrentMenuItem], a ld [wListScrollOffset], a - ld [wcf93], a - ld a, $4 + ld [wPrintItemPrices], a + ld a, SPECIALLISTMENU ld [wListMenuID], a call DisplayListMenuID pop bc ld a, b ld [wListScrollOffset], a ret c - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 7, [hl] - ld hl, wcc5b + ld hl, wElevatorWarpMaps ld a, [wWhichPokemon] add a - ld d, $0 + ld d, 0 ld e, a add hl, de ld a, [hli] @@ -32,17 +32,17 @@ Func_1c9c6: ; 1c9c6 (7:49c6) ld a, [hl] ld c, a ld hl, wWarpEntries - call Func_1ca0d + call .UpdateWarp -Func_1ca0d: ; 1ca0d (7:4a0d) +.UpdateWarp inc hl inc hl ld a, b - ld [hli], a + ld [hli], a ; destination warp ID ld a, c - ld [hli], a + ld [hli], a ; destination map ID ret -WhichFloorText: ; 1ca14 (7:4a14) +WhichFloorText: TX_FAR _WhichFloorText db "@" diff --git a/engine/print_waiting_text.asm b/engine/print_waiting_text.asm new file mode 100644 index 00000000..7a95da2a --- /dev/null +++ b/engine/print_waiting_text.asm @@ -0,0 +1,20 @@ +PrintWaitingText: + coord hl, 3, 10 + ld b, $1 + ld c, $b + ld a, [wIsInBattle] + and a + jr z, .asm_4c17 + call TextBoxBorder + jr .asm_4c1a +.asm_4c17 + call CableClub_TextBoxBorder +.asm_4c1a + coord hl, 4, 11 + ld de, WaitingText + call PlaceString + ld c, 50 + jp DelayFrames + +WaitingText: + db "Waiting...!@" diff --git a/engine/remove_pokemon.asm b/engine/remove_pokemon.asm new file mode 100644 index 00000000..1fcb5d09 --- /dev/null +++ b/engine/remove_pokemon.asm @@ -0,0 +1,95 @@ +_RemovePokemon: + ld hl, wPartyCount + ld a, [wRemoveMonFromBox] + and a + jr z, .asm_7b74 + ld hl, wNumInBox +.asm_7b74 + ld a, [hl] + dec a + ld [hli], a + ld a, [wWhichPokemon] + ld c, a + ld b, $0 + add hl, bc + ld e, l + ld d, h + inc de +.asm_7b81 + ld a, [de] + inc de + ld [hli], a + inc a + jr nz, .asm_7b81 + ld hl, wPartyMonOT + ld d, $5 + ld a, [wRemoveMonFromBox] + and a + jr z, .asm_7b97 + ld hl, wBoxMonOT + ld d, $13 +.asm_7b97 + ld a, [wWhichPokemon] + call SkipFixedLengthTextEntries + ld a, [wWhichPokemon] + cp d + jr nz, .asm_7ba6 + ld [hl], $ff + ret +.asm_7ba6 + ld d, h + ld e, l + ld bc, NAME_LENGTH + add hl, bc + ld bc, wPartyMonNicks + ld a, [wRemoveMonFromBox] + and a + jr z, .asm_7bb8 + ld bc, wBoxMonNicks +.asm_7bb8 + call CopyDataUntil + ld hl, wPartyMons + ld bc, wPartyMon2 - wPartyMon1 + ld a, [wRemoveMonFromBox] + and a + jr z, .asm_7bcd + ld hl, wBoxMons + ld bc, wBoxMon2 - wBoxMon1 +.asm_7bcd + ld a, [wWhichPokemon] + call AddNTimes + ld d, h + ld e, l + ld a, [wRemoveMonFromBox] + and a + jr z, .asm_7be4 + ld bc, wBoxMon2 - wBoxMon1 + add hl, bc + ld bc, wBoxMonOT + jr .asm_7beb +.asm_7be4 + ld bc, wPartyMon2 - wPartyMon1 + add hl, bc + ld bc, wPartyMonOT +.asm_7beb + call CopyDataUntil + ld hl, wPartyMonNicks + ld a, [wRemoveMonFromBox] + and a + jr z, .asm_7bfa + ld hl, wBoxMonNicks +.asm_7bfa + ld bc, NAME_LENGTH + ld a, [wWhichPokemon] + call AddNTimes + ld d, h + ld e, l + ld bc, NAME_LENGTH + add hl, bc + ld bc, wPokedexOwned + ld a, [wRemoveMonFromBox] + and a + jr z, .asm_7c15 + ld bc, wBoxMonNicksEnd +.asm_7c15 + jp CopyDataUntil diff --git a/engine/save.asm b/engine/save.asm index d3127f04..4fb2c4c8 100755 --- a/engine/save.asm +++ b/engine/save.asm @@ -1,14 +1,14 @@ -LoadSAV: ; 735e8 (1c:75e8) +LoadSAV: ;(if carry -> write ;"the file data is destroyed") call ClearScreen call LoadFontTilePatterns call LoadTextBoxTilePatterns - call LoadSAVCheckSum + call LoadSAV0 jr c, .badsum - call LoadSAVCheckSum1 + call LoadSAV1 jr c, .badsum - call LoadSAVCheckSum2 + call LoadSAV2 jr c, .badsum ld a, $2 ; good checksum jr .goodsum @@ -18,129 +18,132 @@ 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] ld a, $1 ; bad checksum .goodsum - ld [wd088], a ; checksum flag + ld [wSaveFileStatus], a ret -FileDataDestroyedText: ; 7361e (1c:761e) +FileDataDestroyedText: TX_FAR _FileDataDestroyedText db "@" -LoadSAVCheckSum: ; 73623 (1c:7623) +LoadSAV0: ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, $a598 ; hero name located in SRAM - ld bc, $f8b ; but here checks the full SAV + ld hl, sPlayerName ; hero name located in SRAM + ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV call SAVCheckSum ld c, a - ld a, [$b523] ; SAV's checksum + ld a, [sMainDataCheckSum] ; SAV's checksum cp c - jp z, .Func_73652 - ld hl, $a598 - ld bc, $f8b + jp z, .checkSumsMatched + +; If the computed checksum didn't match the saved on, try again. + ld hl, sPlayerName + ld bc, sMainDataCheckSum - sPlayerName call SAVCheckSum ld c, a - ld a, [$b523] ; SAV's checksum + ld a, [sMainDataCheckSum] ; SAV's checksum cp c jp nz, SAVBadCheckSum -.Func_73652 ; 73652 (1c:7652) - ld hl, $a598 - ld de, wPlayerName ; wd158 - ld bc, $b +.checkSumsMatched + ld hl, sPlayerName + ld de, wPlayerName + ld bc, NAME_LENGTH call CopyData - ld hl, $a5a3 - ld de, wPokedexOwned - ld bc, $789 + ld hl, sMainData + ld de, wMainDataStart + ld bc, wMainDataEnd - wMainDataStart call CopyData - ld hl, W_CURMAPTILESET + ld hl, wCurMapTileset set 7, [hl] - ld hl, $ad2c - ld de, wSpriteStateData1 - ld bc, $200 + ld hl, sSpriteData + ld de, wSpriteDataStart + ld bc, wSpriteDataEnd - wSpriteDataStart call CopyData - ld a, [$b522] + ld a, [sTilesetType] ld [hTilesetType], a - ld hl, $b0c0 - ld de, W_NUMINBOX - ld bc, wBoxMonNicksEnd - W_NUMINBOX + ld hl, sCurBoxData + ld de, wBoxDataStart + ld bc, wBoxDataEnd - wBoxDataStart call CopyData and a jp SAVGoodChecksum -LoadSAVCheckSum1: ; 73690 (1c:7690) +LoadSAV1: ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, $a598 ; hero name located in SRAM - ld bc, $f8b ; but here checks the full SAV + ld hl, sPlayerName ; hero name located in SRAM + ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV call SAVCheckSum ld c, a - ld a, [$b523] ; SAV's checksum + ld a, [sMainDataCheckSum] ; SAV's checksum cp c jr nz, SAVBadCheckSum - ld hl, $b0c0 - ld de, W_NUMINBOX - ld bc, wBoxMonNicksEnd - W_NUMINBOX + ld hl, sCurBoxData + ld de, wBoxDataStart + ld bc, wBoxDataEnd - wBoxDataStart call CopyData and a jp SAVGoodChecksum -LoadSAVCheckSum2: ; 736bd (1c:76bd) +LoadSAV2: ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, $a598 ; hero name located in SRAM - ld bc, $f8b ; but here checks the full SAV + ld hl, sPlayerName ; hero name located in SRAM + ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV call SAVCheckSum ld c, a - ld a, [$b523] ; SAV's checksum + ld a, [sMainDataCheckSum] ; SAV's checksum cp c jp nz, SAVBadCheckSum - ld hl, $af2c - ld de, wPartyCount ; wPartyCount - ld bc, $194 + ld hl, sPartyData + ld de, wPartyDataStart + ld bc, wPartyDataEnd - wPartyDataStart call CopyData - ld hl, $a5a3 - ld de, wPokedexOwned ; wPokedexOwned + ld hl, sMainData + ld de, wPokedexOwned ld bc, wPokedexSeenEnd - wPokedexOwned call CopyData and a jp SAVGoodChecksum -SAVBadCheckSum: ; 736f7 (1c:76f7) +SAVBadCheckSum: scf -SAVGoodChecksum: ; 736f8 (1c:76f8) +SAVGoodChecksum: ld a, $0 ld [MBC1SRamBankingMode], a ld [MBC1SRamEnable], a ret -Func_73701: ; 0x73701 - call LoadSAVCheckSum - call LoadSAVCheckSum1 - jp LoadSAVCheckSum2 +LoadSAVIgnoreBadCheckSum: +; unused function that loads save data and ignores bad checksums + call LoadSAV0 + call LoadSAV1 + jp LoadSAV2 -SaveSAV: ;$770a +SaveSAV: callba PrintSaveScreenText ld hl,WouldYouLikeToSaveText call SaveSAVConfirm and a ;|0 = Yes|1 = No| ret nz - ld a,[wd088] + ld a,[wSaveFileStatus] dec a jr z,.save call SAVCheckRandomID @@ -149,135 +152,135 @@ SaveSAV: ;$770a call SaveSAVConfirm and a ret nz -.save ;$772d - call SaveSAVtoSRAM ;$7848 - hlCoord 1, 13 - ld bc,$0412 - call ClearScreenArea ; clear area 4x12 starting at 13,1 - hlCoord 1, 14 +.save + call SaveSAVtoSRAM + coord hl, 1, 13 + lb bc, 4, 18 + call ClearScreenArea + coord hl, 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 + ld a, SFX_SAVE call PlaySoundWaitForCurrent call WaitForSoundToFinish - ld c,$1e + ld c,30 jp DelayFrames NowSavingString: db "Now saving...@" -SaveSAVConfirm: ; 73768 (1c:7768) +SaveSAVConfirm: call PrintText - hlCoord 0, 7 - ld bc,$0801 + coord hl, 0, 7 + lb bc, 8, 1 ld a,TWO_OPTION_MENU ld [wTextBoxID],a call DisplayTextBoxID ; yes/no menu ld a,[wCurrentMenuItem] ret -WouldYouLikeToSaveText: ; 0x7377d +WouldYouLikeToSaveText: TX_FAR _WouldYouLikeToSaveText db "@" -GameSavedText: ; 73782 (1c:7782) +GameSavedText: TX_FAR _GameSavedText db "@" -OlderFileWillBeErasedText: ; 73787 (1c:7787) +OlderFileWillBeErasedText: TX_FAR _OlderFileWillBeErasedText db "@" -SaveSAVtoSRAM0: ; 7378c (1c:778c) +SaveSAVtoSRAM0: ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a ld hl, wPlayerName - ld de, $a598 - ld bc, $b + ld de, sPlayerName + ld bc, NAME_LENGTH call CopyData - ld hl, wPokedexOwned - ld de, $a5a3 - ld bc, W_NUMINBOX - wPokedexOwned + ld hl, wMainDataStart + ld de, sMainData + ld bc, wMainDataEnd - wMainDataStart call CopyData - ld hl, wSpriteStateData1 - ld de, $ad2c - ld bc, $200 + ld hl, wSpriteDataStart + ld de, sSpriteData + ld bc, wSpriteDataEnd - wSpriteDataStart call CopyData - ld hl, W_NUMINBOX - ld de, $b0c0 - ld bc, wBoxMonNicksEnd - W_NUMINBOX + ld hl, wBoxDataStart + ld de, sCurBoxData + ld bc, wBoxDataEnd - wBoxDataStart call CopyData ld a, [hTilesetType] - ld [$b522], a - ld hl, $a598 - ld bc, $f8b + ld [sTilesetType], a + ld hl, sPlayerName + ld bc, sMainDataCheckSum - sPlayerName call SAVCheckSum - ld [$b523], a + ld [sMainDataCheckSum], a xor a ld [MBC1SRamBankingMode], a ld [MBC1SRamEnable], a ret -SaveSAVtoSRAM1: ; 737e2 (1c:77e2) +SaveSAVtoSRAM1: ; stored pokémon ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, W_NUMINBOX - ld de, $b0c0 - ld bc, wBoxMonNicksEnd - W_NUMINBOX + ld hl, wBoxDataStart + ld de, sCurBoxData + ld bc, wBoxDataEnd - wBoxDataStart call CopyData - ld hl, $a598 - ld bc, $f8b + ld hl, sPlayerName + ld bc, sMainDataCheckSum - sPlayerName call SAVCheckSum - ld [$b523], a + ld [sMainDataCheckSum], a xor a ld [MBC1SRamBankingMode], a ld [MBC1SRamEnable], a ret -SaveSAVtoSRAM2: ; 7380f (1c:780f) +SaveSAVtoSRAM2: ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, wPartyCount - ld de, $af2c - ld bc, wPokedexOwned - wPartyCount + ld hl, wPartyDataStart + ld de, sPartyData + ld bc, wPartyDataEnd - wPartyDataStart call CopyData ld hl, wPokedexOwned ; pokédex only - ld de, $a5a3 + ld de, sMainData ld bc, wPokedexSeenEnd - wPokedexOwned call CopyData - ld hl, $a598 - ld bc, $f8b + ld hl, sPlayerName + ld bc, sMainDataCheckSum - sPlayerName call SAVCheckSum - ld [$b523], a + ld [sMainDataCheckSum], a xor a ld [MBC1SRamBankingMode], a ld [MBC1SRamEnable], a ret -SaveSAVtoSRAM: ; 73848 (1c:7848) +SaveSAVtoSRAM: ld a, $2 - ld [wd088], a + ld [wSaveFileStatus], a call SaveSAVtoSRAM0 call SaveSAVtoSRAM1 jp SaveSAVtoSRAM2 -SAVCheckSum: ; 73856 (1c:7856) +SAVCheckSum: ;Check Sum (result[1 byte] is complemented) - ld d, $0 + ld d, 0 .loop ld a, [hli] add d @@ -290,35 +293,37 @@ SAVCheckSum: ; 73856 (1c:7856) cpl ret -Func_73863: ; 73863 (1c:7863) - ld hl, $a000 - ld de, $ba4d - ld b, $6 -.asm_7386b +CalcIndividualBoxCheckSums: + ld hl, sBox1 ; sBox7 + ld de, sBank2IndividualBoxChecksums ; sBank3IndividualBoxChecksums + ld b, NUM_BOXES / 2 +.loop push bc push de - ld bc, $462 + ld bc, wBoxDataEnd - wBoxDataStart call SAVCheckSum pop de ld [de], a inc de pop bc dec b - jr nz, .asm_7386b + jr nz, .loop ret -Func_7387b: ; 7387b (1c:787b) - ld hl, PointerTable_73895 ; $7895 - ld a, [wd5a0] +GetBoxSRAMLocation: +; in: a = box num +; out: b = box SRAM bank, hl = pointer to start of box + ld hl, BoxSRAMPointerTable + ld a, [wCurrentBoxNum] and $7f - cp $6 - ld b, $2 - jr c, .asm_7388c + cp NUM_BOXES / 2 + ld b, 2 + jr c, .next inc b - sub $6 -.asm_7388c + sub NUM_BOXES / 2 +.next ld e, a - ld d, $0 + ld d, 0 add hl, de add hl, de ld a, [hli] @@ -326,45 +331,45 @@ Func_7387b: ; 7387b (1c:787b) ld l, a ret -PointerTable_73895: ; 73895 (1c:7895) - dw $A000 - dw $A462 - dw $A8C4 - dw $AD26 - dw $B188 - dw $B5EA +BoxSRAMPointerTable: + dw sBox1 ; sBox7 + dw sBox2 ; sBox8 + dw sBox3 ; sBox9 + dw sBox4 ; sBox10 + dw sBox5 ; sBox11 + dw sBox6 ; sBox12 -ChangeBox:: ; 738a1 (1c:78a1) +ChangeBox:: ld hl, WhenYouChangeBoxText call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a ret nz ; return if No was chosen - ld hl, wd5a0 - bit 7, [hl] - call z, Func_73a29 - call Func_7393f + ld hl, wCurrentBoxNum + bit 7, [hl] ; is it the first time player is changing the box? + call z, EmptyAllSRAMBoxes ; if so, empty all boxes in SRAM + call DisplayChangeBoxMenu call UpdateSprites ld hl, hFlags_0xFFF6 set 1, [hl] call HandleMenuInput ld hl, hFlags_0xFFF6 res 1, [hl] - bit 1, a + bit 1, a ; pressed b ret nz - call Func_7387b + call GetBoxSRAMLocation ld e, l ld d, h - ld hl, W_NUMINBOX - call Func_7390e + ld hl, wBoxDataStart + call CopyBoxToOrFromSRAM ; copy old box from WRAM to SRAM ld a, [wCurrentMenuItem] set 7, a - ld [wd5a0], a - call Func_7387b - ld de, W_NUMINBOX - call Func_7390e - ld hl, W_MAPTEXTPTR + ld [wCurrentBoxNum], a + call GetBoxSRAMLocation + ld de, wBoxDataStart + call CopyBoxToOrFromSRAM ; copy new box from SRAM to WRAM + ld hl, wMapTextPtr ld de, wChangeBoxSavedMapTextPointer ld a, [hli] ld [de], a @@ -375,16 +380,17 @@ ChangeBox:: ; 738a1 (1c:78a1) call SaveSAVtoSRAM ld hl, wChangeBoxSavedMapTextPointer call SetMapTextPointer - ld a, (SFX_02_5d - SFX_Headers_02) / 3 + ld a, SFX_SAVE call PlaySoundWaitForCurrent call WaitForSoundToFinish ret -WhenYouChangeBoxText: ; 73909 (1c:7909) +WhenYouChangeBoxText: TX_FAR _WhenYouChangeBoxText db "@" -Func_7390e: ; 7390e (1c:790e) +CopyBoxToOrFromSRAM: +; copy an entire box from hl to de with b as the SRAM bank push hl ld a, SRAM_ENABLE ld [MBC1SRamEnable], a @@ -392,99 +398,102 @@ Func_7390e: ; 7390e (1c:790e) ld [MBC1SRamBankingMode], a ld a, b ld [MBC1SRamBank], a - ld bc, $462 + ld bc, wBoxDataEnd - wBoxDataStart call CopyData pop hl + +; mark the memory that the box was copied from as am empty box xor a ld [hli], a dec a ld [hl], a - ld hl, $a000 - ld bc, $1a4c + + ld hl, sBox1 ; sBox7 + ld bc, sBank2AllBoxesChecksum - sBox1 call SAVCheckSum - ld [$ba4c], a - call Func_73863 + ld [sBank2AllBoxesChecksum], a ; sBank3AllBoxesChecksum + call CalcIndividualBoxCheckSums xor a ld [MBC1SRamBankingMode], a ld [MBC1SRamEnable], a ret -Func_7393f: ; 7393f (1c:793f) +DisplayChangeBoxMenu: xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - ld a, $3 - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys - ld a, $b - ld [wMaxMenuItem], a ; wMaxMenuItem - ld a, $1 - ld [wTopMenuItemY], a ; wTopMenuItemY - ld a, $c - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [H_AUTOBGTRANSFERENABLED], a + ld a, A_BUTTON | B_BUTTON + ld [wMenuWatchedKeys], a + ld a, 11 + ld [wMaxMenuItem], a + ld a, 1 + ld [wTopMenuItemY], a + ld a, 12 + ld [wTopMenuItemX], a xor a - ld [wcc37], a - ld a, [wd5a0] + ld [wMenuWatchMovingOutOfBounds], a + ld a, [wCurrentBoxNum] and $7f - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wLastMenuItem], a ; wLastMenuItem - ld hl, wTileMap - ld b, $2 - ld c, $9 + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a + coord hl, 0, 0 + ld b, 2 + ld c, 9 call TextBoxBorder ld hl, ChooseABoxText call PrintText - hlCoord 11, 0 - ld b, $c - ld c, $7 + coord hl, 11, 0 + ld b, 12 + ld c, 7 call TextBoxBorder ld hl, hFlags_0xFFF6 set 2, [hl] - ld de, BoxNames ; $79d9 - hlCoord 13, 1 + ld de, BoxNames + coord hl, 13, 1 call PlaceString ld hl, hFlags_0xFFF6 res 2, [hl] - ld a, [wd5a0] + ld a, [wCurrentBoxNum] and $7f cp 9 - jr c, .asm_739a6 + jr c, .singleDigitBoxNum sub 9 - hlCoord 8, 2 + coord hl, 8, 2 ld [hl], "1" add "0" - jr .asm_739a8 -.asm_739a6 + jr .next +.singleDigitBoxNum add "1" -.asm_739a8 +.next Coorda 9, 2 - hlCoord 1, 2 + coord hl, 1, 2 ld de, BoxNoText call PlaceString - call Func_73a84 - hlCoord 18, 1 - ld de, wWhichTrade ; wWhichTrade - ld bc, $14 + call GetMonCountsForAllBoxes + coord hl, 18, 1 + ld de, wBoxMonCounts + ld bc, SCREEN_WIDTH ld a, $c -.asm_739c2 +.loop push af ld a, [de] - and a - jr z, .asm_739c9 - ld [hl], $78 -.asm_739c9 + and a ; is the box empty? + jr z, .skipPlacingPokeball + ld [hl], $78 ; place pokeball tile next to box name if box not empty +.skipPlacingPokeball add hl, bc inc de pop af dec a - jr nz, .asm_739c2 - ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + jr nz, .loop + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a ret -ChooseABoxText: ; 739d4 (1c:79d4) +ChooseABoxText: TX_FAR _ChooseABoxText db "@" -BoxNames: ; 739d9 (1c:79d9) +BoxNames: db "BOX 1" next "BOX 2" next "BOX 3" @@ -498,54 +507,57 @@ BoxNames: ; 739d9 (1c:79d9) next "BOX11" next "BOX12@" -BoxNoText: ; 73a21 (1c:7a21) +BoxNoText: db "BOX No.@" -Func_73a29: ; 73a29 (1c:7a29) +EmptyAllSRAMBoxes: +; marks all boxes in SRAM as empty (initialisation for the first time the +; player changes the box) ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ld a, $1 ld [MBC1SRamBankingMode], a - ld a, $2 + ld a, 2 ld [MBC1SRamBank], a - call Func_73a4b - ld a, $3 + call EmptySRAMBoxesInBank + ld a, 3 ld [MBC1SRamBank], a - call Func_73a4b + call EmptySRAMBoxesInBank xor a ld [MBC1SRamBankingMode], a ld [MBC1SRamEnable], a ret -Func_73a4b: ; 73a4b (1c:7a4b) - ld hl, $a000 - call Func_73a7f - ld hl, $a462 - call Func_73a7f - ld hl, $a8c4 - call Func_73a7f - ld hl, $ad26 - call Func_73a7f - ld hl, $b188 - call Func_73a7f - ld hl, $b5ea - call Func_73a7f - ld hl, $a000 - ld bc, $1a4c +EmptySRAMBoxesInBank: +; marks every box in the current SRAM bank as empty + ld hl, sBox1 ; sBox7 + call EmptySRAMBox + ld hl, sBox2 ; sBox8 + call EmptySRAMBox + ld hl, sBox3 ; sBox9 + call EmptySRAMBox + ld hl, sBox4 ; sBox10 + call EmptySRAMBox + ld hl, sBox5 ; sBox11 + call EmptySRAMBox + ld hl, sBox6 ; sBox12 + call EmptySRAMBox + ld hl, sBox1 ; sBox7 + ld bc, sBank2AllBoxesChecksum - sBox1 call SAVCheckSum - ld [$ba4c], a - call Func_73863 + ld [sBank2AllBoxesChecksum], a ; sBank3AllBoxesChecksum + call CalcIndividualBoxCheckSums ret -Func_73a7f: ; 73a7f (1c:7a7f) +EmptySRAMBox: xor a ld [hli], a dec a ld [hl], a ret -Func_73a84: ; 73a84 (1c:7a84) - ld hl, wWhichTrade ; wWhichTrade +GetMonCountsForAllBoxes: + ld hl, wBoxMonCounts push hl ld a, SRAM_ENABLE ld [MBC1SRamEnable], a @@ -553,58 +565,61 @@ Func_73a84: ; 73a84 (1c:7a84) ld [MBC1SRamBankingMode], a ld a, $2 ld [MBC1SRamBank], a - call Func_73ab8 + call GetMonCountsForBoxesInBank ld a, $3 ld [MBC1SRamBank], a - call Func_73ab8 + call GetMonCountsForBoxesInBank xor a ld [MBC1SRamBankingMode], a ld [MBC1SRamEnable], a pop hl - ld a, [wd5a0] + +; copy the count for the current box from WRAM + ld a, [wCurrentBoxNum] and $7f ld c, a - ld b, $0 + ld b, 0 add hl, bc - ld a, [W_NUMINBOX] ; wda80 + ld a, [wNumInBox] ld [hl], a + ret -Func_73ab8: ; 73ab8 (1c:7ab8) - ld a, [$a000] +GetMonCountsForBoxesInBank: + ld a, [sBox1] ; sBox7 ld [hli], a - ld a, [$a462] + ld a, [sBox2] ; sBox8 ld [hli], a - ld a, [$a8c4] + ld a, [sBox3] ; sBox9 ld [hli], a - ld a, [$ad26] + ld a, [sBox4] ; sBox10 ld [hli], a - ld a, [$b188] + ld a, [sBox5] ; sBox11 ld [hli], a - ld a, [$b5ea] + ld a, [sBox6] ; sBox12 ld [hli], a ret -SAVCheckRandomID: ;$7ad1 +SAVCheckRandomID: ;checks if Sav file is the same by checking player's name 1st letter ($a598) ; and the two random numbers generated at game beginning -;(which are stored at wPlayerID) +;(which are stored at wPlayerID)s ld a,$0a - ld [$0000],a + ld [MBC1SRamEnable],a ld a,$01 ld [MBC1SRamBankingMode],a ld [MBC1SRamBank],a - ld a,[$a598] + ld a,[sPlayerName] and a jr z,.next - ld hl,$a598 - ld bc,$0f8b + ld hl,sPlayerName + ld bc, sMainDataCheckSum - sPlayerName call SAVCheckSum ld c,a - ld a,[$b523] + ld a,[sMainDataCheckSum] cp c jr nz,.next - ld hl,$a605 + ld hl,sMainData + 98 ; player ID ld a,[hli] ld h,[hl] ld l,a @@ -616,43 +631,45 @@ SAVCheckRandomID: ;$7ad1 .next ld a,$00 ld [MBC1SRamBankingMode],a - ld [$0000],a + ld [MBC1SRamEnable],a ret -SaveHallOfFameTeams: ; 73b0d (1c:7b0d) - ld a, [wd5a2] +SaveHallOfFameTeams: + ld a, [wNumHoFTeams] dec a - cp NUM_HOF_TEAMS - jr nc, .asm_73b28 + cp HOF_TEAM_CAPACITY + jr nc, .shiftHOFTeams ld hl, sHallOfFame ld bc, HOF_TEAM call AddNTimes ld e, l ld d, h - ld hl, wcc5b + ld hl, wHallOfFame ld bc, HOF_TEAM jr HallOfFame_Copy -.asm_73b28 +.shiftHOFTeams +; if the space designated for HOF teams is full, then shift all HOF teams to the next slot, making space for the new HOF team +; this deletes the last HOF team though ld hl, sHallOfFame + HOF_TEAM ld de, sHallOfFame - ld bc, HOF_TEAM * (NUM_HOF_TEAMS - 1) + ld bc, HOF_TEAM * (HOF_TEAM_CAPACITY - 1) call HallOfFame_Copy - ld hl, wcc5b - ld de, sHallOfFame + HOF_TEAM * (NUM_HOF_TEAMS - 1) + ld hl, wHallOfFame + ld de, sHallOfFame + HOF_TEAM * (HOF_TEAM_CAPACITY - 1) ld bc, HOF_TEAM jr HallOfFame_Copy -LoadHallOfFameTeams: ; 73b3f (1c:7b3f) +LoadHallOfFameTeams: ld hl, sHallOfFame ld bc, HOF_TEAM - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wHoFTeamIndex] call AddNTimes - ld de, wcc5b + ld de, wHallOfFame ld bc, HOF_TEAM ; fallthrough -HallOfFame_Copy: ; 73b51 (1c:7b51) +HallOfFame_Copy: ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ld a, $1 @@ -665,7 +682,7 @@ HallOfFame_Copy: ; 73b51 (1c:7b51) ld [MBC1SRamEnable], a ret -ClearSAV: ; 73b6a (1c:7b6a) +ClearSAV: ld a, SRAM_ENABLE ld [MBC1SRamEnable], a ld a, $1 @@ -683,7 +700,7 @@ ClearSAV: ; 73b6a (1c:7b6a) ld [MBC1SRamEnable], a ret -PadSRAM_FF: ; 73b8f (1c:7b8f) +PadSRAM_FF: ld [MBC1SRamBank], a ld hl, $a000 ld bc, $2000 diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index e3e452f3..2dfcffde 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -1,4 +1,4 @@ -PromptUserToPlaySlots: ; 3730e (d:730e) +PromptUserToPlaySlots: call SaveScreenTilesToBuffer2 ld a, BANK(DisplayTextIDInit) ld [wAutoTextBoxDrawingControl], a @@ -10,90 +10,90 @@ PromptUserToPlaySlots: ; 3730e (d:730e) call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .skip + jr nz, .done ; if player chose No dec a ld [wUpdateSpritesEnabled], a - ld hl, wcd4f + ld hl, wSlotMachineRerollCounter xor a ld [hli], a - ld [hl], $2 + ld [hl], SMILE_BUBBLE predef EmotionBubble call GBPalWhiteOutWithDelay3 call LoadSlotMachineTiles call LoadFontTilePatterns - ld b, $5 - call GoPAL_SET + ld b, SET_PAL_SLOTS + call RunPaletteCommand call GBPalNormal ld a, $e4 - ld [$ff48], a + ld [rOBP0], a ld hl, wd730 set 6, [hl] xor a - ld [W_SUBANIMSUBENTRYADDR], a - ld hl, wTrainerSpriteOffset + ld [wSlotMachineAllowMatchesCounter], a + ld hl, wStoppingWhichSlotMachineWheel ld bc, $0014 call FillMemory call MainSlotMachineLoop ld hl, wd730 res 6, [hl] xor a - ld [W_SUBANIMSUBENTRYADDR], a + ld [wSlotMachineAllowMatchesCounter], a call GBPalWhiteOutWithDelay3 ld a, $1 ld [wUpdateSpritesEnabled], a - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand call ReloadMapSpriteTilePatterns call ReloadTilesetTilePatterns -.skip +.done call LoadScreenTilesFromBuffer2 call Delay3 call GBPalNormal - ld a, [wcc5e] + ld a, [wSlotMachineSavedROMBank] push af jp CloseTextDisplay -PlaySlotMachineText: ; 37390 (d:7390) +PlaySlotMachineText: TX_FAR _PlaySlotMachineText db "@" -MainSlotMachineLoop: ; 37395 (d:7395) - call SlotMachine_37754 +MainSlotMachineLoop: + call SlotMachine_PrintCreditCoins xor a - ld hl, wcd4a + ld hl, wPayoutCoins ld [hli], a ld [hl], a - call SlotMachine_3775f + call SlotMachine_PrintPayoutCoins ld hl, BetHowManySlotMachineText call PrintText call SaveScreenTilesToBuffer1 .loop - ld a, $3 + ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a - ld a, $2 + ld a, 2 ld [wMaxMenuItem], a - ld a, $c + ld a, 12 ld [wTopMenuItemY], a - ld a, $f + ld a, 15 ld [wTopMenuItemX], a xor a ld [wCurrentMenuItem], a ld [wLastMenuItem], a - ld [wcc37], a - ld hl, wTileMap + $ea - ld b, $5 - ld c, $4 + ld [wMenuWatchMovingOutOfBounds], a + coord hl, 14, 11 + ld b, 5 + ld c, 4 call TextBoxBorder - ld hl, wTileMap + $100 + coord hl, 16, 12 ld de, CoinMultiplierSlotMachineText call PlaceString call HandleMenuInput - and $2 + and B_BUTTON jp nz, LoadScreenTilesFromBuffer1 ld a, [wCurrentMenuItem] ld b, a - ld a, $3 + ld a, 3 sub b - ld [wcd50], a + ld [wSlotMachineBet], a ld hl, wPlayerCoins ld c, a ld a, [hli] @@ -107,34 +107,34 @@ MainSlotMachineLoop: ; 37395 (d:7395) jr .loop .skip1 call LoadScreenTilesFromBuffer1 - call SlotMachine_37741 - call SlotMachine_377d5 - call SlotMachine_37480 - ld a, $4 - ld hl, wcd4d + call SlotMachine_SubtractBetFromPlayerCoins + call SlotMachine_LightBalls + call SlotMachine_SetFlags + ld a, 4 + ld hl, wSlotMachineWheel1SlipCounter ld [hli], a ld [hli], a ld [hl], a call WaitForSoundToFinish - ld a, (SFX_1f_66 - SFX_Headers_1f) / 3 + ld a, SFX_SLOTS_NEW_SPIN call PlaySound ld hl, StartSlotMachineText call PrintText - call SlotMachine_374ad - call SlotMachine_37588 + call SlotMachine_SpinWheels + call SlotMachine_CheckForMatches ld hl, wPlayerCoins ld a, [hli] or [hl] jr nz, .skip2 ld hl, OutOfCoinsSlotMachineText call PrintText - ld c, $3c + ld c, 60 jp DelayFrames .skip2 ld hl, OneMoreGoSlotMachineText call PrintText - ld hl, wTileMap + $fe - ld bc, $0d0f + coord hl, 14, 12 + lb bc, 13, 15 xor a ; YES_NO_MENU ld [wTwoOptionMenuID], a ld a, TWO_OPTION_MENU @@ -143,83 +143,83 @@ MainSlotMachineLoop: ; 37395 (d:7395) ld a, [wCurrentMenuItem] and a ret nz - call SlotMachine_377ce + call SlotMachine_PutOutLitBalls jp MainSlotMachineLoop -CoinMultiplierSlotMachineText: ; 3745e (d:745e) +CoinMultiplierSlotMachineText: db "×3" next "×2" next "×1@" -OutOfCoinsSlotMachineText: ; 37467 (d:7467) +OutOfCoinsSlotMachineText: TX_FAR _OutOfCoinsSlotMachineText db "@" -BetHowManySlotMachineText: ; 3746c (d:746c) +BetHowManySlotMachineText: TX_FAR _BetHowManySlotMachineText db "@" -StartSlotMachineText: ; 37471 (d:7471) +StartSlotMachineText: TX_FAR _StartSlotMachineText db "@" -NotEnoughCoinsSlotMachineText: ; 37476 (d:7476) +NotEnoughCoinsSlotMachineText: TX_FAR _NotEnoughCoinsSlotMachineText db "@" -OneMoreGoSlotMachineText: ; 3747b (d:747b) +OneMoreGoSlotMachineText: TX_FAR _OneMoreGoSlotMachineText db "@" -SlotMachine_37480: ; 37480 (d:7480) - ld hl, wcd4c +SlotMachine_SetFlags: + ld hl, wSlotMachineFlags bit 7, [hl] ret nz - ld a, [W_SUBANIMSUBENTRYADDR] + ld a, [wSlotMachineAllowMatchesCounter] and a - jr nz, .skip1 + jr nz, .allowMatches call Random and a - jr z, .skip2 + jr z, .setAllowMatchesCounter ; 1/256 (~0.4%) chance ld b, a - ld a, [wcc5b] + ld a, [wSlotMachineSevenAndBarModeChance] cp b - jr c, .skip3 - ld a, $d2 + jr c, .allowSevenAndBarMatches + ld a, 210 cp b - jr c, .skip1 - ld [hl], $0 + jr c, .allowMatches ; 55/256 (~21.5%) chance + ld [hl], 0 ret -.skip1 +.allowMatches set 6, [hl] ret -.skip2 - ld a, $3c - ld [W_SUBANIMSUBENTRYADDR], a +.setAllowMatchesCounter + ld a, 60 + ld [wSlotMachineAllowMatchesCounter], a ret -.skip3 +.allowSevenAndBarMatches set 7, [hl] ret -SlotMachine_374ad: ; 374ad (d:74ad) - ld c, $14 +SlotMachine_SpinWheels: + ld c, 20 .loop1 push bc - call SlotMachine_37813 - call SlotMachine_37823 - call SlotMachine_37833 - ld c, $2 + call SlotMachine_AnimWheel1 + call SlotMachine_AnimWheel2 + call SlotMachine_AnimWheel3 + ld c, 2 call DelayFrames pop bc dec c jr nz, .loop1 xor a - ld [wTrainerSpriteOffset], a + ld [wStoppingWhichSlotMachineWheel], a .loop2 - call SlotMachine_37882 - call SlotMachine_374df - call SlotMachine_374fb - call SlotMachine_37517 + call SlotMachine_HandleInputWhileWheelsSpin + call SlotMachine_StopOrAnimWheel1 + call SlotMachine_StopOrAnimWheel2 + call SlotMachine_StopOrAnimWheel3 ret c ld a, [wOnSGB] xor $1 @@ -228,194 +228,214 @@ SlotMachine_374ad: ; 374ad (d:74ad) call DelayFrames jr .loop2 -SlotMachine_374df: ; 374df (d:74df) - ld a, [wTrainerSpriteOffset] - cp $1 - jr c, .skip - ld de, wTrainerEngageDistance +; Note that the wheels can only stop when a symbol is centred in the wheel +; and thus 3 full symbols rather than 2 full symbols and 2 half symbols are +; visible. The 3 functions below ensure this by checking if the wheel offset +; is even before stopping the wheel. + +SlotMachine_StopOrAnimWheel1: + ld a, [wStoppingWhichSlotMachineWheel] + cp 1 + jr c, .animWheel + ld de, wSlotMachineWheel1Offset ld a, [de] rra - jr nc, .skip - ld hl, wcd4d + jr nc, .animWheel ; check that a symbol is centred in the wheel + ld hl, wSlotMachineWheel1SlipCounter ld a, [hl] and a ret z dec [hl] - call SlotMachine_3752c + call SlotMachine_StopWheel1Early ret nz -.skip - jp SlotMachine_37813 - -SlotMachine_374fb: ; 374fb (d:74fb) - ld a, [wTrainerSpriteOffset] - cp $2 - jr c, .skip - ld de, wTrainerFacingDirection +.animWheel + jp SlotMachine_AnimWheel1 + +SlotMachine_StopOrAnimWheel2: + ld a, [wStoppingWhichSlotMachineWheel] + cp 2 + jr c, .animWheel + ld de, wSlotMachineWheel2Offset ld a, [de] rra - jr nc, .skip - ld hl, wcd4e + jr nc, .animWheel ; check that a symbol is centred in the wheel + ld hl, wSlotMachineWheel2SlipCounter ld a, [hl] and a ret z dec [hl] - call SlotMachine_37552 + call SlotMachine_StopWheel2Early ret z -.skip - jp SlotMachine_37823 - -SlotMachine_37517: ; 37517 (d:7517) - ld a, [wTrainerSpriteOffset] - cp $3 - jr c, .skip - ld de, wTrainerScreenY +.animWheel + jp SlotMachine_AnimWheel2 + +SlotMachine_StopOrAnimWheel3: + ld a, [wStoppingWhichSlotMachineWheel] + cp 3 + jr c, .animWheel + ld de, wSlotMachineWheel3Offset ld a, [de] rra - jr nc, .skip + jr nc, .animWheel ; check that a symbol is centred in the wheel +; wheel 3 stops as soon as possible scf ret -.skip - call SlotMachine_37833 +.animWheel + call SlotMachine_AnimWheel3 and a ret -SlotMachine_3752c: ; 3752c (d:752c) - call SlotMachine_GetWheelOneTile - ld hl, wTrainerScreenX - ld a, [wcd4c] +SlotMachine_StopWheel1Early: + call SlotMachine_GetWheel1Tiles + ld hl, wSlotMachineWheel1BottomTile + ld a, [wSlotMachineFlags] and $80 - jr nz, .skip1 + jr nz, .sevenAndBarMode +; Stop early if the middle symbol is not a cherry. inc hl ld a, [hl] - cp $a - jr nz, .skip2 + cp SLOTSCHERRY >> 8 + jr nz, .stopWheel ret -.skip1 +; It looks like this was intended to make the wheel stop when a 7 symbol was +; visible, but it has a bug and so the wheel stops randomly. +.sevenAndBarMode ld c, $3 .loop ld a, [hli] - cp $2 - jr c, .skip2 + cp SLOTS7 >> 8 + jr c, .stopWheel ; condition never true dec c jr nz, .loop ret -.skip2 +.stopWheel inc a - ld hl, wcd4d - ld [hl], $0 + ld hl, wSlotMachineWheel1SlipCounter + ld [hl], 0 ret -SlotMachine_37552: ; 37552 (d:7552) - call SlotMachine_GetWheelTwoTile - ld a, [wcd4c] +SlotMachine_StopWheel2Early: + call SlotMachine_GetWheel2Tiles + ld a, [wSlotMachineFlags] and $80 - jr nz, .skip1 - call SlotMachine_3756e + jr nz, .sevenAndBarMode +; Stop early if any symbols are lined up in the first two wheels. + call SlotMachine_FindWheel1Wheel2Matches ret nz - jr .skip2 -.skip1 - call SlotMachine_3756e + jr .stopWheel +; Stop early if two 7 symbols or two bar symbols are lined up in the first two +; wheels OR if no symbols are lined up and the bottom symbol in wheel 2 is a +; 7 symbol or bar symbol. The second part could be a bug or a way to reduce the +; player's odds. +.sevenAndBarMode + call SlotMachine_FindWheel1Wheel2Matches ld a, [de] - cp $7 + cp (SLOTSBAR >> 8) + 1 ret nc -.skip2 +.stopWheel xor a - ld [wcd4e], a + ld [wSlotMachineWheel2SlipCounter], a ret -SlotMachine_3756e: ; 3756e (d:756e) - ld hl, wTrainerScreenX - ld de, wcd44 +SlotMachine_FindWheel1Wheel2Matches: +; return whether wheel 1 and wheel 2's current positions allow a match (given +; that wheel 3 stops in a good position) in Z + ld hl, wSlotMachineWheel1BottomTile + ld de, wSlotMachineWheel2BottomTile ld a, [de] - cp [hl] + cp [hl] ; wheel 1 bottom, wheel 2 bottom ret z inc de ld a, [de] - cp [hl] + cp [hl] ; wheel 1 bottom, wheel 2 middle ret z inc hl - cp [hl] + cp [hl] ; wheel 1 middle, wheel 2 middle ret z inc hl - cp [hl] + cp [hl] ; wheel 1 top, wheel 2 middle ret z inc de ld a, [de] - cp [hl] + cp [hl] ; wheel 1 top, wheel 2 top ret z dec de dec de ret -SlotMachine_37588: ; 37588 (d:7588) - call SlotMachine_GetWheelThreeTile - ld a, [wcd50] - cp $2 - jr z, .skip1 - cp $1 - jr z, .skip2 - ld hl, wTrainerScreenX - ld de, wcd45 - ld bc, wcd49 +SlotMachine_CheckForMatches: + call SlotMachine_GetWheel3Tiles + ld a, [wSlotMachineBet] + cp 2 + jr z, .checkMatchesFor2CoinBet + cp 1 + jr z, .checkMatchFor1CoinBet +; 3 coin bet allows diagonal matches (plus the matches for 1/2 coin bets) + ld hl, wSlotMachineWheel1BottomTile + ld de, wSlotMachineWheel2MiddleTile + ld bc, wSlotMachineWheel3TopTile call SlotMachine_CheckForMatch - jp z, .skip5 - ld hl, wcd43 - ld de, wcd45 - ld bc, wcd47 + jp z, .foundMatch + ld hl, wSlotMachineWheel1TopTile + ld de, wSlotMachineWheel2MiddleTile + ld bc, wSlotMachineWheel3BottomTile call SlotMachine_CheckForMatch - jr z, .skip5 -.skip1 - ld hl, wcd43 - ld de, wcd46 - ld bc, wcd49 + jr z, .foundMatch +; 2 coin bet allows top/bottom horizontal matches (plus the match for a 1 coin bet) +.checkMatchesFor2CoinBet + ld hl, wSlotMachineWheel1TopTile + ld de, wSlotMachineWheel2TopTile + ld bc, wSlotMachineWheel3TopTile call SlotMachine_CheckForMatch - jr z, .skip5 - ld hl, wTrainerScreenX - ld de, wcd44 - ld bc, wcd47 + jr z, .foundMatch + ld hl, wSlotMachineWheel1BottomTile + ld de, wSlotMachineWheel2BottomTile + ld bc, wSlotMachineWheel3BottomTile call SlotMachine_CheckForMatch - jr z, .skip5 -.skip2 - ld hl, wcd42 - ld de, wcd45 - ld bc, wcd48 + jr z, .foundMatch +; 1 coin bet only allows a middle horizontal match +.checkMatchFor1CoinBet + ld hl, wSlotMachineWheel1MiddleTile + ld de, wSlotMachineWheel2MiddleTile + ld bc, wSlotMachineWheel3MiddleTile call SlotMachine_CheckForMatch - jr z, .skip5 - ld a, [wcd4c] + jr z, .foundMatch + ld a, [wSlotMachineFlags] and $c0 - jr z, .skip3 - ld hl, wcd4f + jr z, .noMatch + ld hl, wSlotMachineRerollCounter dec [hl] - jr nz, .skip4 -.skip3 + jr nz, .rollWheel3DownByOneSymbol +.noMatch ld hl, NotThisTimeText call PrintText -.loop +.done xor a - ld [wc002], a + ld [wMuteAudioAndPauseMusic], a ret -.skip4 - call SlotMachine_37833 +.rollWheel3DownByOneSymbol + call SlotMachine_AnimWheel3 call DelayFrame - call SlotMachine_37833 + call SlotMachine_AnimWheel3 call DelayFrame - jp SlotMachine_37588 -.skip5 - ld a, [wcd4c] + jp SlotMachine_CheckForMatches +.foundMatch + ld a, [wSlotMachineFlags] and $c0 - jr z, .skip4 + jr z, .rollWheel3DownByOneSymbol ; roll wheel if player isn't allowed to win and $80 - jr nz, .skip6 + jr nz, .acceptMatch +; if 7/bar matches aren't enabled and the match was a 7/bar symbol, roll wheel ld a, [hl] - cp $7 - jr c, .skip4 -.skip6 + cp (SLOTSBAR >> 8) + 1 + jr c, .rollWheel3DownByOneSymbol +.acceptMatch ld a, [hl] sub $2 - ld [wTrainerScreenX], a + ld [wSlotMachineWinningSymbol], a ld hl, SlotRewardPointers ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hli] ld e, a @@ -426,39 +446,39 @@ SlotMachine_37588: ; 37588 (d:7588) ld h, [hl] ld l, a ld de, wcf4b - ld bc, $0004 + ld bc, 4 call CopyData pop hl - ld de, .asm_37638 + ld de, .flashScreenLoop push de jp [hl] -.asm_37638 - ld a, [$ff47] +.flashScreenLoop + ld a, [rBGP] xor $40 - ld [$ff47], a - ld c, $5 + ld [rBGP], a + ld c, 5 call DelayFrames dec b - jr nz, .asm_37638 - ld hl, wcd4a + jr nz, .flashScreenLoop + ld hl, wPayoutCoins ld [hl], d inc hl ld [hl], e - call SlotMachine_3775f - ld hl, SlotsMachineText_37665 + call SlotMachine_PrintPayoutCoins + ld hl, SymbolLinedUpSlotMachineText call PrintText call WaitForTextScrollButtonPress - call SlotMachine_3776b - call SlotMachine_3775f + call SlotMachine_PayCoinsToPlayer + call SlotMachine_PrintPayoutCoins ld a, $e4 - ld [$ff48], a - jp .loop + ld [rOBP0], a + jp .done -SlotsMachineText_37665: ; 37665 (d:7665) - db $08 ; asm +SymbolLinedUpSlotMachineText: + TX_ASM push bc - call SlotMachine_37728 + call SlotMachine_PrintWinningSymbol ld hl, LinedUpText pop bc inc bc @@ -467,11 +487,11 @@ SlotsMachineText_37665: ; 37665 (d:7665) inc bc ret -LinedUpText: ; 37673 (d:7673) +LinedUpText: TX_FAR _LinedUpText db "@" -SlotRewardPointers: ; 37678 (d:7678) +SlotRewardPointers: dw SlotReward300Func dw SlotReward300Text dw SlotReward100Func @@ -485,24 +505,24 @@ SlotRewardPointers: ; 37678 (d:7678) dw SlotReward15Func dw SlotReward15Text -SlotReward300Text: ; 37690 (d:7690) +SlotReward300Text: db "300@" -SlotReward100Text: ; 37694 (d:7694) +SlotReward100Text: db "100@" -SlotReward8Text: ; 37698 (d:7698) +SlotReward8Text: db "8@" -SlotReward15Text: ; 3769a (d:769a) +SlotReward15Text: db "15@" -NotThisTimeText: ; 3769d (d:769d) +NotThisTimeText: TX_FAR _NotThisTimeText db "@" ; compares the slot machine tiles at bc, de, and hl -SlotMachine_CheckForMatch: ; 376a2 (d:76a2) +SlotMachine_CheckForMatch: ld a, [de] cp [hl] ret nz @@ -510,28 +530,28 @@ SlotMachine_CheckForMatch: ; 376a2 (d:76a2) cp [hl] ret -SlotMachine_GetWheelThreeTile: ; 376a8 (d:76a8) - ld de, wcd47 +SlotMachine_GetWheel3Tiles: + ld de, wSlotMachineWheel3BottomTile ld hl, SlotMachineWheel3 - ld a, [wTrainerScreenY] - call SlotMachine_GetWheelTile + ld a, [wSlotMachineWheel3Offset] + call SlotMachine_GetWheelTiles -SlotMachine_GetWheelTwoTile: ; 376b4 (d:76b4) - ld de, wcd44 +SlotMachine_GetWheel2Tiles: + ld de, wSlotMachineWheel2BottomTile ld hl, SlotMachineWheel2 - ld a, [wTrainerFacingDirection] - call SlotMachine_GetWheelTile + ld a, [wSlotMachineWheel2Offset] + call SlotMachine_GetWheelTiles -SlotMachine_GetWheelOneTile: ; 376c0 (d:76c0) - ld de, wTrainerScreenX +SlotMachine_GetWheel1Tiles: + ld de, wSlotMachineWheel1BottomTile ld hl, SlotMachineWheel1 - ld a, [wTrainerEngageDistance] + ld a, [wSlotMachineWheel1Offset] -SlotMachine_GetWheelTile: ; 376c9 (d:76c9) +SlotMachine_GetWheelTiles: ld c, a - ld b, $0 + ld b, 0 add hl, bc - ld c, $3 + ld c, 3 .loop ld a, [hli] ld [de], a @@ -541,8 +561,8 @@ SlotMachine_GetWheelTile: ; 376c9 (d:76c9) jr nz, .loop ret -SlotReward8Func: ; 376d7 (d:76d7) - ld hl, W_SUBANIMSUBENTRYADDR +SlotReward8Func: + ld hl, wSlotMachineAllowMatchesCounter ld a, [hl] and a jr z, .skip @@ -552,8 +572,8 @@ SlotReward8Func: ; 376d7 (d:76d7) ld de, 8 ret -SlotReward15Func: ; 376e5 (d:76e5) - ld hl, W_SUBANIMSUBENTRYADDR +SlotReward15Func: + ld hl, wSlotMachineAllowMatchesCounter ld a, [hl] and a jr z, .skip @@ -563,55 +583,57 @@ SlotReward15Func: ; 376e5 (d:76e5) ld de, 15 ret -SlotReward100Func: ; 376f3 (d:76f3) - ld a, (SFX_1f_42 - SFX_Headers_1f) / 3 +SlotReward100Func: + ld a, SFX_GET_KEY_ITEM call PlaySound xor a - ld [wcd4c], a + ld [wSlotMachineFlags], a ld b, $8 ld de, 100 ret -SlotReward300Func: ; 37702 (d:7702) +SlotReward300Func: ld hl, YeahText call PrintText - ld a, (SFX_1f_3b - SFX_Headers_1f) / 3 + ld a, SFX_GET_ITEM_2 call PlaySound call Random cp $80 ld a, $0 jr c, .skip - ld [wcd4c], a + ld [wSlotMachineFlags], a .skip - ld [W_SUBANIMSUBENTRYADDR], a + ld [wSlotMachineAllowMatchesCounter], a ld b, $14 ld de, 300 ret -YeahText: ; 37722 (d:7722) +YeahText: TX_FAR _YeahText - db $0a, "@" + TX_DELAY + db "@" -SlotMachine_37728: ; 37728 (d:7728) - ld hl, wTileMap + $11a - ld a, [wTrainerScreenX] +SlotMachine_PrintWinningSymbol: +; prints winning symbol and down arrow in text box + coord hl, 2, 14 + ld a, [wSlotMachineWinningSymbol] add $25 ld [hli], a inc a ld [hld], a inc a - ld de, $ffec + ld de, -SCREEN_WIDTH add hl, de ld [hli], a inc a ld [hl], a - ld hl, wTileMap + $152 - ld [hl], $ee + coord hl, 18, 16 + ld [hl], "▼" ret -SlotMachine_37741: ; 37741 (d:7741) - ld hl, wcd4b - ld a, [wcd50] +SlotMachine_SubtractBetFromPlayerCoins: + ld hl, wTempCoins2 + 1 + ld a, [wSlotMachineBet] ld [hld], a xor a ld [hli], a @@ -619,158 +641,164 @@ SlotMachine_37741: ; 37741 (d:7741) ld c, $2 predef SubBCDPredef -SlotMachine_37754: ; 37754 (d:7754) - ld hl, wTileMap + $19 +SlotMachine_PrintCreditCoins: + coord hl, 5, 1 ld de, wPlayerCoins ld c, $2 jp PrintBCDNumber -SlotMachine_3775f: ; 3775f (d:775f) - ld hl, wTileMap + $1f - ld de, wcd4a - ld bc, $8204 +SlotMachine_PrintPayoutCoins: + coord hl, 11, 1 + ld de, wPayoutCoins + lb bc, LEADING_ZEROES | 2, 4 ; 2 bytes, 4 digits jp PrintNumber -SlotMachine_3776b: ; 3776b (d:776b) +SlotMachine_PayCoinsToPlayer: ld a, $1 - ld [wc002], a + ld [wMuteAudioAndPauseMusic], a call WaitForSoundToFinish - ld hl, wcd46 + +; Put 1 in the temp coins variable. This value is added to the player's coins +; repeatedly so the player can watch the value go up 1 coin at a time. + ld hl, wTempCoins1 xor a ld [hli], a inc a ld [hl], a - ld a, $5 - ld [W_SUBANIMTRANSFORM], a + + ld a, 5 + ld [wAnimCounter], a + +; Subtract 1 from the payout amount and add 1 to the player's coins each +; iteration until the payout amount reaches 0. .loop - ld a, [wcd4b] + ld a, [wPayoutCoins + 1] ld l, a - ld a, [wcd4a] + ld a, [wPayoutCoins] ld h, a or l ret z - ld de, $ffff + ld de, -1 add hl, de ld a, l - ld [wcd4b], a + ld [wPayoutCoins + 1], a ld a, h - ld [wcd4a], a - ld hl, wcd47 + ld [wPayoutCoins], a + ld hl, wTempCoins1 + 1 ld de, wPlayerCoins + 1 ld c, $2 predef AddBCDPredef - call SlotMachine_37754 - call SlotMachine_3775f - ld a, (SFX_1f_65 - SFX_Headers_1f) / 3 + call SlotMachine_PrintCreditCoins + call SlotMachine_PrintPayoutCoins + ld a, SFX_SLOTS_REWARD call PlaySound - ld a, [W_SUBANIMTRANSFORM] + ld a, [wAnimCounter] dec a jr nz, .skip1 - ld a, [$ff48] - xor $40 - ld [$ff48], a - ld a, $5 + ld a, [rOBP0] + xor $40 ; make the slot wheel symbols flash + ld [rOBP0], a + ld a, 5 .skip1 - ld [W_SUBANIMTRANSFORM], a - ld a, [wTrainerScreenX] - cp $7 - ld c, $8 + ld [wAnimCounter], a + ld a, [wSlotMachineWinningSymbol] + cp (SLOTSBAR >> 8) + 1 + ld c, 8 jr nc, .skip2 - srl c + srl c ; c = 4 (make the the coins transfer faster if the symbol was 7 or bar) .skip2 call DelayFrames jr .loop -SlotMachine_377ce: ; 377ce (d:77ce) +SlotMachine_PutOutLitBalls: ld a, $23 - ld [wd08a], a - jr SlotMachine_377e3 + ld [wNewSlotMachineBallTile], a + jr SlotMachine_UpdateThreeCoinBallTiles -SlotMachine_377d5: ; 377d5 (d:77d5) +SlotMachine_LightBalls: ld a, $14 - ld [wd08a], a - ld a, [wcd50] + ld [wNewSlotMachineBallTile], a + ld a, [wSlotMachineBet] dec a - jr z, SlotMachine_377fb + jr z, SlotMachine_UpdateOneCoinBallTiles dec a - jr z, SlotMachine_377ef + jr z, SlotMachine_UpdateTwoCoinBallTiles -SlotMachine_377e3: ; 377e3 (d:77e3) - ld hl, wTileMap + $2b - call SlotMachine_377fe - ld hl, wTileMap + $cb - call SlotMachine_377fe +SlotMachine_UpdateThreeCoinBallTiles: + coord hl, 3, 2 + call SlotMachine_UpdateBallTiles + coord hl, 3, 10 + call SlotMachine_UpdateBallTiles -SlotMachine_377ef: ; 377ef (d:77ef) - ld hl, wTileMap + $53 - call SlotMachine_377fe - ld hl, wTileMap + $a3 - call SlotMachine_377fe +SlotMachine_UpdateTwoCoinBallTiles: + coord hl, 3, 4 + call SlotMachine_UpdateBallTiles + coord hl, 3, 8 + call SlotMachine_UpdateBallTiles -SlotMachine_377fb: ; 377fb (d:77fb) - ld hl, wTileMap + $7b +SlotMachine_UpdateOneCoinBallTiles: + coord hl, 3, 6 -SlotMachine_377fe: ; 377fe (d:77fe) - ld a, [wd08a] +SlotMachine_UpdateBallTiles: + ld a, [wNewSlotMachineBallTile] ld [hl], a - ld bc, $000d + ld bc, 13 add hl, bc ld [hl], a - ld bc, $0007 + ld bc, 7 add hl, bc inc a ld [hl], a - ld bc, $000d + ld bc, 13 add hl, bc ld [hl], a ret -SlotMachine_37813: ; 37813 (d:7813) +SlotMachine_AnimWheel1: ld bc, SlotMachineWheel1 - ld de, wTrainerEngageDistance + ld de, wSlotMachineWheel1Offset ld hl, wOAMBuffer ld a, $30 - ld [W_BASECOORDX], a - jr SlotMachine_37841 + ld [wBaseCoordX], a + jr SlotMachine_AnimWheel -SlotMachine_37823: ; 37823 (d:7823) +SlotMachine_AnimWheel2: ld bc, SlotMachineWheel2 - ld de, wTrainerFacingDirection + ld de, wSlotMachineWheel2Offset ld hl, wOAMBuffer + $30 ld a, $50 - ld [W_BASECOORDX], a - jr SlotMachine_37841 + ld [wBaseCoordX], a + jr SlotMachine_AnimWheel -SlotMachine_37833: ; 37833 (d:7833) +SlotMachine_AnimWheel3: ld bc, SlotMachineWheel3 - ld de, wTrainerScreenY + ld de, wSlotMachineWheel3Offset ld hl, wOAMBuffer + $60 ld a, $70 - ld [W_BASECOORDX], a + ld [wBaseCoordX], a -SlotMachine_37841: ; 37841 (d:7841) +SlotMachine_AnimWheel: ld a, $58 - ld [W_BASECOORDY], a + ld [wBaseCoordY], a push de ld a, [de] ld d, b add c ld e, a - jr nc, SlotMachine_3784e + jr nc, .loop inc d - -SlotMachine_3784e: ; 3784e (d:784e) - ld a, [W_BASECOORDY] +.loop + ld a, [wBaseCoordY] ld [hli], a - ld a, [W_BASECOORDX] + ld a, [wBaseCoordX] ld [hli], a ld a, [de] ld [hli], a ld a, $80 ld [hli], a - ld a, [W_BASECOORDY] + ld a, [wBaseCoordY] ld [hli], a - ld a, [W_BASECOORDX] + ld a, [wBaseCoordX] add $8 ld [hli], a ld a, [de] @@ -779,38 +807,38 @@ SlotMachine_3784e: ; 3784e (d:784e) ld a, $80 ld [hli], a inc de - ld a, [W_BASECOORDY] + ld a, [wBaseCoordY] sub $8 - ld [W_BASECOORDY], a + ld [wBaseCoordY], a cp $28 - jr nz, SlotMachine_3784e + jr nz, .loop pop de ld a, [de] - inc a - cp $1e + inc a ; advance the offset so that the wheel animates + cp 30 jr nz, .skip - xor a + xor a ; wrap around to 0 when the offset reaches 30 .skip ld [de], a ret -SlotMachine_37882: ; 37882 (d:7882) +SlotMachine_HandleInputWhileWheelsSpin: call DelayFrame call JoypadLowSensitivity ld a, [hJoy5] - and $1 + and A_BUTTON ret z - ld hl, wTrainerSpriteOffset + ld hl, wStoppingWhichSlotMachineWheel ld a, [hl] dec a - ld de, wcd4d + ld de, wSlotMachineWheel1SlipCounter jr z, .skip dec a - ld de, wcd4e + ld de, wSlotMachineWheel2SlipCounter jr z, .skip .loop inc [hl] - ld a, (SFX_1f_64 - SFX_Headers_1f) / 3 + ld a, SFX_SLOTS_STOP_WHEEL jp PlaySound .skip ld a, [de] @@ -818,7 +846,7 @@ SlotMachine_37882: ; 37882 (d:7882) ret nz jr .loop -LoadSlotMachineTiles: ; 378a8 (d:78a8) +LoadSlotMachineTiles: call DisableLCD ld hl, SlotMachineTiles2 ld de, vChars0 @@ -836,38 +864,29 @@ LoadSlotMachineTiles: ; 378a8 (d:78a8) ld a, BANK(SlotMachineTiles2) call FarCopyData2 ld hl, SlotMachineMap - ld de, wTileMap - ld bc, $00f0 + coord de, 0, 0 + ld bc, SlotMachineMapEnd - SlotMachineMap call CopyData call EnableLCD - ld hl, wTrainerEngageDistance + ld hl, wSlotMachineWheel1Offset ld a, $1c ld [hli], a ld [hli], a ld [hl], a - call SlotMachine_37813 - call SlotMachine_37823 - jp SlotMachine_37833 + call SlotMachine_AnimWheel1 + call SlotMachine_AnimWheel2 + jp SlotMachine_AnimWheel3 -SlotMachineMap: ; 378f5 (d:78f5) +SlotMachineMap: INCBIN "gfx/tilemaps/slotmachine.map" - -SLOTS7 EQU $0200 -SLOTSBAR EQU $0604 -SLOTSCHERRY EQU $0A08 -SLOTSFISH EQU $0E0C -SLOTSBIRD EQU $1210 -SLOTSMOUSE EQU $1614 +SlotMachineMapEnd: INCLUDE "data/slot_machine_wheels.asm" -SlotMachineTiles1: ; 37a51 (d:7a51) +SlotMachineTiles1: IF DEF(_RED) INCBIN "gfx/red/slotmachine1.2bpp" ENDC IF DEF(_BLUE) INCBIN "gfx/blue/slotmachine1.2bpp" ENDC -IF DEF(_YELLOW) - INCBIN "gfx/yellow/slotmachine1.2bpp" -ENDC diff --git a/engine/special_warps.asm b/engine/special_warps.asm new file mode 100644 index 00000000..de00a817 --- /dev/null +++ b/engine/special_warps.asm @@ -0,0 +1,149 @@ +SpecialWarpIn: + call LoadSpecialWarpData + predef LoadTilesetHeader + ld hl,wd732 + bit 2,[hl] ; dungeon warp or fly warp? + res 2,[hl] + jr z,.next +; if dungeon warp or fly warp + ld a,[wDestinationMap] + jr .next2 +.next + bit 1,[hl] + jr z,.next3 + call EmptyFunc +.next3 + ld a,0 +.next2 + ld b,a + ld a,[wd72d] + and a + jr nz,.next4 + ld a,b +.next4 + ld hl,wd732 + bit 4,[hl] ; dungeon warp? + ret nz +; if not dungeon warp + ld [wLastMap],a + ret + +; gets the map ID, tile block map view pointer, tileset, and coordinates +LoadSpecialWarpData: + ld a, [wd72d] + cp TRADE_CENTER + jr nz, .notTradeCenter + ld hl, TradeCenterSpec1 + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK ; which gameboy is clocking determines who is on the left and who is on the right + jr z, .copyWarpData + ld hl, TradeCenterSpec2 + jr .copyWarpData +.notTradeCenter + cp COLOSSEUM + jr nz, .notColosseum + ld hl, ColosseumSpec1 + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .copyWarpData + ld hl, ColosseumSpec2 + jr .copyWarpData +.notColosseum + ld a, [wd732] + bit 1, a + jr nz, .notFirstMap + bit 2, a + jr nz, .notFirstMap + ld hl, FirstMapSpec +.copyWarpData + ld de, wCurMap + ld c, $7 +.copyWarpDataLoop + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .copyWarpDataLoop + ld a, [hli] + ld [wCurMapTileset], a + xor a + jr .done +.notFirstMap + ld a, [wLastMap] ; this value is overwritten before it's ever read + ld hl, wd732 + bit 4, [hl] ; used dungeon warp (jumped down hole/waterfall)? + jr nz, .usedDunegonWarp + bit 6, [hl] ; return to last pokemon center (or player's house)? + res 6, [hl] + jr z, .otherDestination +; return to last pokemon center or player's house + ld a, [wLastBlackoutMap] + jr .usedFlyWarp +.usedDunegonWarp + ld hl, wd72d + res 4, [hl] + ld a, [wDungeonWarpDestinationMap] + ld b, a + ld [wCurMap], a + ld a, [wWhichDungeonWarp] + ld c, a + ld hl, DungeonWarpList + ld de, 0 + ld a, 6 + ld [wDungeonWarpDataEntrySize], a +.dungeonWarpListLoop + ld a, [hli] + cp b + jr z, .matchedDungeonWarpDestinationMap + inc hl + jr .nextDungeonWarp +.matchedDungeonWarpDestinationMap + ld a, [hli] + cp c + jr z, .matchedDungeonWarpID +.nextDungeonWarp + ld a, [wDungeonWarpDataEntrySize] + add e + ld e, a + jr .dungeonWarpListLoop +.matchedDungeonWarpID + ld hl, DungeonWarpData + add hl, de + jr .copyWarpData2 +.otherDestination + ld a, [wDestinationMap] +.usedFlyWarp + ld b, a + ld [wCurMap], a + ld hl, FlyWarpDataPtr +.flyWarpDataPtrLoop + ld a, [hli] + inc hl + cp b + jr z, .foundFlyWarpMatch + inc hl + inc hl + jr .flyWarpDataPtrLoop +.foundFlyWarpMatch + ld a, [hli] + ld h, [hl] + ld l, a +.copyWarpData2 + ld de, wCurrentTileBlockMapViewPointer + ld c, $6 +.copyWarpDataLoop2 + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .copyWarpDataLoop2 + xor a ; OVERWORLD + ld [wCurMapTileset], a +.done + ld [wYOffsetSinceLastSpecialWarp], a + ld [wXOffsetSinceLastSpecialWarp], a + ld a, $ff ; the player's coordinates have already been updated using a special warp, so don't use any of the normal warps + ld [wDestinationWarpID], a + ret + +INCLUDE "data/special_warps.asm" diff --git a/engine/status_ailments.asm b/engine/status_ailments.asm index 9bcfe9f0..787533c4 100755 --- a/engine/status_ailments.asm +++ b/engine/status_ailments.asm @@ -1,4 +1,4 @@ -PrintStatusAilment: ; 747de (1d:47de) +PrintStatusAilment: ld a, [de] bit PSN, a jr nz, .psn diff --git a/engine/subtract_paid_money.asm b/engine/subtract_paid_money.asm new file mode 100644 index 00000000..2888c3fb --- /dev/null +++ b/engine/subtract_paid_money.asm @@ -0,0 +1,17 @@ +; subtracts the amount the player paid from their money +; sets carry flag if there is enough money and unsets carry flag if not +SubtractAmountPaidFromMoney_: + ld de,wPlayerMoney + ld hl,hMoney ; total price of items + ld c,3 ; length of money in bytes + call StringCmp + ret c + ld de,wPlayerMoney + 2 + ld hl,hMoney + 2 ; total price of items + ld c,3 ; length of money in bytes + predef SubBCDPredef ; subtract total price from money + ld a,MONEY_BOX + ld [wTextBoxID],a + call DisplayTextBoxID ; redraw money text box + and a + ret diff --git a/engine/test_battle.asm b/engine/test_battle.asm new file mode 100644 index 00000000..d9dcf1fa --- /dev/null +++ b/engine/test_battle.asm @@ -0,0 +1,45 @@ +TestBattle: + ret + +.loop + call GBPalNormal + + ; Don't mess around + ; with obedience. + ld a, %10000000 ; EARTHBADGE + ld [wObtainedBadges], a + + ld hl, wFlags_D733 + set BIT_TEST_BATTLE, [hl] + + ; Reset the party. + ld hl, wPartyCount + xor a + ld [hli], a + dec a + ld [hl], a + + ; Give the player a + ; level 20 Rhydon. + ld a, RHYDON + ld [wcf91], a + ld a, 20 + ld [wCurEnemyLVL], a + xor a + ld [wMonDataLocation], a + ld [wCurMap], a + call AddPartyMon + + ; Fight against a + ; level 20 Rhydon. + ld a, RHYDON + ld [wCurOpponent], a + + predef InitOpponent + + ; When the battle ends, + ; do it all again. + ld a, 1 + ld [wUpdateSpritesEnabled], a + ld [H_AUTOBGTRANSFERENABLED], a + jr .loop diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index ed23fbc4..f4cce5b4 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -1,30 +1,30 @@ -; copy text of fixed length $b (like player name, rival name, mon names, ...) -CopyFixedLengthText: ; 42b1 (1:42b1) - ld bc, $b +; copy text of fixed length NAME_LENGTH (like player name, rival name, mon names, ...) +CopyFixedLengthText: + ld bc, NAME_LENGTH jp CopyData -SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7) +SetDefaultNamesBeforeTitlescreen: ld hl, NintenText - ld de, wPlayerName ; wd158 + ld de, wPlayerName call CopyFixedLengthText ld hl, SonyText - ld de, W_RIVALNAME ; wd34a + ld de, wRivalName call CopyFixedLengthText xor a ld [hWY], a - ld [wd358], a + ld [wLetterPrintingDelayFlags], a ld hl, wd732 ld [hli], a ld [hli], a ld [hl], a ld a, BANK(Music_TitleScreen) - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a -LoadTitlescreenGraphics: ; 42dd (1:42dd) +DisplayTitleScreen: call GBPalWhiteOut ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a xor a ld [hTilesetType], a ld [hSCX], a @@ -35,82 +35,85 @@ 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 -IF DEF(_RED) - ld de,vChars2 + $600 - ld bc,$50 -ENDC -IF DEF(_BLUE) - ld de,vChars2 + $600 + $10 - ld bc,$50 - $10 -ENDC - + ld hl, Version_GFX + ld de,vChars2 + $600 - (Version_GFXEnd - Version_GFX - $50) + ld bc, Version_GFXEnd - Version_GFX ld a, BANK(Version_GFX) call FarCopyDataDouble - call Func_4519 - hlCoord 2, 1 + call ClearBothBGMaps + +; place tiles for pokemon logo (except for the last row) + coord hl, 2, 1 ld a, $80 - ld de, $14 - ld c, $6 -.asm_434d + ld de, SCREEN_WIDTH + ld c, 6 +.pokemonLogoTileLoop ld b, $10 push hl -.asm_4350 +.pokemonLogoTileRowLoop ; place tiles for one row ld [hli], a inc a dec b - jr nz, .asm_4350 + jr nz, .pokemonLogoTileRowLoop pop hl add hl, de dec c - jr nz, .asm_434d - hlCoord 2, 7 + jr nz, .pokemonLogoTileLoop + +; place tiles for the last row of the pokemon logo + coord hl, 2, 7 ld a, $31 ld b, $10 -.asm_4361 +.pokemonLogoLastTileRowLoop ld [hli], a inc a dec b - jr nz, .asm_4361 - call Func_44dd + jr nz, .pokemonLogoLastTileRowLoop + + call DrawPlayerCharacter + +; put a pokeball in the player's hand ld hl, wOAMBuffer + $28 ld a, $74 ld [hl], a - hlCoord 2, 17 - ld de, .titlescreenTilemap ; $437f + +; place tiles for title screen copyright + coord hl, 2, 17 + ld de, .tileScreenCopyrightTiles ld b, $10 -.asm_4377 +.tileScreenCopyrightTilesLoop ld a, [de] ld [hli], a inc de dec b - jr nz, .asm_4377 - jr .asm_438f + jr nz, .tileScreenCopyrightTilesLoop + + jr .next -.titlescreenTilemap ; 437f (1:437f) +.tileScreenCopyrightTiles db $41,$42,$43,$42,$44,$42,$45,$46,$47,$48,$49,$4A,$4B,$4C,$4D,$4E ; ©'95.'96.'98 GAME FREAK inc. -.asm_438f +.next call SaveScreenTilesToBuffer2 call LoadScreenTilesFromBuffer2 call EnableLCD @@ -121,39 +124,41 @@ IF DEF(_BLUE) ld a,SQUIRTLE ; which Pokemon to show first on the title screen ENDC - ld [wWhichTrade], a ; wWhichTrade - call Func_4524 - ld a, $9b - call Func_4533 + ld [wTitleMonSpecies], a + call LoadTitleMonSprite + ld a, (vBGMap0 + $300) / $100 + call TitleScreenCopyTileMapToVRAM call SaveScreenTilesToBuffer1 ld a, $40 ld [hWY], a call LoadScreenTilesFromBuffer2 - ld a, $98 - call Func_4533 - ld b, $6 - call GoPAL_SET + ld a, vBGMap0 / $100 + call TitleScreenCopyTileMapToVRAM + ld b, SET_PAL_TITLE_SCREEN + call RunPaletteCommand call GBPalNormal - ld a, $e4 - ld [rOBP0], a ; $ff48 - ld bc, $ffaf ; background scroll Y - ld hl, .TitleScreenPokemonLogoYScrolls ; $43db -.asm_43c6 + ld a, %11100100 + ld [rOBP0], a + +; make pokemon logo bounce up and down + ld bc, hSCY ; background scroll Y + ld hl, .TitleScreenPokemonLogoYScrolls +.bouncePokemonLogoLoop ld a, [hli] and a - jr z, .asm_43f4 + jr z, .finishedBouncingPokemonLogo ld d, a - cp $fd - jr nz, .asm_43d4 - ld a, (SFX_1f_62 - SFX_Headers_1f) / 3 + cp -3 + jr nz, .skipPlayingSound + ld a, SFX_INTRO_CRASH call PlaySound -.asm_43d4 +.skipPlayingSound ld a, [hli] ld e, a call .ScrollTitleScreenPokemonLogo - jr .asm_43c6 + jr .bouncePokemonLogoLoop -.TitleScreenPokemonLogoYScrolls: ; 43db (1:43db) +.TitleScreenPokemonLogoYScrolls: ; Controls the bouncing effect of the Pokemon logo on the title screen db -4,16 ; y scroll amount, number of times to scroll db 3,4 @@ -164,62 +169,69 @@ ENDC db -1,2 db 0 ; terminate list with 0 -.ScrollTitleScreenPokemonLogo +.ScrollTitleScreenPokemonLogo: ; Scrolls the Pokemon logo on the title screen to create the bouncing effect ; Scrolls d pixels e times call DelayFrame - ld a, [bc] + ld a, [bc] ; background scroll Y add d ld [bc], a dec e jr nz, .ScrollTitleScreenPokemonLogo ret -.asm_43f4 + +.finishedBouncingPokemonLogo call LoadScreenTilesFromBuffer1 - ld c, $24 + ld c, 36 call DelayFrames - ld a, (SFX_1f_63 - SFX_Headers_1f) / 3 + ld a, SFX_INTRO_WHOOSH call PlaySound + +; scroll game version in from the right call PrintGameVersionOnTitleScreen - ld a, $90 + ld a, SCREEN_HEIGHT_PIXELS ld [hWY], a - ld d, $90 -.asm_440a + ld d, 144 +.scrollTitleScreenGameVersionLoop ld h, d - ld l, $40 - call Func_44cf - ld h, $0 - ld l, $50 - call Func_44cf + ld l, 64 + call ScrollTitleScreenGameVersion + ld h, 0 + ld l, 80 + call ScrollTitleScreenGameVersion ld a, d - add $4 + add 4 ld d, a and a - jr nz, .asm_440a - ld a, $9c - call Func_4533 + jr nz, .scrollTitleScreenGameVersionLoop + + ld a, vBGMap1 / $100 + call TitleScreenCopyTileMapToVRAM call LoadScreenTilesFromBuffer2 call PrintGameVersionOnTitleScreen call Delay3 call WaitForSoundToFinish ld a, MUSIC_TITLE_SCREEN - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound xor a - ld [wcc5b], a -.asm_443b - ld c, $c8 + ld [wUnusedCC5B], a + +; Keep scrolling in new mons indefinitely until the user performs input. +.awaitUserInterruptionLoop + ld c, 200 call CheckForUserInterruption - jr c, .asm_4459 - call Func_44c1 - ld c, $1 + jr c, .finishedWaiting + call TitleScreenScrollInMon + ld c, 1 call CheckForUserInterruption - jr c, .asm_4459 - callba Func_372ac - call Func_4496 - jr .asm_443b -.asm_4459 - ld a, [wWhichTrade] ; wWhichTrade + jr c, .finishedWaiting + callba TitleScreenAnimateBallIfStarterOut + call TitleScreenPickNewMon + jr .awaitUserInterruptionLoop + +.finishedWaiting + ld a, [wTitleMonSpecies] call PlayCry call WaitForSoundToFinish call GBPalWhiteOutWithDelay3 @@ -227,12 +239,12 @@ 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 - ld a, $9c - call Func_4533 + ld a, vBGMap0 / $100 + call TitleScreenCopyTileMapToVRAM + ld a, vBGMap1 / $100 + call TitleScreenCopyTileMapToVRAM call Delay3 call LoadGBPal ld a, [hJoyHeld] @@ -243,16 +255,14 @@ ENDC jp MainMenu .doClearSaveDialogue - ld b, BANK(DoClearSaveDialogue) - ld hl, DoClearSaveDialogue - jp Bankswitch + jpba DoClearSaveDialogue -Func_4496: ; 4496 (1:4496) - ld a, $98 - call Func_4533 +TitleScreenPickNewMon: + ld a, vBGMap0 / $100 + call TitleScreenCopyTileMapToVRAM -.new -; Generate a new TitleMon. +.loop +; Keep looping until a mon different from the current one is picked. call Random and $f ld c, a @@ -260,14 +270,14 @@ Func_4496: ; 4496 (1:4496) ld hl, TitleMons add hl, bc ld a, [hl] - ld hl, wWhichTrade ; wWhichTrade + ld hl, wTitleMonSpecies ; Can't be the same as before. cp [hl] - jr z, .new + jr z, .loop ld [hl], a - call Func_4524 + call LoadTitleMonSprite ld a, $90 ld [hWY], a @@ -275,98 +285,98 @@ Func_4496: ; 4496 (1:4496) callba TitleScroll ret -Func_44c1: ; 44c1 (1:44c1) +TitleScreenScrollInMon: ld d, 0 ; scroll in callba TitleScroll xor a ld [hWY], a ret -Func_44cf: ; 44cf (1:44cf) +ScrollTitleScreenGameVersion: .wait - ld a, [$ff44] ; rLY + ld a, [rLY] cp l jr nz, .wait ld a, h - ld [rSCX], a ; $ff43 + ld [rSCX], a .wait2 - ld a, [$ff44] ; rLY + ld a, [rLY] cp h jr z, .wait2 ret -Func_44dd: ; 44dd (1:44dd) - ld hl, PlayerCharacterTitleGraphics ; $66a8 +DrawPlayerCharacter: + ld hl, PlayerCharacterTitleGraphics ld de, vSprites - ld bc, $230 + ld bc, PlayerCharacterTitleGraphicsEnd - PlayerCharacterTitleGraphics ld a, BANK(PlayerCharacterTitleGraphics) call FarCopyData2 call ClearSprites xor a - ld [wWhichTrade], a ; wWhichTrade + ld [wPlayerCharacterOAMTile], a ld hl, wOAMBuffer ld de, $605a - ld b, $7 -.asm_44fa + ld b, 7 +.loop push de - ld c, $5 -.asm_44fd + ld c, 5 +.innerLoop ld a, d - ld [hli], a + ld [hli], a ; Y ld a, e - ld [hli], a - add $8 + ld [hli], a ; X + add 8 ld e, a - ld a, [wWhichTrade] ; wWhichTrade - ld [hli], a + ld a, [wPlayerCharacterOAMTile] + ld [hli], a ; tile inc a - ld [wWhichTrade], a ; wWhichTrade + ld [wPlayerCharacterOAMTile], a inc hl dec c - jr nz, .asm_44fd + jr nz, .innerLoop pop de - ld a, $8 + ld a, 8 add d ld d, a dec b - jr nz, .asm_44fa + jr nz, .loop ret -Func_4519: ; 4519 (1:4519) +ClearBothBGMaps: ld hl, vBGMap0 - ld bc, $800 - ld a, $7f + ld bc, $400 * 2 + ld a, " " jp FillMemory -Func_4524: ; 4524 (1:4524) +LoadTitleMonSprite: ld [wcf91], a ld [wd0b5], a - hlCoord 5, 10 + coord hl, 5, 10 call GetMonHeader jp LoadFrontSpriteByMonIndex -Func_4533: ; 4533 (1:4533) - ld [$ffbd], a +TitleScreenCopyTileMapToVRAM: + ld [H_AUTOBGTRANSFERDEST + 1], a jp Delay3 -LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538) +LoadCopyrightAndTextBoxTiles: xor a ld [hWY], a call ClearScreen call LoadTextBoxTilePatterns -LoadCopyrightTiles: ; 4541 (1:4541) - ld de, NintendoCopyrightLogoGraphics ; $60c8 +LoadCopyrightTiles: + ld de, NintendoCopyrightLogoGraphics ld hl, vChars2 + $600 - ld bc, (BANK(NintendoCopyrightLogoGraphics) << 8) + $1c + lb bc, BANK(NintendoCopyrightLogoGraphics), (GamefreakLogoGraphicsEnd - NintendoCopyrightLogoGraphics) / $10 call CopyVideoData - hlCoord 2, 7 - ld de, CopyrightTextString ; $4556 + coord hl, 2, 7 + ld de, CopyrightTextString jp PlaceString -CopyrightTextString: ; 4556 (1:4556) +CopyrightTextString: db $60,$61,$62,$61,$63,$61,$64,$7F,$65,$66,$67,$68,$69,$6A ; ©'95.'96.'98 Nintendo next $60,$61,$62,$61,$63,$61,$64,$7F,$6B,$6C,$6D,$6E,$6F,$70,$71,$72 ; ©'95.'96.'98 Creatures inc. next $60,$61,$62,$61,$63,$61,$64,$7F,$73,$74,$75,$76,$77,$78,$79,$7A,$7B ; ©'95.'96.'98 GAME FREAK inc. @@ -375,16 +385,19 @@ CopyrightTextString: ; 4556 (1:4556) INCLUDE "data/title_mons.asm" ; prints version text (red, blue) -PrintGameVersionOnTitleScreen: ; 4598 (1:4598) - hlCoord 7, 8 +PrintGameVersionOnTitleScreen: + coord hl, 7, 8 ld de, VersionOnTitleScreenText jp PlaceString ; these point to special tiles specifically loaded for that purpose and are not usual text -VersionOnTitleScreenText: ; 45a1 (1:45a1) +VersionOnTitleScreenText: IF DEF(_RED) db $60,$61,$7F,$65,$66,$67,$68,$69,"@" ; "Red Version" ENDC IF DEF(_BLUE) db $61,$62,$63,$64,$65,$66,$67,$68,"@" ; "Blue Version" ENDC + +NintenText: db "NINTEN@" +SonyText: db "SONY@" diff --git a/engine/titlescreen2.asm b/engine/titlescreen2.asm index dc1c633a..2346fcc5 100755 --- a/engine/titlescreen2.asm +++ b/engine/titlescreen2.asm @@ -1,22 +1,22 @@ -TitleScroll_WaitBall: ; 37244 (d:7244) +TitleScroll_WaitBall: ; Wait around for the TitleBall animation to play out. ; hi: speed ; lo: duration db $05, $05, 0 -TitleScroll_In: ; 37247 (d:7247) +TitleScroll_In: ; Scroll a TitleMon in from the right. ; hi: speed ; lo: duration db $a2, $94, $84, $63, $52, $31, $11, 0 -TitleScroll_Out: ; 3724f (d:724f) +TitleScroll_Out: ; Scroll a TitleMon out to the left. ; hi: speed ; lo: duration db $12, $22, $32, $42, $52, $62, $83, $93, 0 -TitleScroll: ; 37258 (d:7258) +TitleScroll: ld a, d ld bc, TitleScroll_In @@ -31,7 +31,7 @@ TitleScroll: ; 37258 (d:7258) ld e, 0 ; don't animate titleball .ok -_TitleScroll: ; 3726a (d:726a) +_TitleScroll: ld a, [bc] and a ret z @@ -67,29 +67,29 @@ _TitleScroll: ; 3726a (d:726a) pop bc jr _TitleScroll -.ScrollBetween ; 37292 (d:7292) +.ScrollBetween: .wait - ld a, [$ff44] ; rLY + ld a, [rLY] ; rLY cp l jr nz, .wait ld a, h - ld [rSCX], a ; $ff43 + ld [rSCX], a .wait2 - ld a, [$ff44] ; rLY + ld a, [rLY] ; rLY cp h jr z, .wait2 ret -TitleBallYTable: ; 372a0 (d:72a0) +TitleBallYTable: ; OBJ y-positions for the Poke Ball held by Red in the title screen. ; This is really two 0-terminated lists. Initiated with an index of 1. db 0, $71, $6f, $6e, $6d, $6c, $6d, $6e, $6f, $71, $74, 0 -Func_372ac: ; 372ac (d:72ac) +TitleScreenAnimateBallIfStarterOut: ; Animate the TitleBall if a starter just got scrolled out. - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wTitleMonSpecies] cp STARTER1 jr z, .ok cp STARTER2 @@ -102,7 +102,7 @@ Func_372ac: ; 372ac (d:72ac) ld d, 0 jp _TitleScroll -GetTitleBallY: ; 372c4 (d:72c4) +GetTitleBallY: ; Get position e from TitleBallYTable push de push hl diff --git a/engine/town_map.asm b/engine/town_map.asm index 5a718519..d417e0a3 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -1,4 +1,4 @@ -DisplayTownMap: ; 70e3e (1c:4e3e) +DisplayTownMap: call LoadTownMap ld hl, wUpdateSpritesEnabled ld a, [hl] @@ -7,11 +7,11 @@ DisplayTownMap: ; 70e3e (1c:4e3e) push hl ld a, $1 ld [hJoy7], a - ld a, [W_CURMAP] ; W_CURMAP + ld a, [wCurMap] push af ld b, $0 - call Func_711c4 - hlCoord 1, 0 + call DrawPlayerOrBirdSprite ; player sprite + coord hl, 1, 0 ld de, wcd6d call PlaceString ld hl, wOAMBuffer @@ -19,191 +19,190 @@ DisplayTownMap: ; 70e3e (1c:4e3e) ld bc, $10 call CopyData ld hl, vSprites + $40 - ld de, TownMapCursor ; $4f40 - ld bc, (BANK(TownMapCursor) << 8) + $04 + ld de, TownMapCursor + lb bc, BANK(TownMapCursor), (TownMapCursorEnd - TownMapCursor) / $8 call CopyVideoDataDouble xor a - ld [wWhichTrade], a ; wWhichTrade + ld [wWhichTownMapLocation], a pop af - jr Func_70e92 + jr .enterLoop -Func_70e7e: ; 70e7e (1c:4e7e) - ld hl, wTileMap - ld bc, $114 +.townMapLoop + coord hl, 0, 0 + lb bc, 1, 20 call ClearScreenArea - ld hl, TownMapOrder ; $4f11 - ld a, [wWhichTrade] ; wWhichTrade + ld hl, TownMapOrder + ld a, [wWhichTownMapLocation] ld c, a - ld b, $0 + ld b, 0 add hl, bc ld a, [hl] - -Func_70e92: ; 70e92 (1c:4e92) - ld de, wHPBarMaxHP - call Func_712f1 +.enterLoop + ld de, wTownMapCoords + call LoadTownMapEntry ld a, [de] push hl - call Func_71258 + call TownMapCoordsToOAMCoords ld a, $4 - ld [wcd5b], a + ld [wOAMBaseTile], a ld hl, wOAMBuffer + $10 - call Func_71279 + call WriteTownMapSpriteOAM ; town map cursor sprite pop hl ld de, wcd6d -.asm_70eac +.copyMapName ld a, [hli] ld [de], a inc de cp $50 - jr nz, .asm_70eac - hlCoord 1, 0 + jr nz, .copyMapName + coord hl, 1, 0 ld de, wcd6d call PlaceString ld hl, wOAMBuffer + $10 ld de, wTileMapBackup + 16 ld bc, $10 call CopyData -.asm_70ec8 +.inputLoop call TownMapSpriteBlinkingAnimation call JoypadLowSensitivity ld a, [hJoy5] ld b, a - and $c3 - jr z, .asm_70ec8 - ld a, (SFX_02_3c - SFX_Headers_02) / 3 + and A_BUTTON | B_BUTTON | D_UP | D_DOWN + jr z, .inputLoop + ld a, SFX_TINK call PlaySound bit 6, b - jr nz, .asm_70ef2 + jr nz, .pressedUp bit 7, b - jr nz, .asm_70f01 + jr nz, .pressedDown xor a ld [wTownMapSpriteBlinkingEnabled], a ld [hJoy7], a - ld [wTownMapSpriteBlinkingCounter], a - call Func_711ab + ld [wAnimCounter], a + call ExitTownMap pop hl pop af ld [hl], a ret -.asm_70ef2 - ld a, [wWhichTrade] ; wWhichTrade +.pressedUp + ld a, [wWhichTownMapLocation] inc a - cp $2f - jr nz, .asm_70efb + cp TownMapOrderEnd - TownMapOrder ; number of list items + 1 + jr nz, .noOverflow xor a -.asm_70efb - ld [wWhichTrade], a ; wWhichTrade - jp Func_70e7e -.asm_70f01 - ld a, [wWhichTrade] ; wWhichTrade +.noOverflow + ld [wWhichTownMapLocation], a + jp .townMapLoop +.pressedDown + ld a, [wWhichTownMapLocation] dec a - cp $ff - jr nz, .asm_70f0b - ld a, $2e -.asm_70f0b - ld [wWhichTrade], a ; wWhichTrade - jp Func_70e7e + cp -1 + jr nz, .noUnderflow + ld a, TownMapOrderEnd - TownMapOrder - 1 ; number of list items +.noUnderflow + ld [wWhichTownMapLocation], a + jp .townMapLoop INCLUDE "data/town_map_order.asm" -TownMapCursor: ; 70f40 (1c:4f40) +TownMapCursor: INCBIN "gfx/town_map_cursor.1bpp" +TownMapCursorEnd: -LoadTownMap_Nest: ; 70f60 (1c:4f60) +LoadTownMap_Nest: call LoadTownMap ld hl, wUpdateSpritesEnabled ld a, [hl] push af ld [hl], $ff push hl - call Func_711ef + call DisplayWildLocations call GetMonName - hlCoord 1, 0 + coord hl, 1, 0 call PlaceString ld h, b ld l, c ld de, MonsNestText call PlaceString call WaitForTextScrollButtonPress - call Func_711ab + call ExitTownMap pop hl pop af ld [hl], a ret -MonsNestText: ; 70f89 (1c:4f89) +MonsNestText: db "'s NEST@" -LoadTownMap_Fly: ; 70f90 (1c:4f90) +LoadTownMap_Fly: call ClearSprites call LoadTownMap call LoadPlayerSpriteGraphics call LoadFontTilePatterns - ld de, BirdSprite ; $4d80 + ld de, BirdSprite ld hl, vSprites + $40 - ld bc, (BANK(BirdSprite) << 8) + $0c + lb bc, BANK(BirdSprite), $c call CopyVideoData - ld de, TownMapUpArrow ; $5093 + ld de, TownMapUpArrow ld hl, vChars1 + $6d0 - ld bc, (BANK(TownMapUpArrow) << 8) + $01 + lb bc, BANK(TownMapUpArrow), (TownMapUpArrowEnd - TownMapUpArrow) / $8 call CopyVideoDataDouble - call Func_71070 + call BuildFlyLocationsList ld hl, wUpdateSpritesEnabled ld a, [hl] push af ld [hl], $ff push hl - ld hl, wTileMap + coord hl, 0, 0 ld de, ToText call PlaceString - ld a, [W_CURMAP] ; W_CURMAP + ld a, [wCurMap] ld b, $0 - call Func_711c4 - ld hl, wTrainerEngageDistance - deCoord 18, 0 - + call DrawPlayerOrBirdSprite + ld hl, wFlyLocationsList + coord de, 18, 0 .townMapFlyLoop - ld a, $7f + ld a, " " ld [de], a push hl push hl - hlCoord 3, 0 - ld bc, $10f + coord hl, 3, 0 + lb bc, 1, 15 call ClearScreenArea pop hl ld a, [hl] ld b, $4 - call Func_711c4 - hlCoord 3, 0 + call DrawPlayerOrBirdSprite ; draw bird sprite + coord hl, 3, 0 ld de, wcd6d call PlaceString - ld c, $f + ld c, 15 call DelayFrames - hlCoord 18, 0 - ld [hl], $ed - hlCoord 19, 0 - ld [hl], $ee + coord hl, 18, 0 + ld [hl], "▲" + coord hl, 19, 0 + ld [hl], "▼" pop hl -.asm_71004 +.inputLoop push hl call DelayFrame call JoypadLowSensitivity ld a, [hJoy5] ld b, a pop hl - and $c3 - jr z, .asm_71004 + and A_BUTTON | B_BUTTON | D_UP | D_DOWN + jr z, .inputLoop bit 0, b - jr nz, .asm_71026 - ld a, (SFX_02_3c - SFX_Headers_02) / 3 + jr nz, .pressedA + ld a, SFX_TINK call PlaySound bit 6, b - jr nz, .asm_71042 + jr nz, .pressedUp bit 7, b - jr nz, .asm_71058 - jr .asm_71037 -.asm_71026 - ld a, (SFX_02_3e - SFX_Headers_02) / 3 + jr nz, .pressedDown + jr .pressedB +.pressedA + ld a, SFX_HEAL_AILMENT call PlaySound ld a, [hl] ld [wDestinationMap], a @@ -211,7 +210,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90) set 3, [hl] inc hl set 7, [hl] -.asm_71037 +.pressedB xor a ld [wTownMapSpriteBlinkingEnabled], a call GBPalWhiteOutWithDelay3 @@ -219,86 +218,87 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90) pop af ld [hl], a ret -.asm_71042 - deCoord 18, 0 +.pressedUp + coord de, 18, 0 inc hl ld a, [hl] cp $ff - jr z, .asm_71052 + jr z, .wrapToStartOfList cp $fe - jr z, .asm_71042 + jr z, .pressedUp ; skip past unvisited towns jp .townMapFlyLoop -.asm_71052 - ld hl, wTrainerEngageDistance +.wrapToStartOfList + ld hl, wFlyLocationsList jp .townMapFlyLoop -.asm_71058 - deCoord 19, 0 +.pressedDown + coord de, 19, 0 dec hl ld a, [hl] cp $ff - jr z, .asm_71068 + jr z, .wrapToEndOfList cp $fe - jr z, .asm_71058 + jr z, .pressedDown ; skip past unvisited towns jp .townMapFlyLoop -.asm_71068 - ld hl, wcd49 - jr .asm_71058 +.wrapToEndOfList + ld hl, wFlyLocationsList + 11 + jr .pressedDown -ToText: ; 7106d (1c:506d) +ToText: db "To@" -Func_71070: ; 71070 (1c:5070) - ld hl, wWhichTrade ; wWhichTrade +BuildFlyLocationsList: + ld hl, wFlyLocationsList - 1 ld [hl], $ff inc hl - ld a, [W_TOWNVISITEDFLAG] + ld a, [wTownVisitedFlag] ld e, a - ld a, [W_TOWNVISITEDFLAG + 1] + ld a, [wTownVisitedFlag + 1] ld d, a - ld bc, $b -.asm_71081 + ld bc, SAFFRON_CITY + 1 +.loop srl d rr e - ld a, $fe - jr nc, .asm_7108a - ld a, b -.asm_7108a + ld a, $fe ; store $fe if the town hasn't been visited + jr nc, .notVisited + ld a, b ; store the map number of the town if it has been visited +.notVisited ld [hl], a inc hl inc b dec c - jr nz, .asm_71081 + jr nz, .loop ld [hl], $ff ret -TownMapUpArrow: ; 71093 (1c:5093) +TownMapUpArrow: INCBIN "gfx/up_arrow.1bpp" +TownMapUpArrowEnd: -LoadTownMap: ; 7109b (1c:509b) +LoadTownMap: call GBPalWhiteOutWithDelay3 call ClearScreen call UpdateSprites - ld hl, wTileMap + coord hl, 0, 0 ld b, $12 ld c, $12 call TextBoxBorder call DisableLCD - ld hl, WorldMapTileGraphics ; $65a8 + ld hl, WorldMapTileGraphics ld de, vChars2 + $600 - ld bc, $100 + ld bc, WorldMapTileGraphicsEnd - WorldMapTileGraphics ld a, BANK(WorldMapTileGraphics) call FarCopyData2 - ld hl, MonNestIcon ; $56be + ld hl, MonNestIcon ld de, vSprites + $40 - ld bc, $8 + ld bc, MonNestIconEnd - MonNestIcon ld a, BANK(MonNestIcon) call FarCopyDataDouble - ld hl, wTileMap - ld de, CompressedMap ; $5100 -.asm_710d3 + coord hl, 0, 0 + ld de, CompressedMap +.nextTile ld a, [de] and a - jr z, .asm_710e9 + jr z, .done ld b, a and $f ld c, a @@ -306,29 +306,30 @@ LoadTownMap: ; 7109b (1c:509b) swap a and $f add $60 -.asm_710e2 +.writeRunLoop ld [hli], a dec c - jr nz, .asm_710e2 + jr nz, .writeRunLoop inc de - jr .asm_710d3 -.asm_710e9 + jr .nextTile +.done call EnableLCD - ld b, $2 - call GoPAL_SET + ld b, SET_PAL_TOWN_MAP + call RunPaletteCommand call Delay3 call GBPalNormal xor a - ld [wTownMapSpriteBlinkingCounter], a + ld [wAnimCounter], a inc a ld [wTownMapSpriteBlinkingEnabled], a ret -CompressedMap: ; 71100 (1c:5100) +CompressedMap: ; you can decompress this file with the redrle program in the extras/ dir INCBIN "gfx/town_map.rle" -Func_711ab: ; 711ab (1c:51ab) +ExitTownMap: +; clear town map graphics data and load usual graphics data xor a ld [wTownMapSpriteBlinkingEnabled], a call GBPalWhiteOut @@ -337,117 +338,126 @@ Func_711ab: ; 711ab (1c:51ab) call LoadPlayerSpriteGraphics call LoadFontTilePatterns call UpdateSprites - jp GoPAL_SET_CF1C + jp RunDefaultPaletteCommand -Func_711c4: ; 711c4 (1c:51c4) +DrawPlayerOrBirdSprite: +; a = map number +; b = OAM base tile push af ld a, b - ld [wcd5b], a + ld [wOAMBaseTile], a pop af - ld de, wHPBarMaxHP - call Func_712f1 + ld de, wTownMapCoords + call LoadTownMapEntry ld a, [de] push hl - call Func_71258 - call Func_7126d + call TownMapCoordsToOAMCoords + call WritePlayerOrBirdSpriteOAM pop hl ld de, wcd6d -.asm_711dc +.loop ld a, [hli] ld [de], a inc de - cp $50 - jr nz, .asm_711dc + cp "@" + jr nz, .loop ld hl, wOAMBuffer ld de, wTileMapBackup ld bc, $a0 jp CopyData -Func_711ef: ; 711ef (1c:51ef) +DisplayWildLocations: callba FindWildLocationsOfMon - call Func_712d9 + call ZeroOutDuplicatesInList ld hl, wOAMBuffer - ld de, wBuffer -.asm_71200 + ld de, wTownMapCoords +.loop ld a, [de] cp $ff - jr z, .asm_7121d + jr z, .exitLoop and a - jr z, .asm_7121a + jr z, .nextEntry push hl - call Func_712f1 + call LoadTownMapEntry pop hl ld a, [de] - cp $19 - jr z, .asm_7121a - call Func_71258 - ld a, $4 + cp $19 ; Cerulean Cave's coordinates + jr z, .nextEntry ; skip Cerulean Cave + call TownMapCoordsToOAMCoords + ld a, $4 ; nest icon tile no. ld [hli], a xor a ld [hli], a -.asm_7121a +.nextEntry inc de - jr .asm_71200 -.asm_7121d + jr .loop +.exitLoop ld a, l - and a - jr nz, .asm_71236 - hlCoord 1, 7 - ld b, $2 - ld c, $f + and a ; were any OAM entries written? + jr nz, .drawPlayerSprite +; if no OAM entries were written, print area unknown text + coord hl, 1, 7 + ld b, 2 + ld c, 15 call TextBoxBorder - hlCoord 2, 9 + coord hl, 2, 9 ld de, AreaUnknownText call PlaceString - jr .asm_7123e -.asm_71236 - ld a, [W_CURMAP] ; W_CURMAP + jr .done +.drawPlayerSprite + ld a, [wCurMap] ld b, $0 - call Func_711c4 -.asm_7123e + call DrawPlayerOrBirdSprite +.done ld hl, wOAMBuffer ld de, wTileMapBackup ld bc, $a0 jp CopyData -AreaUnknownText: ; 7124a (1c:524a) +AreaUnknownText: db " AREA UNKNOWN@" -Func_71258: ; 71258 (1c:5258) +TownMapCoordsToOAMCoords: +; in: lower nybble of a = x, upper nybble of a = y +; out: b and [hl] = (y * 8) + 24, c and [hl+1] = (x * 8) + 24 push af and $f0 srl a - add $18 + add 24 ld b, a ld [hli], a pop af and $f swap a srl a - add $18 + add 24 ld c, a ld [hli], a ret -Func_7126d: ; 7126d (1c:526d) - ld a, [wcd5b] +WritePlayerOrBirdSpriteOAM: + ld a, [wOAMBaseTile] and a - ld hl, wOAMBuffer + $90 - jr z, Func_71279 - ld hl, wOAMBuffer + $80 + ld hl, wOAMBuffer + $90 ; for player sprite + jr z, WriteTownMapSpriteOAM + ld hl, wOAMBuffer + $80 ; for bird sprite -Func_71279: ; 71279 (1c:5279) +WriteTownMapSpriteOAM: push hl - ld hl, $fcfc + +; Subtract 4 from c (X coord) and 4 from b (Y coord). However, the carry from c +; is added to b, so the net result is that only 3 is subtracted from b. + lb hl, -4, -4 add hl, bc + ld b, h ld c, l pop hl -WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281) -; Writes 4 OAM blocks for a helix mon party sprite, since is does not have +WriteAsymmetricMonPartySpriteOAM: +; Writes 4 OAM blocks for a helix mon party sprite, since it does not have ; a vertical line of symmetry. - ld de, $202 + lb de, 2, 2 .loop push de push bc @@ -456,51 +466,51 @@ WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281) ld [hli], a ld a, c ld [hli], a - ld a, [wcd5b] + ld a, [wOAMBaseTile] ld [hli], a inc a - ld [wcd5b], a + ld [wOAMBaseTile], a xor a ld [hli], a inc d - ld a, $8 + ld a, 8 add c ld c, a dec e jr nz, .innerLoop pop bc pop de - ld a, $8 + ld a, 8 add b ld b, a dec d jr nz, .loop ret -WriteSymmetricMonPartySpriteOAM: ; 712a6 (1c:52a6) +WriteSymmetricMonPartySpriteOAM: ; Writes 4 OAM blocks for a mon party sprite other than a helix. All the ; sprites other than the helix one have a vertical line of symmetry which allows ; the X-flip OAM bit to be used so that only 2 rather than 4 tile patterns are ; needed. xor a - ld [wcd5c], a - ld de, $202 + ld [wSymmetricSpriteOAMAttributes], a + lb de, 2, 2 .loop push de push bc .innerLoop ld a, b - ld [hli], a + ld [hli], a ; Y ld a, c - ld [hli], a - ld a, [wcd5b] - ld [hli], a - ld a, [wcd5c] - ld [hli], a - xor $20 - ld [wcd5c], a + ld [hli], a ; X + ld a, [wOAMBaseTile] + ld [hli], a ; tile + ld a, [wSymmetricSpriteOAMAttributes] + ld [hli], a ; attributes + xor (1 << OAM_X_FLIP) + ld [wSymmetricSpriteOAMAttributes], a inc d - ld a, $8 + ld a, 8 add c ld c, a dec e @@ -508,20 +518,21 @@ WriteSymmetricMonPartySpriteOAM: ; 712a6 (1c:52a6) pop bc pop de push hl - ld hl, wcd5b + ld hl, wOAMBaseTile inc [hl] inc [hl] pop hl - ld a, $8 + ld a, 8 add b ld b, a dec d jr nz, .loop ret -Func_712d9: ; 712d9 (1c:52d9) - ld de, wHPBarMaxHP -.asm_712dc +ZeroOutDuplicatesInList: +; replace duplicate bytes in the list of wild pokemon locations with 0 + ld de, wBuffer +.loop ld a, [de] inc de cp $ff @@ -529,39 +540,41 @@ Func_712d9: ; 712d9 (1c:52d9) ld c, a ld l, e ld h, d -.asm_712e4 +.zeroDuplicatesLoop ld a, [hl] cp $ff - jr z, .asm_712dc + jr z, .loop cp c - jr nz, .asm_712ee + jr nz, .skipZeroing xor a ld [hl], a -.asm_712ee +.skipZeroing inc hl - jr .asm_712e4 + jr .zeroDuplicatesLoop -Func_712f1: ; 712f1 (1c:52f1) +LoadTownMapEntry: +; in: a = map number +; out: lower nybble of [de] = x, upper nybble of [de] = y, hl = address of name cp REDS_HOUSE_1F - jr c, .asm_71304 - ld bc, $4 - ld hl, InternalMapEntries ; $5382 -.asm_712fb + jr c, .external + ld bc, 4 + ld hl, InternalMapEntries +.loop cp [hl] - jr c, .asm_71301 + jr c, .foundEntry add hl, bc - jr .asm_712fb -.asm_71301 + jr .loop +.foundEntry inc hl - jr .asm_7130d -.asm_71304 - ld hl, ExternalMapEntries ; $5313 + jr .readEntry +.external + ld hl, ExternalMapEntries ld c, a - ld b, $0 + ld b, 0 add hl, bc add hl, bc add hl, bc -.asm_7130d +.readEntry ld a, [hli] ld [de], a ld a, [hli] @@ -573,11 +586,12 @@ INCLUDE "data/town_map_entries.asm" INCLUDE "text/map_names.asm" -MonNestIcon: ; 716be (1c:56be) +MonNestIcon: INCBIN "gfx/mon_nest_icon.1bpp" +MonNestIconEnd: -TownMapSpriteBlinkingAnimation: ; 716c6 (1c:56c6) - ld a, [wTownMapSpriteBlinkingCounter] +TownMapSpriteBlinkingAnimation: + ld a, [wAnimCounter] inc a cp 25 jr z, .hideSprites @@ -601,5 +615,5 @@ TownMapSpriteBlinkingAnimation: ; 716c6 (1c:56c6) jr nz, .hideSpritesLoop ld a, 25 .done - ld [wTownMapSpriteBlinkingCounter], a + ld [wAnimCounter], a jp DelayFrame diff --git a/engine/trade.asm b/engine/trade.asm index bb4fa4e1..c3913a7e 100755 --- a/engine/trade.asm +++ b/engine/trade.asm @@ -1,4 +1,4 @@ -InternalClockTradeAnim: ; 410e2 (10:50e2) +InternalClockTradeAnim: ; Do the trading animation with the player's gameboy on the left. ; In-game trades and internally clocked link cable trades use this. ld a, [wTradedPlayerMonSpecies] @@ -8,24 +8,24 @@ InternalClockTradeAnim: ; 410e2 (10:50e2) ld de, InternalClockTradeFuncSequence jr TradeAnimCommon -ExternalClockTradeAnim: ; 410f3 (10:50f3) +ExternalClockTradeAnim: ; Do the trading animation with the player's gameboy on the right. ; Externally clocked link cable trades use this. ld a, [wTradedEnemyMonSpecies] ld [wLeftGBMonSpecies], a - ld a, [wTrainerSpriteOffset] + ld a, [wTradedPlayerMonSpecies] ld [wRightGBMonSpecies], a ld de, ExternalClockTradeFuncSequence -TradeAnimCommon: ; 41102 (10:5102) - ld a, [W_OPTIONS] +TradeAnimCommon: + ld a, [wOptions] push af ld a, [hSCY] push af ld a, [hSCX] push af xor a - ld [W_OPTIONS], a + ld [wOptions], a ld [hSCY], a ld [hSCX], a push de @@ -53,7 +53,7 @@ TradeAnimCommon: ; 41102 (10:5102) pop af ld [hSCY], a pop af - ld [W_OPTIONS], a + ld [wOptions], a ret addtradefunc: MACRO @@ -69,7 +69,7 @@ tradefunc: MACRO ; They are from opposite perspectives. The external clock one makes use of ; Trade_SwapNames to swap the player and enemy names for some functions. -InternalClockTradeFuncSequence: ; 41138 (10:5138) +InternalClockTradeFuncSequence: tradefunc LoadTradingGFXAndMonNames tradefunc Trade_ShowPlayerMon tradefunc Trade_DrawOpenEndOfLinkCable @@ -88,7 +88,7 @@ InternalClockTradeFuncSequence: ; 41138 (10:5138) tradefunc Trade_Cleanup db $FF -ExternalClockTradeFuncSequence: ; 41149 (10:5149) +ExternalClockTradeFuncSequence: tradefunc LoadTradingGFXAndMonNames tradefunc Trade_ShowClearedWindow tradefunc PrintTradeWillTradeText @@ -112,7 +112,7 @@ ExternalClockTradeFuncSequence: ; 41149 (10:5149) tradefunc Trade_Cleanup db $FF -TradeFuncPointerTable: ; 4115f (10:515f) +TradeFuncPointerTable: addtradefunc LoadTradingGFXAndMonNames addtradefunc Trade_ShowPlayerMon addtradefunc Trade_DrawOpenEndOfLinkCable @@ -131,11 +131,11 @@ TradeFuncPointerTable: ; 4115f (10:515f) addtradefunc Trade_SlideTextBoxOffScreen addtradefunc Trade_SwapNames -Trade_Delay100: ; 41181 (10:5181) +Trade_Delay100: ld c, 100 jp DelayFrames -Trade_CopyTileMapToVRAM: ; 41186 (10:5186) +Trade_CopyTileMapToVRAM: ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a call Delay3 @@ -143,27 +143,27 @@ Trade_CopyTileMapToVRAM: ; 41186 (10:5186) ld [H_AUTOBGTRANSFERENABLED], a ret -Trade_Delay80: ; 41191 (10:5191) +Trade_Delay80: ld c, 80 jp DelayFrames -Trade_ClearTileMap: ; 41196 (10:5196) - ld hl, wTileMap - ld bc, 20 * 18 +Trade_ClearTileMap: + coord hl, 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, " " jp FillMemory -LoadTradingGFXAndMonNames: ; 411a1 (10:51a1) +LoadTradingGFXAndMonNames: call Trade_ClearTileMap call DisableLCD ld hl, TradingAnimationGraphics ld de, vChars2 + $310 - ld bc, $310 + ld bc, TradingAnimationGraphicsEnd - TradingAnimationGraphics ld a, BANK(TradingAnimationGraphics) call FarCopyData2 ld hl, TradingAnimationGraphics2 ld de, vSprites + $7c0 - ld bc, $40 + ld bc, TradingAnimationGraphics2End - TradingAnimationGraphics2 ld a, BANK(TradingAnimationGraphics2) call FarCopyData2 ld hl, vBGMap0 @@ -190,41 +190,39 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1) call GetMonName ld hl, wcd6d ld de, wcf4b - ld bc, $b + ld bc, NAME_LENGTH call CopyData ld a, [wTradedEnemyMonSpecies] ld [wd11e], a jp GetMonName -Trade_LoadMonPartySpriteGfx: ; 4120b (10:520b) +Trade_LoadMonPartySpriteGfx: ld a, %11010000 ld [rOBP1], a - ld b, BANK(LoadMonPartySpriteGfx) - ld hl, LoadMonPartySpriteGfx - jp Bankswitch + jpba LoadMonPartySpriteGfx -Trade_SwapNames: ; 41217 (10:5217) +Trade_SwapNames: ld hl, wPlayerName ld de, wBuffer - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wLinkEnemyTrainerName ld de, wPlayerName - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wBuffer ld de, wLinkEnemyTrainerName - ld bc, 11 + ld bc, NAME_LENGTH jp CopyData -Trade_Cleanup: ; 4123b (10:523b) +Trade_Cleanup: xor a call LoadGBPal ld hl, wd730 res 6, [hl] ; turn off instant text printing ret -Trade_ShowPlayerMon: ; 41245 (10:5245) +Trade_ShowPlayerMon: ld a, %10101011 ld [rLCDC], a ld a, $50 @@ -234,7 +232,7 @@ Trade_ShowPlayerMon: ; 41245 (10:5245) ld [hSCX], a xor a ld [H_AUTOBGTRANSFERENABLED], a - hlCoord 4, 0 + coord hl, 4, 0 ld b, 6 ld c, 10 call TextBoxBorder @@ -259,31 +257,35 @@ Trade_ShowPlayerMon: ; 41245 (10:5245) ld a, TRADE_BALL_POOF_ANIM call Trade_ShowAnimation ld a, TRADE_BALL_DROP_ANIM - call Trade_ShowAnimation + call Trade_ShowAnimation ; clears mon pic ld a, [wTradedPlayerMonSpecies] call PlayCry xor a ld [H_AUTOBGTRANSFERENABLED], a ret -Trade_DrawOpenEndOfLinkCable: ; 41298 (10:5298) +Trade_DrawOpenEndOfLinkCable: call Trade_ClearTileMap ld b, vBGMap0 / $100 call CopyScreenTileBufferToVRAM - ld b, $8 - call GoPAL_SET + ld b, SET_PAL_GENERIC + call RunPaletteCommand + +; This function call is pointless. It just copies blank tiles to VRAM that was +; already filled with blank tiles. ld hl, vBGMap1 + $8c call Trade_CopyCableTilesOffScreen + ld a, $a0 ld [hSCX], a call DelayFrame ld a, %10001011 ld [rLCDC], a - hlCoord 6, 2 + coord hl, 6, 2 ld b, $7 ; open end of link cable tile ID list index call CopyTileIDsFromList_ZeroBaseTileID call Trade_CopyTileMapToVRAM - ld a, (SFX_02_3d - SFX_Headers_02) / 3 + ld a, SFX_HEAL_HP call PlaySound ld c, 20 .loop @@ -294,7 +296,7 @@ Trade_DrawOpenEndOfLinkCable: ; 41298 (10:5298) jr nz, .loop ret -Trade_AnimateBallEnteringLinkCable: ; 412d2 (10:52d2) +Trade_AnimateBallEnteringLinkCable: ld a, TRADE_BALL_SHAKE_ANIM call Trade_ShowAnimation ld c, 10 @@ -302,25 +304,25 @@ Trade_AnimateBallEnteringLinkCable: ; 412d2 (10:52d2) ld a, %11100100 ld [rOBP0], a xor a - ld [wd09f], a - ld bc, $2060 + ld [wLinkCableAnimBulgeToggle], a + lb bc, $20, $60 .moveBallInsideLinkCableLoop push bc xor a ld de, Trade_BallInsideLinkCableOAM call WriteOAMBlock - ld a, [wd09f] + ld a, [wLinkCableAnimBulgeToggle] xor $1 - ld [wd09f], a + ld [wLinkCableAnimBulgeToggle], a add $7e ld hl, wOAMBuffer + $02 - ld de, $4 + ld de, 4 ld c, e -.cycleSpriteFramesLoop +.cycleLinkCableBulgeTile ld [hl], a add hl, de dec c - jr nz, .cycleSpriteFramesLoop + jr nz, .cycleLinkCableBulgeTile call Delay3 pop bc ld a, c @@ -328,7 +330,7 @@ Trade_AnimateBallEnteringLinkCable: ; 412d2 (10:52d2) ld c, a cp $a0 jr nc, .ballSpriteReachedEdgeOfScreen - ld a, (SFX_02_3c - SFX_Headers_02) / 3 + ld a, SFX_TINK call PlaySound jr .moveBallInsideLinkCableLoop .ballSpriteReachedEdgeOfScreen @@ -343,15 +345,15 @@ Trade_AnimateBallEnteringLinkCable: ; 412d2 (10:52d2) ld [H_AUTOBGTRANSFERENABLED], a ret -Trade_BallInsideLinkCableOAM: ; 4132e (10:532e) +Trade_BallInsideLinkCableOAM: db $7E,$00,$7E,$20 db $7E,$40,$7E,$60 -Trade_ShowEnemyMon: ; 41336 (10:5336) +Trade_ShowEnemyMon: ld a, TRADE_BALL_TILT_ANIM call Trade_ShowAnimation call Trade_ShowClearedWindow - hlCoord 4, 10 + coord hl, 4, 10 ld b, 6 ld c, 10 call TextBoxBorder @@ -368,22 +370,22 @@ Trade_ShowEnemyMon: ; 41336 (10:5336) ld a, [wTradedEnemyMonSpecies] call PlayCry call Trade_Delay100 - hlCoord 4, 10 - ld bc, $80c + coord hl, 4, 10 + lb bc, 8, 12 call ClearScreenArea jp PrintTradeTakeCareText -Trade_AnimLeftToRight: ; 41376 (10:5376) +Trade_AnimLeftToRight: ; Animates the mon moving from the left GB to the right one. call Trade_InitGameboyTransferGfx ld a, $1 ld [wTradedMonMovingRight], a - ld a, $e4 + ld a, %11100100 ld [rOBP0], a ld a, $54 - ld [W_BASECOORDX], a + ld [wBaseCoordX], a ld a, $1c - ld [W_BASECOORDY], a + ld [wBaseCoordY], a ld a, [wLeftGBMonSpecies] ld [wMonPartySpriteSpecies], a call Trade_WriteCircledMonOAM @@ -407,15 +409,15 @@ Trade_AnimLeftToRight: ; 41376 (10:5376) call Trade_AnimMonMoveVertical jp ClearSprites -Trade_AnimRightToLeft: ; 413c6 (10:53c6) +Trade_AnimRightToLeft: ; Animates the mon moving from the right GB to the left one. call Trade_InitGameboyTransferGfx xor a ld [wTradedMonMovingRight], a ld a, $64 - ld [W_BASECOORDX], a + ld [wBaseCoordX], a ld a, $44 - ld [W_BASECOORDY], a + ld [wBaseCoordY], a ld a, [wRightGBMonSpecies] ld [wMonPartySpriteSpecies], a call Trade_WriteCircledMonOAM @@ -439,7 +441,7 @@ Trade_AnimRightToLeft: ; 413c6 (10:53c6) ld [H_AUTOBGTRANSFERENABLED], a jp ClearSprites -Trade_InitGameboyTransferGfx: ; 41411 (10:5411) +Trade_InitGameboyTransferGfx: ; Initialises the graphics for showing a mon moving between gameboys. ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a @@ -456,41 +458,41 @@ Trade_InitGameboyTransferGfx: ; 41411 (10:5411) ld [hWY], a ret -Trade_DrawLeftGameboy: ; 4142d (10:542d) +Trade_DrawLeftGameboy: call Trade_ClearTileMap ; draw link cable - hlCoord 11, 4 + coord hl, 11, 4 ld a, $5d ld [hli], a ld a, $5e - ld c, $8 + ld c, 8 .loop ld [hli], a dec c jr nz, .loop ; draw gameboy pic - hlCoord 5, 3 + coord hl, 5, 3 ld b, $6 call CopyTileIDsFromList_ZeroBaseTileID ; draw text box with player name below gameboy pic - hlCoord 4, 12 + coord hl, 4, 12 ld b, 2 ld c, 7 call TextBoxBorder - hlCoord 5, 14 + coord hl, 5, 14 ld de, wPlayerName call PlaceString jp DelayFrame -Trade_DrawRightGameboy: ; 4145c (10:545c) +Trade_DrawRightGameboy: call Trade_ClearTileMap ; draw horizontal segment of link cable - hlCoord 0, 4 + coord hl, 0, 4 ld a, $5e ld c, $e .loop @@ -518,25 +520,25 @@ Trade_DrawRightGameboy: ; 4145c (10:545c) ld [hl], a ; draw gameboy pic - hlCoord 7, 8 + coord hl, 7, 8 ld b, $6 call CopyTileIDsFromList_ZeroBaseTileID ; draw text box with enemy name above link cable - hlCoord 6, 0 - ld b, $2 - ld c, $7 + coord hl, 6, 0 + ld b, 2 + ld c, 7 call TextBoxBorder - hlCoord 7, 2 + coord hl, 7, 2 ld de, wLinkEnemyTrainerName call PlaceString jp DelayFrame -Trade_DrawCableAcrossScreen: ; 4149f (10:549f) +Trade_DrawCableAcrossScreen: ; Draws the link cable across the screen. call Trade_ClearTileMap - hlCoord 0, 4 + coord hl, 0, 4 ld a, $5e ld c, SCREEN_WIDTH .loop @@ -545,23 +547,23 @@ Trade_DrawCableAcrossScreen: ; 4149f (10:549f) jr nz, .loop ret -Trade_CopyCableTilesOffScreen: ; 414ae (10:54ae) +Trade_CopyCableTilesOffScreen: ; This is used to copy the link cable tiles off screen so that the cable ; continues when the screen is scrolled. push hl - hlCoord 0, 4 - call CopyToScreenEdgeTiles + coord hl, 0, 4 + call CopyToRedrawRowOrColumnSrcTiles pop hl ld a, h - ld [H_SCREENEDGEREDRAWADDR + 1], a + ld [hRedrawRowOrColumnDest + 1], a ld a, l - ld [H_SCREENEDGEREDRAWADDR], a - ld a, REDRAWROW - ld [H_SCREENEDGEREDRAW], a + ld [hRedrawRowOrColumnDest], a + ld a, REDRAW_ROW + ld [hRedrawRowOrColumnMode], a ld c, 10 jp DelayFrames -Trade_AnimMonMoveHorizontal: ; 414c5 (10:54c5) +Trade_AnimMonMoveHorizontal: ; Animates the mon going through the link cable horizontally over a distance of ; b 16-pixel units. ld a, [wTradedMonMovingRight] @@ -588,7 +590,7 @@ Trade_AnimMonMoveHorizontal: ; 414c5 (10:54c5) jr nz, Trade_AnimMonMoveHorizontal ret -Trade_AnimCircledMon: ; 414e8 (10:54e8) +Trade_AnimCircledMon: ; Cycles between the two animation frames of the mon party sprite, cycles ; between a circle and an oval around the mon sprite, and makes the cable flash. push de @@ -612,18 +614,18 @@ Trade_AnimCircledMon: ; 414e8 (10:54e8) pop de ret -Trade_WriteCircledMonOAM: ; 41505 (10:5505) +Trade_WriteCircledMonOAM: callba WriteMonPartySpriteOAMBySpecies call Trade_WriteCircleOAM -Trade_AddOffsetsToOAMCoords: ; 41510 (10:5510) +Trade_AddOffsetsToOAMCoords: ld hl, wOAMBuffer ld c, $14 .loop - ld a, [W_BASECOORDY] + ld a, [wBaseCoordY] add [hl] ld [hli], a - ld a, [W_BASECOORDX] + ld a, [wBaseCoordX] add [hl] ld [hli], a inc hl @@ -632,7 +634,7 @@ Trade_AddOffsetsToOAMCoords: ; 41510 (10:5510) jr nz, .loop ret -Trade_AnimMonMoveVertical: ; 41525 (10:5525) +Trade_AnimMonMoveVertical: ; Animates the mon going through the link cable vertically as well as ; horizontally for a bit. The last bit of horizontal movement (when moving ; right) or the first bit of horizontal movement (when moving left) are done @@ -645,30 +647,30 @@ Trade_AnimMonMoveVertical: ; 41525 (10:5525) and a jr z, .movingLeft ; moving right - ld bc, $400 ; move right + lb bc, 4, 0 ; move right call .doAnim - ld bc, $a ; move down + lb bc, 0, 10 ; move down jr .doAnim .movingLeft - ld bc, $f6 ; move up + lb bc, 0, -10 ; move up call .doAnim - ld bc, $fc00 ; move left + lb bc, -4, 0 ; move left .doAnim ld a, b - ld [W_BASECOORDX], a + ld [wBaseCoordX], a ld a, c - ld [W_BASECOORDY], a + ld [wBaseCoordY], a ld d, $4 .loop call Trade_AddOffsetsToOAMCoords call Trade_AnimCircledMon - ld c, $8 + ld c, 8 call DelayFrames dec d jr nz, .loop ret -Trade_WriteCircleOAM: ; 41558 (10:5558) +Trade_WriteCircleOAM: ; Writes the OAM blocks for the circle around the traded mon as it passes ; the link cable. ld hl, Trade_CircleOAMPointers @@ -695,7 +697,7 @@ Trade_WriteCircleOAM: ; 41558 (10:5558) jr nz, .loop ret -Trade_CircleOAMPointers: ; 41574 (10:5574) +Trade_CircleOAMPointers: dw Trade_CircleOAM0 db $08,$08 dw Trade_CircleOAM1 @@ -705,40 +707,40 @@ Trade_CircleOAMPointers: ; 41574 (10:5574) dw Trade_CircleOAM3 db $18,$18 -Trade_CircleOAM0: ; 41584 (10:5584) +Trade_CircleOAM0: db $38,$10,$39,$10 db $3A,$10,$3B,$10 -Trade_CircleOAM1: ; 4158c (10:558c) +Trade_CircleOAM1: db $39,$30,$38,$30 db $3B,$30,$3A,$30 -Trade_CircleOAM2: ; 41594 (10:5594) +Trade_CircleOAM2: db $3A,$50,$3B,$50 db $38,$50,$39,$50 -Trade_CircleOAM3: ; 4159c (10:559c) +Trade_CircleOAM3: db $3B,$70,$3A,$70 db $39,$70,$38,$70 ; a = species -Trade_LoadMonSprite: ; 415a4 (10:55a4) +Trade_LoadMonSprite: ld [wcf91], a ld [wd0b5], a - ld [wcf1d], a - ld b, $b - ld c, $0 - call GoPAL_SET + ld [wWholeScreenPaletteMonSpecies], a + ld b, SET_PAL_POKEMON_WHOLE_SCREEN + ld c, 0 + call RunPaletteCommand ld a, [H_AUTOBGTRANSFERENABLED] xor $1 ld [H_AUTOBGTRANSFERENABLED], a call GetMonHeader - hlCoord 7, 2 + coord hl, 7, 2 call LoadFlippedFrontSpriteByMonIndex ld c, 10 jp DelayFrames -Trade_ShowClearedWindow: ; 415c8 (10:55c8) +Trade_ShowClearedWindow: ; clears the window and covers the BG entirely with the window ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a @@ -753,8 +755,11 @@ Trade_ShowClearedWindow: ; 415c8 (10:55c8) ld [hSCX], a ret -Trade_SlideTextBoxOffScreen: ; 415df (10:55df) -; Slides the window right until it's off screen. +Trade_SlideTextBoxOffScreen: +; Slides the window right until it's off screen. The window usually just has +; a text box at the bottom when this is called. However, when this is called +; after Trade_ShowEnemyMon in the external clock sequence, there is a mon pic +; above the text box and it is also scrolled off the screen. ld c, 50 call DelayFrames .loop @@ -772,18 +777,18 @@ Trade_SlideTextBoxOffScreen: ; 415df (10:55df) ld [rWX], a ret -PrintTradeWentToText: ; 415fe (10:55fe) +PrintTradeWentToText: ld hl, TradeWentToText call PrintText ld c, 200 call DelayFrames jp Trade_SlideTextBoxOffScreen -TradeWentToText: ; 4160c (10:560c) +TradeWentToText: TX_FAR _TradeWentToText db "@" -PrintTradeForSendsText: ; 41611 (10:5611) +PrintTradeForSendsText: ld hl, TradeForText call PrintText call Trade_Delay80 @@ -791,15 +796,15 @@ PrintTradeForSendsText: ; 41611 (10:5611) call PrintText jp Trade_Delay80 -TradeForText: ; 41623 (10:5623) +TradeForText: TX_FAR _TradeForText db "@" -TradeSendsText: ; 41628 (10:5628) +TradeSendsText: TX_FAR _TradeSendsText db "@" -PrintTradeFarewellText: ; 4162d (10:562d) +PrintTradeFarewellText: ld hl, TradeWavesFarewellText call PrintText call Trade_Delay80 @@ -808,24 +813,24 @@ PrintTradeFarewellText: ; 4162d (10:562d) call Trade_Delay80 jp Trade_SlideTextBoxOffScreen -TradeWavesFarewellText: ; 41642 (10:5642) +TradeWavesFarewellText: TX_FAR _TradeWavesFarewellText db "@" -TradeTransferredText: ; 41647 (10:5647) +TradeTransferredText: TX_FAR _TradeTransferredText db "@" -PrintTradeTakeCareText: ; 4164c (10:564c) +PrintTradeTakeCareText: ld hl, TradeTakeCareText call PrintText jp Trade_Delay80 -TradeTakeCareText: ; 41655 (10:5655) +TradeTakeCareText: TX_FAR _TradeTakeCareText db "@" -PrintTradeWillTradeText: ; 4165a (10:565a) +PrintTradeWillTradeText: ld hl, TradeWillTradeText call PrintText call Trade_Delay80 @@ -833,16 +838,16 @@ PrintTradeWillTradeText: ; 4165a (10:565a) call PrintText jp Trade_Delay80 -TradeWillTradeText: ; 4166c (10:566c) +TradeWillTradeText: TX_FAR _TradeWillTradeText db "@" -TradeforText: ; 41671 (10:5671) +TradeforText: TX_FAR _TradeforText db "@" -Trade_ShowAnimation: ; 41676 (10:5676) - ld [W_ANIMATIONID], a +Trade_ShowAnimation: + ld [wAnimationID], a xor a - ld [wcc5b], a + ld [wAnimationType], a predef_jump MoveAnimation diff --git a/engine/trade2.asm b/engine/trade2.asm index da199e77..062d5285 100755 --- a/engine/trade2.asm +++ b/engine/trade2.asm @@ -1,49 +1,48 @@ -Trade_PrintPlayerMonInfoText: ; 42769 (10:6769) - hlCoord 5, 0 +Trade_PrintPlayerMonInfoText: + coord hl, 5, 0 ld de,Trade_MonInfoText call PlaceString ld a,[wTradedPlayerMonSpecies] ld [wd11e],a predef IndexToPokedex - hlCoord 9, 0 + coord hl, 9, 0 ld de,wd11e - ld bc,$8103 + lb bc, LEADING_ZEROES | 1, 3 call PrintNumber - hlCoord 5, 2 + coord hl, 5, 2 ld de,wcf4b call PlaceString - hlCoord 8, 4 + coord hl, 8, 4 ld de,wTradedPlayerMonOT call PlaceString - hlCoord 8, 6 + coord hl, 8, 6 ld de,wTradedPlayerMonOTID - ld bc,$8205 + lb bc, LEADING_ZEROES | 2, 5 jp PrintNumber -Trade_PrintEnemyMonInfoText: ; 427a7 (10:67a7) - hlCoord 5, 10 +Trade_PrintEnemyMonInfoText: + coord hl, 5, 10 ld de,Trade_MonInfoText call PlaceString ld a,[wTradedEnemyMonSpecies] ld [wd11e],a predef IndexToPokedex - hlCoord 9, 10 + coord hl, 9, 10 ld de,wd11e - ld bc,$8103 + lb bc, LEADING_ZEROES | 1, 3 call PrintNumber - hlCoord 5, 12 + coord hl, 5, 12 ld de,wcd6d call PlaceString - hlCoord 8, 14 + coord hl, 8, 14 ld de,wTradedEnemyMonOT call PlaceString - hlCoord 8, 16 + coord hl, 8, 16 ld de,wTradedEnemyMonOTID - ld bc,$8205 + lb bc, LEADING_ZEROES | 2, 5 jp PrintNumber -Trade_MonInfoText: ; 427e5 (10:67e5) - db "──",$74,$F2,$4E - db $4E - db "OT/",$4E - db $73,"№",$F2,"@" +Trade_MonInfoText: + db "──№⠄",$4E + next "OT/" + next $73,"№⠄","@" diff --git a/engine/turn_sprite.asm b/engine/turn_sprite.asm index 84037cfe..e8a47a8f 100755 --- a/engine/turn_sprite.asm +++ b/engine/turn_sprite.asm @@ -1,4 +1,4 @@ -UpdateSpriteFacingOffsetAndDelayMovement: ; 13074 (4:7074) +UpdateSpriteFacingOffsetAndDelayMovement: ld h, $c2 ld a, [H_CURRENTSPRITEOFFSET] add $8 diff --git a/extras b/extras -Subproject 698b0fc7e63d3dadf07247015e230bce145cc50 +Subproject 0e1798937a4bf723813574281d0dc12c471c919 diff --git a/gfx/blocksets/beachhouse.bst b/gfx/blocksets/beachhouse.bst Binary files differdeleted file mode 100644 index bafbe0b2..00000000 --- a/gfx/blocksets/beachhouse.bst +++ /dev/null diff --git a/gfx/tilesets/beachhouse.png b/gfx/tilesets/beachhouse.png Binary files differdeleted file mode 100644 index f5dccf7a..00000000 --- a/gfx/tilesets/beachhouse.png +++ /dev/null diff --git a/gfx/tilesets/beachhouse.tilecoll b/gfx/tilesets/beachhouse.tilecoll deleted file mode 100644 index 54ddac19..00000000 --- a/gfx/tilesets/beachhouse.tilecoll +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file @@ -30,7 +30,7 @@ SECTION "joypad", ROM0 [$60] reti -SECTION "Home", ROM0 +SECTION "Home", ROM0 [$61] DisableLCD:: xor a @@ -99,7 +99,7 @@ SECTION "Header", ROM0 [$104] -SECTION "Main", ROM0 +SECTION "Main", ROM0 [$150] Start:: cp GBC @@ -117,8 +117,7 @@ INCLUDE "home/joypad.asm" INCLUDE "data/map_header_pointers.asm" INCLUDE "home/overworld.asm" - -CheckForUserInterruption:: ; 12f8 (0:12f8) +CheckForUserInterruption:: ; Return carry if Up+Select+B, Start or A are pressed in c frames. ; Used only in the intro and title screen. call DelayFrame @@ -148,13 +147,13 @@ CheckForUserInterruption:: ; 12f8 (0:12f8) ; function to load position data for destination warp when switching maps ; INPUT: ; a = ID of destination warp within destination map -LoadDestinationWarpPosition:: ; 1313 (0:1313) +LoadDestinationWarpPosition:: ld b,a ld a,[H_LOADEDROMBANK] push af ld a,[wPredefParentBank] ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a ld a,b add a add a @@ -166,11 +165,11 @@ LoadDestinationWarpPosition:: ; 1313 (0:1313) call CopyData pop af ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a ret -DrawHPBar:: ; 1336 (0:1336) +DrawHPBar:: ; Draw an HP bar d tiles long, and fill it to e pixels. ; If c is nonzero, show at least a sliver regardless. ; The right end of the bar changes with [wHPBarType]. @@ -209,7 +208,7 @@ DrawHPBar:: ; 1336 (0:1336) and a jr nz, .fill - ; If c iz nonzero, draw a pixel anyway. + ; If c is nonzero, draw a pixel anyway. ld a, c and a jr z, .done @@ -240,10 +239,10 @@ DrawHPBar:: ; 1336 (0:1336) ; loads pokemon data from one of multiple sources to wLoadedMon -; loads base stats to W_MONHDEXNUM +; loads base stats to wMonHeader ; INPUT: ; [wWhichPokemon] = index of pokemon within party/box -; [wcc49] = source +; [wMonDataLocation] = source ; 00: player's party ; 01: enemy's party ; 02: current box @@ -251,14 +250,11 @@ DrawHPBar:: ; 1336 (0:1336) ; OUTPUT: ; [wcf91] = pokemon ID ; wLoadedMon = base address of pokemon data -; W_MONHDEXNUM = base address of base stats -LoadMonData:: ; 1372 (0:1372) - ld hl, LoadMonData_ - ld b, BANK(LoadMonData_) - jp Bankswitch - +; wMonHeader = base address of base stats +LoadMonData:: + jpab LoadMonData_ -Func_137a:: ; 137a (0:137a) +OverwritewMoves:: ; Write c to [wMoves + b]. Unused. ld hl, wMoves ld e, b @@ -268,11 +264,11 @@ Func_137a:: ; 137a (0:137a) ld [hl], a ret -LoadFlippedFrontSpriteByMonIndex:: ; 1384 (0:1384) +LoadFlippedFrontSpriteByMonIndex:: ld a, 1 - ld [W_SPRITEFLIPPED], a + ld [wSpriteFlipped], a -LoadFrontSpriteByMonIndex:: ; 1389 (0:1389) +LoadFrontSpriteByMonIndex:: push hl ld a, [wd11e] push af @@ -299,27 +295,27 @@ 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 + ld [hStartTileID], a + call CopyUncompressedPicToHL xor a - ld [W_SPRITEFLIPPED], a + ld [wSpriteFlipped], a pop af ld [H_LOADEDROMBANK], a - ld [$2000], a + ld [MBC1RomBank], a ret -PlayCry:: ; 13d0 (0:13d0) +PlayCry:: ; Play monster a's cry. call GetCryData call PlaySound jp WaitForSoundToFinish -GetCryData:: ; 13d9 (0:13d9) +GetCryData:: ; Load cry data for monster a. dec a ld c, a @@ -329,14 +325,14 @@ GetCryData:: ; 13d9 (0:13d9) add hl, bc add hl, bc - ld a, Bank(CryData) + ld a, BANK(CryData) call BankswitchHome ld a, [hli] ld b, a ; cry id ld a, [hli] - ld [wc0f1], a + ld [wFrequencyModifier], a ld a, [hl] - ld [wc0f2], a + ld [wTempoModifier], a call BankswitchBack ; Cry headers have 3 channels, @@ -349,8 +345,7 @@ GetCryData:: ; 13d9 (0:13d9) add c ret - -DisplayPartyMenu:: ; 13fc (0:13fc) +DisplayPartyMenu:: ld a,[hTilesetType] push af xor a @@ -361,7 +356,7 @@ DisplayPartyMenu:: ; 13fc (0:13fc) call DrawPartyMenu jp HandlePartyMenuInput -GoBackToPartyMenu:: ; 1411 (0:1411) +GoBackToPartyMenu:: ld a,[hTilesetType] push af xor a @@ -370,21 +365,21 @@ GoBackToPartyMenu:: ; 1411 (0:1411) call RedrawPartyMenu jp HandlePartyMenuInput -PartyMenuInit:: ; 1420 (0:1420) +PartyMenuInit:: ld a, 1 ; hardcoded bank call BankswitchHome call LoadHpBarAndStatusTilePatterns ld hl, wd730 set 6, [hl] ; turn off letter printing delay - xor a - ld [wcc49], a - ld [wcc37], a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation], a + ld [wMenuWatchMovingOutOfBounds], a ld hl, wTopMenuItemY inc a ld [hli], a ; top menu item Y xor a ld [hli], a ; top menu item X - ld a, [wcc2b] + ld a, [wPartyAndBillsPCSavedMenuItem] push af ld [hli], a ; current menu item ID inc hl @@ -396,31 +391,31 @@ PartyMenuInit:: ; 1420 (0:1420) ; otherwise, it is 0 .storeMaxMenuItemID ld [hli], a ; max menu item ID - ld a, [wd11f] + ld a, [wForcePlayerToChooseMon] and a - ld a, A_BUTTON + B_BUTTON + ld a, A_BUTTON | B_BUTTON jr z, .next xor a - ld [wd11f], a - inc a + ld [wForcePlayerToChooseMon], a + inc a ; a = A_BUTTON .next ld [hli], a ; menu watched keys pop af ld [hl], a ; old menu item ID ret -HandlePartyMenuInput:: ; 145a (0:145a) +HandlePartyMenuInput:: ld a,1 ld [wMenuWrappingEnabled],a ld a,$40 - ld [wd09b],a - call HandleMenuInputPokemonSelection + ld [wPartyMenuAnimMonEnabled],a + call HandleMenuInput_ call PlaceUnfilledArrowMenuCursor ld b,a xor a - ld [wd09b],a + ld [wPartyMenuAnimMonEnabled],a ld a,[wCurrentMenuItem] - ld [wcc2b],a + ld [wPartyAndBillsPCSavedMenuItem],a ld hl,wd730 res 6,[hl] ; turn on letter printing delay ld a,[wMenuItemToSwap] @@ -456,7 +451,7 @@ HandlePartyMenuInput:: ; 145a (0:145a) callba ErasePartyMenuCursors xor a ld [wMenuItemToSwap],a - ld [wd07d],a + ld [wPartyMenuTypeOrMessageID],a call RedrawPartyMenu jr HandlePartyMenuInput .handleSwap @@ -465,14 +460,14 @@ HandlePartyMenuInput:: ; 145a (0:145a) callba SwitchPartyMon jr HandlePartyMenuInput -DrawPartyMenu:: ; 14d4 (0:14d4) +DrawPartyMenu:: ld hl, DrawPartyMenu_ jr DrawPartyMenuCommon -RedrawPartyMenu:: ; 14d9 (0:14d9) +RedrawPartyMenu:: ld hl, RedrawPartyMenu_ -DrawPartyMenuCommon:: ; 14dc (0:14dc) +DrawPartyMenuCommon:: ld b, BANK(RedrawPartyMenu_) jp Bankswitch @@ -480,7 +475,7 @@ DrawPartyMenuCommon:: ; 14dc (0:14dc) ; INPUT: ; de = address of status condition ; hl = destination address -PrintStatusCondition:: ; 14e1 (0:14e1) +PrintStatusCondition:: push de dec de dec de ; de = address of current HP @@ -499,29 +494,30 @@ PrintStatusCondition:: ; 14e1 (0:14e1) ld [hl],"T" and a ret -PrintStatusConditionNotFainted ; 14f6 + +PrintStatusConditionNotFainted: 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 ; INPUT: ; hl = destination address ; [wLoadedMonLevel] = level -PrintLevel:: ; 150b (0:150b) +PrintLevel:: ld a,$6e ; ":L" tile ID ld [hli],a ld c,2 ; number of digits ld a,[wLoadedMonLevel] ; level - cp a,100 + cp 100 jr c,PrintLevelCommon ; if level at least 100, write over the ":L" tile dec hl @@ -532,20 +528,20 @@ PrintLevel:: ; 150b (0:150b) ; INPUT: ; hl = destination address ; [wLoadedMonLevel] = level -PrintLevelFull:: ; 151b (0:151b) +PrintLevelFull:: ld a,$6e ; ":L" tile ID ld [hli],a ld c,3 ; number of digits ld a,[wLoadedMonLevel] ; level -PrintLevelCommon:: ; 1523 (0:1523) +PrintLevelCommon:: ld [wd11e],a ld de,wd11e - ld b,$41 ; no leading zeroes, left-aligned, one byte + ld b,LEFT_ALIGN | 1 ; 1 byte jp PrintNumber -Func_152e:: ; 152e (0:152e) -; Unused. +GetwMoves:: +; Unused. Returns the move at index a from wMoves in a ld hl,wMoves ld c,a ld b,0 @@ -553,15 +549,15 @@ Func_152e:: ; 152e (0:152e) ld a,[hl] ret -; copies the base stat data of a pokemon to W_MONHDEXNUM (W_MONHEADER) +; copies the base stat data of a pokemon to wMonHeader ; INPUT: ; [wd0b5] = pokemon ID -GetMonHeader:: ; 1537 (0:1537) +GetMonHeader:: ld a,[H_LOADEDROMBANK] push af ld a,BANK(BaseStats) ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a push bc push de push hl @@ -571,29 +567,29 @@ GetMonHeader:: ; 1537 (0:1537) ld [wd11e],a ld de,FossilKabutopsPic ld b,$66 ; size of Kabutops fossil and Ghost sprites - cp a,FOSSIL_KABUTOPS ; Kabutops fossil + cp FOSSIL_KABUTOPS ; Kabutops fossil jr z,.specialID ld de,GhostPic - cp a,MON_GHOST ; Ghost + cp MON_GHOST ; Ghost jr z,.specialID ld de,FossilAerodactylPic ld b,$77 ; size of Aerodactyl fossil sprite - cp a,FOSSIL_AERODACTYL ; Aerodactyl fossil + cp FOSSIL_AERODACTYL ; Aerodactyl fossil jr z,.specialID cp a,MEW jr z,.mew predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number ld a,[wd11e] dec a - ld bc,28 + ld bc, MonBaseStatsEnd - MonBaseStats ld hl,BaseStats call AddNTimes - ld de,W_MONHEADER - ld bc,28 + ld de,wMonHeader + ld bc, MonBaseStatsEnd - MonBaseStats call CopyData jr .done .specialID - ld hl,W_MONHSPRITEDIM + ld hl,wMonHSpriteDim ld [hl],b ; write sprite dimensions inc hl ld [hl],e ; write front sprite pointer @@ -602,13 +598,13 @@ GetMonHeader:: ; 1537 (0:1537) jr .done .mew ld hl,MewBaseStats - ld de,W_MONHEADER - ld bc,28 + ld de,wMonHeader + ld bc,MonBaseStatsEnd - MonBaseStats ld a,BANK(MewBaseStats) call FarCopyData .done ld a,[wd0b5] - ld [W_MONHDEXNUM],a + ld [wMonHIndex],a pop af ld [wd11e],a pop hl @@ -616,22 +612,22 @@ 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 -GetPartyMonName2:: ; 15b4 (0:15b4) +GetPartyMonName2:: ld a,[wWhichPokemon] ; index within party ld hl,wPartyMonNicks ; this is called more often -GetPartyMonName:: ; 15ba (0:15ba) +GetPartyMonName:: push hl push bc - call SkipFixedLengthTextEntries ; add 11 to hl, a times + call SkipFixedLengthTextEntries ; add NAME_LENGTH to hl, a times ld de,wcd6d push de - ld bc,11 + ld bc,NAME_LENGTH call CopyData pop de pop bc @@ -651,7 +647,7 @@ GetPartyMonName:: ; 15ba (0:15ba) ; bits 0-4: length of BCD number in bytes ; Note that bits 5 and 7 are modified during execution. The above reflects ; their meaning at the beginning of the functions's execution. -PrintBCDNumber:: ; 15cd (0:15cd) +PrintBCDNumber:: ld b,c ; save flags in b res 7,c res 6,c @@ -689,7 +685,7 @@ PrintBCDNumber:: ; 15cd (0:15cd) .done ret -PrintBCDDigit:: ; 1604 (0:1604) +PrintBCDDigit:: and $f and a jr z,.zeroDigit @@ -705,7 +701,7 @@ PrintBCDDigit:: ; 1604 (0:1604) .skipCurrencySymbol res 7,b ; unset 7 to indicate that a nonzero digit has been reached .outputDigit - add a,"0" + add "0" ld [hli],a jp PrintLetterDelay .zeroDigit @@ -719,17 +715,17 @@ PrintBCDDigit:: ; 1604 (0:1604) ; uncompresses the front or back sprite of the specified mon ; assumes the corresponding mon header is already loaded ; hl contains offset to sprite pointer ($b for front or $d for back) -UncompressMonSprite:: ; 1627 (0:1627) - ld bc,W_MONHEADER +UncompressMonSprite:: + ld bc,wMonHeader add hl,bc ld a,[hli] - ld [W_SPRITEINPUTPTR],a ; fetch sprite input pointer + ld [wSpriteInputPtr],a ; fetch sprite input pointer ld a,[hl] - ld [W_SPRITEINPUTPTR+1],a + ld [wSpriteInputPtr+1],a ; define (by index number) the bank that a pokemon's image is in ; index = Mew, bank 1 ; index = Kabutops fossil, bank $B -; index < $1F, bank 9 +; index < $1F, bank 9 ; $1F ≤ index < $4A, bank $A ; $4A ≤ index < $74, bank $B ; $74 ≤ index < $99, bank $C @@ -764,11 +760,11 @@ UncompressMonSprite:: ; 1627 (0:1627) jp UncompressSpriteData ; de: destination location -LoadMonFrontSprite:: ; 1665 (0:1665) +LoadMonFrontSprite:: push de - ld hl, W_MONHFRONTSPRITE - W_MONHEADER + ld hl, wMonHFrontSprite - wMonHeader call UncompressMonSprite - ld hl, W_MONHSPRITEDIM + ld hl, wMonHSpriteDim ld a, [hli] ld c, a pop de @@ -778,7 +774,7 @@ LoadMonFrontSprite:: ; 1665 (0:1665) ; calculates alignment parameters to place both sprite chunks in the center of the 7*7 tile sprite buffers ; de: destination location ; a,c: sprite dimensions (in tiles of 8x8 each) -LoadUncompressedSpriteData:: ; 1672 (0:1672) +LoadUncompressedSpriteData:: push de and $f ld [H_SPRITEWIDTH], a ; each byte contains 8 pixels (in 1bpp), so tiles=bytes for width @@ -800,7 +796,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 @@ -812,31 +808,31 @@ LoadUncompressedSpriteData:: ; 1672 (0:1672) ld [H_SPRITEOFFSET], a xor a ld [$4000], a - ld hl, S_SPRITEBUFFER0 + ld hl, sSpriteBuffer0 call ZeroSpriteBuffer ; zero buffer 0 - ld de, S_SPRITEBUFFER1 - ld hl, S_SPRITEBUFFER0 + ld de, sSpriteBuffer1 + ld hl, sSpriteBuffer0 call AlignSpriteDataCentered ; copy and align buffer 1 to 0 (containing the MSB of the 2bpp sprite) - ld hl, S_SPRITEBUFFER1 + ld hl, sSpriteBuffer1 call ZeroSpriteBuffer ; zero buffer 1 - ld de, S_SPRITEBUFFER2 - ld hl, S_SPRITEBUFFER1 + ld de, sSpriteBuffer2 + ld hl, sSpriteBuffer1 call AlignSpriteDataCentered ; copy and align buffer 2 to 1 (containing the LSB of the 2bpp sprite) pop de jp InterlaceMergeSpriteBuffers ; copies and aligns the sprite data properly inside the sprite buffer ; sprite buffers are 7*7 tiles in size, the loaded sprite is centered within this area -AlignSpriteDataCentered:: ; 16c2 (0:16c2) +AlignSpriteDataCentered:: ld a, [H_SPRITEOFFSET] 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] @@ -853,7 +849,7 @@ AlignSpriteDataCentered:: ; 16c2 (0:16c2) ret ; fills the sprite buffer (pointed to in hl) with zeros -ZeroSpriteBuffer:: ; 16df (0:16df) +ZeroSpriteBuffer:: ld bc, SPRITEBUFFERSIZE .nextByteLoop xor a @@ -867,15 +863,15 @@ ZeroSpriteBuffer:: ; 16df (0:16df) ; combines the (7*7 tiles, 1bpp) sprite chunks in buffer 0 and 1 into a 2bpp sprite located in buffer 1 through 2 ; in the resulting sprite, the rows of the two source sprites are interlaced ; de: output address -InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea) +InterlaceMergeSpriteBuffers:: xor a ld [$4000], a push de - ld hl, S_SPRITEBUFFER2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2 - 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 hl, sSpriteBuffer2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2 + ld de, sSpriteBuffer1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1 + ld bc, sSpriteBuffer0 + (SPRITEBUFFERSIZE - 1) ; source 1: end of buffer 0 ld a, SPRITEBUFFERSIZE/2 ; $c4 - ld [H_SPRITEINTERLACECOUNTER], a ; $ff8b + ld [H_SPRITEINTERLACECOUNTER], a .interlaceLoop ld a, [de] dec de @@ -889,15 +885,15 @@ 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] + ld a, [wSpriteFlipped] and a jr z, .notFlipped ld bc, 2*SPRITEBUFFERSIZE - ld hl, S_SPRITEBUFFER1 + ld hl, sSpriteBuffer1 .swapLoop swap [hl] ; if flipped swap nybbles in all bytes inc hl @@ -907,7 +903,7 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea) jr nz, .swapLoop .notFlipped pop hl - ld de, S_SPRITEBUFFER1 + ld de, sSpriteBuffer1 ld c, (2*SPRITEBUFFERSIZE)/16 ; $31, number of 16 byte chunks to be copied ld a, [H_LOADEDROMBANK] ld b, a @@ -926,7 +922,7 @@ INCLUDE "home/timer.asm" INCLUDE "home/audio.asm" -UpdateSprites:: ; 2429 (0:2429) +UpdateSprites:: ld a, [wUpdateSpritesEnabled] dec a ret nz @@ -934,52 +930,51 @@ 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" -TextScriptEndingChar:: ; 24d6 (0:24d6) +TextScriptEndingChar:: db "@" -TextScriptEnd:: ; 24d7 (0:24d7) +TextScriptEnd:: ld hl,TextScriptEndingChar ret -ExclamationText:: ; 24db (0:24db) +ExclamationText:: TX_FAR _ExclamationText db "@" -GroundRoseText:: ; 24e0 (0:24e0) +GroundRoseText:: TX_FAR _GroundRoseText db "@" -BoulderText:: ; 24e5 (0:24e5) +BoulderText:: TX_FAR _BoulderText db "@" -MartSignText:: ; 24ea (0:24ea) +MartSignText:: TX_FAR _MartSignText db "@" -PokeCenterSignText:: ; 24ef (0:24ef) +PokeCenterSignText:: TX_FAR _PokeCenterSignText db "@" -Predef5CText:: ; 24f4 (0:24f4) -; XXX better label (what does predef $5C do?) - db $08 ; asm - predef PickupItem +PickUpItemText:: + TX_ASM + predef PickUpItem jp TextScriptEnd INCLUDE "home/pic.asm" -ResetPlayerSpriteData:: ; 28a6 (0:28a6) +ResetPlayerSpriteData:: ld hl, wSpriteStateData1 call ResetPlayerSpriteData_ClearSpriteData ld hl, wSpriteStateData2 @@ -995,34 +990,34 @@ ResetPlayerSpriteData:: ; 28a6 (0:28a6) ret ; overwrites sprite data with zeroes -ResetPlayerSpriteData_ClearSpriteData:: ; 28c4 (0:28c4) +ResetPlayerSpriteData_ClearSpriteData:: ld bc, $10 xor a jp FillMemory -Func_28cb:: ; 28cb (0:28cb) - ld a, [wMusicHeaderPointer] - and a - jr nz, .asm_28dc +FadeOutAudio:: + ld a, [wAudioFadeOutControl] + and a ; currently fading out audio? + jr nz, .fadingOut ld a, [wd72c] bit 1, a ret nz ld a, $77 - ld [$ff24], a + ld [rNR50], a ret -.asm_28dc - ld a, [wcfc9] +.fadingOut + ld a, [wAudioFadeOutCounter] and a - jr z, .asm_28e7 + jr z, .counterReachedZero dec a - ld [wcfc9], a - ret -.asm_28e7 - ld a, [wcfc8] - ld [wcfc9], a - ld a, [$ff24] - and a - jr z, .asm_2903 + ld [wAudioFadeOutCounter], a + ret +.counterReachedZero + ld a, [wAudioFadeOutCounterReloadValue] + ld [wAudioFadeOutCounter], a + ld a, [rNR50] + and a ; has the volume reached 0? + jr z, .fadeOutComplete ld b, a and $f dec a @@ -1033,57 +1028,57 @@ Func_28cb:: ; 28cb (0:28cb) dec a swap a or c - ld [$ff24], a + ld [rNR50], a ret -.asm_2903 - ld a, [wMusicHeaderPointer] +.fadeOutComplete + ld a, [wAudioFadeOutControl] ld b, a xor a - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound - ld a, [wc0f0] - ld [wc0ef], a + ld a, [wAudioSavedROMBank] + ld [wAudioROMBank], a ld a, b - ld [wc0ee], a + ld [wNewSoundID], a jp PlaySound ; this function is used to display sign messages, sprite dialog, etc. -; INPUT: [$ff8c] = sprite ID or text ID -DisplayTextID:: ; 2920 (0:2920) +; INPUT: [hSpriteIndexOrTextID] = sprite ID or text ID +DisplayTextID:: ld a,[H_LOADEDROMBANK] push af callba DisplayTextIDInit ; initialization - ld hl,wcf11 + ld hl,wTextPredefFlag bit 0,[hl] res 0,[hl] jr nz,.skipSwitchToMapBank - ld a,[W_CURMAP] + ld a,[wCurMap] call SwitchToMapRomBank .skipSwitchToMapBank ld a,30 ; half a second ld [H_FRAMECOUNTER],a ; used as joypad poll timer - ld hl,W_MAPTEXTPTR + ld hl,wMapTextPtr ld a,[hli] ld h,[hl] ld l,a ; hl = map text pointer ld d,$00 - ld a,[$ff8c] ; text ID + ld a,[hSpriteIndexOrTextID] ; text ID ld [wSpriteIndex],a and a jp z,DisplayStartMenu - cp a,$d3 + cp TEXT_SAFARI_GAME_OVER jp z,DisplaySafariGameOverText - cp a,$d0 + cp TEXT_MON_FAINTED jp z,DisplayPokemonFaintedText - cp a,$d1 + cp TEXT_BLACKED_OUT jp z,DisplayPlayerBlackedOutText - cp a,$d2 + cp TEXT_REPEL_WORE_OFF jp z,DisplayRepelWoreOffText - ld a,[W_NUMSPRITES] + ld a,[wNumSprites] ld e,a - ld a,[$ff8c] ; sprite ID + ld a,[hSpriteIndexOrTextID] ; sprite ID cp e jr z,.spriteHandling jr nc,.skipSpriteHandling @@ -1095,8 +1090,8 @@ DisplayTextID:: ; 2920 (0:2920) callba UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction) pop bc pop de - ld hl,W_MAPSPRITEDATA ; NPC text entries - ld a,[$ff8c] + ld hl,wMapSpriteData ; NPC text entries + ld a,[hSpriteIndexOrTextID] dec a add a add l @@ -1118,48 +1113,48 @@ DisplayTextID:: ; 2920 (0:2920) ld l,a ; hl = address of the text ld a,[hl] ; a = first byte of text ; check first byte of text for special cases - cp a,$fe ; Pokemart NPC + cp $fe ; Pokemart NPC jp z,DisplayPokemartDialogue - cp a,$ff ; Pokemon Center NPC + cp $ff ; Pokemon Center NPC jp z,DisplayPokemonCenterDialogue - cp a,$fc ; Item Storage PC + cp $fc ; Item Storage PC jp z,FuncTX_ItemStoragePC - cp a,$fd ; Bill's PC + cp $fd ; Bill's PC jp z,FuncTX_BillsPC - cp a,$f9 ; Pokemon Center PC + cp $f9 ; Pokemon Center PC jp z,FuncTX_PokemonCenterPC - cp a,$f5 ; Vending Machine + cp $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 - jp z,FuncTX_SlotMachine - cp a,$f6 ; cable connection NPC in Pokemon Center + cp $f7 ; prize menu + jp z, FuncTX_GameCornerPrizeMenu + cp $f6 ; cable connection NPC in Pokemon Center jr nz,.notSpecialCase callab CableClubNPC jr AfterDisplayingTextID .notSpecialCase - call Func_3c59 ; display the text + call PrintText_NoCreatingTextBox ; display the text ld a,[wDoNotWaitForButtonPressAfterDisplayingText] and a jr nz,HoldTextDisplayOpen -AfterDisplayingTextID:: ; 29d6 (0:29d6) - ld a,[wcc47] +AfterDisplayingTextID:: + ld a,[wEnteringCableClub] and a jr nz,HoldTextDisplayOpen call WaitForTextScrollButtonPress ; wait for a button press after displaying all the text ; loop to hold the dialogue box open as long as the player keeps holding down the A button -HoldTextDisplayOpen:: ; 29df (0:29df) +HoldTextDisplayOpen:: call Joypad ld a,[hJoyHeld] bit 0,a ; is the A button being pressed? jr nz,HoldTextDisplayOpen -CloseTextDisplay:: ; 29e8 (0:29e8) - ld a,[W_CURMAP] +CloseTextDisplay:: + ld a,[wCurMap] call SwitchToMapRomBank ld a,$90 ld [hWY],a ; move the window off the screen @@ -1181,7 +1176,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,80 +1186,82 @@ CloseTextDisplay:: ; 29e8 (0:29e8) call LoadCurrentMapView pop af ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a jp UpdateSprites -DisplayPokemartDialogue:: ; 2a2e (0:2a2e) +DisplayPokemartDialogue:: push hl ld hl,PokemartGreetingText call PrintText pop hl inc hl call LoadItemList - ld a,$02 - ld [wListMenuID],a ; selects between subtypes of menus + ld a,PRICEDITEMLISTMENU + ld [wListMenuID],a ld a,[H_LOADEDROMBANK] 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) +PokemartGreetingText:: TX_FAR _PokemartGreetingText db "@" -LoadItemList:: ; 2a5a (0:2a5a) - ld a,$01 +LoadItemList:: + ld a,1 ld [wUpdateSpritesEnabled],a ld a,h - ld [wd128],a + ld [wItemListPointer],a ld a,l - ld [wd129],a - ld de,wStringBuffer2 + 11 + ld [wItemListPointer + 1],a + ld de,wItemList .loop ld a,[hli] ld [de],a inc de - cp a,$ff + cp $ff jr nz,.loop ret -DisplayPokemonCenterDialogue:: ; 2a72 (0:2a72) +DisplayPokemonCenterDialogue:: +; zeroing these doesn't appear to serve any purpose xor a ld [$ff8b],a ld [$ff8c],a ld [$ff8d],a + inc hl ld a,[H_LOADEDROMBANK] 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) +DisplaySafariGameOverText:: callab PrintSafariGameOverText jp AfterDisplayingTextID -DisplayPokemonFaintedText:: ; 2a9b (0:2a9b) +DisplayPokemonFaintedText:: ld hl,PokemonFaintedText call PrintText jp AfterDisplayingTextID -PokemonFaintedText:: ; 2aa4 (0:2aa4) +PokemonFaintedText:: TX_FAR _PokemonFaintedText db "@" -DisplayPlayerBlackedOutText:: ; 2aa9 (0:2aa9) +DisplayPlayerBlackedOutText:: ld hl,PlayerBlackedOutText call PrintText ld a,[wd732] @@ -1272,16 +1269,16 @@ DisplayPlayerBlackedOutText:: ; 2aa9 (0:2aa9) ld [wd732],a jp HoldTextDisplayOpen -PlayerBlackedOutText:: ; 2aba (0:2aba) +PlayerBlackedOutText:: TX_FAR _PlayerBlackedOutText db "@" -DisplayRepelWoreOffText:: ; 2abf (0:2abf) +DisplayRepelWoreOffText:: ld hl,RepelWoreOffText call PrintText jp AfterDisplayingTextID -RepelWoreOffText:: ; 2ac8 (0:2ac8) +RepelWoreOffText:: TX_FAR _RepelWoreOffText db "@" @@ -1292,8 +1289,8 @@ INCLUDE "engine/menu/start_menu.asm" ; hl = address of string of bytes ; b = length of string of bytes ; OUTPUT: -; [wd11e] = number of set bits -CountSetBits:: ; 2b7f (0:2b7f) +; [wNumSetBits] = number of set bits +CountSetBits:: ld c,0 .loop ld a,[hli] @@ -1309,18 +1306,16 @@ CountSetBits:: ; 2b7f (0:2b7f) dec b jr nz,.loop ld a,c - ld [wd11e],a ; store number of set bits + ld [wNumSetBits],a ret ; subtracts the amount the player paid from their money ; sets carry flag if there is enough money and unsets carry flag if not -SubtractAmountPaidFromMoney:: ; 2b96 (0:2b96) - ld b,BANK(SubtractAmountPaidFromMoney_) - ld hl,SubtractAmountPaidFromMoney_ - jp Bankswitch +SubtractAmountPaidFromMoney:: + jpba SubtractAmountPaidFromMoney_ ; adds the amount the player sold to their money -AddAmountSoldToMoney:: ; 2b9e (0:2b9e) +AddAmountSoldToMoney:: ld de,wPlayerMoney + 2 ld hl,$ffa1 ; total price of items ld c,3 ; length of money in bytes @@ -1328,92 +1323,92 @@ AddAmountSoldToMoney:: ; 2b9e (0:2b9e) ld a,MONEY_BOX 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 + ld a, SFX_PURCHASE + call PlaySoundWaitForCurrent + jp WaitForSoundToFinish ; function to remove an item (in varying quantities) from the player's bag or PC box ; INPUT: ; HL = address of inventory (either wNumBagItems or wNumBoxItems) ; [wWhichPokemon] = index (within the inventory) of the item to remove -; [wcf96] = quantity to remove -RemoveItemFromInventory:: ; 2bbb (0:2bbb) +; [wItemQuantity] = quantity to remove +RemoveItemFromInventory:: ld a,[H_LOADEDROMBANK] 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 ; INPUT: ; HL = address of inventory (either wNumBagItems or wNumBoxItems) ; [wcf91] = item ID -; [wcf96] = item quantity +; [wItemQuantity] = item quantity ; sets carry flag if successful, unsets carry flag if unsuccessful -AddItemToInventory:: ; 2bcf (0:2bcf) +AddItemToInventory:: push bc ld a,[H_LOADEDROMBANK] 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 ; INPUT: ; [wListMenuID] = list menu ID -; [wList] = address of the list (2 bytes) -DisplayListMenuID:: ; 2be6 (0:2be6) +; [wListPointer] = address of the list (2 bytes) +DisplayListMenuID:: xor a ld [H_AUTOBGTRANSFERENABLED],a ; disable auto-transfer ld a,1 ld [hJoy7],a ; joypad state update flag - ld a,[W_BATTLETYPE] + ld a,[wBattleType] and a ; is it the Old Man battle? jr nz,.specialBattleType ld a,$01 ; hardcoded bank jr .bankswitch .specialBattleType ; Old Man battle - ld a, Bank(DisplayBattleMenu) + ld a, BANK(DisplayBattleMenu) .bankswitch call BankswitchHome ld hl,wd730 set 6,[hl] ; turn off letter printing delay xor a ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped - ld [wd12a],a - ld a,[wList] + ld [wListCount],a + ld a,[wListPointer] ld l,a - ld a,[wList + 1] + ld a,[wListPointer + 1] ld h,a ; hl = address of the list - ld a,[hl] - ld [wd12a],a ; [wd12a] = number of list entries + ld a,[hl] ; the first byte is the number of entries in the list + ld [wListCount],a ld a,LIST_MENU_BOX ld [wTextBoxID],a call DisplayTextBoxID ; draw the menu text box call UpdateSprites ; disable sprites behind the text box ; the code up to .skipMovingSprites appears to be useless - hlCoord 4, 2 ; coordinates of upper left corner of menu text box - ld de,$090e ; height and width of menu text box + coord hl, 4, 2 ; coordinates of upper left corner of menu text box + lb de, 9, 14 ; height and width of menu text box ld a,[wListMenuID] and a ; is it a PC pokemon list? jr nz,.skipMovingSprites - call UpdateSprites ; 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 - ld a,[wd12a] - cp a,2 ; does the list have less than 2 entries? + ld [wMenuWatchMovingOutOfBounds],a + ld a,[wListCount] + cp 2 ; does the list have less than 2 entries? jr c,.setMenuVariables ld a,2 ; max menu item ID is 2 if the list has at least 2 entries .setMenuVariables @@ -1427,14 +1422,14 @@ DisplayListMenuID:: ; 2be6 (0:2be6) ld c,10 call DelayFrames -DisplayListMenuIDLoop:: ; 2c53 (0:2c53) +DisplayListMenuIDLoop:: xor a ld [H_AUTOBGTRANSFERENABLED],a ; disable transfer call PrintListMenuEntries ld a,1 ld [H_AUTOBGTRANSFERENABLED],a ; enable transfer call Delay3 - ld a,[W_BATTLETYPE] + ld a,[wBattleType] and a ; is it the Old Man battle? jr z,.notOldManBattle .oldManBattle @@ -1444,7 +1439,7 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) call DelayFrames xor a ld [wCurrentMenuItem],a - hlCoord 5, 4 + coord hl, 5, 4 ld a,l ld [wMenuCursorLocation],a ld a,h @@ -1461,17 +1456,20 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) .buttonAPressed ld a,[wCurrentMenuItem] call PlaceUnfilledArrowMenuCursor + +; pointless because both values are overwritten before they are read ld a,$01 - ld [wd12e],a - ld [wd12d],a + ld [wMenuExitMethod],a + ld [wChosenMenuItem],a + xor a - ld [wcc37],a + ld [wMenuWatchMovingOutOfBounds],a ld a,[wCurrentMenuItem] ld c,a ld a,[wListScrollOffset] add c ld c,a - ld a,[wd12a] ; number of list entries + ld a,[wListCount] and a ; is the list empty? jp z,ExitListMenu ; if so, exit the menu dec a @@ -1480,14 +1478,14 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) ld a,c ld [wWhichPokemon],a ld a,[wListMenuID] - cp a,ITEMLISTMENU + cp ITEMLISTMENU jr nz,.skipMultiplying ; if it's an item menu sla c ; item entries are 2 bytes long, so multiply by 2 .skipMultiplying - ld a,[wList] + ld a,[wListPointer] ld l,a - ld a,[wList + 1] + ld a,[wListPointer + 1] ld h,a inc hl ; hl = beginning of list entries ld b,0 @@ -1501,12 +1499,12 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) call GetItemPrice pop hl ld a,[wListMenuID] - cp a,ITEMLISTMENU + cp ITEMLISTMENU jr nz,.skipGettingQuantity ; if it's an item menu inc hl ld a,[hl] ; a = item quantity - ld [wcf97],a + ld [wMaxItemQuantity],a .skipGettingQuantity ld a,[wcf91] ld [wd0b5],a @@ -1516,7 +1514,7 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) jr .storeChosenEntry .pokemonList ld hl,wPartyCount - ld a,[wList] + ld a,[wListPointer] cp l ; is it a list of party pokemon or box pokemon? ld hl,wPartyMonNicks jr z,.getPokemonName @@ -1527,10 +1525,10 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) .storeChosenEntry ; store the menu entry that the player chose and return ld de,wcd6d call CopyStringToCF4B ; copy name to wcf4b - ld a,$01 - ld [wd12e],a + ld a,CHOSE_MENU_ITEM + ld [wMenuExitMethod],a ld a,[wCurrentMenuItem] - ld [wd12d],a + ld [wChosenMenuItem],a xor a ld [hJoy7],a ; joypad state update flag ld hl,wd730 @@ -1547,9 +1545,9 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) jr z,.upPressed .downPressed ld a,[hl] - add a,3 + add 3 ld b,a - ld a,[wd12a] ; number of list entries + ld a,[wListCount] cp b ; will going down scroll past the Cancel button? jp c,DisplayListMenuIDLoop inc [hl] ; if not, go down @@ -1561,30 +1559,30 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) dec [hl] jp DisplayListMenuIDLoop -DisplayChooseQuantityMenu:: ; 2d57 (0:2d57) +DisplayChooseQuantityMenu:: ; text box dimensions/coordinates for just quantity - hlCoord 15, 9 + coord hl, 15, 9 ld b,1 ; height ld c,3 ; width ld a,[wListMenuID] - cp a,PRICEDITEMLISTMENU + cp PRICEDITEMLISTMENU jr nz,.drawTextBox ; text box dimensions/coordinates for quantity and price - hlCoord 7, 9 + coord hl, 7, 9 ld b,1 ; height ld c,11 ; width .drawTextBox call TextBoxBorder - hlCoord 16, 10 + coord hl, 16, 10 ld a,[wListMenuID] - cp a,PRICEDITEMLISTMENU + cp PRICEDITEMLISTMENU jr nz,.printInitialQuantity - hlCoord 8, 10 + coord hl, 8, 10 .printInitialQuantity ld de,InitialQuantityText call PlaceString xor a - ld [wcf96],a ; initialize current quantity to 0 + ld [wItemQuantity],a ; initialize current quantity to 0 jp .incrementQuantity .waitForKeyPressLoop call JoypadLowSensitivity @@ -1599,10 +1597,10 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57) jr nz,.decrementQuantity jr .waitForKeyPressLoop .incrementQuantity - ld a,[wcf97] ; max quantity + ld a,[wMaxItemQuantity] inc a ld b,a - ld hl,wcf96 ; current quantity + ld hl,wItemQuantity ; current quantity inc [hl] ld a,[hl] cp b @@ -1612,62 +1610,62 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57) ld [hl],a jr .handleNewQuantity .decrementQuantity - ld hl,wcf96 ; current quantity + ld hl,wItemQuantity ; current quantity dec [hl] jr nz,.handleNewQuantity ; wrap to the max quantity if the player goes below 1 - ld a,[wcf97] ; max quantity + ld a,[wMaxItemQuantity] ld [hl],a .handleNewQuantity - hlCoord 17, 10 + coord hl, 17, 10 ld a,[wListMenuID] - cp a,PRICEDITEMLISTMENU + cp PRICEDITEMLISTMENU jr nz,.printQuantity .printPrice ld c,$03 - ld a,[wcf96] + ld a,[wItemQuantity] ld b,a - ld hl,$ff9f ; total price + ld hl,hMoney ; total price ; initialize total price to 0 xor a ld [hli],a ld [hli],a ld [hl],a .addLoop ; loop to multiply the individual price by the quantity to get the total price - ld de,$ffa1 - ld hl,$ff8d + ld de,hMoney + 2 + ld hl,hItemPrice + 2 push bc predef AddBCDPredef ; add the individual price to the current sum pop bc dec b jr nz,.addLoop - ld a,[$ff8e] + ld a,[hHalveItemPrices] and a ; should the price be halved (for selling items)? jr z,.skipHalvingPrice xor a - ld [$ffa2],a - ld [$ffa3],a + ld [hDivideBCDDivisor],a + ld [hDivideBCDDivisor + 1],a ld a,$02 - ld [$ffa4],a + ld [hDivideBCDDivisor + 2],a predef DivideBCDPredef3 ; halves the price ; store the halved price - ld a,[$ffa2] - ld [$ff9f],a - ld a,[$ffa3] - ld [$ffa0],a - ld a,[$ffa4] - ld [$ffa1],a + ld a,[hDivideBCDQuotient] + ld [hMoney],a + ld a,[hDivideBCDQuotient + 1] + ld [hMoney + 1],a + ld a,[hDivideBCDQuotient + 2] + ld [hMoney + 2],a .skipHalvingPrice - hlCoord 12, 10 + coord hl, 12, 10 ld de,SpacesBetweenQuantityAndPriceText call PlaceString - ld de,$ff9f ; total price + ld de,hMoney ; total price ld c,$a3 call PrintBCDNumber - hlCoord 9, 10 + coord hl, 9, 10 .printQuantity - ld de,wcf96 ; current quantity - ld bc,$8102 ; print leading zeroes, 1 byte, 2 digits + ld de,wItemQuantity ; current quantity + lb bc, LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits call PrintNumber jp .waitForKeyPressLoop .buttonAPressed ; the player chose to make the transaction @@ -1680,18 +1678,18 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57) ld a,$ff ret -InitialQuantityText:: ; 2e30 (0:2e30) +InitialQuantityText:: db "×01@" -SpacesBetweenQuantityAndPriceText:: ; 2e34 (0:2e34) +SpacesBetweenQuantityAndPriceText:: db " @" -ExitListMenu:: ; 2e3b (0:2e3b) +ExitListMenu:: ld a,[wCurrentMenuItem] - ld [wd12d],a - ld a,$02 - ld [wd12e],a - ld [wcc37],a + ld [wChosenMenuItem],a + ld a,CANCELLED_MENU + ld [wMenuExitMethod],a + ld [wMenuWatchMovingOutOfBounds],a xor a ld [hJoy7],a ld hl,wd730 @@ -1702,20 +1700,20 @@ ExitListMenu:: ; 2e3b (0:2e3b) scf ret -PrintListMenuEntries:: ; 2e5a (0:2e5a) - hlCoord 5, 3 - ld b,$09 - ld c,$0e +PrintListMenuEntries:: + coord hl, 5, 3 + ld b,9 + ld c,14 call ClearScreenArea - ld a,[wList] + ld a,[wListPointer] ld e,a - ld a,[wList + 1] + ld a,[wListPointer + 1] ld d,a inc de ; de = beginning of list entries ld a,[wListScrollOffset] ld c,a ld a,[wListMenuID] - cp a,ITEMLISTMENU + cp ITEMLISTMENU ld a,c jr nz,.skipMultiplying ; if it's an item menu @@ -1728,14 +1726,14 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) jr nc,.noCarry inc d .noCarry - hlCoord 6, 4 ; coordinates of first list entry name + coord hl, 6, 4 ; coordinates of first list entry name ld b,4 ; print 4 names .loop ld a,b ld [wWhichPokemon],a ld a,[de] ld [wd11e],a - cp a,$ff + cp $ff jp z,.printCancelMenuItem push bc push de @@ -1745,7 +1743,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) ld a,[wListMenuID] and a jr z,.pokemonPCMenu - cp a,$01 + cp MOVESLISTMENU jr z,.movesMenu .itemMenu call GetItemName @@ -1753,7 +1751,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) .pokemonPCMenu push hl ld hl,wPartyCount - ld a,[wList] + ld a,[wListPointer] cp l ; is it a list of party pokemon or box pokemon? ld hl,wPartyMonNicks jr z,.getPokemonName @@ -1775,7 +1773,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) call PlaceString pop de pop hl - ld a,[wcf93] + ld a,[wPrintItemPrices] and a ; should prices be printed? jr z,.skipPrintingItemPrice .printItemPrice @@ -1785,7 +1783,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) ld [wcf91],a call GetItemPrice ; get price pop hl - ld bc,20 + 5 ; 1 row down and 5 columns right + ld bc, SCREEN_WIDTH + 5 ; 1 row down and 5 columns right add hl,bc ld c,$a3 ; no leading zeroes, right-aligned, print currency symbol, 3 bytes call PrintBCDNumber @@ -1798,13 +1796,13 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) push af push hl ld hl,wPartyCount - ld a,[wList] + ld a,[wListPointer] cp l ; is it a list of party pokemon or box pokemon? - ld a,$00 + ld a,PLAYER_PARTY_DATA jr z,.next - ld a,$02 + ld a,BOX_DATA .next - ld [wcc49],a + ld [wMonDataLocation],a ld hl,wWhichPokemon ld a,[hl] ld b,a @@ -1814,8 +1812,8 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) ld a,[wListScrollOffset] add b ld [hl],a - call LoadMonData ; load pokemon info - ld a,[wcc49] + call LoadMonData + ld a,[wMonDataLocation] and a ; is it a list of party pokemon or box pokemon? jr z,.skipCopyingLevel .copyLevel @@ -1825,7 +1823,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) pop hl ld bc,$001c add hl,bc - call PrintLevel ; print level + call PrintLevel pop af ld [wd11e],a .skipPrintingPokemonLevel @@ -1833,28 +1831,28 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) pop de inc de ld a,[wListMenuID] - cp a,ITEMLISTMENU + cp ITEMLISTMENU jr nz,.nextListEntry .printItemQuantity ld a,[wd11e] ld [wcf91],a call IsKeyItem ; check if item is unsellable - ld a,[wd124] + ld a,[wIsKeyItem] and a ; is the item unsellable? jr nz,.skipPrintingItemQuantity ; if so, don't print the quantity push hl - ld bc,20 + 8 ; 1 row down and 8 columns right + ld bc, SCREEN_WIDTH + 8 ; 1 row down and 8 columns right add hl,bc ld a,"×" ld [hli],a ld a,[wd11e] push af ld a,[de] - ld [wcf97],a + ld [wMaxItemQuantity],a push de ld de,wd11e ld [de],a - ld bc,$0102 + lb bc, 1, 2 call PrintNumber pop de pop af @@ -1876,7 +1874,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) ld a,$ec ; unfilled right arrow menu cursor to indicate an item being swapped ld [hli],a .nextListEntry - ld bc,2 * 20 ; 2 rows + ld bc,2 * SCREEN_WIDTH ; 2 rows add hl,bc pop bc inc c @@ -1884,26 +1882,26 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) jp nz,.loop ld bc,-8 add hl,bc - ld a,$ee ; down arrow + ld a,"▼" ld [hl],a ret .printCancelMenuItem ld de,ListMenuCancelText jp PlaceString -ListMenuCancelText:: ; 2f97 (0:2f97) +ListMenuCancelText:: db "CANCEL@" -GetMonName:: ; 2f9e (0:2f9e) +GetMonName:: push hl ld a,[H_LOADEDROMBANK] push af - ld a,BANK(MonsterNames) ; 07 + ld a,BANK(MonsterNames) ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a ld a,[wd11e] dec a - ld hl,MonsterNames ; 421E + ld hl,MonsterNames ld c,10 ld b,0 call AddNTimes @@ -1911,16 +1909,16 @@ GetMonName:: ; 2f9e (0:2f9e) push de ld bc,10 call CopyData - ld hl,wcd77 + ld hl,wcd6d + 10 ld [hl], "@" pop de pop af ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a pop hl ret -GetItemName:: ; 2fcf (0:2fcf) +GetItemName:: ; given an item ID at [wd11e], store the name of the item into a string ; starting at wcd6d push hl @@ -1945,7 +1943,7 @@ GetItemName:: ; 2fcf (0:2fcf) pop hl ret -GetMachineName:: ; 2ff3 (0:2ff3) +GetMachineName:: ; copies the name of the TM/HM in [wd11e] to wcd6d push hl push de @@ -1971,7 +1969,7 @@ GetMachineName:: ; 2ff3 (0:2ff3) ; now get the machine number and convert it to text ld a,[wd11e] sub TM_01 - 1 - ld b,$F6 ; "0" + ld b, "0" .FirstDigit sub 10 jr c,.SecondDigit @@ -1984,13 +1982,12 @@ GetMachineName:: ; 2ff3 (0:2ff3) ld [de],a inc de pop af - ld b,$F6 ; "0" + ld b, "0" add b ld [de],a inc de ld a,"@" ld [de],a - pop af ld [wd11e],a pop bc @@ -1998,17 +1995,17 @@ GetMachineName:: ; 2ff3 (0:2ff3) pop hl ret -TechnicalPrefix:: ; 303c (0:303c) +TechnicalPrefix:: db "TM" -HiddenPrefix:: ; 303e (0:303e) +HiddenPrefix:: db "HM" ; sets carry if item is HM, clears carry if item is not HM ; Input: a = item ID -IsItemHM:: ; 3040 (0:3040) - cp a,HM_01 +IsItemHM:: + cp HM_01 jr c,.notHM - cp a,TM_01 + cp TM_01 ret .notHM and a @@ -2016,16 +2013,16 @@ IsItemHM:: ; 3040 (0:3040) ; sets carry if move is an HM, clears carry if move is not an HM ; Input: a = move ID -IsMoveHM:: ; 3049 (0:3049) +IsMoveHM:: ld hl,HMMoves ld de,1 jp IsInArray -HMMoves:: ; 3052 (0:3052) +HMMoves:: db CUT,FLY,SURF,STRENGTH,FLASH db $ff ; terminator -GetMoveName:: ; 3058 (0:3058) +GetMoveName:: push hl ld a,MOVE_NAME ld [wNameListType],a @@ -2039,10 +2036,10 @@ GetMoveName:: ; 3058 (0:3058) ret ; reloads text box tile patterns, current map view, and tileset tile patterns -ReloadMapData:: ; 3071 (0:3071) +ReloadMapData:: ld a,[H_LOADEDROMBANK] push af - ld a,[W_CURMAP] + ld a,[wCurMap] call SwitchToMapRomBank call DisableLCD call LoadTextBoxTilePatterns @@ -2051,33 +2048,31 @@ ReloadMapData:: ; 3071 (0:3071) call EnableLCD pop af ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a ret ; reloads tileset tile patterns -ReloadTilesetTilePatterns:: ; 3090 (0:3090) +ReloadTilesetTilePatterns:: ld a,[H_LOADEDROMBANK] push af - ld a,[W_CURMAP] + ld a,[wCurMap] call SwitchToMapRomBank call DisableLCD call LoadTilesetTilePatternData 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 -ChooseFlyDestination:: ; 30a9 (0:30a9) +ChooseFlyDestination:: ld hl,wd72e res 4,[hl] - ld b, BANK(LoadTownMap_Fly) - ld hl, LoadTownMap_Fly - jp Bankswitch + jpba LoadTownMap_Fly ; causes the text box to close without waiting for a button press after displaying text -DisableWaitingAfterTextDisplay:: ; 30b6 (0:30b6) +DisableWaitingAfterTextDisplay:: ld a,$01 ld [wDoNotWaitForButtonPressAfterDisplayingText],a ret @@ -2087,44 +2082,42 @@ DisableWaitingAfterTextDisplay:: ; 30b6 (0:30b6) ; INPUT: ; [wcf91] = item ID ; OUTPUT: -; [wcd6a] = success +; [wActionResultOrTookBattleTurn] = success ; 00: unsucessful ; 01: successful ; 02: not able to be used right now, no extra menu displayed (only certain items use this) -UseItem:: ; 30bc (0:30bc) - ld b,BANK(UseItem_) - ld hl,UseItem_ - jp Bankswitch +UseItem:: + jpba UseItem_ ; confirms the item toss and then tosses the item ; INPUT: ; hl = address of inventory (either wNumBagItems or wNumBoxItems) ; [wcf91] = item ID ; [wWhichPokemon] = index of item within inventory -; [wcf96] = quantity to toss +; [wItemQuantity] = quantity to toss ; OUTPUT: ; clears carry flag if the item is tossed, sets carry flag if not -TossItem:: ; 30c4 (0:30c4) +TossItem:: ld a,[H_LOADEDROMBANK] 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 ; INPUT: ; [wcf91] = item ID ; OUTPUT: -; [wd124] = result +; [wIsKeyItem] = result ; 00: item is not key item ; 01: item is key item -IsKeyItem:: ; 30d9 (0:30d9) +IsKeyItem:: push hl push de push bc @@ -2137,22 +2130,23 @@ IsKeyItem:: ; 30d9 (0:30d9) ; function to draw various text boxes ; INPUT: ; [wTextBoxID] = text box ID -DisplayTextBoxID:: ; 30e8 (0:30e8) +; b, c = y, x cursor position (TWO_OPTION_MENU only) +DisplayTextBoxID:: ld a,[H_LOADEDROMBANK] 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 ; automatically stepping down from a door, or joypad states are being simulated -IsPlayerCharacterBeingControlledByGame:: ; 30fd (0:30fd) +IsPlayerCharacterBeingControlledByGame:: ld a, [wNPCMovementScriptPointerTableNum] and a ret nz @@ -2163,7 +2157,7 @@ IsPlayerCharacterBeingControlledByGame:: ; 30fd (0:30fd) and $80 ret -RunNPCMovementScript:: ; 310e (0:310e) +RunNPCMovementScript:: ld hl, wd736 bit 0, [hl] res 0, [hl] @@ -2184,82 +2178,79 @@ 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 + dw PalletMovementScriptPointerTable dw PewterMuseumGuyMovementScriptPointerTable dw PewterGymGuyMovementScriptPointerTable .playerStepOutFromDoor - ld b, BANK(PlayerStepOutFromDoor) - ld hl, PlayerStepOutFromDoor - jp Bankswitch + jpba PlayerStepOutFromDoor -EndNPCMovementScript:: ; 314e (0:314e) - ld b, BANK(_EndNPCMovementScript) - ld hl, _EndNPCMovementScript - jp Bankswitch +EndNPCMovementScript:: + jpba _EndNPCMovementScript -EmptyFunc2:: ; 3156 (0:3156) +EmptyFunc2:: ret -; stores hl in [W_TRAINERHEADERPTR] -StoreTrainerHeaderPointer:: ; 3157 (0:3157) +; stores hl in [wTrainerHeaderPtr] +StoreTrainerHeaderPointer:: ld a, h - ld [W_TRAINERHEADERPTR], a + ld [wTrainerHeaderPtr], a ld a, l - ld [W_TRAINERHEADERPTR+1], a + ld [wTrainerHeaderPtr+1], a ret ; executes the current map script from the function pointer array provided in hl. ; a: map script index to execute (unless overridden by [wd733] bit 4) -ExecuteCurMapScriptInTable:: ; 3160 (0:3160) +ExecuteCurMapScriptInTable:: push af push de call StoreTrainerHeaderPointer pop hl pop af push hl - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 bit 4, [hl] res 4, [hl] jr z, .useProvidedIndex ; test if map script index was overridden manually - ld a, [W_CURMAPSCRIPT] + ld a, [wCurMapScript] .useProvidedIndex pop hl - ld [W_CURMAPSCRIPT], a + ld [wCurMapScript], a call CallFunctionInTable - ld a, [W_CURMAPSCRIPT] + ld a, [wCurMapScript] ret -LoadGymLeaderAndCityName:: ; 317f (0:317f) +LoadGymLeaderAndCityName:: push de ld de, wGymCityName ld bc, $11 call CopyData ; load city name pop hl ld de, wGymLeaderName - ld bc, $b + ld bc, NAME_LENGTH jp CopyData ; load gym leader name -; reads specific information from trainer header (pointed to at W_TRAINERHEADERPTR) +; reads specific information from trainer header (pointed to at wTrainerHeaderPtr) ; a: offset in header data ; 0 -> flag's bit (into wTrainerHeaderFlagBit) ; 2 -> flag's byte ptr (into hl) ; 4 -> before battle text (into hl) ; 6 -> after battle text (into hl) ; 8 -> end battle text (into hl) -ReadTrainerHeaderInfo:: ; 3193 (0:3193) +ReadTrainerHeaderInfo:: push de push af ld d, $0 ld e, a - ld hl, W_TRAINERHEADERPTR + ld hl, wTrainerHeaderPtr ld a, [hli] ld l, [hl] ld h, a @@ -2296,7 +2287,7 @@ ReadTrainerHeaderInfo:: ; 3193 (0:3193) TrainerFlagAction:: predef_jump FlagActionPredef -TalkToTrainer:: ; 31cc (0:31cc) +TalkToTrainer:: call StoreTrainerHeaderPointer xor a call ReadTrainerHeaderInfo ; read flag's bit @@ -2304,7 +2295,7 @@ TalkToTrainer:: ; 31cc (0:31cc) call ReadTrainerHeaderInfo ; read flag's byte ptr ld a, [wTrainerHeaderFlagBit] ld c, a - ld b, $2 + ld b, FLAG_TEST call TrainerFlagAction ; read trainer's flag ld a, c and a @@ -2312,7 +2303,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 @@ -2323,19 +2314,19 @@ TalkToTrainer:: ; 31cc (0:31cc) call ReadTrainerHeaderInfo ; read end battle text pop de call SaveEndBattleTextPointers - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 set 4, [hl] ; activate map script index override (index is set below) ld hl, wFlags_0xcd60 bit 0, [hl] ; test if player is already engaging the trainer (because the trainer saw the player) ret nz ; if the player talked to the trainer of his own volition call EngageMapTrainer - ld hl, W_CURMAPSCRIPT + ld hl, wCurMapScript inc [hl] ; increment map script index before StartTrainerBattle increments it again (next script function is usually EndTrainerBattle) jp StartTrainerBattle ; checks if any trainers are seeing the player and wanting to fight -CheckFightingMapTrainers:: ; 3219 (0:3219) +CheckFightingMapTrainers:: call CheckForEngagingTrainers ld a, [wSpriteIndex] cp $ff @@ -2345,23 +2336,23 @@ CheckFightingMapTrainers:: ; 3219 (0:3219) ld [wTrainerHeaderFlagBit], a ret .trainerEngaging - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 set 3, [hl] - ld [wcd4f], a - xor a - ld [wcd50], a + ld [wEmotionBubbleSpriteIndex], a + xor a ; EXCLAMATION_BUBBLE + ld [wWhichEmotionBubble], a predef EmotionBubble ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN ld [wJoyIgnore], a xor a - ldh [$b4], a + ld [hJoyHeld], a call TrainerWalkUpToPlayer_Bank0 - ld hl, W_CURMAPSCRIPT + ld hl, wCurMapScript inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle) ret ; display the before battle text after the enemy trainer has walked up to the player's sprite -DisplayEnemyTrainerTextAndStartBattle:: ; 324c (0:324c) +DisplayEnemyTrainerTextAndStartBattle:: ld a, [wd730] and $1 ret nz ; return if the enemy trainer hasn't finished walking to the player's sprite @@ -2371,7 +2362,7 @@ DisplayEnemyTrainerTextAndStartBattle:: ; 324c (0:324c) call DisplayTextID ; fall through -StartTrainerBattle:: ; 325d (0:325d) +StartTrainerBattle:: xor a ld [wJoyIgnore], a call InitBattleEnemyParameters @@ -2380,37 +2371,37 @@ StartTrainerBattle:: ; 325d (0:325d) set 7, [hl] ld hl, wd72e set 1, [hl] - ld hl, W_CURMAPSCRIPT + ld hl, wCurMapScript inc [hl] ; increment map script index (next script function is usually EndTrainerBattle) ret -EndTrainerBattle:: ; 3275 (0:3275) - ld hl, wd126 +EndTrainerBattle:: + ld hl, wCurrentMapScriptFlags set 5, [hl] set 6, [hl] ld hl, wd72d res 7, [hl] ld hl, wFlags_0xcd60 res 0, [hl] ; player is no longer engaged by any trainer - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [wIsInBattle] cp $ff jp z, ResetButtonPressedAndMapScript ld a, $2 call ReadTrainerHeaderInfo ld a, [wTrainerHeaderFlagBit] ld c, a - ld b, $1 + ld b, FLAG_SET call TrainerFlagAction ; flag trainer as fought - ld a, [W_ENEMYMONORTRAINERCLASS] - cp $c8 + ld a, [wEnemyMonOrTrainerClass] + cp 200 jr nc, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite) - ld hl, W_MISSABLEOBJECTLIST + ld hl, wMissableObjectList ld de, $2 ld a, [wSpriteIndex] call IsInArray ; search for sprite ID inc hl ld a, [hl] - ld [wcc4d], a ; load corresponding missable object index and remove it + ld [wMissableObjectIndex], a ; load corresponding missable object index and remove it predef HideObject .skipRemoveSprite ld hl, wd730 @@ -2418,54 +2409,52 @@ EndTrainerBattle:: ; 3275 (0:3275) res 4, [hl] ret nz -ResetButtonPressedAndMapScript:: ; 32c1 (0:32c1) +ResetButtonPressedAndMapScript:: xor a ld [wJoyIgnore], a ld [hJoyHeld], a ld [hJoyPressed], a ld [hJoyReleased], a - ld [W_CURMAPSCRIPT], a ; reset battle status + ld [wCurMapScript], a ; reset battle status ret ; calls TrainerWalkUpToPlayer -TrainerWalkUpToPlayer_Bank0:: ; 32cf (0:32cf) - ld b, BANK(TrainerWalkUpToPlayer) - ld hl, TrainerWalkUpToPlayer - jp Bankswitch +TrainerWalkUpToPlayer_Bank0:: + jpba TrainerWalkUpToPlayer ; sets opponent type and mon set/lvl based on the engaging trainer data -InitBattleEnemyParameters:: ; 32d7 (0:32d7) +InitBattleEnemyParameters:: ld a, [wEngagedTrainerClass] - ld [W_CUROPPONENT], a ; wd059 - ld [W_ENEMYMONORTRAINERCLASS], a - cp $c8 - ld a, [wEngagedTrainerSet] ; wcd2e + ld [wCurOpponent], a + ld [wEnemyMonOrTrainerClass], a + cp 200 + ld a, [wEngagedTrainerSet] jr c, .noTrainer - ld [W_TRAINERNO], a ; wd05d + ld [wTrainerNo], a ret .noTrainer - ld [W_CURENEMYLVL], a ; W_CURENEMYLVL + ld [wCurEnemyLVL], a ret -GetSpritePosition1:: ; 32ef (0:32ef) +GetSpritePosition1:: ld hl, _GetSpritePosition1 - jr asm_3301 + jr SpritePositionBankswitch -GetSpritePosition2:: ; 32f4 (0:32f4) +GetSpritePosition2:: ld hl, _GetSpritePosition2 - jr asm_3301 ; 0x32f7 $8 + jr SpritePositionBankswitch -SetSpritePosition1:: ; 32f9 (0:32f9) +SetSpritePosition1:: ld hl, _SetSpritePosition1 - jr asm_3301 + jr SpritePositionBankswitch -SetSpritePosition2:: ; 32fe (0:32fe) +SetSpritePosition2:: ld hl, _SetSpritePosition2 -asm_3301:: ; 3301 (0:3301) +SpritePositionBankswitch:: ld b, BANK(_GetSpritePosition1) ; BANK(_GetSpritePosition2), BANK(_SetSpritePosition1), BANK(_SetSpritePosition2) jp Bankswitch ; indirect jump to one of the four functions -CheckForEngagingTrainers:: ; 3306 (0:3306) +CheckForEngagingTrainers:: xor a call ReadTrainerHeaderInfo ; read trainer flag's bit (unused) ld d, h ; store trainer header address in de @@ -2479,13 +2468,13 @@ CheckForEngagingTrainers:: ; 3306 (0:3306) ret z ld a, $2 call ReadTrainerHeaderInfo ; read trainer flag's byte ptr - ld b, $2 + ld b, FLAG_TEST ld a, [wTrainerHeaderFlagBit] ld c, a call TrainerFlagAction ; read trainer flag ld a, c - and a - jr nz, .trainerAlreadyFought + and a ; has the trainer already been defeated? + jr nz, .continue push hl push de push hl @@ -2497,14 +2486,14 @@ 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 +.continue ld hl, $c add hl, de ld d, h @@ -2513,7 +2502,7 @@ CheckForEngagingTrainers:: ; 3306 (0:3306) ; hl = text if the player wins ; de = text if the player loses -SaveEndBattleTextPointers:: ; 3354 (0:3354) +SaveEndBattleTextPointers:: ld a, [H_LOADEDROMBANK] ld [wEndBattleTextRomBank], a ld a, h @@ -2528,8 +2517,8 @@ SaveEndBattleTextPointers:: ; 3354 (0:3354) ; loads data of some trainer on the current map and plays pre-battle music ; [wSpriteIndex]: sprite ID of trainer who is engaged -EngageMapTrainer:: ; 336a (0:336a) - ld hl, W_MAPSPRITEEXTRADATA +EngageMapTrainer:: + ld hl, wMapSpriteExtraData ld d, $0 ld a, [wSpriteIndex] dec a @@ -2539,10 +2528,10 @@ 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) +PrintEndBattleText:: push hl ld hl, wd72d bit 7, [hl] @@ -2565,7 +2554,7 @@ PrintEndBattleText:: ; 3381 (0:3381) callba FreezeEnemyTrainerSprite jp WaitForSoundToFinish -GetSavedEndBattleTextPointer:: ; 33b7 (0:33b7) +GetSavedEndBattleTextPointer:: ld a, [wBattleResult] and a ; won battle @@ -2582,15 +2571,17 @@ GetSavedEndBattleTextPointer:: ; 33b7 (0:33b7) ld l, a ret -TrainerEndBattleText:: ; 33cf (0:33cf) +TrainerEndBattleText:: 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:: ld a, [wFlags_0xcd60] bit 0, a ret nz @@ -2598,24 +2589,24 @@ Func_33dd:: ; 33dd (0:33dd) xor a ret -PlayTrainerMusic:: ; 33e8 (0:33e8) +PlayTrainerMusic:: ld a, [wEngagedTrainerClass] - cp $c8 + SONY1 + cp OPP_SONY1 ret z - cp $c8 + SONY2 + cp OPP_SONY2 ret z - cp $c8 + SONY3 + cp OPP_SONY3 ret z - ld a, [W_GYMLEADERNO] ; W_GYMLEADERNO + ld a, [wGymLeaderNo] and a ret nz xor a - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a ld a, $ff - call PlaySound ; stop music + call PlaySound ld a, BANK(Music_MeetEvilTrainer) - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, [wEngagedTrainerClass] ld b, a ld hl, EvilTrainerList @@ -2640,7 +2631,7 @@ PlayTrainerMusic:: ; 33e8 (0:33e8) .maleTrainer ld a, MUSIC_MEET_MALE_TRAINER .PlaySound - ld [wc0ee], a + ld [wNewSoundID], a jp PlaySound INCLUDE "data/trainer_types.asm" @@ -2649,7 +2640,7 @@ INCLUDE "data/trainer_types.asm" ; and if so, decodes the RLE movement data ; b = player Y ; c = player X -DecodeArrowMovementRLE:: ; 3442 (0:3442) +DecodeArrowMovementRLE:: ld a, [hli] cp $ff ret z ; no match in the list @@ -2673,33 +2664,33 @@ DecodeArrowMovementRLE:: ; 3442 (0:3442) inc hl jr DecodeArrowMovementRLE -FuncTX_ItemStoragePC:: ; 3460 (0:3460) +FuncTX_ItemStoragePC:: call SaveScreenTilesToBuffer2 ld b, BANK(PlayerPC) ld hl, PlayerPC jr bankswitchAndContinue -FuncTX_BillsPC:: ; 346a (0:346a) +FuncTX_BillsPC:: call SaveScreenTilesToBuffer2 ld b, BANK(BillsPC_) ld hl, BillsPC_ jr bankswitchAndContinue -FuncTX_SlotMachine:: ; 3474 (0:3474) +FuncTX_GameCornerPrizeMenu:: ; XXX find a better name for this function ; special_F7 ld b,BANK(CeladonPrizeMenu) ld hl,CeladonPrizeMenu -bankswitchAndContinue:: ; 3479 (0:3479) +bankswitchAndContinue:: call Bankswitch jp HoldTextDisplayOpen ; continue to main text-engine function -FuncTX_PokemonCenterPC:: ; 347f (0:347f) +FuncTX_PokemonCenterPC:: ld b, BANK(ActivatePC) ld hl, ActivatePC jr bankswitchAndContinue -StartSimulatingJoypadStates:: ; 3486 (0:3486) +StartSimulatingJoypadStates:: xor a ld [wOverrideSimulatedJoypadStatesMask], a ld [wSpriteStateData2 + $06], a ; player's sprite movement byte 1 @@ -2707,36 +2698,34 @@ StartSimulatingJoypadStates:: ; 3486 (0:3486) set 7, [hl] ret -IsItemInBag:: ; 3493 (0:3493) +IsItemInBag:: ; given an item_id in b ; set zero flag if item isn't in player's bag ; else reset zero flag ; related to Pokémon Tower and ghosts - predef IsItemInBag_ + predef GetQuantityOfItemInBag ld a,b and a ret -DisplayPokedex:: ; 349b (0:349b) +DisplayPokedex:: ld [wd11e], a - ld b, BANK(Func_7c18) - ld hl, Func_7c18 - jp Bankswitch + jpba _DisplayPokedex -SetSpriteFacingDirectionAndDelay:: ; 34a6 (0:34a6) +SetSpriteFacingDirectionAndDelay:: call SetSpriteFacingDirection - ld c, $6 + ld c, 6 jp DelayFrames -SetSpriteFacingDirection:: ; 34ae (0:34ae) +SetSpriteFacingDirection:: ld a, $9 ld [H_SPRITEDATAOFFSET], a call GetPointerWithinSpriteStateData1 - ld a, [$ff8d] + ld a, [hSpriteFacingDirection] ld [hl], a ret -SetSpriteImageIndexAfterSettingFacingDirection:: ; 34b9 (0:34b9) +SetSpriteImageIndexAfterSettingFacingDirection:: ld de, -7 add hl, de ld [hl], a @@ -2746,24 +2735,24 @@ SetSpriteImageIndexAfterSettingFacingDirection:: ; 34b9 (0:34b9) ; INPUT: ; hl = address of array ; OUTPUT: -; [wWhichTrade] = if there is match, the matching array index +; [wCoordIndex] = if there is match, the matching array index ; sets carry if the coordinates are in the array, clears carry if not -ArePlayerCoordsInArray:: ; 34bf (0:34bf) - ld a,[W_YCOORD] +ArePlayerCoordsInArray:: + ld a,[wYCoord] ld b,a - ld a,[W_XCOORD] + ld a,[wXCoord] ld c,a ; fallthrough -CheckCoords:: ; 34c7 (0:34c7) +CheckCoords:: xor a - ld [wWhichTrade],a + ld [wCoordIndex],a .loop ld a,[hli] - cp a,$ff ; reached terminator? + cp $ff ; reached terminator? jr z,.notInArray push hl - ld hl,wWhichTrade + ld hl,wCoordIndex inc [hl] pop hl .compareYCoord @@ -2787,9 +2776,9 @@ CheckCoords:: ; 34c7 (0:34c7) ; hl = address of array ; [H_SPRITEINDEX] = index of boulder sprite ; OUTPUT: -; [wWhichTrade] = if there is match, the matching array index +; [wCoordIndex] = if there is match, the matching array index ; sets carry if the coordinates are in the array, clears carry if not -CheckBoulderCoords:: ; 34e4 (0:34e4) +CheckBoulderCoords:: push hl ld hl, wSpriteStateData2 + $04 ld a, [H_SPRITEINDEX] @@ -2806,11 +2795,11 @@ CheckBoulderCoords:: ; 34e4 (0:34e4) pop hl jp CheckCoords -GetPointerWithinSpriteStateData1:: ; 34fc (0:34fc) +GetPointerWithinSpriteStateData1:: ld h, $c1 jr _GetPointerWithinSpriteStateData -GetPointerWithinSpriteStateData2:: ; 3500 (0:3500) +GetPointerWithinSpriteStateData2:: ld h, $c2 _GetPointerWithinSpriteStateData: @@ -2827,14 +2816,14 @@ _GetPointerWithinSpriteStateData: ; the final $ff will be replicated in the output list and a contains the number of bytes written ; de: input list ; hl: output list -DecodeRLEList:: ; 350c (0:350c) +DecodeRLEList:: xor a ld [wRLEByteCount], a ; count written bytes here .listLoop ld a, [de] cp $ff jr z, .endOfList - ld [H_DOWNARROWBLINKCNT1], a ; store byte value to be written + ld [hRLEByteValue], a ; store byte value to be written inc de ld a, [de] ld b, $0 @@ -2842,7 +2831,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, [hRLEByteValue] call FillMemory ; write a c-times to output inc de jr .listLoop @@ -2853,19 +2842,19 @@ DecodeRLEList:: ; 350c (0:350c) inc a ; include sentinel in counting ret -; sets movement byte 1 for sprite [$FF8C] to $FE and byte 2 to [$FF8D] -SetSpriteMovementBytesToFE:: ; 3533 (0:3533) +; sets movement byte 1 for sprite [H_SPRITEINDEX] to $FE and byte 2 to [hSpriteMovementByte2] +SetSpriteMovementBytesToFE:: push hl call GetSpriteMovementByte1Pointer ld [hl], $fe call GetSpriteMovementByte2Pointer - ld a, [$ff8d] + ld a, [hSpriteMovementByte2] ld [hl], a pop hl ret -; sets both movement bytes for sprite [$FF8C] to $FF -SetSpriteMovementBytesToFF:: ; 3541 (0:3541) +; sets both movement bytes for sprite [H_SPRITEINDEX] to $FF +SetSpriteMovementBytesToFF:: push hl call GetSpriteMovementByte1Pointer ld [hl],$FF @@ -2874,20 +2863,20 @@ SetSpriteMovementBytesToFF:: ; 3541 (0:3541) pop hl ret -; returns the sprite movement byte 1 pointer for sprite [$FF8C] in hl -GetSpriteMovementByte1Pointer:: ; 354e (0:354e) +; returns the sprite movement byte 1 pointer for sprite [H_SPRITEINDEX] in hl +GetSpriteMovementByte1Pointer:: ld h,$C2 - ld a,[H_SPRITEINDEX] ; the sprite to move + ld a,[H_SPRITEINDEX] swap a - add a,6 + add 6 ld l,a ret -; returns the sprite movement byte 2 pointer for sprite [$FF8C] in hl -GetSpriteMovementByte2Pointer:: ; 3558 (0:3558) +; returns the sprite movement byte 2 pointer for sprite [H_SPRITEINDEX] in hl +GetSpriteMovementByte2Pointer:: push de - ld hl,W_MAPSPRITEDATA - ld a,[$FF8C] ; the sprite to move + ld hl,wMapSpriteData + ld a,[H_SPRITEINDEX] dec a add a ld d,0 @@ -2896,25 +2885,25 @@ GetSpriteMovementByte2Pointer:: ; 3558 (0:3558) pop de ret -GetTrainerInformation:: ; 3566 (0:3566) +GetTrainerInformation:: call GetTrainerName ld a, [wLinkState] and a jr nz, .linkBattle ld a, Bank(TrainerPicAndMoneyPointers) call BankswitchHome - ld a, [W_TRAINERCLASS] ; wd031 + ld a, [wTrainerClass] dec a ld hl, TrainerPicAndMoneyPointers ld bc, $5 call AddNTimes - ld de, wd033 + ld de, wTrainerPicPointer ld a, [hli] ld [de], a inc de ld a, [hli] ld [de], a - ld de, wd046 + ld de, wTrainerBaseMoney ld a, [hli] ld [de], a inc de @@ -2922,62 +2911,59 @@ GetTrainerInformation:: ; 3566 (0:3566) ld [de], a jp BankswitchBack .linkBattle - ld hl, wd033 + ld hl, wTrainerPicPointer ld de, RedPicFront ld [hl], e inc hl ld [hl], d ret -GetTrainerName:: ; 359e (0:359e) - ld b, BANK(GetTrainerName_) - ld hl, GetTrainerName_ - jp Bankswitch - +GetTrainerName:: + jpba GetTrainerName_ HasEnoughMoney:: ; Check if the player has at least as much -; money as the 3-byte BCD value at $ff9f. +; money as the 3-byte BCD value at hMoney. ld de, wPlayerMoney - ld hl, $ff9f + ld hl, hMoney ld c, 3 jp StringCmp HasEnoughCoins:: ; Check if the player has at least as many -; coins as the 2-byte BCD value at $ffa0. +; coins as the 2-byte BCD value at hCoins. ld de, wPlayerCoins - ld hl, $ffa0 + ld hl, hCoins ld c, 2 jp StringCmp -BankswitchHome:: ; 35bc (0:35bc) +BankswitchHome:: ; switches to bank # in a ; Only use this when in the home bank! - ld [wcf09],a + ld [wBankswitchHomeTemp],a ld a,[H_LOADEDROMBANK] - ld [wcf08],a - ld a,[wcf09] + ld [wBankswitchHomeSavedROMBank],a + ld a,[wBankswitchHomeTemp] ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a ret -BankswitchBack:: ; 35cd (0:35cd) +BankswitchBack:: ; returns from BankswitchHome - ld a,[wcf08] + ld a,[wBankswitchHomeSavedROMBank] ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a ret -Bankswitch:: ; 35d6 (0:35d6) +Bankswitch:: ; self-contained bankswitch, use this when not in the home bank ; switches to the bank in b ld a,[H_LOADEDROMBANK] push af ld a,b ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a ld bc,.Return push bc jp [hl] @@ -2985,51 +2971,52 @@ Bankswitch:: ; 35d6 (0:35d6) pop bc ld a,b ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a ret ; displays yes/no choice ; yes -> set carry -YesNoChoice:: ; 35ec (0:35ec) +YesNoChoice:: call SaveScreenTilesToBuffer1 call InitYesNoTextBoxParameters jr DisplayYesNoChoice -Func_35f4:: ; 35f4 (0:35f4) +Func_35f4:: ld a, TWO_OPTION_MENU ld [wTextBoxID], a call InitYesNoTextBoxParameters jp DisplayTextBoxID -InitYesNoTextBoxParameters:: ; 35ff (0:35ff) +InitYesNoTextBoxParameters:: xor a ; YES_NO_MENU ld [wTwoOptionMenuID], a - hlCoord 14, 7 + coord hl, 14, 7 ld bc, $80f ret -YesNoChoicePokeCenter:: ; 360a (0:360a) +YesNoChoicePokeCenter:: call SaveScreenTilesToBuffer1 ld a, HEAL_CANCEL_MENU ld [wTwoOptionMenuID], a - hlCoord 11, 6 - ld bc, $80c + coord hl, 11, 6 + lb bc, 8, 12 jr DisplayYesNoChoice -Func_361a:: ; 361a (0:361a) +WideYesNoChoice:: ; unused call SaveScreenTilesToBuffer1 ld a, WIDE_YES_NO_MENU ld [wTwoOptionMenuID], a - hlCoord 12, 7 - ld bc, $080d -DisplayYesNoChoice:: ; 3628 (0:3628) + coord hl, 12, 7 + lb bc, 8, 13 + +DisplayYesNoChoice:: ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID jp LoadScreenTilesFromBuffer1 ; calculates the difference |a-b|, setting carry flag if a<b -CalcDifference:: ; 3633 (0:3633) +CalcDifference:: sub b ret nc cpl @@ -3037,17 +3024,17 @@ CalcDifference:: ; 3633 (0:3633) scf ret -MoveSprite:: ; 363a (0:363a) -; move the sprite [$FF8C] with the movement pointed to by de -; actually only copies the movement data to wcc5b for later +MoveSprite:: +; move the sprite [H_SPRITEINDEX] with the movement pointed to by de +; actually only copies the movement data to wNPCMovementDirections for later call SetSpriteMovementBytesToFF -MoveSprite_:: ; 363d (0:363d) +MoveSprite_:: push hl push bc call GetSpriteMovementByte1Pointer xor a ld [hl],a - ld hl,wcc5b + ld hl,wNPCMovementDirections ld c,0 .loop @@ -3055,11 +3042,11 @@ MoveSprite_:: ; 363d (0:363d) ld [hli],a inc de inc c - cp a,$FF ; have we reached the end of the movement data? + cp $FF ; have we reached the end of the movement data? jr nz,.loop ld a,c - ld [wcf0f],a ; number of steps taken + ld [wNPCNumScriptedSteps],a ; number of steps taken pop bc ld hl,wd730 @@ -3073,10 +3060,10 @@ MoveSprite_:: ; 363d (0:363d) ld [wWastedByteCD3A],a ret -; divides [$ffe5] by [$ffe6] and stores the quotient in [$ffe7] -DivideBytes:: ; 366b (0:366b) +; divides [hDividend2] by [hDivisor2] and stores the quotient in [hQuotient2] +DivideBytes:: push hl - ld hl, $ffe7 + ld hl, hQuotient2 xor a ld [hld], a ld a, [hld] @@ -3102,13 +3089,13 @@ LoadFontTilePatterns:: .off ld hl, FontGraphics ld de, vFont - ld bc, $400 + ld bc, FontGraphicsEnd - FontGraphics ld a, BANK(FontGraphics) jp FarCopyDataDouble ; if LCD is off, transfer all at once .on ld de, FontGraphics ld hl, vFont - ld bc, BANK(FontGraphics) << 8 | $80 + lb bc, BANK(FontGraphics), (FontGraphicsEnd - FontGraphics) / $8 jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank LoadTextBoxTilePatterns:: @@ -3118,13 +3105,13 @@ LoadTextBoxTilePatterns:: .off ld hl, TextBoxGraphics ld de, vChars2 + $600 - ld bc, $200 + ld bc, TextBoxGraphicsEnd - TextBoxGraphics ld a, BANK(TextBoxGraphics) jp FarCopyData2 ; if LCD is off, transfer all at once .on ld de, TextBoxGraphics ld hl, vChars2 + $600 - ld bc, BANK(TextBoxGraphics) << 8 | $20 + lb bc, BANK(TextBoxGraphics), (TextBoxGraphicsEnd - TextBoxGraphics) / $10 jp CopyVideoData ; if LCD is on, transfer during V-blank LoadHpBarAndStatusTilePatterns:: @@ -3134,13 +3121,13 @@ LoadHpBarAndStatusTilePatterns:: .off ld hl, HpBarAndStatusGraphics ld de, vChars2 + $620 - ld bc, $1e0 + ld bc, HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics ld a, BANK(HpBarAndStatusGraphics) jp FarCopyData2 ; if LCD is off, transfer all at once .on ld de, HpBarAndStatusGraphics ld hl, vChars2 + $620 - ld bc, BANK(HpBarAndStatusGraphics) << 8 | $1e + lb bc, BANK(HpBarAndStatusGraphics), (HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics) / $10 jp CopyVideoData ; if LCD is on, transfer during V-blank @@ -3159,76 +3146,75 @@ FillMemory:: ret -UncompressSpriteFromDE:: ; 36eb (0:36eb) +UncompressSpriteFromDE:: ; Decompress pic at a:de. - ld hl, W_SPRITEINPUTPTR + ld hl, wSpriteInputPtr ld [hl], e inc hl ld [hl], d jp UncompressSpriteData - -SaveScreenTilesToBuffer2:: ; 36f4 (0:36f4) - ld hl, wTileMap +SaveScreenTilesToBuffer2:: + coord hl, 0, 0 ld de, wTileMapBackup2 - ld bc, $168 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call CopyData ret -LoadScreenTilesFromBuffer2:: ; 3701 (0:3701) +LoadScreenTilesFromBuffer2:: call LoadScreenTilesFromBuffer2DisableBGTransfer - ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a ret ; loads screen tiles stored in wTileMapBackup2 but leaves H_AUTOBGTRANSFERENABLED disabled -LoadScreenTilesFromBuffer2DisableBGTransfer:: ; 3709 (0:3709) +LoadScreenTilesFromBuffer2DisableBGTransfer:: xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld hl, wTileMapBackup2 - ld de, wTileMap - ld bc, $168 + coord de, 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call CopyData ret -SaveScreenTilesToBuffer1:: ; 3719 (0:3719) - ld hl, wTileMap +SaveScreenTilesToBuffer1:: + coord hl, 0, 0 ld de, wTileMapBackup - ld bc, $168 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT jp CopyData -LoadScreenTilesFromBuffer1:: ; 3725 (0:3725) +LoadScreenTilesFromBuffer1:: xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ld hl, wTileMapBackup - ld de, wTileMap - ld bc, $168 + coord de, 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call CopyData - ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a ret -DelayFrames:: ; 3739 (0:3739) -; wait n frames, where n is the value in c +DelayFrames:: +; wait c frames call DelayFrame dec c jr nz,DelayFrames ret -PlaySoundWaitForCurrent:: ; 3740 (0:3740) +PlaySoundWaitForCurrent:: push af call WaitForSoundToFinish pop af jp PlaySound ; Wait for sound to finish playing -WaitForSoundToFinish:: ; 3748 (0:3748) +WaitForSoundToFinish:: ld a, [wLowHealthAlarm] and $80 ret nz push hl -.asm_374f - ld hl, wc02a +.waitLoop + ld hl, wChannelSoundIDs + Ch4 xor a or [hl] inc hl @@ -3236,11 +3222,11 @@ WaitForSoundToFinish:: ; 3748 (0:3748) inc hl inc hl or [hl] - jr nz, .asm_374f + jr nz, .waitLoop pop hl ret -NamePointers:: ; 375d (0:375d) +NamePointers:: dw MonsterNames dw MoveNames dw UnusedNames @@ -3249,7 +3235,7 @@ NamePointers:: ; 375d (0:375d) dw wEnemyMonOT ; enemy's OT names list dw TrainerNames -GetName:: ; 376b (0:376b) +GetName:: ; arguments: ; [wd0b5] = which name ; [wNameListType] = which list @@ -3274,16 +3260,16 @@ GetName:: ; 376b (0:376b) jr nz,.otherEntries ;1 = MON_NAMES call GetMonName - ld hl,11 + ld hl,NAME_LENGTH add hl,de 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 +3277,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] @@ -3310,7 +3296,7 @@ GetName:: ; 376b (0:376b) ld e,l .nextChar ld a,[hli] - cp a, "@" + cp "@" jr nz,.nextChar inc c ;entry counter ld a,b ;wanted entry @@ -3321,20 +3307,20 @@ GetName:: ; 376b (0:376b) ld de,wcd6d ld bc,$0014 call CopyData -.gotPtr ; $37cd +.gotPtr ld a,e - ld [wcf8d],a + ld [wUnusedCF8D],a ld a,d - ld [wcf8e],a + ld [wUnusedCF8D + 1],a pop de pop bc pop hl pop af ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a ret -GetItemPrice:: ; 37df (0:37df) +GetItemPrice:: ; Stores item's price as BCD at hItemPrice (3 bytes) ; Input: [wcf91] = item id ld a, [H_LOADEDROMBANK] @@ -3342,11 +3328,11 @@ GetItemPrice:: ; 37df (0:37df) ld a, [wListMenuID] cp MOVESLISTMENU ld a, BANK(ItemPrices) - jr nz, .asm_37ed + jr nz, .ok ld a, $f ; hardcoded Bank -.asm_37ed +.ok ld [H_LOADEDROMBANK], a - ld [$2000], a + ld [MBC1RomBank], a ld hl, wItemPrices ld a, [hli] ld h, [hl] @@ -3355,10 +3341,10 @@ GetItemPrice:: ; 37df (0:37df) cp HM_01 jr nc, .getTMPrice ld bc, $3 -.asm_3802 +.loop add hl, bc dec a - jr nz, .asm_3802 + jr nz, .loop dec hl ld a, [hld] ld [hItemPrice + 2], a @@ -3366,26 +3352,26 @@ GetItemPrice:: ; 37df (0:37df) ld [hItemPrice + 1], a ld a, [hl] ld [hItemPrice], a - jr .asm_381c + jr .done .getTMPrice ld a, Bank(GetMachinePrice) ld [H_LOADEDROMBANK], a - ld [$2000], a + ld [MBC1RomBank], a call GetMachinePrice -.asm_381c +.done ld de, hItemPrice pop af ld [H_LOADEDROMBANK], a - ld [$2000], a + ld [MBC1RomBank], a ret ; copies a string from [de] to [wcf4b] -CopyStringToCF4B:: ; 3826 (0:3826) +CopyStringToCF4B:: ld hl, wcf4b ; fall through ; copies a string from [de] to [hl] -CopyString:: ; 3829 (0:3829) +CopyString:: ld a, [de] inc de ld [hli], a @@ -3408,7 +3394,7 @@ CopyString:: ; 3829 (0:3829) ; report only one button press. ; 3. Same as 2, but report no buttons as pressed if A or B is held down. ; ([hJoy7] == 1, [hJoy6] == 0) -JoypadLowSensitivity:: ; 3831 (0:3831) +JoypadLowSensitivity:: call Joypad ld a,[hJoy7] ; flag and a ; get all currently pressed buttons or only newly pressed buttons? @@ -3447,7 +3433,7 @@ JoypadLowSensitivity:: ; 3831 (0:3831) ld [H_FRAMECOUNTER],a ret -WaitForTextScrollButtonPress:: ; 3865 (0:3865) +WaitForTextScrollButtonPress:: ld a, [H_DOWNARROWBLINKCNT1] push af ld a, [H_DOWNARROWBLINKCNT2] @@ -3463,7 +3449,7 @@ WaitForTextScrollButtonPress:: ; 3865 (0:3865) jr z, .skipAnimation call TownMapSpriteBlinkingAnimation .skipAnimation - hlCoord 18, 16 + coord hl, 18, 16 call HandleDownArrowBlinkTiming pop hl call JoypadLowSensitivity @@ -3478,15 +3464,15 @@ WaitForTextScrollButtonPress:: ; 3865 (0:3865) ret ; (unless in link battle) waits for A or B being pressed and outputs the scrolling sound effect -ManualTextScroll:: ; 3898 (0:3898) +ManualTextScroll:: ld a, [wLinkState] cp LINK_STATE_BATTLING jr z, .inLinkBattle call WaitForTextScrollButtonPress - ld a, (SFX_02_40 - SFX_Headers_02) / 3 + ld a, SFX_PRESS_AB jp PlaySound .inLinkBattle - ld c, $41 + ld c, 65 jp DelayFrames ; function to do multiplication @@ -3496,7 +3482,7 @@ ManualTextScroll:: ; 3898 (0:3898) ; FF99 = multiplier ; OUTPUT ; FF95-FF98 = product -Multiply:: ; 38ac (0:38ac) +Multiply:: push hl push bc callab _Multiply @@ -3513,7 +3499,7 @@ Multiply:: ; 38ac (0:38ac) ; OUTPUT ; FF95-FF98 = quotient ; FF99 = remainder -Divide:: ; 38b9 (0:38b9) +Divide:: push hl push de push bc @@ -3521,11 +3507,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 @@ -3533,21 +3519,21 @@ Divide:: ; 38b9 (0:38b9) ; This function is used to wait a short period after printing a letter to the ; screen unless the player presses the A/B button or the delay is turned off -; through the [wd730] or [wd358] flags. -PrintLetterDelay:: ; 38d3 (0:38d3) +; through the [wd730] or [wLetterPrintingDelayFlags] flags. +PrintLetterDelay:: ld a,[wd730] bit 6,a ret nz - ld a,[wd358] + ld a,[wLetterPrintingDelayFlags] bit 1,a ret z push hl push de push bc - ld a,[wd358] + ld a,[wLetterPrintingDelayFlags] bit 0,a jr z,.waitOneFrame - ld a,[W_OPTIONS] + ld a,[wOptions] and $f ld [H_FRAMECOUNTER],a jr .checkButtons @@ -3580,7 +3566,7 @@ PrintLetterDelay:: ; 38d3 (0:38d3) ; Copies [hl, bc) to [de, bc - hl). ; In other words, the source data is from hl up to but not including bc, ; and the destination is de. -CopyDataUntil:: ; 3913 (0:3913) +CopyDataUntil:: ld a,[hli] ld [de],a inc de @@ -3594,14 +3580,12 @@ CopyDataUntil:: ; 3913 (0:3913) ; Function to remove a pokemon from the party or the current box. ; wWhichPokemon determines the pokemon. -; [wcf95] == 0 specifies the party. -; [wcf95] != 0 specifies the current box. -RemovePokemon:: ; 391f (0:391f) - ld hl, _RemovePokemon - ld b, BANK(_RemovePokemon) - jp Bankswitch +; [wRemoveMonFromBox] == 0 specifies the party. +; [wRemoveMonFromBox] != 0 specifies the current box. +RemovePokemon:: + jpab _RemovePokemon -AddPartyMon:: ; 3927 (0:3927) +AddPartyMon:: push hl push de push bc @@ -3612,7 +3596,7 @@ AddPartyMon:: ; 3927 (0:3927) ret ; calculates all 5 stats of current mon and writes them to [de] -CalcStats:: ; 3936 (0:3936) +CalcStats:: ld c, $0 .statsLoop inc c @@ -3624,7 +3608,7 @@ CalcStats:: ; 3936 (0:3936) ld [de], a inc de ld a, c - cp $5 + cp NUM_STATS jr nz, .statsLoop ret @@ -3632,14 +3616,14 @@ CalcStats:: ; 3936 (0:3936) ; c: stat to calc (HP=1,Atk=2,Def=3,Spd=4,Spc=5) ; b: consider stat exp? ; hl: base ptr to stat exp values ([hl + 2*c - 1] and [hl + 2*c]) -CalcStat:: ; 394a (0:394a) +CalcStat:: push hl push de push bc ld a, b ld d, a push hl - ld hl, W_MONHEADER + ld hl, wMonHeader ld b, $0 add hl, bc ld a, [hl] ; read base value of stat @@ -3675,7 +3659,7 @@ CalcStat:: ; 394a (0:394a) srl c pop hl push bc - ld bc, $b ; skip to stat IV values + ld bc, wPartyMon1DVs - (wPartyMon1HPExp - 1) ; also wEnemyMonDVs - wEnemyMonHP add hl, bc pop bc ld a, c @@ -3753,7 +3737,7 @@ CalcStat:: ; 394a (0:394a) ld [H_MULTIPLICAND+1], a xor a ld [H_MULTIPLICAND], a - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL + ld a, [wCurEnemyLVL] ld [H_MULTIPLIER], a call Multiply ; ((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level ld a, [H_MULTIPLICAND] @@ -3769,9 +3753,9 @@ CalcStat:: ; 394a (0:394a) call Divide ; (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 ld a, c cp $1 - ld a, $5 + ld a, 5 ; + 5 for non-HP stat jr nz, .notHPStat - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL + ld a, [wCurEnemyLVL] ld b, a ld a, [H_MULTIPLICAND+2] add b @@ -3781,7 +3765,7 @@ CalcStat:: ; 394a (0:394a) inc a ld [H_MULTIPLICAND+1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level .noCarry3 - ld a, $a + ld a, 10 ; +10 for HP stat .notHPStat ld b, a ld a, [H_MULTIPLICAND+2] @@ -3793,17 +3777,17 @@ CalcStat:: ; 394a (0:394a) ld [H_MULTIPLICAND+1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level + 10 .noCarry4 ld a, [H_MULTIPLICAND+1] ; check for overflow (>999) - cp $4 + cp 999 / $100 + 1 jr nc, .overflow - cp $3 + cp 999 / $100 jr c, .noOverflow ld a, [H_MULTIPLICAND+2] - cp $e8 + cp 999 % $100 + 1 jr c, .noOverflow .overflow - ld a, $3 ; overflow: cap at 999 + ld a, 999 / $100 ; overflow: cap at 999 ld [H_MULTIPLICAND+1], a - ld a, $e7 + ld a, 999 % $100 ld [H_MULTIPLICAND+2], a .noOverflow pop bc @@ -3811,45 +3795,45 @@ CalcStat:: ; 394a (0:394a) pop hl ret -AddEnemyMonToPlayerParty:: ; 3a53 (0:3a53) +AddEnemyMonToPlayerParty:: ld a, [H_LOADEDROMBANK] 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) +MoveMon:: 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, ...) -; hl: base pointer, will be incremented by $b * a -SkipFixedLengthTextEntries:: ; 3a7d (0:3a7d) +; skips a text entries, each of size NAME_LENGTH (like trainer name, OT name, rival name, ...) +; hl: base pointer, will be incremented by NAME_LENGTH * a +SkipFixedLengthTextEntries:: and a ret z - ld bc, $b + ld bc, NAME_LENGTH .skipLoop add hl, bc dec a jr nz, .skipLoop ret -AddNTimes:: ; 3a87 (0:3a87) +AddNTimes:: ; add bc to hl a times and a ret z @@ -3861,7 +3845,7 @@ AddNTimes:: ; 3a87 (0:3a87) ; Compare strings, c bytes in length, at de and hl. ; Often used to compare big endian numbers in battle calculations. -StringCmp:: ; 3a8e (0:3a8e) +StringCmp:: ld a,[de] cp [hl] ret nz @@ -3876,7 +3860,7 @@ StringCmp:: ; 3a8e (0:3a8e) ; b = Y coordinate of upper left corner of sprite ; c = X coordinate of upper left corner of sprite ; de = base address of 4 tile number and attribute pairs -WriteOAMBlock:: ; 3a97 (0:3a97) +WriteOAMBlock:: ld h,wOAMBuffer / $100 swap a ; multiply by 16 ld l,a @@ -3908,27 +3892,27 @@ WriteOAMBlock:: ; 3a97 (0:3a97) ld [hli],a ret -HandleMenuInput:: ; 3abe (0:3abe) +HandleMenuInput:: xor a - ld [wd09b],a + ld [wPartyMenuAnimMonEnabled],a -HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) +HandleMenuInput_:: ld a,[H_DOWNARROWBLINKCNT1] push af ld a,[H_DOWNARROWBLINKCNT2] push af ; save existing values on stack xor a ld [H_DOWNARROWBLINKCNT1],a ; blinking down arrow timing value 1 - ld a,$06 + ld a,6 ld [H_DOWNARROWBLINKCNT2],a ; blinking down arrow timing value 2 .loop1 xor a - ld [wPartyMonAnimCounter],a ; counter for pokemon shaking animation + ld [wAnimCounter],a ; counter for pokemon shaking animation call PlaceMenuCursor call Delay3 .loop2 push hl - ld a,[wd09b] + ld a,[wPartyMenuAnimMonEnabled] and a ; is it a pokemon selection menu? jr z,.getJoypadState callba AnimatePartyMon ; shake mini sprite of selected pokemon @@ -3939,7 +3923,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) and a ; was a key pressed? jr nz,.keyPressed push hl - hlCoord 18, 11 ; coordinates of blinking down arrow in some menus + coord hl, 18, 11 ; coordinates of blinking down arrow in some menus call HandleDownArrowBlinkTiming ; blink down arrow (if any) pop hl ld a,[wMenuJoypadPollCount] @@ -3957,7 +3941,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) ret .keyPressed xor a - ld [wcc4b],a + ld [wCheckFor180DegreeTurn],a ld a,[hJoy5] ld b,a bit 6,a ; pressed Up key? @@ -4009,8 +3993,8 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) bit 5,[hl] pop hl jr nz,.skipPlayingSound - ld a,(SFX_02_40 - SFX_Headers_02) / 3 - call PlaySound ; play sound + ld a,SFX_PRESS_AB + call PlaySound .skipPlayingSound pop af ld [H_DOWNARROWBLINKCNT2],a @@ -4021,16 +4005,16 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) ld a,[hJoy5] ret .noWrappingAround - ld a,[wcc37] + ld a,[wMenuWatchMovingOutOfBounds] and a ; should we return if the user tried to go past the top or bottom? jr z,.checkOtherKeys jr .checkIfAButtonOrBButtonPressed -PlaceMenuCursor:: ; 3b7c (0:3b7c) +PlaceMenuCursor:: ld a,[wTopMenuItemY] and a ; is the y coordinate 0? jr z,.adjustForXCoord - ld hl,wTileMap + coord hl, 0, 0 ld bc,SCREEN_WIDTH .topMenuItemLoop add hl,bc @@ -4087,7 +4071,7 @@ PlaceMenuCursor:: ; 3b7c (0:3b7c) jr nz,.currentMenuItemLoop .checkForArrow2 ld a,[hl] - cp a,"▶" ; has the right arrow already been placed? + cp "▶" ; has the right arrow already been placed? jr z,.skipSavingTile ; if so, don't lose the saved tile ld [wTileBehindCursor],a ; save tile before overwriting with right arrow .skipSavingTile @@ -4105,7 +4089,7 @@ PlaceMenuCursor:: ; 3b7c (0:3b7c) ; manipulated. In the case of submenus, this is used to show the location of ; the menu cursor in the parent menu. In the case of swapping items in list, ; this is used to mark the item that was first chosen to be swapped. -PlaceUnfilledArrowMenuCursor:: ; 3bec (0:3bec) +PlaceUnfilledArrowMenuCursor:: ld b,a ld a,[wMenuCursorLocation] ld l,a @@ -4116,7 +4100,7 @@ PlaceUnfilledArrowMenuCursor:: ; 3bec (0:3bec) ret ; Replaces the menu cursor with a blank space. -EraseMenuCursor:: ; 3bf9 (0:3bf9) +EraseMenuCursor:: ld a,[wMenuCursorLocation] ld l,a ld a,[wMenuCursorLocation + 1] @@ -4129,13 +4113,13 @@ EraseMenuCursor:: ; 3bf9 (0:3bf9) ; The reason is that most functions that call this initialize H_DOWNARROWBLINKCNT1 to 0. ; The effect is that if the tile at hl is initialized with a down arrow, ; this function will toggle that down arrow on and off, but if the tile isn't -; initliazed with a down arrow, this function does nothing. +; initialized with a down arrow, this function does nothing. ; That allows this to be called without worrying about if a down arrow should ; be blinking. -HandleDownArrowBlinkTiming:: ; 3c04 (0:3c04) +HandleDownArrowBlinkTiming:: ld a,[hl] ld b,a - ld a,$ee ; down arrow + ld a,"▼" cp b jr nz,.downArrowOff .downArrowOn @@ -4169,28 +4153,28 @@ HandleDownArrowBlinkTiming:: ; 3c04 (0:3c04) ret nz ld a,$06 ld [H_DOWNARROWBLINKCNT2],a - ld a,$ee ; down arrow + ld a,"▼" ld [hl],a ret ; The following code either enables or disables the automatic drawing of ; text boxes by DisplayTextID. Both functions cause DisplayTextID to wait -; for a button press after displaying text (unless [wcc47] is set). +; for a button press after displaying text (unless [wEnteringCableClub] is set). -EnableAutoTextBoxDrawing:: ; 3c3c (0:3c3c) +EnableAutoTextBoxDrawing:: xor a jr AutoTextBoxDrawingCommon -DisableAutoTextBoxDrawing:: ; 3c3f (0:3c3f) +DisableAutoTextBoxDrawing:: ld a,$01 -AutoTextBoxDrawingCommon:: ; 3c41 (0:3c41) +AutoTextBoxDrawingCommon:: ld [wAutoTextBoxDrawingControl],a xor a ld [wDoNotWaitForButtonPressAfterDisplayingText],a ; make DisplayTextID wait for button press ret -PrintText:: ; 3c49 (0:3c49) +PrintText:: ; Print text hl at (1, 14). push hl ld a,MESSAGE_BOX @@ -4199,20 +4183,17 @@ PrintText:: ; 3c49 (0:3c49) call UpdateSprites call Delay3 pop hl -Func_3c59:: ; 3c59 (0:3c59) - bcCoord 1, 14 +PrintText_NoCreatingTextBox:: + coord bc, 1, 14 jp TextCommandProcessor -PrintNumber:: ; 3c5f +PrintNumber:: ; Print the c-digit, b-byte value at de. ; Allows 2 to 7 digits. For 1-digit numbers, add ; the value to char "0" instead of calling PrintNumber. ; Flags LEADING_ZEROES and LEFT_ALIGN can be given ; in bits 7 and 6 of b respectively. -LEADING_ZEROES EQU 7 -LEFT_ALIGN EQU 6 - push bc xor a ld [H_PASTLEADINGZEROES], a @@ -4405,7 +4386,7 @@ endm ret .PrintLeadingZero: - bit LEADING_ZEROES, d + bit BIT_LEADING_ZEROES, d ret z ld [hl], "0" ret @@ -4414,9 +4395,9 @@ endm ; Increment unless the number is left-aligned, ; leading zeroes are not printed, and no digits ; have been printed yet. - bit LEADING_ZEROES, d + bit BIT_LEADING_ZEROES, d jr nz, .inc - bit LEFT_ALIGN, d + bit BIT_LEFT_ALIGN, d jr z, .inc ld a, [H_PASTLEADINGZEROES] and a @@ -4427,7 +4408,6 @@ endm CallFunctionInTable:: -JumpTable:: ; Call function a in jumptable hl. ; de is not preserved. push hl @@ -4477,14 +4457,14 @@ IsInRestOfArray:: ret -RestoreScreenTilesAndReloadTilePatterns:: ; 3dbe (0:3dbe) +RestoreScreenTilesAndReloadTilePatterns:: call ClearSprites ld a, $1 ld [wUpdateSpritesEnabled], a call ReloadMapSpriteTilePatterns call LoadScreenTilesFromBuffer2 call LoadTextBoxTilePatterns - call GoPAL_SET_CF1C + call RunDefaultPaletteCommand jr Delay3 @@ -4514,13 +4494,13 @@ GBPalWhiteOut:: ret -GoPAL_SET_CF1C:: ; 3ded (0:3ded) +RunDefaultPaletteCommand:: ld b,$ff -GoPAL_SET:: ; 3def (0:3def) +RunPaletteCommand:: ld a,[wOnSGB] and a ret z - predef_jump Func_71ddf + predef_jump _RunPaletteCommand GetHealthBarColor:: ; Return at hl the palette of @@ -4539,14 +4519,14 @@ GetHealthBarColor:: ; Copy the current map's sprites' tile patterns to VRAM again after they have ; been overwritten by other tile patterns. -ReloadMapSpriteTilePatterns:: ; 3e08 (0:3e08) +ReloadMapSpriteTilePatterns:: ld hl, wFontLoaded ld a, [hl] push af res 0, [hl] push hl xor a - ld [W_SPRITESETID], a + ld [wSpriteSetID], a call DisableLCD callba InitMapSprites call EnableLCD @@ -4566,7 +4546,7 @@ GiveItem:: ld [wd11e], a ld [wcf91], a ld a, c - ld [wcf96], a + ld [wItemQuantity], a ld hl,wNumBagItems call AddItemToInventory ret nc @@ -4580,12 +4560,10 @@ GivePokemon:: ld a, b ld [wcf91], a ld a, c - ld [W_CURENEMYLVL], a - xor a - ld [wcc49], a - ld b, BANK(_GivePokemon) - ld hl, _GivePokemon - jp Bankswitch + ld [wCurEnemyLVL], a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation], a + jpba _GivePokemon Random:: @@ -4605,12 +4583,10 @@ Random:: INCLUDE "home/predef.asm" -Func_3ead:: ; 3ead (0:3ead) - ld b, BANK(CinnabarGymQuiz_1eb0a) - ld hl, CinnabarGymQuiz_1eb0a - jp Bankswitch +UpdateCinnabarGymGateTileBlocks:: + jpba UpdateCinnabarGymGateTileBlocks_ -CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ; 3eb5 (0:3eb5) +CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ld a, [H_LOADEDROMBANK] push af ld a, [hJoyHeld] @@ -4647,37 +4623,39 @@ CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ; 3eb5 (0:3eb5) ld [H_LOADEDROMBANK], a ret -PrintPredefTextID:: ; 3ef5 (0:3ef5) - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c +PrintPredefTextID:: + ld [hSpriteIndexOrTextID], a ld hl, TextPredefs call SetMapTextPointer - ld hl, wcf11 + ld hl, wTextPredefFlag set 0, [hl] call DisplayTextID -RestoreMapTextPointer:: ; 3f05 (0:3f05) - ld hl, W_MAPTEXTPTR +RestoreMapTextPointer:: + ld hl, wMapTextPtr ld a, [$ffec] ld [hli], a ld a, [$ffec + 1] ld [hl], a ret -SetMapTextPointer:: ; 3f0f (0:3f0f) - ld a, [W_MAPTEXTPTR] +SetMapTextPointer:: + ld a, [wMapTextPtr] ld [$ffec], a - ld a, [W_MAPTEXTPTR + 1] + ld a, [wMapTextPtr + 1] ld [$ffec + 1], a ld a, l - ld [W_MAPTEXTPTR], a + ld [wMapTextPtr], a ld a, h - ld [W_MAPTEXTPTR + 1], a + ld [wMapTextPtr + 1], a ret TextPredefs:: +const_value = 1 + 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 +4679,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 @@ -4729,13 +4707,13 @@ TextPredefs:: add_tx_pre LinkCableHelp ; 34 add_tx_pre TMNotebook ; 35 add_tx_pre FightingDojoText ; 36 - add_tx_pre FightingDojoText_52a10 ; 37 - add_tx_pre FightingDojoText_52a1d ; 38 + add_tx_pre EnemiesOnEverySideText ; 37 + add_tx_pre WhatGoesAroundComesAroundText ; 38 add_tx_pre NewBicycleText ; 39 add_tx_pre IndigoPlateauStatues ; 3A - add_tx_pre VermilionGymTrashSuccesText1 ; 3B - add_tx_pre VermilionGymTrashSuccesText2 ; 3C - add_tx_pre VermilionGymTrashSuccesText3 ; 3D + add_tx_pre VermilionGymTrashSuccessText1 ; 3B + add_tx_pre VermilionGymTrashSuccessText2 ; 3C XXX unused + add_tx_pre VermilionGymTrashSuccessText3 ; 3D add_tx_pre VermilionGymTrashFailText ; 3E add_tx_pre TownMapText ; 3F add_tx_pre BookOrSculptureText ; 40 diff --git a/home/audio.asm b/home/audio.asm index 9210924c..c982d9d6 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -1,182 +1,217 @@ -PlayDefaultMusic:: ; 2307 (0:2307) +PlayDefaultMusic:: call WaitForSoundToFinish xor a ld c, a ld d, a - ld [wcfca], a - jr asm_2324 + ld [wLastMusicSoundID], a + jr PlayDefaultMusicCommon -Func_2312:: ; 2312 (0:2312) - ld c, $a - ld d, $0 +PlayDefaultMusicFadeOutCurrent:: +; Fade out the current music and then play the default music. + ld c, 10 + ld d, 0 ld a, [wd72e] - bit 5, a - jr z, asm_2324 + bit 5, a ; has a battle just ended? + jr z, PlayDefaultMusicCommon xor a - ld [wcfca], a - ld c, $8 + ld [wLastMusicSoundID], a + ld c, 8 ld d, c -asm_2324:: ; 2324 (0:2324) + +PlayDefaultMusicCommon:: ld a, [wWalkBikeSurfState] and a - jr z, .asm_2343 + jr z, .walking cp $2 - jr z, .asm_2332 + jr z, .surfing ld a, MUSIC_BIKE_RIDING - jr .asm_2334 -.asm_2332 + jr .next + +.surfing ld a, MUSIC_SURFING -.asm_2334 + +.next ld b, a ld a, d - and a + and a ; should current music be faded out first? ld a, BANK(Music_BikeRiding) - jr nz, .asm_233e - ld [wc0ef], a -.asm_233e - ld [wc0f0], a - jr .asm_234c -.asm_2343 - ld a, [wd35b] + jr nz, .next2 + +; Only change the audio ROM bank if the current music isn't going to be faded +; out before the default music begins. + ld [wAudioROMBank], a + +.next2 +; [wAudioSavedROMBank] will be copied to [wAudioROMBank] after fading out the +; current music (if the current music is faded out). + ld [wAudioSavedROMBank], a + jr .next3 + +.walking + ld a, [wMapMusicSoundID] ld b, a - call Func_2385 - jr c, .asm_2351 -.asm_234c - ld a, [wcfca] - cp b - ret z -.asm_2351 + call CompareMapMusicBankWithCurrentBank + jr c, .next4 + +.next3 + ld a, [wLastMusicSoundID] + cp b ; is the default music already playing? + ret z ; if so, do nothing + +.next4 ld a, c - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a ld a, b - ld [wcfca], a - ld [wc0ee], a + ld [wLastMusicSoundID], a + ld [wNewSoundID], a jp PlaySound -Func_235f:: ; 235f (0:235f) - ld a, [wc0ef] +UpdateMusic6Times:: +; This is called when entering a map, before fading out the current music and +; playing the default music (i.e. the map's music or biking/surfing music). + ld a, [wAudioROMBank] ld b, a - cp BANK(Music2_UpdateMusic) - jr nz, .checkForBank08 -.bank02 - ld hl, Music2_UpdateMusic - jr .asm_2378 -.checkForBank08 - cp BANK(Music8_UpdateMusic) - jr nz, .bank1F -.bank08 - ld hl, Music8_UpdateMusic - jr .asm_2378 -.bank1F - ld hl, Music1f_UpdateMusic -.asm_2378 - ld c, $6 -.asm_237a + cp BANK(Audio1_UpdateMusic) + jr nz, .checkForAudio2 + +; audio 1 + ld hl, Audio1_UpdateMusic + jr .next + +.checkForAudio2 + cp BANK(Audio2_UpdateMusic) + jr nz, .audio3 + +; audio 2 + ld hl, Audio2_UpdateMusic + jr .next + +.audio3 + ld hl, Audio3_UpdateMusic + +.next + ld c, 6 +.loop push bc push hl call Bankswitch pop hl pop bc dec c - jr nz, .asm_237a + jr nz, .loop ret -Func_2385:: ; 2385 (0:2385) - ld a, [wd35c] +CompareMapMusicBankWithCurrentBank:: +; Compares the map music's audio ROM bank with the current audio ROM bank +; and updates the audio ROM bank variables. +; Returns whether the banks are different in carry. + ld a, [wMapMusicROMBank] ld e, a - ld a, [wc0ef] + ld a, [wAudioROMBank] cp e - jr nz, .asm_2394 - ld [wc0f0], a + jr nz, .differentBanks + ld [wAudioSavedROMBank], a and a ret -.asm_2394 - ld a, c +.differentBanks + ld a, c ; this is a fade-out counter value and it's always non-zero and a ld a, e - jr nz, .asm_239c - ld [wc0ef], a -.asm_239c - ld [wc0f0], a + jr nz, .next +; If the fade-counter is non-zero, we don't change the audio ROM bank because +; it's needed to keep playing the music as it fades out. The FadeOutAudio +; routine will take care of copying [wAudioSavedROMBank] to [wAudioROMBank] +; when the music has faded out. + ld [wAudioROMBank], a +.next + ld [wAudioSavedROMBank], a scf ret -PlayMusic:: ; 23a1 (0:23a1) +PlayMusic:: ld b, a - ld [wc0ee], a + ld [wNewSoundID], a xor a - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a ld a, c - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, b ; plays music specified by a. If value is $ff, music is stopped -PlaySound:: ; 23b1 (0:23b1) +PlaySound:: push hl push de push bc ld b, a - ld a, [wc0ee] + ld a, [wNewSoundID] and a - jr z, .asm_23c8 + jr z, .next xor a - ld [wc02a], a - ld [wc02b], a - ld [wc02c], a - ld [wc02d], a -.asm_23c8 - ld a, [wMusicHeaderPointer] - and a - jr z, .asm_23e3 - ld a, [wc0ee] - and a - jr z, .asm_2425 + ld [wChannelSoundIDs + Ch4], a + ld [wChannelSoundIDs + Ch5], a + ld [wChannelSoundIDs + Ch6], a + ld [wChannelSoundIDs + Ch7], a +.next + ld a, [wAudioFadeOutControl] + and a ; has a fade-out length been specified? + jr z, .noFadeOut + ld a, [wNewSoundID] + and a ; is the new sound ID 0? + jr z, .done ; if so, do nothing xor a - ld [wc0ee], a - ld a, [wcfca] - cp $ff - jr nz, .asm_2414 + ld [wNewSoundID], a + ld a, [wLastMusicSoundID] + cp $ff ; has the music been stopped? + jr nz, .fadeOut ; if not, fade out the current music +; If it has been stopped, start playing the new music immediately. xor a - ld [wMusicHeaderPointer], a -.asm_23e3 + ld [wAudioFadeOutControl], a +.noFadeOut xor a - ld [wc0ee], a + ld [wNewSoundID], a ld a, [H_LOADEDROMBANK] - ld [$ffb9], a - ld a, [wc0ef] + ld [hSavedROMBank], a + ld a, [wAudioROMBank] ld [H_LOADEDROMBANK], a - ld [$2000], a - cp BANK(Func_9876) - jr nz, .checkForBank08 -.bank02 + ld [MBC1RomBank], a + cp BANK(Audio1_PlaySound) + jr nz, .checkForAudio2 + +; audio 1 ld a, b - call Func_9876 - jr .asm_240b -.checkForBank08 - cp BANK(Func_22035) - jr nz, .bank1F -.bank08 + call Audio1_PlaySound + jr .next2 + +.checkForAudio2 + cp BANK(Audio2_PlaySound) + jr nz, .audio3 + +; audio 2 ld a, b - call Func_22035 - jr .asm_240b -.bank1F + call Audio2_PlaySound + jr .next2 + +.audio3 ld a, b - call Func_7d8ea -.asm_240b - ld a, [$ffb9] + call Audio3_PlaySound + +.next2 + ld a, [hSavedROMBank] ld [H_LOADEDROMBANK], a - ld [$2000], a - jr .asm_2425 -.asm_2414 + ld [MBC1RomBank], a + jr .done + +.fadeOut ld a, b - ld [wcfca], a - ld a, [wMusicHeaderPointer] - ld [wcfc8], a - ld [wcfc9], a + ld [wLastMusicSoundID], a + ld a, [wAudioFadeOutControl] + ld [wAudioFadeOutCounterReloadValue], a + ld [wAudioFadeOutCounter], a ld a, b - ld [wMusicHeaderPointer], a -.asm_2425 + ld [wAudioFadeOutControl], a + +.done pop bc pop de pop hl diff --git a/home/copy2.asm b/home/copy2.asm index 7b407cdc..830440b0 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -1,10 +1,10 @@ FarCopyData2:: -; Identical to FarCopyData, but uses $ff8b +; Identical to FarCopyData, but uses hROMBankTemp ; as temp space instead of wBuffer. - ld [$ff8b],a + ld [hROMBankTemp],a ld a,[H_LOADEDROMBANK] push af - ld a,[$ff8b] + ld a,[hROMBankTemp] ld [H_LOADEDROMBANK],a ld [MBC1RomBank],a call CopyData @@ -15,10 +15,10 @@ FarCopyData2:: FarCopyData3:: ; Copy bc bytes from a:de to hl. - ld [$ff8b],a + ld [hROMBankTemp],a ld a,[H_LOADEDROMBANK] push af - ld a,[$ff8b] + ld a,[hROMBankTemp] ld [H_LOADEDROMBANK],a ld [MBC1RomBank],a push hl @@ -38,10 +38,10 @@ FarCopyData3:: FarCopyDataDouble:: ; Expand bc bytes of 1bpp image data ; from a:hl to 2bpp data at de. - ld [$ff8b],a + ld [hROMBankTemp],a ld a,[H_LOADEDROMBANK] push af - ld a,[$ff8b] + ld a,[hROMBankTemp] ld [H_LOADEDROMBANK],a ld [MBC1RomBank],a .loop @@ -70,7 +70,7 @@ CopyVideoData:: ld [H_AUTOBGTRANSFERENABLED], a ld a, [H_LOADEDROMBANK] - ld [$ff8b], a + ld [hROMBankTemp], a ld a, b ld [H_LOADEDROMBANK], a @@ -94,7 +94,7 @@ CopyVideoData:: .done ld [H_VBCOPYSIZE], a call DelayFrame - ld a, [$ff8b] + ld a, [hROMBankTemp] ld [H_LOADEDROMBANK], a ld [MBC1RomBank], a pop af @@ -119,7 +119,7 @@ CopyVideoDataDouble:: xor a ; disable auto-transfer while copying ld [H_AUTOBGTRANSFERENABLED], a ld a, [H_LOADEDROMBANK] - ld [$ff8b], a + ld [hROMBankTemp], a ld a, b ld [H_LOADEDROMBANK], a @@ -143,7 +143,7 @@ CopyVideoDataDouble:: .done ld [H_VBCOPYDOUBLESIZE], a call DelayFrame - ld a, [$ff8b] + ld a, [hROMBankTemp] ld [H_LOADEDROMBANK], a ld [MBC1RomBank], a pop af @@ -161,7 +161,7 @@ CopyVideoDataDouble:: ClearScreenArea:: ; Clear tilemap area cxb at hl. - ld a, $7f ; blank tile + ld a, " " ; blank tile ld de, 20 ; screen width .y push hl @@ -184,17 +184,17 @@ CopyScreenTileBufferToVRAM:: ld c, 6 ld hl, $600 * 0 - ld de, wTileMap + 20 * 6 * 0 + coord de, 0, 6 * 0 call .setup call DelayFrame ld hl, $600 * 1 - ld de, wTileMap + 20 * 6 * 1 + coord de, 0, 6 * 1 call .setup call DelayFrame ld hl, $600 * 2 - ld de, wTileMap + 20 * 6 * 2 + coord de, 0, 6 * 2 call .setup jp DelayFrame @@ -217,8 +217,8 @@ ClearScreen:: ; for the bg map to update. ld bc, 20 * 18 inc b - ld hl, wTileMap - ld a, $7f + coord hl, 0, 0 + ld a, " " .loop ld [hli], a dec c diff --git a/home/fade.asm b/home/fade.asm index 08e087b4..9482fcb0 100644 --- a/home/fade.asm +++ b/home/fade.asm @@ -1,7 +1,7 @@ ; These routines manage gradual fading ; (e.g., entering a doorway) LoadGBPal:: - ld a, [wMapPalOffset] ;tells if cur.map is dark (requires HM5_FLASH?) + ld a, [wMapPalOffset] ;tells if wCurMap is dark (requires HM5_FLASH?) ld b, a ld hl, FadePal4 ld a, l diff --git a/home/init.asm b/home/init.asm index cc89ad34..cb5c6583 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 @@ -23,17 +23,17 @@ rLCDC_DEFAULT EQU %11100011 xor a ld [rIF], a ld [rIE], a - ld [$ff43], a - ld [$ff42], a + ld [rSCX], a + ld [rSCY], a ld [rSB], a ld [rSC], a - ld [$ff4b], a - ld [$ff4a], a - ld [$ff06], a - ld [$ff07], a - ld [$ff47], a - ld [$ff48], a - ld [$ff49], a + ld [rWX], a + ld [rWY], a + ld [rTMA], a + ld [rTAC], a + ld [rBGP], a + ld [rOBP0], a + ld [rOBP1], a ld a, rLCDC_ENABLE_MASK ld [rLCDC], a @@ -66,10 +66,10 @@ rLCDC_DEFAULT EQU %11100011 xor a ld [hTilesetType], a - ld [$ff41], a + ld [rSTAT], a ld [hSCX], a ld [hSCY], a - ld [$ff0f], a + ld [rIF], a ld a, 1 << VBLANK + 1 << TIMER + 1 << SERIAL ld [rIE], a @@ -97,13 +97,13 @@ rLCDC_DEFAULT EQU %11100011 predef LoadSGB - ld a, BANK(SFX_1f_67) - ld [wc0ef], a - ld [wc0f0], a + ld a, BANK(SFX_Shooting_Star) + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, $9c - ld [$ffbd], a + ld [H_AUTOBGTRANSFERDEST + 1], a xor a - ld [$ffbc], a + ld [H_AUTOBGTRANSFERDEST], a dec a ld [wUpdateSpritesEnabled], a @@ -126,12 +126,12 @@ ClearVram: StopAllSounds:: - ld a, BANK(Music2_UpdateMusic) - ld [wc0ef], a - ld [wc0f0], a + ld a, BANK(Audio1_UpdateMusic) + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a xor a - ld [wMusicHeaderPointer], a - ld [wc0ee], a - ld [wcfca], a + ld [wAudioFadeOutControl], a + ld [wNewSoundID], a + ld [wLastMusicSoundID], a dec a jp PlaySound diff --git a/home/overworld.asm b/home/overworld.asm index c5c180c7..ec8f1925 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -1,16 +1,14 @@ HandleMidJump:: ; Handle the player jumping down ; a ledge in the overworld. - ld b, BANK(_HandleMidJump) - ld hl, _HandleMidJump - jp Bankswitch + jpba _HandleMidJump EnterMap:: ; Load a new map. ld a, $ff ld [wJoyIgnore], a call LoadMapData - callba ClearVariablesAfterLoadingMapData + callba ClearVariablesOnEnterMap ld hl, wd72c bit 0, [hl] ; has the player already made 3 steps since the last battle? jr z, .skipGivingThreeStepsOfNoRandomBattles @@ -34,7 +32,7 @@ EnterMap:: ld hl, wd72d res 5, [hl] call UpdateSprites - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] set 6, [hl] xor a @@ -61,9 +59,9 @@ OverworldLoopLessDelay:: res 3,[hl] jp nz,WarpFound2 ld a,[wd732] - and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp + and 1 << 4 | 1 << 3 ; fly warp or dungeon warp jp nz,HandleFlyWarpOrDungeonWarp - ld a,[W_CUROPPONENT] + ld a,[wCurOpponent] and a jp nz,.newBattle ld a,[wd730] @@ -106,27 +104,28 @@ OverworldLoopLessDelay:: bit 0,a jr nz,.checkForOpponent aCoord 8, 9 - ld [wcf0e],a + ld [wTilePlayerStandingOn],a ; unused? call DisplayTextID ; display either the start menu or the NPC/sign text - ld a,[wcc47] + ld a,[wEnteringCableClub] and a jr z,.checkForOpponent dec a - ld a,$00 - ld [wcc47],a + ld a,0 + ld [wEnteringCableClub],a jr z,.changeMap +; XXX can this code be reached? predef LoadSAV - ld a,[W_CURMAP] + ld a,[wCurMap] ld [wDestinationMap],a call SpecialWarpIn - ld a,[W_CURMAP] + ld a,[wCurMap] call SwitchToMapRomBank ; switch to the ROM bank of the current map - ld hl,W_CURMAPTILESET + ld hl,wCurMapTileset set 7,[hl] .changeMap jp EnterMap .checkForOpponent - ld a,[W_CUROPPONENT] + ld a,[wCurOpponent] and a jp nz,.newBattle jp OverworldLoop @@ -134,100 +133,112 @@ OverworldLoopLessDelay:: ld hl,wFlags_0xcd60 res 2,[hl] call UpdateSprites - ld a,$01 - ld [wcc4b],a - ld a,[wd528] ; the direction that was pressed last time + ld a, 1 + ld [wCheckFor180DegreeTurn],a + ld a,[wPlayerMovingDirection] ; the direction that was pressed last time and a jp z,OverworldLoop ; if a direction was pressed last time - ld [wd529],a ; save the last direction + ld [wPlayerLastStopDirection],a ; save the last direction xor a - ld [wd528],a ; zero the direction + ld [wPlayerMovingDirection],a ; zero the direction jp OverworldLoop + .checkIfDownButtonIsPressed ld a,[hJoyHeld] ; current joypad state bit 7,a ; down button jr z,.checkIfUpButtonIsPressed - ld a,$01 - ld [wSpriteStateData1 + 3],a - ld a,$04 + ld a,1 + ld [wSpriteStateData1 + 3],a ; delta Y + ld a,PLAYER_DIR_DOWN jr .handleDirectionButtonPress + .checkIfUpButtonIsPressed bit 6,a ; up button jr z,.checkIfLeftButtonIsPressed - ld a,$ff - ld [wSpriteStateData1 + 3],a - ld a,$08 + ld a,-1 + ld [wSpriteStateData1 + 3],a ; delta Y + ld a,PLAYER_DIR_UP jr .handleDirectionButtonPress + .checkIfLeftButtonIsPressed bit 5,a ; left button jr z,.checkIfRightButtonIsPressed - ld a,$ff - ld [wSpriteStateData1 + 5],a - ld a,$02 + ld a,-1 + ld [wSpriteStateData1 + 5],a ; delta X + ld a,PLAYER_DIR_LEFT jr .handleDirectionButtonPress + .checkIfRightButtonIsPressed bit 4,a ; right button jr z,.noDirectionButtonsPressed - ld a,$01 - ld [wSpriteStateData1 + 5],a + ld a, 1 + ld [wSpriteStateData1 + 5],a ; delta X + + .handleDirectionButtonPress - ld [wd52a],a ; new direction + ld [wPlayerDirection],a ; new direction ld a,[wd730] bit 7,a ; are we simulating button presses? jr nz,.noDirectionChange ; ignore direction changes if we are - ld a,[wcc4b] + ld a,[wCheckFor180DegreeTurn] and a jr z,.noDirectionChange - ld a,[wd52a] ; new direction + ld a,[wPlayerDirection] ; new direction ld b,a - ld a,[wd529] ; old direction + ld a,[wPlayerLastStopDirection] ; old direction cp b jr z,.noDirectionChange -; the code below is strange -; it computes whether or not the player did a 180 degree turn, but then overwrites the result -; also, it does a seemingly pointless loop afterwards +; Check whether the player did a 180-degree turn. +; It appears that this code was supposed to show the player rotate by having +; the player's sprite face an intermediate direction before facing the opposite +; direction (instead of doing an instantaneous about-face), but the intermediate +; direction is only set for a short period of time. It is unlikely for it to +; ever be visible because DelayFrame is called at the start of OverworldLoop and +; normally not enough cycles would be executed between then and the time the +; direction is set for V-blank to occur while the direction is still set. swap a ; put old direction in upper half or b ; put new direction in lower half - cp a,$48 ; change dir from down to up + cp a,(PLAYER_DIR_DOWN << 4) | PLAYER_DIR_UP ; change dir from down to up jr nz,.notDownToUp - ld a,$02 - ld [wd528],a - jr .oddLoop + ld a,PLAYER_DIR_LEFT + ld [wPlayerMovingDirection],a + jr .holdIntermediateDirectionLoop .notDownToUp - cp a,$84 ; change dir from up to down + cp a,(PLAYER_DIR_UP << 4) | PLAYER_DIR_DOWN ; change dir from up to down jr nz,.notUpToDown - ld a,$01 - ld [wd528],a - jr .oddLoop + ld a,PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection],a + jr .holdIntermediateDirectionLoop .notUpToDown - cp a,$12 ; change dir from right to left + cp a,(PLAYER_DIR_RIGHT << 4) | PLAYER_DIR_LEFT ; change dir from right to left jr nz,.notRightToLeft - ld a,$04 - ld [wd528],a - jr .oddLoop + ld a,PLAYER_DIR_DOWN + ld [wPlayerMovingDirection],a + jr .holdIntermediateDirectionLoop .notRightToLeft - cp a,$21 ; change dir from left to right - jr nz,.oddLoop - ld a,$08 - ld [wd528],a -.oddLoop + cp a,(PLAYER_DIR_LEFT << 4) | PLAYER_DIR_RIGHT ; change dir from left to right + jr nz,.holdIntermediateDirectionLoop + ld a,PLAYER_DIR_UP + ld [wPlayerMovingDirection],a +.holdIntermediateDirectionLoop ld hl,wFlags_0xcd60 set 2,[hl] - ld hl,wcc4b + ld hl,wCheckFor180DegreeTurn dec [hl] - jr nz,.oddLoop - ld a,[wd52a] - ld [wd528],a + jr nz,.holdIntermediateDirectionLoop + ld a,[wPlayerDirection] + ld [wPlayerMovingDirection],a call NewBattle jp c,.battleOccurred jp OverworldLoop + .noDirectionChange - ld a,[wd52a] ; current direction - ld [wd528],a ; save direction + ld a,[wPlayerDirection] ; current direction + ld [wPlayerMovingDirection],a ; save direction call UpdateSprites ld a,[wWalkBikeSurfState] - cp a,$02 ; surfing + cp $02 ; surfing jr z,.surfing ; not surfing call CollisionCheckOnLand @@ -244,20 +255,24 @@ OverworldLoopLessDelay:: pop hl jp c,CheckWarpsCollision jp OverworldLoop + .surfing call CollisionCheckOnWater jp c,OverworldLoop + .noCollision ld a,$08 ld [wWalkCounter],a jr .moveAhead2 + .moveAhead ld a,[wd736] bit 7,a jr z,.noSpinning - callba LoadSpinnerArrowTiles ; spin while moving + callba LoadSpinnerArrowTiles .noSpinning - call UpdateSprites ; move sprites + call UpdateSprites + .moveAhead2 ld hl,wFlags_0xcd60 res 2,[hl] @@ -267,7 +282,7 @@ OverworldLoopLessDelay:: ld a,[wd736] bit 6,a ; jumping a ledge? jr nz,.normalPlayerSpriteAdvancement - call BikeSpeedup ; if riding a bike and not jumping a ledge + call DoBikeSpeedup .normalPlayerSpriteAdvancement call AdvancePlayerSprite ld a,[wWalkCounter] @@ -289,19 +304,18 @@ OverworldLoopLessDelay:: ld hl,wd72c res 0,[hl] ; indicate that the player has stepped thrice since the last battle .doneStepCounting - ld a,[wd790] - bit 7,a ; in the safari zone? + CheckEvent EVENT_IN_SAFARI_ZONE jr z,.notSafariZone callba SafariZoneCheckSteps ld a,[wSafariZoneGameOver] and a jp nz,WarpFound2 .notSafariZone - ld a,[W_ISINBATTLE] + ld a,[wIsInBattle] and a jp nz,CheckWarpsNoCollision predef ApplyOutOfBattlePoisonDamage ; also increment daycare mon exp - ld a,[wd12d] + ld a,[wOutOfBattleBlackout] and a jp nz,HandleBlackOut ; if all pokemon fainted .newBattle @@ -312,41 +326,40 @@ OverworldLoopLessDelay:: .battleOccurred ld hl,wd72d res 6,[hl] - ld hl,W_FLAGS_D733 + ld hl,wFlags_D733 res 3,[hl] - ld hl,wd126 + ld hl,wCurrentMapScriptFlags set 5,[hl] set 6,[hl] xor a ld [hJoyHeld],a - ld a,[W_CURMAP] - cp a,CINNABAR_GYM + ld a,[wCurMap] + cp CINNABAR_GYM jr nz,.notCinnabarGym - ld hl,wd79b - set 7,[hl] + SetEvent EVENT_2A7 .notCinnabarGym ld hl,wd72e set 5,[hl] - ld a,[W_CURMAP] - cp a,OAKS_LAB + ld a,[wCurMap] + cp OAKS_LAB jp z,.noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab callab AnyPartyAlive ld a,d and a jr z,.allPokemonFainted .noFaintCheck - ld c,$0a + ld c,10 call DelayFrames jp EnterMap .allPokemonFainted ld a,$ff - ld [W_ISINBATTLE],a + ld [wIsInBattle],a call RunMapScript jp HandleBlackOut ; function to determine if there will be a battle and execute it (either a trainer battle or wild battle) ; sets carry if a battle occurred and unsets carry if not -NewBattle:: ; 0683 (0:0683) +NewBattle:: ld a,[wd72d] bit 4,a jr nz,.noBattle @@ -355,41 +368,39 @@ NewBattle:: ; 0683 (0:0683) ld a,[wd72e] bit 4,a jr nz,.noBattle - ld b, BANK(InitBattle) - ld hl, InitBattle - jp Bankswitch + jpba InitBattle .noBattle and a ret ; function to make bikes twice as fast as walking -BikeSpeedup:: ; 06a0 (0:06a0) +DoBikeSpeedup:: ld a,[wNPCMovementScriptPointerTableNum] and a ret nz - ld a,[W_CURMAP] - cp a,ROUTE_17 ; Cycling Road + ld a,[wCurMap] + cp ROUTE_17 ; Cycling Road jr nz,.goFaster ld a,[hJoyHeld] - and a,D_UP | D_LEFT | D_RIGHT + and D_UP | D_LEFT | D_RIGHT ret nz .goFaster jp AdvancePlayerSprite ; check if the player has stepped onto a warp after having not collided -CheckWarpsNoCollision:: ; 06b4 (0:06b4) +CheckWarpsNoCollision:: ld a,[wNumberOfWarps] and a jp z,CheckMapConnections ld a,[wNumberOfWarps] ld b,0 ld c,a - ld a,[W_YCOORD] + ld a,[wYCoord] ld d,a - ld a,[W_XCOORD] + ld a,[wXCoord] ld e,a ld hl,wWarpEntries -CheckWarpsNoCollisionLoop:: ; 06cc (0:06cc) +CheckWarpsNoCollisionLoop:: ld a,[hli] ; check if the warp's Y position matches cp d jr nz,CheckWarpsNoCollisionRetry1 @@ -412,7 +423,7 @@ CheckWarpsNoCollisionLoop:: ; 06cc (0:06cc) pop hl jr nc,CheckWarpsNoCollisionRetry2 ; if the extra check passed - ld a,[W_FLAGS_D733] + ld a,[wFlags_D733] bit 2,a jr nz,WarpFound1 push de @@ -421,30 +432,30 @@ CheckWarpsNoCollisionLoop:: ; 06cc (0:06cc) pop bc pop de ld a,[hJoyHeld] - and a,D_DOWN | D_UP | D_LEFT | D_RIGHT + and D_DOWN | D_UP | D_LEFT | D_RIGHT jr z,CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp jr WarpFound1 ; check if the player has stepped onto a warp after having collided -CheckWarpsCollision:: ; 0706 (0:0706) +CheckWarpsCollision:: ld a,[wNumberOfWarps] ld c,a ld hl,wWarpEntries .loop ld a,[hli] ; Y coordinate of warp ld b,a - ld a,[W_YCOORD] + ld a,[wYCoord] cp b jr nz,.retry1 ld a,[hli] ; X coordinate of warp ld b,a - ld a,[W_XCOORD] + ld a,[wXCoord] cp b jr nz,.retry2 ld a,[hli] ld [wDestinationWarpID],a ld a,[hl] - ld [$ff8b],a ; save target map + ld [hWarpDestinationMap],a jr WarpFound2 .retry1 inc hl @@ -455,35 +466,35 @@ CheckWarpsCollision:: ; 0706 (0:0706) jr nz,.loop jp OverworldLoop -CheckWarpsNoCollisionRetry1:: ; 072f (0:072f) +CheckWarpsNoCollisionRetry1:: inc hl -CheckWarpsNoCollisionRetry2:: ; 0730 (0:0730) +CheckWarpsNoCollisionRetry2:: inc hl inc hl jp ContinueCheckWarpsNoCollisionLoop -WarpFound1:: ; 0735 (0:0735) +WarpFound1:: ld a,[hli] ld [wDestinationWarpID],a ld a,[hli] - ld [$ff8b],a ; save target map + ld [hWarpDestinationMap],a -WarpFound2:: ; 073c (0:073c) +WarpFound2:: ld a,[wNumberOfWarps] sub c - ld [wd73b],a ; save ID of used warp - ld a,[W_CURMAP] - ld [wd73c],a + ld [wWarpedFromWhichWarp],a ; save ID of used warp + ld a,[wCurMap] + ld [wWarpedFromWhichMap],a call CheckIfInOutsideMap jr nz,.indoorMaps ; this is for handling "outside" maps that can't have the 0xFF destination map - ld a,[W_CURMAP] + ld a,[wCurMap] ld [wLastMap],a - ld a,[W_CURMAPWIDTH] - ld [wd366],a - ld a,[$ff8b] ; destination map number - ld [W_CURMAP],a ; change current map to destination map - cp a,ROCK_TUNNEL_1 + ld a,[wCurMapWidth] + ld [wUnusedD366],a ; not read + ld a,[hWarpDestinationMap] + ld [wCurMap],a + cp ROCK_TUNNEL_1 jr nz,.notRockTunnel ld a,$06 ld [wMapPalOffset],a @@ -491,15 +502,17 @@ WarpFound2:: ; 073c (0:073c) .notRockTunnel call PlayMapChangeSound jr .done -; for maps that can have the 0xFF destination map, which means to return to the outside map; not all these maps are necessarily indoors, though + +; for maps that can have the 0xFF destination map, which means to return to the outside map +; not all these maps are necessarily indoors, though .indoorMaps - ld a,[$ff8b] ; destination map - cp a,$ff + ld a,[hWarpDestinationMap] ; destination map + cp $ff jr z,.goBackOutside ; if not going back to the previous map - ld [W_CURMAP],a ; current map number + ld [wCurMap],a callba IsPlayerStandingOnWarpPadOrHole - ld a,[wcd5b] + ld a,[wStandingOnWarpPadOrHole] dec a ; is the player on a warp pad? jr nz,.notWarpPad ; if the player is on a warp pad @@ -516,7 +529,7 @@ WarpFound2:: ; 073c (0:073c) jr .done .goBackOutside ld a,[wLastMap] - ld [W_CURMAP],a + ld [wCurMap],a call PlayMapChangeSound xor a ld [wMapPalOffset],a @@ -526,39 +539,39 @@ WarpFound2:: ; 073c (0:073c) call IgnoreInputForHalfSecond jp EnterMap -ContinueCheckWarpsNoCollisionLoop:: ; 07b5 (0:07b5) +ContinueCheckWarpsNoCollisionLoop:: inc b ; increment warp number dec c ; decrement number of warps jp nz,CheckWarpsNoCollisionLoop ; if no matching warp was found -CheckMapConnections:: ; 07ba (0:07ba) +CheckMapConnections:: .checkWestMap - ld a,[W_XCOORD] - cp a,$ff + ld a,[wXCoord] + cp $ff jr nz,.checkEastMap - ld a,[W_MAPCONN3PTR] - ld [W_CURMAP],a - ld a,[wd38f] ; new X coordinate upon entering west map - ld [W_XCOORD],a - ld a,[W_YCOORD] + ld a,[wMapConn3Ptr] + ld [wCurMap],a + ld a,[wWestConnectedMapXAlignment] ; new X coordinate upon entering west map + ld [wXCoord],a + ld a,[wYCoord] ld c,a - ld a,[wd38e] ; Y adjustment upon entering west map + ld a,[wWestConnectedMapYAlignment] ; Y adjustment upon entering west map add c ld c,a - ld [W_YCOORD],a - ld a,[wd390] ; pointer to upper left corner of map without adjustment for Y position + ld [wYCoord],a + ld a,[wWestConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position ld l,a - ld a,[wd391] + ld a,[wWestConnectedMapViewPointer + 1] ld h,a srl c jr z,.savePointer1 .pointerAdjustmentLoop1 - ld a,[wd38d] ; width of connected map - add a,$06 + ld a,[wWestConnectedMapWidth] ; width of connected map + add MAP_BORDER * 2 ld e,a - ld d,$00 - ld b,$00 + ld d,0 + ld b,0 add hl,de dec c jr nz,.pointerAdjustmentLoop1 @@ -568,33 +581,34 @@ CheckMapConnections:: ; 07ba (0:07ba) ld a,h ld [wCurrentTileBlockMapViewPointer + 1],a jp .loadNewMap + .checkEastMap ld b,a - ld a,[wd525] ; map width + ld a,[wCurrentMapWidth2] ; map width cp b jr nz,.checkNorthMap - ld a,[W_MAPCONN4PTR] - ld [W_CURMAP],a - ld a,[wd39a] ; new X coordinate upon entering east map - ld [W_XCOORD],a - ld a,[W_YCOORD] + ld a,[wMapConn4Ptr] + ld [wCurMap],a + ld a,[wEastConnectedMapXAlignment] ; new X coordinate upon entering east map + ld [wXCoord],a + ld a,[wYCoord] ld c,a - ld a,[wd399] ; Y adjustment upon entering east map + ld a,[wEastConnectedMapYAlignment] ; Y adjustment upon entering east map add c ld c,a - ld [W_YCOORD],a - ld a,[wd39b] ; pointer to upper left corner of map without adjustment for Y position + ld [wYCoord],a + ld a,[wEastConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position ld l,a - ld a,[wd39c] + ld a,[wEastConnectedMapViewPointer + 1] ld h,a srl c jr z,.savePointer2 .pointerAdjustmentLoop2 - ld a,[wd398] - add a,$06 + ld a,[wEastConnectedMapWidth] + add MAP_BORDER * 2 ld e,a - ld d,$00 - ld b,$00 + ld d,0 + ld b,0 add hl,de dec c jr nz,.pointerAdjustmentLoop2 @@ -604,25 +618,26 @@ CheckMapConnections:: ; 07ba (0:07ba) ld a,h ld [wCurrentTileBlockMapViewPointer + 1],a jp .loadNewMap + .checkNorthMap - ld a,[W_YCOORD] - cp a,$ff + ld a,[wYCoord] + cp $ff jr nz,.checkSouthMap - ld a,[W_MAPCONN1PTR] - ld [W_CURMAP],a - ld a,[wd378] ; new Y coordinate upon entering north map - ld [W_YCOORD],a - ld a,[W_XCOORD] + ld a,[wMapConn1Ptr] + ld [wCurMap],a + ld a,[wNorthConnectedMapYAlignment] ; new Y coordinate upon entering north map + ld [wYCoord],a + ld a,[wXCoord] ld c,a - ld a,[wd379] ; X adjustment upon entering north map + ld a,[wNorthConnectedMapXAlignment] ; X adjustment upon entering north map add c ld c,a - ld [W_XCOORD],a - ld a,[wd37a] ; pointer to upper left corner of map without adjustment for X position + ld [wXCoord],a + ld a,[wNorthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position ld l,a - ld a,[wd37b] + ld a,[wNorthConnectedMapViewPointer + 1] ld h,a - ld b,$00 + ld b,0 srl c add hl,bc ld a,l @@ -630,26 +645,27 @@ CheckMapConnections:: ; 07ba (0:07ba) ld a,h ld [wCurrentTileBlockMapViewPointer + 1],a jp .loadNewMap + .checkSouthMap ld b,a - ld a,[wd524] + ld a,[wCurrentMapHeight2] cp b jr nz,.didNotEnterConnectedMap - ld a,[W_MAPCONN2PTR] - ld [W_CURMAP],a - ld a,[wd383] ; new Y coordinate upon entering south map - ld [W_YCOORD],a - ld a,[W_XCOORD] + ld a,[wMapConn2Ptr] + ld [wCurMap],a + ld a,[wSouthConnectedMapYAlignment] ; new Y coordinate upon entering south map + ld [wYCoord],a + ld a,[wXCoord] ld c,a - ld a,[wd384] ; X adjustment upon entering south map + ld a,[wSouthConnectedMapXAlignment] ; X adjustment upon entering south map add c ld c,a - ld [W_XCOORD],a - ld a,[wd385] ; pointer to upper left corner of map without adjustment for X position + ld [wXCoord],a + ld a,[wSouthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position ld l,a - ld a,[wd386] + ld a,[wSouthConnectedMapViewPointer + 1] ld h,a - ld b,$00 + ld b,0 srl c add hl,bc ld a,l @@ -658,26 +674,27 @@ CheckMapConnections:: ; 07ba (0:07ba) ld [wCurrentTileBlockMapViewPointer + 1],a .loadNewMap ; load the connected map that was entered call LoadMapHeader - call Func_2312 ; music - ld b,$09 - call GoPAL_SET + call PlayDefaultMusicFadeOutCurrent + ld b, SET_PAL_OVERWORLD + call RunPaletteCommand ; Since the sprite set shouldn't change, this will just update VRAM slots at ; $C2XE without loading any tile patterns. callba InitMapSprites call LoadTileBlockMap jp OverworldLoopLessDelay + .didNotEnterConnectedMap jp OverworldLoop ; function to play a sound when changing maps -PlayMapChangeSound:: ; 08c9 (0:08c9) +PlayMapChangeSound:: aCoord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on - cp a,$0b ; door tile in tileset 0 + cp $0b ; door tile in tileset 0 jr nz,.didNotGoThroughDoor - ld a,(SFX_02_57 - SFX_Headers_02) / 3 + ld a,SFX_GO_INSIDE jr .playSound .didNotGoThroughDoor - ld a,(SFX_02_5c - SFX_Headers_02) / 3 + ld a,SFX_GO_OUTSIDE .playSound call PlaySound ld a,[wMapPalOffset] @@ -685,9 +702,9 @@ PlayMapChangeSound:: ; 08c9 (0:08c9) ret nz jp GBFadeOutToBlack -CheckIfInOutsideMap:: ; 08e1 (0:08e1) +CheckIfInOutsideMap:: ; If the player is in an outside map (a town or route), set the z flag - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] and a ; most towns/routes have tileset 0 (OVERWORLD) ret z cp PLATEAU ; Route 23 / Indigo Plateau @@ -699,8 +716,8 @@ CheckIfInOutsideMap:: ; 08e1 (0:08e1) ; "function 1" passes when the player is at the edge of the map and is facing towards the outside of the map ; "function 2" passes when the the tile in front of the player is among a certain set ; sets carry if the check passes, otherwise clears carry -ExtraWarpCheck:: ; 08e9 (0:08e9) - ld a, [W_CURMAP] +ExtraWarpCheck:: + ld a, [wCurMap] cp SS_ANNE_3 jr z, .useFunction1 cp ROCKET_HIDEOUT_1 @@ -711,7 +728,7 @@ ExtraWarpCheck:: ; 08e9 (0:08e9) jr z, .useFunction2 cp ROCK_TUNNEL_1 jr z, .useFunction2 - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] and a ; outside tileset (OVERWORLD) jr z, .useFunction2 cp SHIP ; S.S. Anne tileset @@ -729,7 +746,7 @@ ExtraWarpCheck:: ; 08e9 (0:08e9) ld b, BANK(IsWarpTileInFrontOfPlayer) jp Bankswitch -MapEntryAfterBattle:: ; 091f (0:091f) +MapEntryAfterBattle:: callba IsPlayerStandingOnWarp ; for enabling warp testing after collisions ld a,[wMapPalOffset] and a @@ -750,16 +767,16 @@ HandleBlackOut:: ld [MBC1RomBank], a call ResetStatusAndHalveMoneyOnBlackout call SpecialWarpIn - call Func_2312 + call PlayDefaultMusicFadeOutCurrent jp SpecialEnterMap StopMusic:: - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound .wait - ld a, [wMusicHeaderPointer] + ld a, [wAudioFadeOutControl] and a jr nz, .wait jp StopAllSounds @@ -770,7 +787,7 @@ HandleFlyWarpOrDungeonWarp:: xor a ld [wBattleResult], a ld [wWalkBikeSurfState], a - ld [W_ISINBATTLE], a + ld [wIsInBattle], a ld [wMapPalOffset], a ld hl, wd732 set 2, [hl] ; fly warp or dungeon warp @@ -778,14 +795,12 @@ HandleFlyWarpOrDungeonWarp:: call LeaveMapAnim ld a, Bank(SpecialWarpIn) ld [H_LOADEDROMBANK], a - ld [$2000], a + ld [MBC1RomBank], a call SpecialWarpIn jp SpecialEnterMap LeaveMapAnim:: - ld b, BANK(_LeaveMapAnim) - ld hl, _LeaveMapAnim - jp Bankswitch + jpba _LeaveMapAnim LoadPlayerSpriteGraphics:: ; Load sprite graphics based on whether the player is standing, biking, or surfing. @@ -830,13 +845,13 @@ IsBikeRidingAllowed:: ; or maps with tilesets in BikeRidingTilesets. ; Return carry if biking is allowed. - ld a, [W_CURMAP] + ld a, [wCurMap] cp ROUTE_23 jr z, .allowed cp INDIGO_PLATEAU jr z, .allowed - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] ld b, a ld hl, BikeRidingTilesets .loop @@ -855,22 +870,22 @@ IsBikeRidingAllowed:: INCLUDE "data/bike_riding_tilesets.asm" ; load the tile pattern data of the current tileset into VRAM -LoadTilesetTilePatternData:: ; 09e8 (0:09e8) - ld a,[W_TILESETGFXPTR] +LoadTilesetTilePatternData:: + ld a,[wTilesetGfxPtr] ld l,a - ld a,[W_TILESETGFXPTR + 1] + ld a,[wTilesetGfxPtr + 1] ld h,a ld de,vTileset ld bc,$600 - ld a,[W_TILESETBANK] + ld a,[wTilesetBank] jp FarCopyData2 ; this loads the current maps complete tile map (which references blocks, not individual tiles) to C6E8 ; it can also load partial tile maps of connected maps into a border of length 3 around the current map -LoadTileBlockMap:: ; 09fc (0:09fc) +LoadTileBlockMap:: ; fill C6E8-CBFB with the background tile ld hl,wOverworldMap - ld a,[wd3ad] ; background tile number + ld a,[wMapBackgroundTile] ld d,a ld bc,$0514 .backgroundTileLoop @@ -883,27 +898,27 @@ LoadTileBlockMap:: ; 09fc (0:09fc) ; load tile map of current map (made of tile block IDs) ; a 3-byte border at the edges of the map is kept so that there is space for map connections ld hl,wOverworldMap - ld a,[W_CURMAPWIDTH] - ld [$ff8c],a - add a,$06 ; border (east and west) - ld [$ff8b],a ; map width + border - ld b,$00 + ld a,[wCurMapWidth] + ld [hMapWidth],a + add MAP_BORDER * 2 ; east and west + ld [hMapStride],a ; map width + border + ld b,0 ld c,a ; make space for north border (next 3 lines) add hl,bc add hl,bc add hl,bc - ld c,$03 + ld c,MAP_BORDER add hl,bc ; this puts us past the (west) border - ld a,[W_MAPDATAPTR] ; tile map pointer + ld a,[wMapDataPtr] ; tile map pointer ld e,a - ld a,[W_MAPDATAPTR + 1] + ld a,[wMapDataPtr + 1] ld d,a ; de = tile map pointer - ld a,[W_CURMAPHEIGHT] + ld a,[wCurMapHeight] ld b,a .rowLoop ; copy one row each iteration push hl - ld a,[$ff8c] ; map width (without border) + ld a,[hMapWidth] ; map width (without border) ld c,a .rowInnerLoop ld a,[de] @@ -913,7 +928,7 @@ LoadTileBlockMap:: ; 09fc (0:09fc) jr nz,.rowInnerLoop ; add the map width plus the border to the base address of the current row to get the next row's address pop hl - ld a,[$ff8b] ; map width + border + ld a,[hMapStride] ; map width + border add l ld l,a jr nc,.noCarry @@ -922,86 +937,86 @@ LoadTileBlockMap:: ; 09fc (0:09fc) dec b jr nz,.rowLoop .northConnection - ld a,[W_MAPCONN1PTR] - cp a,$ff + ld a,[wMapConn1Ptr] + cp $ff jr z,.southConnection call SwitchToMapRomBank - ld a,[wd372] + ld a,[wNorthConnectionStripSrc] ld l,a - ld a,[wd373] + ld a,[wNorthConnectionStripSrc + 1] ld h,a - ld a,[wd374] + ld a,[wNorthConnectionStripDest] ld e,a - ld a,[wd375] + ld a,[wNorthConnectionStripDest + 1] ld d,a - ld a,[wd376] - ld [$ff8b],a - ld a,[wd377] - ld [$ff8c],a + ld a,[wNorthConnectionStripWidth] + ld [hNorthSouthConnectionStripWidth],a + ld a,[wNorthConnectedMapWidth] + ld [hNorthSouthConnectedMapWidth],a call LoadNorthSouthConnectionsTileMap .southConnection - ld a,[W_MAPCONN2PTR] - cp a,$ff + ld a,[wMapConn2Ptr] + cp $ff jr z,.westConnection call SwitchToMapRomBank - ld a,[wd37d] + ld a,[wSouthConnectionStripSrc] ld l,a - ld a,[wd37e] + ld a,[wSouthConnectionStripSrc + 1] ld h,a - ld a,[wd37f] + ld a,[wSouthConnectionStripDest] ld e,a - ld a,[wd380] + ld a,[wSouthConnectionStripDest + 1] ld d,a - ld a,[wd381] - ld [$ff8b],a - ld a,[wd382] - ld [$ff8c],a + ld a,[wSouthConnectionStripWidth] + ld [hNorthSouthConnectionStripWidth],a + ld a,[wSouthConnectedMapWidth] + ld [hNorthSouthConnectedMapWidth],a call LoadNorthSouthConnectionsTileMap .westConnection - ld a,[W_MAPCONN3PTR] - cp a,$ff + ld a,[wMapConn3Ptr] + cp $ff jr z,.eastConnection call SwitchToMapRomBank - ld a,[wd388] + ld a,[wWestConnectionStripSrc] ld l,a - ld a,[wd389] + ld a,[wWestConnectionStripSrc + 1] ld h,a - ld a,[wd38a] + ld a,[wWestConnectionStripDest] ld e,a - ld a,[wd38b] + ld a,[wWestConnectionStripDest + 1] ld d,a - ld a,[wd38c] + ld a,[wWestConnectionStripHeight] ld b,a - ld a,[wd38d] - ld [$ff8b],a + ld a,[wWestConnectedMapWidth] + ld [hEastWestConnectedMapWidth],a call LoadEastWestConnectionsTileMap .eastConnection - ld a,[W_MAPCONN4PTR] - cp a,$ff + ld a,[wMapConn4Ptr] + cp $ff jr z,.done call SwitchToMapRomBank - ld a,[wd393] + ld a,[wEastConnectionStripSrc] ld l,a - ld a,[wd394] + ld a,[wEastConnectionStripSrc + 1] ld h,a - ld a,[wd395] + ld a,[wEastConnectionStripDest] ld e,a - ld a,[wd396] + ld a,[wEastConnectionStripDest + 1] ld d,a - ld a,[wd397] + ld a,[wEastConnectionStripHeight] ld b,a - ld a,[wd398] - ld [$ff8b],a + ld a,[wEastConnectedMapWidth] + ld [hEastWestConnectedMapWidth],a call LoadEastWestConnectionsTileMap .done ret -LoadNorthSouthConnectionsTileMap:: ; 0ade (0:0ade) - ld c,$03 +LoadNorthSouthConnectionsTileMap:: + ld c,MAP_BORDER .loop push de push hl - ld a,[$ff8b] ; width of connection + ld a,[hNorthSouthConnectionStripWidth] ld b,a .innerLoop ld a,[hli] @@ -1011,14 +1026,14 @@ LoadNorthSouthConnectionsTileMap:: ; 0ade (0:0ade) jr nz,.innerLoop pop hl pop de - ld a,[$ff8c] ; width of connected map + ld a,[hNorthSouthConnectedMapWidth] add l ld l,a jr nc,.noCarry1 inc h .noCarry1 - ld a,[W_CURMAPWIDTH] - add a,$06 + ld a,[wCurMapWidth] + add MAP_BORDER * 2 add e ld e,a jr nc,.noCarry2 @@ -1028,10 +1043,10 @@ LoadNorthSouthConnectionsTileMap:: ; 0ade (0:0ade) jr nz,.loop ret -LoadEastWestConnectionsTileMap:: ; 0b02 (0:0b02) +LoadEastWestConnectionsTileMap:: push hl push de - ld c,$03 + ld c,MAP_BORDER .innerLoop ld a,[hli] ld [de],a @@ -1040,14 +1055,14 @@ LoadEastWestConnectionsTileMap:: ; 0b02 (0:0b02) jr nz,.innerLoop pop de pop hl - ld a,[$ff8b] ; width of connected map + ld a,[hEastWestConnectedMapWidth] add l ld l,a jr nc,.noCarry1 inc h .noCarry1 - ld a,[W_CURMAPWIDTH] - add a,$06 + ld a,[wCurMapWidth] + add MAP_BORDER * 2 add e ld e,a jr nc,.noCarry2 @@ -1060,18 +1075,18 @@ LoadEastWestConnectionsTileMap:: ; 0b02 (0:0b02) ; function to check if there is a sign or sprite in front of the player ; if so, it is stored in [hSpriteIndexOrTextID] ; if not, [hSpriteIndexOrTextID] is set to 0 -IsSpriteOrSignInFrontOfPlayer:: ; 0b23 (0:0b23) +IsSpriteOrSignInFrontOfPlayer:: xor a ld [hSpriteIndexOrTextID],a - ld a,[wd4b0] ; number of signs in the map + ld a,[wNumSigns] and a jr z,.extendRangeOverCounter ; if there are signs predef GetTileAndCoordsInFrontOfPlayer ; get the coordinates in front of the player in de - ld hl,wd4b1 ; start of sign coordinates - ld a,[wd4b0] ; number of signs in the map + ld hl,wSignCoords + ld a,[wNumSigns] ld b,a - ld c,$00 + ld c,0 .signLoop inc c ld a,[hli] ; sign Y @@ -1087,8 +1102,8 @@ IsSpriteOrSignInFrontOfPlayer:: ; 0b23 (0:0b23) ; found sign push hl push bc - ld hl,wd4d1 ; start of sign text ID's - ld b,$00 + ld hl,wSignTextIDs + ld b,0 dec c add hl,bc ld a,[hl] @@ -1102,8 +1117,8 @@ IsSpriteOrSignInFrontOfPlayer:: ; 0b23 (0:0b23) ; check if the player is front of a counter in a pokemon center, pokemart, etc. and if so, extend the range at which he can talk to the NPC .extendRangeOverCounter predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player in c - ld hl,W_TILESETTALKINGOVERTILES ; list of tiles that extend talking range (counter tiles) - ld b,$03 + ld hl,wTilesetTalkingOverTiles ; list of tiles that extend talking range (counter tiles) + ld b,3 ld d,$20 ; talking range in pixels (long range) .counterTilesLoop ld a,[hli] @@ -1114,47 +1129,50 @@ IsSpriteOrSignInFrontOfPlayer:: ; 0b23 (0:0b23) ; part of the above function, but sometimes its called on its own, when signs are irrelevant ; the caller must zero [hSpriteIndexOrTextID] -IsSpriteInFrontOfPlayer:: ; 0b6b (0:0b6b) +IsSpriteInFrontOfPlayer:: ld d,$10 ; talking range in pixels (normal range) -IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d) - ld bc,$3c40 ; Y and X position of player sprite +IsSpriteInFrontOfPlayer2:: + lb bc, $3c, $40 ; 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 sub d ld b,a - ld a,$08 + ld a,PLAYER_DIR_UP jr .doneCheckingDirection + .checkIfPlayerFacingDown - cp a,$00 + cp SPRITE_FACING_DOWN jr nz,.checkIfPlayerFacingRight ; facing down ld a,b add d ld b,a - ld a,$04 + ld a,PLAYER_DIR_DOWN jr .doneCheckingDirection + .checkIfPlayerFacingRight - cp a,$0c + cp SPRITE_FACING_RIGHT jr nz,.playerFacingLeft ; facing right ld a,c add d ld c,a - ld a,$01 + ld a,PLAYER_DIR_RIGHT jr .doneCheckingDirection + .playerFacingLeft ; facing left ld a,c sub d ld c,a - ld a,$02 + ld a,PLAYER_DIR_LEFT .doneCheckingDirection - ld [wd52a],a - ld a,[W_NUMSPRITES] ; number of sprites + ld [wPlayerDirection],a + ld a,[wNumSprites] ; number of sprites and a ret z ; if there are sprites @@ -1192,15 +1210,15 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d) ld a,l and a,$f0 inc a - ld l,a - set 7,[hl] + ld l,a ; hl = $c1x1 + set 7,[hl] ; set flag to make the sprite face the player ld a,e ld [hSpriteIndexOrTextID],a ret ; function to check if the player will jump down a ledge and check if the tile ahead is passable (when not surfing) ; sets the carry flag if there is a collision, and unsets it if there isn't a collision -CollisionCheckOnLand:: ; 0bd1 (0:0bd1) +CollisionCheckOnLand:: ld a,[wd736] bit 6,a ; is the player jumping? jr nz,.noCollision @@ -1208,7 +1226,7 @@ CollisionCheckOnLand:: ; 0bd1 (0:0bd1) ld a,[wSimulatedJoypadStatesIndex] and a jr nz,.noCollision ; no collisions when the player's movements are being controlled by the game - ld a,[wd52a] ; the direction that the player is trying to go in + ld a,[wPlayerDirection] ; the direction that the player is trying to go in ld d,a ld a,[wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) and d ; check if a sprite is in the direction the player is trying to go @@ -1226,10 +1244,10 @@ CollisionCheckOnLand:: ; 0bd1 (0:0bd1) call CheckTilePassable jr nc,.noCollision .collision - ld a,[wc02a] - cp a,(SFX_02_5b - SFX_Headers_02) / 3 ; check if collision sound is already playing + ld a,[wChannelSoundIDs + Ch4] + cp SFX_COLLISION ; check if collision sound is already playing jr z,.setCarry - ld a,(SFX_02_5b - SFX_Headers_02) / 3 + ld a,SFX_COLLISION call PlaySound ; play collision sound (if it's not already playing) .setCarry scf @@ -1240,11 +1258,11 @@ CollisionCheckOnLand:: ; 0bd1 (0:0bd1) ; function that checks if the tile in front of the player is passable ; clears carry if it is, sets carry if not -CheckTilePassable:: ; 0c10 (0:0c10) +CheckTilePassable:: predef GetTileAndCoordsInFrontOfPlayer ; get tile in front of player ld a,[wTileInFrontOfPlayer] ; tile in front of player ld c,a - ld hl,W_TILESETCOLLISIONPTR ; pointer to list of passable tiles + ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles ld a,[hli] ld h,[hl] ld l,a ; hl now points to passable tiles @@ -1263,7 +1281,7 @@ CheckTilePassable:: ; 0c10 (0:0c10) ; and check for collisions that only occur between certain pairs of tiles ; Input: hl - address of directional collision data ; sets carry if there is a collision and unsets carry if not -CheckForJumpingAndTilePairCollisions:: ; 0c2a (0:0c2a) +CheckForJumpingAndTilePairCollisions:: push hl predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player push de @@ -1278,18 +1296,18 @@ CheckForJumpingAndTilePairCollisions:: ; 0c2a (0:0c2a) ret nz ; if not jumping -CheckForTilePairCollisions2:: ; 0c44 (0:0c44) +CheckForTilePairCollisions2:: aCoord 8, 9 ; tile the player is on - ld [wcf0e],a + ld [wTilePlayerStandingOn],a -CheckForTilePairCollisions:: ; 0c4a (0:0c4a) +CheckForTilePairCollisions:: ld a,[wTileInFrontOfPlayer] ld c,a .tilePairCollisionLoop - ld a,[W_CURMAPTILESET] ; tileset number + ld a,[wCurMapTileset] ; tileset number ld b,a ld a,[hli] - cp a,$ff + cp $ff jr z,.noMatch cp b jr z,.tilesetMatches @@ -1298,7 +1316,7 @@ CheckForTilePairCollisions:: ; 0c4a (0:0c4a) inc hl jr .tilePairCollisionLoop .tilesetMatches - ld a,[wcf0e] ; tile the player is on + ld a,[wTilePlayerStandingOn] ; tile the player is on ld b,a ld a,[hl] cp b @@ -1332,7 +1350,7 @@ CheckForTilePairCollisions:: ; 0c4a (0:0c4a) ; these entries indicate that the player may not cross between tile 1 and tile 2 ; it's mainly used to simulate differences in elevation -TilePairCollisionsLand:: ; 0c7e (0:0c7e) +TilePairCollisionsLand:: db CAVERN, $20, $05 db CAVERN, $41, $05 db FOREST, $30, $2E @@ -1346,19 +1364,19 @@ TilePairCollisionsLand:: ; 0c7e (0:0c7e) db FOREST, $5F, $2E db $FF -TilePairCollisionsWater:: ; 0ca0 (0:0ca0) +TilePairCollisionsWater:: db FOREST, $14, $2E db FOREST, $48, $2E db CAVERN, $14, $05 db $FF ; this builds a tile map from the tile block map based on the current X/Y coordinates of the player's character -LoadCurrentMapView:: ; 0caa (0:0caa) +LoadCurrentMapView:: ld a,[H_LOADEDROMBANK] push af - ld a,[W_TILESETBANK] ; tile data ROM bank + ld a,[wTilesetBank] ; 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] @@ -1388,8 +1406,8 @@ LoadCurrentMapView:: ; 0caa (0:0caa) jr nz,.rowInnerLoop ; update tile block map pointer to next row's address pop de - ld a,[W_CURMAPWIDTH] - add a,$06 + ld a,[wCurMapWidth] + add MAP_BORDER * 2 add e ld e,a jr nc,.noCarry @@ -1408,22 +1426,22 @@ LoadCurrentMapView:: ; 0caa (0:0caa) ld hl,wTileMapBackup ld bc,$0000 .adjustForYCoordWithinTileBlock - ld a,[W_YBLOCKCOORD] + ld a,[wYBlockCoord] and a jr z,.adjustForXCoordWithinTileBlock ld bc,$0030 add hl,bc .adjustForXCoordWithinTileBlock - ld a,[W_XBLOCKCOORD] + ld a,[wXBlockCoord] and a jr z,.copyToVisibleAreaBuffer ld bc,$0002 add hl,bc .copyToVisibleAreaBuffer - ld de,wTileMap ; base address for the tiles that are directly transfered to VRAM during V-blank - ld b,$12 + coord de, 0, 0 ; base address for the tiles that are directly transferred to VRAM during V-blank + ld b, SCREEN_HEIGHT .rowLoop2 - ld c,$14 + ld c, SCREEN_WIDTH .rowInnerLoop2 ld a,[hli] ld [de],a @@ -1440,10 +1458,10 @@ 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) +AdvancePlayerSprite:: ld a,[wSpriteStateData1 + 3] ; delta Y ld b,a ld a,[wSpriteStateData1 + 5] ; delta X @@ -1452,12 +1470,12 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) dec [hl] jr nz,.afterUpdateMapCoords ; if it's the end of the animation, update the player's map coordinates - ld a,[W_YCOORD] + ld a,[wYCoord] add b - ld [W_YCOORD],a - ld a,[W_XCOORD] + ld [wYCoord],a + ld a,[wXCoord] add c - ld [W_XCOORD],a + ld [wXCoord],a .afterUpdateMapCoords ld a,[wWalkCounter] ; walking animation counter cp a,$07 @@ -1524,7 +1542,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) and a jr z,.pointlessJump ; mistake? .pointlessJump - ld hl,W_XBLOCKCOORD + ld hl,wXBlockCoord ld a,[hl] add c ld [hl],a @@ -1550,7 +1568,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) call MoveTileBlockMapPointerWest jr .updateMapView .adjustYCoordWithinBlock - ld hl,W_YBLOCKCOORD + ld hl,wYBlockCoord ld a,[hl] add b ld [hl],a @@ -1562,7 +1580,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) ld hl,wYOffsetSinceLastSpecialWarp inc [hl] ld de,wCurrentTileBlockMapViewPointer - ld a,[W_CURMAPWIDTH] + ld a,[wCurMapWidth] call MoveTileBlockMapPointerSouth jr .updateMapView .checkForMoveToNorthBlock @@ -1574,7 +1592,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) ld hl,wYOffsetSinceLastSpecialWarp dec [hl] ld de,wCurrentTileBlockMapViewPointer - ld a,[W_CURMAPWIDTH] + ld a,[wCurMapWidth] call MoveTileBlockMapPointerNorth .updateMapView call LoadCurrentMapView @@ -1618,7 +1636,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) ; shift all the sprites in the direction opposite of the player's motion ; so that the player appears to move relative to them ld hl,wSpriteStateData1 + $14 - ld a,[W_NUMSPRITES] ; number of sprites + ld a,[wNumSprites] ; number of sprites and a ; are there any sprites? jr z,.done ld e,a @@ -1641,7 +1659,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27) ; the following four functions are used to move the pointer to the upper left ; corner of the tile block map in the direction of motion -MoveTileBlockMapPointerEast:: ; 0e65 (0:0e65) +MoveTileBlockMapPointerEast:: ld a,[de] add a,$01 ld [de],a @@ -1652,7 +1670,7 @@ MoveTileBlockMapPointerEast:: ; 0e65 (0:0e65) ld [de],a ret -MoveTileBlockMapPointerWest:: ; 0e6f (0:0e6f) +MoveTileBlockMapPointerWest:: ld a,[de] sub a,$01 ld [de],a @@ -1663,8 +1681,8 @@ MoveTileBlockMapPointerWest:: ; 0e6f (0:0e6f) ld [de],a ret -MoveTileBlockMapPointerSouth:: ; 0e79 (0:0e79) - add a,$06 +MoveTileBlockMapPointerSouth:: + add a,MAP_BORDER * 2 ld b,a ld a,[de] add b @@ -1676,8 +1694,8 @@ MoveTileBlockMapPointerSouth:: ; 0e79 (0:0e79) ld [de],a ret -MoveTileBlockMapPointerNorth:: ; 0e85 (0:0e85) - add a,$06 +MoveTileBlockMapPointerNorth:: + add a,MAP_BORDER * 2 ld b,a ld a,[de] sub b @@ -1692,20 +1710,20 @@ MoveTileBlockMapPointerNorth:: ; 0e85 (0:0e85) ; the following 6 functions are used to tell the V-blank handler to redraw ; the portion of the map that was newly exposed due to the player's movement -ScheduleNorthRowRedraw:: ; 0e91 (0:0e91) - hlCoord 0, 0 - call CopyToScreenEdgeTiles +ScheduleNorthRowRedraw:: + coord hl, 0, 0 + call CopyToRedrawRowOrColumnSrcTiles ld a,[wMapViewVRAMPointer] - ld [H_SCREENEDGEREDRAWADDR],a + ld [hRedrawRowOrColumnDest],a ld a,[wMapViewVRAMPointer + 1] - ld [H_SCREENEDGEREDRAWADDR + 1],a - ld a,REDRAWROW - ld [H_SCREENEDGEREDRAW],a + ld [hRedrawRowOrColumnDest + 1],a + ld a,REDRAW_ROW + ld [hRedrawRowOrColumnMode],a ret -CopyToScreenEdgeTiles:: ; 0ea6 (0:0ea6) - ld de,wScreenEdgeTiles - ld c,2 * 20 +CopyToRedrawRowOrColumnSrcTiles:: + ld de,wRedrawRowOrColumnSrcTiles + ld c,2 * SCREEN_WIDTH .loop ld a,[hli] ld [de],a @@ -1714,9 +1732,9 @@ CopyToScreenEdgeTiles:: ; 0ea6 (0:0ea6) jr nz,.loop ret -ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2) - hlCoord 0, 16 - call CopyToScreenEdgeTiles +ScheduleSouthRowRedraw:: + coord hl, 0, 16 + call CopyToRedrawRowOrColumnSrcTiles ld a,[wMapViewVRAMPointer] ld l,a ld a,[wMapViewVRAMPointer + 1] @@ -1724,36 +1742,36 @@ ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2) ld bc,$0200 add hl,bc ld a,h - and a,$03 - or a,$98 - ld [H_SCREENEDGEREDRAWADDR + 1],a + and $03 + or $98 + ld [hRedrawRowOrColumnDest + 1],a ld a,l - ld [H_SCREENEDGEREDRAWADDR],a - ld a,REDRAWROW - ld [H_SCREENEDGEREDRAW],a + ld [hRedrawRowOrColumnDest],a + ld a,REDRAW_ROW + ld [hRedrawRowOrColumnMode],a ret -ScheduleEastColumnRedraw:: ; 0ed3 (0:0ed3) - hlCoord 18, 0 +ScheduleEastColumnRedraw:: + coord hl, 18, 0 call ScheduleColumnRedrawHelper ld a,[wMapViewVRAMPointer] ld c,a - and a,$e0 + and $e0 ld b,a ld a,c - add a,18 - and a,$1f + add 18 + and $1f or b - ld [H_SCREENEDGEREDRAWADDR],a + ld [hRedrawRowOrColumnDest],a ld a,[wMapViewVRAMPointer + 1] - ld [H_SCREENEDGEREDRAWADDR + 1],a - ld a,REDRAWCOL - ld [H_SCREENEDGEREDRAW],a + ld [hRedrawRowOrColumnDest + 1],a + ld a,REDRAW_COL + ld [hRedrawRowOrColumnMode],a ret -ScheduleColumnRedrawHelper:: ; 0ef2 (0:0ef2) - ld de,wScreenEdgeTiles - ld c,$12 +ScheduleColumnRedrawHelper:: + ld de,wRedrawRowOrColumnSrcTiles + ld c,SCREEN_HEIGHT .loop ld a,[hli] ld [de],a @@ -1771,32 +1789,32 @@ ScheduleColumnRedrawHelper:: ; 0ef2 (0:0ef2) jr nz,.loop ret -ScheduleWestColumnRedraw:: ; 0f08 (0:0f08) - hlCoord 0, 0 +ScheduleWestColumnRedraw:: + coord hl, 0, 0 call ScheduleColumnRedrawHelper ld a,[wMapViewVRAMPointer] - ld [H_SCREENEDGEREDRAWADDR],a + ld [hRedrawRowOrColumnDest],a ld a,[wMapViewVRAMPointer + 1] - ld [H_SCREENEDGEREDRAWADDR + 1],a - ld a,REDRAWCOL - ld [H_SCREENEDGEREDRAW],a + ld [hRedrawRowOrColumnDest + 1],a + ld a,REDRAW_COL + ld [hRedrawRowOrColumnMode],a ret ; function to write the tiles that make up a tile block to memory ; Input: c = tile block ID, hl = destination address -DrawTileBlock:: ; 0f1d (0:0f1d) +DrawTileBlock:: push hl - ld a,[W_TILESETBLOCKSPTR] ; pointer to tiles + ld a,[wTilesetBlocksPtr] ; pointer to tiles ld l,a - ld a,[W_TILESETBLOCKSPTR + 1] + ld a,[wTilesetBlocksPtr + 1] ld h,a ld a,c swap a ld b,a - and a,$f0 + and $f0 ld c,a ld a,b - and a,$0f + and $0f ld b,a ; bc = tile block ID * 0x10 add hl,bc ld d,h @@ -1825,20 +1843,20 @@ DrawTileBlock:: ; 0f1d (0:0f1d) ret ; function to update joypad state and simulate button presses -JoypadOverworld:: ; 0f4d (0:0f4d) +JoypadOverworld:: xor a ld [wSpriteStateData1 + 3],a ld [wSpriteStateData1 + 5],a call RunMapScript call Joypad - ld a,[W_FLAGS_D733] + ld a,[wFlags_D733] bit 3,a ; check if a trainer wants a challenge jr nz,.notForcedDownwards - ld a,[W_CURMAP] - cp a,ROUTE_17 ; Cycling Road + ld a,[wCurMap] + cp ROUTE_17 ; Cycling Road jr nz,.notForcedDownwards ld a,[hJoyHeld] - and a,D_DOWN | D_UP | D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON + and D_DOWN | D_UP | D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON jr nz,.notForcedDownwards ld a,D_DOWN ld [hJoyHeld],a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press @@ -1870,6 +1888,7 @@ JoypadOverworld:: ; 0f4d (0:0f4d) ld [hJoyPressed],a ld [hJoyReleased],a ret + ; if done simulating button presses .doneSimulating xor a @@ -1880,7 +1899,7 @@ JoypadOverworld:: ; 0f4d (0:0f4d) ld [hJoyHeld],a ld hl,wd736 ld a,[hl] - and a,$f8 + and $f8 ld [hl],a ld hl,wd730 res 7,[hl] @@ -1895,11 +1914,11 @@ JoypadOverworld:: ; 0f4d (0:0f4d) ; so the old value of c is used. 2429 is always called before this function, ; and 2429 always sets c to 0xF0. There is no 0xF0 background tile, so it ; is considered impassable and it is detected as a collision. -CollisionCheckOnWater:: ; 0fb7 (0:0fb7) +CollisionCheckOnWater:: ld a,[wd730] bit 7,a jp nz,.noCollision ; return and clear carry if button presses are being simulated - ld a,[wd52a] ; the direction that the player is trying to go in + ld a,[wPlayerDirection] ; the direction that the player is trying to go in ld d,a ld a,[wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) and d ; check if a sprite is in the direction the player is trying to go @@ -1917,7 +1936,7 @@ CollisionCheckOnWater:: ; 0fb7 (0:0fb7) jr z,.noCollision ; keep surfing ; check if the [land] tile in front of the player is passable .checkIfNextTileIsPassable - ld hl,W_TILESETCOLLISIONPTR ; pointer to list of passable tiles + ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles ld a,[hli] ld h,[hl] ld l,a @@ -1929,10 +1948,10 @@ CollisionCheckOnWater:: ; 0fb7 (0:0fb7) jr z,.stopSurfing ; stop surfing if the tile is passable jr .loop .collision - ld a,[wc02a] - cp a,(SFX_02_5b - SFX_Headers_02) / 3 ; check if collision sound is already playing + ld a,[wChannelSoundIDs + Ch4] + cp SFX_COLLISION ; check if collision sound is already playing jr z,.setCarry - ld a,(SFX_02_5b - SFX_Headers_02) / 3 + ld a,SFX_COLLISION call PlaySound ; play collision sound (if it's not already playing) .setCarry scf @@ -1948,13 +1967,13 @@ CollisionCheckOnWater:: ; 0fb7 (0:0fb7) call PlayDefaultMusic jr .noCollision .checkIfVermilionDockTileset - ld a, [W_CURMAPTILESET] ; tileset + ld a, [wCurMapTileset] ; tileset cp SHIP_PORT ; Vermilion Dock tileset jr nz, .noCollision ; keep surfing if it's not the boarding platform tile jr .stopSurfing ; if it is the boarding platform tile, stop surfing ; function to run the current map's script -RunMapScript:: ; 101b (0:101b) +RunMapScript:: push hl push de push bc @@ -1968,9 +1987,9 @@ RunMapScript:: ; 101b (0:101b) pop de pop hl call RunNPCMovementScript - ld a,[W_CURMAP] ; current map number + ld a,[wCurMap] ; current map number call SwitchToMapRomBank ; change to the ROM bank the map's data is in - ld hl,W_MAPSCRIPTPTR + ld hl,wMapScriptPtr ld a,[hli] ld h,[hl] ld l,a @@ -1980,24 +1999,24 @@ RunMapScript:: ; 101b (0:101b) .return ret -LoadWalkingPlayerSpriteGraphics:: ; 104d (0:104d) - ld de,RedSprite ; $4180 +LoadWalkingPlayerSpriteGraphics:: + ld de,RedSprite ld hl,vNPCSprites jr LoadPlayerSpriteGraphicsCommon -LoadSurfingPlayerSpriteGraphics:: ; 1055 (0:1055) +LoadSurfingPlayerSpriteGraphics:: ld de,SeelSprite ld hl,vNPCSprites jr LoadPlayerSpriteGraphicsCommon -LoadBikePlayerSpriteGraphics:: ; 105d (0:105d) +LoadBikePlayerSpriteGraphics:: ld de,RedCyclingSprite ld hl,vNPCSprites -LoadPlayerSpriteGraphicsCommon:: ; 1063 (0:1063) +LoadPlayerSpriteGraphicsCommon:: push de push hl - ld bc,(BANK(RedSprite) << 8) + $0c + lb bc, BANK(RedSprite), $0c call CopyVideoData pop hl pop de @@ -2008,25 +2027,25 @@ LoadPlayerSpriteGraphicsCommon:: ; 1063 (0:1063) inc d .noCarry set 3,h - ld bc,$050c + lb bc, BANK(RedSprite), $0c jp CopyVideoData ; function to load data from the map header -LoadMapHeader:: ; 107c (0:107c) +LoadMapHeader:: callba MarkTownVisitedAndLoadMissableObjects - ld a,[W_CURMAPTILESET] - ld [wd119],a - ld a,[W_CURMAP] + ld a,[wCurMapTileset] + ld [wUnusedD119],a + ld a,[wCurMap] call SwitchToMapRomBank - ld a,[W_CURMAPTILESET] + ld a,[wCurMapTileset] ld b,a res 7,a - ld [W_CURMAPTILESET],a - ld [$ff8b],a + ld [wCurMapTileset],a + ld [hPreviousTileset],a bit 7,b ret nz ld hl,MapHeaderPointers - ld a,[W_CURMAP] + ld a,[wCurMap] sla a jr nc,.noCarry1 inc h @@ -2040,7 +2059,7 @@ LoadMapHeader:: ; 107c (0:107c) ld h,[hl] ld l,a ; hl = base of map header ; copy the first 10 bytes (the fixed area) of the map data to D367-D370 - ld de,W_CURMAPTILESET + ld de,wCurMapTileset ld c,$0a .copyFixedHeaderLoop ld a,[hli] @@ -2050,46 +2069,46 @@ LoadMapHeader:: ; 107c (0:107c) jr nz,.copyFixedHeaderLoop ; initialize all the connected maps to disabled at first, before loading the actual values ld a,$ff - ld [W_MAPCONN1PTR],a - ld [W_MAPCONN2PTR],a - ld [W_MAPCONN3PTR],a - ld [W_MAPCONN4PTR],a + ld [wMapConn1Ptr],a + ld [wMapConn2Ptr],a + ld [wMapConn3Ptr],a + ld [wMapConn4Ptr],a ; copy connection data (if any) to WRAM - ld a,[W_MAPCONNECTIONS] + ld a,[wMapConnections] ld b,a .checkNorth bit 3,b jr z,.checkSouth - ld de,W_MAPCONN1PTR + ld de,wMapConn1Ptr call CopyMapConnectionHeader .checkSouth bit 2,b jr z,.checkWest - ld de,W_MAPCONN2PTR + ld de,wMapConn2Ptr call CopyMapConnectionHeader .checkWest bit 1,b jr z,.checkEast - ld de,W_MAPCONN3PTR + ld de,wMapConn3Ptr call CopyMapConnectionHeader .checkEast bit 0,b jr z,.getObjectDataPointer - ld de,W_MAPCONN4PTR + ld de,wMapConn4Ptr call CopyMapConnectionHeader .getObjectDataPointer ld a,[hli] - ld [wd3a9],a + ld [wObjectDataPointerTemp],a ld a,[hli] - ld [wd3aa],a + ld [wObjectDataPointerTemp + 1],a push hl - ld a,[wd3a9] + ld a,[wObjectDataPointerTemp] ld l,a - ld a,[wd3aa] + ld a,[wObjectDataPointerTemp + 1] ld h,a ; hl = base of object data - ld de,wd3ad ; background tile ID + ld de,wMapBackgroundTile ld a,[hli] - ld [de],a ; save background tile ID + ld [de],a .loadWarpData ld a,[hli] ld [wNumberOfWarps],a @@ -2109,16 +2128,16 @@ LoadMapHeader:: ; 107c (0:107c) jr nz,.warpLoop .loadSignData ld a,[hli] ; number of signs - ld [wd4b0],a ; save the number of signs + ld [wNumSigns],a and a ; are there any signs? jr z,.loadSpriteData ; if not, skip this ld c,a - ld de,wd4d1 ; base address of sign text IDs + ld de,wSignTextIDs ld a,d - ld [$ff95],a + ld [hSignCoordPointer],a ld a,e - ld [$ff96],a - ld de,wd4b1 ; base address of sign coordinates + ld [hSignCoordPointer + 1],a + ld de,wSignCoords .signLoop ld a,[hli] ld [de],a @@ -2127,17 +2146,17 @@ LoadMapHeader:: ; 107c (0:107c) ld [de],a inc de push de - ld a,[$ff95] + ld a,[hSignCoordPointer] ld d,a - ld a,[$ff96] + ld a,[hSignCoordPointer + 1] ld e,a ld a,[hli] ld [de],a inc de ld a,d - ld [$ff95],a + ld [hSignCoordPointer],a ld a,e - ld [$ff96],a + ld [hSignCoordPointer + 1],a pop de dec c jr nz,.signLoop @@ -2146,7 +2165,7 @@ LoadMapHeader:: ; 107c (0:107c) bit 5,a ; did a battle happen immediately before this? jp nz,.finishUp ; if so, skip this because battles don't destroy this data ld a,[hli] - ld [W_NUMSPRITES],a ; save the number of sprites + ld [wNumSprites],a ; save the number of sprites push hl ; zero C110-C1FF and C210-C2FF ld hl,wSpriteStateData1 + $10 @@ -2170,7 +2189,7 @@ LoadMapHeader:: ; 107c (0:107c) jr nz,.disableSpriteEntriesLoop pop hl ld de,wSpriteStateData1 + $10 - ld a,[W_NUMSPRITES] ; number of sprites + ld a,[wNumSprites] ; number of sprites and a ; are there any sprites? jp z,.finishUp ; if there are no sprites, skip the rest ld b,a @@ -2191,24 +2210,24 @@ LoadMapHeader:: ; 107c (0:107c) ld a,[hli] ld [de],a ; store movement byte 1 at C2X6 ld a,[hli] - ld [$ff8d],a ; save movement byte 2 + ld [hLoadSpriteTemp1],a ; save movement byte 2 ld a,[hli] - ld [$ff8e],a ; save text ID and flags byte + ld [hLoadSpriteTemp2],a ; save text ID and flags byte push bc push hl ld b,$00 - ld hl,W_MAPSPRITEDATA + ld hl,wMapSpriteData add hl,bc - ld a,[$ff8d] + ld a,[hLoadSpriteTemp1] ld [hli],a ; store movement byte 2 in byte 0 of sprite entry - ld a,[$ff8e] + ld a,[hLoadSpriteTemp2] ld [hl],a ; this appears pointless, since the value is overwritten immediately after - ld a,[$ff8e] - ld [$ff8d],a + ld a,[hLoadSpriteTemp2] + ld [hLoadSpriteTemp1],a and a,$3f ld [hl],a ; store text ID in byte 1 of sprite entry pop hl - ld a,[$ff8d] + ld a,[hLoadSpriteTemp1] bit 6,a jr nz,.trainerSprite bit 7,a @@ -2216,25 +2235,25 @@ LoadMapHeader:: ; 107c (0:107c) jr .regularSprite .trainerSprite ld a,[hli] - ld [$ff8d],a ; save trainer class + ld [hLoadSpriteTemp1],a ; save trainer class ld a,[hli] - ld [$ff8e],a ; save trainer number (within class) + ld [hLoadSpriteTemp2],a ; save trainer number (within class) push hl - ld hl,W_MAPSPRITEEXTRADATA + ld hl,wMapSpriteExtraData add hl,bc - ld a,[$ff8d] + ld a,[hLoadSpriteTemp1] ld [hli],a ; store trainer class in byte 0 of the entry - ld a,[$ff8e] + ld a,[hLoadSpriteTemp2] ld [hl],a ; store trainer number in byte 1 of the entry pop hl jr .nextSprite .itemBallSprite ld a,[hli] - ld [$ff8d],a ; save item number + ld [hLoadSpriteTemp1],a ; save item number push hl - ld hl,W_MAPSPRITEEXTRADATA + ld hl,wMapSpriteExtraData add hl,bc - ld a,[$ff8d] + ld a,[hLoadSpriteTemp1] ld [hli],a ; store item number in byte 0 of the entry xor a ld [hl],a ; zero byte 1, since it is not used @@ -2242,7 +2261,7 @@ LoadMapHeader:: ; 107c (0:107c) jr .nextSprite .regularSprite push hl - ld hl,W_MAPSPRITEEXTRADATA + ld hl,wMapSpriteExtraData add hl,bc ; zero both bytes, since regular sprites don't use this extra space xor a @@ -2263,35 +2282,35 @@ LoadMapHeader:: ; 107c (0:107c) predef LoadTilesetHeader callab LoadWildData pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose) - ld a,[W_CURMAPHEIGHT] ; map height in 4x4 tile blocks + ld a,[wCurMapHeight] ; map height in 4x4 tile blocks add a ; double it - ld [wd524],a ; store map height in 2x2 tile blocks - ld a,[W_CURMAPWIDTH] ; map width in 4x4 tile blocks + ld [wCurrentMapHeight2],a ; store map height in 2x2 tile blocks + ld a,[wCurMapWidth] ; map width in 4x4 tile blocks add a ; double it - ld [wd525],a ; map width in 2x2 tile blocks - ld a,[W_CURMAP] + ld [wCurrentMapWidth2],a ; map width in 2x2 tile blocks + ld a,[wCurMap] ld c,a ld b,$00 ld a,[H_LOADEDROMBANK] 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 ld a,[hli] - ld [wd35b],a ; music 1 + ld [wMapMusicSoundID],a ; music 1 ld a,[hl] - ld [wd35c],a ; music 2 + ld [wMapMusicROMBank],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 ; Input: hl = source, de = destination -CopyMapConnectionHeader:: ; 1238 (0:1238) +CopyMapConnectionHeader:: ld c,$0b .loop ld a,[hli] @@ -2302,7 +2321,7 @@ CopyMapConnectionHeader:: ; 1238 (0:1238) ret ; function to load map data -LoadMapData:: ; 1241 (0:1241) +LoadMapData:: ld a,[H_LOADEDROMBANK] push af call DisableLCD @@ -2313,9 +2332,9 @@ LoadMapData:: ; 1241 (0:1241) ld [hSCY],a ld [hSCX],a ld [wWalkCounter],a - ld [wd119],a + ld [wUnusedD119],a ld [wWalkBikeSurfStateCopy],a - ld [W_SPRITESETID],a + ld [wSpriteSetID],a call LoadTextBoxTilePatterns call LoadMapHeader callba InitMapSprites ; load tile pattern data for sprites @@ -2323,7 +2342,7 @@ LoadMapData:: ; 1241 (0:1241) call LoadTilesetTilePatternData call LoadCurrentMapView ; copy current map view to VRAM - ld hl,wTileMap + coord hl, 0, 0 ld de,vBGMap0 ld b,18 .vramCopyLoop @@ -2345,26 +2364,26 @@ LoadMapData:: ; 1241 (0:1241) ld a,$01 ld [wUpdateSpritesEnabled],a call EnableLCD - ld b,$09 - call GoPAL_SET + ld b, SET_PAL_OVERWORLD + call RunPaletteCommand call LoadPlayerSpriteGraphics ld a,[wd732] and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp jr nz,.restoreRomBank - ld a,[W_FLAGS_D733] + ld a,[wFlags_D733] bit 1,a jr nz,.restoreRomBank - call Func_235f ; music related - call Func_2312 ; music related + call UpdateMusic6Times + call PlayDefaultMusicFadeOutCurrent .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 ; Input: a = map number -SwitchToMapRomBank:: ; 12bc (0:12bc) +SwitchToMapRomBank:: push hl push bc ld c,a @@ -2378,26 +2397,26 @@ 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 -IgnoreInputForHalfSecond: ; 12da (0:12da) +IgnoreInputForHalfSecond: ld a, 30 ld [wIgnoreInputCounter], a ld hl, wd730 ld a, [hl] - or $26 + or %00100110 ld [hl], a ; set ignore input bit ret -ResetUsingStrengthOutOfBattleBit: ; 12e7 (0:12e7) +ResetUsingStrengthOutOfBattleBit: ld hl, wd728 res 0, [hl] ret -ForceBikeOrSurf:: ; 12ed (0:12ed) +ForceBikeOrSurf:: ld b, BANK(RedSprite) ld hl, LoadPlayerSpriteGraphics call Bankswitch diff --git a/home/pic.asm b/home/pic.asm index 6aa2e5c0..a1c18e8a 100644 --- a/home/pic.asm +++ b/home/pic.asm @@ -1,69 +1,69 @@ ; bankswitches and runs _UncompressSpriteData -; bank is given in a, sprite input stream is pointed to in W_SPRITEINPUTPTR -UncompressSpriteData:: ; 24fd (0:24fd) +; bank is given in a, sprite input stream is pointed to in wSpriteInputPtr +UncompressSpriteData:: ld b, a ld a, [H_LOADEDROMBANK] push af ld a, b ld [H_LOADEDROMBANK], a - ld [$2000], a - ld a, $a - ld [$0], a + ld [MBC1RomBank], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a xor a - ld [$4000], a + ld [MBC1SRamBank], a 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 -_UncompressSpriteData:: ; 251a (0:251a) - ld hl, S_SPRITEBUFFER1 +_UncompressSpriteData:: + ld hl, sSpriteBuffer1 ld c, (2*SPRITEBUFFERSIZE) % $100 ld b, (2*SPRITEBUFFERSIZE) / $100 xor a call FillMemory ; clear sprite buffer 1 and 2 ld a, $1 - ld [W_SPRITEINPUTBITCOUNTER], a + ld [wSpriteInputBitCounter], a ld a, $3 - ld [W_SPRITEOUTPUTBITOFFSET], a + ld [wSpriteOutputBitOffset], a xor a - ld [W_SPRITECURPOSX], a - ld [W_SPRITECURPOSY], a - ld [W_SPRITELOADFLAGS], a ; wd0a8 + ld [wSpriteCurPosX], a + ld [wSpriteCurPosY], a + ld [wSpriteLoadFlags], a call ReadNextInputByte ; first byte of input determines sprite width (high nybble) and height (low nybble) in tiles (8x8 pixels) ld b, a and $f add a add a add a - ld [W_SPRITEHEIGHT], a + ld [wSpriteHeight], a ld a, b swap a and $f add a add a add a - ld [W_SPRITEWITDH], a + ld [wSpriteWidth], a call ReadNextInputBit - ld [W_SPRITELOADFLAGS], a ; initialite bit1 to 0 and bit0 to the first input bit - ; this will load two chunks of data to S_SPRITEBUFFER1 and S_SPRITEBUFFER2 - ; bit 0 decides in which one the first chunk is placed + ld [wSpriteLoadFlags], a ; initialite bit1 to 0 and bit0 to the first input bit + ; this will load two chunks of data to sSpriteBuffer1 and sSpriteBuffer2 + ; bit 0 decides in which one the first chunk is placed ; fall through -; uncompresses a chunk from the sprite input data stream (pointed to at wd0da) into S_SPRITEBUFFER1 or S_SPRITEBUFFER2 +; uncompresses a chunk from the sprite input data stream (pointed to at wd0da) into sSpriteBuffer1 or sSpriteBuffer2 ; each chunk is a 1bpp sprite. A 2bpp sprite consist of two chunks which are merged afterwards ; note that this is an endless loop which is terminated during a call to MoveToNextBufferPosition by manipulating the stack -UncompressSpriteDataLoop:: ; 2556 (0:2556) - ld hl, S_SPRITEBUFFER1 - ld a, [W_SPRITELOADFLAGS] ; wd0a8 +UncompressSpriteDataLoop:: + ld hl, sSpriteBuffer1 + ld a, [wSpriteLoadFlags] bit 0, a jr z, .useSpriteBuffer1 ; check which buffer to use - ld hl, S_SPRITEBUFFER2 + ld hl, sSpriteBuffer2 .useSpriteBuffer1 call StoreSpriteOutputPointer - ld a, [W_SPRITELOADFLAGS] ; wd0a8 + ld a, [wSpriteLoadFlags] bit 1, a jr z, .startDecompression ; check if last iteration call ReadNextInputBit ; if last chunk, read 1-2 bit unpacking mode @@ -72,7 +72,7 @@ UncompressSpriteDataLoop:: ; 2556 (0:2556) call ReadNextInputBit ; 1 0 -> mode 1 inc a ; 1 1 -> mode 2 .unpackingMode0 - ld [W_SPRITEUNPACKMODE], a + ld [wSpriteUnpackMode], a .startDecompression call ReadNextInputBit and a @@ -145,70 +145,70 @@ UncompressSpriteDataLoop:: ; 2556 (0:2556) ; moves output pointer to next position ; also cancels the calling function if the all output is done (by removing the return pointer from stack) ; and calls postprocessing functions according to the unpack mode -MoveToNextBufferPosition:: ; 25d8 (0:25d8) - ld a, [W_SPRITEHEIGHT] +MoveToNextBufferPosition:: + ld a, [wSpriteHeight] ld b, a - ld a, [W_SPRITECURPOSY] + ld a, [wSpriteCurPosY] inc a cp b jr z, .curColumnDone - ld [W_SPRITECURPOSY], a - ld a, [W_SPRITEOUTPUTPTR] + ld [wSpriteCurPosY], a + ld a, [wSpriteOutputPtr] inc a - ld [W_SPRITEOUTPUTPTR], a + ld [wSpriteOutputPtr], a ret nz - ld a, [W_SPRITEOUTPUTPTR+1] + ld a, [wSpriteOutputPtr+1] inc a - ld [W_SPRITEOUTPUTPTR+1], a + ld [wSpriteOutputPtr+1], a ret .curColumnDone xor a - ld [W_SPRITECURPOSY], a - ld a, [W_SPRITEOUTPUTBITOFFSET] + ld [wSpriteCurPosY], a + ld a, [wSpriteOutputBitOffset] and a jr z, .bitOffsetsDone dec a - ld [W_SPRITEOUTPUTBITOFFSET], a - ld hl, W_SPRITEOUTPUTPTRCACHED + ld [wSpriteOutputBitOffset], a + ld hl, wSpriteOutputPtrCached ld a, [hli] - ld [W_SPRITEOUTPUTPTR], a + ld [wSpriteOutputPtr], a ld a, [hl] - ld [W_SPRITEOUTPUTPTR+1], a + ld [wSpriteOutputPtr+1], a ret .bitOffsetsDone ld a, $3 - ld [W_SPRITEOUTPUTBITOFFSET], a - ld a, [W_SPRITECURPOSX] + ld [wSpriteOutputBitOffset], a + ld a, [wSpriteCurPosX] add $8 - ld [W_SPRITECURPOSX], a + ld [wSpriteCurPosX], a ld b, a - ld a, [W_SPRITEWITDH] + ld a, [wSpriteWidth] cp b jr z, .allColumnsDone - ld a, [W_SPRITEOUTPUTPTR] + ld a, [wSpriteOutputPtr] ld l, a - ld a, [W_SPRITEOUTPUTPTR+1] + ld a, [wSpriteOutputPtr+1] ld h, a inc hl jp StoreSpriteOutputPointer .allColumnsDone pop hl xor a - ld [W_SPRITECURPOSX], a - ld a, [W_SPRITELOADFLAGS] ; wd0a8 + ld [wSpriteCurPosX], a + ld a, [wSpriteLoadFlags] bit 1, a jr nz, .done ; test if there is one more sprite to go xor $1 set 1, a - ld [W_SPRITELOADFLAGS], a ; wd0a8 + ld [wSpriteLoadFlags], a jp UncompressSpriteDataLoop .done jp UnpackSprite -; writes 2 bits (from a) to the output buffer (pointed to from W_SPRITEOUTPUTPTR) -WriteSpriteBitsToBuffer:: ; 2649 (0:2649) +; writes 2 bits (from a) to the output buffer (pointed to from wSpriteOutputPtr) +WriteSpriteBitsToBuffer:: ld e, a - ld a, [W_SPRITEOUTPUTBITOFFSET] + ld a, [wSpriteOutputBitOffset] and a jr z, .offset0 cp $2 @@ -224,9 +224,9 @@ WriteSpriteBitsToBuffer:: ; 2649 (0:2649) .offset2 swap e .offset0 - ld a, [W_SPRITEOUTPUTPTR] + ld a, [wSpriteOutputPtr] ld l, a - ld a, [W_SPRITEOUTPUTPTR+1] + ld a, [wSpriteOutputPtr+1] ld h, a ld a, [hl] or e @@ -234,38 +234,38 @@ WriteSpriteBitsToBuffer:: ; 2649 (0:2649) ret ; reads next bit from input stream and returns it in a -ReadNextInputBit:: ; 2670 (0:2670) - ld a, [W_SPRITEINPUTBITCOUNTER] +ReadNextInputBit:: + ld a, [wSpriteInputBitCounter] dec a jr nz, .curByteHasMoreBitsToRead call ReadNextInputByte - ld [W_SPRITEINPUTCURBYTE], a + ld [wSpriteInputCurByte], a ld a, $8 .curByteHasMoreBitsToRead - ld [W_SPRITEINPUTBITCOUNTER], a - ld a, [W_SPRITEINPUTCURBYTE] + ld [wSpriteInputBitCounter], a + ld a, [wSpriteInputCurByte] rlca - ld [W_SPRITEINPUTCURBYTE], a + ld [wSpriteInputCurByte], a and $1 ret ; reads next byte from input stream and returns it in a -ReadNextInputByte:: ; 268b (0:268b) - ld a, [W_SPRITEINPUTPTR] +ReadNextInputByte:: + ld a, [wSpriteInputPtr] ld l, a - ld a, [W_SPRITEINPUTPTR+1] + ld a, [wSpriteInputPtr+1] ld h, a ld a, [hli] ld b, a ld a, l - ld [W_SPRITEINPUTPTR], a + ld [wSpriteInputPtr], a ld a, h - ld [W_SPRITEINPUTPTR+1], a + ld [wSpriteInputPtr+1], a ld a, b ret ; the nth item is 2^n - 1 -LengthEncodingOffsetList:: ; 269f (0:269f) +LengthEncodingOffsetList:: dw %0000000000000001 dw %0000000000000011 dw %0000000000000111 @@ -284,25 +284,25 @@ LengthEncodingOffsetList:: ; 269f (0:269f) dw %1111111111111111 ; unpacks the sprite data depending on the unpack mode -UnpackSprite:: ; 26bf (0:26bf) - ld a, [W_SPRITEUNPACKMODE] +UnpackSprite:: + ld a, [wSpriteUnpackMode] cp $2 jp z, UnpackSpriteMode2 and a jp nz, XorSpriteChunks - ld hl, S_SPRITEBUFFER1 + ld hl, sSpriteBuffer1 call SpriteDifferentialDecode - ld hl, S_SPRITEBUFFER2 + ld hl, sSpriteBuffer2 ; fall through ; decodes differential encoded sprite data ; input bit value 0 preserves the current bit value and input bit value 1 toggles it (starting from initial value 0). -SpriteDifferentialDecode:: ; 26d4 (0:26d4) +SpriteDifferentialDecode:: xor a - ld [W_SPRITECURPOSX], a - ld [W_SPRITECURPOSY], a + ld [wSpriteCurPosX], a + ld [wSpriteCurPosY], a call StoreSpriteOutputPointer - ld a, [W_SPRITEFLIPPED] + ld a, [wSpriteFlipped] and a jr z, .notFlipped ld hl, DecodeNybble0TableFlipped @@ -313,18 +313,18 @@ SpriteDifferentialDecode:: ; 26d4 (0:26d4) ld de, DecodeNybble1Table .storeDecodeTablesPointers ld a, l - ld [W_SPRITEDECODETABLE0PTR], a + ld [wSpriteDecodeTable0Ptr], a ld a, h - ld [W_SPRITEDECODETABLE0PTR+1], a + ld [wSpriteDecodeTable0Ptr+1], a ld a, e - ld [W_SPRITEDECODETABLE1PTR], a + ld [wSpriteDecodeTable1Ptr], a ld a, d - ld [W_SPRITEDECODETABLE1PTR+1], a + ld [wSpriteDecodeTable1Ptr+1], a ld e, $0 ; last decoded nybble, initialized to 0 .decodeNextByteLoop - ld a, [W_SPRITEOUTPUTPTR] + ld a, [wSpriteOutputPtr] ld l, a - ld a, [W_SPRITEOUTPUTPTR+1] + ld a, [wSpriteOutputPtr+1] ld h, a ld a, [hl] ld b, a @@ -338,58 +338,58 @@ SpriteDifferentialDecode:: ; 26d4 (0:26d4) call DifferentialDecodeNybble ; decode low nybble or d ld b, a - ld a, [W_SPRITEOUTPUTPTR] + ld a, [wSpriteOutputPtr] ld l, a - ld a, [W_SPRITEOUTPUTPTR+1] + ld a, [wSpriteOutputPtr+1] ld h, a ld a, b ld [hl], a ; write back decoded data - ld a, [W_SPRITEHEIGHT] + ld a, [wSpriteHeight] add l ; move on to next column jr nc, .noCarry inc h .noCarry - ld [W_SPRITEOUTPUTPTR], a + ld [wSpriteOutputPtr], a ld a, h - ld [W_SPRITEOUTPUTPTR+1], a - ld a, [W_SPRITECURPOSX] + ld [wSpriteOutputPtr+1], a + ld a, [wSpriteCurPosX] add $8 - ld [W_SPRITECURPOSX], a + ld [wSpriteCurPosX], a ld b, a - ld a, [W_SPRITEWITDH] + ld a, [wSpriteWidth] cp b jr nz, .decodeNextByteLoop ; test if current row is done xor a ld e, a - ld [W_SPRITECURPOSX], a - ld a, [W_SPRITECURPOSY] ; move on to next row + ld [wSpriteCurPosX], a + ld a, [wSpriteCurPosY] ; move on to next row inc a - ld [W_SPRITECURPOSY], a + ld [wSpriteCurPosY], a ld b, a - ld a, [W_SPRITEHEIGHT] + ld a, [wSpriteHeight] cp b jr z, .done ; test if all rows finished - ld a, [W_SPRITEOUTPUTPTRCACHED] + ld a, [wSpriteOutputPtrCached] ld l, a - ld a, [W_SPRITEOUTPUTPTRCACHED+1] + ld a, [wSpriteOutputPtrCached+1] ld h, a inc hl call StoreSpriteOutputPointer jr .decodeNextByteLoop .done xor a - ld [W_SPRITECURPOSY], a + ld [wSpriteCurPosY], a ret ; decodes the nybble stored in a. Last decoded data is assumed to be in e (needed to determine if initial value is 0 or 1) -DifferentialDecodeNybble:: ; 276d (0:276d) +DifferentialDecodeNybble:: srl a ; c=a%2, a/=2 ld c, $0 jr nc, .evenNumber ld c, $1 .evenNumber ld l, a - ld a, [W_SPRITEFLIPPED] + ld a, [wSpriteFlipped] and a jr z, .notFlipped ; determine if initial value is 0 or one bit 3, e ; if flipped, consider MSB of last data @@ -399,14 +399,14 @@ DifferentialDecodeNybble:: ; 276d (0:276d) .selectLookupTable ld e, l jr nz, .initialValue1 ; load the appropriate table - ld a, [W_SPRITEDECODETABLE0PTR] + ld a, [wSpriteDecodeTable0Ptr] ld l, a - ld a, [W_SPRITEDECODETABLE0PTR+1] + ld a, [wSpriteDecodeTable0Ptr+1] jr .tableLookup .initialValue1 - ld a, [W_SPRITEDECODETABLE1PTR] + ld a, [wSpriteDecodeTable1Ptr] ld l, a - ld a, [W_SPRITEDECODETABLE1PTR+1] + ld a, [wSpriteDecodeTable1Ptr+1] .tableLookup ld h, a ld a, e @@ -424,7 +424,7 @@ DifferentialDecodeNybble:: ; 276d (0:276d) ld e, a ; update last decoded data ret -DecodeNybble0Table:: ; 27a7 (0:27a7) +DecodeNybble0Table:: dn $0, $1 dn $3, $2 dn $7, $6 @@ -433,7 +433,7 @@ DecodeNybble0Table:: ; 27a7 (0:27a7) dn $c, $d dn $8, $9 dn $b, $a -DecodeNybble1Table:: ; 27af (0:27af) +DecodeNybble1Table:: dn $f, $e dn $c, $d dn $8, $9 @@ -442,7 +442,7 @@ DecodeNybble1Table:: ; 27af (0:27af) dn $3, $2 dn $7, $6 dn $4, $5 -DecodeNybble0TableFlipped:: ; 27b7 (0:27b7) +DecodeNybble0TableFlipped:: dn $0, $8 dn $c, $4 dn $e, $6 @@ -451,7 +451,7 @@ DecodeNybble0TableFlipped:: ; 27b7 (0:27b7) dn $3, $b dn $1, $9 dn $d, $5 -DecodeNybble1TableFlipped:: ; 27bf (0:27bf) +DecodeNybble1TableFlipped:: dn $f, $7 dn $3, $b dn $1, $9 @@ -462,27 +462,27 @@ DecodeNybble1TableFlipped:: ; 27bf (0:27bf) dn $2, $a ; combines the two loaded chunks with xor (the chunk loaded second is the destination). The source chunk is differeintial decoded beforehand. -XorSpriteChunks:: ; 27c7 (0:27c7) +XorSpriteChunks:: xor a - ld [W_SPRITECURPOSX], a - ld [W_SPRITECURPOSY], a + ld [wSpriteCurPosX], a + ld [wSpriteCurPosY], a call ResetSpriteBufferPointers - ld a, [W_SPRITEOUTPUTPTR] ; points to buffer 1 or 2, depending on flags + ld a, [wSpriteOutputPtr] ; points to buffer 1 or 2, depending on flags ld l, a - ld a, [W_SPRITEOUTPUTPTR+1] + ld a, [wSpriteOutputPtr+1] ld h, a call SpriteDifferentialDecode ; decode buffer 1 or 2, depending on flags call ResetSpriteBufferPointers - ld a, [W_SPRITEOUTPUTPTR] ; source buffer, points to buffer 1 or 2, depending on flags + ld a, [wSpriteOutputPtr] ; source buffer, points to buffer 1 or 2, depending on flags ld l, a - ld a, [W_SPRITEOUTPUTPTR+1] + ld a, [wSpriteOutputPtr+1] ld h, a - ld a, [W_SPRITEOUTPUTPTRCACHED] ; destination buffer, points to buffer 2 or 1, depending on flags + ld a, [wSpriteOutputPtrCached] ; destination buffer, points to buffer 2 or 1, depending on flags ld e, a - ld a, [W_SPRITEOUTPUTPTRCACHED+1] + ld a, [wSpriteOutputPtrCached+1] ld d, a .xorChunksLoop - ld a, [W_SPRITEFLIPPED] + ld a, [wSpriteFlipped] and a jr z, .notFlipped push de @@ -506,86 +506,86 @@ XorSpriteChunks:: ; 27c7 (0:27c7) xor b ld [de], a inc de - ld a, [W_SPRITECURPOSY] + ld a, [wSpriteCurPosY] inc a - ld [W_SPRITECURPOSY], a ; go to next row + ld [wSpriteCurPosY], a ; go to next row ld b, a - ld a, [W_SPRITEHEIGHT] + ld a, [wSpriteHeight] cp b jr nz, .xorChunksLoop ; test if column finished xor a - ld [W_SPRITECURPOSY], a - ld a, [W_SPRITECURPOSX] + ld [wSpriteCurPosY], a + ld a, [wSpriteCurPosX] add $8 - ld [W_SPRITECURPOSX], a ; go to next column + ld [wSpriteCurPosX], a ; go to next column ld b, a - ld a, [W_SPRITEWITDH] + ld a, [wSpriteWidth] cp b jr nz, .xorChunksLoop ; test if all columns finished xor a - ld [W_SPRITECURPOSX], a + ld [wSpriteCurPosX], a ret ; reverses the bits in the nybble given in register a -ReverseNybble:: ; 2837 (0:2837) +ReverseNybble:: ld de, NybbleReverseTable add e ld e, a - jr nc, .asm_283f + jr nc, .noCarry inc d -.asm_283f +.noCarry ld a, [de] ret -; resets sprite buffer pointers to buffer 1 and 2, depending on W_SPRITELOADFLAGS -ResetSpriteBufferPointers:: ; 2841 (0:2841) - ld a, [W_SPRITELOADFLAGS] ; wd0a8 +; resets sprite buffer pointers to buffer 1 and 2, depending on wSpriteLoadFlags +ResetSpriteBufferPointers:: + ld a, [wSpriteLoadFlags] bit 0, a jr nz, .buffer2Selected - ld de, S_SPRITEBUFFER1 - ld hl, S_SPRITEBUFFER2 + ld de, sSpriteBuffer1 + ld hl, sSpriteBuffer2 jr .storeBufferPointers .buffer2Selected - ld de, S_SPRITEBUFFER2 - ld hl, S_SPRITEBUFFER1 + ld de, sSpriteBuffer2 + ld hl, sSpriteBuffer1 .storeBufferPointers ld a, l - ld [W_SPRITEOUTPUTPTR], a + ld [wSpriteOutputPtr], a ld a, h - ld [W_SPRITEOUTPUTPTR+1], a + ld [wSpriteOutputPtr+1], a ld a, e - ld [W_SPRITEOUTPUTPTRCACHED], a + ld [wSpriteOutputPtrCached], a ld a, d - ld [W_SPRITEOUTPUTPTRCACHED+1], a + ld [wSpriteOutputPtrCached+1], a ret ; maps each nybble to its reverse -NybbleReverseTable:: ; 2867 (0:2867) +NybbleReverseTable:: db $0, $8, $4, $c, $2, $a, $6 ,$e, $1, $9, $5, $d, $3, $b, $7 ,$f ; combines the two loaded chunks with xor (the chunk loaded second is the destination). Both chunks are differeintial decoded beforehand. -UnpackSpriteMode2:: ; 2877 (0:2877) +UnpackSpriteMode2:: call ResetSpriteBufferPointers - ld a, [W_SPRITEFLIPPED] + ld a, [wSpriteFlipped] push af xor a - ld [W_SPRITEFLIPPED], a ; temporarily clear flipped flag for decoding the destination chunk - ld a, [W_SPRITEOUTPUTPTRCACHED] + ld [wSpriteFlipped], a ; temporarily clear flipped flag for decoding the destination chunk + ld a, [wSpriteOutputPtrCached] ld l, a - ld a, [W_SPRITEOUTPUTPTRCACHED+1] + ld a, [wSpriteOutputPtrCached+1] ld h, a call SpriteDifferentialDecode call ResetSpriteBufferPointers pop af - ld [W_SPRITEFLIPPED], a + ld [wSpriteFlipped], a jp XorSpriteChunks ; stores hl into the output pointers -StoreSpriteOutputPointer:: ; 2897 (0:2897) +StoreSpriteOutputPointer:: ld a, l - ld [W_SPRITEOUTPUTPTR], a - ld [W_SPRITEOUTPUTPTRCACHED], a + ld [wSpriteOutputPtr], a + ld [wSpriteOutputPtrCached], a ld a, h - ld [W_SPRITEOUTPUTPTR+1], a - ld [W_SPRITEOUTPUTPTRCACHED+1], a + ld [wSpriteOutputPtr+1], a + ld [wSpriteOutputPtrCached+1], a ret 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..6c412239 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:: + 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:: + 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:: + xor a + ld [hSerialReceivedNewData], a + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr nz, .loop + ld a, START_TRANSFER_INTERNAL_CLOCK + ld [rSC], a +.loop + ld a, [hSerialReceivedNewData] + and a + jr nz, .ok + ld a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr nz, .doNotIncrementUnknownCounter + call IsUnknownCounterZero + jr z, .doNotIncrementUnknownCounter + call WaitLoop_15Iterations + push hl + ld hl, wUnknownSerialCounter + 1 + inc [hl] + jr nz, .noCarry + dec hl + inc [hl] +.noCarry + pop hl + call IsUnknownCounterZero + jr nz, .loop + jp SetUnknownCounterToFFFF +.doNotIncrementUnknownCounter + ld a, [rIE] + and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + cp (1 << SERIAL) + jr nz, .loop + ld a, [wUnknownSerialCounter2] + dec a + ld [wUnknownSerialCounter2], a + jr nz, .loop + ld a, [wUnknownSerialCounter2 + 1] + dec a + ld [wUnknownSerialCounter2 + 1], a + jr nz, .loop + ld a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .ok + ld a, 255 +.waitLoop + dec a + jr nz, .waitLoop +.ok + xor a + ld [hSerialReceivedNewData], a + ld a, [rIE] + and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + sub (1 << SERIAL) + jr nz, .skipReloadingUnknownCounter2 + ld [wUnknownSerialCounter2], a + ld a, $50 + ld [wUnknownSerialCounter2 + 1], a +.skipReloadingUnknownCounter2 + ld a, [hSerialReceiveData] + cp SERIAL_NO_DATA_BYTE + ret nz + call IsUnknownCounterZero + jr z, .done + push hl + ld hl, wUnknownSerialCounter + 1 + ld a, [hl] + dec a + ld [hld], a + inc a + jr nz, .noBorrow + dec [hl] +.noBorrow + pop hl + call IsUnknownCounterZero + jr z, SetUnknownCounterToFFFF +.done + 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:: + ld a, 15 +.waitLoop + dec a + jr nz, .waitLoop + ret + +IsUnknownCounterZero:: + push hl + ld hl, wUnknownSerialCounter + ld a, [hli] + or [hl] + pop hl + ret + +; a is always 0 when this is called +SetUnknownCounterToFFFF:: + 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:: + 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:: + call SaveScreenTilesToBuffer1 + callab PrintWaitingText + call Serial_SyncAndExchangeNybble + jp LoadScreenTilesFromBuffer1 + +Serial_SyncAndExchangeNybble:: + 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:: + 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:: + 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:: + 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..b983f609 100644 --- a/home/text.asm +++ b/home/text.asm @@ -1,5 +1,5 @@ TextBoxBorder:: -; Draw a cxb text box at hl. +; Draw a c×b text box at hl. ; top row push hl @@ -11,7 +11,7 @@ TextBoxBorder:: ld [hl], a pop hl - ld de, 20 + ld de, SCREEN_WIDTH add hl, de ; middle rows @@ -24,7 +24,7 @@ TextBoxBorder:: ld [hl], "│" pop hl - ld de, 20 + ld de, SCREEN_WIDTH add hl, de dec b jr nz, .next @@ -46,88 +46,78 @@ NPlaceChar:: jr nz, .loop ret -PlaceString:: ; 1955 (0:1955) +PlaceString:: push hl -PlaceNextChar:: ; 1956 (0:1956) +PlaceNextChar:: ld a,[de] cp "@" - jr nz,.PlaceText + jr nz, Char4ETest ld b,h ld c,l pop hl ret -.PlaceText - cp $4E - jr nz,.next - ld bc,$0028 +Char4ETest:: + cp $4E ; next + jr nz, .char4FTest + ld bc, 2 * SCREEN_WIDTH ld a,[hFlags_0xFFF6] bit 2,a - jr z,.next2 - ld bc,$14 -.next2 + jr z,.ok + ld bc,SCREEN_WIDTH +.ok pop hl add hl,bc push hl - jp Next19E8 + jp PlaceNextChar_inc -.next - cp $4F +.char4FTest + cp $4F ; line jr nz,.next3 pop hl - hlCoord 1, 16 + coord hl, 1, 16 push hl - jp Next19E8 + jp PlaceNextChar_inc .next3 ; Check against a dictionary +dict: macro +if \1 == 0 and a - jp z,Char00 - cp $4C - jp z,Char4C - cp $4B - jp z,Char4B - cp $51 - jp z,Char51 - cp $49 - jp z,Char49 - cp $52 - jp z,Char52 - cp $53 - jp z,Char53 - cp $54 - jp z,Char54 - cp $5B - jp z,Char5B - cp $5E - jp z,Char5E - cp $5C - jp z,Char5C - cp $5D - jp z,Char5D - cp $55 - jp z,Char55 - cp $56 - jp z,Char56 - cp $57 - jp z,Char57 - cp $58 - jp z,Char58 - cp $4A - jp z,Char4A - cp $5F - jp z,Char5F - cp $59 - jp z,Char59 - cp $5A - jp z,Char5A +else + cp \1 +endc + jp z, \2 +endm + + dict $00, Char00 ; error + dict $4C, Char4C ; autocont + dict $4B, Char4B ; cont_ + dict $51, Char51 ; para + dict $49, Char49 ; page + dict $52, Char52 ; player + dict $53, Char53 ; rival + dict $54, Char54 ; POKé + dict $5B, Char5B ; PC + dict $5E, Char5E ; ROCKET + dict $5C, Char5C ; TM + dict $5D, Char5D ; TRAINER + dict $55, Char55 ; cont + dict $56, Char56 ; 6 dots + dict $57, Char57 ; done + dict $58, Char58 ; prompt + dict $4A, Char4A ; PKMN + dict $5F, Char5F ; dex + dict $59, Char59 ; TARGET + dict $5A, Char5A ; USER + ld [hli],a call PrintLetterDelay -Next19E8:: ; 19e8 (0:19e8) +PlaceNextChar_inc:: inc de jp PlaceNextChar -Char00:: ; 19ec (0:19ec) +Char00:: ld b,h ld c,l pop hl @@ -135,56 +125,56 @@ Char00:: ; 19ec (0:19ec) dec de ret -Char00Text:: ; 0x19f4 “%d ERROR.” +Char00Text:: ; “%d ERROR.” TX_FAR _Char00Text db "@" -Char52:: ; 0x19f9 player’s name +Char52:: ; player’s name push de ld de,wPlayerName jr FinishDTE -Char53:: ; 19ff (0:19ff) ; rival’s name +Char53:: ; rival’s name push de - ld de,W_RIVALNAME + ld de,wRivalName jr FinishDTE -Char5D:: ; 1a05 (0:1a05) ; TRAINER +Char5D:: ; TRAINER push de ld de,Char5DText jr FinishDTE -Char5C:: ; 1a0b (0:1a0b) ; TM +Char5C:: ; TM push de ld de,Char5CText jr FinishDTE -Char5B:: ; 1a11 (0:1a11) ; PC +Char5B:: ; PC push de ld de,Char5BText jr FinishDTE -Char5E:: ; 1a17 (0:1a17) ; ROCKET +Char5E:: ; ROCKET push de ld de,Char5EText jr FinishDTE -Char54:: ; 1a1d (0:1a1d) ; POKé +Char54:: ; POKé push de ld de,Char54Text jr FinishDTE -Char56:: ; 1a23 (0:1a23) ; …… +Char56:: ; …… push de ld de,Char56Text jr FinishDTE -Char4A:: ; 1a29 (0:1a29) ; PKMN +Char4A:: ; PKMN push de ld de,Char4AText jr FinishDTE -Char59:: ; 1a2f (0:1a2f) +Char59:: ; depending on whose turn it is, print ; enemy active monster’s name, prefixed with “Enemy ” ; or @@ -194,29 +184,28 @@ Char59:: ; 1a2f (0:1a2f) xor 1 jr MonsterNameCharsCommon -Char5A:: ; 1a35 (0:1a35) +Char5A:: ; depending on whose turn it is, print ; player active monster’s name ; or ; enemy active monster’s name, prefixed with “Enemy ” ld a,[H_WHOSETURN] -MonsterNameCharsCommon:: ; 1a37 (0:1a37) +MonsterNameCharsCommon:: push de and a jr nz,.Enemy ld de,wBattleMonNick ; player active monster name jr FinishDTE -.Enemy ; 1A40 +.Enemy ; print “Enemy ” ld de,Char5AText call PlaceString - ld h,b ld l,c ld de,wEnemyMonNick ; enemy active monster name -FinishDTE:: ; 1a4b (0:1a4b) +FinishDTE:: call PlaceString ld h,b ld l,c @@ -224,24 +213,24 @@ FinishDTE:: ; 1a4b (0:1a4b) inc de jp PlaceNextChar -Char5CText:: ; 1a55 (0:1a55) +Char5CText:: db "TM@" -Char5DText:: ; 1a58 (0:1a58) +Char5DText:: db "TRAINER@" -Char5BText:: ; 1a60 (0:1a60) +Char5BText:: db "PC@" -Char5EText:: ; 1a63 (0:1a63) +Char5EText:: db "ROCKET@" -Char54Text:: ; 1a6a (0:1a6a) +Char54Text:: db "POKé@" -Char56Text:: ; 1a6f (0:1a6f) +Char56Text:: db "……@" -Char5AText:: ; 1a72 (0:1a72) +Char5AText:: db "Enemy @" -Char4AText:: ; 1a79 (0:1a79) +Char4AText:: db $E1,$E2,"@" ; PKMN -Char55:: ; 1a7c (0:1a7c) +Char55:: push de ld b,h ld c,l @@ -253,104 +242,108 @@ Char55:: ; 1a7c (0:1a7c) inc de jp PlaceNextChar -Char55Text:: ; 1a8c (0:1a8c) +Char55Text:: ; equivalent to Char4B TX_FAR _Char55Text db "@" -Char5F:: ; 1a91 (0:1a91) +Char5F:: ; ends a Pokédex entry ld [hl],"." pop hl ret -Char58:: ; 1a95 (0:1a95) +Char58:: ; prompt ld a,[wLinkState] cp LINK_STATE_BATTLING - jp z,Next1AA2 - ld a,$EE + jp z, .ok + ld a, "▼" Coorda 18, 16 -Next1AA2:: ; 1aa2 (0:1aa2) +.ok call ProtectedDelay3 call ManualTextScroll - ld a,$7F + ld a, " " Coorda 18, 16 -Char57:: ; 1aad (0:1aad) +Char57:: ; done pop hl - ld de,Char58Text + ld de, Char58Text dec de ret -Char58Text:: ; 1ab3 (0:1ab3) +Char58Text:: db "@" -Char51:: ; 1ab4 (0:1ab4) +Char51:: ; para push de - ld a,$EE + ld a, "▼" Coorda 18, 16 call ProtectedDelay3 call ManualTextScroll - hlCoord 1, 13 - ld bc,$0412 + coord hl, 1, 13 + lb bc, 4, 18 call ClearScreenArea - ld c,$14 + ld c, 20 call DelayFrames pop de - hlCoord 1, 14 - jp Next19E8 + coord hl, 1, 14 + jp PlaceNextChar_inc -Char49:: ; 1ad5 (0:1ad5) +Char49:: push de - ld a,$EE + ld a,"▼" Coorda 18, 16 call ProtectedDelay3 call ManualTextScroll - hlCoord 1, 10 - ld bc,$0712 + coord hl, 1, 10 + lb bc, 7, 18 call ClearScreenArea - ld c,$14 + ld c,20 call DelayFrames pop de pop hl - hlCoord 1, 11 + coord hl, 1, 11 push hl - jp Next19E8 + jp PlaceNextChar_inc -Char4B:: ; 1af8 (0:1af8) - ld a,$EE +Char4B:: + ld a,"▼" Coorda 18, 16 call ProtectedDelay3 push de call ManualTextScroll pop de - ld a,$7F + ld a, " " Coorda 18, 16 ;fall through -Char4C:: ; 1b0a (0:1b0a) +Char4C:: push de - call Next1B18 - call Next1B18 - hlCoord 1, 16 + call ScrollTextUpOneLine + call ScrollTextUpOneLine + coord hl, 1, 16 pop de - jp Next19E8 - -Next1B18:: ; 1b18 (0:1b18) - hlCoord 0, 14 - deCoord 0, 13 - ld b,$3C -.next + jp PlaceNextChar_inc + +; move both rows of text in the normal text box up one row +; always called twice in a row +; first time, copy the two rows of text to the "in between" rows that are usually emtpy +; second time, copy the bottom row of text into the top row of text +ScrollTextUpOneLine:: + coord hl, 0, 14 ; top row of text + coord de, 0, 13 ; empty line above text + ld b, SCREEN_WIDTH * 3 +.copyText ld a,[hli] ld [de],a inc de dec b - jr nz,.next - hlCoord 1, 16 - ld a,$7F - ld b,$12 -.next2 + jr nz,.copyText + coord hl, 1, 16 + ld a, " " + ld b,SCREEN_WIDTH - 2 +.clearText ld [hli],a dec b - jr nz,.next2 + jr nz,.clearText ; wait five frames ld b,5 @@ -361,57 +354,57 @@ Next1B18:: ; 1b18 (0:1b18) ret -ProtectedDelay3:: ; 1b3a (0:1b3a) +ProtectedDelay3:: push bc call Delay3 pop bc ret -TextCommandProcessor:: ; 1b40 (0:1b40) - ld a,[wd358] +TextCommandProcessor:: + ld a,[wLetterPrintingDelayFlags] push af set 1,a ld e,a - ld a,[$fff4] + ld a, [$fff4] xor e - ld [wd358],a + ld [wLetterPrintingDelayFlags],a ld a,c - ld [wcc3a],a + ld [wTextDest],a ld a,b - ld [wcc3b],a + ld [wTextDest + 1],a -NextTextCommand:: ; 1b55 (0:1b55) +NextTextCommand:: ld a,[hli] cp a, "@" ; terminator jr nz,.doTextCommand pop af - ld [wd358],a + ld [wLetterPrintingDelayFlags],a ret .doTextCommand push hl - cp a,$17 - jp z,TextCommand17 - cp a,$0e + cp a, $17 + jp z, TextCommand17 + cp a, $0e jp nc,TextCommand0B ; if a != 0x17 and a >= 0xE, go to command 0xB ; if a < 0xE, use a jump table ld hl,TextCommandJumpTable push bc add a - ld b,$00 - ld c,a - add hl,bc + ld b, 0 + ld c, a + add hl, bc pop bc - ld a,[hli] - ld h,[hl] - ld l,a - jp [hl] + ld a, [hli] + ld h, [hl] + ld l, a + jp hl ; draw box ; 04AAAABBCC ; AAAA = address of upper left corner ; BB = height ; CC = width -TextCommand04:: ; 1b78 (0:1b78) +TextCommand04:: pop hl ld a,[hli] ld e,a @@ -430,7 +423,7 @@ TextCommand04:: ; 1b78 (0:1b78) ; place string inline ; 00{string} -TextCommand00:: ; 1b8a (0:1b8a) +TextCommand00:: pop hl ld d,h ld e,l @@ -445,7 +438,7 @@ TextCommand00:: ; 1b8a (0:1b8a) ; place string from RAM ; 01AAAA ; AAAA = address of string -TextCommand01:: ; 1b97 (0:1b97) +TextCommand01:: pop hl ld a,[hli] ld e,a @@ -464,7 +457,7 @@ TextCommand01:: ; 1b97 (0:1b97) ; BB ; bits 0-4 = length in bytes ; bits 5-7 = unknown flags -TextCommand02:: ; 1ba5 (0:1ba5) +TextCommand02:: pop hl ld a,[hli] ld e,a @@ -484,32 +477,32 @@ TextCommand02:: ; 1ba5 (0:1ba5) ; repoint destination address ; 03AAAA ; AAAA = new destination address -TextCommand03:: ; 1bb7 (0:1bb7) +TextCommand03:: pop hl ld a,[hli] - ld [wcc3a],a + ld [wTextDest],a ld c,a ld a,[hli] - ld [wcc3b],a + ld [wTextDest + 1],a ld b,a jp NextTextCommand ; repoint destination to second line of dialogue text box ; 05 ; (no arguments) -TextCommand05:: ; 1bc5 (0:1bc5) +TextCommand05:: pop hl - bcCoord 1, 16 ; address of second line of dialogue text box + coord bc, 1, 16 ; address of second line of dialogue text box jp NextTextCommand ; blink arrow and wait for A or B to be pressed ; 06 ; (no arguments) -TextCommand06:: ; 1bcc (0:1bcc) +TextCommand06:: ld a,[wLinkState] cp a,LINK_STATE_BATTLING jp z,TextCommand0D - ld a,$ee ; down arrow + ld a,"▼" Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box push bc call ManualTextScroll ; blink arrow and wait for A or B to be pressed @@ -522,22 +515,22 @@ TextCommand06:: ; 1bcc (0:1bcc) ; scroll text up one line ; 07 ; (no arguments) -TextCommand07:: ; 1be7 (0:1be7) - ld a," " +TextCommand07:: + ld a, " " Coorda 18, 16 ; place blank space in lower right corner of dialogue text box - call Next1B18 ; scroll up text - call Next1B18 + call ScrollTextUpOneLine + call ScrollTextUpOneLine pop hl - bcCoord 1, 16 ; address of second line of dialogue text box + coord bc, 1, 16 ; address of second line of dialogue text box jp NextTextCommand ; execute asm inline ; 08{code} -TextCommand08:: ; 1bf9 (0:1bf9) +TextCommand08:: pop hl ld de,NextTextCommand push de ; return address - jp [hl] + jp hl ; print decimal number (converted from binary number) ; 09AAAABB @@ -545,7 +538,7 @@ TextCommand08:: ; 1bf9 (0:1bf9) ; BB ; bits 0-3 = how many digits to display ; bits 4-7 = how long the number is in bytes -TextCommand09:: ; 1bff (0:1bff) +TextCommand09:: pop hl ld a,[hli] ld e,a @@ -561,7 +554,7 @@ TextCommand09:: ; 1bff (0:1bff) ld a,b and a,$f0 swap a - set 6,a + set BIT_LEFT_ALIGN,a ld b,a call PrintNumber ld b,h @@ -572,11 +565,11 @@ TextCommand09:: ; 1bff (0:1bff) ; wait half a second if the user doesn't hold A or B ; 0A ; (no arguments) -TextCommand0A:: ; 1c1d (0:1c1d) +TextCommand0A:: push bc call Joypad ld a,[hJoyHeld] - and a,%00000011 ; A and B buttons + and a,A_BUTTON | B_BUTTON jr nz,.skipDelay ld c,30 call DelayFrames @@ -588,7 +581,7 @@ TextCommand0A:: ; 1c1d (0:1c1d) ; plays sounds ; this actually handles various command ID's, not just 0B ; (no arguments) -TextCommand0B:: ; 1c31 (0:1c31) +TextCommand0B:: pop hl push bc dec hl @@ -625,22 +618,22 @@ TextCommand0B:: ; 1c31 (0:1c31) jp NextTextCommand ; format: text command ID, sound ID or cry ID -TextCommandSounds:: ; 1c64 (0:1c64) - db $0B,(SFX_02_3a - SFX_Headers_02) / 3 - db $12,(SFX_08_46 - SFX_Headers_08) / 3 - db $0E,(SFX_02_41 - SFX_Headers_02) / 3 - db $0F,(SFX_02_3a - SFX_Headers_02) / 3 - db $10,(SFX_02_3b - SFX_Headers_02) / 3 - db $11,(SFX_02_42 - SFX_Headers_02) / 3 - db $13,(SFX_08_45 - SFX_Headers_08) / 3 - db $14,NIDORINA ; used in OakSpeech - db $15,PIDGEOT ; used in SaffronCityText12 - db $16,DEWGONG ; unused? +TextCommandSounds:: + db $0B, SFX_GET_ITEM_1 ; actually plays SFX_LEVEL_UP when the battle music engine is loaded + db $12, SFX_CAUGHT_MON + db $0E, SFX_POKEDEX_RATING ; unused? + db $0F, SFX_GET_ITEM_1 ; unused? + db $10, SFX_GET_ITEM_2 + db $11, SFX_GET_KEY_ITEM + db $13, SFX_DEX_PAGE_ADDED + db $14, NIDORINA ; used in OakSpeech + db $15, PIDGEOT ; used in SaffronCityText12 + db $16, DEWGONG ; unused? ; draw ellipses ; 0CAA ; AA = number of ellipses to draw -TextCommand0C:: ; 1c78 (0:1c78) +TextCommand0C:: pop hl ld a,[hli] ld d,a @@ -648,13 +641,13 @@ TextCommand0C:: ; 1c78 (0:1c78) ld h,b ld l,c .loop - ld a,$75 ; ellipsis + ld a,"…" ld [hli],a push de call Joypad pop de ld a,[hJoyHeld] ; joypad state - and a,%00000011 ; is A or B button pressed? + and a,A_BUTTON | B_BUTTON jr nz,.skipDelay ; if so, skip the delay ld c,10 call DelayFrames @@ -669,7 +662,7 @@ TextCommand0C:: ; 1c78 (0:1c78) ; wait for A or B to be pressed ; 0D ; (no arguments) -TextCommand0D:: ; 1c9a (0:1c9a) +TextCommand0D:: push bc call ManualTextScroll ; wait for A or B to be pressed pop bc @@ -680,7 +673,7 @@ TextCommand0D:: ; 1c9a (0:1c9a) ; 17AAAABB ; AAAA = address of text commands ; BB = bank -TextCommand17:: ; 1ca3 (0:1ca3) +TextCommand17:: pop hl ld a,[H_LOADEDROMBANK] push af @@ -690,7 +683,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,10 +691,10 @@ TextCommand17:: ; 1ca3 (0:1ca3) pop hl pop af ld [H_LOADEDROMBANK],a - ld [$2000],a + ld [MBC1RomBank],a jp NextTextCommand -TextCommandJumpTable:: ; 1cc1 (0:1cc1) +TextCommandJumpTable:: dw TextCommand00 dw TextCommand01 dw TextCommand02 diff --git a/home/timer.asm b/home/timer.asm index 8578df1a..05e307bd 100644 --- a/home/timer.asm +++ b/home/timer.asm @@ -1,3 +1,3 @@ ; timer interrupt is apparently not invoked anyway -Timer:: ; 2306 (0:2306) +Timer:: reti diff --git a/home/vblank.asm b/home/vblank.asm index d8288187..e80fba75 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -6,14 +6,14 @@ VBlank:: push hl ld a, [H_LOADEDROMBANK] - ld [wd122], a + ld [wVBlankSavedROMBank], a ld a, [hSCX] ld [rSCX], a ld a, [hSCY] ld [rSCY], a - ld a, [wd0a0] + ld a, [wDisableVBlankWYUpdate] and a jr nz, .ok ld a, [hWY] @@ -22,12 +22,12 @@ VBlank:: call AutoBgMapTransfer call VBlankCopyBgMap - call RedrawExposedScreenEdge + call RedrawRowOrColumn call VBlankCopy call VBlankCopyDouble call UpdateMovingBgTiles call $ff80 ; hOAMDMA - ld a, Bank(PrepareOAMData) + ld a, BANK(PrepareOAMData) ld [H_LOADEDROMBANK], a ld [MBC1RomBank], a call PrepareOAMData @@ -38,47 +38,47 @@ VBlank:: ld a, [H_VBLANKOCCURRED] and a - jr z, .vblanked + jr z, .skipZeroing xor a ld [H_VBLANKOCCURRED], a -.vblanked +.skipZeroing ld a, [H_FRAMECOUNTER] and a - jr z, .decced + jr z, .skipDec dec a ld [H_FRAMECOUNTER], a -.decced - call Func_28cb +.skipDec + call FadeOutAudio - ld a, [wc0ef] ; music ROM bank + ld a, [wAudioROMBank] ; music ROM bank ld [H_LOADEDROMBANK], a ld [MBC1RomBank], a - cp BANK(Music2_UpdateMusic) - jr nz, .notbank2 -.bank2 - call Music2_UpdateMusic + cp BANK(Audio1_UpdateMusic) + jr nz, .checkForAudio2 +.audio1 + call Audio1_UpdateMusic jr .afterMusic -.notbank2 - cp BANK(Music8_UpdateMusic) - jr nz, .bank1F -.bank8 +.checkForAudio2 + cp BANK(Audio2_UpdateMusic) + jr nz, .audio3 +.audio2 call Music_DoLowHealthAlarm - call Music8_UpdateMusic + call Audio2_UpdateMusic jr .afterMusic -.bank1F - call Music1f_UpdateMusic +.audio3 + call Audio3_UpdateMusic .afterMusic callba TrackPlayTime ; keep track of time played - ld a, [$fff9] + ld a, [hDisableJoypadPolling] and a call z, ReadJoypad - ld a, [wd122] + ld a, [wVBlankSavedROMBank] ld [H_LOADEDROMBANK], a ld [MBC1RomBank], a diff --git a/home/vcopy.asm b/home/vcopy.asm index d42293d9..3fe19745 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -1,7 +1,7 @@ ; this function seems to be used only once ; it store the address of a row and column of the VRAM background map in hl ; INPUT: h - row, l - column, b - high byte of background tile map address in VRAM -GetRowColAddressBgMap:: ; 1cdd (0:1cdd) +GetRowColAddressBgMap:: xor a srl h rr a @@ -18,7 +18,7 @@ GetRowColAddressBgMap:: ; 1cdd (0:1cdd) ; clears a VRAM background map with blank space tiles ; INPUT: h - high byte of background tile map address in VRAM -ClearBgMap:: ; 1cf0 (0:1cf0) +ClearBgMap:: ld a," " jr .next ld a,l @@ -33,32 +33,35 @@ ClearBgMap:: ; 1cf0 (0:1cf0) jr nz,.loop ret -; When the player takes a step, a row or column of 2x2 tile blocks at the edge -; of the screen toward which they moved is exposed and has to be redrawn. -; This function does the redrawing. -RedrawExposedScreenEdge:: ; 1d01 (0:1d01) - ld a,[H_SCREENEDGEREDRAW] +; This function redraws a BG row of height 2 or a BG column of width 2. +; One of its main uses is redrawing the row or column that will be exposed upon +; scrolling the BG when the player takes a step. Redrawing only the exposed +; row or column is more efficient than redrawing the entire screen. +; However, this function is also called repeatedly to redraw the whole screen +; when necessary. It is also used in trade animation and elevator code. +RedrawRowOrColumn:: + ld a,[hRedrawRowOrColumnMode] and a ret z ld b,a xor a - ld [H_SCREENEDGEREDRAW],a + ld [hRedrawRowOrColumnMode],a dec b jr nz,.redrawRow .redrawColumn - ld hl,wScreenEdgeTiles - ld a,[H_SCREENEDGEREDRAWADDR] + ld hl,wRedrawRowOrColumnSrcTiles + ld a,[hRedrawRowOrColumnDest] ld e,a - ld a,[H_SCREENEDGEREDRAWADDR + 1] + ld a,[hRedrawRowOrColumnDest + 1] ld d,a - ld c,18 ; screen height + ld c,SCREEN_HEIGHT .loop1 ld a,[hli] ld [de],a inc de ld a,[hli] ld [de],a - ld a,31 + ld a,BG_MAP_WIDTH - 1 add e ld e,a jr nc,.noCarry @@ -72,23 +75,24 @@ RedrawExposedScreenEdge:: ; 1d01 (0:1d01) dec c jr nz,.loop1 xor a - ld [H_SCREENEDGEREDRAW],a + ld [hRedrawRowOrColumnMode],a ret .redrawRow - ld hl,wScreenEdgeTiles - ld a,[H_SCREENEDGEREDRAWADDR] + ld hl,wRedrawRowOrColumnSrcTiles + ld a,[hRedrawRowOrColumnDest] ld e,a - ld a,[H_SCREENEDGEREDRAWADDR + 1] + ld a,[hRedrawRowOrColumnDest + 1] ld d,a push de - call .drawHalf ; draw upper half + call .DrawHalf ; draw upper half pop de - ld a,32 ; width of VRAM background map + ld a,BG_MAP_WIDTH ; width of VRAM background map add e ld e,a - ; draw lower half -.drawHalf - ld c,10 + ; fall through and draw lower half + +.DrawHalf + ld c,SCREEN_WIDTH / 2 .loop2 ld a,[hli] ld [de],a @@ -113,9 +117,9 @@ RedrawExposedScreenEdge:: ; 1d01 (0:1d01) ; background per V-blank. It cycles through which third it draws. ; This transfer is turned off when walking around the map, but is turned ; on when talking to sprites, battling, using menus, etc. This is because -; the above function, RedrawExposedScreenEdge, is used when walking to +; the above function, RedrawRowOrColumn, is used when walking to ; improve efficiency. -AutoBgMapTransfer:: ; 1d57 (0:1d57) +AutoBgMapTransfer:: ld a,[H_AUTOBGTRANSFERENABLED] and a ret z @@ -130,7 +134,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57) dec a jr z,.transferMiddleThird .transferBottomThird - hlCoord 0, 12 + coord hl, 0, 12 ld sp,hl ld a,[H_AUTOBGTRANSFERDEST + 1] ld h,a @@ -141,7 +145,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57) xor a ; TRANSFERTOP jr .doTransfer .transferTopThird - hlCoord 0, 0 + coord hl, 0, 0 ld sp,hl ld a,[H_AUTOBGTRANSFERDEST + 1] ld h,a @@ -150,7 +154,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57) ld a,TRANSFERMIDDLE jr .doTransfer .transferMiddleThird - hlCoord 0, 6 + coord hl, 0, 6 ld sp,hl ld a,[H_AUTOBGTRANSFERDEST + 1] ld h,a @@ -163,7 +167,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57) ld [H_AUTOBGTRANSFERPORTION],a ; store next portion ld b,6 -TransferBgRows:: ; 1d9e (0:1d9e) +TransferBgRows:: ; unrolled loop and using pop for speed rept 20 / 2 - 1 @@ -197,7 +201,7 @@ TransferBgRows:: ; 1d9e (0:1d9e) ; Copies [H_VBCOPYBGNUMROWS] rows from H_VBCOPYBGSRC to H_VBCOPYBGDEST. ; If H_VBCOPYBGSRC is XX00, the transfer is disabled. -VBlankCopyBgMap:: ; 1de1 (0:1de1) +VBlankCopyBgMap:: ld a,[H_VBCOPYBGSRC] ; doubles as enabling byte and a ret z @@ -302,12 +306,11 @@ VBlankCopyDouble:: VBlankCopy:: -; Copy [H_VBCOPYSIZE] 2bpp tiles +; Copy [H_VBCOPYSIZE] 2bpp tiles (or 16 * [H_VBCOPYSIZE] tile map entries) ; from H_VBCOPYSRC to H_VBCOPYDEST. -; Source and destination addresses -; are updated, so transfer can -; continue in subsequent calls. +; Source and destination addresses are updated, +; so transfer can continue in subsequent calls. ld a, [H_VBCOPYSIZE] and a @@ -380,21 +383,23 @@ UpdateMovingBgTiles:: and a ret z ; no animations if indoors (or if a menu set this to 0) - ld a, [$ffd8] + ld a, [hMovingBGTilesCounter1] inc a - ld [$ffd8], a - cp $14 + ld [hMovingBGTilesCounter1], a + cp 20 ret c - cp $15 + cp 21 jr z, .flower +; water + ld hl, vTileset + $14 * $10 ld c, $10 - ld a, [wd085] + ld a, [wMovingBGTilesCounter2] inc a and 7 - ld [wd085], a + ld [wMovingBGTilesCounter2], a and 4 jr nz, .left @@ -417,14 +422,14 @@ UpdateMovingBgTiles:: ret nc ; if in a cave, no flower animations xor a - ld [$ffd8], a + ld [hMovingBGTilesCounter1], a ret .flower xor a - ld [$ffd8], a + ld [hMovingBGTilesCounter1], a - ld a, [wd085] + ld a, [wMovingBGTilesCounter2] and 3 cp 2 ld hl, FlowerTile1 @@ -1,19 +1,36 @@ - -H_SPRITEWIDTH EQU $FF8B ; in tiles -H_SPRITEINTERLACECOUNTER EQU $FF8B -H_SPRITEHEIGHT EQU $FF8C ; in tiles -H_SPRITEOFFSET EQU $FF8D - hSoftReset EQU $FF8A ; Initialized to 16. ; Decremented each input iteration if the player ; presses the reset sequence (A+B+SEL+START). ; Soft reset when 0 is reached. +; base tile ID to which offsets are added hBaseTileID EQU $FF8B +; 3-byte BCD number hItemPrice EQU $FF8B +hDexWeight EQU $FF8B + +hWarpDestinationMap EQU $FF8B + +hOAMTile EQU $FF8B + +hROMBankTemp EQU $FF8B + +hPreviousTileset EQU $FF8B + +hEastWestConnectedMapWidth EQU $FF8B + +hSlideAmount EQU $FF8B + +hRLEByteValue EQU $FF8B + +H_SPRITEWIDTH EQU $FF8B ; in tiles +H_SPRITEINTERLACECOUNTER EQU $FF8B +H_SPRITEHEIGHT EQU $FF8C ; in tiles +H_SPRITEOFFSET EQU $FF8D + ; counters for blinking down arrow H_DOWNARROWBLINKCNT1 EQU $FF8B H_DOWNARROWBLINKCNT2 EQU $FF8C @@ -21,11 +38,66 @@ H_DOWNARROWBLINKCNT2 EQU $FF8C H_SPRITEDATAOFFSET EQU $FF8B H_SPRITEINDEX EQU $FF8C +hMapStride EQU $FF8B +hMapWidth EQU $FF8C + +hNorthSouthConnectionStripWidth EQU $FF8B +hNorthSouthConnectedMapWidth EQU $FF8C + ; DisplayTextID's argument hSpriteIndexOrTextID EQU $FF8C hPartyMonIndex EQU $FF8C +; the total number of tiles being shifted each time the pic slides by one tile +hSlidingRegionSize EQU $FF8C + +; 2 bytes +hEnemySpeed EQU $FF8D + +hVRAMSlot EQU $FF8D + +hFourTileSpriteCount EQU $FF8E + +; -1 = left +; 0 = right +hSlideDirection EQU $FF8D + +hSpriteFacingDirection EQU $FF8D + +hSpriteMovementByte2 EQU $FF8D + +hSpriteImageIndex EQU $FF8D + +hLoadSpriteTemp1 EQU $FF8D +hLoadSpriteTemp2 EQU $FF8E + +hHalveItemPrices EQU $FF8E + +hSpriteOffset2 EQU $FF8F + +hOAMBufferOffset EQU $FF90 + +hSpriteScreenX EQU $FF91 +hSpriteScreenY EQU $FF92 + +hTilePlayerStandingOn EQU $FF93 + +hSpritePriority EQU $FF94 + +; 2 bytes +hSignCoordPointer EQU $FF95 + +hNPCMovementDirections2Index EQU $FF95 + +; CalcPositionOfPlayerRelativeToNPC +hNPCSpriteOffset EQU $FF95 + +; temp value used when swapping bytes +hSwapTemp EQU $FF95 + +hExperience EQU $FF96 ; 3 bytes, big endian + ; Multiplcation and division variables are meant ; to overlap for back-to-back usage. Big endian. @@ -38,12 +110,52 @@ H_DIVISOR EQU $FF99 ; 1 byte H_QUOTIENT EQU $FF95 ; 4 bytes H_REMAINDER EQU $FF99 ; 1 byte +H_DIVIDEBUFFER EQU $FF9A + +H_MULTIPLYBUFFER EQU $FF9B + ; PrintNumber (big endian). H_PASTLEADINGZEROES EQU $FF95 ; last char printed H_NUMTOPRINT EQU $FF96 ; 3 bytes H_POWEROFTEN EQU $FF99 ; 3 bytes H_SAVEDNUMTOPRINT EQU $FF9C ; 3 bytes +; distance in steps between NPC and player +hNPCPlayerYDistance EQU $FF95 +hNPCPlayerXDistance EQU $FF96 + +hFindPathNumSteps EQU $FF97 + +; bit 0: set when the end of the path's Y coordinate matches the target's +; bit 1: set when the end of the path's X coordinate matches the target's +; When both bits are set, the end of the path is at the target's position +; (i.e. the path has been found). +hFindPathFlags EQU $FF98 + +hFindPathYProgress EQU $FF99 +hFindPathXProgress EQU $FF9A + +; 0 = from player to NPC +; 1 = from NPC to player +hNPCPlayerRelativePosPerspective EQU $FF9B + +; bit 0: +; 0 = target is to the south or aligned +; 1 = target is to the north +; bit 1: +; 0 = target is to the east or aligned +; 1 = target is to the west +hNPCPlayerRelativePosFlags EQU $FF9D + +; some code zeroes this for no reason when writing a coin amount +hUnusedCoinsByte EQU $FF9F + +hMoney EQU $FF9F ; 3-byte BCD number +hCoins EQU $FFA0 ; 2-byte BCD number + +hDivideBCDDivisor EQU $FFA2 ; 3-byte BCD number +hDivideBCDQuotient EQU $FFA2 ; 3-byte BCD number + hSerialReceivedNewData EQU $FFA9 ; $01 = using external clock @@ -70,7 +182,9 @@ hJoy5 EQU $FFB5 hJoy6 EQU $FFB6 hJoy7 EQU $FFB7 -H_LOADEDROMBANK EQU $FFB8 +H_LOADEDROMBANK EQU $FFB8 + +hSavedROMBank EQU $FFB9 ; is automatic background transfer during V-blank enabled? ; if nonzero, yes @@ -128,12 +242,12 @@ H_VBCOPYDOUBLEDEST EQU $FFCE ; 00 = no redraw ; 01 = redraw column ; 02 = redraw row -H_SCREENEDGEREDRAW EQU $FFD0 +hRedrawRowOrColumnMode EQU $FFD0 -REDRAWCOL EQU 1 -REDRAWROW EQU 2 +REDRAW_COL EQU 1 +REDRAW_ROW EQU 2 -H_SCREENEDGEREDRAWADDR EQU $FFD1 +hRedrawRowOrColumnDest EQU $FFD1 hRandomAdd EQU $FFD3 hRandomSub EQU $FFD4 @@ -151,13 +265,59 @@ H_VBLANKOCCURRED EQU $FFD6 ; this is often set to 00 in order to turn off water and flower BG tile animations hTilesetType EQU $FFD7 +hMovingBGTilesCounter1 EQU $FFD8 + H_CURRENTSPRITEOFFSET EQU $FFDA ; multiple of $10 +hItemCounter EQU $FFDB + +hGymGateIndex EQU $FFDB + +hGymTrashCanRandNumMask EQU $FFDB + +hDexRatingNumMonsSeen EQU $FFDB +hDexRatingNumMonsOwned EQU $FFDC + +; $00 = bag full +; $01 = got item +; $80 = didn't meet required number of owned mons +; $FF = player cancelled +hOaksAideResult EQU $FFDB + +hOaksAideRequirement EQU $FFDB ; required number of owned mons +hOaksAideRewardItem EQU $FFDC +hOaksAideNumMonsOwned EQU $FFDD + +hItemToRemoveID EQU $FFDB +hItemToRemoveIndex EQU $FFDC + +hVendingMachineItem EQU $FFDB +hVendingMachinePrice EQU $FFDC ; 3-byte BCD number + +; the first tile ID in a sequence of tile IDs that increase by 1 each step +hStartTileID EQU $FFE1 + +hNewPartyLength EQU $FFE4 + +hDividend2 EQU $FFE5 +hDivisor2 EQU $FFE6 +hQuotient2 EQU $FFE7 + +hSpriteVRAMSlotAndFacing EQU $FFE9 + +hCoordsInFrontOfPlayerMatch EQU $FFEA + +hSpriteAnimFrameCounter EQU $FFEA + H_WHOSETURN EQU $FFF3 ; 0 on player’s turn, 1 on enemy’s turn ; bit 0: draw HP fraction to the right of bar instead of below (for party menu) ; bit 1: menu is double spaced hFlags_0xFFF6 EQU $FFF6 +hFieldMoveMonMenuTopMenuItemX EQU $FFF7 + +hDisableJoypadPolling EQU $FFF9 + hJoyInput EQU $FFF8 @@ -1,571 +1,5 @@ - -text EQUS "db $00," ; Start writing text. -next EQUS "db $4e," ; Move a line down. -line EQUS "db $4f," ; Start writing at the bottom line. -para EQUS "db $51," ; Start a new paragraph. -cont EQUS "db $55," ; Scroll to the next line. -done EQUS "db $57" ; End a text box. -prompt EQUS "db $58" ; Prompt the player to end a text box (initiating some other event). - -page EQUS "db $49," ; Start a new Pokedex page. -dex EQUS "db $5f, $50" ; End a Pokedex entry. - - -percent EQUS "* $ff / 100" - - -; Constant enumeration is useful for monsters, items, moves, etc. -const_def: MACRO -const_value = 0 -ENDM - -const: MACRO -\1 EQU const_value -const_value = const_value + 1 -ENDM - - -homecall: MACRO - ld a, [H_LOADEDROMBANK] - push af - ld a, BANK(\1) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call \1 - pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - ENDM - -callba: MACRO - ld b, BANK(\1) - ld hl, \1 - call Bankswitch - ENDM - -callab: MACRO - ld hl, \1 - ld b, BANK(\1) - call Bankswitch - ENDM - -bcd2: MACRO - dn ((\1) / 1000) % 10, ((\1) / 100) % 10 - dn ((\1) / 10) % 10, (\1) % 10 - ENDM - -bcd3: MACRO - dn ((\1) / 100000) % 10, ((\1) / 10000) % 10 - dn ((\1) / 1000) % 10, ((\1) / 100) % 10 - dn ((\1) / 10) % 10, (\1) % 10 - ENDM - -coins equs "bcd2" -money equs "bcd3" - -;\1 = X -;\2 = Y -hlCoord: MACRO - ld hl, wTileMap + 20 * \2 + \1 - ENDM - -;\1 = X -;\2 = Y -deCoord: MACRO - ld de, wTileMap + 20 * \2 + \1 - ENDM - -;\1 = X -;\2 = Y -bcCoord: MACRO - ld bc, wTileMap + 20 * \2 + \1 - ENDM - -;\1 = X -;\2 = Y -aCoord: MACRO - ld a, [wTileMap + 20 * \2 + \1] - ENDM - -;\1 = X -;\2 = Y -Coorda: MACRO - ld [wTileMap + 20 * \2 + \1], a - ENDM - -;\1 = X -;\2 = Y -dwCoord: MACRO - dw wTileMap + 20 * \2 + \1 - ENDM - -;\1 = Map Width -;\2 = Rows above (Y-blocks) -;\3 = X movement (X-blocks) -EVENT_DISP: MACRO - dw (wOverworldMap + 7 + (\1) + ((\1) + 6) * ((\2) >> 1) + ((\3) >> 1)) ; Ev.Disp - db \2,\3 ;Y,X - ENDM - -FLYWARP_DATA: MACRO - EVENT_DISP \1,\2,\3 - db ((\2) & $01) ;sub-block Y - db ((\3) & $01) ;sub-block X - ENDM - -; external map entry macro -EMAP: MACRO ; emap x-coordinate,y-coordinate,textpointer -; the appearance of towns and routes in the town map, indexed by map id - ; nybble: y-coordinate - ; nybble: x-coordinate - ; word : pointer to map name - db (\1 + (\2 << 4)) - dw \3 - ENDM - -; internal map entry macro -IMAP: MACRO ; imap mapid_less_than,x-coordinate,y-coordinate,textpointer -; the appearance of buildings and dungeons in the town map - ; byte : maximum map id subject to this rule - ; nybble: y-coordinate - ; nybble: x-coordinate - ; word : pointer to map name - db \1 - db \2 + \3 << 4 - dw \4 - ENDM - -; tilesets' headers macro -tileset: MACRO - db BANK(\2) ; BANK(GFX) - dw \1, \2, \3 ; Block, GFX, Coll - db \4, \5, \6 ; counter tiles - db \7 ; grass tile - db \8 ; permission (indoor, cave, outdoor) - ENDM - -INDOOR EQU 0 -CAVE EQU 1 -OUTDOOR EQU 2 - -; macro for two nibbles -dn: MACRO - db (\1 << 4 | \2) - ENDM - -; macro for putting a byte then a word -dbw: MACRO - db \1 - dw \2 - ENDM - -; data format macros -RGB: MACRO - dw (\3 << 10 | \2 << 5 | \1) - ENDM - -; text macros -TX_NUM: MACRO -; print a big-endian decimal number. -; \1: address to read from -; \2: number of bytes to read -; \3: number of digits to display - db $09 - dw \1 - db \2 << 4 | \3 - ENDM - -TX_FAR: MACRO - db $17 - dw \1 - db BANK(\1) - ENDM - -; text engine command $1 -TX_RAM: MACRO -; prints text to screen -; \1: RAM address to read from - db $1 - dw \1 - ENDM - -TX_BCD: MACRO - db $2 - dw \1 - db \2 - ENDM - -; Predef macro. -add_predef: MACRO -\1Predef:: - db BANK(\1) - dw \1 - ENDM - -predef_id: MACRO - ld a, (\1Predef - PredefPointers) / 3 - ENDM - -predef: MACRO - predef_id \1 - call Predef - ENDM - -predef_jump: MACRO - predef_id \1 - jp Predef - ENDM - - -add_tx_pre: MACRO -\1_id:: dw \1 -ENDM - -tx_pre_id: MACRO - ld a, (\1_id - TextPredefs) / 2 -ENDM - -tx_pre: MACRO - tx_pre_id \1 - call PrintPredefTextID -ENDM - -tx_pre_jump: MACRO - tx_pre_id \1 - jp PrintPredefTextID -ENDM - - -;1_channel EQU $00 -;2_channels EQU $40 -;3_channels EQU $80 -;4_channels EQU $C0 - -CH0 EQU 0 -CH1 EQU 1 -CH2 EQU 2 -CH3 EQU 3 -CH4 EQU 4 -CH5 EQU 5 -CH6 EQU 6 -CH7 EQU 7 - -unknownsfx0x10: MACRO - db $10 - db \1 -ENDM - -unknownsfx0x20: MACRO - db $20 | \1 - db \2 - db \3 - db \4 -ENDM - -unknownnoise0x20: MACRO - db $20 | \1 - db \2 - db \3 -ENDM - -;format: pitch length (in 16ths) -C_: MACRO - db $00 | (\1 - 1) -ENDM - -C#: MACRO - db $10 | (\1 - 1) -ENDM - -D_: MACRO - db $20 | (\1 - 1) -ENDM - -D#: MACRO - db $30 | (\1 - 1) -ENDM - -E_: MACRO - db $40 | (\1 - 1) -ENDM - -F_: MACRO - db $50 | (\1 - 1) -ENDM - -F#: MACRO - db $60 | (\1 - 1) -ENDM - -G_: MACRO - db $70 | (\1 - 1) -ENDM - -G#: MACRO - db $80 | (\1 - 1) -ENDM - -A_: MACRO - db $90 | (\1 - 1) -ENDM - -A#: MACRO - db $A0 | (\1 - 1) -ENDM - -B_: MACRO - db $B0 | (\1 - 1) -ENDM - -;format: instrument length (in 16ths) -snare1: MACRO - db $B0 | (\1 - 1) - db $01 -ENDM - -snare2: MACRO - db $B0 | (\1 - 1) - db $02 -ENDM - -snare3: MACRO - db $B0 | (\1 - 1) - db $03 -ENDM - -snare4: MACRO - db $B0 | (\1 - 1) - db $04 -ENDM - -snare5: MACRO - db $B0 | (\1 - 1) - db $05 -ENDM - -triangle1: MACRO - db $B0 | (\1 - 1) - db $06 -ENDM - -triangle2: MACRO - db $B0 | (\1 - 1) - db $07 -ENDM - -snare6: MACRO - db $B0 | (\1 - 1) - db $08 -ENDM - -snare7: MACRO - db $B0 | (\1 - 1) - db $09 -ENDM - -snare8: MACRO - db $B0 | (\1 - 1) - db $0A -ENDM - -snare9: MACRO - db $B0 | (\1 - 1) - db $0B -ENDM - -cymbal1: MACRO - db $B0 | (\1 - 1) - db $0C -ENDM - -cymbal2: MACRO - db $B0 | (\1 - 1) - db $0D -ENDM - -cymbal3: MACRO - db $B0 | (\1 - 1) - db $0E -ENDM - -mutedsnare1: MACRO - db $B0 | (\1 - 1) - db $0F -ENDM - -triangle3: MACRO - db $B0 | (\1 - 1) - db $10 -ENDM - -mutedsnare2: MACRO - db $B0 | (\1 - 1) - db $11 -ENDM - -mutedsnare3: MACRO - db $B0 | (\1 - 1) - db $12 -ENDM - -mutedsnare4: MACRO - db $B0 | (\1 - 1) - db $13 -ENDM - -;format: rest length (in 16ths) -rest: MACRO - db $C0 | (\1 - 1) -ENDM - -; format: notetype speed, volume, fade -notetype: MACRO - db $D0 | \1 - db (\2 << 4) | \3 -ENDM - -dspeed: MACRO - db $D0 | \1 -ENDM - -octave: MACRO - db $E8 - \1 -ENDM - -toggleperfectpitch: MACRO - db $E8 -ENDM - -;format: vibrato delay, rate, depth -vibrato: MACRO - db $EA - db \1 - db (\2 << 4) | \3 -ENDM - -pitchbend: MACRO - db $EB - db \1 - db \2 -ENDM - -duty: MACRO - db $EC - db \1 -ENDM - -tempo: MACRO - db $ED - db \1 / $100 - db \1 % $100 -ENDM - -stereopanning: MACRO - db $EE - db \1 -ENDM - -volume: MACRO - db $F0 - db (\1 << 4) | \2 -ENDM - -executemusic: MACRO - db $F8 -ENDM - -dutycycle: MACRO - db $FC - db \1 -ENDM - -;format: callchannel address -callchannel: MACRO - db $FD - dw \1 -ENDM - -;format: loopchannel count, address -loopchannel: MACRO - db $FE - db \1 - dw \2 -ENDM - -endchannel: MACRO - db $FF -ENDM - - -;\1 (byte) = connected map id -;\2 (byte) = connected map width -;\3 (byte) = connected map height -;\4 (byte) = x movement of connection strip -;\5 (byte) = connection strip offset -;\6 (byte) = width of connection strip -;\7 (word) = connected map blocks pointer -NORTH_MAP_CONNECTION: MACRO - db \1 ; map id - dw \7 + (\2 * (\3 - 3)) + \5; "Connection Strip" location - dw wOverworldMap + 3 + \4 ; current map position - db \6 ; width of connection strip - db \2 ; map width - db (\3 * 2) - 1 ; y alignment (y coordinate of player when entering map) - db (\4 - \5) * -2 ; x alignment (x coordinate of player when entering map) - dw wOverworldMap + 1 + (\3 * (\2 + 6)) ; window (position of the upper left block after entering the map) -ENDM - -;\1 (byte) = connected map id -;\2 (byte) = connected map width -;\3 (byte) = x movement of connection strip -;\4 (byte) = connection strip offset -;\5 (byte) = width of connection strip -;\6 (word) = connected map blocks pointer -;\7 (byte) = current map width -;\8 (byte) = current map height -SOUTH_MAP_CONNECTION: MACRO - db \1 ; map id - dw \6 + \4 ; "Conection Strip" location - dw wOverworldMap + 3 + (\8 + 3) * (\7 + 6) + \3 ; current map positoin - db \5 ; width of connection strip - db \2 ; map width - db 0 ; y alignment (y coordinate of player when entering map) - db (\3 - \4) * -2 ; x alignment (x coordinate of player when entering map) - dw wOverworldMap + 7 + \2 ; window (position of the upper left block after entering the map) -ENDM - -;\1 (byte) = connected map id -;\2 (byte) = connected map width -;\3 (byte) = y movement of connection strip -;\4 (byte) = connection strip offset -;\5 (byte) = height of connection strip -;\6 (word) = connected map blocks pointer -;\7 (byte) = current map width -EAST_MAP_CONNECTION: MACRO - db \1 ; map id - dw \6 + (\2 * \4) ; "Connection Strip" location - dw wOverworldMap - 3 + (\7 + 6) * (\3 + 4) ; current map position - db \5 ; height of connection strip - db \2 ; map width - db (\3 - \4) * -2 ; y alignment - db 0 ; x alignment - dw wOverworldMap + 7 + \2 ; window (position of the upper left block after entering the map) -ENDM - -;\1 (byte) = connected map id -;\2 (byte) = connected map width -;\3 (byte) = y movement of connection strip -;\4 (byte) = connection strip offset -;\5 (byte) = height of connection strip -;\6 (word) = connected map blocks pointer -;\7 (byte) = current map width -WEST_MAP_CONNECTION: MACRO - db \1 ; map id - dw \6 + (\2 * \4) + \2 - 3 ; "Connection Strip" location - dw wOverworldMap + (\7 + 6) * (\3 + 3) ; current map position - db \5 ; height of connection strip - db \2 ; map width - db (\3 - \4) * -2 ; y alignment - db (\2 * 2) - 1 ; x alignment - dw wOverworldMap + 6 + (2 * \2) ; window (position of the upper left block after entring the map) -ENDM +INCLUDE "macros/asm_macros.asm" +INCLUDE "macros/data_macros.asm" +INCLUDE "macros/text_macros.asm" +INCLUDE "macros/audio_macros.asm" +INCLUDE "macros/event_macros.asm" diff --git a/macros/asm_macros.asm b/macros/asm_macros.asm new file mode 100755 index 00000000..5cf5a809 --- /dev/null +++ b/macros/asm_macros.asm @@ -0,0 +1,188 @@ + +lb: MACRO ; r, hi, lo + ld \1, (\2) << 8 + ((\3) & $ff) +ENDM + +homecall: MACRO + ld a, [H_LOADEDROMBANK] + push af + ld a, BANK(\1) + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + call \1 + pop af + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a +ENDM + +farcall EQUS "callba" + +callba: MACRO + ld b, BANK(\1) + ld hl, \1 + call Bankswitch +ENDM + +callab: MACRO + ld hl, \1 + ld b, BANK(\1) + call Bankswitch +ENDM + +jpba: MACRO + ld b, BANK(\1) + ld hl, \1 + jp Bankswitch +ENDM + +jpab: MACRO + ld hl, \1 + ld b, BANK(\1) + jp Bankswitch +ENDM + +validateCoords: MACRO + IF \1 >= SCREEN_WIDTH + fail "x coord out of range" + ENDC + IF \2 >= SCREEN_HEIGHT + fail "y coord out of range" + ENDC +ENDM + +;\1 = r +;\2 = X +;\3 = Y +;\4 = which tilemap (optional) +coord: MACRO + validateCoords \2, \3 + IF _NARG >= 4 + ld \1, \4 + SCREEN_WIDTH * \3 + \2 + ELSE + ld \1, wTileMap + SCREEN_WIDTH * \3 + \2 + ENDC +ENDM + +;\1 = X +;\2 = Y +;\3 = which tilemap (optional) +aCoord: MACRO + validateCoords \1, \2 + IF _NARG >= 3 + ld a, [\3 + SCREEN_WIDTH * \2 + \1] + ELSE + ld a, [wTileMap + SCREEN_WIDTH * \2 + \1] + ENDC +ENDM + +;\1 = X +;\2 = Y +;\3 = which tilemap (optional) +Coorda: MACRO + validateCoords \1, \2 + IF _NARG >= 3 + ld [\3 + SCREEN_WIDTH * \2 + \1], a + ELSE + ld [wTileMap + SCREEN_WIDTH * \2 + \1], a + ENDC +ENDM + +;\1 = X +;\2 = Y +;\3 = which tilemap (optional) +dwCoord: MACRO + validateCoords \1, \2 + IF _NARG >= 3 + dw \3 + SCREEN_WIDTH * \2 + \1 + ELSE + dw wTileMap + SCREEN_WIDTH * \2 + \1 + ENDC +ENDM + +;\1 = r +;\2 = X +;\3 = Y +;\4 = map width +overworldMapCoord: MACRO + ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2))) +ENDM + +; macro for two nibbles +dn: MACRO + db (\1 << 4 | \2) +ENDM + +; macro for putting a byte then a word +dbw: MACRO + db \1 + dw \2 +ENDM + +dba: MACRO + dbw BANK(\1), \1 +ENDM + +dwb: MACRO + dw \1 + db \2 +ENDM + +dab: MACRO + dwb \1, BANK(\1) +ENDM + +dbbw: MACRO + db \1, \2 + dw \3 +ENDM + +; Predef macro. +predef_const: MACRO + const \1PredefID +ENDM + +add_predef: MACRO +\1Predef:: + db BANK(\1) + dw \1 +ENDM + +predef_id: MACRO + ld a, (\1Predef - PredefPointers) / 3 +ENDM + +predef: MACRO + predef_id \1 + call Predef +ENDM + +predef_jump: MACRO + predef_id \1 + jp Predef +ENDM + +tx_pre_const: MACRO + const \1_id +ENDM + +add_tx_pre: MACRO +\1_id:: dw \1 +ENDM + +db_tx_pre: MACRO + db (\1_id - TextPredefs) / 2 + 1 +ENDM + +tx_pre_id: MACRO + ld a, (\1_id - TextPredefs) / 2 + 1 +ENDM + +tx_pre: MACRO + tx_pre_id \1 + call PrintPredefTextID +ENDM + +tx_pre_jump: MACRO + tx_pre_id \1 + jp PrintPredefTextID +ENDM diff --git a/macros/audio_macros.asm b/macros/audio_macros.asm new file mode 100755 index 00000000..71304bf8 --- /dev/null +++ b/macros/audio_macros.asm @@ -0,0 +1,277 @@ + +StopAllMusic: MACRO + ld a, $ff + call PlaySound +ENDM + +Ch0 EQU 0 +Ch1 EQU 1 +Ch2 EQU 2 +Ch3 EQU 3 +Ch4 EQU 4 +Ch5 EQU 5 +Ch6 EQU 6 +Ch7 EQU 7 + +audio: MACRO + db (_NARG - 2) << 6 | \2 + dw \1_\2 + IF _NARG > 2 + db \3 + dw \1_\3 + ENDC + IF _NARG > 3 + db \4 + dw \1_\4 + ENDC + IF _NARG > 4 + db \5 + dw \1_\5 + ENDC +ENDM + +unknownsfx0x10: MACRO + db $10 + db \1 +ENDM + +unknownsfx0x20: MACRO + db $20 | \1 + db \2 + db \3 + db \4 +ENDM + +unknownnoise0x20: MACRO + db $20 | \1 + db \2 + db \3 +ENDM + +;format: pitch length (in 16ths) +C_: MACRO + db $00 | (\1 - 1) +ENDM + +C#: MACRO + db $10 | (\1 - 1) +ENDM + +D_: MACRO + db $20 | (\1 - 1) +ENDM + +D#: MACRO + db $30 | (\1 - 1) +ENDM + +E_: MACRO + db $40 | (\1 - 1) +ENDM + +F_: MACRO + db $50 | (\1 - 1) +ENDM + +F#: MACRO + db $60 | (\1 - 1) +ENDM + +G_: MACRO + db $70 | (\1 - 1) +ENDM + +G#: MACRO + db $80 | (\1 - 1) +ENDM + +A_: MACRO + db $90 | (\1 - 1) +ENDM + +A#: MACRO + db $A0 | (\1 - 1) +ENDM + +B_: MACRO + db $B0 | (\1 - 1) +ENDM + +;format: instrument length (in 16ths) +snare1: MACRO + db $B0 | (\1 - 1) + db $01 +ENDM + +snare2: MACRO + db $B0 | (\1 - 1) + db $02 +ENDM + +snare3: MACRO + db $B0 | (\1 - 1) + db $03 +ENDM + +snare4: MACRO + db $B0 | (\1 - 1) + db $04 +ENDM + +snare5: MACRO + db $B0 | (\1 - 1) + db $05 +ENDM + +triangle1: MACRO + db $B0 | (\1 - 1) + db $06 +ENDM + +triangle2: MACRO + db $B0 | (\1 - 1) + db $07 +ENDM + +snare6: MACRO + db $B0 | (\1 - 1) + db $08 +ENDM + +snare7: MACRO + db $B0 | (\1 - 1) + db $09 +ENDM + +snare8: MACRO + db $B0 | (\1 - 1) + db $0A +ENDM + +snare9: MACRO + db $B0 | (\1 - 1) + db $0B +ENDM + +cymbal1: MACRO + db $B0 | (\1 - 1) + db $0C +ENDM + +cymbal2: MACRO + db $B0 | (\1 - 1) + db $0D +ENDM + +cymbal3: MACRO + db $B0 | (\1 - 1) + db $0E +ENDM + +mutedsnare1: MACRO + db $B0 | (\1 - 1) + db $0F +ENDM + +triangle3: MACRO + db $B0 | (\1 - 1) + db $10 +ENDM + +mutedsnare2: MACRO + db $B0 | (\1 - 1) + db $11 +ENDM + +mutedsnare3: MACRO + db $B0 | (\1 - 1) + db $12 +ENDM + +mutedsnare4: MACRO + db $B0 | (\1 - 1) + db $13 +ENDM + +;format: rest length (in 16ths) +rest: MACRO + db $C0 | (\1 - 1) +ENDM + +; format: notetype speed, volume, fade +notetype: MACRO + db $D0 | \1 + db (\2 << 4) | \3 +ENDM + +dspeed: MACRO + db $D0 | \1 +ENDM + +octave: MACRO + db $E8 - \1 +ENDM + +toggleperfectpitch: MACRO + db $E8 +ENDM + +;format: vibrato delay, rate, depth +vibrato: MACRO + db $EA + db \1 + db (\2 << 4) | \3 +ENDM + +pitchbend: MACRO + db $EB + db \1 + db \2 +ENDM + +duty: MACRO + db $EC + db \1 +ENDM + +tempo: MACRO + db $ED + db \1 / $100 + db \1 % $100 +ENDM + +stereopanning: MACRO + db $EE + db \1 +ENDM + +volume: MACRO + db $F0 + db (\1 << 4) | \2 +ENDM + +executemusic: MACRO + db $F8 +ENDM + +dutycycle: MACRO + db $FC + db \1 +ENDM + +;format: callchannel address +callchannel: MACRO + db $FD + dw \1 +ENDM + +;format: loopchannel count, address +loopchannel: MACRO + db $FE + db \1 + dw \2 +ENDM + +endchannel: MACRO + db $FF +ENDM diff --git a/macros/data_macros.asm b/macros/data_macros.asm new file mode 100755 index 00000000..e24ae20e --- /dev/null +++ b/macros/data_macros.asm @@ -0,0 +1,220 @@ + +; Constant enumeration is useful for monsters, items, moves, etc. +const_def: MACRO +const_value = 0 +ENDM + +const: MACRO +\1 EQU const_value +const_value = const_value + 1 +ENDM + +; data format macros + +percent EQUS "* $ff / 100" + +bcd2: MACRO + dn ((\1) / 1000) % 10, ((\1) / 100) % 10 + dn ((\1) / 10) % 10, (\1) % 10 +ENDM + +bcd3: MACRO + dn ((\1) / 100000) % 10, ((\1) / 10000) % 10 + dn ((\1) / 1000) % 10, ((\1) / 100) % 10 + dn ((\1) / 10) % 10, (\1) % 10 +ENDM + +coins equs "bcd2" +money equs "bcd3" + +;\1 = Map Width +;\2 = Rows above (Y-blocks) +;\3 = X movement (X-blocks) +EVENT_DISP: MACRO + dw (wOverworldMap + 7 + (\1) + ((\1) + 6) * ((\2) >> 1) + ((\3) >> 1)) ; Ev.Disp + db \2,\3 ;Y,X +ENDM + +FLYWARP_DATA: MACRO + EVENT_DISP \1,\2,\3 + db ((\2) & $01) ;sub-block Y + db ((\3) & $01) ;sub-block X +ENDM + +; external map entry macro +EMAP: MACRO ; emap x-coordinate,y-coordinate,textpointer +; the appearance of towns and routes in the town map, indexed by map id + ; nybble: y-coordinate + ; nybble: x-coordinate + ; word : pointer to map name + dn \2, \1 + dw \3 +ENDM + +; internal map entry macro +IMAP: MACRO ; imap mapid_less_than,x-coordinate,y-coordinate,textpointer +; the appearance of buildings and dungeons in the town map + ; byte : maximum map id subject to this rule + ; nybble: y-coordinate + ; nybble: x-coordinate + ; word : pointer to map name + db \1 + 1 + dn \3, \2 + dw \4 +ENDM + +; tilesets' headers macro +tileset: MACRO + db BANK(\2) ; BANK(GFX) + dw \1, \2, \3 ; Block, GFX, Coll + db \4, \5, \6 ; counter tiles + db \7 ; grass tile + db \8 ; permission (indoor, cave, outdoor) +ENDM + +INDOOR EQU 0 +CAVE EQU 1 +OUTDOOR EQU 2 + +RGB: MACRO + dw (\3 << 10 | \2 << 5 | \1) +ENDM + +WALK EQU $FE +STAY EQU $FF + +DOWN EQU $D0 +UP EQU $D1 +LEFT EQU $D2 +RIGHT EQU $D3 +NONE EQU $FF + +;\1 sprite id +;\2 x position +;\3 y position +;\4 movement (WALK/STAY) +;\5 range or direction +;\6 text id +;\7 items only: item id +;\7 trainers only: trainer class/pokemon id +;\8 trainers only: trainer number/pokemon level +object: MACRO + db \1 + db \3 + 4 + db \2 + 4 + db \4 + db \5 + IF (_NARG > 7) + db TRAINER | \6 + db \7 + db \8 + ELSE + IF (_NARG > 6) + db ITEM | \6 + db \7 + ELSE + db \6 + ENDC + ENDC +ENDM + +;\1 (byte) = current map id +;\2 (byte) = connected map id +;\3 (byte) = x movement of connection strip +;\4 (byte) = connection strip offset +;\5 (word) = connected map blocks pointer +NORTH_MAP_CONNECTION: MACRO + db \2 ; map id + dw \5 + (\2_WIDTH * (\2_HEIGHT - 3)) + \4; "Connection Strip" location + dw wOverworldMap + 3 + \3 ; current map position + IF (\1_WIDTH < \2_WIDTH) + db \1_WIDTH - \3 + 3 ; width of connection strip + ELSE + db \2_WIDTH - \4 ; width of connection strip + ENDC + db \2_WIDTH ; map width + db (\2_HEIGHT * 2) - 1 ; y alignment (y coordinate of player when entering map) + db (\3 - \4) * -2 ; x alignment (x coordinate of player when entering map) + dw wOverworldMap + 1 + (\2_HEIGHT * (\2_WIDTH + 6)) ; window (position of the upper left block after entering the map) +ENDM + +;\1 (byte) = current map id +;\2 (byte) = connected map id +;\3 (byte) = x movement of connection strip +;\4 (byte) = connection strip offset +;\5 (word) = connected map blocks pointer +;\6 (flag) = add 3 to width of connection strip (why?) +SOUTH_MAP_CONNECTION: MACRO + db \2 ; map id + dw \5 + \4 ; "Conection Strip" location + dw wOverworldMap + 3 + (\1_HEIGHT + 3) * (\1_WIDTH + 6) + \3 ; current map position + IF (\1_WIDTH < \2_WIDTH) + IF (_NARG > 5) + db \1_WIDTH - \3 + 3 ; width of connection strip + ELSE + db \1_WIDTH - \3 ; width of connection strip + ENDC + ELSE + db \2_WIDTH - \4 ; width of connection strip + ENDC + db \2_WIDTH ; map width + db 0 ; y alignment (y coordinate of player when entering map) + db (\3 - \4) * -2 ; x alignment (x coordinate of player when entering map) + dw wOverworldMap + 7 + \2_WIDTH ; window (position of the upper left block after entering the map) +ENDM + +;\1 (byte) = current map id +;\2 (byte) = connected map id +;\3 (byte) = y movement of connection strip +;\4 (byte) = connection strip offset +;\5 (word) = connected map blocks pointer +WEST_MAP_CONNECTION: MACRO + db \2 ; map id + dw \5 + (\2_WIDTH * \4) + \2_WIDTH - 3 ; "Connection Strip" location + dw wOverworldMap + (\1_WIDTH + 6) * (\3 + 3) ; current map position + IF (\1_HEIGHT < \2_HEIGHT) + db \1_HEIGHT - \3 + 3 ; height of connection strip + ELSE + db \2_HEIGHT - \4 ; height of connection strip + ENDC + db \2_WIDTH ; map width + db (\3 - \4) * -2 ; y alignment + db (\2_WIDTH * 2) - 1 ; x alignment + dw wOverworldMap + 6 + (2 * \2_WIDTH) ; window (position of the upper left block after entering the map) +ENDM + +;\1 (byte) = current map id +;\2 (byte) = connected map id +;\3 (byte) = y movement of connection strip +;\4 (byte) = connection strip offset +;\5 (word) = connected map blocks pointer +;\6 (flag) = add 3 to height of connection strip (why?) +EAST_MAP_CONNECTION: MACRO + db \2 ; map id + dw \5 + (\2_WIDTH * \4) ; "Connection Strip" location + dw wOverworldMap - 3 + (\1_WIDTH + 6) * (\3 + 4) ; current map position + IF (\1_HEIGHT < \2_HEIGHT) + IF (_NARG > 5) + db \1_HEIGHT - \3 + 3 ; height of connection strip + ELSE + db \1_HEIGHT - \3 ; height of connection strip + ENDC + ELSE + db \2_HEIGHT - \4 ; height of connection strip + ENDC + db \2_WIDTH ; map width + db (\3 - \4) * -2 ; y alignment + db 0 ; x alignment + dw wOverworldMap + 7 + \2_WIDTH ; window (position of the upper left block after entering the map) +ENDM + +tmlearn: MACRO +x = 0 + REPT _NARG +IF \1 != 0 +x = x | (1 << ((\1 - 1) % 8)) +ENDC + SHIFT + ENDR + db x +ENDM diff --git a/macros/event_macros.asm b/macros/event_macros.asm new file mode 100755 index 00000000..20027209 --- /dev/null +++ b/macros/event_macros.asm @@ -0,0 +1,441 @@ +;\1 = event index +;\2 = return result in carry instead of zero flag +CheckEvent: MACRO +event_byte = ((\1) / 8) + ld a, [wEventFlags + event_byte] + + IF _NARG > 1 + IF ((\1) % 8) == 7 + add a + ELSE + REPT ((\1) % 8) + 1 + rrca + ENDR + ENDC + ELSE + bit (\1) % 8, a + ENDC + ENDM + +;\1 = event index +CheckEventReuseA: MACRO + IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld a, [wEventFlags + event_byte] + ENDC + + bit (\1) % 8, a + ENDM + +;\1 = event index +;\2 = event index of the last event used before the branch +CheckEventAfterBranchReuseA: MACRO +event_byte = ((\2) / 8) + IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld a, [wEventFlags + event_byte] + ENDC + + bit (\1) % 8, a + ENDM + +;\1 = reg +;\2 = event index +;\3 = event index this event is relative to (optional, this is needed when there is a fixed flag address) +EventFlagBit: MACRO + IF _NARG > 2 + ld \1, ((\3) % 8) + ((\2) - (\3)) + ELSE + ld \1, (\2) % 8 + ENDC + ENDM + +;\1 = reg +;\2 = event index +EventFlagAddress: MACRO +event_byte = ((\2) / 8) + ld \1, wEventFlags + event_byte + ENDM + +;\1 = event index +CheckEventHL: MACRO +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + bit (\1) % 8, [hl] + ENDM + +;\1 = event index +CheckEventReuseHL: MACRO +IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + bit (\1) % 8, [hl] + ENDM + +; dangerous, only use when HL is guaranteed to be the desired value +;\1 = event index +CheckEventForceReuseHL: MACRO +event_byte = ((\1) / 8) + bit (\1) % 8, [hl] + ENDM + +;\1 = event index +;\2 = event index of the last event used before the branch +CheckEventAfterBranchReuseHL: MACRO +event_byte = ((\2) / 8) +IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + bit (\1) % 8, [hl] + ENDM + +;\1 = event index +CheckAndSetEvent: MACRO +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + bit (\1) % 8, [hl] + set (\1) % 8, [hl] + ENDM + +;\1 = event index +CheckAndResetEvent: MACRO +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + bit (\1) % 8, [hl] + res (\1) % 8, [hl] + ENDM + +;\1 = event index +CheckAndSetEventA: MACRO + ld a, [wEventFlags + ((\1) / 8)] + bit (\1) % 8, a + set (\1) % 8, a + ld [wEventFlags + ((\1) / 8)], a + ENDM + +;\1 = event index +CheckAndResetEventA: MACRO + ld a, [wEventFlags + ((\1) / 8)] + bit (\1) % 8, a + res (\1) % 8, a + ld [wEventFlags + ((\1) / 8)], a + ENDM + +;\1 = event index +SetEvent: MACRO +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + set (\1) % 8, [hl] + ENDM + +;\1 = event index +SetEventReuseHL: MACRO + IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + set (\1) % 8, [hl] + ENDM + +;\1 = event index +;\2 = event index of the last event used before the branch +SetEventAfterBranchReuseHL: MACRO +event_byte = ((\2) / 8) +IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + set (\1) % 8, [hl] + ENDM + +; dangerous, only use when HL is guaranteed to be the desired value +;\1 = event index +SetEventForceReuseHL: MACRO +event_byte = ((\1) / 8) + set (\1) % 8, [hl] + ENDM + +;\1 = event index +;\2 = event index +;\3, \4, ... = additional (optional) event indices +SetEvents: MACRO + SetEvent \1 + rept (_NARG + -1) + SetEventReuseHL \2 + shift + endr + ENDM + +;\1 = event index +ResetEvent: MACRO +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + res (\1) % 8, [hl] + ENDM + +;\1 = event index +ResetEventReuseHL: MACRO + IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + res (\1) % 8, [hl] + ENDM + +;\1 = event index +;\2 = event index of the last event used before the branch +ResetEventAfterBranchReuseHL: MACRO +event_byte = ((\2) / 8) +IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + res (\1) % 8, [hl] + ENDM + +; dangerous, only use when HL is guaranteed to be the desired value +;\1 = event index +ResetEventForceReuseHL: MACRO +event_byte = ((\1) / 8) + res (\1) % 8, [hl] + ENDM + +;\1 = event index +;\2 = event index +;\3 = event index (optional) +ResetEvents: MACRO + ResetEvent \1 + rept (_NARG + -1) + ResetEventReuseHL \2 + shift + endr + ENDM + +;\1 = event index +;\2 = number of bytes away from the base address (optional, for matching the ROM) +dbEventFlagBit: MACRO + IF _NARG > 1 + db ((\1) % 8) + ((\2) * 8) + ELSE + db ((\1) % 8) + ENDC + ENDM + +;\1 = event index +;\2 = number of bytes away from the base address (optional, for matching the ROM) +dwEventFlagAddress: MACRO + IF _NARG > 1 + dw wEventFlags + ((\1) / 8) - (\2) + ELSE + dw wEventFlags + ((\1) / 8) + ENDC + ENDM + +;\1 = start +;\2 = end +SetEventRange: MACRO +event_start_byte = ((\1) / 8) +event_end_byte = ((\2) / 8) + + IF event_end_byte < event_start_byte + FAIL "Incorrect argument order in SetEventRange." + ENDC + + IF event_start_byte == event_end_byte + ld a, [wEventFlags + event_start_byte] + or (1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8)) + ld [wEventFlags + event_start_byte], a + ELSE +event_fill_start = event_start_byte + 1 +event_fill_count = event_end_byte - event_start_byte - 1 + + IF ((\1) % 8) == 0 +event_fill_start = event_fill_start + -1 +event_fill_count = event_fill_count + 1 + ELSE + ld a, [wEventFlags + event_start_byte] + or $ff - ((1 << ((\1) % 8)) - 1) + ld [wEventFlags + event_start_byte], a + ENDC + + IF ((\2) % 8) == 7 +event_fill_count = event_fill_count + 1 + ENDC + + IF event_fill_count == 1 + ld hl, wEventFlags + event_fill_start + ld [hl], $ff + ENDC + + IF event_fill_count > 1 + ld a, $ff + ld hl, wEventFlags + event_fill_start + + REPT event_fill_count + -1 + ld [hli], a + ENDR + + ld [hl], a + ENDC + + IF ((\2) % 8) == 0 + ld hl, wEventFlags + event_end_byte + set 0, [hl] + ELSE + IF ((\2) % 8) != 7 + ld a, [wEventFlags + event_end_byte] + or (1 << (((\2) % 8) + 1)) - 1 + ld [wEventFlags + event_end_byte], a + ENDC + ENDC + ENDC + ENDM + +;\1 = start +;\2 = end +;\3 = assume a is 0 if present +ResetEventRange: MACRO +event_start_byte = ((\1) / 8) +event_end_byte = ((\2) / 8) + + IF event_end_byte < event_start_byte + FAIL "Incorrect argument order in ResetEventRange." + ENDC + + IF event_start_byte == event_end_byte + ld a, [wEventFlags + event_start_byte] + and ~((1 << (((\2) % 8) + 1)) - (1 << ((\1) % 8))) & $ff + ld [wEventFlags + event_start_byte], a + ELSE +event_fill_start = event_start_byte + 1 +event_fill_count = event_end_byte - event_start_byte - 1 + + IF ((\1) % 8) == 0 +event_fill_start = event_fill_start + -1 +event_fill_count = event_fill_count + 1 + ELSE + ld a, [wEventFlags + event_start_byte] + and ~($ff - ((1 << ((\1) % 8)) - 1)) & $ff + ld [wEventFlags + event_start_byte], a + ENDC + + IF ((\2) % 8) == 7 +event_fill_count = event_fill_count + 1 + ENDC + + IF event_fill_count == 1 + ld hl, wEventFlags + event_fill_start + ld [hl], 0 + ENDC + + IF event_fill_count > 1 + ld hl, wEventFlags + event_fill_start + + ; force xor a if we just to wrote to it above + IF (_NARG < 3) || (((\1) % 8) != 0) + xor a + ENDC + + REPT event_fill_count + -1 + ld [hli], a + ENDR + + ld [hl], a + ENDC + + IF ((\2) % 8) == 0 + ld hl, wEventFlags + event_end_byte + res 0, [hl] + ELSE + IF ((\2) % 8) != 7 + ld a, [wEventFlags + event_end_byte] + and ~((1 << (((\2) % 8) + 1)) - 1) & $ff + ld [wEventFlags + event_end_byte], a + ENDC + ENDC + ENDC + ENDM + +; returns whether both events are set in Z flag +; This is counter-intuitive because the other event checks set the Z flag when +; the event is not set, but this sets the Z flag when the event is set. +;\1 = event index 1 +;\2 = event index 2 +;\3 = try to reuse a (optional) +CheckBothEventsSet: MACRO + IF ((\1) / 8) == ((\2) / 8) + IF (_NARG < 3) || (((\1) / 8) != event_byte) +event_byte = ((\1) / 8) + ld a, [wEventFlags + ((\1) / 8)] + ENDC + and (1 << ((\1) % 8)) | (1 << ((\2) % 8)) + cp (1 << ((\1) % 8)) | (1 << ((\2) % 8)) + ELSE + ; This case doesn't happen in the original ROM. + IF ((\1) % 8) == ((\2) % 8) + push hl + ld a, [wEventFlags + ((\1) / 8)] + ld hl, wEventFlags + ((\2) / 8) + and [hl] + cpl + bit ((\1) % 8), a + pop hl + ELSE + push bc + ld a, [wEventFlags + ((\1) / 8)] + and (1 << ((\1) % 8)) + ld b, a + ld a, [wEventFlags + ((\2) / 8)] + and (1 << ((\2) % 8)) + or b + cp (1 << ((\1) % 8)) | (1 << ((\2) % 8)) + pop bc + ENDC + ENDC + ENDM + +; returns the complement of whether either event is set in Z flag +;\1 = event index 1 +;\2 = event index 2 +CheckEitherEventSet: MACRO + IF ((\1) / 8) == ((\2) / 8) + ld a, [wEventFlags + ((\1) / 8)] + and (1 << ((\1) % 8)) | (1 << ((\2) % 8)) + ELSE + ; This case doesn't happen in the original ROM. + IF ((\1) % 8) == ((\2) % 8) + push hl + ld a, [wEventFlags + ((\1) / 8)] + ld hl, wEventFlags + ((\2) / 8) + or [hl] + bit ((\1) % 8), a + pop hl + ELSE + push bc + ld a, [wEventFlags + ((\1) / 8)] + and (1 << ((\1) % 8)) + ld b, a + ld a, [wEventFlags + ((\2) / 8)] + and (1 << ((\2) % 8)) + or b + pop bc + ENDC + ENDC + ENDM + +; for handling fixed event bits when events are inserted/removed +;\1 = event index +;\2 = fixed flag bit +AdjustEventBit: MACRO + IF ((\1) % 8) != (\2) + add ((\1) % 8) - (\2) + ENDC + ENDM diff --git a/macros/text_macros.asm b/macros/text_macros.asm new file mode 100755 index 00000000..21e02634 --- /dev/null +++ b/macros/text_macros.asm @@ -0,0 +1,80 @@ + +; text macros +text EQUS "db $00," ; Start writing text. +next EQUS "db $4e," ; Move a line down. +line EQUS "db $4f," ; Start writing at the bottom line. +para EQUS "db $51," ; Start a new paragraph. +cont EQUS "db $55," ; Scroll to the next line. +done EQUS "db $57" ; End a text box. +prompt EQUS "db $58" ; Prompt the player to end a text box (initiating some other event). + +page EQUS "db $49," ; Start a new Pokedex page. +dex EQUS "db $5f, $50" ; End a Pokedex entry. + +TX_RAM: MACRO +; prints text to screen +; \1: RAM address to read from + db $1 + dw \1 +ENDM + +TX_BCD: MACRO +; \1: RAM address to read from +; \2: number of bytes + print flags + db $2 + dw \1 + db \2 +ENDM + +TX_LINE EQUS "db $05" +TX_BLINK EQUS "db $06" +;TX_SCROLL EQUS "db $07" +TX_ASM EQUS "db $08" + +TX_NUM: MACRO +; print a big-endian decimal number. +; \1: address to read from +; \2: number of bytes to read +; \3: number of digits to display + db $09 + dw \1 + db \2 << 4 | \3 +ENDM + +TX_DELAY EQUS "db $0a" +TX_SFX_ITEM_1 EQUS "db $0b" +TX_SFX_LEVEL_UP EQUS "db $0b" +;TX_ELLIPSES EQUS "db $0c" +TX_WAIT EQUS "db $0d" +;TX_SFX_DEX_RATING EQUS "db $0e" +TX_SFX_ITEM_2 EQUS "db $10" +TX_SFX_KEY_ITEM EQUS "db $11" +TX_SFX_CAUGHT_MON EQUS "db $12" +TX_SFX_DEX_PAGE_ADDED EQUS "db $13" +TX_CRY_NIDORINA EQUS "db $14" +TX_CRY_PIDGEOT EQUS "db $15" +;TX_CRY_DEWGONG EQUS "db $16" + +TX_FAR: MACRO + db $17 + dw \1 + db BANK(\1) +ENDM + +TX_VENDING_MACHINE EQUS "db $f5" +TX_CABLE_CLUB_RECEPTIONIST EQUS "db $f6" +TX_PRIZE_VENDOR EQUS "db $f7" +TX_POKECENTER_PC EQUS "db $f9" +TX_PLAYERS_PC EQUS "db $fc" +TX_BILLS_PC EQUS "db $fd" + +TX_MART: MACRO + db $FE, _NARG + REPT _NARG + db \1 + SHIFT + ENDR + db $FF +ENDM + +TX_POKECENTER_NURSE EQUS "db $ff" @@ -11,61 +11,14 @@ PICS_3 EQU $B PICS_4 EQU $C PICS_5 EQU $D - INCLUDE "home.asm" -SECTION "bank1",ROMX,BANK[$1] +SECTION "bank1",ROMX[$4000],BANK[$1] INCLUDE "data/facing.asm" -ResetStatusAndHalveMoneyOnBlackout:: -; Reset player status on blackout. - xor a - ld [wBattleResult], a - ld [wWalkBikeSurfState], a - ld [W_ISINBATTLE], a - ld [wMapPalOffset], a - ld [wNPCMovementScriptFunctionNum], a - ld [hJoyHeld], a - ld [wNPCMovementScriptPointerTableNum], a - ld [wFlags_0xcd60], a - - ld [$ff9f], a - ld [$ff9f + 1], a - ld [$ff9f + 2], a - call HasEnoughMoney - jr c, .lostmoney ; never happens - - ; Halve the player's money. - ld a, [wPlayerMoney] - ld [$ff9f], a - ld a, [wPlayerMoney + 1] - ld [$ff9f + 1], a - ld a, [wPlayerMoney + 2] - ld [$ff9f + 2], a - xor a - ld [$ffa2], a - ld [$ffa3], a - ld a, 2 - ld [$ffa4], a - predef DivideBCDPredef3 - ld a, [$ffa2] - ld [wPlayerMoney], a - ld a, [$ffa2 + 1] - ld [wPlayerMoney + 1], a - ld a, [$ffa2 + 2] - ld [wPlayerMoney + 2], a - -.lostmoney - ld hl, wd732 - set 2, [hl] - res 3, [hl] - set 6, [hl] - ld a, %11111111 - ld [wJoyIgnore], a - predef_jump HealParty - +INCLUDE "engine/black_out.asm" MewPicFront:: INCBIN "pic/bmon/mew.pic" MewPicBack:: INCBIN "pic/monback/mewb.pic" @@ -74,884 +27,41 @@ INCLUDE "data/baseStats/mew.asm" INCLUDE "engine/battle/safari_zone.asm" INCLUDE "engine/titlescreen.asm" - -NintenText: db "NINTEN@" -SonyText: db "SONY@" - - -LoadMonData_: -; Load monster [wWhichPokemon] from list [wcc49]: -; 0: partymon -; 1: enemymon -; 2: boxmon -; 3: daycaremon -; Return monster id at wcf91 and its data at wLoadedMon. -; Also load base stats at W_MONHDEXNUM for convenience. - - ld a, [wDayCareMonSpecies] - ld [wcf91], a - ld a, [wcc49] - cp 3 - jr z, .GetMonHeader - - ld a, [wWhichPokemon] - ld e, a - callab GetMonSpecies - -.GetMonHeader - ld a, [wcf91] - ld [wd0b5], a ; input for GetMonHeader - call GetMonHeader - - ld hl, wPartyMons - ld bc, wPartyMon2 - wPartyMon1 - ld a, [wcc49] - cp 1 - jr c, .getMonEntry - - ld hl, wEnemyMons - jr z, .getMonEntry - - cp 2 - ld hl, wBoxMons - ld bc, wBoxMon2 - wBoxMon1 - jr z, .getMonEntry - - ld hl, wDayCareMon - jr .copyMonData - -.getMonEntry - ld a, [wWhichPokemon] - call AddNTimes - -.copyMonData - ld de, wLoadedMon - ld bc, wPartyMon2 - wPartyMon1 - jp CopyData - +INCLUDE "engine/load_mon_data.asm" INCLUDE "data/item_prices.asm" INCLUDE "text/item_names.asm" - -UnusedNames: - db "かみなりバッヂ@" - db "かいがらバッヂ@" - db "おじぞうバッヂ@" - db "はやぶさバッヂ@" - db "ひんやりバッヂ@" - db "なかよしバッヂ@" - db "バラバッヂ@" - db "ひのたまバッヂ@" - db "ゴールドバッヂ@" - db "たまご@" - db "ひよこ@" - db "ブロンズ@" - db "シルバー@" - db "ゴールド@" - db "プチキャプテン@" - db "キャプテン@" - db "プチマスター@" - db "マスター@" - db "エクセレント" +INCLUDE "text/unused_names.asm" INCLUDE "engine/overworld/oam.asm" INCLUDE "engine/oam_dma.asm" -PrintWaitingText: - hlCoord 3, 10 - ld b, $1 - ld c, $b - ld a, [W_ISINBATTLE] - and a - jr z, .asm_4c17 - call TextBoxBorder - jr .asm_4c1a -.asm_4c17 - call CableClub_TextBoxBorder -.asm_4c1a - hlCoord 4, 11 - ld de, WaitingText - call PlaceString - ld c, 50 - jp DelayFrames - -WaitingText: - db "Waiting...!@" - - -_UpdateSprites: ; 4c34 (1:4c34) - ld h, $c1 - inc h - ld a, $e ; wSpriteStateData2 + $0e -.spriteLoop - ld l, a - sub $e - ld c, a - ld [H_CURRENTSPRITEOFFSET], a - ld a, [hl] - and a - jr z, .skipSprite ; tests $c2Xe - push hl - push de - push bc - call .updateCurrentSprite - pop bc - pop de - pop hl -.skipSprite - ld a, l - add $10 ; move to next sprite - cp $e ; test for overflow (back at $0e) - jr nz, .spriteLoop - ret -.updateCurrentSprite ; 4c54 (1:4c54) - cp $1 - jp nz, UpdateNonPlayerSprite - jp UpdatePlayerSprite - -UpdateNonPlayerSprite: - dec a - swap a - ld [$ff93], a ; $10 * sprite# - ld a, [wNPCMovementScriptSpriteOffset] ; some sprite offset? - ld b, a - ld a, [H_CURRENTSPRITEOFFSET] - cp b - jr nz, .unequal - jp Func_5236 -.unequal - jp Func_4ed1 - -; This detects if the current sprite (whose offset is at H_CURRENTSPRITEOFFSET) -; is going to collide with another sprite by looping over the other sprites. -; The current sprite's offset will be labelled with i (e.g. $c1i0). -; The loop sprite's offset will labelled with j (e.g. $c1j0). -; -; Note that the Y coordinate of the sprite (in [$c1k4]) is one of the following -; 9 values when the sprite is aligned with the grid: $fc, $0c, $1c, $2c, ..., $7c. -; The reason that 4 is added below to the coordinate is to make it align with a -; multiple of $10 to make comparisons easier. -DetectCollisionBetweenSprites: - nop - - ld h, wSpriteStateData1 / $100 - ld a, [H_CURRENTSPRITEOFFSET] - add wSpriteStateData1 % $100 - ld l, a - - ld a, [hl] ; a = [$c1i0] (picture) (0 if slot is unused) - and a ; is this sprite slot slot used? - ret z ; return if not used - - ld a, l - add 3 - ld l, a - - ld a, [hli] ; a = [$c1i3] (delta Y) (-1, 0, or 1) - call SetSpriteCollisionValues - - ld a, [hli] ; a = [$C1i4] (Y screen coordinate) - add 4 ; align with multiple of $10 - -; The effect of the following 3 lines is to -; add 7 to a if moving south or -; subtract 7 from a if moving north. - add b - and $f0 - or c - - ld [$ff90], a ; store Y coordinate adjusted for direction of movement - - ld a, [hli] ; a = [$c1i5] (delta X) (-1, 0, or 1) - call SetSpriteCollisionValues - ld a, [hl] ; a = [$C1i6] (X screen coordinate) - -; The effect of the following 3 lines is to -; add 7 to a if moving east or -; subtract 7 from a if moving west. - add b - and $f0 - or c - - ld [$ff91], a ; store X coordinate adjusted for direction of movement - - ld a, l - add 7 - ld l, a - - xor a - ld [hld], a ; zero [$c1id] XXX what's [$c1id] for? - ld [hld], a ; zero [$c1ic] (directions in which collisions occurred) - - ld a, [$ff91] - ld [hld], a ; [$c1ib] = adjusted X coordiate - ld a, [$ff90] - ld [hl], a ; [$c1ia] = adjusted Y coordinate - - xor a ; zero the loop counter - -.loop - ld [$ff8f], a ; store loop counter - swap a - ld e, a - ld a, [H_CURRENTSPRITEOFFSET] - cp e ; does the loop sprite match the current sprite? - jp z, .next ; go to the next sprite if they match - - ld d, h - ld a, [de] ; a = [$c1j0] (picture) (0 if slot is unused) - and a ; is this sprite slot slot used? - jp z, .next ; go the next sprite if not used - - inc e - inc e - ld a, [de] ; a = [$c1j2] ($ff means the sprite is offscreen) - inc a - jp z, .next ; go the next sprite if offscreen - - ld a, [H_CURRENTSPRITEOFFSET] - add 10 - ld l, a - - inc e - ld a, [de] ; a = [$c1j3] (delta Y) - call SetSpriteCollisionValues - - inc e - ld a, [de] ; a = [$C1j4] (Y screen coordinate) - add 4 ; align with multiple of $10 - -; The effect of the following 3 lines is to -; add 7 to a if moving south or -; subtract 7 from a if moving north. - add b - and $f0 - or c - - sub [hl] ; subtract the adjusted Y coordinate of sprite i ([$c1ia]) from that of sprite j - -; calculate the absolute value of the difference to get the distance - jr nc, .noCarry1 - cpl - inc a -.noCarry1 - ld [$ff90], a ; store the distance between the two sprites' adjusted Y values - -; Use the carry flag set by the above subtraction to determine which sprite's -; Y coordinate is larger. This information is used later to set [$c1ic], -; which stores which direction the collision occurred in. -; The following 5 lines set the lowest 2 bits of c, which are later shifted left by 2. -; If sprite i's Y is larger, set lowest 2 bits of c to 10. -; If sprite j's Y is larger or both are equal, set lowest 2 bits of c to 01. - push af - rl c - pop af - ccf - rl c - -; If sprite i's delta Y is 0, then b = 7, else b = 9. - ld b, 7 - ld a, [hl] ; a = [$c1ia] (adjusted Y coordinate) - and $f - jr z, .next1 - ld b, 9 - -.next1 - ld a, [$ff90] ; a = distance between adjusted Y coordinates - sub b - ld [$ff92], a ; store distance adjusted using sprite i's direction - ld a, b - ld [$ff90], a ; store 7 or 9 depending on sprite i's delta Y - jr c, .checkXDistance - -; If sprite j's delta Y is 0, then b = 7, else b = 9. - ld b, 7 - dec e - ld a, [de] ; a = [$c1j3] (delta Y) - inc e - and a - jr z, .next2 - ld b, 9 - -.next2 - ld a, [$ff92] ; a = distance adjusted using sprite i's direction - sub b ; adjust distance using sprite j's direction - jr z, .checkXDistance - jr nc, .next ; go to next sprite if distance is still positive after both adjustments - -.checkXDistance - inc e - inc l - ld a, [de] ; a = [$c1j5] (delta X) - - push bc - - call SetSpriteCollisionValues - inc e - ld a, [de] ; a = [$c1j6] (X screen coordinate) - -; The effect of the following 3 lines is to -; add 7 to a if moving east or -; subtract 7 from a if moving west. - add b - and $f0 - or c - - pop bc - - sub [hl] ; subtract the adjusted X coordinate of sprite i ([$c1ib]) from that of sprite j - -; calculate the absolute value of the difference to get the distance - jr nc, .noCarry2 - cpl - inc a -.noCarry2 - ld [$ff91], a ; store the distance between the two sprites' adjusted X values - -; Use the carry flag set by the above subtraction to determine which sprite's -; X coordinate is larger. This information is used later to set [$c1ic], -; which stores which direction the collision occurred in. -; The following 5 lines set the lowest 2 bits of c. -; If sprite i's X is larger, set lowest 2 bits of c to 10. -; If sprite j's X is larger or both are equal, set lowest 2 bits of c to 01. - push af - rl c - pop af - ccf - rl c - -; If sprite i's delta X is 0, then b = 7, else b = 9. - ld b, 7 - ld a, [hl] ; a = [$c1ib] (adjusted X coordinate) - and $f - jr z, .next3 - ld b, 9 - -.next3 - ld a, [$ff91] ; a = distance between adjusted X coordinates - sub b - ld [$ff92], a ; store distance adjusted using sprite i's direction - ld a, b - ld [$ff91], a ; store 7 or 9 depending on sprite i's delta X - jr c, .collision - -; If sprite j's delta X is 0, then b = 7, else b = 9. - ld b, 7 - dec e - ld a, [de] ; a = [$c1j5] (delta X) - inc e - and a - jr z, .next4 - ld b, 9 - -.next4 - ld a, [$ff92] ; a = distance adjusted using sprite i's direction - sub b ; adjust distance using sprite j's direction - jr z, .collision - jr nc, .next ; go to next sprite if distance is still positive after both adjustments - -.collision - ld a, [$ff91] ; a = 7 or 9 depending on sprite i's delta X - ld b, a - ld a, [$ff90] ; a = 7 or 9 depending on sprite i's delta Y - inc l - -; If delta X isn't 0 and delta Y is 0, then b = %0011, else b = %1100. -; (note that normally if delta X isn't 0, then delta Y must be 0 and vice versa) - cp b - jr c, .next5 - ld b, %1100 - jr .next6 -.next5 - ld b, %0011 - -.next6 - ld a, c ; c has 2 bits set (one of bits 0-1 is set for the X axis and one of bits 2-3 for the Y axis) - and b ; we select either the bit in bits 0-1 or bits 2-3 based on the calculation immediately above - or [hl] ; or with existing collision direction bits in [$c1ic] - ld [hl], a ; store new value - ld a, c ; useless code because a is overwritten before being used again - -; set bit in [$c1ie] or [$c1if] to indicate which sprite the collision occurred with - inc l - inc l - ld a, [$ff8f] ; a = loop counter - ld de, SpriteCollisionBitTable - add a - add e - ld e, a - jr nc, .noCarry3 - inc d -.noCarry3 - ld a, [de] - or [hl] - ld [hli], a - inc de - ld a, [de] - or [hl] - ld [hl], a - -.next - ld a, [$ff8f] ; a = loop counter - inc a - cp $10 - jp nz, .loop - ret - -; takes delta X or delta Y in a -; b = delta X/Y -; c = 0 if delta X/Y is 0 -; c = 7 if delta X/Y is 1 -; c = 9 if delta X/Y is -1 -SetSpriteCollisionValues: - and a - ld b, 0 - ld c, 0 - jr z, .done - ld c, 9 - cp -1 - jr z, .ok - ld c, 7 - ld a, 0 -.ok - ld b, a -.done - ret - -SpriteCollisionBitTable: - db %00000000,%00000001 - db %00000000,%00000010 - db %00000000,%00000100 - db %00000000,%00001000 - db %00000000,%00010000 - db %00000000,%00100000 - db %00000000,%01000000 - db %00000000,%10000000 - db %00000001,%00000000 - db %00000010,%00000000 - db %00000100,%00000000 - db %00001000,%00000000 - db %00010000,%00000000 - db %00100000,%00000000 - db %01000000,%00000000 - db %10000000,%00000000 - -TestBattle: - ret - -.loop - call GBPalNormal - - ; Don't mess around - ; with obedience. - ld a, %10000000 ; EARTHBADGE - ld [W_OBTAINEDBADGES], a - - ld hl, W_FLAGS_D733 - set 0, [hl] - - ; Reset the party. - ld hl, wPartyCount - xor a - ld [hli], a - dec a - ld [hl], a - - ; Give the player a - ; level 20 Rhydon. - ld a, RHYDON - ld [wcf91], a - ld a, 20 - ld [W_CURENEMYLVL], a - xor a - ld [wcc49], a - ld [W_CURMAP], a - call AddPartyMon - - ; Fight against a - ; level 20 Rhydon. - ld a, RHYDON - ld [W_CUROPPONENT], a - - predef InitOpponent - - ; When the battle ends, - ; do it all again. - ld a, 1 - ld [wUpdateSpritesEnabled], a - ld [H_AUTOBGTRANSFERENABLED], a - jr .loop +INCLUDE "engine/print_waiting_text.asm" + +INCLUDE "engine/overworld/map_sprite_functions1.asm" + +INCLUDE "engine/test_battle.asm" INCLUDE "engine/overworld/item.asm" INCLUDE "engine/overworld/movement.asm" INCLUDE "engine/cable_club.asm" -LoadTrainerInfoTextBoxTiles: ; 5ae6 (1:5ae6) - ld de, TrainerInfoTextBoxTileGraphics ; $7b98 - ld hl, vChars2 + $760 - ld bc, (BANK(TrainerInfoTextBoxTileGraphics) << 8) +$09 - jp CopyVideoData - INCLUDE "engine/menu/main_menu.asm" INCLUDE "engine/oak_speech.asm" -SpecialWarpIn: ; 62ce (1:62ce) - call LoadSpecialWarpData - predef LoadTilesetHeader - ld hl,wd732 - bit 2,[hl] ; dungeon warp or fly warp? - res 2,[hl] - jr z,.next -; if dungeon warp or fly warp - ld a,[wDestinationMap] - jr .next2 -.next - bit 1,[hl] - jr z,.next3 - call EmptyFunc -.next3 - ld a,0 -.next2 - ld b,a - ld a,[wd72d] - and a - jr nz,.next4 - ld a,b -.next4 - ld hl,wd732 - bit 4,[hl] ; dungeon warp? - ret nz -; if not dungeon warp - ld [wLastMap],a - ret - -; gets the map ID, tile block map view pointer, tileset, and coordinates -LoadSpecialWarpData: ; 62ff (1:62ff) - ld a, [wd72d] - cp BATTLE_CENTER - jr nz, .notBattleCenter - ld hl, BattleCenterSpec1 - ld a, [hSerialConnectionStatus] - cp USING_INTERNAL_CLOCK ; which gameboy is clocking determines who is on the left and who is on the right - jr z, .copyWarpData - ld hl, BattleCenterSpec2 - jr .copyWarpData -.notBattleCenter - cp TRADE_CENTER - jr nz, .notTradeCenter - ld hl, TradeCenterSpec1 - ld a, [hSerialConnectionStatus] - cp USING_INTERNAL_CLOCK - jr z, .copyWarpData - ld hl, TradeCenterSpec2 - jr .copyWarpData -.notTradeCenter - ld a, [wd732] - bit 1, a - jr nz, .notFirstMap - bit 2, a - jr nz, .notFirstMap - ld hl, FirstMapSpec -.copyWarpData - ld de, W_CURMAP - ld c, $7 -.copyWarpDataLoop - ld a, [hli] - ld [de], a - inc de - dec c - jr nz, .copyWarpDataLoop - ld a, [hli] - ld [W_CURMAPTILESET], a - xor a - jr .done -.notFirstMap - ld a, [wLastMap] - ld hl, wd732 - bit 4, [hl] ; used dungeon warp (jumped down hole/waterfall)? - jr nz, .usedDunegonWarp - bit 6, [hl] ; return to last pokemon center (or player's house)? - res 6, [hl] - jr z, .otherDestination -; return to last pokemon center or player's house - ld a, [wLastBlackoutMap] - jr .usedFlyWarp -.usedDunegonWarp - ld hl, wd72d - res 4, [hl] - ld a, [wDungeonWarpDestinationMap] - ld b, a - ld [W_CURMAP], a - ld a, [wWhichDungeonWarp] - ld c, a - ld hl, DungeonWarpList - ld de, $0 - ld a, $6 - ld [wd12f], a -.dungeonWarpListLoop - ld a, [hli] - cp b - jr z, .matchedDungeonWarpDestinationMap - inc hl - jr .nextDungeonWarp -.matchedDungeonWarpDestinationMap - ld a, [hli] - cp c - jr z, .matchedDungeonWarpID -.nextDungeonWarp - ld a, [wd12f] - add e - ld e, a - jr .dungeonWarpListLoop -.matchedDungeonWarpID - ld hl, DungeonWarpData - add hl, de - jr .copyWarpData2 -.otherDestination - ld a, [wDestinationMap] -.usedFlyWarp - ld b, a - ld [W_CURMAP], a - ld hl, FlyWarpDataPtr -.flyWarpDataPtrLoop - ld a, [hli] - inc hl - cp b - jr z, .foundFlyWarpMatch - inc hl - inc hl - jr .flyWarpDataPtrLoop -.foundFlyWarpMatch - ld a, [hli] - ld h, [hl] - ld l, a -.copyWarpData2 - ld de, wCurrentTileBlockMapViewPointer - ld c, $6 -.copyWarpDataLoop2 - ld a, [hli] - ld [de], a - inc de - dec c - jr nz, .copyWarpDataLoop2 - xor a ; OVERWORLD - ld [W_CURMAPTILESET], a -.done - ld [wYOffsetSinceLastSpecialWarp], a - ld [wXOffsetSinceLastSpecialWarp], a - ld a, $ff ; the player's coordinates have already been updated using a special warp, so don't use any of the normal warps - ld [wDestinationWarpID], a - ret - -INCLUDE "data/special_warps.asm" - -; This function appears to never be used. -; It is likely a debugging feature to give the player Tsunekazu Ishihara's -; favorite Pokemon. This is indicated by the overpowered Exeggutor, which -; Ishihara (president of Creatures Inc.) said was his favorite Pokemon in an ABC -; interview on February 8, 2000. -; "Exeggutor is my favorite. That's because I was always using this character -; while I was debugging the program." -; http://www.ign.com/articles/2000/02/09/abc-news-pokamon-chat-transcript - -SetIshiharaTeam: ; 64ca (1:64ca) - ld de, IshiharaTeam -.loop - ld a, [de] - cp $ff - ret z - ld [wcf91], a - inc de - ld a, [de] - ld [W_CURENEMYLVL], a - inc de - call AddPartyMon - jr .loop - -IshiharaTeam: ; 64df (1:64df) - db EXEGGUTOR,90 - db MEW,20 - db JOLTEON,56 - db DUGTRIO,56 - db ARTICUNO,57 - db $FF - -EmptyFunc: ; 64ea (1:64ea) - ret +INCLUDE "engine/special_warps.asm" + +INCLUDE "engine/debug1.asm" INCLUDE "engine/menu/naming_screen.asm" INCLUDE "engine/oak_speech2.asm" -; subtracts the amount the player paid from their money -; sets carry flag if there is enough money and unsets carry flag if not -SubtractAmountPaidFromMoney_: ; 6b21 (1:6b21) - ld de,wPlayerMoney - ld hl,$ff9f ; total price of items - ld c,3 ; length of money in bytes - call StringCmp - ret c - ld de,wPlayerMoney + 2 - ld hl,$ffa1 ; total price of items - ld c,3 ; length of money in bytes - predef SubBCDPredef ; subtract total price from money - ld a,MONEY_BOX - ld [wTextBoxID],a - call DisplayTextBoxID ; redraw money text box - and a - ret - -HandleItemListSwapping: ; 6b44 (1:6b44) - ld a,[wListMenuID] - cp a,ITEMLISTMENU - jp nz,DisplayListMenuIDLoop ; only rearrange item list menus - push hl - ld hl,wList - ld a,[hli] - ld h,[hl] - ld l,a - inc hl ; hl = beginning of list entries - ld a,[wCurrentMenuItem] - ld b,a - ld a,[wListScrollOffset] - add b - add a - ld c,a - ld b,0 - add hl,bc ; hl = address of currently selected item entry - ld a,[hl] - pop hl - inc a - jp z,DisplayListMenuIDLoop ; ignore attempts to swap the Cancel menu item - ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) - and a ; has the first item to swap already been chosen? - jr nz,.swapItems -; if not, set the currently selected item as the first item - ld a,[wCurrentMenuItem] - inc a - ld b,a - ld a,[wListScrollOffset] ; index of top (visible) menu item within the list - add b - ld [wMenuItemToSwap],a ; ID of item chosen for swapping (counts from 1) - ld c,20 - call DelayFrames - jp DisplayListMenuIDLoop -.swapItems - ld a,[wCurrentMenuItem] - inc a - ld b,a - ld a,[wListScrollOffset] - add b - ld b,a - ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) - cp b ; is the currently selected item the same as the first item to swap? - jp z,DisplayListMenuIDLoop ; ignore attempts to swap an item with itself - dec a - ld [wMenuItemToSwap],a ; ID of item chosen for swapping (counts from 1) - ld c,20 - call DelayFrames - push hl - push de - ld hl,wList - ld a,[hli] - ld h,[hl] - ld l,a - inc hl ; hl = beginning of list entries - ld d,h - ld e,l ; de = beginning of list entries - ld a,[wCurrentMenuItem] - ld b,a - ld a,[wListScrollOffset] - add b - add a - ld c,a - ld b,0 - add hl,bc ; hl = address of currently selected item entry - ld a,[wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) - add a - add e - ld e,a - jr nc,.noCarry - inc d -.noCarry ; de = address of first item to swap - ld a,[de] - ld b,a - ld a,[hli] - cp b - jr z,.swapSameItemType -.swapDifferentItems - ld [$ff95],a ; [$ff95] = second item ID - ld a,[hld] - ld [$ff96],a ; [$ff96] = second item quantity - ld a,[de] - ld [hli],a ; put first item ID in second item slot - inc de - ld a,[de] - ld [hl],a ; put first item quantity in second item slot - ld a,[$ff96] - ld [de],a ; put second item quantity in first item slot - dec de - ld a,[$ff95] - ld [de],a ; put second item ID in first item slot - xor a - ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped - pop de - pop hl - jp DisplayListMenuIDLoop -.swapSameItemType - inc de - ld a,[hl] - ld b,a - ld a,[de] - add b ; a = sum of both item quantities - cp a,100 ; is the sum too big for one item slot? - jr c,.combineItemSlots -; swap enough items from the first slot to max out the second slot if they can't be combined - sub a,99 - ld [de],a - ld a,99 - ld [hl],a - jr .done -.combineItemSlots - ld [hl],a ; put the sum in the second item slot - ld hl,wList - ld a,[hli] - ld h,[hl] - ld l,a - dec [hl] ; decrease the number of items - ld a,[hl] - ld [wd12a],a ; update number of items variable - cp a,1 - jr nz,.skipSettingMaxMenuItemID - ld [wMaxMenuItem],a ; if the number of items is only one now, update the max menu item ID -.skipSettingMaxMenuItemID - dec de - ld h,d - ld l,e - inc hl - inc hl ; hl = address of item after first item to swap -.moveItemsUpLoop ; erase the first item slot and move up all the following item slots to fill the gap - ld a,[hli] - ld [de],a - inc de - inc a ; reached the $ff terminator? - jr z,.afterMovingItemsUp - ld a,[hli] - ld [de],a - inc de - jr .moveItemsUpLoop -.afterMovingItemsUp - xor a - ld [wListScrollOffset],a - ld [wCurrentMenuItem],a -.done - xor a - ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped - pop de - pop hl - jp DisplayListMenuIDLoop +INCLUDE "engine/subtract_paid_money.asm" + +INCLUDE "engine/menu/swap_items.asm" INCLUDE "engine/overworld/pokemart.asm" @@ -959,1076 +69,24 @@ INCLUDE "engine/learn_move.asm" INCLUDE "engine/overworld/pokecenter.asm" -SetLastBlackoutMap: -; Set the map to return to when -; blacking out or using Teleport or Dig. -; Safari rest houses don't count. - - push hl - ld hl, SafariZoneRestHouses - ld a, [W_CURMAP] - ld b, a -.loop - ld a, [hli] - cp -1 - jr z, .notresthouse - cp b - jr nz, .loop - jr .done - -.notresthouse - ld a, [wLastMap] - ld [wLastBlackoutMap], a -.done - pop hl - ret - -SafariZoneRestHouses: - db SAFARI_ZONE_REST_HOUSE_2 - db SAFARI_ZONE_REST_HOUSE_3 - db SAFARI_ZONE_REST_HOUSE_4 - db -1 - -; function that performs initialization for DisplayTextID -DisplayTextIDInit: ; 7096 (1:7096) - xor a - ld [wListMenuID],a - ld a,[wAutoTextBoxDrawingControl] - bit 0,a - jr nz,.skipDrawingTextBoxBorder - ld a,[$ff8c] ; text ID (or sprite ID) - and a - jr nz,.notStartMenu -; if text ID is 0 (i.e. the start menu) -; Note that the start menu text border is also drawn in the function directly -; below this, so this seems unnecessary. - ld a,[wd74b] - bit 5,a ; does the player have the pokedex? -; start menu with pokedex - hlCoord 10, 0 - ld b,$0e - ld c,$08 - jr nz,.drawTextBoxBorder -; start menu without pokedex - hlCoord 10, 0 - ld b,$0c - ld c,$08 - jr .drawTextBoxBorder -; if text ID is not 0 (i.e. not the start menu) then do a standard dialogue text box -.notStartMenu - hlCoord 0, 12 - ld b,$04 - ld c,$12 -.drawTextBoxBorder - call TextBoxBorder -.skipDrawingTextBoxBorder - ld hl,wFontLoaded - set 0,[hl] - ld hl,wFlags_0xcd60 - bit 4,[hl] - res 4,[hl] - jr nz,.skipMovingSprites - call UpdateSprites ; move sprites -.skipMovingSprites -; loop to copy C1X9 (direction the sprite is facing) to C2X9 for each sprite -; this is done because when you talk to an NPC, they turn to look your way -; the original direction they were facing must be restored after the dialogue is over - ld hl,wSpriteStateData1 + $19 - ld c,$0f - ld de,$0010 -.spriteFacingDirectionCopyLoop - ld a,[hl] - inc h - ld [hl],a - dec h - add hl,de - dec c - jr nz,.spriteFacingDirectionCopyLoop -; loop to force all the sprites in the middle of animation to stand still -; (so that they don't like they're frozen mid-step during the dialogue) - ld hl,wSpriteStateData1 + 2 - ld de,$0010 - ld c,e -.spriteStandStillLoop - ld a,[hl] - cp a,$ff ; is the sprite visible? - jr z,.nextSprite -; if it is visible - and a,$fc - ld [hl],a -.nextSprite - add hl,de - dec c - jr nz,.spriteStandStillLoop - ld b,$9c ; window background address - call CopyScreenTileBufferToVRAM ; transfer background in WRAM to VRAM - xor a - ld [hWY],a ; put the window on the screen - call LoadFontTilePatterns - ld a,$01 - ld [H_AUTOBGTRANSFERENABLED],a ; enable continuous WRAM to VRAM transfer each V-blank - ret - -; function that displays the start menu -DrawStartMenu: ; 710b (1:710b) - ld a,[wd74b] - bit 5,a ; does the player have the pokedex? -; menu with pokedex - hlCoord 10, 0 - ld b,$0e - ld c,$08 - jr nz,.drawTextBoxBorder -; shorter menu if the player doesn't have the pokedex - hlCoord 10, 0 - ld b,$0c - ld c,$08 -.drawTextBoxBorder - call TextBoxBorder - ld a,%11001011 ; bit mask for down, up, start, B, and A buttons - ld [wMenuWatchedKeys],a - ld a,$02 - ld [wTopMenuItemY],a ; Y position of first menu choice - ld a,$0b - ld [wTopMenuItemX],a ; X position of first menu choice - ld a,[wcc2d] ; remembered menu selection from last time - ld [wCurrentMenuItem],a - ld [wLastMenuItem],a - xor a - ld [wcc37],a - ld hl,wd730 - set 6,[hl] ; no pauses between printing each letter - hlCoord 12, 2 - ld a,[wd74b] - bit 5,a ; does the player have the pokedex? -; case for not having pokdex - ld a,$06 - jr z,.storeMenuItemCount -; case for having pokedex - ld de,StartMenuPokedexText - call PrintStartMenuItem - ld a,$07 -.storeMenuItemCount - ld [wMaxMenuItem],a ; number of menu items - ld de,StartMenuPokemonText - call PrintStartMenuItem - ld de,StartMenuItemText - call PrintStartMenuItem - ld de,wPlayerName ; player's name - call PrintStartMenuItem - ld a,[wd72e] - bit 6,a ; is the player using the link feature? -; case for not using link feature - ld de,StartMenuSaveText - jr z,.printSaveOrResetText -; case for using link feature - ld de,StartMenuResetText -.printSaveOrResetText - call PrintStartMenuItem - ld de,StartMenuOptionText - call PrintStartMenuItem - ld de,StartMenuExitText - call PlaceString - ld hl,wd730 - res 6,[hl] ; turn pauses between printing letters back on - ret - -StartMenuPokedexText: ; 718f (1:718f) - db "POKéDEX@" - -StartMenuPokemonText: ; 7197 (1:7197) - db "POKéMON@" - -StartMenuItemText: ; 719f (1:719f) - db "ITEM@" - -StartMenuSaveText: ; 71a4 (1:71a4) - db "SAVE@" - -StartMenuResetText: ; 71a9 (1:71a9) - db "RESET@" - -StartMenuExitText: ; 71af (1:71af) - db "EXIT@" - -StartMenuOptionText: ; 71b4 (1:71b4) - db "OPTION@" - -PrintStartMenuItem: ; 71bb (1:71bb) - push hl - call PlaceString - pop hl - ld de,$28 - add hl,de - ret +INCLUDE "engine/overworld/set_blackout_map.asm" -INCLUDE "engine/overworld/cable_club_npc.asm" +INCLUDE "engine/display_text_id_init.asm" +INCLUDE "engine/menu/draw_start_menu.asm" -; function to draw various text boxes -DisplayTextBoxID_: ; 72ea (1:72ea) - ld a,[wTextBoxID] - cp a,TWO_OPTION_MENU - jp z,DisplayTwoOptionMenu - ld c,a - ld hl,TextBoxFunctionTable - ld de,3 - call SearchTextBoxTable - jr c,.functionTableMatch - ld hl,TextBoxCoordTable - ld de,5 - call SearchTextBoxTable - jr c,.coordTableMatch - ld hl,TextBoxTextAndCoordTable - ld de,9 - call SearchTextBoxTable - jr c,.textAndCoordTableMatch -.done - ret -.functionTableMatch - ld a,[hli] - ld h,[hl] - ld l,a ; hl = address of function - ld de,.done - push de - jp [hl] ; jump to the function -.coordTableMatch - call GetTextBoxIDCoords - call GetAddressOfScreenCoords - call TextBoxBorder - ret -.textAndCoordTableMatch - call GetTextBoxIDCoords - push hl - call GetAddressOfScreenCoords - call TextBoxBorder - pop hl - call GetTextBoxIDText - ld a,[wd730] - push af - ld a,[wd730] - set 6,a ; no pauses between printing each letter - ld [wd730],a - call PlaceString - pop af - ld [wd730],a - call UpdateSprites ; move sprites - ret - -; function to search a table terminated with $ff for a byte matching c in increments of de -; sets carry flag if a match is found and clears carry flag if not -SearchTextBoxTable: ; 734c (1:734c) - dec de -.loop - ld a,[hli] - cp a,$ff - jr z,.notFound - cp c - jr z,.found - add hl,de - jr .loop -.found - scf -.notFound - ret - -; function to load coordinates from the TextBoxCoordTable or the TextBoxTextAndCoordTable -; INPUT: -; hl = address of coordinates -; OUTPUT: -; b = height -; c = width -; d = row of upper left corner -; e = column of upper left corner -GetTextBoxIDCoords: ; 735a (1:735a) - ld a,[hli] ; column of upper left corner - ld e,a - ld a,[hli] ; row of upper left corner - ld d,a - ld a,[hli] ; column of lower right corner - sub e - dec a - ld c,a ; c = width - ld a,[hli] ; row of lower right corner - sub d - dec a - ld b,a ; b = height - ret - -; function to load a text address and text coordinates from the TextBoxTextAndCoordTable -GetTextBoxIDText: ; 7367 (1:7367) - ld a,[hli] - ld e,a - ld a,[hli] - ld d,a ; de = address of text - push de ; save text address - ld a,[hli] - ld e,a ; column of upper left corner of text - ld a,[hl] - ld d,a ; row of upper left corner of text - call GetAddressOfScreenCoords - pop de ; restore text address - ret - -; function to point hl to the screen coordinates -; INPUT: -; d = row -; e = column -; OUTPUT: -; hl = address of upper left corner of text box -GetAddressOfScreenCoords: ; 7375 (1:7375) - push bc - ld hl,wTileMap - ld bc,20 -.loop ; loop to add d rows to the base address - ld a,d - and a - jr z,.addedRows - add hl,bc - dec d - jr .loop -.addedRows - pop bc - add hl,de - ret - -; Format: -; 00: text box ID -; 01-02: function address -TextBoxFunctionTable: ; 7387 (1:7387) - dbw MONEY_BOX, DisplayMoneyBox - dbw BUY_SELL_QUIT_MENU, DoBuySellQuitMenu - dbw FIELD_MOVE_MON_MENU, DisplayFieldMoveMonMenu - db $ff ; terminator - -; Format: -; 00: text box ID -; 01: column of upper left corner -; 02: row of upper left corner -; 03: column of lower right corner -; 04: row of lower right corner -TextBoxCoordTable: ; 7391 (1:7391) - db MESSAGE_BOX, 0, 12, 19, 17 - db $03, 0, 0, 19, 14 - db $07, 0, 0, 11, 6 - db LIST_MENU_BOX, 4, 2, 19, 12 - db $10, 7, 0, 19, 17 - db MON_SPRITE_POPUP, 6, 4, 14, 13 - db $ff ; terminator - -; Format: -; 00: text box ID -; 01: column of upper left corner -; 02: row of upper left corner -; 03: column of lower right corner -; 04: row of lower right corner -; 05-06: address of text -; 07: column of beginning of text -; 08: row of beginning of text -; table of window positions and corresponding text [key, start column, start row, end column, end row, text pointer [2 bytes], text column, text row] -TextBoxTextAndCoordTable: ; 73b0 (1:73b0) - db JP_MOCHIMONO_MENU_TEMPLATE - db 0,0,14,17 ; text box coordinates - dw JapaneseMochimonoText - db 3,0 ; text coordinates - - db USE_TOSS_MENU_TEMPLATE - db 13,10,19,14 ; text box coordinates - dw UseTossText - db 15,11 ; text coordinates - - db JP_SAVE_MESSAGE_MENU_TEMPLATE - db 0,0,7,5 ; text box coordinates - dw JapaneseSaveMessageText - db 2,2 ; text coordinates - - db JP_SPEED_OPTIONS_MENU_TEMPLATE - db 0,6,5,10 ; text box coordinates - dw JapaneseSpeedOptionsText - db 2,7 ; text coordinates - - db BATTLE_MENU_TEMPLATE - db 8,12,19,17 ; text box coordinates - dw BattleMenuText - db 10,14 ; text coordinates - - db SAFARI_BATTLE_MENU_TEMPLATE - db 0,12,19,17 ; text box coordinates - dw SafariZoneBattleMenuText - db 2,14 ; text coordinates - - db SWITCH_STATS_CANCEL_MENU_TEMPLATE - db 11,11,19,17 ; text box coordinates - dw SwitchStatsCancelText - db 13,12 ; text coordinates - - db BUY_SELL_QUIT_MENU_TEMPLATE - db 0,0,10,6 ; text box coordinates - dw BuySellQuitText - db 2,1 ; text coordinates - - db MONEY_BOX_TEMPLATE - db 11,0,19,2 ; text box coordinates - dw MoneyText - db 13,0 ; text coordinates - - db JP_AH_MENU_TEMPLATE - db 7,6,11,10 ; text box coordinates - dw JapaneseAhText - db 8,8 ; text coordinates - - db JP_POKEDEX_MENU_TEMPLATE - db 11,8,19,17 ; text box coordinates - dw JapanesePokedexMenu - db 12,10 ; text coordinates - -; note that there is no terminator - -BuySellQuitText: ; 7413 (1:7413) - db "BUY" - next "SELL" - next "QUIT@@" - -UseTossText: ; 7422 (1:7422) - db "USE" - next "TOSS@" - -JapaneseSaveMessageText: ; 742b (1:742b) - db "きろく" - next "メッセージ@" - -JapaneseSpeedOptionsText: ; 7435 (1:7435) - db "はやい" - next "おそい@" - -MoneyText: ; 743d (1:743d) - db "MONEY@" - -JapaneseMochimonoText: ; 7443 (1:7443) - db "もちもの@" - -JapaneseMainMenuText: ; 7448 (1:7448) - db "つづきから" - next "さいしょから@" - -BattleMenuText: ; 7455 (1:7455) - db "FIGHT ",$E1,$E2 - next "ITEM RUN@" - -SafariZoneBattleMenuText: ; 7468 (1:7468) - db "BALL× BAIT" - next "THROW ROCK RUN@" - -SwitchStatsCancelText: ; 7489 (1:7489) - db "SWITCH" - next "STATS" - next "CANCEL@" - -JapaneseAhText: ; 749d (1:749d) - db "アッ!@" - -JapanesePokedexMenu: ; 74a1 (1:74a1) - db "データをみる" - next "なきごえ" - next "ぶんぷをみる" - next "キャンセル@" - -DisplayMoneyBox: ; 74ba (1:74ba) - ld hl, wd730 - set 6, [hl] - ld a, MONEY_BOX_TEMPLATE - ld [wTextBoxID], a - call DisplayTextBoxID - hlCoord 13, 1 - ld b, $1 - ld c, $6 - call ClearScreenArea - hlCoord 12, 1 - ld de, wPlayerMoney - ld c, $a3 - call PrintBCDNumber - ld hl, wd730 - res 6, [hl] - ret - -CurrencyString: ; 74e2 (1:74e2) - db " ¥@" - -DoBuySellQuitMenu: ; 74ea (1:74ea) - ld a, [wd730] - set 6, a ; no printing delay - ld [wd730], a - xor a - ld [wd12d], a - ld a, BUY_SELL_QUIT_MENU_TEMPLATE - ld [wTextBoxID], a - call DisplayTextBoxID - ld a, A_BUTTON | B_BUTTON - ld [wMenuWatchedKeys], a - ld a, $2 - ld [wMaxMenuItem], a - ld a, $1 - ld [wTopMenuItemY], a - ld a, $1 - ld [wTopMenuItemX], a - xor a - ld [wCurrentMenuItem], a - ld [wLastMenuItem], a - ld [wcc37], a - ld a, [wd730] - res 6, a ; turn on the printing delay - ld [wd730], a - call HandleMenuInput - call PlaceUnfilledArrowMenuCursor - bit 0, a ; was A pressed? - jr nz, .pressedA - bit 1, a ; was B pressed? (always true since only A/B are watched) - jr z, .pressedA - ld a, $2 - ld [wd12e], a - jr .quit -.pressedA - ld a, $1 - ld [wd12e], a - ld a, [wCurrentMenuItem] - ld [wd12d], a - ld b, a - ld a, [wMaxMenuItem] - cp b - jr z, .quit - ret -.quit - ld a, $2 - ld [wd12e], a - ld a, [wCurrentMenuItem] - ld [wd12d], a - scf - ret - -; displays a menu with two options to choose from -; b = Y of upper left corner of text region -; c = X of upper left corner of text region -; hl = address where the text box border should be drawn -DisplayTwoOptionMenu: ; 7559 (1:7559) - push hl - ld a, [wd730] - set 6, a ; no printing delay - ld [wd730], a - xor a - ld [wd12d], a - ld [wd12e], a - ld a, A_BUTTON | B_BUTTON - ld [wMenuWatchedKeys], a - ld a, $1 - ld [wMaxMenuItem], a - ld a, b - ld [wTopMenuItemY], a - ld a, c - ld [wTopMenuItemX], a - xor a - ld [wLastMenuItem], a - ld [wcc37], a - push hl - ld hl, wTwoOptionMenuID - bit 7, [hl] ; select second menu item by default? - res 7, [hl] - jr z, .storeCurrentMenuItem - inc a -.storeCurrentMenuItem - ld [wCurrentMenuItem], a - pop hl - push hl - push hl - call TwoOptionMenu_SaveScreenTiles - ld a, [wTwoOptionMenuID] - ld hl, TwoOptionMenuStrings - ld e, a - ld d, $0 - ld a, $5 -.menuStringLoop - add hl, de - dec a - jr nz, .menuStringLoop - ld a, [hli] - ld c, a - ld a, [hli] - ld b, a - ld e, l - ld d, h - pop hl - push de - ld a, [wTwoOptionMenuID] - cp TRADE_CANCEL_MENU - jr nz, .notTradeCancelMenu - call CableClub_TextBoxBorder - jr .afterTextBoxBorder -.notTradeCancelMenu - call TextBoxBorder -.afterTextBoxBorder - call UpdateSprites - pop hl - ld a, [hli] - and a ; put blank line before first menu item? - ld bc, 20 + 2 - jr z, .noBlankLine - ld bc, 2 * 20 + 2 -.noBlankLine - ld a, [hli] - ld e, a - ld a, [hli] - ld d, a - pop hl - add hl, bc - call PlaceString - ld hl, wd730 - res 6, [hl] ; turn on the printing delay - ld a, [wTwoOptionMenuID] - cp NO_YES_MENU - jr nz, .notNoYesMenu -; No/Yes menu -; this menu type ignores the B button -; it only seems to be used when confirming the deletion of a save file - xor a - ld [wTwoOptionMenuID], a - ld a, [wFlags_0xcd60] - push af - push hl - ld hl, wFlags_0xcd60 - bit 5, [hl] - set 5, [hl] ; don't play sound when A or B is pressed in menu - pop hl -.noYesMenuInputLoop - call HandleMenuInput - bit 1, a ; A button pressed? - jr nz, .noYesMenuInputLoop ; try again if A was not pressed - pop af - pop hl - ld [wFlags_0xcd60], a - ld a, (SFX_02_40 - SFX_Headers_02) / 3 - call PlaySound - jr .pressedAButton -.notNoYesMenu - xor a - ld [wTwoOptionMenuID], a - call HandleMenuInput - pop hl - bit 1, a ; A button pressed? - jr nz, .choseSecondMenuItem ; automatically choose the second option if B is pressed -.pressedAButton - ld a, [wCurrentMenuItem] - ld [wd12d], a - and a - jr nz, .choseSecondMenuItem -; chose first menu item - ld a, $1 - ld [wd12e], a - ld c, 15 - call DelayFrames - call TwoOptionMenu_RestoreScreenTiles - and a - ret -.choseSecondMenuItem - ld a, $1 - ld [wCurrentMenuItem], a - ld [wd12d], a - ld a, $2 - ld [wd12e], a - ld c, 15 - call DelayFrames - call TwoOptionMenu_RestoreScreenTiles - scf - ret - -; Some of the wider/taller two option menus will not have the screen areas -; they cover be fully saved/restored by the two functions below. -; The bottom and right edges of the menu may remain after the function returns. - -TwoOptionMenu_SaveScreenTiles: ; 763e (1:763e) - ld de, wHPBarMaxHP - ld bc, $506 -.asm_7644 - ld a, [hli] - ld [de], a - inc de - dec c - jr nz, .asm_7644 - push bc - ld bc, 14 - add hl, bc - pop bc - ld c, $6 - dec b - jr nz, .asm_7644 - ret - -TwoOptionMenu_RestoreScreenTiles: ; 7656 (1:7656) - ld de, wHPBarMaxHP - ld bc, $506 -.asm_765c - ld a, [de] - inc de - ld [hli], a - dec c - jr nz, .asm_765c - push bc - ld bc, $e - add hl, bc - pop bc - ld c, $6 - dec b - jr nz, .asm_765c - call UpdateSprites - ret - -; Format: -; 00: byte width -; 01: byte height -; 02: byte put blank line before first menu item -; 03: word text pointer -TwoOptionMenuStrings: ; 7671 (1:7671) - db 4,3,0 - dw .YesNoMenu - db 6,3,0 - dw .NorthWestMenu - db 6,3,0 - dw .SouthEastMenu - db 6,3,0 - dw .YesNoMenu - db 6,3,0 - dw .NorthEastMenu - db 7,3,0 - dw .TradeCancelMenu - db 7,4,1 - dw .HealCancelMenu - db 4,3,0 - dw .NoYesMenu - -.NoYesMenu ; 7699 (1:3699) - db "NO",$4E,"YES@" -.YesNoMenu ; 76a0 (1:36a0) - db "YES",$4E,"NO@" -.NorthWestMenu ; 76a7 (1:36a7) - db "NORTH",$4E,"WEST@" -.SouthEastMenu ; 76b2 (1:36b2) - db "SOUTH",$4E,"EAST@" -.NorthEastMenu ; 76bd (1:36bd) - db "NORTH",$4E,"EAST@" -.TradeCancelMenu ; 76c8 (1:36c8) - db "TRADE",$4E,"CANCEL@" -.HealCancelMenu ; 76d5 (1:36d5) - db "HEAL",$4E,"CANCEL@" - -DisplayFieldMoveMonMenu: ; 76e1 (1:36e1) - xor a - ld hl, wWhichTrade - ld [hli], a - ld [hli], a - ld [hli], a - ld [hli], a - ld [hli], a - ld [hl], $c - call GetMonFieldMoves - ld a, [wTrainerScreenX] - and a - jr nz, .asm_770f - hlCoord 11, 11 - ld b, $5 - ld c, $7 - call TextBoxBorder - call UpdateSprites - ld a, $c - ld [$fff7], a - hlCoord 13, 12 - ld de, PokemonMenuEntries - jp PlaceString -.asm_770f - push af - hlCoord 0, 11 - ld a, [wcd42] - dec a - ld e, a - ld d, $0 - add hl, de - ld b, $5 - ld a, $12 - sub e - ld c, a - pop af - ld de, $ffd8 -.asm_7725 - add hl, de - inc b - inc b - dec a - jr nz, .asm_7725 - ld de, $ffec - add hl, de - inc b - call TextBoxBorder - call UpdateSprites - hlCoord 0, 12 - ld a, [wcd42] - inc a - ld e, a - ld d, $0 - add hl, de - ld de, $ffd8 - ld a, [wTrainerScreenX] -.asm_7747 - add hl, de - dec a - jr nz, .asm_7747 - xor a - ld [wTrainerScreenX], a - ld de, wWhichTrade -.asm_7752 - push hl - ld hl, FieldMoveNames - ld a, [de] - and a - jr z, .asm_7776 - inc de - ld b, a -.asm_775c - dec b - jr z, .asm_7766 -.asm_775f - ld a, [hli] - cp $50 - jr nz, .asm_775f - jr .asm_775c -.asm_7766 - ld b, h - ld c, l - pop hl - push de - ld d, b - ld e, c - call PlaceString - ld bc, $28 - add hl, bc - pop de - jr .asm_7752 -.asm_7776 - pop hl - ld a, [wcd42] - ld [$fff7], a - hlCoord 0, 12 - ld a, [wcd42] - inc a - ld e, a - ld d, $0 - add hl, de - ld de, PokemonMenuEntries - jp PlaceString - -FieldMoveNames: ; 778d (1:778d) - db "CUT@" - db "FLY@" - db "@" - db "SURF@" - db "STRENGTH@" - db "FLASH@" - db "DIG@" - db "TELEPORT@" - db "SOFTBOILED@" - -PokemonMenuEntries: ; 77c2 (1:77c2) - db "STATS" - next "SWITCH" - next "CANCEL@" - -GetMonFieldMoves: ; 77d6 (1:77d6) - ld a, [wWhichPokemon] - ld hl, wPartyMon1Moves - ld bc, $2c - call AddNTimes - ld d, h - ld e, l - ld c, $5 - ld hl, wWhichTrade -.asm_77e9 - push hl -.asm_77ea - dec c - jr z, .asm_7821 - ld a, [de] ; de is RAM address of move - and a - jr z, .asm_7821 - ld b, a - inc de ; go to next move - ld hl, FieldMoveDisplayData -.asm_77f6 - ld a, [hli] - cp $ff - jr z, .asm_77ea - cp b - jr z, .asm_7802 - inc hl - inc hl - jr .asm_77f6 -.asm_7802 - ld a, b - ld [wcd43], a - ld a, [hli] - ld b, [hl] - pop hl - ld [hli], a - ld a, [wTrainerScreenX] - inc a - ld [wTrainerScreenX], a - ld a, [wcd42] - cp b - jr c, .asm_781b - ld a, b - ld [wcd42], a -.asm_781b - ld a, [wcd43] - ld b, a - jr .asm_77e9 -.asm_7821 - pop hl - ret - -; Format: [Move id], [list priority], [leftmost tile] -; Move id = id of move -; List priority = lower number means higher priority when field moves are displayed -; these priorities must be unique -; Leftmost tile = -1 + tile column in which the first letter of the move's name should be displayed -; "SOFTBOILED" is $08 because it has 4 more letters than "SURF", for example, whose value is $0C -FieldMoveDisplayData: ; 7823 (1:7823) - db CUT, $01, $0C - db FLY, $02, $0C - db $B4, $03, $0C ; unused field move - db SURF, $04, $0C - db STRENGTH, $05, $0A - db FLASH, $06, $0C - db DIG, $07, $0C - db TELEPORT, $08, $0A - db SOFTBOILED, $09, $08 - db $ff ; list terminator +INCLUDE "engine/overworld/cable_club_npc.asm" +INCLUDE "engine/menu/text_box.asm" INCLUDE "engine/battle/moveEffects/drain_hp_effect.asm" INCLUDE "engine/menu/players_pc.asm" -_RemovePokemon: ; 7b68 (1:7b68) - ld hl, wPartyCount ; wPartyCount - ld a, [wcf95] - and a - jr z, .asm_7b74 - ld hl, W_NUMINBOX ; wda80 -.asm_7b74 - ld a, [hl] - dec a - ld [hli], a - ld a, [wWhichPokemon] ; wWhichPokemon - ld c, a - ld b, $0 - add hl, bc - ld e, l - ld d, h - inc de -.asm_7b81 - ld a, [de] - inc de - ld [hli], a - inc a - jr nz, .asm_7b81 - ld hl, wPartyMonOT ; wd273 - ld d, $5 - ld a, [wcf95] - and a - jr z, .asm_7b97 - ld hl, wBoxMonOT - ld d, $13 -.asm_7b97 - ld a, [wWhichPokemon] ; wWhichPokemon - call SkipFixedLengthTextEntries - ld a, [wWhichPokemon] ; wWhichPokemon - cp d - jr nz, .asm_7ba6 - ld [hl], $ff - ret -.asm_7ba6 - ld d, h - ld e, l - ld bc, $b - add hl, bc - ld bc, wPartyMonNicks ; wPartyMonNicks - ld a, [wcf95] - and a - jr z, .asm_7bb8 - ld bc, wBoxMonNicks -.asm_7bb8 - call CopyDataUntil - ld hl, wPartyMons - ld bc, wPartyMon2 - wPartyMon1 - ld a, [wcf95] - and a - jr z, .asm_7bcd - ld hl, wBoxMons - ld bc, wBoxMon2 - wBoxMon1 -.asm_7bcd - ld a, [wWhichPokemon] ; wWhichPokemon - call AddNTimes - ld d, h - ld e, l - ld a, [wcf95] - and a - jr z, .asm_7be4 - ld bc, wBoxMon2 - wBoxMon1 - add hl, bc - ld bc, wBoxMonOT - jr .asm_7beb -.asm_7be4 - ld bc, wPartyMon2 - wPartyMon1 - add hl, bc - ld bc, wPartyMonOT ; wd273 -.asm_7beb - call CopyDataUntil - ld hl, wPartyMonNicks ; wPartyMonNicks - ld a, [wcf95] - and a - jr z, .asm_7bfa - ld hl, wBoxMonNicks -.asm_7bfa - ld bc, $b - ld a, [wWhichPokemon] ; wWhichPokemon - call AddNTimes - ld d, h - ld e, l - ld bc, $b - add hl, bc - ld bc, wPokedexOwned ; wPokedexOwned - ld a, [wcf95] - and a - jr z, .asm_7c15 - ld bc, wBoxMonNicksEnd -.asm_7c15 - jp CopyDataUntil - -Func_7c18: ; 7c18 (1:7c18) - ld hl, wd730 - set 6, [hl] - predef ShowPokedexData - ld hl, wd730 - res 6, [hl] - call ReloadMapData - ld c, $a - call DelayFrames - predef IndexToPokedex - ld a, [wd11e] - dec a - ld c, a - ld b, $1 - ld hl, wPokedexSeen - predef FlagActionPredef - ld a, $1 - ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ret - - -SECTION "bank3",ROMX,BANK[$3] +INCLUDE "engine/remove_pokemon.asm" + +INCLUDE "engine/display_pokedex.asm" + +SECTION "bank3",ROMX[$4000],BANK[$3] INCLUDE "engine/joypad.asm" @@ -2036,2676 +94,40 @@ INCLUDE "data/map_songs.asm" INCLUDE "data/map_header_banks.asm" -ClearVariablesAfterLoadingMapData: ; c335 (3:4335) - ld a, $90 - ld [hWY], a - ld [rWY], a - xor a - ld [H_AUTOBGTRANSFERENABLED], a - ld [wStepCounter], a - ld [W_LONEATTACKNO], a ; W_GYMLEADERNO - ld [hJoyPressed], a - ld [hJoyReleased], a - ld [hJoyHeld], a - ld [wcd6a], a - ld [wd5a3], a - ld hl, wCardKeyDoorY - ld [hli], a - ld [hl], a - ld hl, wWhichTrade - ld bc, $1e - call FillMemory - ret - -; only used for setting bit 2 of wd736 upon entering a new map -IsPlayerStandingOnWarp: ; c35f (3:435f) - ld a, [wNumberOfWarps] - and a - ret z - ld c, a - ld hl, wWarpEntries -.loop - ld a, [W_YCOORD] - cp [hl] - jr nz, .nextWarp1 - inc hl - ld a, [W_XCOORD] - cp [hl] - jr nz, .nextWarp2 - inc hl - ld a, [hli] ; target warp - ld [wDestinationWarpID], a - ld a, [hl] ; target map - ld [$ff8b], a - ld hl, wd736 - set 2, [hl] ; standing on warp flag - ret -.nextWarp1 - inc hl -.nextWarp2 - inc hl - inc hl - inc hl - dec c - jr nz, .loop - ret - -CheckForceBikeOrSurf: ; c38b (3:438b) - ld hl, wd732 - bit 5, [hl] - ret nz - ld hl, ForcedBikeOrSurfMaps - ld a, [W_YCOORD] - ld b, a - ld a, [W_XCOORD] - ld c, a - ld a, [W_CURMAP] - ld d, a -.loop - ld a, [hli] - cp $ff - ret z ;if we reach FF then it's not part of the list - cp d ;compare to current map - jr nz, .incorrectMap - ld a, [hli] - cp b ;compare y-coord - jr nz, .incorrectY - ld a, [hli] - cp c ;compare x-coord - jr nz, .loop ; incorrect x-coord, check next item - ld a, [W_CURMAP] - cp SEAFOAM_ISLANDS_4 - ld a, $2 - ld [W_SEAFOAMISLANDS4CURSCRIPT], a - jr z, .forceSurfing - ld a, [W_CURMAP] - cp SEAFOAM_ISLANDS_5 - ld a, $2 - ld [W_SEAFOAMISLANDS5CURSCRIPT], a - jr z, .forceSurfing - ;force bike riding - ld hl, wd732 - set 5, [hl] - ld a, $1 - ld [wWalkBikeSurfState], a - ld [wWalkBikeSurfStateCopy], a - jp ForceBikeOrSurf -.incorrectMap - inc hl -.incorrectY - inc hl - jr .loop -.forceSurfing - ld a, $2 - ld [wWalkBikeSurfState], a - ld [wWalkBikeSurfStateCopy], a - jp ForceBikeOrSurf - -INCLUDE "data/force_bike_surf.asm" - -IsPlayerFacingEdgeOfMap: ; c3ff (3:43ff) - push hl - push de - push bc - ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction - srl a - ld c, a - ld b, $0 - ld hl, .functionPointerTable - add hl, bc - ld a, [hli] - ld h, [hl] - ld l, a - ld a, [W_YCOORD] - ld b, a - ld a, [W_XCOORD] - ld c, a - ld de, .asm_c41e - push de - jp [hl] -.asm_c41e - pop bc - pop de - pop hl - ret - -.functionPointerTable - dw .facingDown - dw .facingUp - dw .facingLeft - dw .facingRight - -.facingDown - ld a, [W_CURMAPHEIGHT] - add a - dec a - cp b - jr z, .setCarry - jr .resetCarry - -.facingUp - ld a, b - and a - jr z, .setCarry - jr .resetCarry - -.facingLeft - ld a, c - and a - jr z, .setCarry - jr .resetCarry - -.facingRight - ld a, [W_CURMAPWIDTH] - add a - dec a - cp c - jr z, .setCarry - jr .resetCarry -.resetCarry - and a - ret -.setCarry - scf - ret - -IsWarpTileInFrontOfPlayer: ; c44e (3:444e) - push hl - push de - push bc - call _GetTileAndCoordsInFrontOfPlayer - ld a, [W_CURMAP] - cp SS_ANNE_5 - jr z, .ssAnne5 - ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction - srl a - ld c, a - ld b, 0 - ld hl, .warpTileListPointers - add hl, bc - ld a, [hli] - ld h, [hl] - ld l, a - ld a, [wTileInFrontOfPlayer] - ld de, $1 - call IsInArray -.done - pop bc - pop de - pop hl - ret - -.warpTileListPointers: ; c477 (3:4477) - dw .facingDownWarpTiles - dw .facingUpWarpTiles - dw .facingLeftWarpTiles - dw .facingRightWarpTiles - -.facingDownWarpTiles - db $01,$12,$17,$3D,$04,$18,$33,$FF - -.facingUpWarpTiles - db $01,$5C,$FF - -.facingLeftWarpTiles - db $1A,$4B,$FF - -.facingRightWarpTiles - db $0F,$4E,$FF - -.ssAnne5 - ld a, [wTileInFrontOfPlayer] - cp $15 - jr nz, .notSSAnne5Warp - scf - jr .done -.notSSAnne5Warp - and a - jr .done - -IsPlayerStandingOnDoorTileOrWarpTile: ; c49d (3:449d) - push hl - push de - push bc - callba IsPlayerStandingOnDoorTile - jr c, .done - ld a, [W_CURMAPTILESET] - add a - ld c, a - ld b, $0 - ld hl, WarpTileIDPointers - add hl, bc - ld a, [hli] - ld h, [hl] - ld l, a - ld de, $1 - aCoord 8, 9 - call IsInArray - jr nc, .done - ld hl, wd736 - res 2, [hl] -.done - pop bc - pop de - pop hl - ret - -INCLUDE "data/warp_tile_ids.asm" - -PrintSafariZoneSteps: ; c52f (3:452f) - ld a, [W_CURMAP] ; W_CURMAP - cp SAFARI_ZONE_EAST - ret c - cp UNKNOWN_DUNGEON_2 - ret nc - ld hl, wTileMap - ld b, $3 - ld c, $7 - call TextBoxBorder - hlCoord 1, 1 - ld de, wSafariSteps ; wd70d - ld bc, $203 - call PrintNumber - hlCoord 4, 1 - ld de, SafariSteps ; $4579 - call PlaceString - hlCoord 1, 3 - ld de, SafariBallText - call PlaceString - ld a, [W_NUMSAFARIBALLS] ; W_NUMSAFARIBALLS - cp $a - jr nc, .asm_c56d - hlCoord 5, 3 - ld a, $7f - ld [hl], a -.asm_c56d - hlCoord 6, 3 - ld de, W_NUMSAFARIBALLS ; W_NUMSAFARIBALLS - ld bc, $102 - jp PrintNumber - -SafariSteps: ; c579 (3:4579) - db "/500@" - -SafariBallText: ; c57e (3:457e) - db "BALL×× @" - -GetTileAndCoordsInFrontOfPlayer: ; c586 (3:4586) - call GetPredefRegisters - -_GetTileAndCoordsInFrontOfPlayer: ; c589 (3:4589) - ld a, [W_YCOORD] - ld d, a - ld a, [W_XCOORD] - ld e, a - ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction - and a - jr nz, .notFacingDown -; facing down - aCoord 8, 11 - inc d - jr .storeTile -.notFacingDown - cp SPRITE_FACING_UP - jr nz, .notFacingUp -; facing up - aCoord 8, 7 - dec d - jr .storeTile -.notFacingUp - cp SPRITE_FACING_LEFT - jr nz, .notFacingLeft -; facing left - aCoord 6, 9 - dec e - jr .storeTile -.notFacingLeft - cp SPRITE_FACING_RIGHT - jr nz, .storeTile -; facing right - aCoord 10, 9 - inc e -.storeTile - ld c, a - ld [wTileInFrontOfPlayer], a - ret - -GetTileTwoStepsInFrontOfPlayer: ; c5be (3:45be) - xor a - ld [$ffdb], a - ld hl, W_YCOORD - ld a, [hli] - ld d, a - ld e, [hl] - ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction - and a - jr nz, .notFacingDown -; facing down - ld hl, $ffdb - set 0, [hl] - aCoord 8, 13 - inc d - jr .storeTile -.notFacingDown - cp SPRITE_FACING_UP - jr nz, .notFacingUp -; facing up - ld hl, $ffdb - set 1, [hl] - aCoord 8, 5 - dec d - jr .storeTile -.notFacingUp - cp SPRITE_FACING_LEFT - jr nz, .notFacingLeft -; facing left - ld hl, $ffdb - set 2, [hl] - aCoord 4, 9 - dec e - jr .storeTile -.notFacingLeft - cp SPRITE_FACING_RIGHT - jr nz, .storeTile -; facing right - ld hl, $ffdb - set 3, [hl] - aCoord 12, 9 - inc e -.storeTile - ld c, a - ld [wTileInFrontOfBoulderAndBoulderCollisionResult], a - ld [wTileInFrontOfPlayer], a - ret - -CheckForCollisionWhenPushingBoulder: ; c60b (3:460b) - call GetTileTwoStepsInFrontOfPlayer - ld hl, W_TILESETCOLLISIONPTR - ld a, [hli] - ld h, [hl] - ld l, a -.loop - ld a, [hli] - cp $ff - jr z, .done ; if the tile two steps ahead is not passable - cp c - jr nz, .loop - ld hl, TilePairCollisionsLand - call CheckForTilePairCollisions2 - ld a, $ff - jr c, .done ; if there is an elevation difference between the current tile and the one two steps ahead - ld a, [wTileInFrontOfBoulderAndBoulderCollisionResult] - cp $15 ; stairs tile - ld a, $ff - jr z, .done ; if the tile two steps ahead is stairs - call CheckForBoulderCollisionWithSprites -.done - ld [wTileInFrontOfBoulderAndBoulderCollisionResult], a - ret - -; sets a to $ff if there is a collision and $00 if there is no collision -CheckForBoulderCollisionWithSprites: ; c636 (3:4636) - ld a, [wBoulderSpriteIndex] - dec a - swap a - ld d, 0 - ld e, a - ld hl, wSpriteStateData2 + $14 - add hl, de - ld a, [hli] ; map Y position - ld [$ffdc], a - ld a, [hl] ; map X position - ld [$ffdd], a - ld a, [W_NUMSPRITES] - ld c, a - ld de, $f - ld hl, wSpriteStateData2 + $14 - ld a, [$ffdb] - and $3 ; facing up or down? - jr z, .pushingHorizontallyLoop -.pushingVerticallyLoop - inc hl - ld a, [$ffdd] - cp [hl] - jr nz, .nextSprite1 ; if X coordinates don't match - dec hl - ld a, [hli] - ld b, a - ld a, [$ffdb] - rrca - jr c, .pushingDown -; pushing up - ld a, [$ffdc] - dec a - jr .compareYCoords -.pushingDown - ld a, [$ffdc] - inc a -.compareYCoords - cp b - jr z, .failure -.nextSprite1 - dec c - jr z, .success - add hl, de - jr .pushingVerticallyLoop -.pushingHorizontallyLoop - ld a, [hli] - ld b, a - ld a, [$ffdc] - cp b - jr nz, .nextSprite2 - ld b, [hl] - ld a, [$ffdb] - bit 2, a - jr nz, .pushingLeft -; pushing right - ld a, [$ffdd] - inc a - jr .compareXCoords -.pushingLeft - ld a, [$ffdd] - dec a -.compareXCoords - cp b - jr z, .failure -.nextSprite2 - dec c - jr z, .success - add hl, de - jr .pushingHorizontallyLoop -.failure - ld a, $ff - ret -.success - xor a - ret - -ApplyOutOfBattlePoisonDamage: ; c69c (3:469c) - ld a, [wd730] - add a - jp c, .noBlackOut ; no black out if joypad states are being simulated - ld a, [wPartyCount] - and a - jp z, .noBlackOut - call IncrementDayCareMonExp - ld a, [wStepCounter] - and $3 ; is the counter a multiple of 4? - jp nz, .noBlackOut ; only apply poison damage every fourth step - ld [wWhichPokemon], a - ld hl, wPartyMon1Status - ld de, wPartySpecies -.applyDamageLoop - ld a, [hl] - and (1 << PSN) - jr z, .nextMon2 ; not poisoned - dec hl - dec hl - ld a, [hld] - ld b, a - ld a, [hli] - or b - jr z, .nextMon ; already fainted -; subtract 1 from HP - ld a, [hl] - dec a - ld [hld], a - inc a - jr nz, .noBorrow -; borrow 1 from upper byte of HP - dec [hl] - inc hl - jr .nextMon -.noBorrow - ld a, [hli] - or [hl] - jr nz, .nextMon ; didn't faint from damage -; the mon fainted from the damage - push hl - inc hl - inc hl - ld [hl], a - ld a, [de] - ld [wd11e], a - push de - ld a, [wWhichPokemon] - ld hl, wPartyMonNicks - call GetPartyMonName - xor a - ld [wJoyIgnore], a - call EnableAutoTextBoxDrawing - ld a, $d0 - ld [$ff8c], a - call DisplayTextID - pop de - pop hl -.nextMon - inc hl - inc hl -.nextMon2 - inc de - ld a, [de] - inc a - jr z, .applyDamageLoopDone - ld bc, wPartyMon2 - wPartyMon1 - add hl, bc - push hl - ld hl, wWhichPokemon - inc [hl] - pop hl - jr .applyDamageLoop -.applyDamageLoopDone - ld hl, wPartyMon1Status - ld a, [wPartyCount] - ld d, a - ld e, 0 -.countPoisonedLoop - ld a, [hl] - and (1 << PSN) - or e - ld e, a - ld bc, wPartyMon2 - wPartyMon1 - add hl, bc - dec d - jr nz, .countPoisonedLoop - ld a, e - and a ; are any party members poisoned? - jr z, .skipPoisonEffectAndSound - ld b, $2 - predef ChangeBGPalColor0_4Frames ; change BG white to dark grey for 4 frames - ld a, (SFX_02_43 - SFX_Headers_02) / 3 - call PlaySound -.skipPoisonEffectAndSound - predef AnyPartyAlive - ld a, d - and a - jr nz, .noBlackOut - call EnableAutoTextBoxDrawing - ld a, $d1 - ld [$ff8c], a - call DisplayTextID - ld hl, wd72e - set 5, [hl] - ld a, $ff - jr .done -.noBlackOut - xor a -.done - ld [wd12d], a - ret - -LoadTilesetHeader: ; c754 (3:4754) - call GetPredefRegisters - push hl - ld d, 0 - ld a, [W_CURMAPTILESET] - add a - add a - ld b, a - add a - add b ; a = tileset * 12 - jr nc, .noCarry - inc d -.noCarry - ld e, a - ld hl, Tilesets - add hl, de - ld de, W_TILESETBANK - ld c, $b -.copyTilesetHeaderLoop - ld a, [hli] - ld [de], a - inc de - dec c - jr nz, .copyTilesetHeaderLoop - ld a, [hl] - ld [hTilesetType], a - xor a - ld [$ffd8], a - pop hl - ld a, [W_CURMAPTILESET] - push hl - push de - ld hl, DungeonTilesets - ld de, $1 - call IsInArray - pop de - pop hl - jr c, .asm_c797 - ld a, [W_CURMAPTILESET] - ld b, a - ld a, [$ff8b] - cp b - jr z, .done -.asm_c797 - ld a, [wDestinationWarpID] - cp $ff - jr z, .done - call LoadDestinationWarpPosition - ld a, [W_YCOORD] - and $1 - ld [W_YBLOCKCOORD], a - ld a, [W_XCOORD] - and $1 - ld [W_XBLOCKCOORD], a -.done - ret - -INCLUDE "data/dungeon_tilesets.asm" - -INCLUDE "data/tileset_headers.asm" - -IncrementDayCareMonExp: ; c8de (3:48de) - ld a, [W_DAYCARE_IN_USE] - and a - ret z - ld hl, wDayCareMonExp + 2 - inc [hl] - ret nz - dec hl - inc [hl] - ret nz - dec hl - inc [hl] - ld a, [hl] - cp $50 - ret c - ld a, $50 - ld [hl], a - ret +INCLUDE "engine/overworld/clear_variables.asm" +INCLUDE "engine/overworld/player_state.asm" +INCLUDE "engine/overworld/poison.asm" +INCLUDE "engine/overworld/tileset_header.asm" +INCLUDE "engine/overworld/daycare_exp.asm" INCLUDE "data/hide_show_data.asm" -PrintStrengthTxt: ; cd99 (3:4d99) - ld hl, wd728 - set 0, [hl] - ld hl, UsedStrengthText - call PrintText - ld hl, CanMoveBouldersText - jp PrintText - -UsedStrengthText: ; cdaa (3:4daa) - TX_FAR _UsedStrengthText - db $08 ; asm - ld a, [wcf91] - call PlayCry - call Delay3 - jp TextScriptEnd - -CanMoveBouldersText: ; cdbb (3:4dbb) - TX_FAR _CanMoveBouldersText - db "@" - -CheckForForcedBikeSurf: ; cdc0 (3:4dc0) - ld hl, wd728 - set 1, [hl] - ld a, [wd732] - bit 5, a - jr nz, .asm_cdec - ld a, [W_CURMAP] ; W_CURMAP - cp SEAFOAM_ISLANDS_5 - ret nz - ld a, [wd881] - and $3 - cp $3 - ret z - ld hl, CoordsData_cdf7 ; $4df7 - call ArePlayerCoordsInArray - ret nc - ld hl, wd728 - res 1, [hl] - ld hl, CurrentTooFastText - jp PrintText -.asm_cdec - ld hl, wd728 - res 1, [hl] - ld hl, CyclingIsFunText - jp PrintText - -CoordsData_cdf7: ; cdf7 (3:4df7) - db $0B,$07,$FF - -CurrentTooFastText: ; cdfa (3:4dfa) - TX_FAR _CurrentTooFastText - db "@" - -CyclingIsFunText: ; cdff (3:4dff) - TX_FAR _CyclingIsFunText - db "@" - -; function to add an item (in varying quantities) to the player's bag or PC box -; INPUT: -; hl = address of inventory (either wNumBagItems or wNumBoxItems) -; [wcf91] = item ID -; [wcf96] = item quantity -; sets carry flag if successful, unsets carry flag if unsuccessful -AddItemToInventory_: ; ce04 (3:4e04) - ld a,[wcf96] ; a = item quantity - push af - push bc - push de - push hl - push hl - ld d,50 ; PC box can hold 50 items - ld a,wNumBagItems & $FF - cp l - jr nz,.checkIfInventoryFull - ld a,wNumBagItems >> 8 - cp h - jr nz,.checkIfInventoryFull -; if the destination is the bag - ld d,20 ; bag can hold 20 items -.checkIfInventoryFull - ld a,[hl] - sub d - ld d,a - ld a,[hli] - and a - jr z,.addNewItem -.loop - ld a,[hli] - ld b,a ; b = ID of current item in table - ld a,[wcf91] ; a = ID of item being added - cp b ; does the current item in the table match the item being added? - jp z,.increaseItemQuantity ; if so, increase the item's quantity - inc hl - ld a,[hl] - cp a,$ff ; is it the end of the table? - jr nz,.loop -.addNewItem ; add an item not yet in the inventory - pop hl - ld a,d - and a ; is there room for a new item slot? - jr z,.done -; if there is room - inc [hl] ; increment the number of items in the inventory - ld a,[hl] ; the number of items will be the index of the new item - add a - dec a - ld c,a - ld b,0 - add hl,bc ; hl = address to store the item - ld a,[wcf91] - ld [hli],a ; store item ID - ld a,[wcf96] - ld [hli],a ; store item quantity - ld [hl],$ff ; store terminator - jp .success -.increaseItemQuantity ; increase the quantity of an item already in the inventory - ld a,[wcf96] - ld b,a ; b = quantity to add - ld a,[hl] ; a = existing item quantity - add b ; a = new item quantity - cp a,100 - jp c,.storeNewQuantity ; if the new quantity is less than 100, store it -; if the new quantity is greater than or equal to 100, -; try to max out the current slot and add the rest in a new slot - sub a,99 - ld [wcf96],a ; a = amount left over (to put in the new slot) - ld a,d - and a ; is there room for a new item slot? - jr z,.increaseItemQuantityFailed -; if so, store 99 in the current slot and store the rest in a new slot - ld a,99 - ld [hli],a - jp .loop -.increaseItemQuantityFailed - pop hl - and a - jr .done -.storeNewQuantity - ld [hl],a - pop hl -.success - scf -.done - pop hl - pop de - pop bc - pop bc - ld a,b - ld [wcf96],a ; restore the initial value from when the function was called - ret - -; function to remove an item (in varying quantities) from the player's bag or PC box -; INPUT: -; hl = address of inventory (either wNumBagItems or wNumBoxItems) -; [wWhichPokemon] = index (within the inventory) of the item to remove -; [wcf96] = quantity to remove -RemoveItemFromInventory_: ; ce74 (3:4e74) - push hl - inc hl - ld a,[wWhichPokemon] ; index (within the inventory) of the item being removed - sla a - add l - ld l,a - jr nc,.noCarry - inc h -.noCarry - inc hl - ld a,[wcf96] ; quantity being removed - ld e,a - ld a,[hl] ; a = current quantity - sub e - ld [hld],a ; store new quantity - ld [wcf97],a - and a - jr nz,.skipMovingUpSlots -; if the remaining quantity is 0, -; remove the emptied item slot and move up all the following item slots -.moveSlotsUp - ld e,l - ld d,h - inc de - inc de ; de = address of the slot following the emptied one -.loop ; loop to move up the following slots - ld a,[de] - inc de - ld [hli],a - cp a,$ff - jr nz,.loop -; update menu info - xor a - ld [wListScrollOffset],a - ld [wCurrentMenuItem],a - ld [wcc2c],a - ld [wd07e],a - pop hl - ld a,[hl] ; a = number of items in inventory - dec a ; decrement the number of items - ld [hl],a ; store new number of items - ld [wd12a],a - cp a,2 - jr c,.done - ld [wMaxMenuItem],a - jr .done -.skipMovingUpSlots - pop hl -.done - ret - -; wild pokemon data: from 4EB8 to 55C7 - -LoadWildData: ; ceb8 (3:4eb8) - ld hl,WildDataPointers - ld a,[W_CURMAP] - - ; get wild data for current map - ld c,a - ld b,0 - add hl,bc - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a ; hl now points to wild data for current map - ld a,[hli] - ld [W_GRASSRATE],a - and a - jr z,.NoGrassData ; if no grass data, skip to surfing data - push hl - ld de,W_GRASSMONS ; otherwise, load grass data - ld bc,$0014 - call CopyData - pop hl - ld bc,$0014 - add hl,bc -.NoGrassData - ld a,[hli] - ld [W_WATERRATE],a - and a - ret z ; if no water data, we're done - ld de,W_WATERMONS ; otherwise, load surfing data - ld bc,$0014 - jp CopyData - -INCLUDE "data/wild_mons.asm" +INCLUDE "engine/overworld/field_move_messages.asm" -INCLUDE "engine/items/items.asm" +INCLUDE "engine/items/inventory.asm" -DrawBadges: ; ea03 (3:6a03) -; Draw 4x2 gym leader faces, with the faces replaced by -; badges if they are owned. Used in the player status screen. - -; In Japanese versions, names are displayed above faces. -; Instead of removing relevant code, the name graphics were erased. - -; Tile ids for face/badge graphics. - ld de, wTrainerFacingDirection - ld hl, .FaceBadgeTiles - ld bc, 8 - call CopyData - -; Booleans for each badge. - ld hl, wcd49 - ld bc, 8 - xor a - call FillMemory - -; Alter these based on owned badges. - ld de, wcd49 - ld hl, wTrainerFacingDirection - ld a, [W_OBTAINEDBADGES] - ld b, a - ld c, 8 -.CheckBadge - srl b - jr nc, .NextBadge - ld a, [hl] - add 4 ; Badge graphics are after each face - ld [hl], a - ld a, 1 - ld [de], a -.NextBadge - inc hl - inc de - dec c - jr nz, .CheckBadge - -; Draw two rows of badges. - ld hl, wWhichTrade - ld a, $d8 ; [1] - ld [hli], a - ld [hl], $60 ; First name - - hlCoord 2, 11 - ld de, wcd49 - call .DrawBadgeRow - - hlCoord 2, 14 - ld de, wcd49 + 4 -; call .DrawBadgeRow -; ret - -.DrawBadgeRow ; ea4c (3:6a4c) -; Draw 4 badges. - - ld c, 4 -.DrawBadge - push de - push hl - -; Badge no. - ld a, [wWhichTrade] - ld [hli], a - inc a - ld [wWhichTrade], a - -; Names aren't printed if the badge is owned. - ld a, [de] - and a - ld a, [wTrainerEngageDistance] - jr nz, .SkipName - call .PlaceTiles - jr .PlaceBadge - -.SkipName - inc a - inc a - inc hl - -.PlaceBadge - ld [wTrainerEngageDistance], a - ld de, 20 - 1 - add hl, de - ld a, [wTrainerFacingDirection] - call .PlaceTiles - add hl, de - call .PlaceTiles - -; Shift badge array back one byte. - push bc - ld hl, wTrainerFacingDirection + 1 - ld de, wTrainerFacingDirection - ld bc, 8 - call CopyData - pop bc - - pop hl - ld de, 4 - add hl, de - - pop de - inc de - dec c - jr nz, .DrawBadge - ret - -.PlaceTiles - ld [hli], a - inc a - ld [hl], a - inc a - ret - -.FaceBadgeTiles - db $20, $28, $30, $38, $40, $48, $50, $58 - -GymLeaderFaceAndBadgeTileGraphics: ; ea9e (3:6a9e) - INCBIN "gfx/badges.2bpp" - -; replaces a tile block with the one specified in [wNewTileBlockID] -; and redraws the map view if necessary -; b = Y -; c = X -ReplaceTileBlock: ; ee9e (3:6e9e) - call GetPredefRegisters - ld hl, wOverworldMap - ld a, [W_CURMAPWIDTH] - add $6 - ld e, a - ld d, $0 - add hl, de - add hl, de - add hl, de - ld e, $3 - add hl, de - ld e, a - ld a, b - and a - jr z, .addX -; add width * Y -.addWidthYTimesLoop - add hl, de - dec b - jr nz, .addWidthYTimesLoop -.addX - add hl, bc ; add X - ld a, [wNewTileBlockID] - ld [hl], a - ld a, [wCurrentTileBlockMapViewPointer] - ld c, a - ld a, [wCurrentTileBlockMapViewPointer + 1] - ld b, a - call CompareHLWithBC - ret c ; return if the replaced tile block is below the map view in memory - push hl - ld l, e - ld h, $0 - ld e, $6 - ld d, h - add hl, hl - add hl, hl - add hl, de - add hl, bc - pop bc - call CompareHLWithBC - 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 - inc a - ret z - ld a, [H_AUTOBGTRANSFERENABLED] - push af - ld a, [hTilesetType] - push af - xor a - ld [H_AUTOBGTRANSFERENABLED], a - ld [hTilesetType], a ; no flower/water BG tile animations - call LoadCurrentMapView - call GoPAL_SET_CF1C - ld hl, wMapViewVRAMPointer - ld a, [hli] - ld h, [hl] - ld l, a - ld de, -2 * 32 - add hl, de - ld a, h - and $3 - or $98 - ld a, l - ld [wHPBarMaxHP], a - ld a, h - ld [wHPBarMaxHP + 1], a - ld a, 2 - ld [$ffbe], a - ld c, 9 ; number of rows of 2x2 tiles (this covers the whole screen) -.redrawRowLoop - push bc - push hl - push hl - ld hl, wTileMap - 2 * 20 - ld de, 20 - ld a, [$ffbe] -.asm_ef1a - add hl, de - dec a - jr nz, .asm_ef1a - call CopyToScreenEdgeTiles - pop hl - ld de, $20 - ld a, [$ffbe] - ld c, a -.asm_ef28 - add hl, de - ld a, h - and $3 - or $98 - dec c - jr nz, .asm_ef28 - ld [H_SCREENEDGEREDRAWADDR + 1], a - ld a, l - ld [H_SCREENEDGEREDRAWADDR], a - ld a, REDRAWROW - ld [H_SCREENEDGEREDRAW], a - call DelayFrame - ld hl, $ffbe - inc [hl] - inc [hl] - pop hl - pop bc - dec c - jr nz, .redrawRowLoop - pop af - ld [hTilesetType], a - pop af - ld [H_AUTOBGTRANSFERENABLED], a - ret - -CompareHLWithBC: ; ef4e (3:6f4e) - ld a, h - sub b - ret nz - ld a, l - sub c - ret +INCLUDE "engine/overworld/wild_mons.asm" -INCLUDE "engine/overworld/cut.asm" +INCLUDE "engine/items/items.asm" -MarkTownVisitedAndLoadMissableObjects: ; f113 (3:7113) - ld a, [W_CURMAP] - cp ROUTE_1 - jr nc, .notInTown - ld c, a - ld b, $1 - ld hl, W_TOWNVISITEDFLAG ; mark town as visited (for flying) - predef FlagActionPredef -.notInTown - ld hl, MapHSPointers - ld a, [W_CURMAP] - ld b, $0 - ld c, a - add hl, bc - add hl, bc - ld a, [hli] ; load missable objects pointer in hl - ld h, [hl] - ; fall through - -LoadMissableObjects: ; f132 (3:7132) - ld l, a - push hl - ld de, MapHS00 ; calculate difference between out pointer and the base pointer - ld a, l - sub e - jr nc, .asm_f13c - dec h -.asm_f13c - ld l, a - ld a, h - sub d - ld h, a - ld a, h - ld [H_DIVIDEND], a - ld a, l - ld [H_DIVIDEND+1], a - xor a - ld [H_DIVIDEND+2], a - ld [H_DIVIDEND+3], a - ld a, $3 - 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 b, a - ld a, [H_DIVIDEND+3] - ld c, a ; store global offset in c - ld de, W_MISSABLEOBJECTLIST - pop hl -.writeMissableObjectsListLoop - ld a, [hli] - cp $ff - jr z, .done ; end of list - cp b - jr nz, .done ; not for current map anymore - ld a, [hli] - inc hl - ld [de], a ; write (map-local) sprite ID - inc de - ld a, c - inc c - ld [de], a ; write (global) missable object index - inc de - jr .writeMissableObjectsListLoop -.done - ld a, $ff - ld [de], a ; write sentinel - ret - -InitializeMissableObjectsFlags: ; f175 (3:7175) - ld hl, W_MISSABLEOBJECTFLAGS - ld bc, $20 - xor a - call FillMemory ; clear missable objects flags - ld hl, MapHS00 - xor a - ld [wd048], a -.missableObjectsLoop - ld a, [hli] - cp $ff ; end of list - ret z - push hl - inc hl - ld a, [hl] - cp Hide - jr nz, .asm_f19d - ld hl, W_MISSABLEOBJECTFLAGS - ld a, [wd048] - ld c, a - ld b, $1 - call MissableObjectFlagAction ; set flag iff Item is hidden -.asm_f19d - ld hl, wd048 - inc [hl] - pop hl - inc hl - inc hl - jr .missableObjectsLoop - -; tests if current sprite is a missable object that is hidden/has been removed -IsObjectHidden: ; f1a6 (3:71a6) - ld a, [H_CURRENTSPRITEOFFSET] - swap a - ld b, a - ld hl, W_MISSABLEOBJECTLIST -.loop - ld a, [hli] - cp $ff - jr z, .notHidden ; not missable -> not hidden - cp b - ld a, [hli] - jr nz, .loop - ld c, a - ld b, $2 - ld hl, W_MISSABLEOBJECTFLAGS - call MissableObjectFlagAction - ld a, c - and a - jr nz, .hidden -.notHidden - xor a -.hidden - ld [$ffe5], a - ret - -; adds missable object (items, leg. pokemon, etc.) to the map -; [wcc4d]: index of the missable object to be added (global index) -ShowObject: ; f1c8 (3:71c8) -ShowObject2: - ld hl, W_MISSABLEOBJECTFLAGS - ld a, [wcc4d] - ld c, a - ld b, $0 - call MissableObjectFlagAction ; reset "removed" flag - jp UpdateSprites - -; removes missable object (items, leg. pokemon, etc.) from the map -; [wcc4d]: index of the missable object to be removed (global index) -HideObject: ; f1d7 (3:71d7) - ld hl, W_MISSABLEOBJECTFLAGS - ld a, [wcc4d] - ld c, a - ld b, $1 - call MissableObjectFlagAction ; set "removed" flag - jp UpdateSprites - -MissableObjectFlagAction: -; identical to FlagAction - - push hl - push de - push bc - - ; bit - ld a, c - ld d, a - and 7 - ld e, a - - ; byte - ld a, d - srl a - srl a - srl a - add l - ld l, a - jr nc, .ok - inc h -.ok - - ; d = 1 << e (bitmask) - inc e - ld d, 1 -.shift - dec e - jr z, .shifted - sla d - jr .shift -.shifted - - ld a, b - and a - jr z, .reset - cp 2 - jr z, .read - -.set - ld a, [hl] - ld b, a - ld a, d - or b - ld [hl], a - jr .done - -.reset - ld a, [hl] - ld b, a - ld a, d - xor $ff - and b - ld [hl], a - jr .done - -.read - ld a, [hl] - ld b, a - ld a, d - and b - -.done - pop bc - pop de - pop hl - ld c, a - ret - -TryPushingBoulder: ; f225 (3:7225) - ld a, [wd728] - bit 0, a ; using Strength? - ret z - ld a, [wFlags_0xcd60] - bit 1, a ; has boulder dust animation from previous push played yet? - ret nz - xor a - ld [$ff8c], a - call IsSpriteInFrontOfPlayer - ld a, [$ff8c] - ld [wBoulderSpriteIndex], a - and a - jp z, ResetBoulderPushFlags - ld hl, wSpriteStateData1 + 1 - ld d, $0 - ld a, [$ff8c] - swap a - ld e, a - add hl, de - res 7, [hl] - call GetSpriteMovementByte2Pointer - ld a, [hl] - cp BOULDER_MOVEMENT_BYTE_2 - jp nz, ResetBoulderPushFlags - ld hl, wFlags_0xcd60 - bit 6, [hl] - set 6, [hl] ; indicate that the player has tried pushing - ret z ; the player must try pushing twice before the boulder will move - ld a, [hJoyHeld] - and $f0 - ret z - predef CheckForCollisionWhenPushingBoulder - ld a, [wTileInFrontOfBoulderAndBoulderCollisionResult] - and a ; was there a collision? - jp nz, ResetBoulderPushFlags - ld a, [hJoyHeld] - ld b, a - ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction - cp SPRITE_FACING_UP - jr z, .pushBoulderUp - cp SPRITE_FACING_LEFT - jr z, .pushBoulderLeft - cp SPRITE_FACING_RIGHT - jr z, .pushBoulderRight -.pushBoulderDown - bit 7, b - ret z - ld de, PushBoulderDownMovementData - jr .done -.pushBoulderUp - bit 6, b - ret z - ld de, PushBoulderUpMovementData - jr .done -.pushBoulderLeft - bit 5, b - ret z - ld de, PushBoulderLeftMovementData - jr .done -.pushBoulderRight - bit 4, b - ret z - ld de, PushBoulderRightMovementData -.done - call MoveSprite - ld a, (SFX_02_53 - SFX_Headers_02) / 3 - call PlaySound - ld hl, wFlags_0xcd60 - set 1, [hl] - ret - -PushBoulderUpMovementData: ; f2ad (3:72ad) - db NPC_MOVEMENT_UP,$FF - -PushBoulderDownMovementData: ; f2af (3:72af) - db NPC_MOVEMENT_DOWN,$FF - -PushBoulderLeftMovementData: ; f2b1 (3:72b1) - db NPC_MOVEMENT_LEFT,$FF - -PushBoulderRightMovementData: ; f2b3 (3:72b3) - db NPC_MOVEMENT_RIGHT,$FF - -DoBoulderDustAnimation: ; f2b5 (3:72b5) - ld a, [wd730] - bit 0, a - ret nz - callab AnimateBoulderDust - call DiscardButtonPresses - ld [wJoyIgnore], a - call ResetBoulderPushFlags - set 7, [hl] - ld a, [wBoulderSpriteIndex] - ld [H_SPRITEINDEX], a - call GetSpriteMovementByte2Pointer - ld [hl], $10 - ld a, (SFX_02_56 - SFX_Headers_02) / 3 - jp PlaySound - -ResetBoulderPushFlags: ; f2dd (3:72dd) - ld hl, wFlags_0xcd60 - res 1, [hl] - res 6, [hl] - ret - -_AddPartyMon: ; f2e5 (3:72e5) - ld de, wPartyCount ; wPartyCount - ld a, [wcc49] - and $f - jr z, .asm_f2f2 - ld de, wEnemyPartyCount ; wEnemyPartyCount -.asm_f2f2 - ld a, [de] - inc a - cp PARTY_LENGTH + 1 - ret nc - ld [de], a - ld a, [de] - ld [$ffe4], a - add e - ld e, a - jr nc, .asm_f300 - inc d -.asm_f300 - ld a, [wcf91] - ld [de], a - inc de - ld a, $ff - ld [de], a - ld hl, wPartyMonOT ; wd273 - ld a, [wcc49] - and $f - jr z, .asm_f315 - ld hl, wEnemyMonOT -.asm_f315 - ld a, [$ffe4] - dec a - call SkipFixedLengthTextEntries - ld d, h - ld e, l - ld hl, wPlayerName ; wd158 - ld bc, $b - call CopyData - ld a, [wcc49] - and a - jr nz, .asm_f33f - ld hl, wPartyMonNicks ; wPartyMonNicks - ld a, [$ffe4] - dec a - call SkipFixedLengthTextEntries - ld a, $2 - ld [wd07d], a - predef AskName -.asm_f33f - ld hl, wPartyMons - ld a, [wcc49] - and $f - jr z, .asm_f34c - ld hl, wEnemyMons -.asm_f34c - ld a, [$ffe4] - dec a - ld bc, wPartyMon2 - wPartyMon1 - call AddNTimes - ld e, l - ld d, h - push hl - ld a, [wcf91] - ld [wd0b5], a - call GetMonHeader - ld hl, W_MONHEADER - ld a, [hli] - ld [de], a - inc de - pop hl - push hl - ld a, [wcc49] - and $f - ld a, $98 ; set enemy trainer mon IVs to fixed average values - ld b, $88 - jr nz, .writeFreshMonData - ld a, [wcf91] - ld [wd11e], a - push de - predef IndexToPokedex - pop de - ld a, [wd11e] - dec a - ld c, a - ld b, $2 - ld hl, wPokedexOwned ; wPokedexOwned - call FlagAction - ld a, c - ld [wd153], a - ld a, [wd11e] - dec a - ld c, a - ld b, $1 - push bc - call FlagAction - pop bc - ld hl, wPokedexSeen ; wd30a - call FlagAction - pop hl - push hl - ld a, [W_ISINBATTLE] ; W_ISINBATTLE - and a - jr nz, .copyEnemyMonData - call Random ; generate random IVs - ld b, a - call Random -.writeFreshMonData ; f3b3 - push bc - ld bc, $1b - add hl, bc - pop bc - ld [hli], a - ld [hl], b ; write IVs - ld bc, $fff4 - add hl, bc - ld a, $1 - ld c, a - xor a - ld b, a - call CalcStat ; calc HP stat (set cur Hp to max HP) - ld a, [H_MULTIPLICAND+1] - ld [de], a - inc de - ld a, [H_MULTIPLICAND+2] - ld [de], a - inc de - xor a - ld [de], a ; level (?) - inc de - ld [de], a ; status ailments - inc de - jr .copyMonTypesAndMoves -.copyEnemyMonData - ld bc, $1b - add hl, bc - ld a, [wEnemyMonDVs] ; copy IVs from cur enemy mon - ld [hli], a - ld a, [wEnemyMonDVs + 1] - ld [hl], a - ld a, [wEnemyMonHP] ; copy HP from cur enemy mon - ld [de], a - inc de - ld a, [wEnemyMonHP+1] - ld [de], a - inc de - xor a - ld [de], a ; level (?) - inc de - ld a, [wEnemyMonStatus] ; copy status ailments from cur enemy mon - ld [de], a - inc de -.copyMonTypesAndMoves - ld hl, W_MONHTYPES - ld a, [hli] ; type 1 - ld [de], a - inc de - ld a, [hli] ; type 2 - ld [de], a - inc de - ld a, [hli] ; unused (?) - ld [de], a - ld hl, W_MONHMOVES - ld a, [hli] - inc de - push de - ld [de], a - ld a, [hli] - inc de - ld [de], a - ld a, [hli] - inc de - ld [de], a - ld a, [hli] - inc de - ld [de], a - push de - dec de - dec de - dec de - xor a - ld [wHPBarMaxHP], a - predef WriteMonMoves - pop de - ld a, [wPlayerID] ; set trainer ID to player ID - inc de - ld [de], a - ld a, [wPlayerID + 1] - inc de - ld [de], a - push de - ld a, [W_CURENEMYLVL] - ld d, a - callab CalcExperience - pop de - inc de - ld a, [H_MULTIPLICAND] ; write experience - ld [de], a - inc de - ld a, [H_MULTIPLICAND+1] - ld [de], a - inc de - ld a, [H_MULTIPLICAND+2] - ld [de], a - xor a - ld b, $a -.writeEVsLoop ; set all EVs to 0 - inc de - ld [de], a - dec b - jr nz, .writeEVsLoop - inc de - inc de - pop hl - call AddPartyMon_WriteMovePP - inc de - ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL - ld [de], a - inc de - ld a, [W_ISINBATTLE] ; W_ISINBATTLE - dec a - jr nz, .calcFreshStats - ld hl, wEnemyMonMaxHP ; wEnemyMonMaxHP - ld bc, $a - call CopyData ; copy stats of cur enemy mon - pop hl - jr .done -.calcFreshStats - pop hl - ld bc, $10 - add hl, bc - ld b, $0 - call CalcStats ; calculate fresh set of stats -.done - scf - ret - -LoadMovePPs: ; f473 (3:7473) - call GetPredefRegisters - ; fallthrough -AddPartyMon_WriteMovePP: ; f476 (3:7476) - ld b, $4 -.pploop - ld a, [hli] ; read move ID - and a - jr z, .empty - dec a - push hl - push de - push bc - ld hl, Moves - ld bc, $6 - call AddNTimes - ld de, wcd6d - ld a, BANK(Moves) - call FarCopyData - pop bc - pop de - pop hl - ld a, [wcd72] ; sixth move byte = pp -.empty - inc de - ld [de], a - dec b - jr nz, .pploop ; there are still moves to read - ret - -; adds enemy mon [wcf91] (at position [wWhichPokemon] in enemy list) to own party -; used in the cable club trade center -_AddEnemyMonToPlayerParty: ; f49d (3:749d) - ld hl, wPartyCount - ld a, [hl] - cp PARTY_LENGTH - scf - ret z ; party full, return failure - inc a - ld [hl], a ; add 1 to party members - ld c, a - ld b, $0 - add hl, bc - ld a, [wcf91] - ld [hli], a ; add mon as last list entry - ld [hl], $ff ; write new sentinel - ld hl, wPartyMons - ld a, [wPartyCount] - dec a - ld bc, wPartyMon2 - wPartyMon1 - call AddNTimes - ld e, l - ld d, h - ld hl, wLoadedMon - call CopyData ; write new mon's data (from wLoadedMon) - ld hl, wPartyMonOT - ld a, [wPartyCount] - dec a - call SkipFixedLengthTextEntries - ld d, h - ld e, l - ld hl, wEnemyMonOT - ld a, [wWhichPokemon] - call SkipFixedLengthTextEntries - ld bc, $000b - call CopyData ; write new mon's OT name (from an enemy mon) - ld hl, wPartyMonNicks - ld a, [wPartyCount] - dec a - call SkipFixedLengthTextEntries - ld d, h - ld e, l - ld hl, wEnemyMonNicks - ld a, [wWhichPokemon] - call SkipFixedLengthTextEntries - ld bc, $000b - call CopyData ; write new mon's nickname (from an enemy mon) - ld a, [wcf91] - ld [wd11e], a - predef IndexToPokedex - ld a, [wd11e] - dec a - ld c, a - ld b, $1 - ld hl, wPokedexOwned - push bc - call FlagAction ; add to owned pokemon - pop bc - ld hl, wPokedexSeen - call FlagAction ; add to seen pokemon - and a - ret ; return success - -Func_f51e: ; f51e (3:751e) - ld a, [wcf95] - and a - jr z, .checkPartyMonSlots - cp $2 - jr z, .checkPartyMonSlots - cp $3 - ld hl, wDayCareMon - jr z, .asm_f575 - ld hl, W_NUMINBOX ; wda80 - ld a, [hl] - cp MONS_PER_BOX - jr nz, .partyOrBoxNotFull - jr .boxFull -.checkPartyMonSlots - ld hl, wPartyCount ; wPartyCount - ld a, [hl] - cp PARTY_LENGTH - jr nz, .partyOrBoxNotFull -.boxFull - scf - ret -.partyOrBoxNotFull - inc a - ld [hl], a ; increment number of mons in party/box - ld c, a - ld b, $0 - add hl, bc - ld a, [wcf95] - cp $2 - ld a, [wDayCareMon] - jr z, .asm_f556 - ld a, [wcf91] -.asm_f556 - ld [hli], a ; write new mon ID - ld [hl], $ff ; write new sentinel - ld a, [wcf95] - dec a - ld hl, wPartyMons - ld bc, wPartyMon2 - wPartyMon1 ; $2c - ld a, [wPartyCount] ; wPartyCount - jr nz, .skipToNewMonEntry - ld hl, wBoxMons - ld bc, wBoxMon2 - wBoxMon1 ; $21 - ld a, [W_NUMINBOX] ; wda80 -.skipToNewMonEntry - dec a - call AddNTimes -.asm_f575 - push hl - ld e, l - ld d, h - ld a, [wcf95] - and a - ld hl, wBoxMons - ld bc, wBoxMon2 - wBoxMon1 ; $21 - jr z, .asm_f591 - cp $2 - ld hl, wDayCareMon - jr z, .asm_f597 - ld hl, wPartyMons - ld bc, wPartyMon2 - wPartyMon1 ; $2c -.asm_f591 - ld a, [wWhichPokemon] ; wWhichPokemon - call AddNTimes -.asm_f597 - push hl - push de - ld bc, wBoxMon2 - wBoxMon1 - call CopyData - pop de - pop hl - ld a, [wcf95] - and a - jr z, .asm_f5b4 - cp $2 - jr z, .asm_f5b4 - ld bc, wBoxMon2 - wBoxMon1 - add hl, bc - ld a, [hl] - inc de - inc de - inc de - ld [de], a -.asm_f5b4 - ld a, [wcf95] - cp $3 - ld de, W_DAYCAREMONOT - jr z, .asm_f5d3 - dec a - ld hl, wPartyMonOT ; wd273 - ld a, [wPartyCount] ; wPartyCount - jr nz, .asm_f5cd - ld hl, wBoxMonOT - ld a, [W_NUMINBOX] ; wda80 -.asm_f5cd - dec a - call SkipFixedLengthTextEntries - ld d, h - ld e, l -.asm_f5d3 - ld hl, wBoxMonOT - ld a, [wcf95] - and a - jr z, .asm_f5e6 - ld hl, W_DAYCAREMONOT - cp $2 - jr z, .asm_f5ec - ld hl, wPartyMonOT ; wd273 -.asm_f5e6 - ld a, [wWhichPokemon] ; wWhichPokemon - call SkipFixedLengthTextEntries -.asm_f5ec - ld bc, $b - call CopyData - ld a, [wcf95] - cp $3 - ld de, W_DAYCAREMONNAME - jr z, .asm_f611 - dec a - ld hl, wPartyMonNicks ; wPartyMonNicks - ld a, [wPartyCount] ; wPartyCount - jr nz, .asm_f60b - ld hl, wBoxMonNicks - ld a, [W_NUMINBOX] ; wda80 -.asm_f60b - dec a - call SkipFixedLengthTextEntries - ld d, h - ld e, l -.asm_f611 - ld hl, wBoxMonNicks - ld a, [wcf95] - and a - jr z, .asm_f624 - ld hl, W_DAYCAREMONNAME - cp $2 - jr z, .asm_f62a - ld hl, wPartyMonNicks ; wPartyMonNicks -.asm_f624 - ld a, [wWhichPokemon] ; wWhichPokemon - call SkipFixedLengthTextEntries -.asm_f62a - ld bc, $b - call CopyData - pop hl - ld a, [wcf95] - cp $1 - jr z, .asm_f664 - cp $3 - jr z, .asm_f664 - push hl - srl a - add $2 - ld [wcc49], a - call LoadMonData - callba CalcLevelFromExperience - ld a, d - ld [W_CURENEMYLVL], a ; W_CURENEMYLVL - pop hl - ld bc, wBoxMon2 - wBoxMon1 - add hl, bc - ld [hli], a - ld d, h - ld e, l - ld bc, $ffee - add hl, bc - ld b, $1 - call CalcStats -.asm_f664 - and a - ret - - -FlagActionPredef: - call GetPredefRegisters - -FlagAction: -; Perform action b on bit c -; in the bitfield at hl. -; 0: reset -; 1: set -; 2: read -; Return the result in c. - - push hl - push de - push bc - - ; bit - ld a, c - ld d, a - and 7 - ld e, a - - ; byte - ld a, d - srl a - srl a - srl a - add l - ld l, a - jr nc, .ok - inc h -.ok - - ; d = 1 << e (bitmask) - inc e - ld d, 1 -.shift - dec e - jr z, .shifted - sla d - jr .shift -.shifted - - ld a, b - and a - jr z, .reset - cp 2 - jr z, .read - -.set - ld b, [hl] - ld a, d - or b - ld [hl], a - jr .done - -.reset - ld b, [hl] - ld a, d - xor $ff - and b - ld [hl], a - jr .done - -.read - ld b, [hl] - ld a, d - and b -.done - pop bc - pop de - pop hl - ld c, a - ret - - -HealParty: -; Restore HP and PP. - - ld hl, wPartySpecies - ld de, wPartyMon1HP -.healmon - ld a, [hli] - cp $ff - jr z, .done - - push hl - push de - - ld hl, wPartyMon1Status - wPartyMon1HP - add hl, de - xor a - ld [hl], a - - push de - ld b, NUM_MOVES ; A Pokémon has 4 moves -.pp - ld hl, wPartyMon1Moves - wPartyMon1HP - add hl, de - - ld a, [hl] - and a - jr z, .nextmove - - dec a - ld hl, wPartyMon1PP - wPartyMon1HP - add hl, de - - push hl - push de - push bc - - ld hl, Moves - ld bc, $0006 - call AddNTimes - ld de, wcd6d - ld a, BANK(Moves) - call FarCopyData - ld a, [wcd72] ; default pp - - pop bc - pop de - pop hl - - inc de - push bc - ld b, a - ld a, [hl] - and $c0 - add b - ld [hl], a - pop bc - -.nextmove - dec b - jr nz, .pp - pop de - - ld hl, wPartyMon1MaxHP - wPartyMon1HP - add hl, de - ld a, [hli] - ld [de], a - inc de - ld a, [hl] - ld [de], a - - pop de - pop hl - - push hl - ld bc, wPartyMon2 - wPartyMon1 - ld h, d - ld l, e - add hl, bc - ld d, h - ld e, l - pop hl - jr .healmon - -.done - xor a - ld [wWhichPokemon], a - ld [wd11e], a - - ld a, [wPartyCount] - ld b, a -.ppup - push bc - call RestoreBonusPP - pop bc - ld hl, wWhichPokemon - inc [hl] - dec b - jr nz, .ppup - ret - - -DivideBCDPredef:: -DivideBCDPredef2:: -DivideBCDPredef3:: -DivideBCDPredef4:: - call GetPredefRegisters - -DivideBCD:: - xor a - ld [$ffa5], a - ld [$ffa6], a - ld [$ffa7], a - ld d, $1 -.asm_f72a - ld a, [$ffa2] - and $f0 - jr nz, .asm_f75b - inc d - ld a, [$ffa2] - swap a - and $f0 - ld b, a - ld a, [$ffa3] - swap a - ld [$ffa3], a - and $f - or b - ld [$ffa2], a - ld a, [$ffa3] - and $f0 - ld b, a - ld a, [$ffa4] - swap a - ld [$ffa4], a - and $f - or b - ld [$ffa3], a - ld a, [$ffa4] - and $f0 - ld [$ffa4], a - jr .asm_f72a -.asm_f75b - push de - push de - call Func_f800 - pop de - ld a, b - swap a - and $f0 - ld [$ffa5], a - dec d - jr z, .asm_f7bc - push de - call Func_f7d7 - call Func_f800 - pop de - ld a, [$ffa5] - or b - ld [$ffa5], a - dec d - jr z, .asm_f7bc - push de - call Func_f7d7 - call Func_f800 - pop de - ld a, b - swap a - and $f0 - ld [$ffa6], a - dec d - jr z, .asm_f7bc - push de - call Func_f7d7 - call Func_f800 - pop de - ld a, [$ffa6] - or b - ld [$ffa6], a - dec d - jr z, .asm_f7bc - push de - call Func_f7d7 - call Func_f800 - pop de - ld a, b - swap a - and $f0 - ld [$ffa7], a - dec d - jr z, .asm_f7bc - push de - call Func_f7d7 - call Func_f800 - pop de - ld a, [$ffa7] - or b - ld [$ffa7], a -.asm_f7bc - ld a, [$ffa5] - ld [$ffa2], a - ld a, [$ffa6] - ld [$ffa3], a - ld a, [$ffa7] - ld [$ffa4], a - pop de - ld a, $6 - sub d - and a - ret z -.asm_f7ce - push af - call Func_f7d7 - pop af - dec a - jr nz, .asm_f7ce - ret - -Func_f7d7: ; f7d7 (3:77d7) - ld a, [$ffa4] - swap a - and $f - ld b, a - ld a, [$ffa3] - swap a - ld [$ffa3], a - and $f0 - or b - ld [$ffa4], a - ld a, [$ffa3] - and $f - ld b, a - ld a, [$ffa2] - swap a - ld [$ffa2], a - and $f0 - or b - ld [$ffa3], a - ld a, [$ffa2] - and $f - ld [$ffa2], a - ret - -Func_f800: ; f800 (3:7800) - ld bc, $3 -.asm_f803 - ld de, $ff9f - ld hl, $ffa2 - push bc - call StringCmp - pop bc - ret c - inc b - ld de, $ffa1 - ld hl, $ffa4 - push bc - call SubBCD - pop bc - jr .asm_f803 - - -AddBCDPredef:: - call GetPredefRegisters - -AddBCD:: - and a - ld b, c -.add - ld a, [de] - adc [hl] - daa - ld [de], a - dec de - dec hl - dec c - jr nz, .add - jr nc, .done - ld a, $99 - inc de -.fill - ld [de], a - inc de - dec b - jr nz, .fill -.done - ret - - -SubBCDPredef:: - call GetPredefRegisters - -SubBCD:: - and a - ld b, c -.sub - ld a, [de] - sbc [hl] - daa - ld [de], a - dec de - dec hl - dec c - jr nz, .sub - jr nc, .done - ld a, $00 - inc de -.fill - ld [de], a - inc de - dec b - jr nz, .fill - scf -.done - ret - - -InitPlayerData: -InitPlayerData2: - - call Random - ld a, [hRandomSub] - ld [wPlayerID], a - - call Random - ld a, [hRandomAdd] - ld [wPlayerID + 1], a - - ld a, $ff - ld [wd71b], a ; XXX what's this? - - ld hl, wPartyCount - call InitializeEmptyList - ld hl, W_NUMINBOX - call InitializeEmptyList - ld hl, wNumBagItems - call InitializeEmptyList - ld hl, wNumBoxItems - call InitializeEmptyList - -START_MONEY EQU $3000 - ld hl, wPlayerMoney + 1 - ld a, START_MONEY / $100 - ld [hld], a - xor a - ld [hli], a - inc hl - ld [hl], a - - ld [wcc49], a - - ld hl, W_OBTAINEDBADGES - ld [hli], a - - ld [hl], a - - ld hl, wPlayerCoins - ld [hli], a - ld [hl], a - - ld hl, W_GAMEPROGRESSFLAGS - ld bc, $c8 - call FillMemory ; clear all game progress flags - - jp InitializeMissableObjectsFlags - -InitializeEmptyList: - xor a ; count - ld [hli], a - dec a ; terminator - ld [hl], a - ret - - -IsItemInBag_: ; f8a5 (3:78a5) - call GetPredefRegisters - ld hl, wNumBagItems ; wNumBagItems -.asm_f8ab - inc hl - ld a, [hli] - cp $ff - jr z, .asm_f8b7 - cp b - jr nz, .asm_f8ab - ld a, [hl] - ld b, a - ret -.asm_f8b7 - ld b, $0 - ret - -FindPathToPlayer: ; f8ba (3:78ba) - xor a - ld hl, $ff97 - ld [hli], a - ld [hli], a - ld [hli], a - ld [hl], a - ld hl, wNPCMovementDirections2 - ld de, $0 -.loop - ld a, [$ff99] - ld b, a - ld a, [$ff95] ; Y distance in steps - call CalcDifference - ld d, a - and a - jr nz, .asm_f8da - ld a, [$ff98] - set 0, a - ld [$ff98], a -.asm_f8da - ld a, [$ff9a] - ld b, a - ld a, [$ff96] ; X distance in steps - call CalcDifference - ld e, a - and a - jr nz, .asm_f8ec - ld a, [$ff98] - set 1, a - ld [$ff98], a -.asm_f8ec - ld a, [$ff98] - cp $3 - jr z, .done - ld a, e - cp d - jr c, .asm_f90a - ld a, [$ff9d] - bit 1, a - jr nz, .asm_f900 - ld d, NPC_MOVEMENT_RIGHT - jr .asm_f902 -.asm_f900 - ld d, NPC_MOVEMENT_LEFT -.asm_f902 - ld a, [$ff9a] - add $1 - ld [$ff9a], a - jr .asm_f91c -.asm_f90a - ld a, [$ff9d] - bit 0, a - jr nz, .asm_f914 - ld d, NPC_MOVEMENT_DOWN - jr .asm_f916 -.asm_f914 - ld d, NPC_MOVEMENT_UP -.asm_f916 - ld a, [$ff99] - add $1 - ld [$ff99], a -.asm_f91c - ld a, d - ld [hli], a - ld a, [$ff97] - inc a - ld [$ff97], a - jp .loop -.done - ld [hl], $ff - ret - -CalcPositionOfPlayerRelativeToNPC: ; f929 (3:7929) - xor a - ld [$ff9d], a - ld a, [wSpriteStateData1 + 4] ; player's sprite screen Y position in pixels - ld d, a - ld a, [wSpriteStateData1 + 6] ; player's sprite screen X position in pixels - ld e, a - ld hl, wSpriteStateData1 - ld a, [$ff95] ; sprite offset - add l - add $4 - ld l, a - jr nc, .noCarry - inc h -.noCarry - ld a, d - ld b, a - ld a, [hli] ; NPC sprite screen Y position in pixels - call CalcDifference - jr nc, .NPCSouthOfOrAlignedWithPlayer -.NPCNorthOfPlayer - push hl - ld hl, $ff9d - bit 0, [hl] - set 0, [hl] - pop hl - jr .divideYDistance -.NPCSouthOfOrAlignedWithPlayer - push hl - ld hl, $ff9d - bit 0, [hl] - res 0, [hl] - pop hl -.divideYDistance - push hl - ld hl, $ffe5 - ld [hli], a - ld a, 16 - ld [hli], a - call DivideBytes ; divide Y absolute distance by 16 - ld a, [hl] ; quotient - ld [$ff95], a - pop hl - inc hl - ld b, e - ld a, [hl] ; NPC sprite screen X position in pixels - call CalcDifference - jr nc, .NPCEastOfOrAlignedWithPlayer -.NPCWestOfPlayer - push hl - ld hl, $ff9d - bit 1, [hl] - set 1, [hl] - pop hl - jr .divideXDistance -.NPCEastOfOrAlignedWithPlayer - push hl - ld hl, $ff9d - bit 1, [hl] - res 1, [hl] - pop hl -.divideXDistance - ld [$ffe5], a - ld a, 16 - ld [$ffe6], a - call DivideBytes ; divide X absolute distance by 16 - ld a, [$ffe7] ; quotient - ld [$ff96], a - ld a, [$ff9b] - and a - ret z - ld a, [$ff9d] - cpl - and $3 - ld [$ff9d], a - ret - -ConvertNPCMovementDirectionsToJoypadMasks: ; f9a0 (3:79a0) - ld a, [$ff95] - ld [wNPCMovementDirections2Index], a - dec a - ld de, wSimulatedJoypadStatesEnd - ld hl, wNPCMovementDirections2 - add l - ld l, a - jr nc, .loop - inc h -.loop - ld a, [hld] - call ConvertNPCMovementDirectionToJoypadMask - ld [de], a - inc de - ld a, [$ff95] - dec a - ld [$ff95], a - jr nz, .loop - ret - -ConvertNPCMovementDirectionToJoypadMask: ; f9bf (3:79bf) - push hl - ld b, a - ld hl, NPCMovementDirectionsToJoypadMasksTable -.loop - ld a, [hli] - cp $ff - jr z, .done - cp b - jr z, .loadJoypadMask - inc hl - jr .loop -.loadJoypadMask - ld a, [hl] -.done - pop hl - ret - -NPCMovementDirectionsToJoypadMasksTable: ; f9d2 (3:79d2) - db NPC_MOVEMENT_UP, D_UP - db NPC_MOVEMENT_DOWN, D_DOWN - db NPC_MOVEMENT_LEFT, D_LEFT - db NPC_MOVEMENT_RIGHT, D_RIGHT - db $ff - -Func_f9db: ; f9db (3:79db) - ret +INCLUDE "engine/menu/draw_badges.asm" +INCLUDE "engine/overworld/update_map.asm" +INCLUDE "engine/overworld/cut.asm" +INCLUDE "engine/overworld/missable_objects.asm" +INCLUDE "engine/overworld/push_boulder.asm" + +INCLUDE "engine/add_mon.asm" +INCLUDE "engine/flag_action.asm" +INCLUDE "engine/heal_party.asm" +INCLUDE "engine/bcd.asm" +INCLUDE "engine/init_player_data.asm" +INCLUDE "engine/get_bag_item_quantity.asm" +INCLUDE "engine/pathfinding.asm" INCLUDE "engine/hp_bar.asm" - INCLUDE "engine/hidden_object_functions3.asm" - -SECTION "NPC Sprites 1", ROMX, BANK[NPC_SPRITES_1] +SECTION "NPC Sprites 1", ROMX[$4000], BANK[NPC_SPRITES_1] OakAideSprite: INCBIN "gfx/sprites/oak_aide.2bpp" RockerSprite: INCBIN "gfx/sprites/rocker.2bpp" @@ -4736,24 +158,33 @@ OldAmberSprite: INCBIN "gfx/sprites/old_amber.2bpp" LyingOldManSprite: INCBIN "gfx/sprites/lying_old_man.2bpp" -SECTION "Graphics", ROMX, BANK[GFX] +SECTION "Graphics", ROMX[$5380], BANK[GFX] PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.2bpp" FontGraphics: INCBIN "gfx/font.1bpp" +FontGraphicsEnd: ABTiles: INCBIN "gfx/AB.2bpp" HpBarAndStatusGraphics: INCBIN "gfx/hp_bar_and_status.2bpp" +HpBarAndStatusGraphicsEnd: BattleHudTiles1: INCBIN "gfx/battle_hud1.1bpp" +BattleHudTiles1End: BattleHudTiles2: INCBIN "gfx/battle_hud2.1bpp" BattleHudTiles3: INCBIN "gfx/battle_hud3.1bpp" +BattleHudTiles3End: NintendoCopyrightLogoGraphics: INCBIN "gfx/copyright.2bpp" GamefreakLogoGraphics: INCBIN "gfx/gamefreak.2bpp" +GamefreakLogoGraphicsEnd: TextBoxGraphics: INCBIN "gfx/text_box.2bpp" +TextBoxGraphicsEnd: PokedexTileGraphics: INCBIN "gfx/pokedex.2bpp" +PokedexTileGraphicsEnd: WorldMapTileGraphics: INCBIN "gfx/town_map.2bpp" +WorldMapTileGraphicsEnd: PlayerCharacterTitleGraphics: INCBIN "gfx/player_title.2bpp" +PlayerCharacterTitleGraphicsEnd: -SECTION "Battle (bank 4)", ROMX, BANK[$4] +SECTION "Battle (bank 4)", ROMX[$68D8], BANK[$4] INCLUDE "engine/overworld/is_player_just_outside_map.asm" INCLUDE "engine/menu/status_screen.asm" @@ -4775,7 +206,7 @@ INCLUDE "engine/battle/get_trainer_name.asm" INCLUDE "engine/random.asm" -SECTION "NPC Sprites 2", ROMX, BANK[NPC_SPRITES_2] +SECTION "NPC Sprites 2", ROMX[$4000], BANK[NPC_SPRITES_2] RedCyclingSprite: INCBIN "gfx/sprites/cycling.2bpp" RedSprite: INCBIN "gfx/sprites/red.2bpp" @@ -4819,7 +250,7 @@ LoreleiSprite: INCBIN "gfx/sprites/lorelei.2bpp" SeelSprite: INCBIN "gfx/sprites/seel.2bpp" -SECTION "Battle (bank 5)", ROMX, BANK[$5] +SECTION "Battle (bank 5)", ROMX[$7840], BANK[$5] INCLUDE "engine/load_pokedex_tiles.asm" INCLUDE "engine/overworld/map_sprites.asm" @@ -4829,7 +260,7 @@ INCLUDE "engine/battle/moveEffects/substitute_effect.asm" INCLUDE "engine/menu/pc.asm" -SECTION "bank6",ROMX,BANK[$6] +SECTION "bank6",ROMX[$4000],BANK[$6] INCLUDE "data/mapHeaders/celadoncity.asm" INCLUDE "data/mapObjects/celadoncity.asm" @@ -4904,7 +335,7 @@ INCLUDE "engine/overworld/doors.asm" INCLUDE "engine/overworld/ledges.asm" -SECTION "bank7",ROMX,BANK[$7] +SECTION "bank7",ROMX[$4000],BANK[$7] INCLUDE "data/mapHeaders/cinnabarisland.asm" INCLUDE "data/mapObjects/cinnabarisland.asm" @@ -5079,19 +510,13 @@ INCLUDE "data/mapHeaders/billshouse.asm" INCLUDE "scripts/billshouse.asm" INCLUDE "data/mapObjects/billshouse.asm" BillsHouseBlocks: INCBIN "maps/billshouse.blk" -IF DEF(_OPTION_BEACH_HOUSE) -INCLUDE "data/mapHeaders/beach_house.asm" -INCLUDE "scripts/beach_house.asm" -BeachHouseBlockdata: INCBIN "maps/beach_house.blk" -INCLUDE "data/mapObjects/beach_house.asm" -ENDC INCLUDE "engine/menu/oaks_pc.asm" INCLUDE "engine/hidden_object_functions7.asm" -SECTION "Pics 1", ROMX, BANK[PICS_1] +SECTION "Pics 1", ROMX[$4000], BANK[PICS_1] RhydonPicFront:: INCBIN "pic/bmon/rhydon.pic" RhydonPicBack:: INCBIN "pic/monback/rhydonb.pic" @@ -5153,13 +578,13 @@ TangelaPicFront:: INCBIN "pic/bmon/tangela.pic" TangelaPicBack:: INCBIN "pic/monback/tangelab.pic" -SECTION "Battle (bank 9)", ROMX, BANK[$9] +SECTION "Battle (bank 9)", ROMX[$7D6B], BANK[$9] INCLUDE "engine/battle/print_type.asm" INCLUDE "engine/battle/save_trainer_name.asm" INCLUDE "engine/battle/moveEffects/focus_energy_effect.asm" -SECTION "Pics 2", ROMX, BANK[PICS_2] +SECTION "Pics 2", ROMX[$4000], BANK[PICS_2] GrowlithePicFront:: INCBIN "pic/bmon/growlithe.pic" GrowlithePicBack:: INCBIN "pic/monback/growlitheb.pic" @@ -5227,11 +652,11 @@ MoltresPicFront:: INCBIN "pic/bmon/moltres.pic" MoltresPicBack:: INCBIN "pic/monback/moltresb.pic" -SECTION "Battle (bank A)", ROMX, BANK[$A] +SECTION "Battle (bank A)", ROMX[$7EA9], BANK[$A] INCLUDE "engine/battle/moveEffects/leech_seed_effect.asm" -SECTION "Pics 3", ROMX, BANK[PICS_3] +SECTION "Pics 3", ROMX[$4000], BANK[PICS_3] ArticunoPicFront:: INCBIN "pic/bmon/articuno.pic" ArticunoPicBack:: INCBIN "pic/monback/articunob.pic" @@ -5305,11 +730,12 @@ BeedrillPicBack:: INCBIN "pic/monback/beedrillb.pic" FossilKabutopsPic:: INCBIN "pic/bmon/fossilkabutops.pic" -SECTION "Battle (bank B)", ROMX, BANK[$B] +SECTION "Battle (bank B)", ROMX[$7B7B], BANK[$B] INCLUDE "engine/battle/display_effectiveness.asm" TrainerInfoTextBoxTileGraphics: INCBIN "gfx/trainer_info.2bpp" +TrainerInfoTextBoxTileGraphicsEnd: BlankLeaderNames: INCBIN "gfx/blank_leader_names.2bpp" CircleTile: INCBIN "gfx/circle_tile.2bpp" BadgeNumbersTileGraphics: INCBIN "gfx/badge_numbers.2bpp" @@ -5320,7 +746,7 @@ INCLUDE "engine/battle/moveEffects/pay_day_effect.asm" INCLUDE "engine/game_corner_slots2.asm" -SECTION "Pics 4", ROMX, BANK[PICS_4] +SECTION "Pics 4", ROMX[$4000], BANK[PICS_4] DodrioPicFront:: INCBIN "pic/bmon/dodrio.pic" DodrioPicBack:: INCBIN "pic/monback/dodriob.pic" @@ -5385,12 +811,12 @@ RedPicBack:: INCBIN "pic/trainer/redb.pic" OldManPic:: INCBIN "pic/trainer/oldman.pic" -SECTION "Battle (bank C)", ROMX, BANK[$C] +SECTION "Battle (bank C)", ROMX[$7F2B], BANK[$C] INCLUDE "engine/battle/moveEffects/mist_effect.asm" INCLUDE "engine/battle/moveEffects/one_hit_ko_effect.asm" -SECTION "Pics 5", ROMX, BANK[PICS_5] +SECTION "Pics 5", ROMX[$4000], BANK[PICS_5] BulbasaurPicFront:: INCBIN "pic/bmon/bulbasaur.pic" BulbasaurPicBack:: INCBIN "pic/monback/bulbasaurb.pic" @@ -5448,7 +874,7 @@ VictreebelPicFront:: INCBIN "pic/bmon/victreebel.pic" VictreebelPicBack:: INCBIN "pic/monback/victreebelb.pic" -SECTION "Battle (bank D)", ROMX, BANK[$D] +SECTION "Battle (bank D)", ROMX[$7244], BANK[$D] INCLUDE "engine/titlescreen2.asm" INCLUDE "engine/battle/link_battle_versus_text.asm" @@ -5458,7 +884,7 @@ INCLUDE "engine/multiply_divide.asm" INCLUDE "engine/game_corner_slots.asm" -SECTION "bankE",ROMX,BANK[$E] +SECTION "bankE",ROMX[$4000],BANK[$E] INCLUDE "data/moves.asm" BaseStats: INCLUDE "data/base_stats.asm" @@ -5471,10 +897,12 @@ INCLUDE "engine/battle/draw_hud_pokeball_gfx.asm" TradingAnimationGraphics: INCBIN "gfx/game_boy.norepeat.2bpp" INCBIN "gfx/link_cable.2bpp" +TradingAnimationGraphicsEnd: TradingAnimationGraphics2: ; Pokeball traveling through the link cable. INCBIN "gfx/trade2.2bpp" +TradingAnimationGraphics2End: INCLUDE "engine/evos_moves.asm" INCLUDE "engine/battle/moveEffects/heal_effect.asm" @@ -5482,12 +910,12 @@ INCLUDE "engine/battle/moveEffects/transform_effect.asm" INCLUDE "engine/battle/moveEffects/reflect_light_screen_effect.asm" -SECTION "bankF",ROMX,BANK[$F] +SECTION "bankF",ROMX[$4000],BANK[$F] INCLUDE "engine/battle/core.asm" -SECTION "bank10",ROMX,BANK[$10] +SECTION "bank10",ROMX[$4000],BANK[$10] INCLUDE "engine/menu/pokedex.asm" INCLUDE "engine/trade.asm" @@ -5495,7 +923,7 @@ INCLUDE "engine/intro.asm" INCLUDE "engine/trade2.asm" -SECTION "bank11",ROMX,BANK[$11] +SECTION "bank11",ROMX[$4000],BANK[$11] INCLUDE "data/mapHeaders/lavendertown.asm" INCLUDE "data/mapObjects/lavendertown.asm" @@ -5640,7 +1068,7 @@ SeafoamIslands5Blocks: INCBIN "maps/seafoamislands5.blk" INCLUDE "engine/overworld/hidden_objects.asm" -SECTION "bank12",ROMX,BANK[$12] +SECTION "bank12",ROMX[$4000],BANK[$12] INCLUDE "data/mapHeaders/route7.asm" INCLUDE "data/mapObjects/route7.asm" @@ -5819,7 +1247,7 @@ INCLUDE "data/mapObjects/safarizonesecrethouse.asm" SafariZoneSecretHouseBlocks: INCBIN "maps/safarizonesecrethouse.blk" -SECTION "bank13",ROMX,BANK[$13] +SECTION "bank13",ROMX[$4000],BANK[$13] TrainerPics:: YoungsterPic:: INCBIN "pic/trainer/youngster.pic" @@ -5869,22 +1297,22 @@ ChannelerPic:: INCBIN "pic/trainer/channeler.pic" AgathaPic:: INCBIN "pic/trainer/agatha.pic" LancePic:: INCBIN "pic/trainer/lance.pic" -INCLUDE "data/mapHeaders/battlecenterm.asm" -INCLUDE "scripts/battlecenterm.asm" -INCLUDE "data/mapObjects/battlecenterm.asm" -BattleCenterMBlocks: INCBIN "maps/battlecenterm.blk" +INCLUDE "data/mapHeaders/tradecenter.asm" +INCLUDE "scripts/tradecenter.asm" +INCLUDE "data/mapObjects/tradecenter.asm" +TradeCenterBlocks: INCBIN "maps/tradecenter.blk" -INCLUDE "data/mapHeaders/tradecenterm.asm" -INCLUDE "scripts/tradecenterm.asm" -INCLUDE "data/mapObjects/tradecenterm.asm" -TradeCenterMBlocks: INCBIN "maps/tradecenterm.blk" +INCLUDE "data/mapHeaders/colosseum.asm" +INCLUDE "scripts/colosseum.asm" +INCLUDE "data/mapObjects/colosseum.asm" +ColosseumBlocks: INCBIN "maps/colosseum.blk" INCLUDE "engine/give_pokemon.asm" INCLUDE "engine/predefs.asm" -SECTION "bank14",ROMX,BANK[$14] +SECTION "bank14",ROMX[$4000],BANK[$14] INCLUDE "data/mapHeaders/route22.asm" INCLUDE "data/mapObjects/route22.asm" @@ -5962,7 +1390,7 @@ INCLUDE "engine/menu/prize_menu.asm" INCLUDE "engine/hidden_object_functions14.asm" -SECTION "bank15",ROMX,BANK[$15] +SECTION "bank15",ROMX[$4000],BANK[$15] INCLUDE "data/mapHeaders/route2.asm" INCLUDE "data/mapObjects/route2.asm" @@ -5998,11 +1426,7 @@ Route17Blocks: INCBIN "maps/route17.blk" INCLUDE "data/mapHeaders/route19.asm" INCLUDE "data/mapObjects/route19.asm" -IF DEF(_OPTION_BEACH_HOUSE) -Route19Blocks: INCBIN "maps/route19-yellow.blk" -ELSE Route19Blocks: INCBIN "maps/route19.blk" -ENDC INCLUDE "data/mapHeaders/route21.asm" INCLUDE "data/mapObjects/route21.asm" @@ -6058,7 +1482,7 @@ INCLUDE "engine/menu/diploma.asm" INCLUDE "engine/overworld/trainers.asm" -SECTION "bank16",ROMX,BANK[$16] +SECTION "bank16",ROMX[$4000],BANK[$16] INCLUDE "data/mapHeaders/route6.asm" INCLUDE "data/mapObjects/route6.asm" @@ -6148,7 +1572,7 @@ HallofFameRoomBlocks: INCLUDE "engine/overworld/saffron_guards.asm" -SECTION "bank17",ROMX,BANK[$17] +SECTION "bank17",ROMX[$4000],BANK[$17] SaffronMartBlocks: LavenderMartBlocks: @@ -6304,7 +1728,7 @@ INCLUDE "engine/predefs17_2.asm" INCLUDE "engine/hidden_object_functions17.asm" -SECTION "bank18",ROMX,BANK[$18] +SECTION "bank18",ROMX[$4000],BANK[$18] ViridianForestBlocks: INCBIN "maps/viridianforest.blk" UndergroundPathNSBlocks: INCBIN "maps/undergroundpathns.blk" @@ -6427,7 +1851,7 @@ SilphCo11Blocks: INCBIN "maps/silphco11.blk" INCLUDE "engine/hidden_object_functions18.asm" -SECTION "bank19",ROMX,BANK[$19] +SECTION "bank19",ROMX[$4000],BANK[$19] Overworld_GFX: INCBIN "gfx/tilesets/overworld.t2.2bpp" Overworld_Block: INCBIN "gfx/blocksets/overworld.bst" @@ -6449,7 +1873,7 @@ Plateau_GFX: INCBIN "gfx/tilesets/plateau.t10.2bpp" Plateau_Block: INCBIN "gfx/blocksets/plateau.bst" -SECTION "bank1A",ROMX,BANK[$1A] +SECTION "bank1A",ROMX[$4000],BANK[$1A] INCLUDE "engine/battle/decrement_pp.asm" @@ -6460,6 +1884,7 @@ ENDC IF DEF(_BLUE) INCBIN "gfx/blue/blueversion.1bpp" ; 8 tiles ENDC +Version_GFXEnd: Dojo_GFX: Gym_GFX: INCBIN "gfx/tilesets/gym.2bpp" @@ -6484,7 +1909,7 @@ Facility_GFX: INCBIN "gfx/tilesets/facility.2bpp" Facility_Block: INCBIN "gfx/blocksets/facility.bst" -SECTION "bank1B",ROMX,BANK[$1B] +SECTION "bank1B",ROMX[$4000],BANK[$1B] Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.t4.2bpp" Cemetery_Block: INCBIN "gfx/blocksets/cemetery.bst" @@ -6502,7 +1927,7 @@ Underground_GFX: INCBIN "gfx/tilesets/underground.t7.2bpp" Underground_Block: INCBIN "gfx/blocksets/underground.bst" -SECTION "bank1C",ROMX,BANK[$1C] +SECTION "bank1C",ROMX[$4000],BANK[$1C] INCLUDE "engine/gamefreak.asm" INCLUDE "engine/hall_of_fame.asm" @@ -6517,7 +1942,7 @@ INCLUDE "engine/palettes.asm" INCLUDE "engine/save.asm" -SECTION "bank1D",ROMX,BANK[$1D] +SECTION "bank1D",ROMX[$4000],BANK[$1D] CopycatsHouse1FBlocks: INCBIN "maps/copycatshouse1f.blk" @@ -6649,7 +2074,7 @@ INCLUDE "engine/menu/league_pc.asm" INCLUDE "engine/overworld/hidden_items.asm" -SECTION "bank1E",ROMX,BANK[$1E] +SECTION "bank1E",ROMX[$4000],BANK[$1E] INCLUDE "engine/battle/animations.asm" @@ -6669,13 +2094,3 @@ INCLUDE "engine/evolution.asm" INCLUDE "engine/overworld/elevator.asm" INCLUDE "engine/items/tm_prices.asm" - -IF DEF(_OPTION_BEACH_HOUSE) -SECTION "bank3C",ROMX[$4314],BANK[$3C] - -BeachHouse_GFX: - INCBIN "gfx/tilesets/beachhouse.2bpp" - -BeachHouse_Block: - INCBIN "gfx/blocksets/beachhouse.bst" -ENDC diff --git a/maps/beach_house.blk b/maps/beach_house.blk deleted file mode 100644 index 5bcdb58a..00000000 --- a/maps/beach_house.blk +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/maps/tradecenterm.blk b/maps/colosseum.blk index d05a5b43..d05a5b43 100644 --- a/maps/tradecenterm.blk +++ b/maps/colosseum.blk diff --git a/maps/battlecenterm.blk b/maps/tradecenter.blk index 638b48ef..638b48ef 100644 --- a/maps/battlecenterm.blk +++ b/maps/tradecenter.blk diff --git a/pic/ymon/electrode.png b/pic/ymon/electrode.png Binary files differindex ab1a5550..f5e05464 100644..100755 --- a/pic/ymon/electrode.png +++ b/pic/ymon/electrode.png diff --git a/red.asm b/red.asm deleted file mode 100644 index 901a611a..00000000 --- a/red.asm +++ /dev/null @@ -1,2 +0,0 @@ -_RED EQU 1 -INCLUDE "charmap.asm" diff --git a/red/audio.asm b/red/audio.asm deleted file mode 100644 index 6c90a7c1..00000000 --- a/red/audio.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "red.asm" -INCLUDE "audio.asm" diff --git a/red/main.asm b/red/main.asm deleted file mode 100644 index ff8de04f..00000000 --- a/red/main.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "red.asm" -INCLUDE "main.asm" diff --git a/red/text.asm b/red/text.asm deleted file mode 100644 index d5d571d7..00000000 --- a/red/text.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "red.asm" -INCLUDE "text.asm" diff --git a/red/wram.asm b/red/wram.asm deleted file mode 100644 index 68c3c803..00000000 --- a/red/wram.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "red.asm" -INCLUDE "wram.asm" diff --git a/scripts/agatha.asm b/scripts/agatha.asm index a8f9e137..88d6a8de 100755 --- a/scripts/agatha.asm +++ b/scripts/agatha.asm @@ -1,46 +1,47 @@ -AgathaScript: ; 7642d (1d:642d) - call AgathaScript_76443 +AgathaScript: + call AgathaShowOrHideExitBlock call EnableAutoTextBoxDrawing - ld hl, AgathaTrainerHeaders + ld hl, AgathaTrainerHeader0 ld de, AgathaScriptPointers - ld a, [W_AGATHACURSCRIPT] + ld a, [wAgathaCurScript] call ExecuteCurMapScriptInTable - ld [W_AGATHACURSCRIPT], a + ld [wAgathaCurScript], a ret -AgathaScript_76443: ; 76443 (1d:6443) - ld hl, wd126 +AgathaShowOrHideExitBlock: +; Blocks or clears the exit to the next room. + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd865] - bit 1, a - jr z, .asm_76457 + CheckEvent EVENT_BEAT_AGATHAS_ROOM_TRAINER_0 + jr z, .blockExitToNextRoom ld a, $e - jp AgathaScript_76459 -.asm_76457 + jp .setExitBlock +.blockExitToNextRoom ld a, $3b - -AgathaScript_76459: ; 76459 (1d:6459) - ld [wd09f], a - ld bc, $2 +.setExitBlock: + ld [wNewTileBlockID], a + lb bc, 0, 2 predef_jump ReplaceTileBlock -AgathaScript_76464: ; 76464 (1d:6464) +ResetAgathaScript: xor a - ld [W_AGATHACURSCRIPT], a + ld [wAgathaCurScript], a ret -AgathaScriptPointers: ; 76469 (1d:6469) +AgathaScriptPointers: dw AgathaScript0 dw DisplayEnemyTrainerTextAndStartBattle dw AgathaScript2 dw AgathaScript3 dw AgathaScript4 -AgathaScript4: ; 76473 (1d:6473) +AgathaScript4: ret -asm_76474: ; 76474 (1d:6474) + +AgathaScriptWalkIntoRoom: +; Walk six steps upward. ld hl, wSimulatedJoypadStatesEnd ld a, D_UP ld [hli], a @@ -53,12 +54,12 @@ asm_76474: ; 76474 (1d:6474) ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $3 - ld [W_AGATHACURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wAgathaCurScript], a + ld [wCurMapScript], a ret -AgathaScript0: ; 76490 (1d:6490) - ld hl, CoordsData_764d1 +AgathaScript0: + ld hl, AgathaEntranceCoords call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a @@ -66,91 +67,88 @@ AgathaScript0: ; 76490 (1d:6490) ld [hJoyHeld], a ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesIndex], a - ld a, [wWhichTrade] ; wWhichTrade - cp $3 - jr c, .asm_764b4 - ld hl, wd865 - bit 6, [hl] - set 6, [hl] - jr z, asm_76474 -.asm_764b4 + ld a, [wCoordIndex] + cp $3 ; Is player standing one tile above the exit? + jr c, .stopPlayerFromLeaving + CheckAndSetEvent EVENT_AUTOWALKED_INTO_AGATHAS_ROOM + jr z, AgathaScriptWalkIntoRoom +.stopPlayerFromLeaving ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - call DisplayTextID + ld [hSpriteIndexOrTextID], a + call DisplayTextID ; "Don't run away!" ld a, D_UP ld [wSimulatedJoypadStatesEnd], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $3 - ld [W_AGATHACURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wAgathaCurScript], a + ld [wCurMapScript], a ret -CoordsData_764d1: ; 764d1 (1d:64d1) +AgathaEntranceCoords: db $0A,$04 db $0A,$05 db $0B,$04 db $0B,$05 db $FF -AgathaScript3: ; 764da (1d:64da) +AgathaScript3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a ld [wJoyIgnore], a - ld [W_AGATHACURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wAgathaCurScript], a + ld [wCurMapScript], a ret -AgathaScript2: ; 764ed (1d:64ed) +AgathaScript2: call EndTrainerBattle - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [wIsInBattle] cp $ff - jp z, AgathaScript_76464 + jp z, ResetAgathaScript ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -AgathaTextPointers: ; 76505 (1d:6505) +AgathaTextPointers: dw AgathaText1 - dw AgathaText2 + dw AgathaDontRunAwayText -AgathaTrainerHeaders: ; 76509 (1d:6509) -AgathaTrainerHeader0: ; 76509 (1d:6509) - db $1 ; flag's bit +AgathaTrainerHeader0: + dbEventFlagBit EVENT_BEAT_AGATHAS_ROOM_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_AGATHAS_ROOM_TRAINER_0 + dw AgathaBeforeBattleText ; TextBeforeBattle + dw AgathaAfterBattleText ; TextAfterBattle + dw AgathaEndBattleText ; TextEndBattle + dw AgathaEndBattleText ; TextEndBattle db $ff -AgathaText1: ; 76516 (1d:6516) - db $08 ; asm +AgathaText1: + TX_ASM ld hl, AgathaTrainerHeader0 call TalkToTrainer jp TextScriptEnd -AgathaBeforeBattleText: ; 76520 (1d:6520) +AgathaBeforeBattleText: TX_FAR _AgathaBeforeBattleText db "@" -AgathaEndBattleText: ; 76525 (1d:6525) +AgathaEndBattleText: TX_FAR _AgathaEndBattleText db "@" -AgathaAfterBattleText: ; 7652a (1d:652a) +AgathaAfterBattleText: TX_FAR _AgathaAfterBattleText db "@" -AgathaText2: ; 7652f (1d:652f) - TX_FAR _AgathaText2 +AgathaDontRunAwayText: + TX_FAR _AgathaDontRunAwayText db "@" diff --git a/scripts/battlecenterm.asm b/scripts/battlecenterm.asm deleted file mode 100755 index 5ab697a1..00000000 --- a/scripts/battlecenterm.asm +++ /dev/null @@ -1,38 +0,0 @@ -BattleCenterMScript: ; 4fd10 (13:7d10) - call EnableAutoTextBoxDrawing - ld a, [$ffaa] - cp $2 - ld a, $8 - jr z, .asm_4fd1d ; 0x4fd19 $2 - ld a, $c -.asm_4fd1d - ld [$ff8d], a - ld a, $1 - ld [$ff8c], a - call SetSpriteFacingDirection - ld hl, wd72d - bit 0, [hl] - set 0, [hl] - ret nz - ld hl, wSpriteStateData2 + $14 - ld a, $8 - ld [hli], a - ld a, $a - ld [hl], a - ld a, $8 - ld [wSpriteStateData1 + $19], a - ld a, [$ffaa] - cp $2 - ret z - ld a, $7 - ld [wSpriteStateData2 + $15], a - ld a, $c - ld [wSpriteStateData1 + $19], a - ret - -BattleCenterMTextPointers: ; 4fd4c (13:7d4c) - dw BattleCenterMText1 - -BattleCenterMText1: ; 4fd4e (13:7d4e) - TX_FAR _BattleCenterMText1 - db "@" diff --git a/scripts/beach_house.asm b/scripts/beach_house.asm deleted file mode 100644 index 67c29f1b..00000000 --- a/scripts/beach_house.asm +++ /dev/null @@ -1,195 +0,0 @@ -BeachHouseScript: - call $3c29 - ret - -BeachHouseTextPointers: - dw SurfinDudeText - dw BeachHousePikachuText - dw BeachHouseSign1Text - dw BeachHouseSign2Text - dw BeachHouseSign3Text - dw BeachHouseSign4Text - -SurfinDudeText: - db 8 - ld a,[$d471] - bit 6,a - jr nz,.next - ld hl,.SurfinDudeText4 - call PrintText - jr .done -.next - ld hl,$d492 - bit 0,[hl] - set 0,[hl] - jr nz,.next2 - ld hl,.SurfinDudeText1 - jr .next3 -.next2 - ld hl,.SurfinDudeText3 -.next3 - call PrintText - call YesNoChoice - ld a,[wCurrentMenuItem] - and a - jr nz,.xf226b - ld a,1 - ld [$cc3c],a - ld b,$3e - ld hl,$4000 - call $3e84 - ld hl,$d492 - set 1,[hl] - jr .done -.xf226b - ld hl,.SurfinDudeText2 - call PrintText -.done - jp TextScriptEnd - -.SurfinDudeText1 - TX_FAR _SurfinDudeText1 - db "@" -.SurfinDudeText2 - TX_FAR _SurfinDudeText2 - db "@" -.SurfinDudeText3 - TX_FAR _SurfinDudeText3 - db "@" -.SurfinDudeText4 - TX_FAR _SurfinDudeText4 - db "@" - -BeachHousePikachuText: - db 8 - ld hl,.BeachHousePikachuText - call PrintText - ld a,PIKACHU - call PlayCry - call WaitForSoundToFinish - jp TextScriptEnd - -.BeachHousePikachuText - TX_FAR _BeachHousePikachuText - db "@" - -BeachHouseSign1Text: - db 8 - ld hl,.BeachHouseSign1Text2 - ld a,[$d471] - bit 6,a - jr z,.next - ld hl,.BeachHouseSign1Text1 -.next - call PrintText - jp TextScriptEnd - -.BeachHouseSign1Text1 - TX_FAR _BeachHouseSign1Text1 - db "@" -.BeachHouseSign1Text2 - TX_FAR _BeachHouseSign1Text2 - db "@" - -BeachHouseSign2Text: - db 8 - ld hl,.BeachHouseSign2Text2 - ld a,[$d471] - bit 6,a - jr z,.next - ld hl,.BeachHouseSign2Text1 -.next - call PrintText - jp TextScriptEnd - -.BeachHouseSign2Text1 - TX_FAR _BeachHouseSign2Text1 - db "@" -.BeachHouseSign2Text2 - TX_FAR _BeachHouseSign2Text2 - db "@" - -BeachHouseSign3Text: - db 8 - ld hl,.BeachHouseSign3Text2 - ld a,[$d471] - bit 6,a - jr z,.next - ld hl,.BeachHouseSign3Text1 -.next - call PrintText - jp TextScriptEnd - -.BeachHouseSign3Text1 - TX_FAR _BeachHouseSign3Text1 - db "@" -.BeachHouseSign3Text2 - TX_FAR _BeachHouseSign3Text2 - db "@" - -BeachHouseSign4Text: - db 8 - ld a,1 - ld [$cc3c],a - ld a,[$d471] - bit 6,a - jr z,.xf2369 - - ld hl,$d492 - bit 1,[hl] - jr z,.next2 - ld a,0 - ld [$cc3c],a -.next2 - ld hl,.BeachHousePrinterText2 - call PrintText - ld a,[$d492] - bit 1,a - jr z,.xf236f - - ld a,1 - ld [$cc3c],a - ld hl,.BeachHousePrinterText3 - call PrintText - call YesNoChoice - ld a,[wCurrentMenuItem] - and a - jp z,$63d0 ; 0xf23d0 - call $36ec - ld hl,$d72f - set 6,[hl] - xor a - ld [$cfca],a - ld hl,$510a - ld b,$3a - call $3e84 - call $3852 - ld hl,$d72f - res 6,[hl] - call $3dd8 - call $2f83 - call $3dc2 - call $36f8 - call $3ddb - call $3de0 - ld a,1 - ld [$cfca],a - jr .xf236f -.xf2369 - ld hl,.BeachHousePrinterText1 - call PrintText -.xf236f - jp TextScriptEnd - -.BeachHousePrinterText1 - TX_FAR _BeachHousePrinterText1 - db $d,"@" -.BeachHousePrinterText2 - TX_FAR _BeachHousePrinterText2 - db $d,"@" -.BeachHousePrinterText3 - TX_FAR _BeachHousePrinterText3 - db "@" -.xf2383 - TX_FAR _BeachHousePrinterText4 - db "@" diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm index 4bd26a7e..4d6853be 100755 --- a/scripts/bikeshop.asm +++ b/scripts/bikeshop.asm @@ -1,33 +1,31 @@ -BikeShopScript: ; 1d73c (7:573c) +BikeShopScript: jp EnableAutoTextBoxDrawing -BikeShopTextPointers: ; 1d73f (7:573f) +BikeShopTextPointers: dw BikeShopText1 dw BikeShopText2 dw BikeShopText3 -BikeShopText1: ; 1d745 (7:5745) - db $08 ; asm - ld a, [wd75f] - bit 0, a - jr z, .asm_260d4 ; 0x1d74b +BikeShopText1: + TX_ASM + CheckEvent EVENT_GOT_BICYCLE + 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 + lb bc, BICYCLE, 1 call GiveItem jr nc, .BagFull ld a, BIKE_VOUCHER - ldh [$db], a + ld [$ffdb], a callba RemoveItemByID - ld hl, wd75f - set 0, [hl] + SetEvent EVENT_GOT_BICYCLE ld hl, BikeShopText_1d824 call PrintText jr .Done @@ -35,13 +33,13 @@ 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 ld [wCurrentMenuItem], a ld [wLastMenuItem], a - ld a, $3 + ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a ld a, $1 ld [wMaxMenuItem], a @@ -51,99 +49,99 @@ BikeShopText1: ; 1d745 (7:5745) ld [wTopMenuItemX], a ld hl, wd730 set 6, [hl] - ld hl, wTileMap + coord hl, 0, 0 ld b, $4 ld c, $f call TextBoxBorder call UpdateSprites - hlCoord 2, 2 + coord hl, 2, 2 ld de, BikeShopMenuText call PlaceString - hlCoord 8, 3 + coord hl, 8, 3 ld de, BikeShopMenuPrice call PlaceString ld hl, BikeShopText_1d815 call PrintText call HandleMenuInput bit 1, a - jr nz, .asm_b7579 ; 0x1d7dc + jr nz, .cancel ld hl, wd730 res 6, [hl] ld a, [wCurrentMenuItem] and a - jr nz, .asm_b7579 ; 0x1d7e7 - ld hl, BikeShopText_1d81a + jr nz, .cancel + ld hl, BikeShopCantAffordText call PrintText -.asm_b7579 ; 0x1d7ef - ld hl, BikeShopText_1d82a +.cancel + ld hl, BikeShopComeAgainText call PrintText .Done jp TextScriptEnd -BikeShopMenuText: ; 1d7f8 (7:57f8) +BikeShopMenuText: db "BICYCLE" next "CANCEL@" -BikeShopMenuPrice: ; 1d807 (7:5807) +BikeShopMenuPrice: db "¥1000000@" -BikeShopText_1d810: ; 1d810 (7:5810) +BikeShopText_1d810: TX_FAR _BikeShopText_1d810 db "@" -BikeShopText_1d815: ; 1d815 (7:5815) +BikeShopText_1d815: TX_FAR _BikeShopText_1d815 db "@" -BikeShopText_1d81a: ; 1d81a (7:581a) - TX_FAR _BikeShopText_1d81a +BikeShopCantAffordText: + TX_FAR _BikeShopCantAffordText db "@" -BikeShopText_1d81f: ; 1d81f (7:581f) +BikeShopText_1d81f: TX_FAR _BikeShopText_1d81f db "@" -BikeShopText_1d824: ; 1d824 (7:5824) - TX_FAR _BikeShopText_1d824 ; 0x98eb2 - db $11, "@" +BikeShopText_1d824: + TX_FAR _BikeShopText_1d824 + TX_SFX_KEY_ITEM + db "@" -BikeShopText_1d82a: ; 1d82a (7:582a) - TX_FAR _BikeShopText_1d82a +BikeShopComeAgainText: + TX_FAR _BikeShopComeAgainText db "@" -BikeShopText_1d82f: ; 1d82f (7:582f) +BikeShopText_1d82f: TX_FAR _BikeShopText_1d82f db "@" -BikeShopText_1d834: ; 1d834 (7:5834) +BikeShopText_1d834: TX_FAR _BikeShopText_1d834 db "@" -BikeShopText2: ; 1d839 (7:5839) - db $08 ; asm +BikeShopText2: + TX_ASM ld hl, BikeShopText_1d843 call PrintText jp TextScriptEnd -BikeShopText_1d843: ; 1d843 (7:5843) +BikeShopText_1d843: TX_FAR _BikeShopText_1d843 db "@" -BikeShopText3: ; 1d848 (7:5848) - db $08 ; asm - ld a, [wd75f] - bit 0, a +BikeShopText3: + TX_ASM + CheckEvent EVENT_GOT_BICYCLE 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 -BikeShopText_1d85c: ; 1d85c (7:585c) +BikeShopText_1d85c: TX_FAR _BikeShopText_1d85c db "@" -BikeShopText_1d861: ; 1d861 (7:5861) +BikeShopText_1d861: TX_FAR _BikeShopText_1d861 db "@" diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm index 61a575b9..2b60ef8c 100755 --- a/scripts/billshouse.asm +++ b/scripts/billshouse.asm @@ -1,10 +1,10 @@ -BillsHouseScript: ; 1e76a (7:676a) +BillsHouseScript: call EnableAutoTextBoxDrawing - ld a, [W_BILLSHOUSECURSCRIPT] + ld a, [wBillsHouseCurScript] ld hl, BillsHouseScriptPointers jp CallFunctionInTable -BillsHouseScriptPointers: ; 1e776 (7:6776) +BillsHouseScriptPointers: dw BillsHouseScript0 dw BillsHouseScript1 dw BillsHouseScript2 @@ -12,47 +12,54 @@ BillsHouseScriptPointers: ; 1e776 (7:6776) dw BillsHouseScript4 dw BillsHouseScript5 -BillsHouseScript0: ; 1e782 (7:6782) +BillsHouseScript0: ret -BillsHouseScript1: ; 1e783 (7:6783) +BillsHouseScript1: 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 + ld [H_SPRITEINDEX], a call MoveSprite ld a, $2 - ld [W_BILLSHOUSECURSCRIPT], a + ld [wBillsHouseCurScript], a ret -MovementData_1e79c: ; 1e79c (7:679c) - db $40,$40,$40,$FF - -MovementData_1e7a0: ; 1e7a0 (7:67a0) - db $C0,$40,$40,$80,$40,$FF - -BillsHouseScript2: ; 1e7a6 (7:67a6) +MovementData_1e79c: + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db $FF + +; make Bill walk around the player +MovementData_1e7a0: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_LEFT + db NPC_MOVEMENT_UP + db $FF + +BillsHouseScript2: ld a, [wd730] bit 0, a ret nz ld a, HS_BILL_POKEMON - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject - ld hl, wd7f2 - set 6, [hl] + SetEvent EVENT_BILL_SAID_USE_CELL_SEPARATOR xor a ld [wJoyIgnore], a ld a, $3 - ld [W_BILLSHOUSECURSCRIPT], a + ld [wBillsHouseCurScript], a ret -BillsHouseScript3: ; 1e7c5 (7:67c5) - ld a, [wd7f2] - bit 3, a +BillsHouseScript3: + CheckEvent EVENT_USED_CELL_SEPARATOR_ON_BILL ret z ld a, $f0 ld [wJoyIgnore], a @@ -68,137 +75,140 @@ BillsHouseScript3: ; 1e7c5 (7:67c5) ld [$ffee], a call SetSpritePosition1 ld a, HS_BILL_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject - ld c, $8 + ld c, 8 call DelayFrames ld a, $2 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld de, MovementData_1e807 call MoveSprite ld a, $4 - ld [W_BILLSHOUSECURSCRIPT], a + ld [wBillsHouseCurScript], a ret -MovementData_1e807: ; 1e807 (7:6807) - db $00,$C0,$C0,$C0,$00,$FF +MovementData_1e807: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db $FF -BillsHouseScript4: ; 1e80d (7:680d) +BillsHouseScript4: ld a, [wd730] bit 0, a ret nz xor a ld [wJoyIgnore], a - ld hl, wd7f2 - set 5, [hl] - ld hl, wd7f1 - set 0, [hl] + SetEvent EVENT_MET_BILL_2 ; this event seems redundant + SetEvent EVENT_MET_BILL ld a, $0 - ld [W_BILLSHOUSECURSCRIPT], a + ld [wBillsHouseCurScript], a ret -BillsHouseScript5: ; 1e827 (7:6827) +BillsHouseScript5: ld a, $4 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $0 - ld [W_BILLSHOUSECURSCRIPT], a + ld [wBillsHouseCurScript], a ret -BillsHouseTextPointers: ; 1e834 (7:6834) +BillsHouseTextPointers: dw BillsHouseText1 dw BillsHouseText2 dw BillsHouseText3 dw BillsHouseText4 -BillsHouseText4: ; 1e83c (7:683c) - db $fd +BillsHouseText4: + TX_BILLS_PC -BillsHouseText1: ; 1e83d (7:683d) - db $8 +BillsHouseText1: + 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) + ld [wBillsHouseCurScript], a + 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 +BillsHouseText_1e865: + TX_FAR _BillsHouseText_1e865 db "@" -BillsHouseText_1e86a: ; 1e86a (7:686a) - TX_FAR _BillsHouseText_1e86a ; 0x8d345 +BillsHouseText_1e86a: + TX_FAR _BillsHouseText_1e86a db "@" -BillsHouseText_1e86f: ; 1e86f (7:686f) - TX_FAR _BillsHouseText_1e86f ; 0x8d391 +BillsHouseText_1e86f: + TX_FAR _BillsHouseText_1e86f db "@" -BillsHouseText2: ; 1e874 (7:6874) - db $08 ; asm - ld a, [wd7f2] - bit 4, a - jr nz, .asm_5491f ; 0x1e87a +BillsHouseText2: + TX_ASM + CheckEvent EVENT_GOT_SS_TICKET + jr nz, .asm_1e8a9 ld hl, BillThankYouText call PrintText - ld bc, (S_S__TICKET << 8) | 1 + lb bc, S_S_TICKET, 1 call GiveItem jr nc, .BagFull ld hl, SSTicketReceivedText call PrintText - ld hl, wd7f2 - set 4, [hl] + SetEvent EVENT_GOT_SS_TICKET ld a, HS_CERULEAN_GUARD_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld a, HS_CERULEAN_GUARD_2 - ld [wcc4d], a + ld [wMissableObjectIndex], 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) +BillThankYouText: TX_FAR _BillThankYouText db "@" -SSTicketReceivedText: ; 1e8bf (7:68bf) +SSTicketReceivedText: TX_FAR _SSTicketReceivedText - db $11, $6, "@" + TX_SFX_KEY_ITEM + TX_BLINK + db "@" -SSTicketNoRoomText: ; 1e8c6 (7:68c6) +SSTicketNoRoomText: TX_FAR _SSTicketNoRoomText db "@" -BillsHouseText_1e8cb: ; 1e8cb (7:68cb) +BillsHouseText_1e8cb: TX_FAR _BillsHouseText_1e8cb db "@" -BillsHouseText3: ; 1e8d0 (7:68d0) - db $08 ; asm +BillsHouseText3: + TX_ASM ld hl, BillsHouseText_1e8da call PrintText jp TextScriptEnd -BillsHouseText_1e8da: ; 1e8da (7:68da) +BillsHouseText_1e8da: TX_FAR _BillsHouseText_1e8da db "@" diff --git a/scripts/blueshouse.asm b/scripts/blueshouse.asm index ab05e286..2b72ef97 100755 --- a/scripts/blueshouse.asm +++ b/scripts/blueshouse.asm @@ -1,89 +1,89 @@ -BluesHouseScript: ; 19b3b (6:5b3b) +BluesHouseScript: call EnableAutoTextBoxDrawing - ld hl,BluesHouseScriptPointers - ld a,[W_BLUESHOUSECURSCRIPT] + ld hl, BluesHouseScriptPointers + ld a, [wBluesHouseCurScript] jp CallFunctionInTable -BluesHouseScriptPointers: ; 19b47 (6:5b47) +BluesHouseScriptPointers: dw BluesHouseScript0 dw BluesHouseScript1 -BluesHouseScript0: ; 19b4b (6:5b4b) - ld hl,wd74a - set 1,[hl] +BluesHouseScript0: + SetEvent EVENT_ENTERED_BLUES_HOUSE ; trigger the next script - ld a,1 - ld [W_BLUESHOUSECURSCRIPT],a + ld a, 1 + ld [wBluesHouseCurScript], a ret -BluesHouseScript1: ; 19b56 (6:5b56) +BluesHouseScript1: ret -BluesHouseTextPointers: ; 19b57 (6:5b57) +BluesHouseTextPointers: dw BluesHouseText1 dw BluesHouseText2 dw BluesHouseText3 -BluesHouseText1: ; 19b5d (6:5b5d) - db 8 - ld a,[wd74a] - bit 0,a - jr nz,.GotMap - ld a,[wd74b] - bit 5,a - jr nz,.GiveMap - ld hl,DaisyInitialText +BluesHouseText1: + TX_ASM + CheckEvent EVENT_GOT_TOWN_MAP + jr nz, .GotMap + CheckEvent EVENT_GOT_POKEDEX + jr nz, .GiveMap + ld hl, DaisyInitialText call PrintText jr .done + .GiveMap - ld hl,DaisyOfferMapText + ld hl, DaisyOfferMapText call PrintText - ld bc,(TOWN_MAP << 8) | 1 + lb bc, TOWN_MAP, 1 call GiveItem jr nc, .BagFull - ld a,HS_TOWN_MAP - ld [wcc4d],a + ld a, HS_TOWN_MAP + ld [wMissableObjectIndex], a predef HideObject ; hide table map object - ld hl,GotMapText + ld hl, GotMapText call PrintText - ld hl,wd74a - set 0,[hl] + SetEvent EVENT_GOT_TOWN_MAP jr .done + .GotMap - ld hl,DaisyUseMapText + ld hl, DaisyUseMapText call PrintText jr .done + .BagFull - ld hl,DaisyBagFullText + ld hl, DaisyBagFullText call PrintText .done jp TextScriptEnd -DaisyInitialText: ; 19baa (6:5baa) +DaisyInitialText: TX_FAR _DaisyInitialText db "@" -DaisyOfferMapText: ; 19baf (6:5baf) +DaisyOfferMapText: TX_FAR _DaisyOfferMapText db "@" -GotMapText: ; 19bb4 (6:5bb4) +GotMapText: TX_FAR _GotMapText - db $11,"@" + TX_SFX_KEY_ITEM + db "@" -DaisyBagFullText: ; 19bba (6:5bba) +DaisyBagFullText: TX_FAR _DaisyBagFullText db "@" -DaisyUseMapText: ; 19bbf (6:5bbf) +DaisyUseMapText: TX_FAR _DaisyUseMapText db "@" -BluesHouseText2: ; 0x19bc4 Daisy, walking around +BluesHouseText2: ; Daisy, walking around TX_FAR _BluesHouseText2 db "@" -BluesHouseText3: ; 0x19bc9 map on table +BluesHouseText3: ; map on table TX_FAR _BluesHouseText3 db "@" diff --git a/scripts/bruno.asm b/scripts/bruno.asm index ffe05bce..02ceebf2 100755 --- a/scripts/bruno.asm +++ b/scripts/bruno.asm @@ -1,46 +1,47 @@ -BrunoScript: ; 762d6 (1d:62d6) - call BrunoScript_762ec +BrunoScript: + call BrunoShowOrHideExitBlock call EnableAutoTextBoxDrawing - ld hl, BrunoTrainerHeaders + ld hl, BrunoTrainerHeader0 ld de, BrunoScriptPointers - ld a, [W_BRUNOCURSCRIPT] + ld a, [wBrunoCurScript] call ExecuteCurMapScriptInTable - ld [W_BRUNOCURSCRIPT], a + ld [wBrunoCurScript], a ret -BrunoScript_762ec: ; 762ec (1d:62ec) - ld hl, wd126 +BrunoShowOrHideExitBlock: +; Blocks or clears the exit to the next room. + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd864] - bit 1, a - jr z, .asm_76300 + CheckEvent EVENT_BEAT_BRUNOS_ROOM_TRAINER_0 + jr z, .blockExitToNextRoom ld a, $5 - jp BrunoScript_76302 -.asm_76300 + jp .setExitBlock +.blockExitToNextRoom ld a, $24 - -BrunoScript_76302: ; 76302 (1d:6302) - ld [wd09f], a - ld bc, $2 +.setExitBlock + ld [wNewTileBlockID], a + lb bc, 0, 2 predef_jump ReplaceTileBlock -BrunoScript_7630d: ; 7630d (1d:630d) +ResetBrunoScript: xor a - ld [W_BRUNOCURSCRIPT], a + ld [wBrunoCurScript], a ret -BrunoScriptPointers: ; 76312 (1d:6312) +BrunoScriptPointers: dw BrunoScript0 dw DisplayEnemyTrainerTextAndStartBattle dw BrunoScript2 dw BrunoScript3 dw BrunoScript4 -BrunoScript4: ; 7631c (1d:631c) +BrunoScript4: ret -asm_7631d: ; 7631d (1d:631d) + +BrunoScriptWalkIntoRoom: +; Walk six steps upward. ld hl, wSimulatedJoypadStatesEnd ld a, D_UP ld [hli], a @@ -53,12 +54,12 @@ asm_7631d: ; 7631d (1d:631d) ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $3 - ld [W_BRUNOCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wBrunoCurScript], a + ld [wCurMapScript], a ret -BrunoScript0: ; 76339 (1d:6339) - ld hl, CoordsData_7637a +BrunoScript0: + ld hl, BrunoEntranceCoords call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a @@ -66,88 +67,85 @@ BrunoScript0: ; 76339 (1d:6339) ld [hJoyHeld], a ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesIndex], a - ld a, [wWhichTrade] ; wWhichTrade - cp $3 - jr c, .asm_7635d - ld hl, wd864 - bit 6, [hl] - set 6, [hl] - jr z, asm_7631d -.asm_7635d + ld a, [wCoordIndex] + cp $3 ; Is player standing one tile above the exit? + jr c, .stopPlayerFromLeaving + CheckAndSetEvent EVENT_AUTOWALKED_INTO_BRUNOS_ROOM + jr z, BrunoScriptWalkIntoRoom +.stopPlayerFromLeaving ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - call DisplayTextID + ld [hSpriteIndexOrTextID], a + call DisplayTextID ; "Don't run away!" ld a, D_UP ld [wSimulatedJoypadStatesEnd], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $3 - ld [W_BRUNOCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wBrunoCurScript], a + ld [wCurMapScript], a ret -CoordsData_7637a: ; 7637a (1d:637a) +BrunoEntranceCoords: db $0A,$04 db $0A,$05 db $0B,$04 db $0B,$05 db $FF -BrunoScript3: ; 76383 (1d:6383) +BrunoScript3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a ld [wJoyIgnore], a - ld [W_BRUNOCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wBrunoCurScript], a + ld [wCurMapScript], a ret -BrunoScript2: ; 76396 (1d:6396) +BrunoScript2: call EndTrainerBattle - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [wIsInBattle] cp $ff - jp z, BrunoScript_7630d + jp z, ResetBrunoScript ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a jp DisplayTextID -BrunoTextPointers: ; 763a8 (1d:63a8) +BrunoTextPointers: dw BrunoText1 - dw BrunoText2 + dw BrunoDontRunAwayText -BrunoTrainerHeaders: ; 763ac (1d:63ac) -BrunoTrainerHeader0: ; 763ac (1d:63ac) - db $1 ; flag's bit +BrunoTrainerHeader0: + dbEventFlagBit EVENT_BEAT_BRUNOS_ROOM_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_BRUNOS_ROOM_TRAINER_0 + dw BrunoBeforeBattleText ; TextBeforeBattle + dw BrunoAfterBattleText ; TextAfterBattle + dw BrunoEndBattleText ; TextEndBattle + dw BrunoEndBattleText ; TextEndBattle db $ff -BrunoText1: ; 763b9 (1d:63b9) - db $08 ; asm +BrunoText1: + TX_ASM ld hl, BrunoTrainerHeader0 call TalkToTrainer jp TextScriptEnd -BrunoBeforeBattleText: ; 763c3 (1d:63c3) +BrunoBeforeBattleText: TX_FAR _BrunoBeforeBattleText db "@" -BrunoEndBattleText: ; 763c8 (1d:63c8) +BrunoEndBattleText: TX_FAR _BrunoEndBattleText db "@" -BrunoAfterBattleText: ; 763cd (1d:63cd) +BrunoAfterBattleText: TX_FAR _BrunoAfterBattleText db "@" -BrunoText2: ; 763d2 (1d:63d2) - TX_FAR _UnnamedText_763d2 +BrunoDontRunAwayText: + TX_FAR _BrunoDontRunAwayText db "@" diff --git a/scripts/celadoncity.asm b/scripts/celadoncity.asm index 004d8773..6ef679dc 100755 --- a/scripts/celadoncity.asm +++ b/scripts/celadoncity.asm @@ -1,13 +1,10 @@ -CeladonCityScript: ; 19956 (6:5956) +CeladonCityScript: call EnableAutoTextBoxDrawing - ld hl, wd77e - res 0, [hl] - res 7, [hl] - ld hl, wd816 - res 7, [hl] + ResetEvents EVENT_1B8, EVENT_1BF + ResetEvent EVENT_67F ret -CeladonCityTextPointers: ; 19966 (6:5966) +CeladonCityTextPointers: dw CeladonCityText1 dw CeladonCityText2 dw CeladonCityText3 @@ -27,30 +24,29 @@ CeladonCityTextPointers: ; 19966 (6:5966) dw CeladonCityText17 dw CeladonCityText18 -CeladonCityText1: ; 1998a (6:598a) +CeladonCityText1: TX_FAR _CeladonCityText1 db "@" -CeladonCityText2: ; 1998f (6:598f) +CeladonCityText2: TX_FAR _CeladonCityText2 db "@" -CeladonCityText3: ; 19994 (6:5994) +CeladonCityText3: TX_FAR _CeladonCityText3 db "@" -CeladonCityText4: ; 19999 (6:5999) +CeladonCityText4: TX_FAR _CeladonCityText4 db "@" -CeladonCityText5: ; 1999e (6:599e) - db $08 ; asm - ld a, [wd777] - bit 0, a - jr nz, .asm_7053f ; 0x199a4 +CeladonCityText5: + TX_ASM + CheckEvent EVENT_GOT_TM41 + jr nz, .asm_7053f ld hl, TM41PreText call PrintText - ld bc, (TM_41 << 8) | 1 + lb bc, TM_41, 1 call GiveItem jr c, .Success ld hl, TM41NoRoomText @@ -59,78 +55,78 @@ CeladonCityText5: ; 1999e (6:599e) .Success ld hl, ReceivedTM41Text call PrintText - ld hl, wd777 - set 0, [hl] + SetEvent EVENT_GOT_TM41 jr .Done -.asm_7053f ; 0x199c9 +.asm_7053f ld hl, TM41ExplanationText call PrintText .Done jp TextScriptEnd -TM41PreText: ; 199d2 (6:59d2) +TM41PreText: TX_FAR _TM41PreText db "@" -ReceivedTM41Text: ; 199d7 (6:59d7) +ReceivedTM41Text: TX_FAR _ReceivedTM41Text - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -TM41ExplanationText: ; 199dd (6:59dd) +TM41ExplanationText: TX_FAR _TM41ExplanationText db "@" -TM41NoRoomText: ; 199e2 (6:59e2) +TM41NoRoomText: TX_FAR _TM41NoRoomText db "@" -CeladonCityText6: ; 199e7 (6:59e7) +CeladonCityText6: TX_FAR _CeladonCityText6 db "@" -CeladonCityText7: ; 199ec (6:59ec) +CeladonCityText7: TX_FAR _CeladonCityText7 - db $08 ; asm + TX_ASM ld a, POLIWRATH call PlayCry jp TextScriptEnd -CeladonCityText8: ; 199f9 (6:59f9) +CeladonCityText8: TX_FAR _CeladonCityText8 db "@" -CeladonCityText9: ; 199fe (6:59fe) +CeladonCityText9: TX_FAR _CeladonCityText9 db "@" -CeladonCityText10: ; 19a03 (6:5a03) +CeladonCityText10: TX_FAR _CeladonCityText10 db "@" -CeladonCityText11: ; 19a08 (6:5a08) +CeladonCityText11: TX_FAR _CeladonCityText11 db "@" -CeladonCityText13: ; 19a0d (6:5a0d) +CeladonCityText13: TX_FAR _CeladonCityText13 db "@" -CeladonCityText14: ; 19a12 (6:5a12) +CeladonCityText14: TX_FAR _CeladonCityText14 db "@" -CeladonCityText15: ; 19a17 (6:5a17) +CeladonCityText15: TX_FAR _CeladonCityText15 db "@" -CeladonCityText16: ; 19a1c (6:5a1c) +CeladonCityText16: TX_FAR _CeladonCityText16 db "@" -CeladonCityText17: ; 19a21 (6:5a21) +CeladonCityText17: TX_FAR _CeladonCityText17 db "@" -CeladonCityText18: ; 19a26 (6:5a26) +CeladonCityText18: TX_FAR _CeladonCityText18 db "@" diff --git a/scripts/celadondiner.asm b/scripts/celadondiner.asm index 5ae89022..6fd594f7 100755 --- a/scripts/celadondiner.asm +++ b/scripts/celadondiner.asm @@ -1,67 +1,66 @@ -CeladonDinerScript: ; 49151 (12:5151) +CeladonDinerScript: call EnableAutoTextBoxDrawing ret -CeladonDinerTextPointers: ; 49155 (12:5155) +CeladonDinerTextPointers: dw CeladonDinerText1 dw CeladonDinerText2 dw CeladonDinerText3 dw CeladonDinerText4 dw CeladonDinerText5 -CeladonDinerText1: ; 4915f (12:515f) +CeladonDinerText1: TX_FAR _CeladonDinerText1 db "@" -CeladonDinerText2: ; 49164 (12:5164) +CeladonDinerText2: TX_FAR _CeladonDinerText2 db "@" -CeladonDinerText3: ; 49169 (12:5169) +CeladonDinerText3: TX_FAR _CeladonDinerText3 db "@" -CeladonDinerText4: ; 4916e (12:516e) +CeladonDinerText4: TX_FAR _CeladonDinerText4 db "@" -CeladonDinerText5: ; 49173 (12:5173) - db $08 ; asm - ld a, [wd783] - bit 0, a - jr nz, .asm_eb14d ; 0x49179 +CeladonDinerText5: + TX_ASM + CheckEvent EVENT_GOT_COIN_CASE + jr nz, .asm_eb14d ld hl, CeladonDinerText_491a7 call PrintText - ld bc, (COIN_CASE << 8) | 1 + lb bc, COIN_CASE, 1 call GiveItem jr nc, .BagFull - ld hl, wd783 - set 0, [hl] + SetEvent EVENT_GOT_COIN_CASE 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) +CeladonDinerText_491a7: TX_FAR _CeladonDinerText_491a7 db "@" -ReceivedCoinCaseText: ; 491ac (12:51ac) +ReceivedCoinCaseText: TX_FAR _ReceivedCoinCaseText - db $11, "@" + TX_SFX_KEY_ITEM + db "@" -CoinCaseNoRoomText: ; 491b2 (12:51b2) +CoinCaseNoRoomText: TX_FAR _CoinCaseNoRoomText db "@" -CeladonDinerText_491b7: ; 491b7 (12:51b7) +CeladonDinerText_491b7: TX_FAR _CeladonDinerText_491b7 db "@" diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index 91d6742d..09d2df37 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -1,18 +1,18 @@ -CeladonGameCornerScript: ; 48bbd (12:4bbd) +CeladonGameCornerScript: call CeladonGameCornerScript_48bcf call CeladonGameCornerScript_48bec call EnableAutoTextBoxDrawing ld hl, CeladonGameCornerScriptPointers - ld a, [W_CELADONGAMECORNERCURSCRIPT] + ld a, [wCeladonGameCornerCurScript] jp CallFunctionInTable -CeladonGameCornerScript_48bcf: ; 48bcf (12:4bcf) - ld hl, wd126 +CeladonGameCornerScript_48bcf: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] ret z call Random - ld a, [$ffd3] + ld a, [hRandomAdd] cp $7 jr nc, .asm_48be2 ld a, $8 @@ -20,91 +20,103 @@ CeladonGameCornerScript_48bcf: ; 48bcf (12:4bcf) srl a srl a srl a - ld [wUnknownSlotVar], a + ld [wLuckySlotHiddenObjectIndex], a ret -CeladonGameCornerScript_48bec: ; 48bec (12:4bec) - ld hl, wd126 +CeladonGameCornerScript_48bec: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd77e] - bit 1, a + CheckEvent EVENT_FOUND_ROCKET_HIDEOUT ret nz ld a, $2a - ld [wd09f], a - ld bc, $0208 + ld [wNewTileBlockID], a + lb bc, 2, 8 predef_jump ReplaceTileBlock -CeladonGameCornerScript_48c07: ; 48c07 (12:4c07) +CeladonGameCornerScript_48c07: xor a ld [wJoyIgnore], a - ld [W_CELADONGAMECORNERCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wCeladonGameCornerCurScript], a + ld [wCurMapScript], a ret -CeladonGameCornerScriptPointers: ; 48c12 (12:4c12) +CeladonGameCornerScriptPointers: dw CeladonGameCornerScript0 dw CeladonGameCornerScript1 dw CeladonGameCornerScript2 -CeladonGameCornerScript0: ; 48c18 (12:4c18) +CeladonGameCornerScript0: ret -CeladonGameCornerScript1: ; 48c19 (12:4c19) - ld a, [W_ISINBATTLE] +CeladonGameCornerScript1: + ld a, [wIsInBattle] cp $ff jp z, CeladonGameCornerScript_48c07 ld a, $f0 ld [wJoyIgnore], a ld a, $d - ld [H_SPRITEHEIGHT], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $b - ld [H_SPRITEHEIGHT], a + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF ld de, MovementData_48c5a - ld a, [W_YCOORD] + ld a, [wYCoord] cp $6 jr nz, .asm_48c43 ld de, MovementData_48c63 jr .asm_48c4d .asm_48c43 - ld a, [W_XCOORD] + ld a, [wXCoord] cp $8 jr nz, .asm_48c4d ld de, MovementData_48c63 .asm_48c4d ld a, $b - ld [H_DOWNARROWBLINKCNT2], a + ld [H_SPRITEINDEX], a call MoveSprite ld a, $2 - ld [W_CELADONGAMECORNERCURSCRIPT], a + ld [wCeladonGameCornerCurScript], a ret -MovementData_48c5a: ; 48c5a (12:4c5a) - db $00,$C0,$C0,$40,$C0,$C0,$C0,$C0,$FF - -MovementData_48c63: ; 48c63 (12:4c63) - db $C0,$C0,$C0,$C0,$C0,$FF - -CeladonGameCornerScript2: ; 48c69 (12:4c69) +MovementData_48c5a: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db $FF + +MovementData_48c63: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db $FF + +CeladonGameCornerScript2: ld a, [wd730] bit 0, a ret nz xor a ld [wJoyIgnore], a ld a, HS_GAME_CORNER_ROCKET - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] set 6, [hl] ld a, $0 - ld [W_CELADONGAMECORNERCURSCRIPT], a + ld [wCeladonGameCornerCurScript], a ret -CeladonGameCornerTextPointers: ; 48c8a (12:4c8a) +CeladonGameCornerTextPointers: dw CeladonGameCornerText1 dw CeladonGameCornerText2 dw CeladonGameCornerText3 @@ -119,289 +131,285 @@ CeladonGameCornerTextPointers: ; 48c8a (12:4c8a) dw CeladonGameCornerText12 dw CeladonGameCornerText13 -CeladonGameCornerText1: ; 48ca4 (12:4ca4) +CeladonGameCornerText1: TX_FAR _CeladonGameCornerText1 db "@" -CeladonGameCornerText2: ; 48ca9 (12:4ca9) - db $08 ; asm +CeladonGameCornerText2: + 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 [hMoney], a + ld [hMoney + 2], a ld a, $10 - ldh [$a0], a + ld [hMoney + 1], 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 [hMoney], a + ld [hMoney + 2], a ld a, $10 - ldh [$a0], a - ld hl, $ffa1 + ld [hMoney + 1], a + ld hl, hMoney + 2 ld de, wPlayerMoney + 2 ld c, $3 predef SubBCDPredef xor a - ldh [$9f], a - ldh [$a0], a + ld [hUnusedCoinsByte], a + ld [hCoins], a ld a, $50 - ldh [$a1], a + ld [hCoins + 1], a ld de, wPlayerCoins + 1 - ld hl, $ffa1 + ld hl, hCoins + 1 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 -CeladonGameCornerText_48d22: ; 48d22 (12:4d22) +CeladonGameCornerText_48d22: TX_FAR _CeladonGameCornerText_48d22 db "@" -CeladonGameCornerText_48d27: ; 48d27 (12:4d27) +CeladonGameCornerText_48d27: TX_FAR _CeladonGameCornerText_48d27 db "@" -CeladonGameCornerText_48d2c: ; 48d2c (12:4d2c) +CeladonGameCornerText_48d2c: TX_FAR _CeladonGameCornerText_48d2c db "@" -CeladonGameCornerText_48d31: ; 48d31 (12:4d31) +CeladonGameCornerText_48d31: TX_FAR _CeladonGameCornerText_48d31 db "@" -CeladonGameCornerText_48d36: ; 48d36 (12:4d36) +CeladonGameCornerText_48d36: TX_FAR _CeladonGameCornerText_48d36 db "@" -CeladonGameCornerText_48d3b: ; 48d3b (12:4d3b) +CeladonGameCornerText_48d3b: TX_FAR _CeladonGameCornerText_48d3b db "@" -CeladonGameCornerText3: ; 48d40 (12:4d40) +CeladonGameCornerText3: TX_FAR _CeladonGameCornerText3 db "@" -CeladonGameCornerText4: ; 48d45 (12:4d45) +CeladonGameCornerText4: TX_FAR _CeladonGameCornerText4 db "@" -CeladonGameCornerText5: ; 48d4a (12:4d4a) - db $08 ; asm - ld a, [wd77e] - bit 2, a - jr nz, .asm_d0957 ; 0x48d50 +CeladonGameCornerText5: + TX_ASM + CheckEvent EVENT_GOT_10_COINS + 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 [hUnusedCoinsByte], a + ld [hCoins], a ld a, $10 - ldh [$a1], a + ld [hCoins + 1], a ld de, wPlayerCoins + 1 - ld hl, $ffa1 + ld hl, hCoins + 1 ld c, $2 predef AddBCDPredef - ld hl, wd77e - set 2, [hl] + SetEvent EVENT_GOT_10_COINS 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 -CeladonGameCornerText_48d9c: ; 48d9c (12:4d9c) +CeladonGameCornerText_48d9c: TX_FAR _CeladonGameCornerText_48d9c db "@" -Received10CoinsText: ; 48da1 (12:4da1) +Received10CoinsText: TX_FAR _Received10CoinsText - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -CeladonGameCornerText_48da7: ; 48da7 (12:4da7) +CeladonGameCornerText_48da7: TX_FAR _CeladonGameCornerText_48da7 db "@" -CeladonGameCornerText_48dac: ; 48dac (12:4dac) +CeladonGameCornerText_48dac: TX_FAR _CeladonGameCornerText_48dac db "@" -CeladonGameCornerText6: ; 48db1 (12:4db1) +CeladonGameCornerText6: TX_FAR _CeladonGameCornerText6 db "@" -CeladonGameCornerText7: ; 48db6 (12:4db6) - db $08 ; 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 +CeladonGameCornerText7: + TX_ASM + CheckEvent EVENT_BEAT_ERIKA + ld hl, CeladonGameCornerText_48dca + jr z, .asm_48dc4 + ld hl, CeladonGameCornerText_48dcf +.asm_48dc4 call PrintText jp TextScriptEnd -CeladonGameCornerText_48dca: ; 48dca (12:4dca) +CeladonGameCornerText_48dca: TX_FAR _CeladonGameCornerText_48dca db "@" -CeladonGameCornerText_48dcf: ; 48dcf (12:4dcf) +CeladonGameCornerText_48dcf: TX_FAR _CeladonGameCornerText_48dcf db "@" -CeladonGameCornerText8: ; 48dd4 (12:4dd4) +CeladonGameCornerText8: TX_FAR _CeladonGameCornerText8 db "@" -CeladonGameCornerText9: ; 48dd9 (12:4dd9) - db $08 ; asm - ld a, [wd77e] - bit 4, a - jr nz, .asm_ed8bc ; 0x48ddf +CeladonGameCornerText9: + TX_ASM + CheckEvent EVENT_GOT_20_COINS_2 + 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 [hUnusedCoinsByte], a + ld [hCoins], a ld a, $20 - ldh [$a1], a + ld [hCoins + 1], a ld de, wPlayerCoins + 1 - ld hl, $ffa1 + ld hl, hCoins + 1 ld c, $2 predef AddBCDPredef - ld hl, wd77e - set 4, [hl] + SetEvent EVENT_GOT_20_COINS_2 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 -CeladonGameCornerText_48e26: ; 48e26 (12:4e26) +CeladonGameCornerText_48e26: TX_FAR _CeladonGameCornerText_48e26 db "@" -Received20CoinsText: ; 48e2b (12:4e2b) +Received20CoinsText: TX_FAR _Received20CoinsText - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -CeladonGameCornerText_48e31: ; 48e31 (12:4e31) +CeladonGameCornerText_48e31: TX_FAR _CeladonGameCornerText_48e31 db "@" -CeladonGameCornerText_48e36: ; 48e36 (12:4e36) +CeladonGameCornerText_48e36: TX_FAR _CeladonGameCornerText_48e36 db "@" -CeladonGameCornerText10: ; 48e3b (12:4e3b) - db $08 ; asm - ld a, [wd77e] - bit 3, a - jr nz, .asm_ff080 ; 0x48e41 - ld hl, CeladonGameCornerText_48e88 ; $4e88 +CeladonGameCornerText10: + TX_ASM + CheckEvent EVENT_GOT_20_COINS + 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 [hUnusedCoinsByte], a + ld [hCoins], a ld a, $20 - ldh [$a1], a + ld [hCoins + 1], a ld de, wPlayerCoins + 1 - ld hl, $ffa1 + ld hl, hCoins + 1 ld c, $2 predef AddBCDPredef - ld hl, wd77e - set 3, [hl] + SetEvent EVENT_GOT_20_COINS 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 -CeladonGameCornerText_48e88: ; 48e88 (12:4e88) +CeladonGameCornerText_48e88: TX_FAR _CeladonGameCornerText_48e88 db "@" -CeladonGameCornerText_48e8d: ; 48e8d (12:4e8d) - TX_FAR _CeladonGameCornerText_48e8d ; 0x9dceb - db $0B, "@" +CeladonGameCornerText_48e8d: + TX_FAR _CeladonGameCornerText_48e8d + TX_SFX_ITEM_1 + db "@" -CeladonGameCornerText_48e93: ; 48e93 (12:4e93) +CeladonGameCornerText_48e93: TX_FAR _CeladonGameCornerText_48e93 db "@" -CeladonGameCornerText_48e98: ; 48e98 (12:4e98) +CeladonGameCornerText_48e98: TX_FAR _CeladonGameCornerText_48e98 db "@" -CeladonGameCornerText11: ; 48e9d (12:4e9d) - db $08 ; asm +CeladonGameCornerText11: + TX_ASM ld hl, CeladonGameCornerText_48ece call PrintText ld hl, wd72d @@ -410,89 +418,88 @@ 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 + ld [wCeladonGameCornerCurScript], a jp TextScriptEnd -CeladonGameCornerText_48ece: ; 48ece (12:4ece) +CeladonGameCornerText_48ece: TX_FAR _CeladonGameCornerText_48ece db "@" -CeladonGameCornerText_48ed3: ; 48ed3 (12:4ed3) +CeladonGameCornerText_48ed3: TX_FAR _CeladonGameCornerText_48ed3 db "@" -CeladonGameCornerText13: ; 48ed8 (12:4ed8) +CeladonGameCornerText13: TX_FAR _CeladonGameCornerText_48ed8 db "@" -CeladonGameCornerText12: ; 48edd (12:4edd) - db $08 ; asm +CeladonGameCornerText12: + TX_ASM ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, CeladonGameCornerText_48f09 call PrintText call WaitForSoundToFinish - ld a, (SFX_02_57 - SFX_Headers_02) / 3 + ld a, SFX_GO_INSIDE call PlaySound call WaitForSoundToFinish - ld hl, wd77e - set 1, [hl] + SetEvent EVENT_FOUND_ROCKET_HIDEOUT ld a, $43 - ld [wd09f], a - ld bc, $0208 + ld [wNewTileBlockID], a + lb bc, 2, 8 predef ReplaceTileBlock jp TextScriptEnd -CeladonGameCornerText_48f09: ; 48f09 (12:4f09) - TX_FAR _CeladonGameCornerText_48f09 ; 0x9ddb0 - db $8 - ld a, (SFX_02_49 - SFX_Headers_02) / 3 +CeladonGameCornerText_48f09: + TX_FAR _CeladonGameCornerText_48f09 + TX_ASM + ld a, SFX_SWITCH call PlaySound call WaitForSoundToFinish jp TextScriptEnd -CeladonGameCornerText_48f19: ; 48f19 (12:4f19) +CeladonGameCornerText_48f19: TX_FAR _CeladonGameCornerText_48f19 db "@" -CeladonGameCornerScript_48f1e: ; 48f1e (12:4f1e) +CeladonGameCornerScript_48f1e: ld hl, wd730 set 6, [hl] - hlCoord 11, 0 + coord hl, 11, 0 ld b, $5 ld c, $7 call TextBoxBorder call UpdateSprites - hlCoord 12, 1 - ld b, $4 - ld c, $7 + coord hl, 12, 1 + ld b, 4 + ld c, 7 call ClearScreenArea - hlCoord 12, 2 + coord hl, 12, 2 ld de, GameCornerMoneyText call PlaceString - hlCoord 12, 3 + coord hl, 12, 3 ld de, GameCornerBlankText1 call PlaceString - hlCoord 12, 3 + coord hl, 12, 3 ld de, wPlayerMoney ld c, $a3 call PrintBCDNumber - hlCoord 12, 4 + coord hl, 12, 4 ld de, GameCornerCoinText call PlaceString - hlCoord 12, 5 + coord hl, 12, 5 ld de, GameCornerBlankText2 call PlaceString - hlCoord 15, 5 + coord hl, 15, 5 ld de, wPlayerCoins ld c, $82 call PrintBCDNumber @@ -500,21 +507,21 @@ CeladonGameCornerScript_48f1e: ; 48f1e (12:4f1e) res 6, [hl] ret -GameCornerMoneyText: ; 48f7a (12:4f7a) +GameCornerMoneyText: db "MONEY@" -GameCornerCoinText: ; 48f80 (12:4f80) +GameCornerCoinText: db "COIN@" -GameCornerBlankText1: ; 48f85 (12:4f85) +GameCornerBlankText1: db " @" -GameCornerBlankText2: ; 48f8d (12:4f8d) +GameCornerBlankText2: db " @" -Has9990Coins: ; 48f95 (12:4f95) +Has9990Coins: ld a, $99 - ld [$ffa0], a + ld [hCoins], a ld a, $90 - ld [$ffa1], a + ld [hCoins + 1], a jp HasEnoughCoins diff --git a/scripts/celadongym.asm b/scripts/celadongym.asm index b1b1060c..ae7e6846 100755 --- a/scripts/celadongym.asm +++ b/scripts/celadongym.asm @@ -1,82 +1,76 @@ -CeladonGymScript: ; 4890a (12:490a) - ld hl, wd126 +CeladonGymScript: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] call nz, CeladonGymScript_48927 call EnableAutoTextBoxDrawing - ld hl, CeladonGymTrainerHeaders + ld hl, CeladonGymTrainerHeader0 ld de, CeladonGymScriptPointers - ld a, [W_CELADONGYMCURSCRIPT] + ld a, [wCeladonGymCurScript] call ExecuteCurMapScriptInTable - ld [W_CELADONGYMCURSCRIPT], a + ld [wCeladonGymCurScript], a ret -CeladonGymScript_48927: ; 48927 (12:4927) - ld hl, Gym4CityName ; $4930 - ld de, Gym4LeaderName ; $493d +CeladonGymScript_48927: + ld hl, Gym4CityName + ld de, Gym4LeaderName jp LoadGymLeaderAndCityName -Gym4CityName: ; 48930 (12:4930) +Gym4CityName: db "CELADON CITY@" -Gym4LeaderName: ; 4893d (12:493d) +Gym4LeaderName: db "ERIKA@" -CeladonGymText_48943: ; 48943 (12:4943) +CeladonGymText_48943: xor a ld [wJoyIgnore], a - ld [W_CELADONGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wCeladonGymCurScript], a + ld [wCurMapScript], a ret -CeladonGymScriptPointers: ; 4894e (12:494e) +CeladonGymScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw CeladonGymScript3 -CeladonGymScript3: ; 48956 (12:4956) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +CeladonGymScript3: + ld a, [wIsInBattle] cp $ff jp z, CeladonGymText_48943 ld a, $f0 ld [wJoyIgnore], a -CeladonGymText_48963: ; 48963 (12:4963) +CeladonGymText_48963: ld a, $9 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd77c - set 1, [hl] - ld bc, (TM_21 << 8) | 1 + SetEvent EVENT_BEAT_ERIKA + lb bc, TM_21, 1 call GiveItem jr nc, .BagFull ld a, $a - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd77c - set 0, [hl] + SetEvent EVENT_GOT_TM21 jr .asm_4898c .BagFull ld a, $b - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_4898c - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges set 3, [hl] - ld hl, wd72a + ld hl, wBeatGymFlags set 3, [hl] ; deactivate gym trainers - ld a, [wd77c] - or %11111100 - ld [wd77c], a - ld hl, wd77d - set 0, [hl] + SetEventRange EVENT_BEAT_CELADON_GYM_TRAINER_0, EVENT_BEAT_CELADON_GYM_TRAINER_6 jp CeladonGymText_48943 -CeladonGymTextPointers: ; 489a6 (12:49a6) +CeladonGymTextPointers: dw CeladonGymText1 dw CeladonGymText2 dw CeladonGymText3 @@ -89,87 +83,85 @@ CeladonGymTextPointers: ; 489a6 (12:49a6) dw TM21Text dw TM21NoRoomText -CeladonGymTrainerHeaders: ; 489bc (12:49bc) -CeladonGymTrainerHeader0: ; 489bc (12:49bc) - db $2 ; flag's bit +CeladonGymTrainerHeader0: + dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_0 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 - -CeladonGymTrainerHeader2: ; 489c8 (12:49c8) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_0 + dw CeladonGymBattleText2 ; TextBeforeBattle + dw CeladonGymAfterBattleText2 ; TextAfterBattle + dw CeladonGymEndBattleText2 ; TextEndBattle + dw CeladonGymEndBattleText2 ; TextEndBattle + +CeladonGymTrainerHeader1: + dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_1 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 - -CeladonGymTrainerHeader3: ; 489d4 (12:49d4) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_1 + dw CeladonGymBattleText3 ; TextBeforeBattle + dw CeladonGymAfterBattleText3 ; TextAfterBattle + dw CeladonGymEndBattleText3 ; TextEndBattle + dw CeladonGymEndBattleText3 ; TextEndBattle + +CeladonGymTrainerHeader2: + dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_2 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 - -CeladonGymTrainerHeader4: ; 489e0 (12:49e0) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_2 + dw CeladonGymBattleText4 ; TextBeforeBattle + dw CeladonGymAfterBattleText4 ; TextAfterBattle + dw CeladonGymEndBattleText4 ; TextEndBattle + dw CeladonGymEndBattleText4 ; TextEndBattle + +CeladonGymTrainerHeader3: + dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_3 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 - -CeladonGymTrainerHeader5: ; 489ec (12:49ec) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_3 + dw CeladonGymBattleText5 ; TextBeforeBattle + dw CeladonGymAfterBattleText5 ; TextAfterBattle + dw CeladonGymEndBattleText5 ; TextEndBattle + dw CeladonGymEndBattleText5 ; TextEndBattle + +CeladonGymTrainerHeader4: + dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_4 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 - -CeladonGymTrainerHeader6: ; 489f8 (12:49f8) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_4 + dw CeladonGymBattleText6 ; TextBeforeBattle + dw CeladonGymAfterBattleText6 ; TextAfterBattle + dw CeladonGymEndBattleText6 ; TextEndBattle + dw CeladonGymEndBattleText6 ; TextEndBattle + +CeladonGymTrainerHeader5: + dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_5 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 - -CeladonGymTrainerHeader7: ; 48a04 (12:4a04) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_5 + dw CeladonGymBattleText7 ; TextBeforeBattle + dw CeladonGymAfterBattleText7 ; TextAfterBattle + dw CeladonGymEndBattleText7 ; TextEndBattle + dw CeladonGymEndBattleText7 ; TextEndBattle + +CeladonGymTrainerHeader6: + dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_6, 1 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 + dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_6, 1 + dw CeladonGymBattleText8 ; TextBeforeBattle + dw CeladonGymAfterBattleText8 ; TextAfterBattle + dw CeladonGymEndBattleText8 ; TextEndBattle + dw CeladonGymEndBattleText8 ; TextEndBattle db $ff -CeladonGymText1: ; 48a11 (12:4a11) - db $08 ; asm - ld a, [wd77c] - bit 1, a - jr z, .asm_16064 ; 0x48a17 - bit 0, a - jr nz, .asm_3b22c ; 0x48a1b +CeladonGymText1: + TX_ASM + CheckEvent EVENT_BEAT_ERIKA + jr z, .asm_48a2d + CheckEventReuseA EVENT_GOT_TM21 + 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,166 +170,166 @@ 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 ld a, $4 - ld [W_GYMLEADERNO], a + ld [wGymLeaderNo], a ld a, $3 - ld [W_CELADONGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a -.asm_96252 ; 0x48a5b + ld [wCeladonGymCurScript], a + ld [wCurMapScript], a +.asm_48a5b jp TextScriptEnd -CeladonGymText_48a5e: ; 48a5e (12:4a5e) +CeladonGymText_48a5e: TX_FAR _CeladonGymText_48a5e db "@" -CeladonGymText_48a63: ; 48a63 (12:4a63) +CeladonGymText_48a63: TX_FAR _CeladonGymText_48a63 db "@" -CeladonGymText_48a68: ; 48a68 (12:4a68) +CeladonGymText_48a68: TX_FAR _CeladonGymText_48a68 db "@" -CeladonGymText9: ; 48a6d (12:4a6d) +CeladonGymText9: TX_FAR _CeladonGymText9 db "@" -TM21Text: ; 48a72 (12:4a72) +TM21Text: TX_FAR _ReceivedTM21Text - db $0B + TX_SFX_ITEM_1 TX_FAR _TM21ExplanationText db "@" -TM21NoRoomText: ; 48a7c (12:4a7c) +TM21NoRoomText: TX_FAR _TM21NoRoomText db "@" -CeladonGymText2: ; 48a81 (12:4a81) - db $08 ; asm +CeladonGymText2: + TX_ASM ld hl, CeladonGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd -CeladonGymBattleText2: ; 48a8b (12:4a8b) +CeladonGymBattleText2: TX_FAR _CeladonGymBattleText2 db "@" -CeladonGymEndBattleText2: ; 48a90 (12:4a90) +CeladonGymEndBattleText2: TX_FAR _CeladonGymEndBattleText2 db "@" -CeladonGymAfterBattleText2: ; 48a95 (12:4a95) +CeladonGymAfterBattleText2: TX_FAR _CeladonGymAfterBattleText2 db "@" -CeladonGymText3: ; 48a9a (12:4a9a) - db $08 ; asm - ld hl, CeladonGymTrainerHeader2 +CeladonGymText3: + TX_ASM + ld hl, CeladonGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd -CeladonGymBattleText3: ; 48aa4 (12:4aa4) +CeladonGymBattleText3: TX_FAR _CeladonGymBattleText3 db "@" -CeladonGymEndBattleText3: ; 48aa9 (12:4aa9) +CeladonGymEndBattleText3: TX_FAR _CeladonGymEndBattleText3 db "@" -CeladonGymAfterBattleText3: ; 48aae (12:4aae) +CeladonGymAfterBattleText3: TX_FAR _CeladonGymAfterBattleText3 db "@" -CeladonGymText4: ; 48ab3 (12:4ab3) - db $08 ; asm - ld hl, CeladonGymTrainerHeader3 +CeladonGymText4: + TX_ASM + ld hl, CeladonGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd -CeladonGymBattleText4: ; 48abd (12:4abd) +CeladonGymBattleText4: TX_FAR _CeladonGymBattleText4 db "@" -CeladonGymEndBattleText4: ; 48ac2 (12:4ac2) +CeladonGymEndBattleText4: TX_FAR _CeladonGymEndBattleText4 db "@" -CeladonGymAfterBattleText4: ; 48ac7 (12:4ac7) +CeladonGymAfterBattleText4: TX_FAR _CeladonGymAfterBattleText4 db "@" -CeladonGymText5: ; 48acc (12:4acc) - db $08 ; asm - ld hl, CeladonGymTrainerHeader4 +CeladonGymText5: + TX_ASM + ld hl, CeladonGymTrainerHeader3 call TalkToTrainer jp TextScriptEnd -CeladonGymBattleText5: ; 48ad6 (12:4ad6) +CeladonGymBattleText5: TX_FAR _CeladonGymBattleText5 db "@" -CeladonGymEndBattleText5: ; 48adb (12:4adb) +CeladonGymEndBattleText5: TX_FAR _CeladonGymEndBattleText5 db "@" -CeladonGymAfterBattleText5: ; 48ae0 (12:4ae0) +CeladonGymAfterBattleText5: TX_FAR _CeladonGymAfterBattleText5 db "@" -CeladonGymText6: ; 48ae5 (12:4ae5) - db $08 ; asm - ld hl, CeladonGymTrainerHeader5 +CeladonGymText6: + TX_ASM + ld hl, CeladonGymTrainerHeader4 call TalkToTrainer jp TextScriptEnd -CeladonGymBattleText6: ; 48aef (12:4aef) +CeladonGymBattleText6: TX_FAR _CeladonGymBattleText6 db "@" -CeladonGymEndBattleText6: ; 48af4 (12:4af4) +CeladonGymEndBattleText6: TX_FAR _CeladonGymEndBattleText6 db "@" -CeladonGymAfterBattleText6: ; 48af9 (12:4af9) +CeladonGymAfterBattleText6: TX_FAR _CeladonGymAfterBattleText6 db "@" -CeladonGymText7: ; 48afe (12:4afe) - db $08 ; asm - ld hl, CeladonGymTrainerHeader6 +CeladonGymText7: + TX_ASM + ld hl, CeladonGymTrainerHeader5 call TalkToTrainer jp TextScriptEnd -CeladonGymBattleText7: ; 48b08 (12:4b08) +CeladonGymBattleText7: TX_FAR _CeladonGymBattleText7 db "@" -CeladonGymEndBattleText7: ; 48b0d (12:4b0d) +CeladonGymEndBattleText7: TX_FAR _CeladonGymEndBattleText7 db "@" -CeladonGymAfterBattleText7: ; 48b12 (12:4b12) +CeladonGymAfterBattleText7: TX_FAR _CeladonGymAfterBattleText7 db "@" -CeladonGymText8: ; 48b17 (12:4b17) - db $08 ; asm - ld hl, CeladonGymTrainerHeader7 +CeladonGymText8: + TX_ASM + ld hl, CeladonGymTrainerHeader6 call TalkToTrainer jp TextScriptEnd -CeladonGymBattleText8: ; 48b21 (12:4b21) +CeladonGymBattleText8: TX_FAR _CeladonGymBattleText8 db "@" -CeladonGymEndBattleText8: ; 48b26 (12:4b26) +CeladonGymEndBattleText8: TX_FAR _CeladonGymEndBattleText8 db "@" -CeladonGymAfterBattleText8: ; 48b2b (12:4b2b) +CeladonGymAfterBattleText8: TX_FAR _CeladonGymAfterBattleText8 db "@" diff --git a/scripts/celadonhotel.asm b/scripts/celadonhotel.asm index a0f80ff6..23b9eb55 100755 --- a/scripts/celadonhotel.asm +++ b/scripts/celadonhotel.asm @@ -1,19 +1,19 @@ -CeladonHotelScript: ; 49269 (12:5269) +CeladonHotelScript: jp EnableAutoTextBoxDrawing -CeladonHotelTextPointers: ; 4926c (12:526c) +CeladonHotelTextPointers: dw CeladonHotelText1 dw CeladonHotelText2 dw CeladonHotelText3 -CeladonHotelText1: ; 49272 (12:5272) +CeladonHotelText1: TX_FAR _CeladonHotelText1 db "@" -CeladonHotelText2: ; 49277 (12:5277) +CeladonHotelText2: TX_FAR _CeladonHotelText2 db "@" -CeladonHotelText3: ; 4927c (12:527c) +CeladonHotelText3: TX_FAR _CeladonHotelText3 db "@" diff --git a/scripts/celadonhouse.asm b/scripts/celadonhouse.asm index aa94f2fd..7f2778d1 100755 --- a/scripts/celadonhouse.asm +++ b/scripts/celadonhouse.asm @@ -1,20 +1,20 @@ -CeladonHouseScript: ; 4920e (12:520e) +CeladonHouseScript: call EnableAutoTextBoxDrawing ret -CeladonHouseTextPointers: ; 49212 (12:5212) +CeladonHouseTextPointers: dw CeladonHouseText1 dw CeladonHouseText2 dw CeladonHouseText3 -CeladonHouseText1: ; 49218 (12:5218) +CeladonHouseText1: TX_FAR _CeladonHouseText1 db "@" -CeladonHouseText2: ; 4921d (12:521d) +CeladonHouseText2: TX_FAR _CeladonHouseText2 db "@" -CeladonHouseText3: ; 49222 (12:5222) +CeladonHouseText3: TX_FAR _CeladonHouseText3 db "@" diff --git a/scripts/celadonmansion1.asm b/scripts/celadonmansion1.asm index 14832dbe..f6ef7669 100755 --- a/scripts/celadonmansion1.asm +++ b/scripts/celadonmansion1.asm @@ -1,39 +1,39 @@ -CeladonMansion1Script: ; 48694 (12:4694) +CeladonMansion1Script: jp EnableAutoTextBoxDrawing -CeladonMansion1TextPointers: ; 48697 (12:4697) +CeladonMansion1TextPointers: dw CeladonMansion1Text1 dw CeladonMansion1Text2 dw CeladonMansion1Text3 dw CeladonMansion1Text4 dw CeladonMansion1Text5 -CeladonMansion1_486a1: ; 486a1 (12:46a1) +CeladonMansion1_486a1: call PlayCry jp TextScriptEnd -CeladonMansion1Text1: ; 486a7 (12:46a7) +CeladonMansion1Text1: TX_FAR _CeladonMansion1Text1 - db $08 ; asm + TX_ASM ld a, MEOWTH jp CeladonMansion1_486a1 -CeladonMansion1Text2: ; 486b1 (12:46b1) +CeladonMansion1Text2: TX_FAR _CeladonMansion1Text2 db "@" -CeladonMansion1Text3: ; 486b6 (12:46b6) +CeladonMansion1Text3: TX_FAR _CeladonMansion1Text3 - db $8 + TX_ASM ld a, CLEFAIRY jp CeladonMansion1_486a1 -CeladonMansion1Text4: ; 486c0 (12:46c0) +CeladonMansion1Text4: TX_FAR _CeladonMansion1Text4 - db $8 + TX_ASM ld a, NIDORAN_F jp CeladonMansion1_486a1 -CeladonMansion1Text5: ; 486ca (12:46ca) +CeladonMansion1Text5: TX_FAR _CeladonMansion1Text5 db "@" diff --git a/scripts/celadonmansion2.asm b/scripts/celadonmansion2.asm index 7f7e5d45..520615d4 100755 --- a/scripts/celadonmansion2.asm +++ b/scripts/celadonmansion2.asm @@ -1,10 +1,10 @@ -CeladonMansion2Script: ; 4873a (12:473a) +CeladonMansion2Script: call EnableAutoTextBoxDrawing ret -CeladonMansion2TextPointers: ; 4873e (12:473e) +CeladonMansion2TextPointers: dw CeladonMansion2Text1 -CeladonMansion2Text1: ; 48740 (12:4740) +CeladonMansion2Text1: TX_FAR _CeladonMansion2Text1 db "@" diff --git a/scripts/celadonmansion3.asm b/scripts/celadonmansion3.asm index 47190c92..a1fe048b 100755 --- a/scripts/celadonmansion3.asm +++ b/scripts/celadonmansion3.asm @@ -1,7 +1,7 @@ -CeladonMansion3Script: ; 48790 (12:4790) +CeladonMansion3Script: jp EnableAutoTextBoxDrawing -CeladonMansion3TextPointers: ; 48793 (12:4793) +CeladonMansion3TextPointers: dw ProgrammerText dw GraphicArtistText dw WriterText @@ -11,26 +11,26 @@ CeladonMansion3TextPointers: ; 48793 (12:4793) dw GameFreakPCText3 dw GameFreakSignText -ProgrammerText: ; 487a3 (12:47a3) +ProgrammerText: TX_FAR _ProgrammerText db "@" -GraphicArtistText: ; 487a8 (12:47a8) +GraphicArtistText: TX_FAR _GraphicArtistText db "@" -WriterText: ; 487ad (12:47ad) +WriterText: TX_FAR _WriterText db "@" -DirectorText: ; 487b2 (12:47b2) - db $08 ; asm +DirectorText: + TX_ASM ; check pokédex ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits - ld a, [wd11e] + ld a, [wNumSetBits] cp 150 jr nc, .CompletedDex ld hl, .GameDesigner @@ -41,31 +41,31 @@ DirectorText: ; 487b2 (12:47b2) call PrintText jp TextScriptEnd -.GameDesigner ; 487d0 (12:47d0) +.GameDesigner TX_FAR _GameDesignerText db "@" .CompletedDexText TX_FAR _CompletedDexText - db $6 - db $8 ; asm + TX_BLINK + TX_ASM callab DisplayDiploma ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a jp TextScriptEnd -GameFreakPCText1: ; 487eb (12:47eb) +GameFreakPCText1: TX_FAR _CeladonMansion3Text5 db "@" -GameFreakPCText2: ; 487f0 (12:47f0) +GameFreakPCText2: TX_FAR _CeladonMansion3Text6 db "@" -GameFreakPCText3: ; 487f5 (12:47f5) +GameFreakPCText3: TX_FAR _CeladonMansion3Text7 db "@" -GameFreakSignText: ; 487fa (12:47fa) +GameFreakSignText: TX_FAR _CeladonMansion3Text8 db "@" diff --git a/scripts/celadonmansion4.asm b/scripts/celadonmansion4.asm index f9045bcd..80d887e9 100755 --- a/scripts/celadonmansion4.asm +++ b/scripts/celadonmansion4.asm @@ -1,9 +1,9 @@ -CeladonMansion4Script: ; 4886b (12:486b) +CeladonMansion4Script: jp EnableAutoTextBoxDrawing -CeladonMansion4TextPointers: ; 4886e (12:486e) +CeladonMansion4TextPointers: dw CeladonMansion4Text1 -CeladonMansion4Text1: ; 48870 (12:4870) +CeladonMansion4Text1: TX_FAR _CeladonMansion4Text1 db "@" diff --git a/scripts/celadonmansion5.asm b/scripts/celadonmansion5.asm index c18e36c6..197a0f54 100755 --- a/scripts/celadonmansion5.asm +++ b/scripts/celadonmansion5.asm @@ -1,21 +1,21 @@ -CeladonMansion5Script: ; 1dd3a (7:5d3a) +CeladonMansion5Script: jp EnableAutoTextBoxDrawing -CeladonMansion5TextPointers: ; 1dd3d (7:5d3d) +CeladonMansion5TextPointers: dw CeladonMansion5Text1 dw CeladonMansion5Text2 -CeladonMansion5Text1: ; 1dd41 (7:5d41) +CeladonMansion5Text1: TX_FAR _CeladonMansion5Text1 db "@" -CeladonMansion5Text2: ; 1dd46 (7:5d46) - db $08 ; asm - ld bc,(EEVEE << 8) | 25 +CeladonMansion5Text2: + TX_ASM + lb bc, EEVEE, 25 call GivePokemon - jr nc, .asm_24365 ; 0x1dd4d + jr nc, .asm_24365 ld a, HS_CELADON_MANSION_5_GIFT - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject -.asm_24365 ; 0x1dd59 +.asm_24365 jp TextScriptEnd diff --git a/scripts/celadonmart1.asm b/scripts/celadonmart1.asm index 041af8b3..0f67972b 100755 --- a/scripts/celadonmart1.asm +++ b/scripts/celadonmart1.asm @@ -1,19 +1,19 @@ -CeladonMart1Script: ; 60f86 (18:4f86) +CeladonMart1Script: jp EnableAutoTextBoxDrawing -CeladonMart1TextPointers: ; 60f89 (18:4f89) +CeladonMart1TextPointers: dw CeladonMart1Text1 dw CeladonMart1Text2 dw CeladonMart1Text3 -CeladonMart1Text1: ; 60f8f (18:4f8f) +CeladonMart1Text1: TX_FAR _CeladonMart1Text1 db "@" -CeladonMart1Text2: ; 60f94 (18:4f94) +CeladonMart1Text2: TX_FAR _CeladonMart1Text2 db "@" -CeladonMart1Text3: ; 60f99 (18:4f99) +CeladonMart1Text3: TX_FAR _CeladonMart1Text3 db "@" diff --git a/scripts/celadonmart2.asm b/scripts/celadonmart2.asm index 92f04399..c438d6e1 100755 --- a/scripts/celadonmart2.asm +++ b/scripts/celadonmart2.asm @@ -1,21 +1,21 @@ -CeladonMart2Script: ; 560f5 (15:60f5) +CeladonMart2Script: jp EnableAutoTextBoxDrawing -CeladonMart2TextPointers: ; 560f8 (15:60f8) - dw CeladonMart2Text1 - dw CeladonMart2Text2 +CeladonMart2TextPointers: + dw CeladonMart2Clerk1Text + dw CeladonMart2Clerk2Text dw CeladonMart2Text3 dw CeladonMart2Text4 dw CeladonMart2Text5 -CeladonMart2Text3: ; 56102 (15:6102) +CeladonMart2Text3: TX_FAR _CeladonMart2Text3 db "@" -CeladonMart2Text4: ; 56107 (15:6107) +CeladonMart2Text4: TX_FAR _CeladonMart2Text4 db "@" -CeladonMart2Text5: ; 5610c (15:610c) +CeladonMart2Text5: TX_FAR _CeladonMart2Text5 db "@" diff --git a/scripts/celadonmart3.asm b/scripts/celadonmart3.asm index 8874a743..6af58f21 100755 --- a/scripts/celadonmart3.asm +++ b/scripts/celadonmart3.asm @@ -1,7 +1,7 @@ -CeladonMart3Script: ; 48225 (12:4225) +CeladonMart3Script: jp EnableAutoTextBoxDrawing -CeladonMart3TextPointers: ; 48228 (12:4228) +CeladonMart3TextPointers: dw CeladonMart3Text1 dw CeladonMart3Text2 dw CeladonMart3Text3 @@ -20,90 +20,89 @@ CeladonMart3TextPointers: ; 48228 (12:4228) dw CeladonMart3Text16 dw CeladonMart3Text17 -CeladonMart3Text1: ; 4824a (12:424a) - db $08 ; asm - ld a, [wd778] - bit 7, a - jr nz, .asm_a5463 ; 0x48250 +CeladonMart3Text1: + TX_ASM + CheckEvent EVENT_GOT_TM18 + jr nz, .asm_a5463 ld hl, TM18PreReceiveText call PrintText - ld bc, (TM_18 << 8) | 1 + lb bc, TM_18, 1 call GiveItem jr nc, .BagFull - ld hl, wd778 - set 7, [hl] + SetEvent EVENT_GOT_TM18 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 -TM18PreReceiveText: ; 48278 (12:4278) +TM18PreReceiveText: TX_FAR _TM18PreReceiveText db "@" -ReceivedTM18Text: ; 4827d (12:427d) +ReceivedTM18Text: TX_FAR _ReceivedTM18Text - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -TM18ExplanationText: ; 48283 (12:4283) +TM18ExplanationText: TX_FAR _TM18ExplanationText db "@" -TM18NoRoomText: ; 48288 (12:4288) +TM18NoRoomText: TX_FAR _TM18NoRoomText db "@" -CeladonMart3Text2: ; 4828d (12:428d) +CeladonMart3Text2: TX_FAR _CeladonMart3Text2 db "@" -CeladonMart3Text3: ; 48292 (12:4292) +CeladonMart3Text3: TX_FAR _CeladonMart3Text3 db "@" -CeladonMart3Text4: ; 48297 (12:4297) +CeladonMart3Text4: TX_FAR _CeladonMart3Text4 db "@" -CeladonMart3Text5: ; 4829c (12:429c) +CeladonMart3Text5: TX_FAR _CeladonMart3Text5 db "@" CeladonMart3Text12 -CeladonMart3Text10: ; 482a1 (12:42a1) -CeladonMart3Text8: ; 482a1 (12:42a1) -CeladonMart3Text6: ; 482a1 (12:42a1) +CeladonMart3Text10: +CeladonMart3Text8: +CeladonMart3Text6: TX_FAR _CeladonMart3Text6 db "@" -CeladonMart3Text7: ; 482a6 (12:42a6) +CeladonMart3Text7: TX_FAR _CeladonMart3Text7 db "@" -CeladonMart3Text9: ; 482ab (12:42ab) +CeladonMart3Text9: TX_FAR _CeladonMart3Text9 db "@" -CeladonMart3Text11: ; 482b0 (12:42b0) +CeladonMart3Text11: TX_FAR _CeladonMart3Text11 db "@" -CeladonMart3Text13: ; 482b5 (12:42b5) +CeladonMart3Text13: TX_FAR _CeladonMart3Text13 db "@" -CeladonMart3Text14: ; 482ba (12:42ba) +CeladonMart3Text14: TX_FAR _CeladonMart3Text14 db "@" -CeladonMart3Text17: ; 482bf (12:42bf) -CeladonMart3Text16: ; 482bf (12:42bf) -CeladonMart3Text15: ; 482bf (12:42bf) +CeladonMart3Text17: +CeladonMart3Text16: +CeladonMart3Text15: TX_FAR _CeladonMart3Text15 db "@" diff --git a/scripts/celadonmart4.asm b/scripts/celadonmart4.asm index dfe2b90a..18049dc0 100755 --- a/scripts/celadonmart4.asm +++ b/scripts/celadonmart4.asm @@ -1,20 +1,20 @@ -CeladonMart4Script: ; 48356 (12:4356) +CeladonMart4Script: jp EnableAutoTextBoxDrawing -CeladonMart4TextPointers: ; 48359 (12:4359) - dw CeladonMart4Text1 +CeladonMart4TextPointers: + dw CeladonMart4ClerkText dw CeladonMart4Text2 dw CeladonMart4Text3 dw CeladonMart4Text4 -CeladonMart4Text2: ; 48361 (12:4361) +CeladonMart4Text2: TX_FAR _CeladonMart4Text2 db "@" -CeladonMart4Text3: ; 48366 (12:4366) +CeladonMart4Text3: TX_FAR _CeladonMart4Text3 db "@" -CeladonMart4Text4: ; 4836b (12:436b) +CeladonMart4Text4: TX_FAR _CeladonMart4Text4 db "@" diff --git a/scripts/celadonmart5.asm b/scripts/celadonmart5.asm index 9bd7f991..7b7371a7 100755 --- a/scripts/celadonmart5.asm +++ b/scripts/celadonmart5.asm @@ -1,21 +1,21 @@ -CeladonMart5Script: ; 49069 (12:5069) +CeladonMart5Script: jp EnableAutoTextBoxDrawing -CeladonMart5TextPointers: ; 4906c (12:506c) +CeladonMart5TextPointers: dw CeladonMart5Text1 dw CeladonMart5Text2 - dw CeladonMart5Text3 - dw CeladonMart5Text4 + dw CeladonMart5Clerk1Text + dw CeladonMart5Clerk2Text dw CeladonMart5Text5 -CeladonMart5Text1: ; 49076 (12:5076) +CeladonMart5Text1: TX_FAR _CeladonMart5Text1 db "@" -CeladonMart5Text2: ; 4907b (12:507b) +CeladonMart5Text2: TX_FAR _CeladonMart5Text2 db "@" -CeladonMart5Text5: ; 49080 (12:5080) +CeladonMart5Text5: TX_FAR _CeladonMart5Text5 db "@" diff --git a/scripts/celadonmartelevator.asm b/scripts/celadonmartelevator.asm index ff835765..60e5210c 100755 --- a/scripts/celadonmartelevator.asm +++ b/scripts/celadonmartelevator.asm @@ -1,5 +1,5 @@ -CeladonMartElevatorScript: ; 48600 (12:4600) - ld hl, wd126 +CeladonMartElevatorScript: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] push hl @@ -14,15 +14,15 @@ CeladonMartElevatorScript: ; 48600 (12:4600) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret -CeladonMartElevatorScript_4861c: ; 4861c (12:461c) +CeladonMartElevatorScript_4861c: ld hl, wWarpEntries - ld a, [wd73b] + ld a, [wWarpedFromWhichWarp] ld b, a - ld a, [wd73c] + ld a, [wWarpedFromWhichMap] ld c, a call CeladonMartElevatorScript_4862a -CeladonMartElevatorScript_4862a: ; 4862a (12:462a) +CeladonMartElevatorScript_4862a: inc hl inc hl ld a, b @@ -31,20 +31,24 @@ CeladonMartElevatorScript_4862a: ; 4862a (12:462a) ld [hli], a ret -CeladonMartElevatorScript_48631: ; 48631 (12:4631) - ld hl, CeladonMartElavatorFloors ; $4643 +CeladonMartElevatorScript_48631: + ld hl, CeladonMartElevatorFloors call LoadItemList - ld hl, CeldaonMartElevatorWarpMaps ; $464a - ld de, wcc5b - ld bc, $000a + ld hl, CeladonMartElevatorWarpMaps + ld de, wElevatorWarpMaps + ld bc, CeladonMartElevatorWarpMapsEnd - CeladonMartElevatorWarpMaps jp CopyData -CeladonMartElavatorFloors: ; 48643 (12:4643) - db $05 ; num elements in list - db $56, $57, $58, $59, $5A ; "1F", "2F", "3F", "4F, "5F" - db $FF ; terminator +CeladonMartElevatorFloors: + db 5 ; number of elements in list + db FLOOR_1F + db FLOOR_2F + db FLOOR_3F + db FLOOR_4F + db FLOOR_5F + db $FF -CeldaonMartElevatorWarpMaps: ; 4864a (12:464a) +CeladonMartElevatorWarpMaps: ; first byte is warp number ; second byte is map number ; These specify where the player goes after getting out of the elevator. @@ -53,18 +57,17 @@ CeldaonMartElevatorWarpMaps: ; 4864a (12:464a) db $02, CELADON_MART_3 db $02, CELADON_MART_4 db $02, CELADON_MART_5 +CeladonMartElevatorWarpMapsEnd: -CeladonMartElevatorScript_48654: ; 48654 (12:4654) - ld b, BANK(ShakeElevator) - ld hl, ShakeElevator - jp Bankswitch +CeladonMartElevatorScript_48654: + jpba ShakeElevator -CeladonMartElevatorTextPointers: ; 4865c (12:465c) +CeladonMartElevatorTextPointers: dw CeladonMartElevatorText1 -CeladonMartElevatorText1: ; 4865e (12:465e) - db $08 ; asm +CeladonMartElevatorText1: + TX_ASM call CeladonMartElevatorScript_48631 - ld hl, CeldaonMartElevatorWarpMaps ; $464a - predef Func_1c9c6 + ld hl, CeladonMartElevatorWarpMaps + predef DisplayElevatorFloorMenu jp TextScriptEnd diff --git a/scripts/celadonmartroof.asm b/scripts/celadonmartroof.asm index d4bb4319..9034e8fc 100755 --- a/scripts/celadonmartroof.asm +++ b/scripts/celadonmartroof.asm @@ -1,217 +1,211 @@ -CeladonMartRoofScript: ; 483d5 (12:43d5) +CeladonMartRoofScript: jp EnableAutoTextBoxDrawing -CeladonMartRoofScript_483d8: ; 483d8 (12:43d8) +CeladonMartRoofScript_GetDrinksInBag: +; construct a list of all drinks in the player's bag xor a - ld [wcd37], a - ld de, wcc5b - ld hl, CeladonMartRoofDrinkList ; $4408 -.asm_483e2 + ld [wFilteredBagItemsCount], a + ld de, wFilteredBagItems + ld hl, CeladonMartRoofDrinkList +.loop ld a, [hli] and a - jr z, .asm_48404 + jr z, .done push hl push de ld [wd11e], a ld b, a - predef IsItemInBag_ + predef GetQuantityOfItemInBag pop de pop hl ld a, b and a - jr z, .asm_483e2 + jr z, .loop ; if the item isn't in the bag ld a, [wd11e] ld [de], a inc de push hl - ld hl, wcd37 + ld hl, wFilteredBagItemsCount inc [hl] pop hl - jr .asm_483e2 -.asm_48404 + jr .loop +.done ld a, $ff ld [de], a ret -CeladonMartRoofDrinkList: ; 48408 (12:4408) +CeladonMartRoofDrinkList: db FRESH_WATER db SODA_POP db LEMONADE db $00 -CeladonMartRoofScript_4840c: ; 4840c (12:440c) +CeladonMartRoofScript_GiveDrinkToGirl: ld hl, wd730 set 6, [hl] - ld hl, CeladonMartRoofText_484ee ; $44ee + ld hl, CeladonMartRoofText_484ee call PrintText xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld a, $3 - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys - ld a, [wcd37] + ld [wCurrentMenuItem], a + ld a, A_BUTTON | B_BUTTON + ld [wMenuWatchedKeys], a + ld a, [wFilteredBagItemsCount] dec a - ld [wMaxMenuItem], a ; wMaxMenuItem - ld a, $2 - ld [wTopMenuItemY], a ; wTopMenuItemY - ld a, $1 - ld [wTopMenuItemX], a ; wTopMenuItemX - ld a, [wcd37] + ld [wMaxMenuItem], a + ld a, 2 + ld [wTopMenuItemY], a + ld a, 1 + ld [wTopMenuItemX], a + ld a, [wFilteredBagItemsCount] dec a - ld bc, $2 - ld hl, $3 + ld bc, 2 + ld hl, 3 call AddNTimes dec l ld b, l - ld c, $c - ld hl, wTileMap + ld c, 12 + coord hl, 0, 0 call TextBoxBorder call UpdateSprites - call CeladonMartRoofScript_48532 + call CeladonMartRoofScript_PrintDrinksInBag ld hl, wd730 res 6, [hl] call HandleMenuInput - bit 1, a + bit 1, a ; pressed b ret nz - ld hl, wcc5b - ld a, [wCurrentMenuItem] ; wCurrentMenuItem - ld d, $0 + ld hl, wFilteredBagItems + ld a, [wCurrentMenuItem] + ld d, 0 ld e, a add hl, de ld a, [hl] - ld [$ffdb], a + ld [hItemToRemoveID], a cp FRESH_WATER - jr z, .asm_484b6 + jr z, .gaveFreshWater cp SODA_POP - jr z, .asm_48492 - ld a, [wd778] - bit 6, a - jr nz, .asm_484e0 - ld hl, CeladonMartRoofText_48515 ; $4515 + jr z, .gaveSodaPop +; gave Lemonade + CheckEvent EVENT_GOT_TM49 + jr nz, .alreadyGaveDrink + ld hl, CeladonMartRoofText_48515 call PrintText call RemoveItemByIDBank12 - ld bc, (TM_49 << 8) | 1 + lb bc, TM_49, 1 call GiveItem - jr nc, .BagFull + jr nc, .bagFull ld hl, ReceivedTM49Text call PrintText - ld hl, wd778 - set 6, [hl] + SetEvent EVENT_GOT_TM49 ret -.asm_48492 - ld a, [wd778] - bit 5, a - jr nz, .asm_484e0 - ld hl, CeladonMartRoofText_48504 ; $4504 +.gaveSodaPop + CheckEvent EVENT_GOT_TM48 + jr nz, .alreadyGaveDrink + ld hl, CeladonMartRoofText_48504 call PrintText call RemoveItemByIDBank12 - ld bc, (TM_48 << 8) | 1 + lb bc, TM_48, 1 call GiveItem - jr nc, .BagFull - ld hl, CeladonMartRoofText_4850a ; $450a + jr nc, .bagFull + ld hl, CeladonMartRoofText_4850a call PrintText - ld hl, wd778 - set 5, [hl] + SetEvent EVENT_GOT_TM48 ret -.asm_484b6 - ld a, [wd778] - bit 4, a - jr nz, .asm_484e0 - ld hl, CeladonMartRoofText_484f3 ; $44f3 +.gaveFreshWater + CheckEvent EVENT_GOT_TM13 + jr nz, .alreadyGaveDrink + ld hl, CeladonMartRoofText_484f3 call PrintText call RemoveItemByIDBank12 - ld bc, (TM_13 << 8) | 1 + lb bc, TM_13, 1 call GiveItem - jr nc, .BagFull - ld hl, CeladonMartRoofText_484f9 ; $44f9 + jr nc, .bagFull + ld hl, CeladonMartRoofText_484f9 call PrintText - ld hl, wd778 - set 4, [hl] + SetEvent EVENT_GOT_TM13 ret -.BagFull - ld hl, CeladonMartRoofText_48526 ; $4526 +.bagFull + ld hl, CeladonMartRoofText_48526 jp PrintText -.asm_484e0 - ld hl, CeladonMartRoofText_4852c ; $452c +.alreadyGaveDrink + ld hl, CeladonMartRoofText_4852c jp PrintText -RemoveItemByIDBank12: ; 484e6 (12:44e6) - ld b, BANK(RemoveItemByID) - ld hl, RemoveItemByID - jp Bankswitch +RemoveItemByIDBank12: + jpba RemoveItemByID -CeladonMartRoofText_484ee: ; 484ee (12:44ee) +CeladonMartRoofText_484ee: TX_FAR _CeladonMartRoofText_484ee db "@" -CeladonMartRoofText_484f3: ; 484f3 (12:44f3) +CeladonMartRoofText_484f3: TX_FAR _CeladonMartRoofText_484f3 - db $0d + TX_WAIT db "@" -CeladonMartRoofText_484f9: ; 484f9 (12:44f9) +CeladonMartRoofText_484f9: TX_FAR _CeladonMartRoofText_484f9 - db $0b + TX_SFX_ITEM_1 TX_FAR _CeladonMartRoofText_484fe - db $0d + TX_WAIT db "@" -CeladonMartRoofText_48504: ; 48504 (12:4504) +CeladonMartRoofText_48504: TX_FAR _CeladonMartRoofText_48504 - db $0d + TX_WAIT db "@" -CeladonMartRoofText_4850a: ; 4850a (12:450a) +CeladonMartRoofText_4850a: TX_FAR _CeladonMartRoofText_4850a - db $0b + TX_SFX_ITEM_1 TX_FAR _CeladonMartRoofText_4850f - db $0d + TX_WAIT db "@" -CeladonMartRoofText_48515: ; 48515 (12:4515) +CeladonMartRoofText_48515: TX_FAR _CeladonMartRoofText_48515 - db $0d + TX_WAIT db "@" -ReceivedTM49Text: ; 4851b (12:451b) +ReceivedTM49Text: TX_FAR _ReceivedTM49Text - db $0b + TX_SFX_ITEM_1 TX_FAR _CeladonMartRoofText_48520 - db $0d + TX_WAIT db "@" -CeladonMartRoofText_48526: ; 48526 (12:4526) +CeladonMartRoofText_48526: TX_FAR _CeladonMartRoofText_48526 - db $0d + TX_WAIT db "@" -CeladonMartRoofText_4852c: ; 4852c (12:452c) +CeladonMartRoofText_4852c: TX_FAR _CeladonMartRoofText_4852c - db $0d + TX_WAIT db "@" -CeladonMartRoofScript_48532: ; 48532 (12:4532) - ld hl, wcc5b +CeladonMartRoofScript_PrintDrinksInBag: + ld hl, wFilteredBagItems xor a - ld [$ffdb], a -.asm_48538 + ld [hItemCounter], a +.loop ld a, [hli] cp $ff ret z push hl ld [wd11e], a call GetItemName - hlCoord 2, 2 - ld a, [$ffdb] - ld bc, $28 + coord hl, 2, 2 + ld a, [hItemCounter] + ld bc, SCREEN_WIDTH * 2 call AddNTimes ld de, wcd6d call PlaceString - ld hl, $ffdb + ld hl, hItemCounter inc [hl] pop hl - jr .asm_48538 + jr .loop -CeladonMartRoofTextPointers: ; 4855b (12:455b) +CeladonMartRoofTextPointers: dw CeladonMartRoofText1 dw CeladonMartRoofText2 dw CeladonMartRoofText5 @@ -219,43 +213,43 @@ CeladonMartRoofTextPointers: ; 4855b (12:455b) dw CeladonMartRoofText5 dw CeladonMartRoofText6 -CeladonMartRoofText1: ; 48567 (12:4567) +CeladonMartRoofText1: TX_FAR _CeladonMartRoofText1 db "@" -CeladonMartRoofText2: ; 4856c (12:456c) - db $08 ; asm - call CeladonMartRoofScript_483d8 - ld a, [wcd37] +CeladonMartRoofText2: + TX_ASM + call CeladonMartRoofScript_GetDrinksInBag + ld a, [wFilteredBagItemsCount] and a - jr z, .asm_914b9 ; 0x48574 - ld a, $1 + jr z, .noDrinksInBag + ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, CeladonMartRoofText4 call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_05aa4 ; 0x48588 - call CeladonMartRoofScript_4840c - jr .asm_05aa4 ; 0x4858d -.asm_914b9 ; 0x4858f + jr nz, .done + call CeladonMartRoofScript_GiveDrinkToGirl + jr .done +.noDrinksInBag ld hl, CeladonMartRoofText3 call PrintText -.asm_05aa4 ; 0x48595 +.done jp TextScriptEnd -CeladonMartRoofText3: ; 48598 (12:4598) +CeladonMartRoofText3: TX_FAR _CeladonMartRoofText_48598 db "@" -CeladonMartRoofText4: ; 4859d (12:459d) +CeladonMartRoofText4: TX_FAR _CeladonMartRoofText4 db "@" -CeladonMartRoofText5: ; 485a2 (12:45a2) - db $f5 +CeladonMartRoofText5: + TX_VENDING_MACHINE -CeladonMartRoofText6: ; 485a3 (12:45a3) +CeladonMartRoofText6: TX_FAR _CeladonMartRoofText6 db "@" diff --git a/scripts/celadonpokecenter.asm b/scripts/celadonpokecenter.asm index 1b8d3a1b..bd91af20 100755 --- a/scripts/celadonpokecenter.asm +++ b/scripts/celadonpokecenter.asm @@ -1,23 +1,23 @@ -CeladonPokecenterScript: ; 488b8 (12:48b8) +CeladonPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -CeladonPokecenterTextPointers: ; 488be (12:48be) - dw CeladonPokecenterText1 +CeladonPokecenterTextPointers: + dw CeladonHealNurseText dw CeladonPokecenterText2 dw CeladonPokecenterText3 - dw CeladonPokecenterText4 + dw CeladonTradeNurseText -CeladonPokecenterText4: ; 488c6 (12:48c6) - db $f6 +CeladonTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST -CeladonPokecenterText1: ; 488c7 (12:48c7) - db $ff +CeladonHealNurseText: + TX_POKECENTER_NURSE -CeladonPokecenterText2: ; 488c8 (12:48c8) +CeladonPokecenterText2: TX_FAR _CeladonPokecenterText2 db "@" -CeladonPokecenterText3: ; 488cd (12:48cd) +CeladonPokecenterText3: TX_FAR _CeladonPokecenterText3 db "@" diff --git a/scripts/celadonprizeroom.asm b/scripts/celadonprizeroom.asm index 2cfd01d0..a07ce162 100755 --- a/scripts/celadonprizeroom.asm +++ b/scripts/celadonprizeroom.asm @@ -1,20 +1,20 @@ -CeladonPrizeRoomScript: ; 490f0 (12:50f0) +CeladonPrizeRoomScript: jp EnableAutoTextBoxDrawing -CeladonPrizeRoomTextPointers: ; 490f3 (12:50f3) +CeladonPrizeRoomTextPointers: dw CeladonPrizeRoomText1 dw CeladonPrizeRoomText2 dw CeladonPrizeRoomText3 dw CeladonPrizeRoomText3 dw CeladonPrizeRoomText3 -CeladonPrizeRoomText1: ; 490fd (12:50fd) +CeladonPrizeRoomText1: TX_FAR _CeladonPrizeRoomText1 db "@" -CeladonPrizeRoomText2: ; 49102 (12:5102) +CeladonPrizeRoomText2: TX_FAR _CeladonPrizeRoomText2 db "@" -CeladonPrizeRoomText3: ; 49107 (12:5107) - db $f7 +CeladonPrizeRoomText3: + TX_PRIZE_VENDOR diff --git a/scripts/ceruleancity.asm b/scripts/ceruleancity.asm index bbddad79..d6269a64 100755 --- a/scripts/ceruleancity.asm +++ b/scripts/ceruleancity.asm @@ -1,74 +1,71 @@ -CeruleanCityScript: ; 19480 (6:5480) +CeruleanCityScript: call EnableAutoTextBoxDrawing ld hl, CeruleanCityScriptPointers - ld a, [W_CERULEANCITYCURSCRIPT] + ld a, [wCeruleanCityCurScript] jp CallFunctionInTable -CeruleanCityScript_1948c: ; 1948c (6:548c) +CeruleanCityScript_1948c: xor a ld [wJoyIgnore], a - ld [W_CERULEANCITYCURSCRIPT], a + ld [wCeruleanCityCurScript], a ld a, HS_CERULEAN_RIVAL - ld [wcc4d], a + ld [wMissableObjectIndex], a predef_jump HideObject -CeruleanCityScriptPointers: ; 1949d (6:549d) +CeruleanCityScriptPointers: dw CeruleanCityScript0 dw CeruleanCityScript1 dw CeruleanCityScript2 dw CeruleanCityScript3 dw CeruleanCityScript4 -CeruleanCityScript4: ; 194a7 (6:54a7) - ld a, [W_ISINBATTLE] +CeruleanCityScript4: + ld a, [wIsInBattle] cp $ff jp z, CeruleanCityScript_1948c ld a, $f0 ld [wJoyIgnore], a - ld hl, wd75b - set 7, [hl] + SetEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF ld a, $2 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a - ld [W_CERULEANCITYCURSCRIPT], a + ld [wCeruleanCityCurScript], a ret -CeruleanCityScript0: ; 194c8 (6:54c8) - ld a, [wd75b] - bit 7, a - jr nz, .asm_194f7 ; 0x194cd $28 +CeruleanCityScript0: + CheckEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF + jr nz, .asm_194f7 ld hl, CeruleanCityCoords1 call ArePlayerCoordsInArray - jr nc, .asm_194f7 ; 0x194d5 $20 - ld a, [wWhichTrade] + jr nc, .asm_194f7 + ld a, [wCoordIndex] cp $1 - ld a, $8 - ld b, $0 - jr nz, .asm_194e6 ; 0x194e0 $4 - ld a, $4 - ld b, $4 + ld a, PLAYER_DIR_UP + ld b, SPRITE_FACING_DOWN + jr nz, .asm_194e6 + ld a, PLAYER_DIR_DOWN + ld b, SPRITE_FACING_UP .asm_194e6 - ld [wd528], a + ld [wPlayerMovingDirection], a ld a, b - ld [wSpriteStateData1 + $29], a + ld [wSpriteStateData1 + 2 * $10 + $9], a call Delay3 ld a, $2 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID .asm_194f7 - ld a, [wd75a] - bit 0, a + CheckEvent EVENT_BEAT_CERULEAN_RIVAL ret nz ld hl, CeruleanCityCoords2 call ArePlayerCoordsInArray ret nc ld a, [wWalkBikeSurfState] and a - jr z, .asm_19512 ; 0x19508 $8 + jr z, .asm_19512 ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound .asm_19512 ld c, BANK(Music_MeetRival) @@ -78,55 +75,58 @@ CeruleanCityScript0: ; 194c8 (6:54c8) ld [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a - ld a, [W_XCOORD] + ld a, [wXCoord] cp $14 - jr z, .asm_19535 ; 0x19526 $d + jr z, .asm_19535 ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, $5 - ld [$ff8b], a + ld [H_SPRITEDATAOFFSET], a call GetPointerWithinSpriteStateData2 ld [hl], $19 .asm_19535 ld a, HS_CERULEAN_RIVAL - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld de, CeruleanCityMovement1 ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call MoveSprite ld a, $1 - ld [W_CERULEANCITYCURSCRIPT], a + ld [wCeruleanCityCurScript], a ret -CeruleanCityCoords1: ; 1954f (6:554f) +CeruleanCityCoords1: db $07,$1e db $09,$1e db $ff -CeruleanCityCoords2: ; 19554 (6:5554) +CeruleanCityCoords2: db $06,$14 db $06,$15 db $ff -CeruleanCityMovement1: ; 19559 (6:5559) - db $00,$00,$00,$FF +CeruleanCityMovement1: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF -CeruleanCityScript_1955d: ; 1955d (6:555d) +CeruleanCityScript_1955d: ld a,1 - ld [$ff8c],a - xor a - ld [$ff8d],a + ld [H_SPRITEINDEX],a + xor a ; SPRITE_FACING_DOWN + ld [hSpriteFacingDirection],a jp SetSpriteFacingDirectionAndDelay ; face object -CeruleanCityScript1: ; 19567 (6:5567) +CeruleanCityScript1: ld a, [wd730] bit 0, a ret nz xor a ld [wJoyIgnore], a ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd72d set 6, [hl] @@ -134,87 +134,100 @@ CeruleanCityScript1: ; 19567 (6:5567) ld hl, CeruleanCityText_1966d ld de, CeruleanCityText_19672 call SaveEndBattleTextPointers - ld a, SONY1 + $c8 - ld [W_CUROPPONENT], a + ld a, OPP_SONY1 + ld [wCurOpponent], a ; select which team to use during the encounter - ld a, [W_RIVALSTARTER] + ld a, [wRivalStarter] 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 ld a, $9 .done - ld [W_TRAINERNO], a + ld [wTrainerNo], a xor a ld [hJoyHeld], a call CeruleanCityScript_1955d ld a, $2 - ld [W_CERULEANCITYCURSCRIPT], a + ld [wCeruleanCityCurScript], a ret -CeruleanCityScript2: ; 195b1 (6:55b1) - ld a, [W_ISINBATTLE] +CeruleanCityScript2: + ld a, [wIsInBattle] cp $ff jp z, CeruleanCityScript_1948c call CeruleanCityScript_1955d ld a, $f0 ld [wJoyIgnore], a - ld hl, wd75a - set 0, [hl] + SetEvent EVENT_BEAT_CERULEAN_RIVAL ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateStart ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF - ld a, [W_XCOORD] + ld a, [wXCoord] 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 ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call MoveSprite ld a, $3 - ld [W_CERULEANCITYCURSCRIPT], a + ld [wCeruleanCityCurScript], a ret -CeruleanCityMovement3: ; 19600 (6:5600) - db $80,$00,$00,$00,$00,$00,$00,$FF - -CeruleanCityMovement4: ; 19608 (6:5608) - db $c0,$00,$00,$00,$00,$00,$00,$FF - -CeruleanCityScript3: ; 19610 (6:5610) +CeruleanCityMovement3: + db NPC_MOVEMENT_LEFT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF + +CeruleanCityMovement4: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF + +CeruleanCityScript3: ld a, [wd730] bit 0, a ret nz ld a, HS_CERULEAN_RIVAL - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject xor a ld [wJoyIgnore], a call PlayDefaultMusic ld a, $0 - ld [W_CERULEANCITYCURSCRIPT], a + ld [wCeruleanCityCurScript], a ret -CeruleanCityTextPointers: ; 1962d (6:562d) +CeruleanCityTextPointers: dw CeruleanCityText1 dw CeruleanCityText2 dw CeruleanCityText3 @@ -233,43 +246,41 @@ CeruleanCityTextPointers: ; 1962d (6:562d) dw CeruleanCityText16 dw CeruleanCityText17 -CeruleanCityText1: ; 1964f (6:564f) - db $08 ; asm - ld a, [wd75a] ; rival battle flag - bit 0, a +CeruleanCityText1: + TX_ASM + CheckEvent EVENT_BEAT_CERULEAN_RIVAL ; do pre-battle text jr z, .PreBattleText ; 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) +CeruleanCityText_19668: TX_FAR _CeruleanCityText_19668 db "@" -CeruleanCityText_1966d: ; 1966d (6:566d) +CeruleanCityText_1966d: TX_FAR _CeruleanCityText_1966d db "@" -CeruleanCityText_19672: ; 19672 (6:5672) +CeruleanCityText_19672: TX_FAR _CeruleanCityText_19672 db "@" -CeruleanCityText_19677: ; 19677 (6:5677) +CeruleanCityText_19677: TX_FAR _CeruleanCityText_19677 db "@" -CeruleanCityText2: ; 1967c (6:567c) - db $8 - ld a, [wd75b] - bit 7, a - jr nz, .asm_4ca20 ; 0x19682 $29 +CeruleanCityText2: + TX_ASM + CheckEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF + jr nz, .asm_4ca20 ld hl, CeruleanCityText_196d9 call PrintText ld hl, wd72d @@ -278,17 +289,17 @@ CeruleanCityText2: ; 1967c (6:567c) ld hl, CeruleanCityText_196ee ld de, CeruleanCityText_196ee call SaveEndBattleTextPointers - ld a, [$ff8c] + ld a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $4 - ld [W_CERULEANCITYCURSCRIPT], a + ld [wCeruleanCityCurScript], a jp TextScriptEnd -.asm_4ca20 ; 0x196ad +.asm_4ca20 ld hl, CeruleanCityText_196f3 call PrintText - ld bc, (TM_28 << 8) + 1 + lb bc, TM_28, 1 call GiveItem jr c, .Success ld hl, TM28NoRoomText @@ -299,143 +310,144 @@ CeruleanCityText2: ; 1967c (6:567c) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, ReceivedTM28Text call PrintText - callba Func_74872 + callba CeruleanHideRocket .Done jp TextScriptEnd -CeruleanCityText_196d9: ; 196d9 (6:56d9) +CeruleanCityText_196d9: TX_FAR _CeruleanCityText_196d9 db "@" -ReceivedTM28Text: ; 196de (6:56de) +ReceivedTM28Text: TX_FAR _ReceivedTM28Text - db $0B + TX_SFX_ITEM_1 TX_FAR _ReceivedTM28Text2 - db $0D, "@" + TX_WAIT + db "@" -TM28NoRoomText: ; 196e9 (6:56e9) +TM28NoRoomText: TX_FAR _TM28NoRoomText db "@" -CeruleanCityText_196ee: ; 196ee (6:56ee) +CeruleanCityText_196ee: TX_FAR _CeruleanCityText_196ee db "@" -CeruleanCityText_196f3: ; 196f3 (6:56f3) +CeruleanCityText_196f3: TX_FAR _CeruleanCityText_196f3 db "@" -CeruleanCityText3: ; 196f8 (6:56f8) +CeruleanCityText3: TX_FAR _CeruleanCityText3 db "@" -CeruleanCityText4: ; 196fd (6:56fd) +CeruleanCityText4: TX_FAR _CeruleanCityText4 db "@" -CeruleanCityText5: ; 19702 (6:5702) +CeruleanCityText5: TX_FAR _CeruleanCityText5 db "@" -CeruleanCityText11: ; 19707 (6:5707) -CeruleanCityText6: ; 19707 (6:5707) +CeruleanCityText11: +CeruleanCityText6: TX_FAR _CeruleanCityText6 db "@" -CeruleanCityText7: ; 1970c (6:570c) - db $08 ; asm - ldh a, [$d3] - cp $b4 - jr c, .asm_e9fc9 ; 0x19711 +CeruleanCityText7: + TX_ASM + ld a, [hRandomAdd] + cp 180 + jr c, .asm_e9fc9 ld hl, CeruleanCityText_19730 call PrintText - jr .asm_d486e ; 0x19719 -.asm_e9fc9 ; 0x1971b - cp $64 - jr c, .asm_df99b ; 0x1971d + jr .asm_d486e +.asm_e9fc9 + cp 100 + 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) +CeruleanCityText_19730: TX_FAR _CeruleanCityText_19730 db "@" -CeruleanCityText_19735: ; 19735 (6:5735) +CeruleanCityText_19735: TX_FAR _CeruleanCityText_19735 db "@" -CeruleanCityText_1973a: ; 1973a (6:573a) +CeruleanCityText_1973a: TX_FAR _CeruleanCityText_1973a db "@" -CeruleanCityText8: ; 1973f (6:573f) - db $08 ; asm - ldh a, [$d3] - cp $b4 - jr c, .asm_e28da ; 0x19744 +CeruleanCityText8: + TX_ASM + ld a, [hRandomAdd] + cp 180 + jr c, .asm_e28da ld hl, CeruleanCityText_1976f call PrintText - jr .asm_f2f38 ; 0x1974c -.asm_e28da ; 0x1974e - cp $78 - jr c, .asm_15d08 ; 0x19750 + jr .asm_f2f38 +.asm_e28da + cp 120 + jr c, .asm_15d08 ld hl, CeruleanCityText_19774 call PrintText - jr .asm_f2f38 ; 0x19758 -.asm_15d08 ; 0x1975a - cp $3c - jr c, .asm_d7fea ; 0x1975c + jr .asm_f2f38 +.asm_15d08 + cp 60 + 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) +CeruleanCityText_1976f: TX_FAR _CeruleanCityText_1976f db "@" -CeruleanCityText_19774: ; 19774 (6:5774) +CeruleanCityText_19774: TX_FAR _CeruleanCityText_19774 db "@" -CeruleanCityText_19779: ; 19779 (6:5779) +CeruleanCityText_19779: TX_FAR _CeruleanCityText_19779 db "@" -CeruleanCityText_1977e: ; 1977e (6:577e) +CeruleanCityText_1977e: TX_FAR _CeruleanCityText_1977e db "@" -CeruleanCityText9: ; 19783 (6:5783) +CeruleanCityText9: TX_FAR _CeruleanCityText9 db "@" -CeruleanCityText10: ; 19788 (6:5788) +CeruleanCityText10: TX_FAR _CeruleanCityText10 db "@" -CeruleanCityText12: ; 1978d (6:578d) +CeruleanCityText12: TX_FAR _CeruleanCityText12 db "@" -CeruleanCityText13: ; 19792 (6:5792) +CeruleanCityText13: TX_FAR _CeruleanCityText13 db "@" -CeruleanCityText16: ; 19797 (6:5797) +CeruleanCityText16: TX_FAR _CeruleanCityText16 db "@" -CeruleanCityText17: ; 1979c (6:579c) +CeruleanCityText17: TX_FAR _CeruleanCityText17 db "@" diff --git a/scripts/ceruleancity2.asm b/scripts/ceruleancity2.asm index 72ee4a86..53ace5c8 100755 --- a/scripts/ceruleancity2.asm +++ b/scripts/ceruleancity2.asm @@ -1,16 +1,16 @@ -Func_74872: ; 74872 (1d:4872) +CeruleanHideRocket: ; 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 call GBFadeOutToBlack ld a, HS_CERULEAN_GUARD_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld a, HS_CERULEAN_GUARD_2 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_CERULEAN_ROCKET - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject call GBFadeInFromBlack ret diff --git a/scripts/ceruleangym.asm b/scripts/ceruleangym.asm index 079844f3..b82b89f6 100755 --- a/scripts/ceruleangym.asm +++ b/scripts/ceruleangym.asm @@ -1,80 +1,76 @@ -CeruleanGymScript: ; 5c6b3 (17:46b3) - ld hl, wd126 +CeruleanGymScript: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] call nz, CeruleanGymScript_5c6d0 call EnableAutoTextBoxDrawing - ld hl, CeruleanGymTrainerHeaders + ld hl, CeruleanGymTrainerHeader0 ld de, CeruleanGymScriptPointers - ld a, [W_CERULEANGYMCURSCRIPT] + ld a, [wCeruleanGymCurScript] call ExecuteCurMapScriptInTable - ld [W_CERULEANGYMCURSCRIPT], a + ld [wCeruleanGymCurScript], a ret -CeruleanGymScript_5c6d0: ; 5c6d0 (17:46d0) - ld hl, Gym2CityName ; $46d9 - ld de, Gym2LeaderName ; $46e7 +CeruleanGymScript_5c6d0: + ld hl, Gym2CityName + ld de, Gym2LeaderName jp LoadGymLeaderAndCityName -Gym2CityName: ; 5c6d9 (17:46d9) +Gym2CityName: db "CERULEAN CITY@" -Gym2LeaderName: ; 5c6e7 (17:46e7) +Gym2LeaderName: db "MISTY@" -CeruleanGymScript_5c6ed: ; 5c6ed (17:46ed) +CeruleanGymScript_5c6ed: xor a ld [wJoyIgnore], a - ld [W_CERULEANGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wCeruleanGymCurScript], a + ld [wCurMapScript], a ret -CeruleanGymScriptPointers: ; 5c6f8 (17:46f8) +CeruleanGymScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw CeruleanGymScript3 -CeruleanGymScript3: ; 5c700 (17:4700) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +CeruleanGymScript3: + ld a, [wIsInBattle] cp $ff jp z, CeruleanGymScript_5c6ed ld a, $f0 ld [wJoyIgnore], a -CeruleanGymScript_5c70d: ; 5c70d (17:470d) +CeruleanGymScript_5c70d: ld a, $5 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd75e - set 7, [hl] - ld bc, (TM_11 << 8) | 1 + SetEvent EVENT_BEAT_MISTY + lb bc, TM_11, 1 call GiveItem jr nc, .BagFull ld a, $6 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd75e - set 6, [hl] + SetEvent EVENT_GOT_TM11 jr .asm_5c736 .BagFull ld a, $7 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_5c736 - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges set 1, [hl] - ld hl, wd72a + ld hl, wBeatGymFlags set 1, [hl] ; deactivate gym trainers - ld hl, wd75e - set 2, [hl] - set 3, [hl] + SetEvents EVENT_BEAT_CERULEAN_GYM_TRAINER_0, EVENT_BEAT_CERULEAN_GYM_TRAINER_1 jp CeruleanGymScript_5c6ed -CeruleanGymTextPointers: ; 5c74a (17:474a) +CeruleanGymTextPointers: dw CeruleanGymText1 dw CeruleanGymText2 dw CeruleanGymText3 @@ -83,42 +79,40 @@ CeruleanGymTextPointers: ; 5c74a (17:474a) dw CeruleanGymText6 dw CeruleanGymText7 -CeruleanGymTrainerHeaders: ; 5c758 (17:4758) -CeruleanGymTrainerHeader0: ; 5c758 (17:4758) - db $2 ; flag's bit +CeruleanGymTrainerHeader0: + dbEventFlagBit EVENT_BEAT_CERULEAN_GYM_TRAINER_0 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 - -CeruleanGymTrainerHeader1: ; 5c764 (17:4764) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_CERULEAN_GYM_TRAINER_0 + dw CeruleanGymBattleText1 ; TextBeforeBattle + dw CeruleanGymAfterBattleText1 ; TextAfterBattle + dw CeruleanGymEndBattleText1 ; TextEndBattle + dw CeruleanGymEndBattleText1 ; TextEndBattle + +CeruleanGymTrainerHeader1: + dbEventFlagBit EVENT_BEAT_CERULEAN_GYM_TRAINER_1 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 + dwEventFlagAddress EVENT_BEAT_CERULEAN_GYM_TRAINER_1 + dw CeruleanGymBattleText2 ; TextBeforeBattle + dw CeruleanGymAfterBattleText2 ; TextAfterBattle + dw CeruleanGymEndBattleText2 ; TextEndBattle + dw CeruleanGymEndBattleText2 ; TextEndBattle db $ff -CeruleanGymText1: ; 5c771 (17:4771) - db $08 ; asm - ld a, [wd75e] - bit 7, a - jr z, .asm_10854 ; 0x5c777 - bit 6, a - jr nz, .asm_37a1b ; 0x5c77b +CeruleanGymText1: + TX_ASM + CheckEvent EVENT_BEAT_MISTY + jr z, .asm_5c78d + CheckEventReuseA EVENT_GOT_TM11 + 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,98 +121,99 @@ 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 + ld [wGymLeaderNo], a xor a - ldh [$b4], a + ld [hJoyHeld], a ld a, $3 - ld [W_CERULEANGYMCURSCRIPT], a -.asm_95b04 ; 0x5c7bb + ld [wCeruleanGymCurScript], a +.asm_5c7bb jp TextScriptEnd -CeruleanGymText_5c7be: ; 5c7be (17:47be) +CeruleanGymText_5c7be: TX_FAR _CeruleanGymText_5c7be db "@" -CeruleanGymText_5c7c3: ; 5c7c3 (17:47c3) +CeruleanGymText_5c7c3: TX_FAR _CeruleanGymText_5c7c3 db "@" -CeruleanGymText5: ; 5c7c8 (17:47c8) +CeruleanGymText5: TX_FAR _CeruleanGymText_5c7c8 db "@" -CeruleanGymText6: ; 5c7cd (17:47cd) -ReceivedTM11Text: ; 5c7cd (17:47cd) +CeruleanGymText6: TX_FAR _ReceivedTM11Text - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -CeruleanGymText7: ; 5c7d3 (17:47d3) +CeruleanGymText7: TX_FAR _CeruleanGymText_5c7d3 db "@" -CeruleanGymText_5c7d8: ; 5c7d8 (17:47d8) +CeruleanGymText_5c7d8: TX_FAR _CeruleanGymText_5c7d8 - db $11, $6, "@" + TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded + TX_BLINK + db "@" -CeruleanGymText2: ; 5c7df (17:47df) - db $08 ; asm +CeruleanGymText2: + TX_ASM ld hl, CeruleanGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd -CeruleanGymBattleText1: ; 5c7e9 (17:47e9) +CeruleanGymBattleText1: TX_FAR _CeruleanGymBattleText1 db "@" -CeruleanGymEndBattleText1: ; 5c7ee (17:47ee) +CeruleanGymEndBattleText1: TX_FAR _CeruleanGymEndBattleText1 db "@" -CeruleanGymAfterBattleText1: ; 5c7f3 (17:47f3) +CeruleanGymAfterBattleText1: TX_FAR _CeruleanGymAfterBattleText1 db "@" -CeruleanGymText3: ; 5c7f8 (17:47f8) - db $08 ; asm +CeruleanGymText3: + TX_ASM ld hl, CeruleanGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd -CeruleanGymBattleText2: ; 5c802 (17:4802) +CeruleanGymBattleText2: TX_FAR _CeruleanGymBattleText2 db "@" -CeruleanGymEndBattleText2: ; 5c807 (17:4807) +CeruleanGymEndBattleText2: TX_FAR _CeruleanGymEndBattleText2 db "@" -CeruleanGymAfterBattleText2: ; 5c80c (17:480c) +CeruleanGymAfterBattleText2: TX_FAR _CeruleanGymAfterBattleText2 db "@" -CeruleanGymText4: ; 5c811 (17:4811) - db $08 ; asm - ld a, [wd75e] - bit 7, a - jr nz, .asm_f80ce ; 0x5c817 +CeruleanGymText4: + TX_ASM + CheckEvent EVENT_BEAT_MISTY + 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) +CeruleanGymText_5c82a: TX_FAR _CeruleanGymText_5c82a db "@" -CeruleanGymText_5c82f: ; 5c82f (17:482f) +CeruleanGymText_5c82f: TX_FAR _CeruleanGymText_5c82f db "@" diff --git a/scripts/ceruleanhouse1.asm b/scripts/ceruleanhouse1.asm index 4b6a240a..181a22c3 100755 --- a/scripts/ceruleanhouse1.asm +++ b/scripts/ceruleanhouse1.asm @@ -1,16 +1,16 @@ -CeruleanHouse1Script: ; 1d6f6 (7:56f6) +CeruleanHouse1Script: jp EnableAutoTextBoxDrawing -CeruleanHouse1TextPointers: ; 1d6f9 (7:56f9) +CeruleanHouse1TextPointers: dw CeruleanHouse1Text1 dw CeruleanHouse1Text2 -CeruleanHouse1Text1: ; 1d6fd (7:56fd) +CeruleanHouse1Text1: TX_FAR _CeruleanHouse1Text1 db "@" -CeruleanHouse1Text2: ; 1d702 (7:5702) - db $08 ; asm +CeruleanHouse1Text2: + TX_ASM ld a, $6 ld [wWhichTrade], a predef DoInGameTradeDialogue diff --git a/scripts/ceruleanhouse2.asm b/scripts/ceruleanhouse2.asm index a40d9224..e83c2194 100755 --- a/scripts/ceruleanhouse2.asm +++ b/scripts/ceruleanhouse2.asm @@ -1,15 +1,15 @@ -CeruleanHouse2Script: ; 74e09 (1d:4e09) +CeruleanHouse2Script: ld a, $1 ld [wAutoTextBoxDrawingControl], a dec a ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret -CeruleanHouse2TextPointers: ; 74e13 (1d:4e13) +CeruleanHouse2TextPointers: dw CeruleanHouse2Text1 -CeruleanHouse2Text1: ; 74e15 (1d:4e15) - db $8 +CeruleanHouse2Text1: + TX_ASM ld hl, CeruleanHouse2Text_74e77 call PrintText xor a @@ -20,18 +20,18 @@ CeruleanHouse2Text1: ; 74e15 (1d:4e15) call PrintText ld hl, BadgeItemList call LoadItemList - ld hl, wStringBuffer2 + 11 + ld hl, wItemList ld a, l - ld [wList], a + ld [wListPointer], a ld a, h - ld [wList + 1], a + ld [wListPointer + 1], a xor a - ld [wcf93], a + ld [wPrintItemPrices], a ld [wMenuItemToSwap], a 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 @@ -51,22 +51,22 @@ CeruleanHouse2Text1: ; 74e15 (1d:4e15) call PrintText jp TextScriptEnd -BadgeItemList: ; 74e6d (1d:4e6d) +BadgeItemList: db $8,BOULDERBADGE,CASCADEBADGE,THUNDERBADGE,RAINBOWBADGE,SOULBADGE,MARSHBADGE,VOLCANOBADGE,EARTHBADGE,$FF -CeruleanHouse2Text_74e77: ; 74e77 (1d:4e77) +CeruleanHouse2Text_74e77: TX_FAR _CeruleanHouse2Text_74e77 db "@" -CeruleanHouse2Text_74e7c: ; 74e7c (1d:4e7c) +CeruleanHouse2Text_74e7c: TX_FAR _CeruleanHouse2Text_74e7c db "@" -CeruleanHouse2Text_74e81: ; 74e81 (1d:4e81) +CeruleanHouse2Text_74e81: TX_FAR _CeruleanHouse2Text_74e81 db "@" -TextPointers_74e86: ; 74e86 (1d:4e86) +TextPointers_74e86: dw CeruleanHouse2Text_74e96 dw CeruleanHouse2Text_74e9b dw CeruleanHouse2Text_74ea0 @@ -76,34 +76,34 @@ TextPointers_74e86: ; 74e86 (1d:4e86) dw CeruleanHouse2Text_74eb4 dw CeruleanHouse2Text_74eb9 -CeruleanHouse2Text_74e96: ; 74e96 (1d:4e96) +CeruleanHouse2Text_74e96: TX_FAR _CeruleanHouse2Text_74e96 db "@" -CeruleanHouse2Text_74e9b: ; 74e9b (1d:4e9b) +CeruleanHouse2Text_74e9b: TX_FAR _CeruleanHouse2Text_74e9b db "@" -CeruleanHouse2Text_74ea0: ; 74ea0 (1d:4ea0) +CeruleanHouse2Text_74ea0: TX_FAR _CeruleanHouse2Text_74ea0 db "@" -CeruleanHouse2Text_74ea5: ; 74ea5 (1d:4ea5) +CeruleanHouse2Text_74ea5: TX_FAR _CeruleanHouse2Text_74ea5 db "@" -CeruleanHouse2Text_74eaa: ; 74eaa (1d:4eaa) +CeruleanHouse2Text_74eaa: TX_FAR _CeruleanHouse2Text_74eaa db "@" -CeruleanHouse2Text_74eaf: ; 74eaf (1d:4eaf) +CeruleanHouse2Text_74eaf: TX_FAR _CeruleanHouse2Text_74eaf db "@" -CeruleanHouse2Text_74eb4: ; 74eb4 (1d:4eb4) +CeruleanHouse2Text_74eb4: TX_FAR _CeruleanHouse2Text_74eb4 db "@" -CeruleanHouse2Text_74eb9: ; 74eb9 (1d:4eb9) +CeruleanHouse2Text_74eb9: TX_FAR _CeruleanHouse2Text_74eb9 db "@" diff --git a/scripts/ceruleanhousetrashed.asm b/scripts/ceruleanhousetrashed.asm index ee60cda7..da848b7c 100755 --- a/scripts/ceruleanhousetrashed.asm +++ b/scripts/ceruleanhousetrashed.asm @@ -1,39 +1,39 @@ -CeruleanHouseTrashedScript: ; 1d685 (7:5685) +CeruleanHouseTrashedScript: call EnableAutoTextBoxDrawing ret -CeruleanHouseTrashedTextPointers: ; 1d689 (7:5689) +CeruleanHouseTrashedTextPointers: dw CeruleanHouseTrashedText1 dw CeruleanHouseTrashedText2 dw CeruleanHouseTrashedText3 -CeruleanHouseTrashedText1: ; 1d68f (7:568f) - db $08 ; asm +CeruleanHouseTrashedText1: + TX_ASM ld b, $e4 - predef IsItemInBag_ + predef GetQuantityOfItemInBag 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) +CeruleanHouseTrashedText_1d6ab: TX_FAR _CeruleanTrashedText_1d6ab db "@" -CeruleanHouseTrashedText_1d6b0: ; 1d6b0 (7:56b0) +CeruleanHouseTrashedText_1d6b0: TX_FAR _CeruleanTrashedText_1d6b0 db "@" -CeruleanHouseTrashedText2: ; 1d6b5 (7:56b5) +CeruleanHouseTrashedText2: TX_FAR _CeruleanHouseTrashedText2 db "@" -CeruleanHouseTrashedText3: ; 1d6ba (7:56ba) +CeruleanHouseTrashedText3: TX_FAR _CeruleanHouseTrashedText3 db "@" diff --git a/scripts/ceruleanmart.asm b/scripts/ceruleanmart.asm index 7aea6d47..76d83f90 100755 --- a/scripts/ceruleanmart.asm +++ b/scripts/ceruleanmart.asm @@ -1,15 +1,15 @@ -CeruleanMartScript: ; 5c895 (17:4895) +CeruleanMartScript: jp EnableAutoTextBoxDrawing -CeruleanMartTextPointers: ; 5c898 (17:4898) - dw CeruleanMartText1 +CeruleanMartTextPointers: + dw CeruleanCashierText dw CeruleanMartText2 dw CeruleanMartText3 -CeruleanMartText2: ; 5c89e (17:489e) +CeruleanMartText2: TX_FAR _CeruleanMartText2 db "@" -CeruleanMartText3: ; 5c8a3 (17:48a3) +CeruleanMartText3: TX_FAR _CeruleanMartText3 db "@" diff --git a/scripts/ceruleanpokecenter.asm b/scripts/ceruleanpokecenter.asm index 5d888317..b758f497 100755 --- a/scripts/ceruleanpokecenter.asm +++ b/scripts/ceruleanpokecenter.asm @@ -1,23 +1,23 @@ -CeruleanPokecenterScript: ; 5c645 (17:4645) +CeruleanPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -CeruleanPokecenterTextPointers: ; 5c64b (17:464b) - dw CeruleanPokecenterText1 +CeruleanPokecenterTextPointers: + dw CeruleanHealNurseText dw CeruleanPokecenterText2 dw CeruleanPokecenterText3 - dw CeruleanPokecenterText4 + dw CeruleanTradeNurseText -CeruleanPokecenterText4: ; 5c653 (17:4653) - db $f6 +CeruleanTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST -CeruleanPokecenterText1: ; 5c654 (17:4654) - db $ff +CeruleanHealNurseText: + TX_POKECENTER_NURSE -CeruleanPokecenterText2: ; 5c655 (17:4655) - TX_FAR _CeruleanPokecenterText1 +CeruleanPokecenterText2: + TX_FAR _CeruleanPokecenterText2 db "@" -CeruleanPokecenterText3: ; 5c65a (17:465a) +CeruleanPokecenterText3: TX_FAR _CeruleanPokecenterText3 db "@" diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm index 48133c52..8af7bbd3 100755 --- a/scripts/cinnabargym.asm +++ b/scripts/cinnabargym.asm @@ -1,12 +1,12 @@ -CinnabarGymScript: ; 7574a (1d:574a) +CinnabarGymScript: call CinnabarGymScript_75759 call EnableAutoTextBoxDrawing ld hl, CinnabarGymScriptPointers - ld a, [W_CINNABARGYMCURSCRIPT] + ld a, [wCinnabarGymCurScript] jp CallFunctionInTable -CinnabarGymScript_75759: ; 75759 (1d:5759) - ld hl, wd126 +CinnabarGymScript_75759: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] push hl @@ -14,164 +14,163 @@ CinnabarGymScript_75759: ; 75759 (1d:5759) pop hl bit 5, [hl] res 5, [hl] - call nz, Func_3ead - ld hl, wd79b - res 7, [hl] + call nz, UpdateCinnabarGymGateTileBlocks + ResetEvent EVENT_2A7 ret -CinnabarGymScript_75772: ; 75772 (1d:5772) +CinnabarGymScript_75772: ld hl, Gym7CityName ld de, Gym7LeaderName jp LoadGymLeaderAndCityName -Gym7CityName: ; 7577b (1d:577b) +Gym7CityName: db "CINNABAR ISLAND@" -Gym7LeaderName: ; 7578b (1d:578b) +Gym7LeaderName: db "BLAINE@" -CinnabarGymScript_75792: ; 75792 (1d:5792) +CinnabarGymScript_75792: xor a ld [wJoyIgnore], a - ld [W_CINNABARGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a - ld [wda38], a + ld [wCinnabarGymCurScript], a + ld [wCurMapScript], a + ld [wOpponentAfterWrongAnswer], a ret -CinnabarGymScript_757a0: ; 757a0 (1d:57a0) - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c +CinnabarGymScript_757a0: + ld a, [hSpriteIndexOrTextID] ld [wTrainerHeaderFlagBit], a ret -CinnabarGymScriptPointers: ; 757a6 (1d:57a6) +CinnabarGymScriptPointers: dw CinnabarGymScript0 dw CinnabarGymScript1 dw CinnabarGymScript2 dw CinnabarGymScript3 -CinnabarGymScript0: ; 757ae (1d:57ae) - ld a, [wda38] +CinnabarGymScript0: + ld a, [wOpponentAfterWrongAnswer] and a ret z - ld [$ff8c], a + ld [H_SPRITEINDEX], a cp $4 - jr nz, .asm_757c3 ; 0x757b7 $a - ld a, $4 - ld [wd528], a + jr nz, .asm_757c3 + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a ld de, MovementData_757d7 - jr .asm_757cb ; 0x757c1 $8 + jr .asm_757cb .asm_757c3 ld de, MovementData_757da - ld a, $1 - ld [wd528], a + ld a, PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a .asm_757cb call MoveSprite ld a, $1 - ld [W_CINNABARGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wCinnabarGymCurScript], a + ld [wCurMapScript], a ret -MovementData_757d7: ; 757d7 (1d:57d7) - db $80,$40,$FF +MovementData_757d7: + db NPC_MOVEMENT_LEFT + db NPC_MOVEMENT_UP + db $FF -MovementData_757da: ; 757da (1d:57da) - db $80,$FF +MovementData_757da: + db NPC_MOVEMENT_LEFT + db $FF -CinnabarGymScript1: ; 757dc (1d:57dc) +CinnabarGymScript1: ld a, [wd730] bit 0, a ret nz xor a ld [wJoyIgnore], a - ld a, [wda38] + ld a, [wOpponentAfterWrongAnswer] ld [wTrainerHeaderFlagBit], a - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID -CinnabarGymScript_757f1: ; 757f1 (1d:57f1) +CinnabarGymFlagAction: predef_jump FlagActionPredef -CinnabarGymScript2: ; 757f6 (1d:57f6) - ld a, [W_ISINBATTLE] +CinnabarGymScript2: + ld a, [wIsInBattle] cp $ff jp z, CinnabarGymScript_75792 ld a, [wTrainerHeaderFlagBit] ld [$ffdb], a + AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2 ld c, a - ld b, $2 - ld hl, wd79a - call CinnabarGymScript_757f1 + ld b, FLAG_TEST + EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0 + call CinnabarGymFlagAction 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 + ld a, SFX_GO_INSIDE call PlaySound call WaitForSoundToFinish .asm_7581b ld a, [wTrainerHeaderFlagBit] ld [$ffdb], a + AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2 ld c, a - ld b, $1 - ld hl, wd79a - call CinnabarGymScript_757f1 + ld b, FLAG_SET + EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0 + call CinnabarGymFlagAction ld a, [wTrainerHeaderFlagBit] sub $2 + AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0 ld c, a - ld b, $1 - ld hl, wd79c - call CinnabarGymScript_757f1 - call Func_3ead + ld b, FLAG_SET + EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED + call CinnabarGymFlagAction + call UpdateCinnabarGymGateTileBlocks xor a ld [wJoyIgnore], a - ld [wda38], a + ld [wOpponentAfterWrongAnswer], a ld a, $0 - ld [W_CINNABARGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wCinnabarGymCurScript], a + ld [wCurMapScript], a ret -CinnabarGymScript3: ; 7584a (1d:584a) - ld a, [W_ISINBATTLE] +CinnabarGymScript3: + ld a, [wIsInBattle] cp $ff jp z, CinnabarGymScript_75792 ld a, $f0 ld [wJoyIgnore], a -CinnabarGymScript3_75857: ; 75857 (1d:5857) +CinnabarGymScript3_75857: ld a, $a - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd79a - set 1, [hl] - ld bc, (TM_38 << 8) | 1 + SetEvent EVENT_BEAT_BLAINE + lb bc, TM_38, 1 call GiveItem jr nc, .BagFull ld a, $b - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd79a - set 0, [hl] - jr .asm_75880 ; 0x75877 $7 + SetEvent EVENT_GOT_TM38 + jr .asm_75880 .BagFull ld a, $c - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_75880 - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges set 6, [hl] - ld hl, wd72a + ld hl, wBeatGymFlags set 6, [hl] ; deactivate gym trainers - ld a, [wd79a] - or %11111100 - ld [wd79a], a - ld hl, wd79b - set 0, [hl] + SetEventRange EVENT_BEAT_CINNABAR_GYM_TRAINER_0, EVENT_BEAT_CINNABAR_GYM_TRAINER_6 - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] jp CinnabarGymScript_75792 -CinnabarGymTextPointers: ; 7589f (1d:589f) +CinnabarGymTextPointers: dw CinnabarGymText1 dw CinnabarGymText2 dw CinnabarGymText3 @@ -185,8 +184,8 @@ CinnabarGymTextPointers: ; 7589f (1d:589f) dw ReceivedTM38Text dw TM38NoRoomText -CinnabarGymScript_758b7: ; 758b7 (1d:58b7) - ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c +CinnabarGymScript_758b7: + ld a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -201,282 +200,273 @@ CinnabarGymScript_758b7: ; 758b7 (1d:58b7) .asm_758d4 ld a, $3 .asm_758d6 - ld [W_CINNABARGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wCinnabarGymCurScript], a + ld [wCurMapScript], a jp TextScriptEnd -CinnabarGymText1: ; 758df (1d:58df) - db $8 - ld a, [wd79a] - bit 1, a - jr z, .asm_d9332 ; 0x758e5 $16 - bit 0, a - jr nz, .asm_3012f ; 0x758e9 $9 +CinnabarGymText1: + TX_ASM + CheckEvent EVENT_BEAT_BLAINE + jr z, .asm_d9332 + CheckEventReuseA EVENT_GOT_TM38 + 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 ld de, BlaineEndBattleText call SaveEndBattleTextPointers ld a, $7 - ld [W_GYMLEADERNO], a + ld [wGymLeaderNo], a jp CinnabarGymScript_758b7 -BlaineBattleText: ; 75914 (1d:5914) +BlaineBattleText: TX_FAR _BlaineBattleText db "@" -BlaineEndBattleText: ; 75919 (1d:5919) +BlaineEndBattleText: TX_FAR _BlaineEndBattleText - db $11 - db $d + TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded + TX_WAIT db "@" -BlaineFireBlastText: ; 75920 (1d:5920) +BlaineFireBlastText: TX_FAR _BlaineFireBlastText db "@" -BlaineBadgeText: ; 75925 (1d:5925) +BlaineBadgeText: TX_FAR _BlaineBadgeText db "@" -ReceivedTM38Text: ; 7592a (1d:592a) +ReceivedTM38Text: TX_FAR _ReceivedTM38Text - db $0B + TX_SFX_ITEM_1 TX_FAR _TM38ExplanationText db "@" -TM38NoRoomText: ; 75934 (1d:5934) +TM38NoRoomText: TX_FAR _TM38NoRoomText db "@" -CinnabarGymText2: ; 75939 (1d:5939) - db $08 ; asm +CinnabarGymText2: + TX_ASM call CinnabarGymScript_757a0 - ld a, [wd79a] - bit 2, a - jr nz, .asm_46bb4 ; 0x75942 + CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_0 + 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 -CinnabarGymText_7595f: ; 7595f (1d:595f) +CinnabarGymText_7595f: TX_FAR _CinnabarGymText_7595f db "@" -CinnabarGymText_75964: ; 75964 (1d:5964) +CinnabarGymText_75964: TX_FAR _CinnabarGymText_75964 db "@" -CinnabarGymText_75969: ; 75969 (1d:5969) +CinnabarGymText_75969: TX_FAR _CinnabarGymText_75969 db "@" -CinnabarGymText3: ; 7596e (1d:596e) - db $08 ; asm +CinnabarGymText3: + TX_ASM call CinnabarGymScript_757a0 - ld a, [wd79a] - bit 3, a - jr nz, .asm_4b406 ; 0x75977 + CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_1 + 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 -CinnabarGymText_75994: ; 75994 (1d:5994) +CinnabarGymText_75994: TX_FAR _CinnabarGymText_75994 db "@" -CinnabarGymText_75999: ; 75999 (1d:5999) +CinnabarGymText_75999: TX_FAR _CinnabarGymText_75999 db "@" -CinnabarGymText_7599e: ; 7599e (1d:599e) +CinnabarGymText_7599e: TX_FAR _CinnabarGymText_7599e db "@" -CinnabarGymText4: ; 759a3 (1d:59a3) - db $08 ; asm +CinnabarGymText4: + TX_ASM call CinnabarGymScript_757a0 - ld a, [wd79a] - bit 4, a - jr nz, .asm_c0673 ; 0x759ac + CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_2 + 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 -CinnabarGymText_759c9: ; 759c9 (1d:59c9) +CinnabarGymText_759c9: TX_FAR _CinnabarGymText_759c9 db "@" -CinnabarGymText_759ce: ; 759ce (1d:59ce) +CinnabarGymText_759ce: TX_FAR _CinnabarGymText_759ce db "@" -CinnabarGymText_759d3: ; 759d3 (1d:59d3) +CinnabarGymText_759d3: TX_FAR _CinnabarGymText_759d3 db "@" -CinnabarGymText5: ; 759d8 (1d:59d8) - db $08 ; asm +CinnabarGymText5: + TX_ASM call CinnabarGymScript_757a0 - ld a, [wd79a] - bit 5, a - jr nz, .asm_5cfd7 ; 0x759e1 + CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_3 + 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 -CinnabarGymText_759fe: ; 759fe (1d:59fe) +CinnabarGymText_759fe: TX_FAR _CinnabarGymText_759fe db "@" -CinnabarGymText_75a03: ; 75a03 (1d:5a03) +CinnabarGymText_75a03: TX_FAR _CinnabarGymText_75a03 db "@" -CinnabarGymText_75a08: ; 75a08 (1d:5a08) +CinnabarGymText_75a08: TX_FAR _CinnabarGymText_75a08 db "@" -CinnabarGymText6: ; 75a0d (1d:5a0d) - db $08 ; asm +CinnabarGymText6: + TX_ASM call CinnabarGymScript_757a0 - ld a, [wd79a] - bit 6, a - jr nz, .asm_776b4 ; 0x75a16 + CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_4 + 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 -CinnabarGymText_75a33: ; 75a33 (1d:5a33) +CinnabarGymText_75a33: TX_FAR _CinnabarGymText_75a33 db "@" -CinnabarGymText_75a38: ; 75a38 (1d:5a38) +CinnabarGymText_75a38: TX_FAR _CinnabarGymText_75a38 db "@" -CinnabarGymText_75a3d: ; 75a3d (1d:5a3d) +CinnabarGymText_75a3d: TX_FAR _CinnabarGymText_75a3d db "@" -CinnabarGymText7: ; 75a42 (1d:5a42) - db $08 ; asm +CinnabarGymText7: + TX_ASM call CinnabarGymScript_757a0 - ld a, [wd79a] - bit 7, a - jr nz, .asm_2f755 ; 0x75a4b + CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_5 + 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 -CinnabarGymText_75a68: ; 75a68 (1d:5a68) +CinnabarGymText_75a68: TX_FAR _CinnabarGymText_75a68 db "@" -CinnabarGymText_75a6d: ; 75a6d (1d:5a6d) +CinnabarGymText_75a6d: TX_FAR _CinnabarGymText_75a6d db "@" -CinnabarGymText_75a72: ; 75a72 (1d:5a72) +CinnabarGymText_75a72: TX_FAR _CinnabarGymText_75a72 db "@" -CinnabarGymText8: ; 75a77 (1d:5a77) - db $08 ; asm +CinnabarGymText8: + TX_ASM call CinnabarGymScript_757a0 - ld a, [wd79b] - bit 0, a - jr nz, .asm_d87be ; 0x75a80 + CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_6 + 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 -CinnabarGymText_75a9d: ; 75a9d (1d:5a9d) +CinnabarGymText_75a9d: TX_FAR _CinnabarGymText_75a9d db "@" -CinnabarGymText_75aa2: ; 75aa2 (1d:5aa2) +CinnabarGymText_75aa2: TX_FAR _CinnabarGymText_75aa2 db "@" -CinnabarGymText_75aa7: ; 75aa7 (1d:5aa7) +CinnabarGymText_75aa7: TX_FAR _CinnabarGymText_75aa7 db "@" -CinnabarGymText9: ; 75aac (1d:5aac) - db $08 ; asm - ld a, [wd79a] - bit 1, a - jr nz, .asm_627d9 ; 0x75ab2 +CinnabarGymText9: + TX_ASM + CheckEvent EVENT_BEAT_BLAINE + 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 -CinnabarGymText_75ac2: ; 75ac2 (1d:5ac2) +CinnabarGymText_75ac2: TX_FAR _CinnabarGymText_75ac2 db "@" -CinnabarGymText_75ac7: ; 75ac7 (1d:5ac7) +CinnabarGymText_75ac7: TX_FAR _CinnabarGymText_75ac7 db "@" diff --git a/scripts/cinnabarisland.asm b/scripts/cinnabarisland.asm index 33a497c4..8549042f 100755 --- a/scripts/cinnabarisland.asm +++ b/scripts/cinnabarisland.asm @@ -1,33 +1,31 @@ -CinnabarIslandScript: ; 1ca19 (7:4a19) +CinnabarIslandScript: call EnableAutoTextBoxDrawing - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] - ld hl, wd796 - res 0, [hl] - ld hl, wd7a3 - res 1, [hl] + ResetEvent EVENT_MANSION_SWITCH_ON + ResetEvent EVENT_LAB_STILL_REVIVING_FOSSIL ld hl, CinnabarIslandScriptPointers - ld a, [W_CINNABARISLANDCURSCRIPT] + ld a, [wCinnabarIslandCurScript] jp CallFunctionInTable -CinnabarIslandScriptPointers: ; 1ca34 (7:4a34) +CinnabarIslandScriptPointers: dw CinnabarIslandScript0 dw CinnabarIslandScript1 -CinnabarIslandScript0: ; 1ca38 (7:4a38) +CinnabarIslandScript0: ld b, SECRET_KEY call IsItemInBag ret nz - ld a, [W_YCOORD] + ld a, [wYCoord] cp $4 ret nz - ld a, [W_XCOORD] + ld a, [wXCoord] cp $12 ret nz + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a ld a, $8 - ld [wd528], a - ld a, $8 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [hJoyHeld], a @@ -40,19 +38,19 @@ CinnabarIslandScript0: ; 1ca38 (7:4a38) ld [wSpriteStateData1 + 9], a ld [wJoyIgnore], a ld a, $1 - ld [W_CINNABARISLANDCURSCRIPT], a + ld [wCinnabarIslandCurScript], a ret -CinnabarIslandScript1: ; 1ca73 (7:4a73) +CinnabarIslandScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 ld a, $0 - ld [W_CINNABARISLANDCURSCRIPT], a + ld [wCinnabarIslandCurScript], a ret -CinnabarIslandTextPointers: ; 1ca81 (7:4a81) +CinnabarIslandTextPointers: dw CinnabarIslandText1 dw CinnabarIslandText2 dw CinnabarIslandText3 @@ -62,26 +60,26 @@ CinnabarIslandTextPointers: ; 1ca81 (7:4a81) dw CinnabarIslandText7 dw CinnabarIslandText8 -CinnabarIslandText8: ; 1ca91 (7:4a91) +CinnabarIslandText8: TX_FAR _CinnabarIslandText8 db "@" -CinnabarIslandText1: ; 1ca96 (7:4a96) +CinnabarIslandText1: TX_FAR _CinnabarIslandText1 db "@" -CinnabarIslandText2: ; 1ca9b (7:4a9b) +CinnabarIslandText2: TX_FAR _CinnabarIslandText2 db "@" -CinnabarIslandText3: ; 1caa0 (7:4aa0) +CinnabarIslandText3: TX_FAR _CinnabarIslandText3 db "@" -CinnabarIslandText6: ; 1caa5 (7:4aa5) +CinnabarIslandText6: TX_FAR _CinnabarIslandText6 db "@" -CinnabarIslandText7: ; 1caaa (7:4aaa) +CinnabarIslandText7: TX_FAR _CinnabarIslandText7 db "@" diff --git a/scripts/cinnabarmart.asm b/scripts/cinnabarmart.asm index 2abd7b67..55b82cf0 100755 --- a/scripts/cinnabarmart.asm +++ b/scripts/cinnabarmart.asm @@ -1,15 +1,15 @@ -CinnabarMartScript: ; 75e7e (1d:5e7e) +CinnabarMartScript: jp EnableAutoTextBoxDrawing -CinnabarMartTextPointers: ; 75e81 (1d:5e81) - dw CinnabarMartText1 +CinnabarMartTextPointers: + dw CinnabarCashierText dw CinnabarMartText2 dw CinnabarMartText3 -CinnabarMartText2: ; 75e87 (1d:5e87) +CinnabarMartText2: TX_FAR _CinnabarMartText2 db "@" -CinnabarMartText3: ; 75e8c (1d:5e8c) +CinnabarMartText3: TX_FAR _CinnabarMartText3 db "@" diff --git a/scripts/cinnabarpokecenter.asm b/scripts/cinnabarpokecenter.asm index abae9d8d..2f6d5791 100755 --- a/scripts/cinnabarpokecenter.asm +++ b/scripts/cinnabarpokecenter.asm @@ -1,23 +1,23 @@ -CinnabarPokecenterScript: ; 75e2c (1d:5e2c) +CinnabarPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -CinnabarPokecenterTextPointers: ; 75e32 (1d:5e32) - dw CinnabarPokecenterText1 +CinnabarPokecenterTextPointers: + dw CinnabarHealNurseText dw CinnabarPokecenterText2 dw CinnabarPokecenterText3 - dw CinnabarPokecenterText4 + dw CinnabarTradeNurseText -CinnabarPokecenterText1: ; 75e3a (1d:5e3a) - db $ff +CinnabarHealNurseText: + TX_POKECENTER_NURSE -CinnabarPokecenterText2: ; 75e3b (1d:5e3b) - TX_FAR _CinnabarPokecenterText1 +CinnabarPokecenterText2: + TX_FAR _CinnabarPokecenterText2 db "@" -CinnabarPokecenterText3: ; 75e40 (1d:5e40) +CinnabarPokecenterText3: TX_FAR _CinnabarPokecenterText3 db "@" -CinnabarPokecenterText4: ; 75e45 (1d:5e45) - db $f6 +CinnabarTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST diff --git a/scripts/colosseum.asm b/scripts/colosseum.asm new file mode 100755 index 00000000..bdfa3c44 --- /dev/null +++ b/scripts/colosseum.asm @@ -0,0 +1,9 @@ +ColosseumScript: + jp TradeCenterScript + +ColosseumTextPointers: + dw ColosseumText1 + +ColosseumText1: + TX_FAR _ColosseumText1 + db "@" diff --git a/scripts/copycatshouse1f.asm b/scripts/copycatshouse1f.asm index 230a3ca3..25cd0fc2 100755 --- a/scripts/copycatshouse1f.asm +++ b/scripts/copycatshouse1f.asm @@ -1,22 +1,22 @@ -CopycatsHouse1FScript: ; 75ec3 (1d:5ec3) +CopycatsHouse1FScript: jp EnableAutoTextBoxDrawing -CopycatsHouse1FTextPointers: ; 75ec6 (1d:5ec6) +CopycatsHouse1FTextPointers: dw CopycatsHouse1FText1 dw CopycatsHouse1FText2 dw CopycatsHouse1FText3 -CopycatsHouse1FText1: ; 75ecc (1d:5ecc) +CopycatsHouse1FText1: TX_FAR _CopycatsHouse1FText1 db "@" -CopycatsHouse1FText2: ; 75ed1 (1d:5ed1) +CopycatsHouse1FText2: TX_FAR _CopycatsHouse1FText2 db "@" -CopycatsHouse1FText3: ; 75ed6 (1d:5ed6) +CopycatsHouse1FText3: 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..87946b8f 100755 --- a/scripts/copycatshouse2f.asm +++ b/scripts/copycatshouse2f.asm @@ -1,7 +1,7 @@ -CopycatsHouse2FScript: ; 5cc71 (17:4c71) +CopycatsHouse2FScript: jp EnableAutoTextBoxDrawing -CopycatsHouse2FTextPointers: ; 5cc74 (17:4c74) +CopycatsHouse2FTextPointers: dw CopycatsHouse2FText1 dw CopycatsHouse2FText2 dw CopycatsHouse2FText3 @@ -10,93 +10,93 @@ CopycatsHouse2FTextPointers: ; 5cc74 (17:4c74) dw CopycatsHouse2FText6 dw CopycatsHouse2FText7 -CopycatsHouse2FText1: ; 5cc82 (17:4c82) - db $08 ; asm - ld a, [wd7af] - bit 0, a - jr nz, .asm_7ccf3 ; 0x5cc88 +CopycatsHouse2FText1: + TX_ASM + CheckEvent EVENT_GOT_TM31 + 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 + lb bc, TM_31, 1 call GiveItem jr nc, .BagFull 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 + SetEvent EVENT_GOT_TM31 + 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) +CopycatsHouse2FText_5ccd4: TX_FAR _CopycatsHouse2FText_5ccd4 db "@" -TM31PreReceiveText: ; 5ccd9 (17:4cd9) +TM31PreReceiveText: TX_FAR _TM31PreReceiveText db "@" -ReceivedTM31Text: ; 5ccde (17:4cde) +ReceivedTM31Text: TX_FAR _ReceivedTM31Text - db $0B -TM31ExplanationText1: ; 5cce3 (17:4ce3) + TX_SFX_ITEM_1 +TM31ExplanationText1: TX_FAR _TM31ExplanationText1 - db $d, "@" + TX_WAIT + db "@" -TM31ExplanationText2: ; 5cce9 (17:4ce9) +TM31ExplanationText2: TX_FAR _TM31ExplanationText2 db "@" -TM31NoRoomText: ; 5ccee (17:4cee) +TM31NoRoomText: TX_FAR _TM31NoRoomText - db $d, "@" + TX_WAIT + db "@" -CopycatsHouse2FText2: ; 5ccf4 (17:4cf4) +CopycatsHouse2FText2: TX_FAR _CopycatsHouse2FText2 db "@" -CopycatsHouse2FText5: ; 5ccf9 (17:4cf9) -CopycatsHouse2FText4: ; 5ccf9 (17:4cf9) -CopycatsHouse2FText3: ; 5ccf9 (17:4cf9) +CopycatsHouse2FText5: +CopycatsHouse2FText4: +CopycatsHouse2FText3: TX_FAR _CopycatsHouse2FText3 db "@" -CopycatsHouse2FText6: ; 5ccfe (17:4cfe) +CopycatsHouse2FText6: TX_FAR _CopycatsHouse2FText6 db "@" -CopycatsHouse2FText7: ; 5cd03 (17:4d03) - db $08 ; asm +CopycatsHouse2FText7: + 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 -CopycatsHouse2FText_5cd17: ; 5cd17 (17:4d17) +CopycatsHouse2FText_5cd17: TX_FAR _CopycatsHouse2FText_5cd17 db "@" -CopycatsHouse2FText_5cd1c: ; 5cd1c (17:4d1c) +CopycatsHouse2FText_5cd1c: TX_FAR _CopycatsHouse2FText_5cd1c db "@" diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm index 1830d2c0..60daa3d5 100755 --- a/scripts/daycarem.asm +++ b/scripts/daycarem.asm @@ -1,31 +1,31 @@ -DayCareMScript: ; 5624f (15:624f) +DayCareMScript: jp EnableAutoTextBoxDrawing -DayCareMTextPointers: ; 56252 (15:6252) +DayCareMTextPointers: dw DayCareMText1 -DayCareMText1: ; 56254 (15:6254) - db $8 +DayCareMText1: + TX_ASM call SaveScreenTilesToBuffer2 - ld a, [W_DAYCARE_IN_USE] + ld a, [wDayCareInUse] and a - jp nz, DayCareMScript_562e1 - ld hl, DayCareMText_5640f + jp nz, .daycareInUse + ld hl, DayCareIntroText call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - ld hl, DayCareMText_5643b - jp nz, DayCareMScript_56409 + ld hl, DayCareComeAgainText + jp nz, .done ld a, [wPartyCount] dec a - ld hl, DayCareMText_56445 - jp z, DayCareMScript_56409 - ld hl, DayCareMText_56414 + ld hl, DayCareOnlyHaveOneMonText + jp z, .done + ld hl, DayCareWhichMonText call PrintText xor a ld [wUpdateSpritesEnabled], a - ld [wd07d], a + ld [wPartyMenuTypeOrMessageID], a ld [wMenuItemToSwap], a call DisplayPartyMenu push af @@ -33,90 +33,91 @@ DayCareMText1: ; 56254 (15:6254) call RestoreScreenTilesAndReloadTilePatterns call LoadGBPal pop af - ld hl, DayCareMText_56437 - jp c, DayCareMScript_56409 - callab Func_2171b - ld hl, DayCareMText_5644a - jp c, DayCareMScript_56409 + ld hl, DayCareAllRightThenText + jp c, .done + callab KnowsHMMove + ld hl, DayCareCantAcceptMonWithHMText + jp c, .done xor a - ld [wcc2b], a + ld [wPartyAndBillsPCSavedMenuItem], a ld a, [wWhichPokemon] ld hl, wPartyMonNicks call GetPartyMonName - ld hl, DayCareMText_56419 + ld hl, DayCareWillLookAfterMonText call PrintText - ld a, $1 - ld [W_DAYCARE_IN_USE], a - ld a, $3 - ld [wcf95], a - call Func_3a68 + ld a, 1 + ld [wDayCareInUse], a + ld a, PARTY_TO_DAYCARE + ld [wMoveMonType], a + call MoveMon xor a - ld [wcf95], a + ld [wRemoveMonFromBox], a call RemovePokemon ld a, [wcf91] call PlayCry - ld hl, DayCareMText_5641e - jp DayCareMScript_56409 + ld hl, DayCareComeSeeMeInAWhileText + jp .done -DayCareMScript_562e1: ; 562e1 (15:62e1) +.daycareInUse xor a - ld hl, W_DAYCAREMONNAME + ld hl, wDayCareMonName call GetPartyMonName - ld a, $3 - ld [wcc49], a + ld a, DAYCARE_DATA + ld [wMonDataLocation], a call LoadMonData callab CalcLevelFromExperience ld a, d cp MAX_LEVEL - jr c, .asm_56315 + jr c, .skipCalcExp + ld d, MAX_LEVEL callab CalcExperience ld hl, wDayCareMonExp - ld a, [H_NUMTOPRINT] + ld a, [hExperience] ld [hli], a - ld a, [$ff97] + ld a, [hExperience + 1] ld [hli], a - ld a, [$ff98] + ld a, [hExperience + 2] ld [hl], a ld d, MAX_LEVEL -.asm_56315 +.skipCalcExp xor a - ld [wTrainerEngageDistance], a + ld [wDayCareNumLevelsGrown], a ld hl, wDayCareMonBoxLevel ld a, [hl] - ld [wTrainerSpriteOffset], a + ld [wDayCareStartLevel], a cp d ld [hl], d - ld hl, DayCareMText_56432 - jr z, .asm_56333 - ld a, [wTrainerSpriteOffset] + ld hl, DayCareMonNeedsMoreTimeText + jr z, .next + ld a, [wDayCareStartLevel] ld b, a ld a, d sub b - ld [wTrainerEngageDistance], a - ld hl, DayCareMText_56423 + ld [wDayCareNumLevelsGrown], a + ld hl, DayCareMonHasGrownText -.asm_56333 +.next call PrintText ld a, [wPartyCount] cp PARTY_LENGTH - ld hl, DayCareMText_56440 - jp z, .asm_56403 - ld de, wTrainerFacingDirection + ld hl, DayCareNoRoomForMonText + jp z, .leaveMonInDayCare + ld de, wDayCareTotalCost xor a ld [de], a inc de ld [de], a - ld hl, wTrainerScreenX + ld hl, wDayCarePerLevelCost ld a, $1 ld [hli], a ld [hl], $0 - ld a, [wTrainerEngageDistance] + ld a, [wDayCareNumLevelsGrown] inc a ld b, a - ld c, $2 -.asm_56357 + ld c, 2 +.calcPriceLoop push hl push de push bc @@ -125,141 +126,144 @@ DayCareMScript_562e1: ; 562e1 (15:62e1) pop de pop hl dec b - jr nz, .asm_56357 - ld hl, DayCareMText_56428 + jr nz, .calcPriceLoop + ld hl, DayCareOweMoneyText call PrintText - ld a, $13 + ld a, MONEY_BOX ld [wTextBoxID], a call DisplayTextBoxID call YesNoChoice - ld hl, DayCareMText_56437 + ld hl, DayCareAllRightThenText ld a, [wCurrentMenuItem] and a - jp nz, .asm_56403 - ld hl, wTrainerFacingDirection - ld [$ff9f], a + jp nz, .leaveMonInDayCare + ld hl, wDayCareTotalCost + ld [hMoney], a ld a, [hli] - ld [$ffa0], a + ld [hMoney + 1], a ld a, [hl] - ld [$ffa1], a + ld [hMoney + 2], a call HasEnoughMoney - jr nc, .asm_56396 - ld hl, DayCareMText_56454 - jp .asm_56403 + jr nc, .enoughMoney + ld hl, DayCareNotEnoughMoneyText + jp .leaveMonInDayCare -.asm_56396 +.enoughMoney xor a - ld [W_DAYCARE_IN_USE], a - ld hl, wTrainerEngageDistance + ld [wDayCareInUse], a + ld hl, wDayCareNumLevelsGrown ld [hli], a inc hl ld de, wPlayerMoney + 2 ld c, $3 predef SubBCDPredef - ld a, (SFX_02_5a - SFX_Headers_02) / 3 + ld a, SFX_PURCHASE call PlaySoundWaitForCurrent - ld a, $13 + ld a, MONEY_BOX ld [wTextBoxID], a call DisplayTextBoxID - ld hl, DayCareMText_5644f + ld hl, DayCareHeresYourMonText call PrintText - ld a, $2 - ld [wcf95], a - call Func_3a68 + ld a, DAYCARE_TO_PARTY + ld [wMoveMonType], a + call MoveMon ld a, [wDayCareMonSpecies] ld [wcf91], a ld a, [wPartyCount] dec a push af - ld bc, $002c + ld bc, wPartyMon2 - wPartyMon1 push bc ld hl, wPartyMon1Moves call AddNTimes ld d, h ld e, l - ld a, $1 - ld [wHPBarMaxHP], a + ld a, 1 + ld [wLearningMovesFromDayCare], a predef WriteMonMoves pop bc pop af + +; set mon's HP to max ld hl, wPartyMon1HP call AddNTimes ld d, h ld e, l - ld bc, $0021 + ld bc, wPartyMon1MaxHP - wPartyMon1HP add hl, bc ld a, [hli] ld [de], a inc de ld a, [hl] ld [de], a + ld a, [wcf91] call PlayCry - ld hl, DayCareMText_5642d - jr DayCareMScript_56409 + ld hl, DayCareGotMonBackText + jr .done -.asm_56403 - ld a, [wTrainerSpriteOffset] +.leaveMonInDayCare + ld a, [wDayCareStartLevel] ld [wDayCareMonBoxLevel], a -DayCareMScript_56409: ; 56409 (15:6409) +.done call PrintText jp TextScriptEnd -DayCareMText_5640f: ; 5640f (15:640f) - TX_FAR _DayCareMText_5640f +DayCareIntroText: + TX_FAR _DayCareIntroText db "@" -DayCareMText_56414: ; 56414 (15:6414) - TX_FAR _DayCareMText_56414 +DayCareWhichMonText: + TX_FAR _DayCareWhichMonText db "@" -DayCareMText_56419: ; 56419 (15:6419) - TX_FAR _DayCareMText_56419 +DayCareWillLookAfterMonText: + TX_FAR _DayCareWillLookAfterMonText db "@" -DayCareMText_5641e: ; 5641e (15:641e) - TX_FAR _DayCareMText_5641e +DayCareComeSeeMeInAWhileText: + TX_FAR _DayCareComeSeeMeInAWhileText db "@" -DayCareMText_56423: ; 56423 (15:6423) - TX_FAR _DayCareMText_56423 +DayCareMonHasGrownText: + TX_FAR _DayCareMonHasGrownText db "@" -DayCareMText_56428: ; 56428 (15:6428) - TX_FAR _DayCareMText_56428 +DayCareOweMoneyText: + TX_FAR _DayCareOweMoneyText db "@" -DayCareMText_5642d: ; 5642d (15:642d) - TX_FAR _DayCareMText_5642d +DayCareGotMonBackText: + TX_FAR _DayCareGotMonBackText db "@" -DayCareMText_56432: ; 56432 (15:6432) - TX_FAR _DayCareMText_56432 +DayCareMonNeedsMoreTimeText: + TX_FAR _DayCareMonNeedsMoreTimeText db "@" -DayCareMText_56437: ; 56437 (15:6437) - TX_FAR _DayCareMText_56437 ; 0x8c000 -DayCareMText_5643b: ; 5643b (15:643b) - TX_FAR _DayCareMText_5643b ; 0x8c013 +DayCareAllRightThenText: + TX_FAR _DayCareAllRightThenText +DayCareComeAgainText: + TX_FAR _DayCareComeAgainText db "@" -DayCareMText_56440: ; 56440 (15:6440) - TX_FAR _DayCareMText_56440 +DayCareNoRoomForMonText: + TX_FAR _DayCareNoRoomForMonText db "@" -DayCareMText_56445: ; 56445 (15:6445) - TX_FAR _DayCareMText_56445 +DayCareOnlyHaveOneMonText: + TX_FAR _DayCareOnlyHaveOneMonText db "@" -DayCareMText_5644a: ; 5644a (15:644a) - TX_FAR _DayCareMText_5644a +DayCareCantAcceptMonWithHMText: + TX_FAR _DayCareCantAcceptMonWithHMText db "@" -DayCareMText_5644f: ; 5644f (15:644f) - TX_FAR _DayCareMText_5644f +DayCareHeresYourMonText: + TX_FAR _DayCareHeresYourMonText db "@" -DayCareMText_56454: ; 56454 (15:6454) - TX_FAR _DayCareMText_56454 +DayCareNotEnoughMoneyText: + TX_FAR _DayCareNotEnoughMoneyText db "@" diff --git a/scripts/diglettscave.asm b/scripts/diglettscave.asm index efbf9713..593b12a6 100755 --- a/scripts/diglettscave.asm +++ b/scripts/diglettscave.asm @@ -1,5 +1,5 @@ -DiglettsCaveScript: ; 61f6e (18:5f6e) +DiglettsCaveScript: jp EnableAutoTextBoxDrawing -DiglettsCaveTextPointers: ; 61f71 (18:5f71) +DiglettsCaveTextPointers: db "@" diff --git a/scripts/diglettscaveroute11.asm b/scripts/diglettscaveroute11.asm index 43e3f24e..d97a8446 100755 --- a/scripts/diglettscaveroute11.asm +++ b/scripts/diglettscaveroute11.asm @@ -1,12 +1,12 @@ -DiglettsCaveEntranceRoute11Script: ; 1e5ba (7:65ba) +DiglettsCaveEntranceRoute11Script: call EnableAutoTextBoxDrawing ld a, ROUTE_11 ld [wLastMap], a ret -DiglettsCaveEntranceRoute11TextPointers: ; 1e5c3 (7:65c3) +DiglettsCaveEntranceRoute11TextPointers: dw DiglettsCaveEntranceRoute11Text1 -DiglettsCaveEntranceRoute11Text1: ; 1e5c5 (7:65c5) +DiglettsCaveEntranceRoute11Text1: TX_FAR _DiglettsCaveEntRoute11Text1 db "@" diff --git a/scripts/diglettscaveroute2.asm b/scripts/diglettscaveroute2.asm index 1bee2a1c..9f061daa 100755 --- a/scripts/diglettscaveroute2.asm +++ b/scripts/diglettscaveroute2.asm @@ -1,11 +1,11 @@ -DiglettsCaveRoute2Script: ; 1deb0 (7:5eb0) +DiglettsCaveRoute2Script: ld a, ROUTE_2 ld [wLastMap], a jp EnableAutoTextBoxDrawing -DiglettsCaveRoute2TextPointers: ; 1deb8 (7:5eb8) +DiglettsCaveRoute2TextPointers: dw DiglettsCaveRoute2Text1 -DiglettsCaveRoute2Text1: ; 1deba (7:5eba) +DiglettsCaveRoute2Text1: TX_FAR _DiglettsCaveRoute2Text1 db "@" diff --git a/scripts/fanclub.asm b/scripts/fanclub.asm index f9a839fa..b6d65586 100755 --- a/scripts/fanclub.asm +++ b/scripts/fanclub.asm @@ -1,10 +1,9 @@ -FanClubScript: ; 59b70 (16:5b70) +FanClubScript: jp EnableAutoTextBoxDrawing FanClubBikeInBag: ; check if any bike paraphernalia in bag - ld a, [wd771] - bit 1, a ; got bike voucher? + CheckEvent EVENT_GOT_BIKE_VOUCHER ret nz ld b, BICYCLE call IsItemInBag @@ -12,7 +11,7 @@ FanClubBikeInBag: ld b, BIKE_VOUCHER jp IsItemInBag -FanClubTextPointers: ; 59b84 (16:5b84) +FanClubTextPointers: dw FanClubText1 dw FanClubText2 dw FanClubText3 @@ -24,20 +23,17 @@ FanClubTextPointers: ; 59b84 (16:5b84) FanClubText1: ; pikachu fan - db $08 ; asm - ld a, [wd771] - bit 7, a + TX_ASM + CheckEvent EVENT_PIKACHU_FAN_BOAST jr nz, .mineisbetter ld hl, .normaltext call PrintText - ld hl, wd771 - set 6, [hl] + SetEvent EVENT_SEEL_FAN_BOAST jr .done .mineisbetter ld hl, .bettertext call PrintText - ld hl, wd771 - res 7, [hl] + ResetEvent EVENT_PIKACHU_FAN_BOAST .done jp TextScriptEnd @@ -51,20 +47,17 @@ FanClubText1: FanClubText2: ; seel fan - db $08 ; asm - ld a, [wd771] - bit 6, a + TX_ASM + CheckEvent EVENT_SEEL_FAN_BOAST jr nz, .mineisbetter ld hl, .normaltext call PrintText - ld hl, wd771 - set 7, [hl] + SetEvent EVENT_PIKACHU_FAN_BOAST jr .done .mineisbetter ld hl, .bettertext call PrintText - ld hl, wd771 - res 6, [hl] + ResetEvent EVENT_SEEL_FAN_BOAST .done jp TextScriptEnd @@ -78,7 +71,7 @@ FanClubText2: FanClubText3: ; pikachu - db $8 + TX_ASM ld hl, .text call PrintText ld a, PIKACHU @@ -92,7 +85,7 @@ FanClubText3: FanClubText4: ; seel - db $08 ; asm + TX_ASM ld hl, .text call PrintText ld a, SEEL @@ -106,7 +99,7 @@ FanClubText4: FanClubText5: ; chair - db $08 ; asm + TX_ASM call FanClubBikeInBag jr nz, .nothingleft @@ -120,13 +113,12 @@ FanClubText5: ; tell the story ld hl, .storytext call PrintText - ld bc, (BIKE_VOUCHER << 8) | 1 + lb bc, BIKE_VOUCHER, 1 call GiveItem jr nc, .BagFull ld hl, .receivedvouchertext call PrintText - ld hl, wd771 - set 1, [hl] + SetEvent EVENT_GOT_BIKE_VOUCHER jr .done .BagFull ld hl, .bagfulltext @@ -152,7 +144,7 @@ FanClubText5: .receivedvouchertext TX_FAR ReceivedBikeVoucherText - db $11 + TX_SFX_KEY_ITEM TX_FAR ExplainBikeVoucherText db "@" @@ -168,14 +160,14 @@ FanClubText5: TX_FAR FanClubBagFullText db "@" -FanClubText6: ; 59c88 (16:5c88) +FanClubText6: TX_FAR _FanClubText6 db "@" -FanClubText7: ; 59c8d (16:5c8d) +FanClubText7: TX_FAR _FanClubText7 db "@" -FanClubText8: ; 59c92 (16:5c92) +FanClubText8: TX_FAR _FanClubText8 db "@" diff --git a/scripts/fightingdojo.asm b/scripts/fightingdojo.asm index e26da1b1..fa0cdca2 100755 --- a/scripts/fightingdojo.asm +++ b/scripts/fightingdojo.asm @@ -1,90 +1,86 @@ -FightingDojoScript: ; 5cd5d (17:4d5d) +FightingDojoScript: call EnableAutoTextBoxDrawing - ld hl, FightingDojoTrainerHeaders + ld hl, FightingDojoTrainerHeader0 ld de, FightingDojoScriptPointers - ld a, [W_FIGHTINGDOJOCURSCRIPT] + ld a, [wFightingDojoCurScript] call ExecuteCurMapScriptInTable - ld [W_FIGHTINGDOJOCURSCRIPT], a + ld [wFightingDojoCurScript], a ret -FightingDojoScript_5cd70: ; 5cd70 (17:4d70) +FightingDojoScript_5cd70: xor a ld [wJoyIgnore], a - ld [W_FIGHTINGDOJOCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wFightingDojoCurScript], a + ld [wCurMapScript], a ret -FightingDojoScriptPointers: ; 5cd7b (17:4d7b) +FightingDojoScriptPointers: dw FightingDojoScript1 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw FightingDojoScript3 -FightingDojoScript1: ; 5cd83 (17:4d83) - ld a, [wd7b1] - bit 0, a +FightingDojoScript1: + CheckEvent EVENT_DEFEATED_FIGHTING_DOJO ret nz call CheckFightingMapTrainers ld a, [wTrainerHeaderFlagBit] and a ret nz - ld a, [wd7b1] - bit 1, a + CheckEvent EVENT_BEAT_KARATE_MASTER ret nz xor a ld [hJoyHeld], a ld [wcf0d], a - ld a, [W_YCOORD] + ld a, [wYCoord] cp $3 ret nz - ld a, [W_XCOORD] + ld a, [wXCoord] cp $4 ret nz ld a, $1 ld [wcf0d], a + ld a, PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a ld a, $1 - ld [wd528], a - ld a, $1 - ld [$ff8c], a - ld a, $8 - ld [$ff8d], a + ld [H_SPRITEINDEX], a + ld a, SPRITE_FACING_LEFT + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ret -FightingDojoScript3: ; 5cdc6 (17:4dc6) - ld a, [W_ISINBATTLE] +FightingDojoScript3: + ld a, [wIsInBattle] cp $ff jp z, FightingDojoScript_5cd70 ld a, [wcf0d] and a jr z, .asm_5cde4 + ld a, PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a ld a, $1 - ld [wd528], a - ld a, $1 - ld [$ff8c], a - ld a, $8 - ld [$ff8d], a + ld [H_SPRITEINDEX], a + ld a, SPRITE_FACING_LEFT + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay .asm_5cde4 ld a, $f0 ld [wJoyIgnore], a - ld a, [wd7b1] - or $3e - ld [wd7b1], a + SetEventRange EVENT_BEAT_KARATE_MASTER, EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 ld a, $8 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a - ld [W_FIGHTINGDOJOCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wFightingDojoCurScript], a + ld [wCurMapScript], a ret -FightingDojoTextPointers: ; 5ce03 (17:4e03) +FightingDojoTextPointers: dw FightingDojoText1 dw FightingDojoText2 dw FightingDojoText3 @@ -94,51 +90,49 @@ FightingDojoTextPointers: ; 5ce03 (17:4e03) dw FightingDojoText7 dw FightingDojoText8 -FightingDojoTrainerHeaders: ; 5ce13 (17:4e13) -FightingDojoTrainerHeader0: ; 5ce13 (17:4e13) - db $2 ; flag's bit +FightingDojoTrainerHeader0: + dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_0 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 - -FightingDojoTrainerHeader1: ; 5ce1f (17:4e1f) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_0 + dw FightingDojoBattleText1 ; TextBeforeBattle + dw FightingDojoAfterBattleText1 ; TextAfterBattle + dw FightingDojoEndBattleText1 ; TextEndBattle + dw FightingDojoEndBattleText1 ; TextEndBattle + +FightingDojoTrainerHeader1: + dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_1 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 - -FightingDojoTrainerHeader2: ; 5ce2b (17:4e2b) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_1 + dw FightingDojoBattleText2 ; TextBeforeBattle + dw FightingDojoAfterBattleText2 ; TextAfterBattle + dw FightingDojoEndBattleText2 ; TextEndBattle + dw FightingDojoEndBattleText2 ; TextEndBattle + +FightingDojoTrainerHeader2: + dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_2 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 - -FightingDojoTrainerHeader3: ; 5ce37 (17:4e37) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_2 + dw FightingDojoBattleText3 ; TextBeforeBattle + dw FightingDojoAfterBattleText3 ; TextAfterBattle + dw FightingDojoEndBattleText3 ; TextEndBattle + dw FightingDojoEndBattleText3 ; TextEndBattle + +FightingDojoTrainerHeader3: + dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 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 + dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 + dw FightingDojoBattleText4 ; TextBeforeBattle + dw FightingDojoAfterBattleText4 ; TextAfterBattle + dw FightingDojoEndBattleText4 ; TextEndBattle + dw FightingDojoEndBattleText4 ; TextEndBattle db $ff -FightingDojoText1: ; 5ce44 (17:4e44) - db $08 ; asm - ld a, [wd7b1] - bit 0, a +FightingDojoText1: + TX_ASM + CheckEvent EVENT_DEFEATED_FIGHTING_DOJO jp nz, .continue1 - bit 1, a + CheckEventReuseA EVENT_BEAT_KARATE_MASTER jp nz, .continue2 ld hl, FightingDojoText_5ce8e call PrintText @@ -148,117 +142,116 @@ FightingDojoText1: ; 5ce44 (17:4e44) ld hl, FightingDojoText_5ce93 ld de, FightingDojoText_5ce93 call SaveEndBattleTextPointers - ldh a, [$8c] + ld a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $3 - ld [W_FIGHTINGDOJOCURSCRIPT], a - ld [W_CURMAPSCRIPT], a - jr .asm_9dba4 ; 0x5ce7b -.continue1 ; 0x5ce7d + ld [wFightingDojoCurScript], a + ld [wCurMapScript], a + 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) +FightingDojoText_5ce8e: TX_FAR _FightingDojoText_5ce8e db "@" -FightingDojoText_5ce93: ; 5ce93 (17:4e93) +FightingDojoText_5ce93: TX_FAR _FightingDojoText_5ce93 db "@" -FightingDojoText8: ; 5ce98 (17:4e98) +FightingDojoText8: TX_FAR _FightingDojoText_5ce98 db "@" -FightingDojoText_5ce9d: ; 5ce9d (17:4e9d) +FightingDojoText_5ce9d: TX_FAR _FightingDojoText_5ce9d db "@" -FightingDojoText2: ; 5cea2 (17:4ea2) - db $08 ; asm +FightingDojoText2: + TX_ASM ld hl, FightingDojoTrainerHeader0 call TalkToTrainer jp TextScriptEnd -FightingDojoBattleText1: ; 5ceac (17:4eac) +FightingDojoBattleText1: TX_FAR _FightingDojoBattleText1 db "@" -FightingDojoEndBattleText1: ; 5ceb1 (17:4eb1) +FightingDojoEndBattleText1: TX_FAR _FightingDojoEndBattleText1 db "@" -FightingDojoAfterBattleText1: ; 5ceb6 (17:4eb6) +FightingDojoAfterBattleText1: TX_FAR _FightingDojoAfterBattleText1 db "@" -FightingDojoText3: ; 5cebb (17:4ebb) - db $08 ; asm +FightingDojoText3: + TX_ASM ld hl, FightingDojoTrainerHeader1 call TalkToTrainer jp TextScriptEnd -FightingDojoBattleText2: ; 5cec5 (17:4ec5) +FightingDojoBattleText2: TX_FAR _FightingDojoBattleText2 db "@" -FightingDojoEndBattleText2: ; 5ceca (17:4eca) +FightingDojoEndBattleText2: TX_FAR _FightingDojoEndBattleText2 db "@" -FightingDojoAfterBattleText2: ; 5cecf (17:4ecf) +FightingDojoAfterBattleText2: TX_FAR _FightingDojoAfterBattleText2 db "@" -FightingDojoText4: ; 5ced4 (17:4ed4) - db $08 ; asm +FightingDojoText4: + TX_ASM ld hl, FightingDojoTrainerHeader2 call TalkToTrainer jp TextScriptEnd -FightingDojoBattleText3: ; 5cede (17:4ede) +FightingDojoBattleText3: TX_FAR _FightingDojoBattleText3 db "@" -FightingDojoEndBattleText3: ; 5cee3 (17:4ee3) +FightingDojoEndBattleText3: TX_FAR _FightingDojoEndBattleText3 db "@" -FightingDojoAfterBattleText3: ; 5cee8 (17:4ee8) +FightingDojoAfterBattleText3: TX_FAR _FightingDojoAfterBattleText3 db "@" -FightingDojoText5: ; 5ceed (17:4eed) - db $08 ; asm +FightingDojoText5: + TX_ASM ld hl, FightingDojoTrainerHeader3 call TalkToTrainer jp TextScriptEnd -FightingDojoBattleText4: ; 5cef7 (17:4ef7) +FightingDojoBattleText4: TX_FAR _FightingDojoBattleText4 db "@" -FightingDojoEndBattleText4: ; 5cefc (17:4efc) +FightingDojoEndBattleText4: TX_FAR _FightingDojoEndBattleText4 db "@" -FightingDojoAfterBattleText4: ; 5cf01 (17:4f01) +FightingDojoAfterBattleText4: TX_FAR _FightingDojoAfterBattleText4 db "@" -FightingDojoText6: ; 5cf06 (17:4f06) +FightingDojoText6: ; Hitmonlee Poké Ball - db $08 ; asm - ld a, [wd7b1] - and %11000000 + TX_ASM + CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN jr z, .GetMon ld hl, OtherHitmonText call PrintText @@ -280,23 +273,20 @@ FightingDojoText6: ; 5cf06 (17:4f06) ; once Poké Ball is taken, hide sprite ld a, HS_FIGHTING_DOJO_GIFT_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject - ld hl, wd7b1 - set 6, [hl] - set 0, [hl] + SetEvents EVENT_GOT_HITMONLEE, EVENT_DEFEATED_FIGHTING_DOJO .done jp TextScriptEnd -WantHitmonleeText: ; 5cf49 (17:4f49) +WantHitmonleeText: TX_FAR _WantHitmonleeText db "@" -FightingDojoText7: ; 5cf4e (17:4f4e) +FightingDojoText7: ; Hitmonchan Poké Ball - db $08 ; asm - ld a, [wd7b1] - and %11000000 + TX_ASM + CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN jr z, .GetMon ld hl, OtherHitmonText call PrintText @@ -315,21 +305,19 @@ FightingDojoText7: ; 5cf4e (17:4f4e) ld c,30 call GivePokemon jr nc, .done - ld hl, wd7b1 - set 7, [hl] - set 0, [hl] + SetEvents EVENT_GOT_HITMONCHAN, EVENT_DEFEATED_FIGHTING_DOJO ; once Poké Ball is taken, hide sprite ld a, HS_FIGHTING_DOJO_GIFT_2 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject .done jp TextScriptEnd -WantHitmonchanText: ; 5cf91 (17:4f91) +WantHitmonchanText: TX_FAR _WantHitmonchanText db "@" -OtherHitmonText: ; 5cf96 (17:4f96) +OtherHitmonText: TX_FAR _OtherHitmonText db "@" diff --git a/scripts/fuchsiacity.asm b/scripts/fuchsiacity.asm index 6b7e067b..74d7ee30 100755 --- a/scripts/fuchsiacity.asm +++ b/scripts/fuchsiacity.asm @@ -1,7 +1,7 @@ -FuchsiaCityScript: ; 19a2b (6:5a2b) +FuchsiaCityScript: jp EnableAutoTextBoxDrawing -FuchsiaCityTextPointers: ; 19a2e (6:5a2e) +FuchsiaCityTextPointers: dw FuchsiaCityText1 dw FuchsiaCityText2 dw FuchsiaCityText3 @@ -27,144 +27,143 @@ FuchsiaCityTextPointers: ; 19a2e (6:5a2e) dw FuchsiaCityText23 dw FuchsiaCityText24 -FuchsiaCityText1: ; 19a5e (6:5a5e) +FuchsiaCityText1: TX_FAR _FuchsiaCityText1 db "@" -FuchsiaCityText2: ; 19a63 (6:5a63) +FuchsiaCityText2: TX_FAR _FuchsiaCityText2 db "@" -FuchsiaCityText3: ; 19a68 (6:5a68) +FuchsiaCityText3: TX_FAR _FuchsiaCityText3 db "@" -FuchsiaCityText4: ; 19a6d (6:5a6d) +FuchsiaCityText4: TX_FAR _FuchsiaCityText4 db "@" -FuchsiaCityText5: ; 19a72 (6:5a72) -FuchsiaCityText6: ; 19a72 (6:5a72) -FuchsiaCityText7: ; 19a72 (6:5a72) -FuchsiaCityText8: ; 19a72 (6:5a72) -FuchsiaCityText9: ; 19a72 (6:5a72) -FuchsiaCityText10: ; 19a72 (6:5a72) +FuchsiaCityText5: +FuchsiaCityText6: +FuchsiaCityText7: +FuchsiaCityText8: +FuchsiaCityText9: +FuchsiaCityText10: TX_FAR _FuchsiaCityText5 db "@" -FuchsiaCityText12: ; 19a77 (6:5a77) -FuchsiaCityText11: ; 19a77 (6:5a77) +FuchsiaCityText12: +FuchsiaCityText11: TX_FAR _FuchsiaCityText11 db "@" -FuchsiaCityText13: ; 19a7c (6:5a7c) +FuchsiaCityText13: TX_FAR _FuchsiaCityText13 db "@" -FuchsiaCityText16: ; 19a81 (6:5a81) +FuchsiaCityText16: TX_FAR _FuchsiaCityText16 db "@" -FuchsiaCityText17: ; 19a86 (6:5a86) +FuchsiaCityText17: TX_FAR _FuchsiaCityText17 db "@" -FuchsiaCityText18: ; 19a8b (6:5a8b) +FuchsiaCityText18: TX_FAR _FuchsiaCityText18 db "@" -FuchsiaCityText19: ; 19a90 (6:5a90) - db $08 ; asm +FuchsiaCityText19: + TX_ASM ld hl, FuchsiaCityChanseyText call PrintText ld a, CHANSEY call DisplayPokedex jp TextScriptEnd -FuchsiaCityChanseyText: ; 19a9f (6:5a9f) +FuchsiaCityChanseyText: TX_FAR _FuchsiaCityChanseyText db "@" -FuchsiaCityText20: ; 19aa4 (6:5aa4) - db $08 ; asm +FuchsiaCityText20: + TX_ASM ld hl, FuchsiaCityVoltorbText call PrintText ld a, VOLTORB call DisplayPokedex jp TextScriptEnd -FuchsiaCityVoltorbText: ; 19ab3 (6:5ab3) +FuchsiaCityVoltorbText: TX_FAR _FuchsiaCityVoltorbText db "@" -FuchsiaCityText21: ; 19ab8 (6:5ab8) - db $08 ; asm +FuchsiaCityText21: + TX_ASM ld hl, FuchsiaCityKangaskhanText call PrintText ld a, KANGASKHAN call DisplayPokedex jp TextScriptEnd -FuchsiaCityKangaskhanText: ; 19ac7 (6:5ac7) +FuchsiaCityKangaskhanText: TX_FAR _FuchsiaCityKangaskhanText db "@" -FuchsiaCityText22: ; 19acc (6:5acc) - db $08 ; asm +FuchsiaCityText22: + TX_ASM ld hl, FuchsiaCitySlowpokeText call PrintText ld a, SLOWPOKE call DisplayPokedex jp TextScriptEnd -FuchsiaCitySlowpokeText: ; 19adb (6:5adb) +FuchsiaCitySlowpokeText: TX_FAR _FuchsiaCitySlowpokeText db "@" -FuchsiaCityText23: ; 19ae0 (6:5ae0) - db $08 ; asm +FuchsiaCityText23: + TX_ASM ld hl, FuchsiaCityLaprasText call PrintText ld a, LAPRAS call DisplayPokedex jp TextScriptEnd -FuchsiaCityLaprasText: ; 19aef (6:5aef) +FuchsiaCityLaprasText: TX_FAR _FuchsiaCityLaprasText db "@" -FuchsiaCityText24: ; 19af4 (6:5af4) - db $08 ; asm - ld a, [wd7f6] - bit 6, a - jr nz, .asm_3b4e8 ; 0x19afa - bit 7, a - jr nz, .asm_667d5 ; 0x19afe +FuchsiaCityText24: + TX_ASM + CheckEvent EVENT_GOT_DOME_FOSSIL + jr nz, .asm_3b4e8 + CheckEventReuseA EVENT_GOT_HELIX_FOSSIL + 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) +FuchsiaCityOmanyteText: TX_FAR _FuchsiaCityOmanyteText db "@" -FuchsiaCityKabutoText: ; 19b25 (6:5b25) +FuchsiaCityKabutoText: TX_FAR _FuchsiaCityKabutoText db "@" -FuchsiaCityText_19b2a: ; 19b2a (6:5b2a) +FuchsiaCityText_19b2a: TX_FAR _FuchsiaCityText_19b2a db "@" diff --git a/scripts/fuchsiagym.asm b/scripts/fuchsiagym.asm index 43d977d7..3628ebc0 100755 --- a/scripts/fuchsiagym.asm +++ b/scripts/fuchsiagym.asm @@ -1,15 +1,15 @@ -FuchsiaGymScript: ; 7543d (1d:543d) +FuchsiaGymScript: call FuchsiaGymScript_75453 call EnableAutoTextBoxDrawing - ld hl, FuchsiaGymTrainerHeaders + ld hl, FuchsiaGymTrainerHeader0 ld de, FuchsiaGymScriptPointers - ld a, [W_FUCHSIAGYMCURSCRIPT] + ld a, [wFuchsiaGymCurScript] call ExecuteCurMapScriptInTable - ld [W_FUCHSIAGYMCURSCRIPT], a + ld [wFuchsiaGymCurScript], a ret -FuchsiaGymScript_75453: ; 75453 (1d:5453) - ld hl, wd126 +FuchsiaGymScript_75453: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] ret z @@ -18,63 +18,59 @@ FuchsiaGymScript_75453: ; 75453 (1d:5453) call LoadGymLeaderAndCityName ret -Gym5CityName: ; 75465 (1d:5465) +Gym5CityName: db "FUCHSIA CITY@" -Gym5LeaderName: ; 75472 (1d:5472) +Gym5LeaderName: db "KOGA@" -FuchsiaGymScript_75477: ; 75477 (1d:5477) +FuchsiaGymScript_75477: xor a ld [wJoyIgnore], a - ld [W_FUCHSIAGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wFuchsiaGymCurScript], a + ld [wCurMapScript], a ret -FuchsiaGymScriptPointers: ; 75482 (1d:5482) +FuchsiaGymScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw FuchsiaGymScript3 -FuchsiaGymScript3: ; 7548a (1d:548a) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +FuchsiaGymScript3: + ld a, [wIsInBattle] cp $ff jp z, FuchsiaGymScript_75477 ld a, $f0 ld [wJoyIgnore], a -FuchsiaGymScript3_75497: ; 75497 (1d:5497) +FuchsiaGymScript3_75497: ld a, $9 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd792 - set 1, [hl] - ld bc, (TM_06 << 8) | 1 + SetEvent EVENT_BEAT_KOGA + lb bc, TM_06, 1 call GiveItem jr nc, .BagFull ld a, $a - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd792 - set 0, [hl] + SetEvent EVENT_GOT_TM06 jr .asm_754c0 .BagFull ld a, $b - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_754c0 - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges set 4, [hl] - ld hl, wd72a + ld hl, wBeatGymFlags set 4, [hl] ; deactivate gym trainers - ld a, [wd792] - or %11111100 - ld [wd792], a + SetEventRange EVENT_BEAT_FUCHSIA_GYM_TRAINER_0, EVENT_BEAT_FUCHSIA_GYM_TRAINER_5 jp FuchsiaGymScript_75477 -FuchsiaGymTextPointers: ; 754d5 (1d:54d5) +FuchsiaGymTextPointers: dw FuchsiaGymText1 dw FuchsiaGymText2 dw FuchsiaGymText3 @@ -87,250 +83,247 @@ FuchsiaGymTextPointers: ; 754d5 (1d:54d5) dw FuchsiaGymText10 dw FuchsiaGymText11 -FuchsiaGymTrainerHeaders: ; 754eb (1d:54eb) -FuchsiaGymTrainerHeader0: ; 754eb (1d:54eb) - db $2 ; flag's bit +FuchsiaGymTrainerHeader0: + dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_0 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 - -FuchsiaGymTrainerHeader2: ; 754f7 (1d:54f7) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_0 + dw FuchsiaGymBattleText1 ; TextBeforeBattle + dw FuchsiaGymAfterBattleText1 ; TextAfterBattle + dw FuchsiaGymEndBattleText1 ; TextEndBattle + dw FuchsiaGymEndBattleText1 ; TextEndBattle + +FuchsiaGymTrainerHeader1: + dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_1 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 - -FuchsiaGymTrainerHeader3: ; 75503 (1d:5503) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_1 + dw FuchsiaGymBattleText2 ; TextBeforeBattle + dw FuchsiaGymAfterBattleText2 ; TextAfterBattle + dw FuchsiaGymEndBattleText2 ; TextEndBattle + dw FuchsiaGymEndBattleText2 ; TextEndBattle + +FuchsiaGymTrainerHeader2: + dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_2 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 - -FuchsiaGymTrainerHeader4: ; 7550f (1d:550f) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_2 + dw FuchsiaGymBattleText3 ; TextBeforeBattle + dw FuchsiaGymAfterBattleText3 ; TextAfterBattle + dw FuchsiaGymEndBattleText3 ; TextEndBattle + dw FuchsiaGymEndBattleText3 ; TextEndBattle + +FuchsiaGymTrainerHeader3: + dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_3 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 - -FuchsiaGymTrainerHeader5: ; 7551b (1d:551b) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_3 + dw FuchsiaGymBattleText4 ; TextBeforeBattle + dw FuchsiaGymAfterBattleText4 ; TextAfterBattle + dw FuchsiaGymEndBattleText4 ; TextEndBattle + dw FuchsiaGymEndBattleText4 ; TextEndBattle + +FuchsiaGymTrainerHeader4: + dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_4 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 - -FuchsiaGymTrainerHeader6: ; 75527 (1d:5527) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_4 + dw FuchsiaGymBattleText5 ; TextBeforeBattle + dw FuchsiaGymAfterBattleText5 ; TextAfterBattle + dw FuchsiaGymEndBattleText5 ; TextEndBattle + dw FuchsiaGymEndBattleText5 ; TextEndBattle + +FuchsiaGymTrainerHeader5: + dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_5 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 + dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_5 + dw FuchsiaGymBattleText6 ; TextBeforeBattle + dw FuchsiaGymAfterBattleText6 ; TextAfterBattle + dw FuchsiaGymEndBattleText6 ; TextEndBattle + dw FuchsiaGymEndBattleText6 ; TextEndBattle db $ff -FuchsiaGymText1: ; 75534 (1d:5534) - db $08 ; asm - ld a, [wd792] - bit 1, a - jr z, .asm_181b6 ; 0x7553a - bit 0, a - jr nz, .asm_adc3b ; 0x7553e +FuchsiaGymText1: + TX_ASM + CheckEvent EVENT_BEAT_KOGA + jr z, .asm_181b6 + CheckEventReuseA EVENT_GOT_TM06 + 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 + ld [wGymLeaderNo], a xor a - ldh [$b4], a + ld [hJoyHeld], a ld a, $3 - ld [W_FUCHSIAGYMCURSCRIPT], a -.asm_e84c6 ; 0x7557e + ld [wFuchsiaGymCurScript], a +.asm_e84c6 jp TextScriptEnd -UnnamedText_75581: ; 75581 (1d:5581) - TX_FAR _UnnamedText_75581 +KogaBeforeBattleText: + TX_FAR _KogaBeforeBattleText db "@" -UnnamedText_75586: ; 75586 (1d:5586) - TX_FAR _UnnamedText_75586 +KogaAfterBattleText: + TX_FAR _KogaAfterBattleText db "@" -UnnamedText_7558b: ; 7558b (1d:558b) - TX_FAR _UnnamedText_7558b +KogaExplainToxicText: + TX_FAR _KogaExplainToxicText db "@" -FuchsiaGymText9: ; 75590 (1d:5590) - TX_FAR _UnnamedText_75590 +FuchsiaGymText9: + TX_FAR _FuchsiaGymText9 db "@" -FuchsiaGymText10: ; 75595 (1d:5595) +FuchsiaGymText10: TX_FAR _ReceivedTM06Text - db $11 + TX_SFX_KEY_ITEM -TM06ExplanationText: ; 7559a (1d:559a) +TM06ExplanationText: TX_FAR _TM06ExplanationText db "@" -FuchsiaGymText11: ; 7559f (1d:559f) +FuchsiaGymText11: TX_FAR _TM06NoRoomText db "@" -FuchsiaGymText2: ; 755a4 (1d:55a4) - db $08 ; asm +FuchsiaGymText2: + TX_ASM ld hl, FuchsiaGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd -FuchsiaGymBattleText1: ; 755ae (1d:55ae) +FuchsiaGymBattleText1: TX_FAR _FuchsiaGymBattleText1 db "@" -FuchsiaGymEndBattleText1: ; 755b3 (1d:55b3) +FuchsiaGymEndBattleText1: TX_FAR _FuchsiaGymEndBattleText1 db "@" -FuchsiaGymAfterBattleText1: ; 755b8 (1d:55b8) +FuchsiaGymAfterBattleText1: TX_FAR _FuchsiaGymAfterBattleText1 db "@" -FuchsiaGymText3: ; 755bd (1d:55bd) - db $08 ; asm - ld hl, FuchsiaGymTrainerHeader2 +FuchsiaGymText3: + TX_ASM + ld hl, FuchsiaGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd -FuchsiaGymBattleText2: ; 755c7 (1d:55c7) +FuchsiaGymBattleText2: TX_FAR _FuchsiaGymBattleText2 db "@" -FuchsiaGymEndBattleText2: ; 755cc (1d:55cc) +FuchsiaGymEndBattleText2: TX_FAR _FuchsiaGymEndBattleText2 db "@" -FuchsiaGymAfterBattleText2: ; 755d1 (1d:55d1) +FuchsiaGymAfterBattleText2: TX_FAR _FuchsiaGymAfterBattleText2 db "@" -FuchsiaGymText4: ; 755d6 (1d:55d6) - db $08 ; asm - ld hl, FuchsiaGymTrainerHeader3 +FuchsiaGymText4: + TX_ASM + ld hl, FuchsiaGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd -FuchsiaGymBattleText3: ; 755e0 (1d:55e0) +FuchsiaGymBattleText3: TX_FAR _FuchsiaGymBattleText3 db "@" -FuchsiaGymEndBattleText3: ; 755e5 (1d:55e5) +FuchsiaGymEndBattleText3: TX_FAR _FuchsiaGymEndBattleText3 db "@" -FuchsiaGymAfterBattleText3: ; 755ea (1d:55ea) +FuchsiaGymAfterBattleText3: TX_FAR _FuchsiaGymAfterBattleText3 db "@" -FuchsiaGymText5: ; 755ef (1d:55ef) - db $08 ; asm - ld hl, FuchsiaGymTrainerHeader4 +FuchsiaGymText5: + TX_ASM + ld hl, FuchsiaGymTrainerHeader3 call TalkToTrainer jp TextScriptEnd -FuchsiaGymBattleText4: ; 755f9 (1d:55f9) +FuchsiaGymBattleText4: TX_FAR _FuchsiaGymBattleText4 db "@" -FuchsiaGymEndBattleText4: ; 755fe (1d:55fe) +FuchsiaGymEndBattleText4: TX_FAR _FuchsiaGymEndBattleText4 db "@" -FuchsiaGymAfterBattleText4: ; 75603 (1d:5603) +FuchsiaGymAfterBattleText4: TX_FAR _FuchsiaGymAfterBattleText4 db "@" -FuchsiaGymText6: ; 75608 (1d:5608) - db $08 ; asm - ld hl, FuchsiaGymTrainerHeader5 +FuchsiaGymText6: + TX_ASM + ld hl, FuchsiaGymTrainerHeader4 call TalkToTrainer jp TextScriptEnd -FuchsiaGymBattleText5: ; 75612 (1d:5612) +FuchsiaGymBattleText5: TX_FAR _FuchsiaGymBattleText5 db "@" -FuchsiaGymEndBattleText5: ; 75617 (1d:5617) +FuchsiaGymEndBattleText5: TX_FAR _FuchsiaGymEndBattleText5 db "@" -FuchsiaGymAfterBattleText5: ; 7561c (1d:561c) +FuchsiaGymAfterBattleText5: TX_FAR _FuchsiaGymAfterBattleText5 db "@" -FuchsiaGymText7: ; 75621 (1d:5621) - db $08 ; asm - ld hl, FuchsiaGymTrainerHeader6 +FuchsiaGymText7: + TX_ASM + ld hl, FuchsiaGymTrainerHeader5 call TalkToTrainer jp TextScriptEnd -FuchsiaGymBattleText6: ; 7562b (1d:562b) +FuchsiaGymBattleText6: TX_FAR _FuchsiaGymBattleText6 db "@" -FuchsiaGymEndBattleText6: ; 75630 (1d:5630) +FuchsiaGymEndBattleText6: TX_FAR _FuchsiaGymEndBattleText6 db "@" -FuchsiaGymAfterBattleText6: ; 75635 (1d:5635) +FuchsiaGymAfterBattleText6: TX_FAR _FuchsiaGymAfterBattleText6 db "@" -FuchsiaGymText8: ; 7563a (1d:563a) - db $08 ; asm - ld a, [wd792] - bit 1, a - ld hl, UnnamedText_75653 - jr nz, .asm_50671 ; 0x75643 - ld hl, UnnamedText_7564e -.asm_50671 ; 0x75648 +FuchsiaGymText8: + TX_ASM + CheckEvent EVENT_BEAT_KOGA + 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: + TX_FAR _FuchsiaGymText_7564e db "@" -UnnamedText_75653: ; 75653 (1d:5653) - TX_FAR _UnnamedText_75653 +FuchsiaGymText_75653: + TX_FAR _FuchsiaGymText_75653 db "@" diff --git a/scripts/fuchsiahouse1.asm b/scripts/fuchsiahouse1.asm index 4d5e6eb1..95e59503 100755 --- a/scripts/fuchsiahouse1.asm +++ b/scripts/fuchsiahouse1.asm @@ -1,20 +1,20 @@ -FuchsiaHouse1Script: ; 75018 (1d:5018) +FuchsiaHouse1Script: call EnableAutoTextBoxDrawing ret -FuchsiaHouse1TextPointers: ; 7501c (1d:501c) +FuchsiaHouse1TextPointers: dw FuchsiaHouse1Text1 dw FuchsiaHouse1Text2 dw FuchsiaHouse1Text3 -FuchsiaHouse1Text1: ; 75022 (1d:5022) +FuchsiaHouse1Text1: TX_FAR _FuchsiaHouse1Text1 db "@" -FuchsiaHouse1Text2: ; 75027 (1d:5027) +FuchsiaHouse1Text2: TX_FAR _FuchsiaHouse1Text2 db "@" -FuchsiaHouse1Text3: ; 7502c (1d:502c) +FuchsiaHouse1Text3: TX_FAR _FuchsiaHouse1Text3 db "@" diff --git a/scripts/fuchsiahouse2.asm b/scripts/fuchsiahouse2.asm index 33bae7e4..f9307c04 100755 --- a/scripts/fuchsiahouse2.asm +++ b/scripts/fuchsiahouse2.asm @@ -1,116 +1,113 @@ -FuchsiaHouse2Script: ; 750b5 (1d:50b5) +FuchsiaHouse2Script: jp EnableAutoTextBoxDrawing -FuchsiaHouse2TextPointers: ; 750b8 (1d:50b8) +FuchsiaHouse2TextPointers: dw FuchsiaHouse2Text1 - dw Predef5CText + dw PickUpItemText dw BoulderText dw FuchsiaHouse2Text4 dw FuchsiaHouse2Text5 -FuchsiaHouse2Text1: ; 750c2 (1d:50c2) - db $08 ; asm - ld a, [wd78e] - bit 0, a - jr nz, .subtract ; 0x750c8 +FuchsiaHouse2Text1: + TX_ASM + CheckEvent EVENT_GOT_HM04 + jr nz, .subtract ld b,GOLD_TEETH call IsItemInBag - jr nz, .asm_3f30f ; 0x750cf - ld a, [wd78e] - bit 1, a - jr nz, .asm_60cba ; 0x750d6 + jr nz, .asm_3f30f + CheckEvent EVENT_GAVE_GOLD_TEETH + 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 + SetEvent EVENT_GAVE_GOLD_TEETH +.asm_60cba ld hl, WardenThankYouText call PrintText - ld bc,(HM_04 << 8) | 1 + lb bc, HM_04, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedHM04Text call PrintText - ld hl, wd78e - set 0, [hl] - jr .asm_52039 ; 0x75122 -.subtract ; 0x75124 + SetEvent EVENT_GOT_HM04 + 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) +WardenGibberishText1: TX_FAR _WardenGibberishText1 db "@" -WardenGibberishText2: ; 7513a (1d:513a) +WardenGibberishText2: TX_FAR _WardenGibberishText2 db "@" -WardenGibberishText3: ; 7513f (1d:513f) +WardenGibberishText3: TX_FAR _WardenGibberishText3 db "@" -WardenTeethText1: ; 75144 (1d:5144) +WardenTeethText1: TX_FAR _WardenTeethText1 - db $0b + TX_SFX_ITEM_1 -WardenTeethText2: ; 75149 (1d:5149) +WardenTeethText2: TX_FAR _WardenTeethText2 db "@" -WardenThankYouText: ; 7514e (1d:514e) +WardenThankYouText: TX_FAR _WardenThankYouText db "@" -ReceivedHM04Text: ; 75153 (1d:5153) +ReceivedHM04Text: TX_FAR _ReceivedHM04Text - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -HM04ExplanationText: ; 75159 (1d:5159) +HM04ExplanationText: TX_FAR _HM04ExplanationText db "@" -HM04NoRoomText: ; 7515e (1d:515e) +HM04NoRoomText: TX_FAR _HM04NoRoomText db "@" -FuchsiaHouse2Text5: ; 75163 (1d:5163) -FuchsiaHouse2Text4: ; 75163 (1d:5163) - db $08 ; asm - ldh a, [$8c] +FuchsiaHouse2Text5: +FuchsiaHouse2Text4: + 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 -FuchsiaHouse2Text_75176: ; 75176 (1d:5176) +FuchsiaHouse2Text_75176: TX_FAR _FuchsiaHouse2Text_75176 db "@" -FuchsiaHouse2Text_7517b: ; 7517b (1d:517b) +FuchsiaHouse2Text_7517b: TX_FAR _FuchsiaHouse2Text_7517b db "@" diff --git a/scripts/fuchsiahouse3.asm b/scripts/fuchsiahouse3.asm index 372df6a6..586d62f5 100755 --- a/scripts/fuchsiahouse3.asm +++ b/scripts/fuchsiahouse3.asm @@ -1,11 +1,11 @@ -FuchsiaHouse3Script: ; 5617c (15:617c) +FuchsiaHouse3Script: jp EnableAutoTextBoxDrawing -FuchsiaHouse3TextPointers: ; 5617f (15:617f) +FuchsiaHouse3TextPointers: dw FuchsiaHouse3Text1 -FuchsiaHouse3Text1: ; 56181 (15:6181) - db $08 ; asm +FuchsiaHouse3Text1: + TX_ASM ld a, [wd728] bit 4, a jr nz, .after @@ -18,7 +18,7 @@ FuchsiaHouse3Text1: ; 56181 (15:6181) and a jr nz, .refused - ld bc, (GOOD_ROD << 8) | 1 + lb bc, GOOD_ROD, 1 call GiveItem jr nc, .full @@ -43,16 +43,16 @@ FuchsiaHouse3Text1: ; 56181 (15:6181) call PrintText jp TextScriptEnd -FuchsiaHouse3Text_561bd: ; 561bd (15:61bd) +FuchsiaHouse3Text_561bd: TX_FAR _FuchsiaHouse3Text_561bd db "@" -FuchsiaHouse3Text_561c2: ; 561c2 (15:61c2) - TX_FAR _FuchsiaHouse3Text_561c2 ; 0xa06e8 - db $0B +FuchsiaHouse3Text_561c2: + TX_FAR _FuchsiaHouse3Text_561c2 + TX_SFX_ITEM_1 db "@" -UnnamedText_561c8: ; 561c8 +UnusedText_561c8: para "つり こそ" line "おとこの ロマン だ!" @@ -62,14 +62,14 @@ UnnamedText_561c8: ; 561c8 line "もっと いいもんが つれるんじゃ!" done -FuchsiaHouse3Text_56212: ; 56212 (15:6212) +FuchsiaHouse3Text_56212: TX_FAR _FuchsiaHouse3Text_56212 db "@" -FuchsiaHouse3Text_56217: ; 56217 (15:6217) +FuchsiaHouse3Text_56217: TX_FAR _FuchsiaHouse3Text_56217 db "@" -FuchsiaHouse3Text_5621c: ; 5621c (15:621c) +FuchsiaHouse3Text_5621c: TX_FAR _FuchsiaHouse3Text_5621c db "@" diff --git a/scripts/fuchsiamart.asm b/scripts/fuchsiamart.asm index 792dafa2..96df9290 100755 --- a/scripts/fuchsiamart.asm +++ b/scripts/fuchsiamart.asm @@ -1,15 +1,15 @@ -FuchsiaMartScript: ; 1dd88 (7:5d88) +FuchsiaMartScript: jp EnableAutoTextBoxDrawing -FuchsiaMartTextPointers: ; 1dd8b (7:5d8b) - dw FuchsiaMartText1 +FuchsiaMartTextPointers: + dw FuchsiaCashierText dw FuchsiaMartText2 dw FuchsiaMartText3 -FuchsiaMartText2: ; 1dd91 (7:5d91) +FuchsiaMartText2: TX_FAR _FuchsiaMartText2 db "@" -FuchsiaMartText3: ; 1dd96 (7:5d96) +FuchsiaMartText3: TX_FAR _FuchsiaMartText3 db "@" diff --git a/scripts/fuchsiameetingroom.asm b/scripts/fuchsiameetingroom.asm index 140a5ccc..7995a49b 100755 --- a/scripts/fuchsiameetingroom.asm +++ b/scripts/fuchsiameetingroom.asm @@ -1,20 +1,20 @@ -FuchsiaMeetingRoomScript: ; 756e3 (1d:56e3) +FuchsiaMeetingRoomScript: call EnableAutoTextBoxDrawing ret -FuchsiaMeetingRoomTextPointers: ; 756e7 (1d:56e7) +FuchsiaMeetingRoomTextPointers: dw FuchsiaMeetingRoomText1 dw FuchsiaMeetingRoomText2 dw FuchsiaMeetingRoomText3 -FuchsiaMeetingRoomText1: ; 756ed (1d:56ed) +FuchsiaMeetingRoomText1: TX_FAR _FuchsiaMeetingRoomText1 db "@" -FuchsiaMeetingRoomText2: ; 756f2 (1d:56f2) +FuchsiaMeetingRoomText2: TX_FAR _FuchsiaMeetingRoomText2 db "@" -FuchsiaMeetingRoomText3: ; 756f7 (1d:56f7) +FuchsiaMeetingRoomText3: TX_FAR _FuchsiaMeetingRoomText3 db "@" diff --git a/scripts/fuchsiapokecenter.asm b/scripts/fuchsiapokecenter.asm index 26f88844..a6111e84 100755 --- a/scripts/fuchsiapokecenter.asm +++ b/scripts/fuchsiapokecenter.asm @@ -1,23 +1,23 @@ -FuchsiaPokecenterScript: ; 75063 (1d:5063) +FuchsiaPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -FuchsiaPokecenterTextPointers: ; 75069 (1d:5069) - dw FuchsiaPokecenterText1 +FuchsiaPokecenterTextPointers: + dw FuchsiaHealNurseText dw FuchsiaPokecenterText2 dw FuchsiaPokecenterText3 - dw FuchsiaPokecenterText4 + dw FuchsiaTradeNurseText -FuchsiaPokecenterText1: ; 75071 (1d:5071) - db $ff +FuchsiaHealNurseText: + TX_POKECENTER_NURSE -FuchsiaPokecenterText2: ; 75072 (1d:5072) +FuchsiaPokecenterText2: TX_FAR _FuchsiaPokecenterText1 db "@" -FuchsiaPokecenterText3: ; 75077 (1d:5077) +FuchsiaPokecenterText3: TX_FAR _FuchsiaPokecenterText3 db "@" -FuchsiaPokecenterText4: ; 7507c (1d:507c) - db $f6 +FuchsiaTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST diff --git a/scripts/gary.asm b/scripts/gary.asm index c0785cab..1fe65fb0 100755 --- a/scripts/gary.asm +++ b/scripts/gary.asm @@ -1,16 +1,16 @@ -GaryScript: ; 75f1d (1d:5f1d) +GaryScript: call EnableAutoTextBoxDrawing ld hl, GaryScriptPointers - ld a, [W_GARYCURSCRIPT] + ld a, [wGaryCurScript] jp CallFunctionInTable -GaryScript_75f29: ; 75f29 (1d:5f29) +ResetGaryScript: xor a ld [wJoyIgnore], a - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -GaryScriptPointers: ; 75f31 (1d:5f31) +GaryScriptPointers: dw GaryScript0 dw GaryScript1 dw GaryScript2 @@ -23,209 +23,215 @@ GaryScriptPointers: ; 75f31 (1d:5f31) dw GaryScript9 dw GaryScript10 -GaryScript0: ; 75f47 (1d:5f47) +GaryScript0: ret -GaryScript1: ; 75f48 (1d:5f48) +GaryScript1: ld a, $ff ld [wJoyIgnore], a ld hl, wSimulatedJoypadStatesEnd - ld de, RLEMovement75f63 + ld de, GaryEntrance_RLEMovement call DecodeRLEList dec a ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $2 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -RLEMovement75f63: ; 75f63 (1d:5f63) - db $40,1 - db $10,1 - db $40,3 +GaryEntrance_RLEMovement: + db D_UP,1 + db D_RIGHT,1 + db D_UP,3 db $ff -GaryScript2: ; 75f6a (1d:5f6a) +GaryScript2: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a ld [wJoyIgnore], a - ld hl, W_OPTIONS - res 7, [hl] + ld hl, wOptions + res 7, [hl] ; Turn on battle animations to make the battle feel more epic. ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld hl, wd72d set 6, [hl] set 7, [hl] - ld hl, GaryText_760f9 - ld de, GaryText_760fe + ld hl, GaryDefeatedText + ld de, GaryVictoryText call SaveEndBattleTextPointers - ld a, SONY3 + $c8 - ld [W_CUROPPONENT], a + ld a, OPP_SONY3 + ld [wCurOpponent], a ; select which team to use during the encounter - ld a, [W_RIVALSTARTER] + ld a, [wRivalStarter] cp STARTER2 - jr nz, .NotSquirtle ; 0x75f9f $4 + jr nz, .NotStarter2 ld a, $1 - jr .done -.NotSquirtle + jr .saveTrainerId +.NotStarter2 cp STARTER3 - jr nz, .Charmander ; 0x75fa7 $4 + jr nz, .NotStarter3 ld a, $2 - jr .done -.Charmander + jr .saveTrainerId +.NotStarter3 ld a, $3 -.done - ld [W_TRAINERNO], a +.saveTrainerId + ld [wTrainerNo], a xor a ld [hJoyHeld], a ld a, $3 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -GaryScript3: ; 75fbb (1d:5fbb) - ld a, [W_ISINBATTLE] +GaryScript3: + ld a, [wIsInBattle] cp $ff - jp z, GaryScript_75f29 - call UpdateSprites ; move sprites - ld hl, wd867 - set 1, [hl] + jp z, ResetGaryScript + call UpdateSprites + SetEvent EVENT_BEAT_CHAMPION_RIVAL ld a, $f0 ld [wJoyIgnore], a ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF ld a, $4 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -GaryScript4: ; 75fe4 (1d:5fe4) +GaryScript4: callba Music_Cities1AlternateTempo ld a, $2 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $2 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF - ld de, MovementData_76014 + ld de, OakEntranceAfterVictoryMovement ld a, $2 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call MoveSprite ld a, HS_CHAMPIONS_ROOM_OAK - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld a, $5 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -MovementData_76014: ; 76014 (1d:6014) - db $40,$40,$40,$40,$40,$FF +OakEntranceAfterVictoryMovement: + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db $FF -GaryScript5: ; 7601a (1d:601a) +GaryScript5: ld a, [wd730] bit 0, a ret nz - ld a, $2 - ld [wd528], a + ld a, PLAYER_DIR_LEFT + ld [wPlayerMovingDirection], a ld a, $1 - ld [$ff8c], a - ld a, $8 - ld [$ff8d], a + ld [H_SPRITEINDEX], a + ld a, SPRITE_FACING_LEFT + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $2 - ld [$ff8c], a - xor a - ld [$ff8d], a - call SetSpriteFacingDirectionAndDelay ; face object + ld [H_SPRITEINDEX], a + xor a ; SPRITE_FACING_DOWN + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay ld a, $3 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $6 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -GaryScript6: ; 76047 (1d:6047) +GaryScript6: ld a, $2 - ld [$ff8c], a - ld a, $c - ld [$ff8d], a - call SetSpriteFacingDirectionAndDelay ; face object + ld [H_SPRITEINDEX], a + ld a, SPRITE_FACING_RIGHT + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay ld a, $4 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $7 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -GaryScript7: ; 7605f (1d:605f) +GaryScript7: ld a, $2 - ld [$ff8c], a - xor a - ld [$ff8d], a - call SetSpriteFacingDirectionAndDelay ; face object + ld [H_SPRITEINDEX], a + xor a ; SPRITE_FACING_DOWN + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay ld a, $5 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call GaryScript_760c8 - ld de, MovementData_76080 + ld de, OakExitGaryRoomMovement ld a, $2 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call MoveSprite ld a, $8 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -MovementData_76080: ; 76080 (1d:6080) - db $40,$40,$FF +OakExitGaryRoomMovement: + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db $FF -GaryScript8: ; 76083 (1d:6083) +GaryScript8: ld a, [wd730] bit 0, a ret nz ld a, HS_CHAMPIONS_ROOM_OAK - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, $9 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -GaryScript9: ; 76099 (1d:6099) +GaryScript9: ld a, $ff ld [wJoyIgnore], a ld hl, wSimulatedJoypadStatesEnd - ld de, RLEMovement760b4 + ld de, WalkToHallOfFame_RLEMovment call DecodeRLEList dec a ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $a - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -RLEMovement760b4 ; 760b4 (1d:60b4) - db $40,4 - db $20,1 +WalkToHallOfFame_RLEMovment: + db D_UP,4 + db D_LEFT,1 db $ff -GaryScript10: ; 760b9 (1d:60b9) +GaryScript10: ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a ld [wJoyIgnore], a ld a, $0 - ld [W_GARYCURSCRIPT], a + ld [wGaryCurScript], a ret -GaryScript_760c8 ; 760c8 (1d:60c8) +GaryScript_760c8: ld a, $f0 ld [wJoyIgnore], a call DisplayTextID @@ -233,61 +239,60 @@ GaryScript_760c8 ; 760c8 (1d:60c8) ld [wJoyIgnore], a ret -GaryTextPointers: ; 760d6 (1d:60d6) +GaryTextPointers: dw GaryText1 dw GaryText2 dw GaryText3 dw GaryText4 dw GaryText5 -GaryText1: ; 760e0 (1d:60e0) - db $08 ; asm - ld a, [wd867] - bit 1, a - ld hl, GaryText_760f4 - jr z, .asm_17e9f ; 0x760e9 +GaryText1: + TX_ASM + CheckEvent EVENT_BEAT_CHAMPION_RIVAL + ld hl, GaryChampionIntroText + jr z, .printText ld hl, GaryText_76103 -.asm_17e9f ; 0x760ee +.printText call PrintText jp TextScriptEnd -GaryText_760f4: ; 760f4 (1d:60f4) - TX_FAR _GaryText_760f4 +GaryChampionIntroText: + TX_FAR _GaryChampionIntroText db "@" -GaryText_760f9: ; 760f9 (1d:60f9) - TX_FAR _GaryText_760f9 +GaryDefeatedText: + TX_FAR _GaryDefeatedText db "@" -GaryText_760fe: ; 760fe (1d:60fe) - TX_FAR _GaryText_760fe +GaryVictoryText: + TX_FAR _GaryVictoryText db "@" -GaryText_76103: ; 76103 (1d:6103) +GaryText_76103: TX_FAR _GaryText_76103 db "@" -GaryText2: ; 76108 (1d:6108) +GaryText2: TX_FAR _GaryText2 db "@" -GaryText3: ; 7610d (1d:610d) - db $8 - ld a, [W_PLAYERSTARTER] +GaryText3: + TX_ASM + ld a, [wPlayerStarter] ld [wd11e], a call GetMonName ld hl, GaryText_76120 call PrintText jp TextScriptEnd -GaryText_76120: ; 76120 (1d:6120) +GaryText_76120: TX_FAR _GaryText_76120 db "@" -GaryText4: ; 76125 (1d:6125) +GaryText4: TX_FAR _GaryText_76125 db "@" -GaryText5: ; 7612a (1d:612a) +GaryText5: TX_FAR _GaryText_7612a db "@" diff --git a/scripts/halloffameroom.asm b/scripts/halloffameroom.asm index c44622c7..94e64431 100755 --- a/scripts/halloffameroom.asm +++ b/scripts/halloffameroom.asm @@ -1,65 +1,61 @@ -HallofFameRoomScript: ; 5a49e (16:649e) +HallofFameRoomScript: call EnableAutoTextBoxDrawing ld hl, HallofFameRoomScriptPointers - ld a, [W_HALLOFFAMEROOMCURSCRIPT] + ld a, [wHallOfFameRoomCurScript] jp CallFunctionInTable -HallofFameRoomScript_5a4aa: ; 5a4aa (16:64aa) +HallofFameRoomScript_5a4aa: xor a ld [wJoyIgnore], a - ld [W_HALLOFFAMEROOMCURSCRIPT], a + ld [wHallOfFameRoomCurScript], a ret -HallofFameRoomScriptPointers: ; 5a4b2 (16:64b2) +HallofFameRoomScriptPointers: dw HallofFameRoomScript0 dw HallofFameRoomScript1 dw HallofFameRoomScript2 dw HallofFameRoomScript3 -HallofFameRoomScript3: ; 5a4ba (16:64ba) +HallofFameRoomScript3: ret -HallofFameRoomScript2: ; 5a4bb (16:64bb) +HallofFameRoomScript2: call Delay3 - ld a, [wd358] + ld a, [wLetterPrintingDelayFlags] push af xor a ld [wJoyIgnore], a predef HallOfFamePC pop af - ld [wd358], a - ld hl, W_FLAGS_D733 + ld [wLetterPrintingDelayFlags], a + ld hl, wFlags_D733 res 1, [hl] inc hl set 0, [hl] xor a - ld hl, W_LORELEICURSCRIPT - ld [hli], a - ld [hli], a - ld [hl], a - ld [W_LANCECURSCRIPT], a - ld [W_HALLOFFAMEROOMCURSCRIPT], a - ld hl, wd863 - ld [hli], a - ld [hli], a + ld hl, wLoreleiCurScript ld [hli], a ld [hli], a ld [hl], a + ld [wLanceCurScript], a + ld [wHallOfFameRoomCurScript], a + ; Elite 4 events + ResetEventRange ELITE4_EVENTS_START, ELITE4_CHAMPION_EVENTS_END, 1 xor a - ld [W_HALLOFFAMEROOMCURSCRIPT], a + ld [wHallOfFameRoomCurScript], a ld a, PALLET_TOWN ld [wLastBlackoutMap], a callba SaveSAVtoSRAM ld b, 5 -.asm_5a4ff +.delayLoop ld c, 600 / 5 call DelayFrames dec b - jr nz, .asm_5a4ff ; 0x5a505 $f8 + jr nz, .delayLoop call WaitForTextScrollButtonPress jp Init -HallofFameRoomScript0: ; 5a50d (16:650d) +HallofFameRoomScript0: ld a, $ff ld [wJoyIgnore], a ld hl, wSimulatedJoypadStatesEnd @@ -69,45 +65,45 @@ HallofFameRoomScript0: ; 5a50d (16:650d) ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $1 - ld [W_HALLOFFAMEROOMCURSCRIPT], a + ld [wHallOfFameRoomCurScript], a ret -RLEMovement5a528: ; 5a528 (16:6528) - db $40,$5 +RLEMovement5a528: + db D_UP,$5 db $ff -HallofFameRoomScript1: ; 5a52b (16:652b) +HallofFameRoomScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz + ld a, PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a ld a, $1 - ld [wd528], a - ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF - ld a, $8 - ld [$ff8d], a + ld a, SPRITE_FACING_LEFT + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call Delay3 xor a ld [wJoyIgnore], a - inc a - ld [wd528], a + inc a ; PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a ld a, HS_UNKNOWN_DUNGEON_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, $2 - ld [W_HALLOFFAMEROOMCURSCRIPT], a + ld [wHallOfFameRoomCurScript], a ret -HallofFameRoomTextPointers: ; 5a56a (16:656a) +HallofFameRoomTextPointers: dw HallofFameRoomText1 -HallofFameRoomText1: ; 5a56c (16:656c) +HallofFameRoomText1: TX_FAR _HallofFameRoomText1 db "@" diff --git a/scripts/indigoplateau.asm b/scripts/indigoplateau.asm index 9e4802ba..6a6fdb6c 100755 --- a/scripts/indigoplateau.asm +++ b/scripts/indigoplateau.asm @@ -1,4 +1,4 @@ -IndigoPlateauScript: ; 50935 (14:4935) +IndigoPlateauScript: ret -IndigoPlateauTextPointers: ; 50936 (14:4936) +IndigoPlateauTextPointers: diff --git a/scripts/indigoplateaulobby.asm b/scripts/indigoplateaulobby.asm index 1b09a61d..c26f6f0c 100755 --- a/scripts/indigoplateaulobby.asm +++ b/scripts/indigoplateaulobby.asm @@ -1,41 +1,36 @@ -IndigoPlateauLobbyScript: ; 19c5b (6:5c5b) +IndigoPlateauLobbyScript: call Serial_TryEstablishingExternallyClockedConnection call EnableAutoTextBoxDrawing - ld hl, wd126 + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] ret z - ld hl, wd869 - res 7, [hl] - ld hl, wd734 + ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH + ld hl, wBeatLorelei bit 1, [hl] res 1, [hl] ret z - ld hl, wd863 - xor a - ld [hli], a - ld [hli], a - ld [hli], a - ld [hl], a + ; Elite 4 events + ResetEventRange ELITE4_EVENTS_START, EVENT_LANCES_ROOM_LOCK_DOOR ret -IndigoPlateauLobbyTextPointers: ; 19c7f (6:5c7f) - dw IndigoPlateauLobbyText1 +IndigoPlateauLobbyTextPointers: + dw IndigoHealNurseText dw IndigoPlateauLobbyText2 dw IndigoPlateauLobbyText3 - dw IndigoPlateauLobbyText4 - dw IndigoPlateauLobbyText5 + dw IndigoCashierText + dw IndigoTradeNurseText -IndigoPlateauLobbyText1: ; 19c89 (6:5c89) - db $ff +IndigoHealNurseText: + TX_POKECENTER_NURSE -IndigoPlateauLobbyText2: ; 19c8a (6:5c8a) - TX_FAR _IndigoPlateauLobbyText1 +IndigoPlateauLobbyText2: + TX_FAR _IndigoPlateauLobbyText2 db "@" -IndigoPlateauLobbyText3: ; 19c8f (6:5c8f) +IndigoPlateauLobbyText3: TX_FAR _IndigoPlateauLobbyText3 db "@" -IndigoPlateauLobbyText5: ; 19c94 (6:5c94) - db $f6 +IndigoTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST diff --git a/scripts/lab1.asm b/scripts/lab1.asm index a4ec9b41..5b08f4f2 100755 --- a/scripts/lab1.asm +++ b/scripts/lab1.asm @@ -1,30 +1,30 @@ -Lab1Script: ; 75b8c (1d:5b8c) +Lab1Script: call EnableAutoTextBoxDrawing ret -Lab1TextPointers: ; 75b90 (1d:5b90) +Lab1TextPointers: dw Lab1Text1 dw Lab1Text2 dw Lab1Text3 dw Lab1Text4 dw Lab1Text5 -Lab1Text1: ; 75b9a (1d:5b9a) +Lab1Text1: TX_FAR _Lab1Text1 db "@" -Lab1Text2: ; 75b9f (1d:5b9f) +Lab1Text2: TX_FAR _Lab1Text2 db "@" -Lab1Text3: ; 75ba4 (1d:5ba4) +Lab1Text3: TX_FAR _Lab1Text3 db "@" -Lab1Text4: ; 75ba9 (1d:5ba9) +Lab1Text4: TX_FAR _Lab1Text4 db "@" -Lab1Text5: ; 75bae (1d:5bae) +Lab1Text5: TX_FAR _Lab1Text5 db "@" diff --git a/scripts/lab2.asm b/scripts/lab2.asm index 9839a563..ed9ef1b4 100755 --- a/scripts/lab2.asm +++ b/scripts/lab2.asm @@ -1,25 +1,25 @@ -Lab2Script: ; 75c21 (1d:5c21) +Lab2Script: jp EnableAutoTextBoxDrawing -Lab2TextPointers: ; 75c24 (1d:5c24) +Lab2TextPointers: dw Lab2Text1 dw Lab2Text2 dw Lab2Text3 -Lab2Text1: ; 75c2a (1d:5c2a) +Lab2Text1: TX_FAR _Lab2Text1 db "@" -Lab2Text2: ; 75c2f (1d:5c2f) - db $8 +Lab2Text2: + TX_ASM ld a, $7 ld [wWhichTrade], a - jr asm_78552 ; 0x75c35 $6 + jr Lab2DoTrade -Lab2Text3: ; 75c37 (1d:5c37) - db $8 +Lab2Text3: + TX_ASM ld a, $8 ld [wWhichTrade], a -asm_78552: ; 75c3d (1d:5c3d) +Lab2DoTrade: predef DoInGameTradeDialogue jp TextScriptEnd diff --git a/scripts/lab3.asm b/scripts/lab3.asm index 66839b17..b533d162 100755 --- a/scripts/lab3.asm +++ b/scripts/lab3.asm @@ -1,63 +1,62 @@ -Lab3Script: ; 75c87 (1d:5c87) +Lab3Script: jp EnableAutoTextBoxDrawing -Lab3TextPointers: ; 75c8a (1d:5c8a) +Lab3TextPointers: dw Lab3Text1 dw Lab3Text2 dw Lab3Text3 dw Lab3Text4 dw Lab3Text5 -Lab3Text1: ; 75c94 (1d:5c94) - db $08 ; asm - ld a, [wd7a1] - bit 7, a - jr nz, .asm_e551a ; 0x75c9a +Lab3Text1: + TX_ASM + CheckEvent EVENT_GOT_TM35 + jr nz, .asm_e551a ld hl, TM35PreReceiveText call PrintText - ld bc, (TM_35 << 8) | 1 + lb bc, TM_35, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM35Text call PrintText - ld hl, wd7a1 - set 7, [hl] - jr .asm_eb896 ; 0x75cb5 + SetEvent EVENT_GOT_TM35 + 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) +TM35PreReceiveText: TX_FAR _TM35PreReceiveText db "@" -ReceivedTM35Text: ; 75ccd (1d:5ccd) +ReceivedTM35Text: TX_FAR _ReceivedTM35Text - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -TM35ExplanationText: ; 75cd3 (1d:5cd3) +TM35ExplanationText: TX_FAR _TM35ExplanationText db "@" -TM35NoRoomText: ; 75cd8 (1d:5cd8) +TM35NoRoomText: TX_FAR _TM35NoRoomText db "@" -Lab3Text2: ; 75cdd (1d:5cdd) +Lab3Text2: TX_FAR _Lab3Text2 db "@" -Lab3Text4: ; 75ce2 (1d:5ce2) -Lab3Text3: ; 75ce2 (1d:5ce2) +Lab3Text4: +Lab3Text3: TX_FAR _Lab3Text3 db "@" -Lab3Text5: ; 75ce7 (1d:5ce7) +Lab3Text5: TX_FAR _Lab3Text5 db "@" diff --git a/scripts/lab4.asm b/scripts/lab4.asm index 1e818676..7d0db339 100755 --- a/scripts/lab4.asm +++ b/scripts/lab4.asm @@ -1,16 +1,15 @@ -Lab4Script: ; 75d31 (1d:5d31) +Lab4Script: jp EnableAutoTextBoxDrawing -Lab4TextPointers: ; 75d34 (1d:5d34) +Lab4TextPointers: dw Lab4Text1 dw Lab4Text2 -Lab4Script_75d38: ; 75d38 (1d:5d38) +Lab4Script_GetFossilsInBag: ; construct a list of all fossils in the player's bag - xor a - ld [wcd37], a - ld de, wcc5b + ld [wFilteredBagItemsCount], a + ld de, wFilteredBagItems ld hl, FossilsList .loop ld a, [hli] @@ -20,7 +19,7 @@ Lab4Script_75d38: ; 75d38 (1d:5d38) push de ld [wd11e], a ld b, a - predef IsItemInBag_ + predef GetQuantityOfItemInBag pop de pop hl ld a, b @@ -32,7 +31,7 @@ Lab4Script_75d38: ; 75d38 (1d:5d38) ld [de], a inc de push hl - ld hl, wcd37 + ld hl, wFilteredBagItemsCount inc [hl] pop hl jr .loop @@ -41,77 +40,70 @@ Lab4Script_75d38: ; 75d38 (1d:5d38) ld [de], a ret -FossilsList: ; 75d68 (1d:5d68) +FossilsList: db DOME_FOSSIL db HELIX_FOSSIL db OLD_AMBER db $00 -Lab4Text1: ; 75d6c (1d:5d6c) - db $8 - ld a, [wd7a3] - bit 0, a - jr nz, .asm_75d96 ; 0x75d72 $22 +Lab4Text1: + TX_ASM + CheckEvent EVENT_GAVE_FOSSIL_TO_LAB + jr nz, .asm_75d96 ld hl, Lab4Text_75dc6 call PrintText - call Lab4Script_75d38 - ld a, [wcd37] + call Lab4Script_GetFossilsInBag + ld a, [wFilteredBagItemsCount] 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 .asm_75d93 jp TextScriptEnd .asm_75d96 - bit 1, a - jr z, .asm_75da2 ; 0x75d98 $8 + CheckEventAfterBranchReuseA EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_GAVE_FOSSIL_TO_LAB + 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 call PrintText - ld hl, wd7a3 - set 2, [hl] - ld a, [W_FOSSILMON] + SetEvent EVENT_LAB_HANDING_OVER_FOSSIL_MON + ld a, [wFossilMon] ld b, a ld c, 30 call GivePokemon - jr nc, .asm_75d93 ; 0x75db9 $d8 - ld hl, wd7a3 - res 0, [hl] - res 1, [hl] - res 2, [hl] - jr .asm_75d93 ; 0x75dc4 $cd + jr nc, .asm_75d93 + ResetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_LAB_HANDING_OVER_FOSSIL_MON + jr .asm_75d93 -Lab4Text_75dc6: ; 75dc6 (1d:5dc6) +Lab4Text_75dc6: TX_FAR _Lab4Text_75dc6 db "@" -Lab4Text_75dcb: ; 75dcb (1d:5dcb) +Lab4Text_75dcb: TX_FAR _Lab4Text_75dcb db "@" -Lab4Text_75dd0: ; 75dd0 (1d:5dd0) +Lab4Text_75dd0: TX_FAR _Lab4Text_75dd0 db "@" -Lab4Text_75dd5: ; 75dd5 (1d:5dd5) +Lab4Text_75dd5: TX_FAR _Lab4Text_75dd5 db "@" -Lab4Text2: ; 75dda (1d:5dda) - db $08 ; asm +Lab4Text2: + TX_ASM ld a, $3 ld [wWhichTrade], a predef DoInGameTradeDialogue jp TextScriptEnd -LoadFossilItemAndMonNameBank1D: ; 75de8 (1d:5de8) - ld b, BANK(LoadFossilItemAndMonName) - ld hl, LoadFossilItemAndMonName - jp Bankswitch +LoadFossilItemAndMonNameBank1D: + jpba LoadFossilItemAndMonName diff --git a/scripts/lance.asm b/scripts/lance.asm index f2523098..a0b0e6e7 100755 --- a/scripts/lance.asm +++ b/scripts/lance.asm @@ -1,85 +1,83 @@ -LanceScript: ; 5a2ae (16:62ae) - call LanceScript_5a2c4 +LanceScript: + call LanceShowOrHideEntranceBlocks call EnableAutoTextBoxDrawing - ld hl, LanceTrainerHeaders + ld hl, LanceTrainerHeader0 ld de, LanceScriptPointers - ld a, [W_LANCECURSCRIPT] + ld a, [wLanceCurScript] call ExecuteCurMapScriptInTable - ld [W_LANCECURSCRIPT], a + ld [wLanceCurScript], a ret -LanceScript_5a2c4: ; 5a2c4 (16:62c4) - ld hl, wd126 +LanceShowOrHideEntranceBlocks: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd866] - bit 7, a - jr nz, .asm_5a2da + CheckEvent EVENT_LANCES_ROOM_LOCK_DOOR + jr nz, .closeEntrance + ; open entrance ld a, $31 ld b, $32 - jp LanceScript_5a2de -.asm_5a2da + jp LanceSetEntranceBlocks +.closeEntrance ld a, $72 ld b, $73 -LanceScript_5a2de: ; 5a2de (16:62de) +LanceSetEntranceBlocks: +; Replaces the tile blocks so the player can't leave. push bc - ld [wd09f], a - ld bc, $602 - call LanceScript_5a2f0 + ld [wNewTileBlockID], a + lb bc, 6, 2 + call LanceSetEntranceBlock pop bc ld a, b - ld [wd09f], a - ld bc, $603 + ld [wNewTileBlockID], a + lb bc, 6, 3 -LanceScript_5a2f0: ; 5a2f0 (16:62f0) +LanceSetEntranceBlock: predef_jump ReplaceTileBlock -LanceScript_5a2f5: ; 5a2f5 (16:62f5) +ResetLanceScript: xor a - ld [W_LANCECURSCRIPT], a + ld [wLanceCurScript], a ret -LanceScriptPointers: ; 5a2fa (16:62fa) +LanceScriptPointers: dw LanceScript0 dw DisplayEnemyTrainerTextAndStartBattle dw LanceScript2 dw LanceScript3 dw LanceScript4 -LanceScript4: ; 5a304 (16:6304) +LanceScript4: ret -LanceScript0: ; 5a305 (16:6305) - ld a, [wd866] - bit 6, a +LanceScript0: + CheckEvent EVENT_BEAT_LANCE ret nz - ld hl, CoordsData_5a33e + ld hl, LanceTriggerMovementCoords call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a ld [hJoyHeld], a - ld a, [wWhichTrade] ; wWhichTrade - cp $3 - jr nc, .asm_5a325 + ld a, [wCoordIndex] + cp $3 ; Is player standing next to Lance's sprite? + jr nc, .notStandingNextToLance ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a jp DisplayTextID -.asm_5a325 - cp $5 - jr z, LanceScript_5a35b - ld hl, wd866 - bit 7, [hl] - set 7, [hl] +.notStandingNextToLance + cp $5 ; Is player standing on the entrance staircase? + jr z, WalkToLance + CheckAndSetEvent EVENT_LANCES_ROOM_LOCK_DOOR ret nz - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] - ld a, (SFX_02_57 - SFX_Headers_02) / 3 + ld a, SFX_GO_INSIDE call PlaySound - jp LanceScript_5a2c4 + jp LanceShowOrHideEntranceBlocks -CoordsData_5a33e: ; 5a33e (16:633e) +LanceTriggerMovementCoords: db $01,$05 db $02,$06 db $0B,$05 @@ -87,79 +85,78 @@ CoordsData_5a33e: ; 5a33e (16:633e) db $10,$18 db $FF -LanceScript2: ; 5a349 (16:6349) +LanceScript2: call EndTrainerBattle - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [wIsInBattle] cp $ff - jp z, LanceScript_5a2f5 + jp z, ResetLanceScript ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a jp DisplayTextID -LanceScript_5a35b: ; 5a35b (16:635b) +WalkToLance: +; Moves the player down the hallway to Lance's room. ld a, $ff ld [wJoyIgnore], a ld hl, wSimulatedJoypadStatesEnd - ld de, RLEList_5a379 + ld de, WalkToLance_RLEList call DecodeRLEList dec a ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $3 - ld [W_LANCECURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wLanceCurScript], a + ld [wCurMapScript], a ret -RLEList_5a379: ; 5a379 (16:6379) - db $40, $0C - db $20, $0C - db $80, $07 - db $20, $06 +WalkToLance_RLEList: + db D_UP, $0C + db D_LEFT, $0C + db D_DOWN, $07 + db D_LEFT, $06 db $FF -LanceScript3: ; 5a382 (16:6382) +LanceScript3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a ld [wJoyIgnore], a - ld [W_LANCECURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wLanceCurScript], a + ld [wCurMapScript], a ret -LanceTextPointers: ; 5a395 (16:6395) +LanceTextPointers: dw LanceText1 -LanceTrainerHeaders: ; 5a397 (16:6397) -LanceTrainerHeader0: ; 5a397 (16:6397) - db $1 ; flag's bit +LanceTrainerHeader0: + dbEventFlagBit EVENT_BEAT_LANCES_ROOM_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_LANCES_ROOM_TRAINER_0 + dw LanceBeforeBattleText ; TextBeforeBattle + dw LanceAfterBattleText ; TextAfterBattle + dw LanceEndBattleText ; TextEndBattle + dw LanceEndBattleText ; TextEndBattle db $ff -LanceText1: ; 5a3a4 (16:63a4) - db $08 ; asm +LanceText1: + TX_ASM ld hl, LanceTrainerHeader0 call TalkToTrainer jp TextScriptEnd -LanceBeforeBattleText: ; 5a3ae (16:63ae) +LanceBeforeBattleText: TX_FAR _LanceBeforeBattleText db "@" -LanceEndBattleText: ; 5a3b3 (16:63b3) +LanceEndBattleText: TX_FAR _LanceEndBattleText db "@" -LanceAfterBattleText: ; 5a3b8 (16:63b8) +LanceAfterBattleText: TX_FAR _LanceAfterBattleText - db $8 - ld hl, wd866 - set 6, [hl] + TX_ASM + SetEvent EVENT_BEAT_LANCE jp TextScriptEnd diff --git a/scripts/lavenderhouse1.asm b/scripts/lavenderhouse1.asm index 5fd1dd34..91b9286b 100755 --- a/scripts/lavenderhouse1.asm +++ b/scripts/lavenderhouse1.asm @@ -1,8 +1,8 @@ -LavenderHouse1Script: ; 1d8a8 (7:58a8) +LavenderHouse1Script: call EnableAutoTextBoxDrawing ret -LavenderHouse1TextPointers: ; 1d8ac (7:58ac) +LavenderHouse1TextPointers: dw LavenderHouse1Text1 dw LavenderHouse1Text2 dw LavenderHouse1Text3 @@ -10,107 +10,103 @@ LavenderHouse1TextPointers: ; 1d8ac (7:58ac) dw LavenderHouse1Text5 dw LavenderHouse1Text6 -LavenderHouse1Text1: ; 1d8b8 (7:58b8) - db $08 ; asm - ld a, [wd7e0] - bit 7, a - jr nz, .asm_72e5d ; 0x1d8be +LavenderHouse1Text1: + TX_ASM + CheckEvent EVENT_RESCUED_MR_FUJI + 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) +LavenderHouse1Text_1d8d1: TX_FAR _LavenderHouse1Text_1d8d1 db "@" -LavenderHouse1Text_1d8d6: ; 1d8d6 (7:58d6) +LavenderHouse1Text_1d8d6: TX_FAR _LavenderHouse1Text_1d8d6 db "@" -LavenderHouse1Text2: ; 1d8db (7:58db) - db $08 ; asm - ld a, [wd7e0] - bit 7, a - jr nz, .asm_06470 ; 0x1d8e1 +LavenderHouse1Text2: + TX_ASM + CheckEvent EVENT_RESCUED_MR_FUJI + 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) +LavenderHouse1Text_1d8f4: TX_FAR _LavenderHouse1Text_1d8f4 db "@" -LavenderHouse1Text_1d8f9: ; 1d8f9 (7:58f9) +LavenderHouse1Text_1d8f9: TX_FAR _LavenderHouse1Text_1d8f9 db "@" -LavenderHouse1Text3: ; 1d8fe (7:58fe) +LavenderHouse1Text3: TX_FAR _LavenderHouse1Text3 - db $8 + TX_ASM ld a, PSYDUCK call PlayCry jp TextScriptEnd -LavenderHouse1Text4: ; 1d90b (7:590b) +LavenderHouse1Text4: TX_FAR _LavenderHouse1Text4 - db $8 + TX_ASM ld a, NIDORINO call PlayCry jp TextScriptEnd -LavenderHouse1Text5: ; 1d918 (7:5918) - db $08 ; asm - ld a, [wd76c] - bit 0, a - jr nz, .asm_15ac2 ; 0x1d91e +LavenderHouse1Text5: + TX_ASM + CheckEvent EVENT_GOT_POKE_FLUTE + jr nz, .asm_15ac2 ld hl, LavenderHouse1Text_1d94c call PrintText - ld bc, (POKE_FLUTE << 8) | 1 + lb bc, POKE_FLUTE, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedFluteText call PrintText - ld hl, wd76c - set 0, [hl] - jr .asm_da749 ; 0x1d939 + SetEvent EVENT_GOT_POKE_FLUTE + 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) +LavenderHouse1Text_1d94c: TX_FAR _LavenderHouse1Text_1d94c db "@" -ReceivedFluteText: ; 1d951 (7:5951) +ReceivedFluteText: TX_FAR _ReceivedFluteText - db $11 + TX_SFX_KEY_ITEM TX_FAR _FluteExplanationText db "@" -FluteNoRoomText: ; 1d95b (7:595b) +FluteNoRoomText: TX_FAR _FluteNoRoomText db "@" -MrFujiAfterFluteText: ; 1d960 (7:5960) +MrFujiAfterFluteText: TX_FAR _MrFujiAfterFluteText db "@" -LavenderHouse1Text6: ; 1d965 (7:5965) +LavenderHouse1Text6: TX_FAR _LavenderHouse1Text6 db "@" diff --git a/scripts/lavenderhouse2.asm b/scripts/lavenderhouse2.asm index c2120058..b531c047 100755 --- a/scripts/lavenderhouse2.asm +++ b/scripts/lavenderhouse2.asm @@ -1,36 +1,35 @@ -LavenderHouse2Script: ; 1d9ae (7:59ae) +LavenderHouse2Script: call EnableAutoTextBoxDrawing ret -LavenderHouse2TextPointers: ; 1d9b2 (7:59b2) +LavenderHouse2TextPointers: dw LavenderHouse2Text1 dw LavenderHouse2Text2 -LavenderHouse2Text1: ; 1d9b6 (7:59b6) +LavenderHouse2Text1: TX_FAR _LavenderHouse2Text1 - db $8 + TX_ASM ld a, CUBONE call PlayCry jp TextScriptEnd -LavenderHouse2Text2: ; 1d9c3 (7:59c3) - db $08 ; asm - ld a, [wd7e0] - bit 7, a - jr nz, .asm_65711 ; 0x1d9c9 +LavenderHouse2Text2: + TX_ASM + CheckEvent EVENT_RESCUED_MR_FUJI + 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) +LavenderHouse2Text_1d9dc: TX_FAR _LavenderHouse2Text_1d9dc db "@" -LavenderHouse2Text_1d9e1: ; 1d9e1 (7:59e1) +LavenderHouse2Text_1d9e1: TX_FAR _LavenderHouse2Text_1d9e1 db "@" diff --git a/scripts/lavendermart.asm b/scripts/lavendermart.asm index 3852a235..51b64992 100755 --- a/scripts/lavendermart.asm +++ b/scripts/lavendermart.asm @@ -1,33 +1,32 @@ -LavenderMartScript: ; 5c92c (17:492c) +LavenderMartScript: jp EnableAutoTextBoxDrawing -LavenderMartTextPointers: ; 5c92f (17:492f) - dw LavenderMartText1 +LavenderMartTextPointers: + dw LavenderCashierText dw LavenderMartText2 dw LavenderMartText3 -LavenderMartText2: ; 5c935 (17:4935) +LavenderMartText2: TX_FAR _LavenderMartText2 db "@" -LavenderMartText3: ; 5c93a (17:493a) - db $08 ; asm - ld a, [wd7e0] - bit 7, a - jr nz, .asm_c88d4 ; 0x5c940 - ld hl, LavenderMart_5c953 +LavenderMartText3: + TX_ASM + CheckEvent EVENT_RESCUED_MR_FUJI + jr nz, .Nugget + ld hl, .ReviveText call PrintText - jr .asm_6d225 ; 0x5c948 -.asm_c88d4 ; 0x5c94a - ld hl, LavenderMart_5c958 + jr .done +.Nugget + ld hl, .NuggetText call PrintText -.asm_6d225 ; 0x5c950 +.done jp TextScriptEnd -LavenderMart_5c953: ; 5c953 (17:4953) - TX_FAR _LavenderMart_5c953 +.ReviveText + TX_FAR _LavenderMartReviveText db "@" -LavenderMart_5c958: ; 5c958 (17:4958) - TX_FAR _LavenderMart_5c958 +.NuggetText + TX_FAR _LavenderMartNuggetText db "@" diff --git a/scripts/lavenderpokecenter.asm b/scripts/lavenderpokecenter.asm index 452cc8a4..61d0b887 100755 --- a/scripts/lavenderpokecenter.asm +++ b/scripts/lavenderpokecenter.asm @@ -1,23 +1,23 @@ -LavenderPokecenterScript: ; 5c8da (17:48da) +LavenderPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -LavenderPokecenterTextPointers: ; 5c8e0 (17:48e0) - dw LavenderPokecenterText1 +LavenderPokecenterTextPointers: + dw LavenderHealNurseText dw LavenderPokecenterText2 dw LavenderPokecenterText3 - dw LavenderPokecenterText4 + dw LavenderTradeNurseText -LavenderPokecenterText4: ; 5c8e8 (17:48e8) - db $f6 +LavenderTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST -LavenderPokecenterText1: ; 5c8e9 (17:48e9) - db $ff +LavenderHealNurseText: + TX_POKECENTER_NURSE -LavenderPokecenterText2: ; 5c8ea (17:48ea) - TX_FAR _LavenderPokecenterText1 +LavenderPokecenterText2: + TX_FAR _LavenderPokecenterText2 db "@" -LavenderPokecenterText3: ; 5c8ef (17:48ef) +LavenderPokecenterText3: TX_FAR _LavenderPokecenterText3 db "@" diff --git a/scripts/lavendertown.asm b/scripts/lavendertown.asm index a4f1f200..daf490b1 100755 --- a/scripts/lavendertown.asm +++ b/scripts/lavendertown.asm @@ -1,7 +1,7 @@ -LavenderTownScript: ; 4410b (11:410b) +LavenderTownScript: jp EnableAutoTextBoxDrawing -LavenderTownTextPointers: ; 4410e (11:410e) +LavenderTownTextPointers: dw LavenderTownText1 dw LavenderTownText2 dw LavenderTownText3 @@ -12,52 +12,52 @@ LavenderTownTextPointers: ; 4410e (11:410e) dw LavenderTownText8 dw LavenderTownText9 -LavenderTownText1: ; 44120 (11:4120) - db $08 ; asm +LavenderTownText1: + 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 -LavenderTownText_4413c: ; 4413c (11:413c) +LavenderTownText_4413c: TX_FAR _LavenderTownText_4413c db "@" -LavenderTownText_44141: ; 44141 (11:4141) +LavenderTownText_44141: TX_FAR _LavenderTownText_44141 db "@" -LavenderTownText_44146: ; 44146 (11:4146) +LavenderTownText_44146: TX_FAR _LavenderTownText_44146 db "@" -LavenderTownText2: ; 4414b (11:414b) +LavenderTownText2: TX_FAR _LavenderTownText2 db "@" -LavenderTownText3: ; 44150 (11:4150) +LavenderTownText3: TX_FAR _LavenderTownText3 db "@" -LavenderTownText4: ; 44155 (11:4155) +LavenderTownText4: TX_FAR _LavenderTownText4 db "@" -LavenderTownText5: ; 4415a (11:415a) +LavenderTownText5: TX_FAR _LavenderTownText5 db "@" -LavenderTownText8: ; 4415f (11:415f) +LavenderTownText8: TX_FAR _LavenderTownText8 db "@" -LavenderTownText9: ; 44164 (11:4164) +LavenderTownText9: TX_FAR _LavenderTownText9 db "@" diff --git a/scripts/lorelei.asm b/scripts/lorelei.asm index ab769d94..ec29847a 100755 --- a/scripts/lorelei.asm +++ b/scripts/lorelei.asm @@ -1,47 +1,49 @@ -LoreleiScript: ; 7617b (1d:617b) - call LoreleiScript_76191 +LoreleiScript: + call LoreleiShowOrHideExitBlock call EnableAutoTextBoxDrawing - ld hl, LoreleiTrainerHeaders + ld hl, LoreleiTrainerHeader0 ld de, LoreleiScriptPointers - ld a, [W_LORELEICURSCRIPT] + ld a, [wLoreleiCurScript] call ExecuteCurMapScriptInTable - ld [W_LORELEICURSCRIPT], a + ld [wLoreleiCurScript], a ret -LoreleiScript_76191: ; 76191 (1d:6191) - ld hl, wd126 +LoreleiShowOrHideExitBlock: +; Blocks or clears the exit to the next room. + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, wd734 + ld hl, wBeatLorelei set 1, [hl] - ld a, [wd863] - bit 1, a - jr z, .asm_761a9 + CheckEvent EVENT_BEAT_LORELEIS_ROOM_TRAINER_0 + jr z, .blockExitToNextRoom ld a, $5 - jr .asm_761ab -.asm_761a9 + jr .setExitBlock +.blockExitToNextRoom ld a, $24 -.asm_761ab - ld [wd09f], a - ld bc, $2 +.setExitBlock + ld [wNewTileBlockID], a + lb bc, 0, 2 predef_jump ReplaceTileBlock -LoreleiScript_761b6: ; 761b6 (1d:61b6) +ResetLoreleiScript: xor a - ld [W_LORELEICURSCRIPT], a + ld [wLoreleiCurScript], a ret -LoreleiScriptPointers: ; 761bb (1d:61bb) +LoreleiScriptPointers: dw LoreleiScript0 dw DisplayEnemyTrainerTextAndStartBattle dw LoreleiScript2 dw LoreleiScript3 dw LoreleiScript4 -LoreleiScript4: ; 761c5 (1d:61c5) +LoreleiScript4: ret -asm_761c6: ; 761c6 (1d:61c6) + +LoreleiScriptWalkIntoRoom: +; Walk six steps upward. ld hl, wSimulatedJoypadStatesEnd ld a, D_UP ld [hli], a @@ -54,11 +56,12 @@ asm_761c6: ; 761c6 (1d:61c6) ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $3 - ld [W_LORELEICURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wLoreleiCurScript], a + ld [wCurMapScript], a ret -LoreleiScript0: ; 761e2 (1d:61e2) - ld hl, CoordsData_76223 + +LoreleiScript0: + ld hl, LoreleiEntranceCoords call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a @@ -66,87 +69,85 @@ LoreleiScript0: ; 761e2 (1d:61e2) ld [hJoyHeld], a ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesIndex], a - ld a, [wWhichTrade] ; wWhichTrade - cp $3 - jr c, .asm_76206 - ld hl, wd863 - bit 6, [hl] - set 6, [hl] - jr z, asm_761c6 -.asm_76206 + ld a, [wCoordIndex] + cp $3 ; Is player standing one tile above the exit? + jr c, .stopPlayerFromLeaving + CheckAndSetEvent EVENT_AUTOWALKED_INTO_LORELEIS_ROOM + jr z, LoreleiScriptWalkIntoRoom +.stopPlayerFromLeaving ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - call DisplayTextID + ld [hSpriteIndexOrTextID], a + call DisplayTextID ; "Don't run away!" ld a, D_UP ld [wSimulatedJoypadStatesEnd], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $3 - ld [W_LORELEICURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wLoreleiCurScript], a + ld [wCurMapScript], a ret -CoordsData_76223: ; 76223 (1d:6223) +LoreleiEntranceCoords: db $0A,$04 db $0A,$05 db $0B,$04 db $0B,$05 db $FF -LoreleiScript3: ; 7622c (1d:622c) +LoreleiScript3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a ld [wJoyIgnore], a - ld [W_LORELEICURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wLoreleiCurScript], a + ld [wCurMapScript], a ret -LoreleiScript2: ; 7623f (1d:623f) + +LoreleiScript2: call EndTrainerBattle - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [wIsInBattle] cp $ff - jp z, LoreleiScript_761b6 + jp z, ResetLoreleiScript ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a jp DisplayTextID -LoreleiTextPointers: ; 76251 (1d:6251) +LoreleiTextPointers: dw LoreleiText1 - dw LoreleiText2 + dw LoreleiDontRunAwayText -LoreleiTrainerHeaders: ; 76255 (1d:6255) -LoreleiTrainerHeader0: ; 76255 (1d:6255) - db $1 ; flag's bit +LoreleiTrainerHeader0: + dbEventFlagBit EVENT_BEAT_LORELEIS_ROOM_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_LORELEIS_ROOM_TRAINER_0 + dw LoreleiBeforeBattleText ; TextBeforeBattle + dw LoreleiAfterBattleText ; TextAfterBattle + dw LoreleiEndBattleText ; TextEndBattle + dw LoreleiEndBattleText ; TextEndBattle db $ff -LoreleiText1: ; 76262 (1d:6262) - db $08 ; asm +LoreleiText1: + TX_ASM ld hl, LoreleiTrainerHeader0 call TalkToTrainer jp TextScriptEnd -LoreleiBeforeBattleText: ; 7626c (1d:626c) +LoreleiBeforeBattleText: TX_FAR _LoreleiBeforeBattleText db "@" -LoreleiEndBattleText: ; 76271 (1d:6271) +LoreleiEndBattleText: TX_FAR _LoreleiEndBattleText db "@" -LoreleiAfterBattleText: ; 76276 (1d:6276) +LoreleiAfterBattleText: TX_FAR _LoreleiAfterBattleText db "@" -LoreleiText2: ; 7627b (1d:627b) - TX_FAR _LoreleiText2 +LoreleiDontRunAwayText: + TX_FAR _LoreleiDontRunAwayText db "@" diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm index 3e067a98..2fdc18c6 100755 --- a/scripts/mansion1.asm +++ b/scripts/mansion1.asm @@ -1,138 +1,134 @@ -Mansion1Script: ; 442af (11:42af) +Mansion1Script: call Mansion1Subscript1 call EnableAutoTextBoxDrawing - ld hl, Mansion1TrainerHeaders + ld hl, Mansion1TrainerHeader0 ld de, Mansion1ScriptPointers - ld a, [W_MANSION1CURSCRIPT] + ld a, [wMansion1CurScript] call ExecuteCurMapScriptInTable - ld [W_MANSION1CURSCRIPT], a + ld [wMansion1CurScript], a ret -Mansion1Subscript1: ; 442c5 (11:42c5) - ld hl, wd126 +Mansion1Subscript1: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd796] - bit 0, a - jr nz, .asm_442ec ; 0x442d2 $18 - ld bc, $060c + CheckEvent EVENT_MANSION_SWITCH_ON + jr nz, .asm_442ec + lb bc, 6, 12 call Mansion1Script_4430b - ld bc, $0308 + lb bc, 3, 8 call Mansion1Script_44304 - ld bc, $080a + lb bc, 8, 10 call Mansion1Script_44304 - ld bc, $0d0d + lb bc, 13, 13 jp Mansion1Script_44304 .asm_442ec - ld bc, $060c + lb bc, 6, 12 call Mansion1Script_44304 - ld bc, $0308 + lb bc, 3, 8 call Mansion1Script_4430b - ld bc, $080a + lb bc, 8, 10 call Mansion1Script_4430b - ld bc, $0d0d + lb bc, 13, 13 jp Mansion1Script_4430b -Mansion1Script_44304: ; 44304 (11:4304) +Mansion1Script_44304: ld a, $2d - ld [wd09f], a - jr asm_44310 + ld [wNewTileBlockID], a + jr Mansion1ReplaceBlock -Mansion1Script_4430b: ; 4430b (11:430b) +Mansion1Script_4430b: ld a, $e - ld [wd09f], a -asm_44310: ; 44310 (11:4310) + ld [wNewTileBlockID], a +Mansion1ReplaceBlock: predef ReplaceTileBlock ret -Mansion1Script_Switches: ; 44316 (11:4316) +Mansion1Script_Switches: ld a, [wSpriteStateData1 + 9] - cp $4 + cp SPRITE_FACING_UP ret nz xor a ld [hJoyHeld], a ld a, $4 - ld [H_SPRITEHEIGHT], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID -Mansion1ScriptPointers: ; 44326 (11:4326) +Mansion1ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Mansion1TextPointers: ; 4432c (11:432c) +Mansion1TextPointers: dw Mansion1Text1 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText dw Mansion1Text4 -Mansion1TrainerHeaders: ; 44334 (11:4334) -Mansion1TrainerHeader0: ; 44334 (11:4334) - db $1 ; flag's bit +Mansion1TrainerHeader0: + dbEventFlagBit EVENT_BEAT_MANSION_1_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_MANSION_1_TRAINER_0 + dw Mansion1BattleText2 ; TextBeforeBattle + dw Mansion1AfterBattleText2 ; TextAfterBattle + dw Mansion1EndBattleText2 ; TextEndBattle + dw Mansion1EndBattleText2 ; TextEndBattle db $ff -Mansion1Text1: ; 44341 (11:4341) - db $08 ; asm +Mansion1Text1: + TX_ASM ld hl, Mansion1TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Mansion1BattleText2: ; 4434b (11:434b) +Mansion1BattleText2: TX_FAR _Mansion1BattleText2 db "@" -Mansion1EndBattleText2: ; 44350 (11:4350) +Mansion1EndBattleText2: TX_FAR _Mansion1EndBattleText2 db "@" -Mansion1AfterBattleText2: ; 44355 (11:4355) +Mansion1AfterBattleText2: TX_FAR _Mansion1AfterBattleText2 db "@" -Mansion1Text4: ; 4435a (11:435a) - db $8 +Mansion1Text4: + 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 + ld hl, wCurrentMapScriptFlags set 5, [hl] ld hl, MansionSwitchPressedText call PrintText - ld a, (SFX_02_57 - SFX_Headers_02) / 3 + ld a, SFX_GO_INSIDE call PlaySound - ld hl, wd796 - bit 0, [hl] - set 0, [hl] - jr z, .asm_44392 ; 0x44386 $a - res 0, [hl] - jr .asm_44392 ; 0x4438a $6 + CheckAndSetEvent EVENT_MANSION_SWITCH_ON + jr z, .asm_44392 + ResetEventReuseHL EVENT_MANSION_SWITCH_ON + jr .asm_44392 .asm_4438c ld hl, MansionSwitchNotPressedText call PrintText .asm_44392 jp TextScriptEnd -MansionSwitchText: ; 44395 (11:4395) +MansionSwitchText: TX_FAR _MansionSwitchText db "@" -MansionSwitchPressedText: ; 4439a (11:439a) +MansionSwitchPressedText: TX_FAR _MansionSwitchPressedText db "@" -MansionSwitchNotPressedText: ; 4439f (11:439f) +MansionSwitchNotPressedText: TX_FAR _MansionSwitchNotPressedText db "@" diff --git a/scripts/mansion2.asm b/scripts/mansion2.asm index c643d229..ddc1ff7a 100755 --- a/scripts/mansion2.asm +++ b/scripts/mansion2.asm @@ -1,144 +1,140 @@ -Mansion2Script: ; 51fd8 (14:5fd8) +Mansion2Script: call Mansion2Script_51fee call EnableAutoTextBoxDrawing - ld hl, Mansion2TrainerHeaders + ld hl, Mansion2TrainerHeader0 ld de, Mansion2ScriptPointers - ld a, [W_MANSION2CURSCRIPT] + ld a, [wMansion2CurScript] call ExecuteCurMapScriptInTable - ld [W_MANSION2CURSCRIPT], a + ld [wMansion2CurScript], a ret -Mansion2Script_51fee: ; 51fee (14:5fee) - ld hl, wd126 +Mansion2Script_51fee: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd796] - bit 0, a + CheckEvent EVENT_MANSION_SWITCH_ON jr nz, .asm_52016 ld a, $e - ld bc, $204 + lb bc, 2, 4 call Mansion2Script_5202f ld a, $54 - ld bc, $409 + lb bc, 4, 9 call Mansion2Script_5202f ld a, $5f - ld bc, $b03 + lb bc, 11, 3 call Mansion2Script_5202f ret .asm_52016 ld a, $5f - ld bc, $204 + lb bc, 2, 4 call Mansion2Script_5202f ld a, $e - ld bc, $409 + lb bc, 4, 9 call Mansion2Script_5202f ld a, $e - ld bc, $b03 + lb bc, 11, 3 call Mansion2Script_5202f ret -Mansion2Script_5202f: ; 5202f (14:602f) - ld [wd09f], a +Mansion2Script_5202f: + ld [wNewTileBlockID], a predef_jump ReplaceTileBlock -Mansion2Script_Switches: ; 52037 (14:6037) +Mansion2Script_Switches: ld a, [wSpriteStateData1 + 9] - cp $4 + cp SPRITE_FACING_UP ret nz xor a ld [hJoyHeld], a ld a, $5 - ld [H_SPRITEHEIGHT], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID -Mansion2ScriptPointers: ; 52047 (14:6047) +Mansion2ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Mansion2TextPointers: ; 5204d (14:604d) +Mansion2TextPointers: dw Mansion2Text1 - dw Predef5CText + dw PickUpItemText dw Mansion2Text3 dw Mansion2Text4 dw Mansion2Text5 -Mansion2TrainerHeaders: ; 52057 (14:6057) -Mansion2TrainerHeader0: ; 52057 (14:6057) - db $1 ; flag's bit +Mansion2TrainerHeader0: + dbEventFlagBit EVENT_BEAT_MANSION_2_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_MANSION_2_TRAINER_0 + dw Mansion2BattleText1 ; TextBeforeBattle + dw Mansion2AfterBattleText1 ; TextAfterBattle + dw Mansion2EndBattleText1 ; TextEndBattle + dw Mansion2EndBattleText1 ; TextEndBattle db $ff -Mansion2Text1: ; 52064 (14:6064) - db $08 ; asm +Mansion2Text1: + TX_ASM ld hl, Mansion2TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Mansion2BattleText1: ; 5206e (14:606e) +Mansion2BattleText1: TX_FAR _Mansion2BattleText1 db "@" -Mansion2EndBattleText1: ; 52073 (14:6073) +Mansion2EndBattleText1: TX_FAR _Mansion2EndBattleText1 db "@" -Mansion2AfterBattleText1: ; 52078 (14:6078) +Mansion2AfterBattleText1: TX_FAR _Mansion2AfterBattleText1 db "@" -Mansion2Text3: ; 5207d (14:607d) +Mansion2Text3: TX_FAR _Mansion2Text3 db "@" -Mansion2Text4: ; 52082 (14:6082) +Mansion2Text4: TX_FAR _Mansion2Text4 db "@" -Mansion3Text6: ; 52087 (14:6087) -Mansion2Text5: ; 52087 (14:6087) - db $8 +Mansion3Text6: +Mansion2Text5: + 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 + ld hl, wCurrentMapScriptFlags set 5, [hl] ld hl, Mansion2Text_520c7 call PrintText - ld a, (SFX_02_57 - SFX_Headers_02) / 3 + ld a, SFX_GO_INSIDE call PlaySound - ld hl, wd796 - bit 0, [hl] - set 0, [hl] - jr z, .asm_520bf ; 0x520b3 $a - res 0, [hl] - jr .asm_520bf ; 0x520b7 $6 + CheckAndSetEvent EVENT_MANSION_SWITCH_ON + jr z, .asm_520bf + ResetEventReuseHL EVENT_MANSION_SWITCH_ON + jr .asm_520bf .asm_520b9 ld hl, Mansion2Text_520cc call PrintText .asm_520bf jp TextScriptEnd -Mansion2Text_520c2: ; 520c2 (14:60c2) +Mansion2Text_520c2: TX_FAR _Mansion2Text_520c2 db "@" -Mansion2Text_520c7: ; 520c7 (14:60c7) +Mansion2Text_520c7: TX_FAR _Mansion2Text_520c7 db "@" -Mansion2Text_520cc: ; 520cc (14:60cc) +Mansion2Text_520cc: TX_FAR _Mansion2Text_520cc db "@" diff --git a/scripts/mansion3.asm b/scripts/mansion3.asm index 6ad02dd9..abe76df8 100755 --- a/scripts/mansion3.asm +++ b/scripts/mansion3.asm @@ -1,20 +1,19 @@ -Mansion3Script: ; 521ee (14:61ee) +Mansion3Script: call Mansion3Script_52204 call EnableAutoTextBoxDrawing ld hl, Mansion3TrainerHeader0 ld de, Mansion3ScriptPointers - ld a, [W_MANSION3CURSCRIPT] + ld a, [wMansion3CurScript] call ExecuteCurMapScriptInTable - ld [W_MANSION3CURSCRIPT], a + ld [wMansion3CurScript], a ret -Mansion3Script_52204: ; 52204 (14:6204) - ld hl, wd126 +Mansion3Script_52204: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd796] - bit 0, a + CheckEvent EVENT_MANSION_SWITCH_ON jr nz, .asm_52224 ld a, $e ld bc, $207 @@ -32,12 +31,12 @@ Mansion3Script_52204: ; 52204 (14:6204) call Mansion2Script_5202f ret -Mansion3ScriptPointers: ; 52235 (14:6235) +Mansion3ScriptPointers: dw Mansion3Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Mansion3Script0: ; 5223b (14:623b) +Mansion3Script0: ld hl, CoordsData_52254 call Mansion3Script_5225b ld a, [wWhichDungeonWarp] @@ -51,13 +50,13 @@ Mansion3Script0: ; 5223b (14:623b) ld [wDungeonWarpDestinationMap], a ret -CoordsData_52254: ; 52254 (14:6254) +CoordsData_52254: db $0E,$10 db $0E,$11 db $0E,$13 db $FF -Mansion3Script_5225b: ; 5225b (14:625b) +Mansion3Script_5225b: xor a ld [wWhichDungeonWarp], a ld a, [wd72d] @@ -65,7 +64,7 @@ Mansion3Script_5225b: ; 5225b (14:625b) ret nz call ArePlayerCoordsInArray ret nc - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wCoordIndex] ld [wWhichDungeonWarp], a ld hl, wd72d set 4, [hl] @@ -73,81 +72,80 @@ Mansion3Script_5225b: ; 5225b (14:625b) set 4, [hl] ret -Mansion3Script_Switches: ; 5227a (14:627a) +Mansion3Script_Switches: 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 [hSpriteIndexOrTextID], a jp DisplayTextID -Mansion3TextPointers: ; 5228a (14:628a) +Mansion3TextPointers: dw Mansion3Text1 dw Mansion3Text2 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText dw Mansion3Text5 dw Mansion3Text6 -Mansion3TrainerHeaders: ; 52296 (14:6296) -Mansion3TrainerHeader0: ; 52296 (14:6296) - db $1 ; flag's bit +Mansion3TrainerHeader0: + dbEventFlagBit EVENT_BEAT_MANSION_3_TRAINER_0 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 - -Mansion3TrainerHeader2: ; 522a2 (14:62a2) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MANSION_3_TRAINER_0 + dw Mansion3BattleText1 ; TextBeforeBattle + dw Mansion3AfterBattleText1 ; TextAfterBattle + dw Mansion3EndBattleText1 ; TextEndBattle + dw Mansion3EndBattleText1 ; TextEndBattle + +Mansion3TrainerHeader1: + dbEventFlagBit EVENT_BEAT_MANSION_3_TRAINER_1 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 + dwEventFlagAddress EVENT_BEAT_MANSION_3_TRAINER_1 + dw Mansion3BattleText2 ; TextBeforeBattle + dw Mansion3AfterBattleText2 ; TextAfterBattle + dw Mansion3EndBattleText2 ; TextEndBattle + dw Mansion3EndBattleText2 ; TextEndBattle db $ff -Mansion3Text1: ; 522af (14:62af) - db $08 ; asm +Mansion3Text1: + TX_ASM ld hl, Mansion3TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Mansion3Text2: ; 522b9 (14:62b9) - db $08 ; asm - ld hl, Mansion3TrainerHeader2 +Mansion3Text2: + TX_ASM + ld hl, Mansion3TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Mansion3BattleText1: ; 522c3 (14:62c3) +Mansion3BattleText1: TX_FAR _Mansion3BattleText1 db "@" -Mansion3EndBattleText1: ; 522c8 (14:62c8) +Mansion3EndBattleText1: TX_FAR _Mansion3EndBattleText1 db "@" -Mansion3AfterBattleText1: ; 522cd (14:62cd) +Mansion3AfterBattleText1: TX_FAR _Mansion3AfterBattleText1 db "@" -Mansion3BattleText2: ; 522d2 (14:62d2) +Mansion3BattleText2: TX_FAR _Mansion3BattleText2 db "@" -Mansion3EndBattleText2: ; 522d7 (14:62d7) +Mansion3EndBattleText2: TX_FAR _Mansion3EndBattleText2 db "@" -Mansion3AfterBattleText2: ; 522dc (14:62dc) +Mansion3AfterBattleText2: TX_FAR _Mansion3AfterBattleText2 db "@" -Mansion3Text5: ; 522e1 (14:62e1) +Mansion3Text5: TX_FAR _Mansion3Text5 db "@" diff --git a/scripts/mansion4.asm b/scripts/mansion4.asm index b89af5f2..de8a5d58 100755 --- a/scripts/mansion4.asm +++ b/scripts/mansion4.asm @@ -1,20 +1,19 @@ -Mansion4Script: ; 523b9 (14:63b9) +Mansion4Script: call Mansion4Script_523cf call EnableAutoTextBoxDrawing ld hl, Mansion4TrainerHeader0 ld de, Mansion4ScriptPointers - ld a, [W_MANSION4CURSCRIPT] + ld a, [wMansion4CurScript] call ExecuteCurMapScriptInTable - ld [W_MANSION4CURSCRIPT], a + ld [wMansion4CurScript], a ret -Mansion4Script_523cf: ; 523cf (14:63cf) - ld hl, wd126 +Mansion4Script_523cf: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd796] - bit 0, a + CheckEvent EVENT_MANSION_SWITCH_ON jr nz, .asm_523ff ld a, $e ld bc, $80d @@ -44,89 +43,88 @@ Mansion4Script_523cf: ; 523cf (14:63cf) call Mansion2Script_5202f ret -Mansion4Script_Switches: ; 52420 (14:6420) +Mansion4Script_Switches: 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 [hSpriteIndexOrTextID], a jp DisplayTextID -Mansion4ScriptPointers: ; 52430 (14:6430) +Mansion4ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Mansion4TextPointers: ; 52436 (14:6436) +Mansion4TextPointers: dw Mansion4Text1 dw Mansion4Text2 - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw Mansion4Text7 - dw Predef5CText + dw PickUpItemText dw Mansion3Text6 -Mansion4TrainerHeaders: ; 52448 (14:6448) -Mansion4TrainerHeader0: ; 52448 (14:6448) - db $1 ; flag's bit +Mansion4TrainerHeader0: + dbEventFlagBit EVENT_BEAT_MANSION_4_TRAINER_0 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 - -Mansion4TrainerHeader2: ; 52454 (14:6454) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MANSION_4_TRAINER_0 + dw Mansion4BattleText1 ; TextBeforeBattle + dw Mansion4AfterBattleText1 ; TextAfterBattle + dw Mansion4EndBattleText1 ; TextEndBattle + dw Mansion4EndBattleText1 ; TextEndBattle + +Mansion4TrainerHeader1: + dbEventFlagBit EVENT_BEAT_MANSION_4_TRAINER_1 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 + dwEventFlagAddress EVENT_BEAT_MANSION_4_TRAINER_1 + dw Mansion4BattleText2 ; TextBeforeBattle + dw Mansion4AfterBattleText2 ; TextAfterBattle + dw Mansion4EndBattleText2 ; TextEndBattle + dw Mansion4EndBattleText2 ; TextEndBattle db $ff -Mansion4Text1: ; 52461 (14:6461) - db $08 ; asm +Mansion4Text1: + TX_ASM ld hl, Mansion4TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Mansion4Text2: ; 5246b (14:646b) - db $08 ; asm - ld hl, Mansion4TrainerHeader2 +Mansion4Text2: + TX_ASM + ld hl, Mansion4TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Mansion4BattleText1: ; 52475 (14:6475) +Mansion4BattleText1: TX_FAR _Mansion4BattleText1 db "@" -Mansion4EndBattleText1: ; 5247a (14:647a) +Mansion4EndBattleText1: TX_FAR _Mansion4EndBattleText1 db "@" -Mansion4AfterBattleText1: ; 5247f (14:647f) +Mansion4AfterBattleText1: TX_FAR _Mansion4AfterBattleText1 db "@" -Mansion4BattleText2: ; 52484 (14:6484) +Mansion4BattleText2: TX_FAR _Mansion4BattleText2 db "@" -Mansion4EndBattleText2: ; 52489 (14:6489) +Mansion4EndBattleText2: TX_FAR _Mansion4EndBattleText2 db "@" -Mansion4AfterBattleText2: ; 5248e (14:648e) +Mansion4AfterBattleText2: TX_FAR _Mansion4AfterBattleText2 db "@" -Mansion4Text7: ; 52493 (14:6493) +Mansion4Text7: TX_FAR _Mansion4Text7 db "@" diff --git a/scripts/mtmoon1.asm b/scripts/mtmoon1.asm index def597ba..5ee3d025 100755 --- a/scripts/mtmoon1.asm +++ b/scripts/mtmoon1.asm @@ -1,18 +1,18 @@ -MtMoon1Script: ; 499c8 (12:59c8) +MtMoon1Script: call EnableAutoTextBoxDrawing ld hl, MtMoon1TrainerHeader0 ld de, MtMoon1ScriptPointers - ld a, [W_MTMOON1CURSCRIPT] + ld a, [wMtMoon1CurScript] call ExecuteCurMapScriptInTable - ld [W_MTMOON1CURSCRIPT], a + ld [wMtMoon1CurScript], a ret -MtMoon1ScriptPointers: ; 499db (12:59db) +MtMoon1ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -MtMoon1TextPointers: ; 499e1 (12:59e1) +MtMoon1TextPointers: dw MtMoon1Text1 dw MtMoon1Text2 dw MtMoon1Text3 @@ -20,206 +20,205 @@ MtMoon1TextPointers: ; 499e1 (12:59e1) dw MtMoon1Text5 dw MtMoon1Text6 dw MtMoon1Text7 - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw MtMoon1Text14 -MtMoon1TrainerHeaders: ; 499fd (12:59fd) -MtMoon1TrainerHeader0: ; 499fd (12:59fd) - db $1 ; flag's bit +MtMoon1TrainerHeader0: + dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_0 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 - -MtMoon1TrainerHeader2: ; 49a09 (12:5a09) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_0 + dw MtMoon1BattleText2 ; TextBeforeBattle + dw MtMoon1AfterBattleText2 ; TextAfterBattle + dw MtMoon1EndBattleText2 ; TextEndBattle + dw MtMoon1EndBattleText2 ; TextEndBattle + +MtMoon1TrainerHeader1: + dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_1 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 - -MtMoon1TrainerHeader3: ; 49a15 (12:5a15) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_1 + dw MtMoon1BattleText3 ; TextBeforeBattle + dw MtMoon1AfterBattleText3 ; TextAfterBattle + dw MtMoon1EndBattleText3 ; TextEndBattle + dw MtMoon1EndBattleText3 ; TextEndBattle + +MtMoon1TrainerHeader2: + dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_2 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 - -MtMoon1TrainerHeader4: ; 49a21 (12:5a21) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_2 + dw MtMoon1BattleText4 ; TextBeforeBattle + dw MtMoon1AfterBattleText4 ; TextAfterBattle + dw MtMoon1EndBattleText4 ; TextEndBattle + dw MtMoon1EndBattleText4 ; TextEndBattle + +MtMoon1TrainerHeader3: + dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_3 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 - -MtMoon1TrainerHeader5: ; 49a2d (12:5a2d) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_3 + dw MtMoon1BattleText5 ; TextBeforeBattle + dw MtMoon1AfterBattleText5 ; TextAfterBattle + dw MtMoon1EndBattleText5 ; TextEndBattle + dw MtMoon1EndBattleText5 ; TextEndBattle + +MtMoon1TrainerHeader4: + dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_4 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 - -MtMoon1TrainerHeader6: ; 49a39 (12:5a39) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_4 + dw MtMoon1BattleText6 ; TextBeforeBattle + dw MtMoon1AfterBattleText6 ; TextAfterBattle + dw MtMoon1EndBattleText6 ; TextEndBattle + dw MtMoon1EndBattleText6 ; TextEndBattle + +MtMoon1TrainerHeader5: + dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_5 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 - -MtMoon1TrainerHeader7: ; 49a45 (12:5a45) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_5 + dw MtMoon1BattleText7 ; TextBeforeBattle + dw MtMoon1AfterBattleText7 ; TextAfterBattle + dw MtMoon1EndBattleText7 ; TextEndBattle + dw MtMoon1EndBattleText7 ; TextEndBattle + +MtMoon1TrainerHeader6: + dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_6 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 + dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_6 + dw MtMoon1BattleText8 ; TextBeforeBattle + dw MtMoon1AfterBattleText8 ; TextAfterBattle + dw MtMoon1EndBattleText8 ; TextEndBattle + dw MtMoon1EndBattleText8 ; TextEndBattle db $ff -MtMoon1Text1: ; 49a52 (12:5a52) - db $08 ; asm +MtMoon1Text1: + TX_ASM ld hl, MtMoon1TrainerHeader0 call TalkToTrainer jp TextScriptEnd -MtMoon1Text2: ; 49a5c (12:5a5c) - db $08 ; asm +MtMoon1Text2: + TX_ASM + ld hl, MtMoon1TrainerHeader1 + call TalkToTrainer + jp TextScriptEnd + +MtMoon1Text3: + TX_ASM ld hl, MtMoon1TrainerHeader2 call TalkToTrainer jp TextScriptEnd -MtMoon1Text3: ; 49a66 (12:5a66) - db $08 ; asm +MtMoon1Text4: + TX_ASM ld hl, MtMoon1TrainerHeader3 call TalkToTrainer jp TextScriptEnd -MtMoon1Text4: ; 49a70 (12:5a70) - db $08 ; asm +MtMoon1Text5: + TX_ASM ld hl, MtMoon1TrainerHeader4 call TalkToTrainer jp TextScriptEnd -MtMoon1Text5: ; 49a7a (12:5a7a) - db $08 ; asm +MtMoon1Text6: + TX_ASM ld hl, MtMoon1TrainerHeader5 call TalkToTrainer jp TextScriptEnd -MtMoon1Text6: ; 49a84 (12:5a84) - db $08 ; asm +MtMoon1Text7: + TX_ASM ld hl, MtMoon1TrainerHeader6 call TalkToTrainer jp TextScriptEnd -MtMoon1Text7: ; 49a8e (12:5a8e) - db $08 ; asm - ld hl, MtMoon1TrainerHeader7 - call TalkToTrainer - jp TextScriptEnd - -MtMoon1BattleText2: ; 49a98 (12:5a98) +MtMoon1BattleText2: TX_FAR _MtMoon1BattleText2 db "@" -MtMoon1EndBattleText2: ; 49a9d (12:5a9d) +MtMoon1EndBattleText2: TX_FAR _MtMoon1EndBattleText2 db "@" -MtMoon1AfterBattleText2: ; 49aa2 (12:5aa2) +MtMoon1AfterBattleText2: TX_FAR _MtMoon1AfterBattleText2 db "@" -MtMoon1BattleText3: ; 49aa7 (12:5aa7) +MtMoon1BattleText3: TX_FAR _MtMoon1BattleText3 db "@" -MtMoon1EndBattleText3: ; 49aac (12:5aac) +MtMoon1EndBattleText3: TX_FAR _MtMoon1EndBattleText3 db "@" -MtMoon1AfterBattleText3: ; 49ab1 (12:5ab1) +MtMoon1AfterBattleText3: TX_FAR _MtMoon1AfterBattleText3 db "@" -MtMoon1BattleText4: ; 49ab6 (12:5ab6) +MtMoon1BattleText4: TX_FAR _MtMoon1BattleText4 db "@" -MtMoon1EndBattleText4: ; 49abb (12:5abb) +MtMoon1EndBattleText4: TX_FAR _MtMoon1EndBattleText4 db "@" -MtMoon1AfterBattleText4: ; 49ac0 (12:5ac0) +MtMoon1AfterBattleText4: TX_FAR _MtMoon1AfterBattleText4 db "@" -MtMoon1BattleText5: ; 49ac5 (12:5ac5) +MtMoon1BattleText5: TX_FAR _MtMoon1BattleText5 db "@" -MtMoon1EndBattleText5: ; 49aca (12:5aca) +MtMoon1EndBattleText5: TX_FAR _MtMoon1EndBattleText5 db "@" -MtMoon1AfterBattleText5: ; 49acf (12:5acf) +MtMoon1AfterBattleText5: TX_FAR _MtMoon1AfterBattleText5 db "@" -MtMoon1BattleText6: ; 49ad4 (12:5ad4) +MtMoon1BattleText6: TX_FAR _MtMoon1BattleText6 db "@" -MtMoon1EndBattleText6: ; 49ad9 (12:5ad9) +MtMoon1EndBattleText6: TX_FAR _MtMoon1EndBattleText6 db "@" -MtMoon1AfterBattleText6: ; 49ade (12:5ade) +MtMoon1AfterBattleText6: TX_FAR _MtMoon1AfterBattleText6 db "@" -MtMoon1BattleText7: ; 49ae3 (12:5ae3) +MtMoon1BattleText7: TX_FAR _MtMoon1BattleText7 db "@" -MtMoon1EndBattleText7: ; 49ae8 (12:5ae8) +MtMoon1EndBattleText7: TX_FAR _MtMoon1EndBattleText7 db "@" -MtMoon1AfterBattleText7: ; 49aed (12:5aed) +MtMoon1AfterBattleText7: TX_FAR _MtMoon1AfterBattleText7 db "@" -MtMoon1BattleText8: ; 49af2 (12:5af2) +MtMoon1BattleText8: TX_FAR _MtMoon1BattleText8 db "@" -MtMoon1EndBattleText8: ; 49af7 (12:5af7) +MtMoon1EndBattleText8: TX_FAR _MtMoon1EndBattleText8 db "@" -MtMoon1AfterBattleText8: ; 49afc (12:5afc) +MtMoon1AfterBattleText8: TX_FAR _MtMoon1AfterBattleText8 db "@" -MtMoon1Text14: ; 49b01 (12:5b01) +MtMoon1Text14: TX_FAR _MtMoon1Text14 db "@" diff --git a/scripts/mtmoon2.asm b/scripts/mtmoon2.asm index 03e9d9cb..6d1e5339 100755 --- a/scripts/mtmoon2.asm +++ b/scripts/mtmoon2.asm @@ -1,10 +1,10 @@ -MtMoon2Script: ; 51a42 (14:5a42) +MtMoon2Script: call EnableAutoTextBoxDrawing ret -MtMoon2TextPointers: ; 51a46 (14:5a46) +MtMoon2TextPointers: dw MtMoonText1 -MtMoonText1: ; 51a48 (14:5a48) +MtMoonText1: TX_FAR _MtMoonText1 db "@" diff --git a/scripts/mtmoon3.asm b/scripts/mtmoon3.asm index eb0fc301..60cd1ab8 100755 --- a/scripts/mtmoon3.asm +++ b/scripts/mtmoon3.asm @@ -1,16 +1,15 @@ -MtMoon3Script: ; 49d0b (12:5d0b) +MtMoon3Script: call EnableAutoTextBoxDrawing - ld hl, MtMoon3TrainerHeader0 ; $5e48 + ld hl, MtMoon3TrainerHeader0 ld de, MtMoon3ScriptPointers - ld a, [W_MTMOON3CURSCRIPT] + ld a, [wMtMoon3CurScript] call ExecuteCurMapScriptInTable - ld [W_MTMOON3CURSCRIPT], a - ld a, [wd7f6] - bit 1, a + ld [wMtMoon3CurScript], a + CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD 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 @@ -19,7 +18,7 @@ MtMoon3Script: ; 49d0b (12:5d0b) res 4, [hl] ret -CoordsData_49d37: ; 49d37 (12:5d37) +CoordsData_49d37: db $05,$0B db $05,$0C db $05,$0D @@ -38,14 +37,14 @@ CoordsData_49d37: ; 49d37 (12:5d37) db $08,$0E db $FF -MtMoon3Script_49d58: ; 49d58 (12:5d58) +MtMoon3Script_49d58: xor a ld [wJoyIgnore], a - ld [W_MTMOON3CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wMtMoon3CurScript], a + ld [wCurMapScript], a ret -MtMoon3ScriptPointers: ; 49d63 (12:5d63) +MtMoon3ScriptPointers: dw MtMoon3Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle @@ -53,46 +52,43 @@ MtMoon3ScriptPointers: ; 49d63 (12:5d63) dw MtMoon3Script4 dw MtMoon3Script5 -MtMoon3Script0: ; 49d6f (12:5d6f) - ld a, [wd7f6] - bit 1, a +MtMoon3Script0: + CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD jp nz, MtMoon3Script_49d91 - ld a, [W_YCOORD] ; wd361 + ld a, [wYCoord] cp $8 jp nz, MtMoon3Script_49d91 - ld a, [W_XCOORD] ; wd362 + ld a, [wXCoord] cp $d jp nz, MtMoon3Script_49d91 xor a ld [hJoyHeld], a ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a jp DisplayTextID -MtMoon3Script_49d91: ; 49d91 (12:5d91) - ld a, [wd7f6] - and $c0 +MtMoon3Script_49d91: + CheckEitherEventSet EVENT_GOT_DOME_FOSSIL, EVENT_GOT_HELIX_FOSSIL jp z, CheckFightingMapTrainers ret -MtMoon3Script3: ; 49d9a (12:5d9a) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +MtMoon3Script3: + ld a, [wIsInBattle] cp $ff jp z, MtMoon3Script_49d58 call UpdateSprites call Delay3 - ld hl, wd7f6 - set 1, [hl] + SetEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD xor a ld [wJoyIgnore], a ld a, $0 - ld [W_MTMOON3CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wMtMoon3CurScript], a + ld [wCurMapScript], a ret -MtMoon3Script4: ; 49dba (12:5dba) +MtMoon3Script4: ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF ld hl, CoordsData_49dea call ArePlayerCoordsInArray @@ -106,32 +102,32 @@ MtMoon3Script4: ; 49dba (12:5dba) ld de, MovementData_49df8 .asm_49dda ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a call MoveSprite ld a, $5 - ld [W_MTMOON3CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wMtMoon3CurScript], a + ld [wCurMapScript], a ret -CoordsData_49dea: ; 49dea (12:5dea) +CoordsData_49dea: db $07,$0C db $06,$0B db $05,$0C db $FF -CoordsData_49df1: ; 49df1 (12:5df1) +CoordsData_49df1: db $07,$0D db $06,$0E db $05,$0E db $FF -MovementData_49df8: ; 49df8 (12:5df8) - db $C0 +MovementData_49df8: + db NPC_MOVEMENT_RIGHT -MovementData_49df9: ; 49df9 (12:5df9) - db $40,$FF +MovementData_49df9: + db NPC_MOVEMENT_UP,$FF -MtMoon3Script5: ; 49dfb (12:5dfb) +MtMoon3Script5: ld a, [wd730] bit 0, a ret nz @@ -140,26 +136,25 @@ MtMoon3Script5: ; 49dfb (12:5dfb) ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $a - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld a, [wd7f6] - bit 6, a + CheckEvent EVENT_GOT_DOME_FOSSIL jr z, .asm_49e1d ld a, HS_MT_MOON_3_FOSSIL_2 jr .asm_49e1f .asm_49e1d ld a, HS_MT_MOON_3_FOSSIL_1 .asm_49e1f - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject xor a ld [wJoyIgnore], a ld a, $0 - ld [W_MTMOON3CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wMtMoon3CurScript], a + ld [wCurMapScript], a ret -MtMoon3TextPointers: ; 49e34 (12:5e34) +MtMoon3TextPointers: dw MtMoon3Text1 dw MtMoon3Text2 dw MtMoon3Text3 @@ -167,60 +162,58 @@ MtMoon3TextPointers: ; 49e34 (12:5e34) dw MtMoon3Text5 dw MtMoon3Text6 dw MtMoon3Text7 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText dw MtMoon3Text_49f99 -MtMoon3TrainerHeaders: ; 49e48 (12:5e48) -MtMoon3TrainerHeader0: ; 49e48 (12:5e48) - db $2 ; flag's bit +MtMoon3TrainerHeader0: + dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_0 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 - -MtMoon3TrainerHeader2: ; 49e54 (12:5e54) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_0 + dw MtMoon3BattleText2 ; TextBeforeBattle + dw MtMoon3AfterBattleText2 ; TextAfterBattle + dw MtMoon3EndBattleText2 ; TextEndBattle + dw MtMoon3EndBattleText2 ; TextEndBattle + +MtMoon3TrainerHeader1: + dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_1 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 - -MtMoon3TrainerHeader3: ; 49e60 (12:5e60) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_1 + dw MtMoon3BattleText3 ; TextBeforeBattle + dw MtMoon3AfterBattleText3 ; TextAfterBattle + dw MtMoon3EndBattleText3 ; TextEndBattle + dw MtMoon3EndBattleText3 ; TextEndBattle + +MtMoon3TrainerHeader2: + dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_2 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 - -MtMoon3TrainerHeader4: ; 49e6c (12:5e6c) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_2 + dw MtMoon3BattleText4 ; TextBeforeBattle + dw MtMoon3AfterBattleText4 ; TextAfterBattle + dw MtMoon3EndBattleText4 ; TextEndBattle + dw MtMoon3EndBattleText4 ; TextEndBattle + +MtMoon3TrainerHeader3: + dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_3 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 + dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_3 + dw MtMoon3BattleText5 ; TextBeforeBattle + dw MtMoon3AfterBattleText5 ; TextAfterBattle + dw MtMoon3EndBattleText5 ; TextEndBattle + dw MtMoon3EndBattleText5 ; TextEndBattle db $ff -MtMoon3Text1: ; 49e79 (12:5e79) - db $08 ; asm - ld a, [wd7f6] - bit 1, a - jr z, .asm_be1e0 ; 0x49e7f +MtMoon3Text1: + TX_ASM + CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD + 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 +222,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 + ld [wMtMoon3CurScript], a + ld [wCurMapScript], a + 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 +MtMoon3Text2: + TX_ASM ld hl, MtMoon3TrainerHeader0 call TalkToTrainer jp TextScriptEnd -MtMoon3Text3: ; 49ecb (12:5ecb) - db $08 ; asm - ld hl, MtMoon3TrainerHeader2 +MtMoon3Text3: + TX_ASM + ld hl, MtMoon3TrainerHeader1 call TalkToTrainer jp TextScriptEnd -MtMoon3Text4: ; 49ed5 (12:5ed5) - db $08 ; asm - ld hl, MtMoon3TrainerHeader3 +MtMoon3Text4: + TX_ASM + ld hl, MtMoon3TrainerHeader2 call TalkToTrainer jp TextScriptEnd -MtMoon3Text5: ; 49edf (12:5edf) - db $08 ; asm - ld hl, MtMoon3TrainerHeader4 ; $5e6c +MtMoon3Text5: + TX_ASM + ld hl, MtMoon3TrainerHeader3 call TalkToTrainer jp TextScriptEnd -MtMoon3Text6: ; 49ee9 (12:5ee9) - db $08 ; asm +MtMoon3Text6: + TX_ASM ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, MtMoon3Text_49f24 @@ -276,28 +269,27 @@ MtMoon3Text6: ; 49ee9 (12:5ee9) call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_1fa5e ; 0x49efc - ld bc,(DOME_FOSSIL << 8) | 1 + jr nz, .asm_49f21 + lb bc, DOME_FOSSIL, 1 call GiveItem jp nc, MtMoon3Script_49f76 call MtMoon3Script_49f69 ld a, HS_MT_MOON_3_FOSSIL_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject - ld hl, wd7f6 - set 6, [hl] + SetEvent EVENT_GOT_DOME_FOSSIL ld a, $4 - ld [W_MTMOON3CURSCRIPT], a - ld [W_CURMAPSCRIPT], a -.asm_1fa5e ; 0x49f21 + ld [wMtMoon3CurScript], a + ld [wCurMapScript], a +.asm_49f21 jp TextScriptEnd -MtMoon3Text_49f24: ; 49f24 (12:5f24) +MtMoon3Text_49f24: TX_FAR _MtMoon3Text_49f24 db "@" -MtMoon3Text7: ; 49f29 (12:5f29) - db $08 ; asm +MtMoon3Text7: + TX_ASM ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, MtMoon3Text_49f64 @@ -305,107 +297,110 @@ MtMoon3Text7: ; 49f29 (12:5f29) call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_8e988 ; 0x49f3c - ld bc, (HELIX_FOSSIL << 8) | 1 + jr nz, .asm_49f61 + lb bc, HELIX_FOSSIL, 1 call GiveItem jp nc, MtMoon3Script_49f76 call MtMoon3Script_49f69 ld a, HS_MT_MOON_3_FOSSIL_2 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject - ld hl, wd7f6 - set 7, [hl] + SetEvent EVENT_GOT_HELIX_FOSSIL ld a, $4 - ld [W_MTMOON3CURSCRIPT], a - ld [W_CURMAPSCRIPT], a -.asm_8e988 ; 0x49f61 + ld [wMtMoon3CurScript], a + ld [wCurMapScript], a +.asm_49f61 jp TextScriptEnd -MtMoon3Text_49f64: ; 49f64 (12:5f64) +MtMoon3Text_49f64: TX_FAR _MtMoon3Text_49f64 db "@" -MtMoon3Script_49f69: ; 49f69 (12:5f69) +MtMoon3Script_49f69: ld hl, MtMoon3Text_49f6f jp PrintText -MtMoon3Text_49f6f: ; 49f6f (12:5f6f) - TX_FAR _MtMoon3Text_49f6f ; 0x80995 - db $11, $d, "@" +MtMoon3Text_49f6f: + TX_FAR _MtMoon3Text_49f6f + TX_SFX_KEY_ITEM + TX_WAIT + db "@" -MtMoon3Script_49f76: ; 49f76 (12:5f76) +MtMoon3Script_49f76: ld hl, MtMoon3Text_49f7f call PrintText jp TextScriptEnd -MtMoon3Text_49f7f: ; 49f7f (12:5f7f) - TX_FAR _MtMoon3Text_49f7f ; 0x809a8 - db $d, "@" +MtMoon3Text_49f7f: + TX_FAR _MtMoon3Text_49f7f + TX_WAIT + db "@" -MtMoon3Text_49f85: ; 49f85 (12:5f85) +MtMoon3Text_49f85: TX_FAR _MtMoon3Text_49f85 db "@" -MtMoon3Text_49f8a: ; 49f8a (12:5f8a) +MtMoon3Text_49f8a: TX_FAR _MtMoon3Text_49f8a db "@" -MtMoon3Text_49f8f: ; 49f8f (12:5f8f) +MtMoon3Text_49f8f: TX_FAR _MtMoon3Text_49f8f db "@" -MtMoon3Text_49f94: ; 49f94 (12:5f94) +MtMoon3Text_49f94: TX_FAR _MtMoon3Text_49f94 db "@" -MtMoon3Text_49f99: ; 49f99 (12:5f99) +MtMoon3Text_49f99: TX_FAR _MtMoon3Text_49f99 - db $11, "@" + TX_SFX_KEY_ITEM + db "@" -MtMoon3BattleText2: ; 49f9f (12:5f9f) +MtMoon3BattleText2: TX_FAR _MtMoon3BattleText2 db "@" -MtMoon3EndBattleText2: ; 49fa4 (12:5fa4) +MtMoon3EndBattleText2: TX_FAR _MtMoon3EndBattleText2 db "@" -MtMoon3AfterBattleText2: ; 49fa9 (12:5fa9) +MtMoon3AfterBattleText2: TX_FAR _MtMoon3AfterBattleText2 db "@" -MtMoon3BattleText3: ; 49fae (12:5fae) +MtMoon3BattleText3: TX_FAR _MtMoon3BattleText3 db "@" -MtMoon3EndBattleText3: ; 49fb3 (12:5fb3) +MtMoon3EndBattleText3: TX_FAR _MtMoon3EndBattleText3 db "@" -MtMoon3AfterBattleText3: ; 49fb8 (12:5fb8) +MtMoon3AfterBattleText3: TX_FAR _MtMoon3AfterBattleText3 db "@" -MtMoon3BattleText4: ; 49fbd (12:5fbd) +MtMoon3BattleText4: TX_FAR _MtMoon3BattleText4 db "@" -MtMoon3EndBattleText4: ; 49fc2 (12:5fc2) +MtMoon3EndBattleText4: TX_FAR _MtMoon3EndBattleText4 db "@" -MtMoon3AfterBattleText4: ; 49fc7 (12:5fc7) +MtMoon3AfterBattleText4: TX_FAR _MtMoon3AfterBattleText4 db "@" -MtMoon3BattleText5: ; 49fcc (12:5fcc) +MtMoon3BattleText5: TX_FAR _MtMoon3BattleText5 db "@" -MtMoon3EndBattleText5: ; 49fd1 (12:5fd1) +MtMoon3EndBattleText5: TX_FAR _MtMoon3EndBattleText5 db "@" -MtMoon3AfterBattleText5: ; 49fd6 (12:5fd6) +MtMoon3AfterBattleText5: TX_FAR _MtMoon3AfterBattleText5 db "@" diff --git a/scripts/mtmoonpokecenter.asm b/scripts/mtmoonpokecenter.asm index bfe9add8..b5edee8d 100755 --- a/scripts/mtmoonpokecenter.asm +++ b/scripts/mtmoonpokecenter.asm @@ -1,96 +1,94 @@ -MtMoonPokecenterScript: ; 492cf (12:52cf) +MtMoonPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -MtMoonPokecenterTextPointers: ; 492d5 (12:52d5) - dw MtMoonPokecenterText1 +MtMoonPokecenterTextPointers: + dw MtMoonHealNurseText dw MtMoonPokecenterText2 dw MtMoonPokecenterText3 - dw MtMoonPokecenterText4 + dw MagikarpSalesmanText dw MtMoonPokecenterText5 - dw MtMoonPokecenterText6 + dw MtMoonTradeNurseText -MtMoonPokecenterText1: ; 492e1 (12:52e1) +MtMoonHealNurseText: db $ff -MtMoonPokecenterText2: ; 492e2 (12:52e2) +MtMoonPokecenterText2: TX_FAR _MtMoonPokecenterText1 db "@" -MtMoonPokecenterText3: ; 492e7 (12:52e7) +MtMoonPokecenterText3: TX_FAR _MtMoonPokecenterText3 db "@" -MtMoonPokecenterText4: ; 492ec (12:52ec) - db $08 ; asm - ld a, [wd7c6] - add a - jp c, .asm_49353 - ld hl, MtMoonPokecenterText_4935c +MagikarpSalesmanText: + TX_ASM + CheckEvent EVENT_BOUGHT_MAGIKARP, 1 + jp c, .alreadyBoughtMagikarp + ld hl, .Text1 call PrintText - ld a, $13 + ld a, MONEY_BOX ld [wTextBoxID], a call DisplayTextBoxID call YesNoChoice ld a, [wCurrentMenuItem] and a - jp nz, .asm_4934e - ldh [$9f], a - ldh [$a1], a + jp nz, .choseNo + ld [hMoney], a + ld [hMoney + 2], a ld a, $5 - ldh [$a0], a + ld [hMoney + 1], a call HasEnoughMoney - jr nc, .asm_faa09 ; 0x49317 - ld hl, MtMoonPokecenterText_49366 - jr .asm_49356 ; 0x4931c -.asm_faa09 ; 0x4931e - ld bc,(MAGIKARP << 8) | 5 + jr nc, .enoughMoney + ld hl, .NoMoneyText + jr .printText +.enoughMoney + lb bc, MAGIKARP, 5 call GivePokemon - jr nc, .asm_49359 ; 0x49324 + jr nc, .done xor a - ld [wWhichTrade], a - ld [wTrainerFacingDirection], a + ld [wPriceTemp], a + ld [wPriceTemp + 2], a ld a, $5 - ld [wTrainerEngageDistance], a - ld hl, wTrainerFacingDirection + ld [wPriceTemp + 1], a + ld hl, wPriceTemp + 2 ld de, wPlayerMoney + 2 ld c, $3 predef SubBCDPredef - ld a, $13 + ld a, MONEY_BOX ld [wTextBoxID], a call DisplayTextBoxID - ld hl, wd7c6 - set 7, [hl] - jr .asm_49359 ; 0x4934c -.asm_4934e ; 0x4934e - ld hl, MtMoonPokecenterText_49361 - jr .asm_49356 ; 0x49351 -.asm_49353 ; 0x49353 - ld hl, MtMoonPokecenterText_4936b -.asm_49356 ; 0x49356 + SetEvent EVENT_BOUGHT_MAGIKARP + jr .done +.choseNo + ld hl, .RefuseText + jr .printText +.alreadyBoughtMagikarp + ld hl, .Text2 +.printText call PrintText -.asm_49359 ; 0x49359 +.done jp TextScriptEnd -MtMoonPokecenterText_4935c: ; 4935c (12:535c) - TX_FAR _MtMoonPokecenterText_4935c +.Text1 + TX_FAR _MagikarpSalesmanText1 db "@" -MtMoonPokecenterText_49361: ; 49361 (12:5361) - TX_FAR _MtMoonPokecenterText_49361 +.RefuseText + TX_FAR _MagikarpSalesmanNoText db "@" -MtMoonPokecenterText_49366: ; 49366 (12:5366) - TX_FAR _MtMoonPokecenterText_49366 +.NoMoneyText + TX_FAR _MagikarpSalesmanNoMoneyText db "@" -MtMoonPokecenterText_4936b: ; 4936b (12:536b) - TX_FAR _MtMoonPokecenterText_4936b +.Text2 + TX_FAR _MagikarpSalesmanText2 db "@" -MtMoonPokecenterText5: ; 49370 (12:5370) +MtMoonPokecenterText5: TX_FAR _MtMoonPokecenterText5 db "@" -MtMoonPokecenterText6: ; 49375 (12:5375) +MtMoonTradeNurseText: db $f6 diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm index cd2b3c29..35bfb446 100755 --- a/scripts/museum1f.asm +++ b/scripts/museum1f.asm @@ -1,75 +1,73 @@ -Museum1FScript: ; 5c0f7 (17:40f7) +Museum1FScript: ld a, $1 ld [wAutoTextBoxDrawingControl], a xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, Museum1FScriptPointers - ld a, [W_MUSEUM1FCURSCRIPT] + ld a, [wMuseum1fCurScript] jp CallFunctionInTable -Museum1FScriptPointers: ; 5c109 (17:4109) +Museum1FScriptPointers: dw Museum1FScript0 dw Museum1FScript1 -Museum1FScript0: ; 5c10d (17:410d) - ld a, [W_YCOORD] +Museum1FScript0: + ld a, [wYCoord] cp $4 ret nz - ld a, [W_XCOORD] + ld a, [wXCoord] cp $9 - jr z, .asm_5c120 ; 0x5c118 $6 - ld a, [W_XCOORD] + jr z, .asm_5c120 + ld a, [wXCoord] cp $a ret nz .asm_5c120 xor a ld [hJoyHeld], a ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID -Museum1FScript1: ; 5c12a (17:412a) +Museum1FScript1: ret -Museum1FTextPointers: ; 5c12b (17:412b) +Museum1FTextPointers: dw Museum1FText1 dw Museum1FText2 dw Museum1FText3 dw Museum1FText4 dw Museum1FText5 -Museum1FText1: ; 5c135 (17:4135) - db $8 - ld a, [W_YCOORD] +Museum1FText1: + TX_ASM + ld a, [wYCoord] cp $4 jr nz, .asm_8774b - ld a, [W_XCOORD] + ld a, [wXCoord] cp $d jp z, Museum1FScript_5c1f9 jr .asm_b8709 .asm_8774b cp $3 jr nz, .asm_d49e7 - ld a, [W_XCOORD] + ld a, [wXCoord] cp $c jp z, Museum1FScript_5c1f9 .asm_d49e7 - ld a, [wd754] - bit 0, a + CheckEvent EVENT_BOUGHT_MUSEUM_TICKET jr nz, .asm_31a16 ld hl, Museum1FText_5c23d call PrintText - jp asm_d1145 + jp Museum1FScriptEnd .asm_b8709 - ld a, [wd754] - bit 0, a + CheckEvent EVENT_BOUGHT_MUSEUM_TICKET jr z, .asm_3ded4 .asm_31a16 ld hl, Museum1FText_5c242 call PrintText - jp asm_d1145 + jp Museum1FScriptEnd .asm_3ded4 - ld a, $13 + ld a, MONEY_BOX ld [wTextBoxID], a call DisplayTextBoxID xor a @@ -81,10 +79,10 @@ Museum1FText1: ; 5c135 (17:4135) and a jr nz, .asm_de133 xor a - ld [$ff9f], a - ld [$ffa0], a + ld [hMoney], a + ld [hMoney + 1], a ld a, $50 - ld [$ffa1], a + ld [hMoney + 2], a call HasEnoughMoney jr nc, .asm_0f3e3 ld hl, Museum1FText_5c229 @@ -93,40 +91,39 @@ Museum1FText1: ; 5c135 (17:4135) .asm_0f3e3 ld hl, Museum1FText_5c224 call PrintText - ld hl, wd754 - set 0, [hl] + SetEvent EVENT_BOUGHT_MUSEUM_TICKET xor a - ld [wWhichTrade], a - ld [wTrainerEngageDistance], a + ld [wPriceTemp], a + ld [wPriceTemp + 1], a ld a, $50 - ld [wTrainerFacingDirection], a - ld hl, wTrainerFacingDirection + ld [wPriceTemp + 2], a + ld hl, wPriceTemp + 2 ld de, wPlayerMoney + 2 ld c, $3 predef SubBCDPredef - ld a, $13 + ld a, MONEY_BOX ld [wTextBoxID], a call DisplayTextBoxID - ld a, (SFX_02_5a - SFX_Headers_02) / 3 + ld a, SFX_PURCHASE call PlaySoundWaitForCurrent call WaitForSoundToFinish jr .asm_0b094 .asm_de133 - ld hl, Museum1FText_5c21a ; $421a + ld hl, Museum1FText_5c21a call PrintText ld a, $1 ld [wSimulatedJoypadStatesIndex], a - ld a, $80 + ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a call StartSimulatingJoypadStates call UpdateSprites - jr asm_d1145 + jr Museum1FScriptEnd .asm_0b094 ld a, $1 - ld [W_MUSEUM1FCURSCRIPT], a - jr asm_d1145 + ld [wMuseum1fCurScript], a + jr Museum1FScriptEnd -Museum1FScript_5c1f9: ; 5c1f9 (17:41f9) +Museum1FScript_5c1f9: ld hl, Museum1FText_5c22e call PrintText call YesNoChoice @@ -135,117 +132,116 @@ 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: jp TextScriptEnd -Museum1FText_5c21a: ; 5c21a (17:421a) +Museum1FText_5c21a: TX_FAR _Museum1FText_5c21a db "@" -Museum1FText_5c21f: ; 5c21f (17:421f) +Museum1FText_5c21f: TX_FAR _Museum1FText_5c21f db "@" -Museum1FText_5c224: ; 5c224 (17:4224) +Museum1FText_5c224: TX_FAR _Museum1FText_5c224 db "@" -Museum1FText_5c229: ; 5c229 (17:4229) +Museum1FText_5c229: TX_FAR _Museum1FText_5c229 db "@" -Museum1FText_5c22e: ; 5c22e (17:422e) +Museum1FText_5c22e: TX_FAR _Museum1FText_5c22e db "@" -Museum1FText_5c233: ; 5c233 (17:4233) +Museum1FText_5c233: TX_FAR _Museum1FText_5c233 db "@" -Museum1FText_5c238: ; 5c238 (17:4238) +Museum1FText_5c238: TX_FAR _Museum1FText_5c238 db "@" -Museum1FText_5c23d: ; 5c23d (17:423d) +Museum1FText_5c23d: TX_FAR _Museum1FText_5c23d db "@" -Museum1FText_5c242: ; 5c242 (17:4242) +Museum1FText_5c242: TX_FAR _Museum1FText_5c242 db "@" -Museum1FText2: ; 5c247 (17:4247) - db $08 ; asm +Museum1FText2: + TX_ASM ld hl, Museum1FText_5c251 call PrintText jp TextScriptEnd -Museum1FText_5c251: ; 5c251 (17:4251) +Museum1FText_5c251: TX_FAR _Museum1FText_5c251 db "@" -Museum1FText3: ; 5c256 (17:4256) - db $08 ; asm - ld a, [wd754] - bit 1, a - jr nz, .asm_16599 ; 0x5c25c +Museum1FText3: + TX_ASM + CheckEvent EVENT_GOT_OLD_AMBER + jr nz, .asm_5c285 ld hl, Museum1FText_5c28e call PrintText - ld bc, (OLD_AMBER << 8) | 1 + lb bc, OLD_AMBER, 1 call GiveItem jr nc, .BagFull - ld hl, wd754 - set 1, [hl] + SetEvent EVENT_GOT_OLD_AMBER ld a, HS_OLD_AMBER - ld [wcc4d], a + ld [wMissableObjectIndex], 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 -Museum1FText_5c28e: ; 5c28e (17:428e) +Museum1FText_5c28e: TX_FAR _Museum1FText_5c28e db "@" -ReceivedOldAmberText: ; 5c293 (17:4293) +ReceivedOldAmberText: TX_FAR _ReceivedOldAmberText - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -Museum1FText_5c299: ; 5c299 (17:4299) +Museum1FText_5c299: TX_FAR _Museum1FText_5c299 db "@" -Museum1FText_5c29e: ; 5c29e (17:429e) +Museum1FText_5c29e: TX_FAR _Museum1FText_5c29e db "@" -Museum1FText4: ; 5c2a3 (17:42a3) - db $08 ; asm +Museum1FText4: + TX_ASM ld hl, Museum1FText_5c2ad call PrintText jp TextScriptEnd -Museum1FText_5c2ad: ; 5c2ad (17:42ad) +Museum1FText_5c2ad: TX_FAR _Museum1FText_5c2ad db "@" -Museum1FText5: ; 5c2b2 (17:42b2) - db $08 ; asm +Museum1FText5: + TX_ASM ld hl, Museum1FText_5c2bc call PrintText jp TextScriptEnd -Museum1FText_5c2bc: ; 5c2bc (17:42bc) +Museum1FText_5c2bc: TX_FAR _Museum1FText_5c2bc db "@" diff --git a/scripts/museum2f.asm b/scripts/museum2f.asm index 0f8a63ec..6ee8d72a 100755 --- a/scripts/museum2f.asm +++ b/scripts/museum2f.asm @@ -1,7 +1,7 @@ -Museum2FScript: ; 5c317 (17:4317) +Museum2FScript: jp EnableAutoTextBoxDrawing -Museum2FTextPointers: ; 5c31a (17:431a) +Museum2FTextPointers: dw Museum2FText1 dw Museum2FText2 dw Museum2FText3 @@ -10,30 +10,30 @@ Museum2FTextPointers: ; 5c31a (17:431a) dw Museum2FText6 dw Museum2FText7 -Museum2FText1: ; 5c328 (17:4328) +Museum2FText1: TX_FAR _Museum2FText1 db "@" -Museum2FText2: ; 5c32d (17:432d) +Museum2FText2: TX_FAR _Museum2FText2 db "@" -Museum2FText3: ; 5c332 (17:4332) +Museum2FText3: TX_FAR _Museum2FText3 db "@" -Museum2FText4: ; 5c337 (17:4337) +Museum2FText4: TX_FAR _Museum2FText4 db "@" -Museum2FText5: ; 5c33c (17:433c) +Museum2FText5: TX_FAR _Museum2FText5 db "@" -Museum2FText6: ; 5c341 (17:4341) +Museum2FText6: TX_FAR _Museum2FText6 db "@" -Museum2FText7: ; 5c346 (17:4346) +Museum2FText7: TX_FAR _Museum2FText7 db "@" diff --git a/scripts/namerater.asm b/scripts/namerater.asm index c9e3bfb4..160948ac 100755 --- a/scripts/namerater.asm +++ b/scripts/namerater.asm @@ -1,24 +1,24 @@ -NameRaterScript: ; 1da12 (7:5a12) +NameRaterScript: jp EnableAutoTextBoxDrawing -NameRaterScript_1da15: ; 1da15 (7:5a15) +NameRaterScript_1da15: call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a ret -NameRaterScript_1da20: ; 1da20 (7:5a20) +NameRaterScript_1da20: ld hl, wPartyMonOT - ld bc, $000b + ld bc, NAME_LENGTH ld a, [wWhichPokemon] call AddNTimes ld de, wPlayerName - ld c, $b + ld c, NAME_LENGTH call .asm_1da47 - jr c, .asm_1da52 ; 0x1da34 $1c + jr c, .asm_1da52 ld hl, wPartyMon1OTID - ld bc, $002c + ld bc, wPartyMon2 - wPartyMon1 ld a, [wWhichPokemon] call AddNTimes ld de, wPlayerID @@ -26,30 +26,30 @@ 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 scf ret -NameRaterTextPointers: ; 1da54 (7:5a54) +NameRaterTextPointers: dw NameRaterText1 -NameRaterText1: ; 1da56 (7:5a56) - db $8 +NameRaterText1: + 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 - ld [wd07d], a + ld [wPartyMenuTypeOrMessageID], a ld [wUpdateSpritesEnabled], a ld [wMenuItemToSwap], a call DisplayPartyMenu @@ -58,50 +58,50 @@ 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 + callba DisplayNameRaterScreen + 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) +NameRaterText_1dab3: TX_FAR _NameRaterText_1dab3 db "@" -NameRaterText_1dab8: ; 1dab8 (7:5ab8) +NameRaterText_1dab8: TX_FAR _NameRaterText_1dab8 db "@" -NameRaterText_1dabd: ; 1dabd (7:5abd) +NameRaterText_1dabd: TX_FAR _NameRaterText_1dabd db "@" -NameRaterText_1dac2: ; 1dac2 (7:5ac2) +NameRaterText_1dac2: TX_FAR _NameRaterText_1dac2 db "@" -NameRaterText_1dac7: ; 1dac7 (7:5ac7) +NameRaterText_1dac7: TX_FAR _NameRaterText_1dac7 db "@" -NameRaterText_1dacc: ; 1dacc (7:5acc) +NameRaterText_1dacc: TX_FAR _NameRaterText_1dacc db "@" -NameRaterText_1dad1: ; 1dad1 (7:5ad1) +NameRaterText_1dad1: TX_FAR _NameRaterText_1dad1 db "@" diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 8f23cd3e..b91abd43 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -1,16 +1,15 @@ -OaksLabScript: ; 1cb0e (7:4b0e) - ld a, [wd74b] - bit 6, a +OaksLabScript: + CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 call nz, OaksLabScript_1d076 ld a, $1 ld [wAutoTextBoxDrawingControl], a xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, OaksLabScriptPointers - ld a, [W_OAKSLABCURSCRIPT] + ld a, [wOaksLabCurScript] jp CallFunctionInTable -OaksLabScriptPointers: ; 1cb28 (7:4b28) +OaksLabScriptPointers: dw OaksLabScript0 dw OaksLabScript1 dw OaksLabScript2 @@ -31,52 +30,54 @@ OaksLabScriptPointers: ; 1cb28 (7:4b28) dw OaksLabScript17 dw OaksLabScript18 -OaksLabScript0: ; 1cb4e (7:4b4e) - ld a, [wd74b] - bit 7, a +OaksLabScript0: + CheckEvent EVENT_OAK_APPEARED_IN_PALLET ret z ld a, [wNPCMovementScriptFunctionNum] and a ret nz ld a, HS_OAKS_LAB_OAK_2 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld hl, wd72e res 4, [hl] ld a, $1 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript1: ; 1cb6e (7:4b6e) +OaksLabScript1: ld a, $8 ld [H_SPRITEINDEX], a ld de, OakEntryMovement call MoveSprite ld a, $2 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OakEntryMovement: ; 1cb7e (7:4b7e) - db $40,$40,$40,$FF +OakEntryMovement: + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db $FF -OaksLabScript2: ; 1cb82 (7:4b82) +OaksLabScript2: ld a, [wd730] bit 0, a ret nz ld a, HS_OAKS_LAB_OAK_2 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_OAKS_LAB_OAK_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld a, $3 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript3: ; 1cba2 (7:4ba2) +OaksLabScript3: call Delay3 ld hl, wSimulatedJoypadStatesEnd ld de, PlayerEntryMovementRLE @@ -87,153 +88,175 @@ OaksLabScript3: ; 1cba2 (7:4ba2) ld a, $1 ld [H_SPRITEINDEX], a xor a - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $5 ld [H_SPRITEINDEX], a xor a - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $4 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -PlayerEntryMovementRLE: ; 1cbcf (7:4bcf) - db $40, $8, $ff +PlayerEntryMovementRLE: + db D_UP,$8 + db $ff -OaksLabScript4: ; 1cbd2 (7:4bd2) +OaksLabScript4: ld a, [wSimulatedJoypadStatesIndex] and a ret nz - ld hl, wd747 - set 0, [hl] - ld hl, wd74b - set 0, [hl] + SetEvent EVENT_FOLLOWED_OAK_INTO_LAB + SetEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 ld a, $1 ld [H_SPRITEINDEX], a - ld a, $4 - ld [$ff8d], a + ld a, SPRITE_FACING_UP + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call UpdateSprites - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 res 1, [hl] call PlayDefaultMusic ld a, $5 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript5: ; 1cbfd (7:4bfd) +OaksLabScript5: ld a, $fc ld [wJoyIgnore], a ld a, $11 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, $12 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, $13 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, $14 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd74b - set 1, [hl] + SetEvent EVENT_OAK_ASKED_TO_CHOOSE_MON xor a ld [wJoyIgnore], a ld a, $6 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript6: ; 1cc36 (7:4c36) - ld a, [W_YCOORD] +OaksLabScript6: + ld a, [wYCoord] cp $6 ret nz ld a, $5 ld [H_SPRITEINDEX], a - xor a - ld [$ff8d], a + xor a ; SPRITE_FACING_DOWN + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $1 ld [H_SPRITEINDEX], a xor a - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call UpdateSprites ld a, $c - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a - ld a, $40 + ld a, D_UP ld [wSimulatedJoypadStatesEnd], a call StartSimulatingJoypadStates - ld a, $8 - ld [wd528], a + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a ld a, $7 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript7: ; 1cc72 (7:4c72) +OaksLabScript7: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 ld a, $6 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript8: ; 1cc80 (7:4c80) - ld a, [W_PLAYERSTARTER] +OaksLabScript8: + ld a, [wPlayerStarter] 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] + ld a, [wYCoord] 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 + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_UP + db $FF + .MiddleBallMovement2 - db 0,$C0,$C0,$C0,$FF + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db $FF .Squirtle ld de, .RightBallMovement1 - ld a, [W_YCOORD] + ld a, [wYCoord] 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 + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_UP + db $FF + .RightBallMovement2 - db 0,$C0,$C0,$C0,$C0,$FF + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db $FF .Bulbasaur ld de, .LeftBallMovement1 - ld a, [W_XCOORD] + ld a, [wXCoord] 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 ld a, $4 - ld [$ff8b], a + ld [H_SPRITEDATAOFFSET], a call GetPointerWithinSpriteStateData1 push hl ld [hl], $4c @@ -247,12 +270,14 @@ 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! + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT ; not yet terminated! .LeftBallMovement2 - db $C0,$FF + db NPC_MOVEMENT_RIGHT + db $FF .asm_1ccf3 ld a, $1 @@ -260,10 +285,10 @@ OaksLabScript8: ; 1cc80 (7:4c80) call MoveSprite ld a, $9 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript9: ; 1cd00 (7:4d00) +OaksLabScript9: ld a, [wd730] bit 0, a ret nz @@ -271,76 +296,75 @@ OaksLabScript9: ; 1cd00 (7:4d00) ld [wJoyIgnore], a ld a, $1 ld [H_SPRITEINDEX], a - ld a, $4 - ld [$ff8d], a + ld a, SPRITE_FACING_UP + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $d - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld a, [wTrainerEngageDistance] + ld a, [wRivalStarterBallSpriteIndex] 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 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject call Delay3 - ld a, [wWhichTrade] - ld [W_RIVALSTARTER], a + ld a, [wRivalStarterTemp] + ld [wRivalStarter], a ld [wcf91], a ld [wd11e], a call GetMonName ld a, $1 ld [H_SPRITEINDEX], a - ld a, $4 - ld [$ff8d], a + ld a, SPRITE_FACING_UP + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $e - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd74b - set 2, [hl] + SetEvent EVENT_GOT_STARTER xor a ld [wJoyIgnore], a ld a, $a - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript10: ; 1cd6d (7:4d6d) - ld a, [W_YCOORD] +OaksLabScript10: + ld a, [wYCoord] cp $6 ret nz ld a, $1 ld [H_SPRITEINDEX], a - xor a - ld [$ff8d], a + xor a ; SPRITE_FACING_DOWN + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay - ld a, $8 - ld [wd528], a + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL - call PlayMusic ; play music + call PlayMusic ld a, $f - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 - ld [$ff9b], a + ld [hNPCPlayerRelativePosPerspective], a ld a, $1 swap a - ld [$ff95], a + ld [hNPCSpriteOffset], a predef CalcPositionOfPlayerRelativeToNPC - ld a, [$ff95] + ld a, [hNPCPlayerYDistance] dec a - ld [$ff95], a + ld [hNPCPlayerYDistance], a predef FindPathToPlayer ld de, wNPCMovementDirections2 ld a, $1 @@ -348,31 +372,31 @@ OaksLabScript10: ; 1cd6d (7:4d6d) call MoveSprite ld a, $b - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript11: ; 1cdb9 (7:4db9) +OaksLabScript11: ld a, [wd730] bit 0, a ret nz ; define which team rival uses, and fight it - ld a, SONY1 + $C8 - ld [W_CUROPPONENT], a - ld a, [W_RIVALSTARTER] + ld a, OPP_SONY1 + ld [wCurOpponent], a + ld a, [wRivalStarter] 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 - ld [W_TRAINERNO], a + ld [wTrainerNo], a ld a, $1 ld [wSpriteIndex], a call GetSpritePosition1 @@ -384,119 +408,125 @@ OaksLabScript11: ; 1cdb9 (7:4db9) set 7, [hl] xor a ld [wJoyIgnore], a - ld a, $8 - ld [wd528], a + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a ld a, $c - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript12: ; 1ce03 (7:4e03) +OaksLabScript12: ld a, $f0 ld [wJoyIgnore], a - ld a, $8 - ld [wd528], a + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a call UpdateSprites ld a, $1 ld [wSpriteIndex], a call SetSpritePosition1 ld a, $1 ld [H_SPRITEINDEX], a - xor a - ld [$ff8d], a + xor a ; SPRITE_FACING_DOWN + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay predef HealParty - ld hl, wd74b - set 3, [hl] + SetEvent EVENT_BATTLED_RIVAL_IN_OAKS_LAB ld a, $d - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript13: ; 1ce32 (7:4e32) - ld c, $14 +OaksLabScript13: + ld c, 20 call DelayFrames ld a, $10 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID callba Music_RivalAlternateStart ld a, $1 ld [H_SPRITEINDEX], a ld de, .RivalExitMovement call MoveSprite - ld a, [W_XCOORD] + ld a, [wXCoord] cp $4 ; move left or right depending on where the player is standing - jr nz, .asm_1ce5b ; 0x1ce55 $4 - ld a, $c0 - jr .asm_1ce5d ; 0x1ce59 $2 -.asm_1ce5b - ld a, $80 -.asm_1ce5d - ld [wcc5b], a + jr nz, .moveLeft + ld a, NPC_MOVEMENT_RIGHT + jr .next +.moveLeft + ld a, NPC_MOVEMENT_LEFT +.next + ld [wNPCMovementDirections], a ld a, $e - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret .RivalExitMovement - db $E0,$00,$00,$00,$00,$00,$FF - -OaksLabScript14: ; 1ce6d (7:4e6d) + db $E0 ; change sprite facing direction + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF + +OaksLabScript14: 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 + ld [wMissableObjectIndex], a predef HideObject xor a ld [wJoyIgnore], a call PlayDefaultMusic ; reset to map music ld a, $12 - ld [W_OAKSLABCURSCRIPT], a - jr .done ; 0x1ce8a $23 + ld [wOaksLabCurScript], a + jr .done +; make the player keep facing the rival as he walks away .asm_1ce8c - ld a, [wcf0f] + ld a, [wNPCNumScriptedSteps] cp $5 - jr nz, .asm_1cea8 ; 0x1ce91 $15 - ld a, [W_XCOORD] + jr nz, .asm_1cea8 + ld a, [wXCoord] 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 -OaksLabScript15: ; 1ceb0 (7:4eb0) +OaksLabScript15: xor a ld [hJoyHeld], a call EnableAutoTextBoxDrawing ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateStart ld a, $15 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call OaksLabScript_1d02b ld a, HS_OAKS_LAB_RIVAL - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld a, [wNPCMovementDirections2Index] - ld [wd157], a - ld b, $0 + ld [wSavedNPCMovementDirections2Index], a + ld b, 0 ld c, a ld hl, wNPCMovementDirections2 - ld a, $40 + ld a, NPC_MOVEMENT_UP call FillMemory ld [hl], $ff ld a, $1 @@ -505,22 +535,22 @@ OaksLabScript15: ; 1ceb0 (7:4eb0) call MoveSprite ld a, $10 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript_1cefd ; 1cefd (7:4efd) +OaksLabScript_1cefd: ld a, $1 ld [H_SPRITEINDEX], a - ld a, $4 - ld [$ff8d], a + ld a, SPRITE_FACING_UP + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $8 ld [H_SPRITEINDEX], a - xor a - ld [$ff8d], a + xor a ; SPRITE_FACING_DOWN + ld [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay -OaksLabScript16: ; 1cf12 (7:4f12) +OaksLabScript16: ld a, [wd730] bit 0, a ret nz @@ -530,61 +560,59 @@ OaksLabScript16: ; 1cf12 (7:4f12) ld [wJoyIgnore], a call OaksLabScript_1cefd ld a, $16 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call DelayFrame call OaksLabScript_1cefd ld a, $17 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call DelayFrame call OaksLabScript_1cefd ld a, $18 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call DelayFrame ld a, $19 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, HS_POKEDEX_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_POKEDEX_2 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject call OaksLabScript_1cefd ld a, $1a - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [H_SPRITEINDEX], a - ld a, $c - ld [$ff8d], a + ld a, SPRITE_FACING_RIGHT + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call Delay3 ld a, $1b - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd74b - set 5, [hl] - ld hl, wd74e - set 0, [hl] + SetEvent EVENT_GOT_POKEDEX + SetEvent EVENT_OAK_GOT_PARCEL ld a, HS_LYING_OLD_MAN - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_OLD_MAN - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject - ld a, [wd157] - ld b, $0 + ld a, [wSavedNPCMovementDirections2Index] + ld b, 0 ld c, a ld hl, wNPCMovementDirections2 - xor a + xor a ; NPC_MOVEMENT_DOWN call FillMemory ld [hl], $ff ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateStart ld a, $1 @@ -593,86 +621,85 @@ OaksLabScript16: ; 1cf12 (7:4f12) call MoveSprite ld a, $11 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript17: ; 1cfd4 (7:4fd4) +OaksLabScript17: ld a, [wd730] bit 0, a ret nz call PlayDefaultMusic ld a, HS_OAKS_LAB_RIVAL - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject - ld hl, wd7eb - set 0, [hl] - res 1, [hl] - set 7, [hl] + SetEvent EVENT_1ST_ROUTE22_RIVAL_BATTLE + ResetEventReuseHL EVENT_2ND_ROUTE22_RIVAL_BATTLE + SetEventReuseHL EVENT_ROUTE22_RIVAL_WANTS_BATTLE ld a, HS_ROUTE_22_RIVAL_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld a, $5 - ld [W_PALLETTOWNCURSCRIPT], a + ld [wPalletTownCurScript], a xor a ld [wJoyIgnore], a ld a, $12 - ld [W_OAKSLABCURSCRIPT], a + ld [wOaksLabCurScript], a ret -OaksLabScript18: ; 1d009 (7:5009) +OaksLabScript18: ret -OaksLabScript_1d00a: ; 1d00a (7:500a) +OaksLabScript_RemoveParcel: ld hl, wBagItems ld bc, $0000 -.asm_1d010 +.loop ld a, [hli] cp $ff ret z cp OAKS_PARCEL - jr z, .GotParcel ; 0x1d016 $4 + jr z, .foundParcel inc hl inc c - jr .asm_1d010 ; 0x1d01a $f4 -.GotParcel + jr .loop +.foundParcel ld hl, wNumBagItems ld a, c ld [wWhichPokemon], a ld a, $1 - ld [wcf96], a + ld [wItemQuantity], a jp RemoveItemFromInventory -OaksLabScript_1d02b: ; 1d02b (7:502b) +OaksLabScript_1d02b: ld a, $7c ld [$ffeb], a ld a, $8 ld [$ffee], a - ld a, [W_YCOORD] + ld a, [wYCoord] 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] + ld a, [wXCoord] 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 @@ -684,15 +711,15 @@ OaksLabScript_1d02b: ; 1d02b (7:502b) call SetSpritePosition1 ret -OaksLabScript_1d076: ; 1d076 (7:5076) - ld hl, OaksLabTextPointers + $36 ; $50b8 ; starts at OaksLabText28 +OaksLabScript_1d076: + ld hl, OaksLabTextPointers + $36 ; starts at OaksLabText28 ld a, l - ld [W_MAPTEXTPTR], a + ld [wMapTextPtr], a ld a, h - ld [W_MAPTEXTPTR+1], a + ld [wMapTextPtr+1], a ret -OaksLabTextPointers: ; 1d082 (7:5082) +OaksLabTextPointers: dw OaksLabText1 dw OaksLabText2 dw OaksLabText3 @@ -732,110 +759,107 @@ OaksLabTextPointers: ; 1d082 (7:5082) dw OaksLabText37 dw OaksLabText38 -OaksLabText28: ; 1d0ce (7:50ce) -OaksLabText1: ; 1d0ce (7:50ce) - db $08 ; asm - ld a, [wd74b] - bit 0, a - jr nz, .asm_1d0de ; 0x1d0d4 +OaksLabText28: +OaksLabText1: + TX_ASM + CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 + 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) +OaksLabGaryText1: TX_FAR _OaksLabGaryText1 db "@" -OaksLabText40: ; 1d0f8 (7:50f8) +OaksLabText40: TX_FAR _OaksLabText40 db "@" -OaksLabText41: ; 1d0fd (7:50fd) +OaksLabText41: TX_FAR _OaksLabText41 db "@" -OaksLabText29: ; 1d102 (7:5102) -OaksLabText2: ; 1d102 (7:5102) - db $8 +OaksLabText29: +OaksLabText2: + TX_ASM ld a, STARTER2 - ld [wWhichTrade], a + ld [wRivalStarterTemp], a ld a, $3 - ld [wTrainerEngageDistance], a + ld [wRivalStarterBallSpriteIndex], 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 +OaksLabText30: +OaksLabText3: + TX_ASM ld a, STARTER3 - ld [wWhichTrade], a + ld [wRivalStarterTemp], a ld a, $4 - ld [wTrainerEngageDistance], a + ld [wRivalStarterBallSpriteIndex], 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 +OaksLabText31: +OaksLabText4: + TX_ASM ld a, STARTER1 - ld [wWhichTrade], a + ld [wRivalStarterTemp], a ld a, $2 - ld [wTrainerEngageDistance], a + ld [wRivalStarterBallSpriteIndex], a ld a, STARTER3 ld b, $4 -OaksLabScript_1d133: ; 1d133 (7:5133) +OaksLabScript_1d133: ld [wcf91], a ld [wd11e], a ld a, b ld [wSpriteIndex], a - ld a, [wd74b] - bit 2, a + CheckEvent EVENT_GOT_STARTER jp nz, OaksLabScript_1d22d - bit 1, a - jr nz, OaksLabScript_1d157 ; 0x1d147 $e + CheckEventReuseA EVENT_OAK_ASKED_TO_CHOOSE_MON + jr nz, OaksLabScript_1d157 ld hl, OaksLabText39 call PrintText jp TextScriptEnd -OaksLabText39: ; 1d152 (7:5152) +OaksLabText39: TX_FAR _OaksLabText39 db "@" -OaksLabScript_1d157: ; 1d157 (7:5157) +OaksLabScript_1d157: ld a, $5 ld [H_SPRITEINDEX], a ld a, $9 - ld [$ff8b], a + ld [H_SPRITEDATAOFFSET], a call GetPointerWithinSpriteStateData1 - ld [hl], $0 - ; manually fixed some disassembler issues around here + ld [hl], SPRITE_FACING_DOWN ld a, $1 ld [H_SPRITEINDEX], a ld a, $9 - ld [$ff8b], a + ld [H_SPRITEDATAOFFSET], a call GetPointerWithinSpriteStateData1 - ld [hl], $c + ld [hl], SPRITE_FACING_RIGHT ld hl, wd730 set 6, [hl] - predef StarterDex ; StarterDex + predef StarterDex ld hl, wd730 res 6, [hl] call ReloadMapData - ld c, $a + ld c, 10 call DelayFrames ld a, [wSpriteIndex] cp $2 @@ -844,28 +868,28 @@ OaksLabScript_1d157: ; 1d157 (7:5157) jr z, OaksLabLookAtSquirtle jr OaksLabLookAtBulbasaur -OaksLabLookAtCharmander ; 0x1d195 +OaksLabLookAtCharmander: ld hl, OaksLabCharmanderText jr OaksLabMonChoiceMenu -OaksLabCharmanderText: ; 1d19a (7:519a) +OaksLabCharmanderText: TX_FAR _OaksLabCharmanderText db "@" -OaksLabLookAtSquirtle: ; 1d19f (7:519f) +OaksLabLookAtSquirtle: ld hl, OaksLabSquirtleText jr OaksLabMonChoiceMenu -OaksLabSquirtleText: ; 1d1a4 (7:51a4) +OaksLabSquirtleText: TX_FAR _OaksLabSquirtleText db "@" -OaksLabLookAtBulbasaur: ; 1d1a9 (7:51a9) +OaksLabLookAtBulbasaur: ld hl, OaksLabBulbasaurText jr OaksLabMonChoiceMenu -OaksLabBulbasaurText: ; 1d1ae (7:51ae) +OaksLabBulbasaurText: TX_FAR _OaksLabBulbasaurText db "@" -OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3) +OaksLabMonChoiceMenu: call PrintText ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -874,23 +898,23 @@ OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3) and a jr nz, OaksLabMonChoiceEnd ld a, [wcf91] - ld [W_PLAYERSTARTER], a + ld [wPlayerStarter], a ld [wd11e], a 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) - ld [wcc4d], a +.asm_1d1e5 + ld [wMissableObjectIndex], a predef HideObject ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -898,10 +922,10 @@ asm_1d1e5: ; 1d1e5 (7:51e5) call PrintText ld hl, OaksLabReceivedMonText call PrintText - xor a - ld [wcc49], a - ld a, $5 - ld [W_CURENEMYLVL], a + xor a ; PLAYER_PARTY_DATA + ld [wMonDataLocation], a + ld a, 5 + ld [wCurEnemyLVL], a ld a, [wcf91] ld [wd11e], a call AddPartyMon @@ -910,311 +934,308 @@ asm_1d1e5: ; 1d1e5 (7:51e5) ld a, $fc ld [wJoyIgnore], a ld a, $8 - ld [W_OAKSLABCURSCRIPT], a -OaksLabMonChoiceEnd: ; 1d21f (7:521f) + ld [wOaksLabCurScript], a +OaksLabMonChoiceEnd: jp TextScriptEnd -OaksLabMonEnergeticText: ; 1d222 (7:5222) +OaksLabMonEnergeticText: TX_FAR _OaksLabMonEnergeticText db "@" -OaksLabReceivedMonText: ; 1d227 (7:5227) +OaksLabReceivedMonText: TX_FAR _OaksLabReceivedMonText - db $11, "@" + TX_SFX_KEY_ITEM + db "@" -OaksLabScript_1d22d: ; 1d22d (7:522d) +OaksLabScript_1d22d: ld a, $5 ld [H_SPRITEINDEX], a ld a, $9 - ld [$ff8b], a + ld [H_SPRITEDATAOFFSET], a call GetPointerWithinSpriteStateData1 ld [hl], $0 ld hl, OaksLabLastMonText call PrintText jp TextScriptEnd -OaksLabLastMonText: ; 1d243 (7:5243) +OaksLabLastMonText: TX_FAR _OaksLabLastMonText db "@" -OaksLabText32: ; 1d248 (7:5248) -OaksLabText5: ; 1d248 (7:5248) - db $08 ; asm - ld a, [wd747] - bit 6, a - jr nz, .asm_50e81 ; 0x1d24e +OaksLabText32: +OaksLabText5: + TX_ASM + CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS + jr nz, .asm_1d266 ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits - ld a, [wd11e] - cp $2 - jr c, .asm_b28b0 ; 0x1d25d - ld a, [wd74b] - bit 5, a - jr z, .asm_b28b0 ; 0x1d264 -.asm_50e81 ; 0x1d266 + ld a, [wNumSetBits] + cp 2 + jr c, .asm_1d279 + CheckEvent EVENT_GOT_POKEDEX + 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 - ld a, [wd7eb] - bit 5, a - jr nz, .asm_f1adc ; 0x1d285 - ld a, [wd74b] - bit 5, a - jr nz, .asm_333a2 ; 0x1d28c - bit 3, a - jr nz, .asm_76269 ; 0x1d290 + jr nz, .asm_1d2e7 + CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE + jr nz, .asm_1d2d0 + CheckEvent EVENT_GOT_POKEDEX + jr nz, .asm_1d2c8 + CheckEventReuseA EVENT_BATTLED_RIVAL_IN_OAKS_LAB + 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 + call OaksLabScript_RemoveParcel ld a, $f - ld [W_OAKSLABCURSCRIPT], a - jr .asm_0f042 ; 0x1d2c6 -.asm_333a2 ; 0x1d2c8 + ld [wOaksLabCurScript], a + jr .asm_1d2ed +.asm_1d2c8 ld hl, OaksLabAroundWorldText call PrintText - jr .asm_0f042 ; 0x1d2ce -.asm_f1adc ; 0x1d2d0 - ld hl, wd74b - bit 4, [hl] - set 4, [hl] - jr nz, .asm_17c30 ; 0x1d2d7 - ld bc, (POKE_BALL << 8) | 5 + jr .asm_1d2ed +.asm_1d2d0 + CheckAndSetEvent EVENT_GOT_POKEBALLS_FROM_OAK + jr nz, .asm_1d2e7 + lb bc, POKE_BALL, 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) +OaksLabText_1d2f0: TX_FAR _OaksLabText_1d2f0 db "@" -OaksLabText_1d2f5: ; 1d2f5 (7:52f5) +OaksLabText_1d2f5: TX_FAR _OaksLabText_1d2f5 db "@" -OaksLabText_1d2fa: ; 1d2fa (7:52fa) +OaksLabText_1d2fa: TX_FAR _OaksLabText_1d2fa db "@" -OaksLabDeliverParcelText: ; 1d2ff (7:52ff) +OaksLabDeliverParcelText: TX_FAR _OaksLabDeliverParcelText1 - db $11 + TX_SFX_KEY_ITEM TX_FAR _OaksLabDeliverParcelText2 db "@" -OaksLabAroundWorldText: ; 1d309 (7:5309) +OaksLabAroundWorldText: TX_FAR _OaksLabAroundWorldText db "@" -OaksLabGivePokeballsText: ; 1d30e (7:530e) +OaksLabGivePokeballsText: TX_FAR _OaksLabGivePokeballsText1 - db $11 + TX_SFX_KEY_ITEM TX_FAR _OaksLabGivePokeballsText2 db "@" -OaksLabPleaseVisitText: ; 1d318 (7:5318) +OaksLabPleaseVisitText: TX_FAR _OaksLabPleaseVisitText db "@" -OaksLabText_1d31d: ; 1d31d (7:531d) +OaksLabText_1d31d: TX_FAR _OaksLabText_1d31d db "@" -OaksLabText34: ; 1d322 (7:5322) -OaksLabText33: ; 1d322 (7:5322) -OaksLabText7: ; 1d322 (7:5322) -OaksLabText6: ; 1d322 (7:5322) - db $08 ; asm +OaksLabText34: +OaksLabText33: +OaksLabText7: +OaksLabText6: + TX_ASM ld hl, OaksLabText_1d32c call PrintText jp TextScriptEnd -OaksLabText_1d32c: ; 1d32c (7:532c) +OaksLabText_1d32c: TX_FAR _OaksLabText_1d32c db "@" -OaksLabText35: ; 1d331 (7:5331) -OaksLabText8: ; 1d331 (7:5331) +OaksLabText35: +OaksLabText8: TX_FAR _OaksLabText8 db "@" -OaksLabText36: ; 1d336 (7:5336) -OaksLabText9: ; 1d336 (7:5336) - db $08 ; asm +OaksLabText36: +OaksLabText9: + TX_ASM ld hl, OaksLabText_1d340 call PrintText jp TextScriptEnd -OaksLabText_1d340: ; 1d340 (7:5340) +OaksLabText_1d340: TX_FAR _OaksLabText_1d340 db "@" -OaksLabText17: ; 1d345 (7:5345) - db $8 +OaksLabText17: + TX_ASM ld hl, OaksLabRivalWaitingText call PrintText jp TextScriptEnd -OaksLabRivalWaitingText: ; 1d34f (7:534f) +OaksLabRivalWaitingText: TX_FAR _OaksLabRivalWaitingText db "@" -OaksLabText18: ; 1d354 (7:5354) - db $8 +OaksLabText18: + TX_ASM ld hl, OaksLabChooseMonText call PrintText jp TextScriptEnd -OaksLabChooseMonText: ; 1d35e (7:535e) +OaksLabChooseMonText: TX_FAR _OaksLabChooseMonText db "@" -OaksLabText19: ; 1d363 (7:5363) - db $8 +OaksLabText19: + TX_ASM ld hl, OaksLabRivalInterjectionText call PrintText jp TextScriptEnd -OaksLabRivalInterjectionText: ; 1d36d (7:536d) +OaksLabRivalInterjectionText: TX_FAR _OaksLabRivalInterjectionText db "@" -OaksLabText20: ; 1d372 (7:5372) - db $8 +OaksLabText20: + TX_ASM ld hl, OaksLabBePatientText call PrintText jp TextScriptEnd -OaksLabBePatientText: ; 1d37c (7:537c) +OaksLabBePatientText: TX_FAR _OaksLabBePatientText db "@" -OaksLabText12: ; 1d381 (7:5381) - db $8 +OaksLabText12: + TX_ASM ld hl, OaksLabLeavingText call PrintText jp TextScriptEnd -OaksLabLeavingText: ; 1d38b (7:538b) +OaksLabLeavingText: TX_FAR _OaksLabLeavingText db "@" -OaksLabText13: ; 1d390 (7:5390) - db $8 +OaksLabText13: + TX_ASM ld hl, OaksLabRivalPickingMonText call PrintText jp TextScriptEnd -OaksLabRivalPickingMonText: ; 1d39a (7:539a) +OaksLabRivalPickingMonText: TX_FAR _OaksLabRivalPickingMonText db "@" -OaksLabText14: ; 1d39f (7:539f) - db $8 +OaksLabText14: + TX_ASM ld hl, OaksLabRivalReceivedMonText call PrintText jp TextScriptEnd -OaksLabRivalReceivedMonText: ; 1d3a9 (7:53a9) +OaksLabRivalReceivedMonText: TX_FAR _OaksLabRivalReceivedMonText - db $11, "@" + TX_SFX_KEY_ITEM + db "@" -OaksLabText15: ; 1d3af (7:53af) - db $8 +OaksLabText15: + TX_ASM ld hl, OaksLabRivalChallengeText call PrintText jp TextScriptEnd -OaksLabRivalChallengeText: ; 1d3b9 (7:53b9) +OaksLabRivalChallengeText: TX_FAR _OaksLabRivalChallengeText db "@" -OaksLabText_1d3be: ; 1d3be (7:53be) +OaksLabText_1d3be: TX_FAR _OaksLabText_1d3be db "@" -OaksLabText_1d3c3: ; 1d3c3 (7:53c3) +OaksLabText_1d3c3: TX_FAR _OaksLabText_1d3c3 db "@" -OaksLabText16: ; 1d3c8 (7:53c8) - db $8 +OaksLabText16: + TX_ASM ld hl, OaksLabRivalToughenUpText call PrintText jp TextScriptEnd -OaksLabRivalToughenUpText: ; 1d3d2 (7:53d2) +OaksLabRivalToughenUpText: TX_FAR _OaksLabRivalToughenUpText db "@" -OaksLabText21: ; 1d3d7 (7:53d7) +OaksLabText21: TX_FAR _OaksLabText21 db "@" -OaksLabText22: ; 1d3dc (7:53dc) +OaksLabText22: TX_FAR _OaksLabText22 db "@" -OaksLabText23: ; 1d3e1 (7:53e1) +OaksLabText23: TX_FAR _OaksLabText23 db "@" -OaksLabText24: ; 1d3e6 (7:53e6) +OaksLabText24: TX_FAR _OaksLabText24 db "@" -OaksLabText25: ; 1d3eb (7:53eb) +OaksLabText25: TX_FAR _OaksLabText25 - db $11, "@" + TX_SFX_KEY_ITEM + db "@" -OaksLabText26: ; 1d3f1 (7:53f1) +OaksLabText26: TX_FAR _OaksLabText26 db "@" -OaksLabText27: ; 1d3f6 (7:53f6) +OaksLabText27: TX_FAR _OaksLabText27 db "@" -OaksLabText38: ; 1d3fb (7:53fb) -OaksLabText37: ; 1d3fb (7:53fb) -OaksLabText11: ; 1d3fb (7:53fb) -OaksLabText10: ; 1d3fb (7:53fb) - db $08 ; asm +OaksLabText38: +OaksLabText37: +OaksLabText11: +OaksLabText10: + TX_ASM ld hl, OaksLabText_1d405 call PrintText jp TextScriptEnd -OaksLabText_1d405: ; 1d405 (7:5405) +OaksLabText_1d405: TX_FAR _OaksLabText_1d405 db "@" diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index c43b9682..a06dfd54 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -1,16 +1,14 @@ -PalletTownScript: ; 18e5b (6:4e5b) - ld a,[wd74b] - bit 4,a +PalletTownScript: + CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK jr z,.next - ld hl,wd747 - set 6,[hl] + SetEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS .next call EnableAutoTextBoxDrawing ld hl,PalletTownScriptPointers - ld a,[W_PALLETTOWNCURSCRIPT] + ld a,[wPalletTownCurScript] jp CallFunctionInTable -PalletTownScriptPointers: ; 18e73 (6:4e73) +PalletTownScriptPointers: dw PalletTownScript0 dw PalletTownScript1 dw PalletTownScript2 @@ -19,93 +17,92 @@ PalletTownScriptPointers: ; 18e73 (6:4e73) dw PalletTownScript5 dw PalletTownScript6 -PalletTownScript0: ; 18e81 (6:4e81) - ld a,[wd747] - bit 0,a +PalletTownScript0: + CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB ret nz - ld a,[W_YCOORD] + ld a,[wYCoord] cp 1 ; is player near north exit? ret nz xor a ld [hJoyHeld],a - ld a,4 - ld [wd528],a + ld a,PLAYER_DIR_DOWN + ld [wPlayerMovingDirection],a ld a,$FF call PlaySound ; stop music ld a, BANK(Music_MeetProfOak) - ld c,a ; song bank + ld c,a ld a, MUSIC_MEET_PROF_OAK ; “oak appears” music - call PlayMusic ; plays music + call PlayMusic ld a,$FC ld [wJoyIgnore],a - ld hl,wd74b - set 7,[hl] + SetEvent EVENT_OAK_APPEARED_IN_PALLET ; trigger the next script ld a,1 - ld [W_PALLETTOWNCURSCRIPT],a + ld [wPalletTownCurScript],a ret -PalletTownScript1: ; 18eb2 (6:4eb2) +PalletTownScript1: xor a ld [wcf0d],a ld a,1 - ld [$FF8C],a + ld [hSpriteIndexOrTextID],a call DisplayTextID ld a,$FF ld [wJoyIgnore],a ld a,HS_PALLET_TOWN_OAK - ld [wcc4d],a + ld [wMissableObjectIndex],a predef ShowObject ; trigger the next script ld a,2 - ld [W_PALLETTOWNCURSCRIPT],a + ld [wPalletTownCurScript],a ret -PalletTownScript2: ; 18ed2 (6:4ed2) +PalletTownScript2: ld a,1 - ld [$FF8C],a - ld a,4 - ld [$FF8D],a + ld [H_SPRITEINDEX],a + ld a,SPRITE_FACING_UP + ld [hSpriteFacingDirection],a call SetSpriteFacingDirectionAndDelay call Delay3 ld a,1 - ld [W_YCOORD],a + ld [wYCoord],a ld a,1 - ld [$FF9B],a + ld [hNPCPlayerRelativePosPerspective],a ld a,1 swap a - ld [$FF95],a + ld [hNPCSpriteOffset],a predef CalcPositionOfPlayerRelativeToNPC - ld hl,$FF95 + ld hl,hNPCPlayerYDistance dec [hl] predef FindPathToPlayer ; load Oak’s movement into wNPCMovementDirections2 ld de,wNPCMovementDirections2 ld a,1 ; oak - ld [$FF8C],a + ld [H_SPRITEINDEX],a call MoveSprite ld a,$FF ld [wJoyIgnore],a ; trigger the next script ld a,3 - ld [W_PALLETTOWNCURSCRIPT],a + ld [wPalletTownCurScript],a ret -PalletTownScript3: ; 18f12 (6:4f12) +PalletTownScript3: 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 ld a,$FC ld [wJoyIgnore],a ld a,1 - ld [$FF8C],a + ld [hSpriteIndexOrTextID],a call DisplayTextID +; set up movement script that causes the player to follow Oak to his lab ld a,$FF ld [wJoyIgnore],a ld a,1 @@ -119,44 +116,39 @@ PalletTownScript3: ; 18f12 (6:4f12) ; trigger the next script ld a,4 - ld [W_PALLETTOWNCURSCRIPT],a + ld [wPalletTownCurScript],a ret -PalletTownScript4: ; 18f4b (6:4f4b) +PalletTownScript4: ld a,[wNPCMovementScriptPointerTableNum] - and a + and a ; is the movement script over? ret nz ; trigger the next script ld a,5 - ld [W_PALLETTOWNCURSCRIPT],a + ld [wPalletTownCurScript],a ret -PalletTownScript5: ; 18f56 (6:4f56) - ld a,[wd74a] - bit 2,a +PalletTownScript5: + CheckEvent EVENT_DAISY_WALKING jr nz,.next - and 3 - cp 3 + CheckBothEventsSet EVENT_GOT_TOWN_MAP, EVENT_ENTERED_BLUES_HOUSE, 1 jr nz,.next - ld hl,wd74a - set 2,[hl] + SetEvent EVENT_DAISY_WALKING ld a,HS_DAISY_SITTING - ld [wcc4d],a + ld [wMissableObjectIndex],a predef HideObject ld a,HS_DAISY_WALKING - ld [wcc4d],a + ld [wMissableObjectIndex],a predef_jump ShowObject .next - ld a,[wd74b] - bit 4,a + CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK ret z - ld hl,wd74b - set 6,[hl] -PalletTownScript6: ; 18f87 (6:4f87) + SetEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 +PalletTownScript6: ret -PalletTownTextPointers: ; 18f88 (6:4f88) +PalletTownTextPointers: dw PalletTownText1 dw PalletTownText2 dw PalletTownText3 @@ -165,8 +157,8 @@ PalletTownTextPointers: ; 18f88 (6:4f88) dw PalletTownText6 dw PalletTownText7 -PalletTownText1: ; 18f96 (6:4f96) - db 8 +PalletTownText1: + TX_ASM ld a,[wcf0d] and a jr nz,.next @@ -180,43 +172,43 @@ PalletTownText1: ; 18f96 (6:4f96) call PrintText jp TextScriptEnd -OakAppearsText: ; 18fb0 (6:4fb0) +OakAppearsText: TX_FAR _OakAppearsText - db 8 + TX_ASM ld c,10 call DelayFrames xor a - ld [wcd4f],a - ld [wcd50],a - predef EmotionBubble ; display ! over head - ld a,4 - ld [wd528],a + ld [wEmotionBubbleSpriteIndex],a ; player's sprite + ld [wWhichEmotionBubble],a ; EXCLAMATION_BUBBLE + predef EmotionBubble + ld a,PLAYER_DIR_DOWN + ld [wPlayerMovingDirection],a jp TextScriptEnd -OakWalksUpText: ; 18fce (6:4fce) +OakWalksUpText: TX_FAR _OakWalksUpText db "@" -PalletTownText2: ; 0x18fd3 girl +PalletTownText2: ; girl TX_FAR _PalletTownText2 db "@" -PalletTownText3: ; 0x18fd8 fat man +PalletTownText3: ; fat man TX_FAR _PalletTownText3 db "@" -PalletTownText4: ; 0x18fdd sign by lab +PalletTownText4: ; sign by lab TX_FAR _PalletTownText4 db "@" -PalletTownText5: ; 0x18fe2 sign by fence +PalletTownText5: ; sign by fence TX_FAR _PalletTownText5 db "@" -PalletTownText6: ; 0x18fe7 sign by Red’s house +PalletTownText6: ; sign by Red’s house TX_FAR _PalletTownText6 db "@" -PalletTownText7: ; 0x18fec sign by Blue’s house +PalletTownText7: ; sign by Blue’s house TX_FAR _PalletTownText7 db "@" diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm index 55369df9..80acede8 100755 --- a/scripts/pewtercity.asm +++ b/scripts/pewtercity.asm @@ -1,10 +1,10 @@ -PewterCityScript: ; 19237 (6:5237) +PewterCityScript: call EnableAutoTextBoxDrawing ld hl, PewterCityScriptPointers - ld a, [W_PEWTERCITYCURSCRIPT] + ld a, [wPewterCityCurScript] jp CallFunctionInTable -PewterCityScriptPointers: ; 19243 (6:5243) +PewterCityScriptPointers: dw PewterCityScript0 dw PewterCityScript1 dw PewterCityScript2 @@ -13,17 +13,15 @@ PewterCityScriptPointers: ; 19243 (6:5243) dw PewterCityScript5 dw PewterCityScript6 -PewterCityScript0: ; 19251 (6:5251) +PewterCityScript0: xor a - ld [W_MUSEUM1FCURSCRIPT], a - ld hl, wd754 - res 0, [hl] + ld [wMuseum1fCurScript], a + ResetEvent EVENT_BOUGHT_MUSEUM_TICKET call PewterCityScript_1925e ret -PewterCityScript_1925e: ; 1925e (6:525e) - ld a, [wd755] - bit 7, a +PewterCityScript_1925e: + CheckEvent EVENT_BEAT_BROCK ret nz ld hl, CoordsData_19277 call ArePlayerCoordsInArray @@ -31,33 +29,33 @@ PewterCityScript_1925e: ; 1925e (6:525e) ld a, $f0 ld [wJoyIgnore], a ld a, $5 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID -CoordsData_19277: ; 19277 (6:5277) +CoordsData_19277: db $11,$23 db $11,$24 db $12,$25 db $13,$25 db $ff -PewterCityScript1: ; 19280 (6:5280) +PewterCityScript1: ld a, [wNPCMovementScriptPointerTableNum] and a ret nz ld a, $3 ld [H_SPRITEINDEX], a ld a, SPRITE_FACING_UP - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, ($3 << 4) | SPRITE_FACING_UP - ld [$ff8d], a + ld [hSpriteImageIndex], a call SetSpriteImageIndexAfterSettingFacingDirection call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $d - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3c ld [$ffeb], a @@ -71,57 +69,61 @@ PewterCityScript1: ; 19280 (6:5280) ld [wSpriteIndex], a call SetSpritePosition1 ld a, $3 - ld [$ff8c], a - ld de, MovementData_PewterMuseumGuyExit ; $52ce + ld [H_SPRITEINDEX], a + ld de, MovementData_PewterMuseumGuyExit call MoveSprite ld a, $2 - ld [W_PEWTERCITYCURSCRIPT], a + ld [wPewterCityCurScript], a ret -MovementData_PewterMuseumGuyExit: ; 192ce (6:52ce) - db $00,$00,$00,$00,$FF +MovementData_PewterMuseumGuyExit: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF -PewterCityScript2: ; 192d3 (6:52d3) +PewterCityScript2: ld a, [wd730] bit 0, a ret nz ld a, HS_MUSEUM_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, $3 - ld [W_PEWTERCITYCURSCRIPT], a + ld [wPewterCityCurScript], a ret -PewterCityScript3: ; 192e9 (6:52e9) +PewterCityScript3: ld a, $3 ld [wSpriteIndex], a call SetSpritePosition2 ld a, HS_MUSEUM_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject xor a ld [wJoyIgnore], a ld a, $0 - ld [W_PEWTERCITYCURSCRIPT], a + ld [wPewterCityCurScript], a ret -PewterCityScript4: ; 19305 (6:5305) +PewterCityScript4: ld a, [wNPCMovementScriptPointerTableNum] and a ret nz ld a, $5 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, SPRITE_FACING_LEFT - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, ($1 << 4) | SPRITE_FACING_LEFT - ld [$ff8d], a + ld [hSpriteImageIndex], a call SetSpriteImageIndexAfterSettingFacingDirection call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $e - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3c ld [$ffeb], a @@ -135,41 +137,46 @@ PewterCityScript4: ; 19305 (6:5305) ld [wSpriteIndex], a call SetSpritePosition1 ld a, $5 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld de, MovementData_PewterGymGuyExit call MoveSprite ld a, $5 - ld [W_PEWTERCITYCURSCRIPT], a + ld [wPewterCityCurScript], a ret -MovementData_PewterGymGuyExit: ; 19353 (6:5353) - db $C0,$C0,$C0,$C0,$C0,$FF +MovementData_PewterGymGuyExit: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db $FF -PewterCityScript5: ; 19359 (6:5359) +PewterCityScript5: ld a, [wd730] bit 0, a ret nz ld a, HS_GYM_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, $6 - ld [W_PEWTERCITYCURSCRIPT], a + ld [wPewterCityCurScript], a ret -PewterCityScript6: ; 1936f (6:536f) +PewterCityScript6: ld a, $5 ld [wSpriteIndex], a call SetSpritePosition2 ld a, HS_GYM_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject xor a ld [wJoyIgnore], a ld a, $0 - ld [W_PEWTERCITYCURSCRIPT], a + ld [wPewterCityCurScript], a ret -PewterCityTextPointers: ; 1938b (6:538b) +PewterCityTextPointers: dw PewterCityText1 dw PewterCityText2 dw PewterCityText3 @@ -185,133 +192,131 @@ PewterCityTextPointers: ; 1938b (6:538b) dw PewterCityText13 dw PewterCityText14 -PewterCityText1: ; 193a7 (6:53a7) +PewterCityText1: TX_FAR _PewterCityText1 db "@" -PewterCityText2: ; 193ac (6:53ac) +PewterCityText2: TX_FAR _PewterCityText2 db "@" -PewterCityText3: ; 193b1 (6:53b1) - db $08 ; asm +PewterCityText3: + 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 + ld [wPewterCityCurScript], a +.asm_193ee jp TextScriptEnd -PewterCityText_193f1: ; 193f1 (6:53f1) +PewterCityText_193f1: TX_FAR _PewterCityText_193f1 db "@" -PewterCityText_193f6: ; 193f6 (6:53f6) +PewterCityText_193f6: TX_FAR _PewterCityText_193f6 db "@" -PewterCityText_193fb: ; 193fb (6:53fb) +PewterCityText_193fb: TX_FAR _PewterCityText_193fb db "@" -PewterCityText13: ; 19400 (6:5400) +PewterCityText13: TX_FAR _PewterCityText13 db "@" -PewterCityText4: ; 19405 (6:5405) - db $8 +PewterCityText4: + 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) +PewterCityText_19427: TX_FAR _PewterCityText_19427 db "@" -PewterCityText_1942c: ; 1942c (6:542c) +PewterCityText_1942c: TX_FAR _PewterCityText_1942c db "@" -PewterCityText_19431: ; 19431 (6:5431) +PewterCityText_19431: TX_FAR _PewterCityText_19431 db "@" -PewterCityText5: ; 19436 (6:5436) - db $08 ; asm +PewterCityText5: + 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 call GetSpritePosition2 ld a, $4 - ld [W_PEWTERCITYCURSCRIPT], a + ld [wPewterCityCurScript], a jp TextScriptEnd -PewterCityText_1945d: ; 1945d (6:545d) +PewterCityText_1945d: TX_FAR _PewterCityText_1945d db "@" -PewterCityText14: ; 19462 (6:5462) - -PewterCityText_19462: ; 19462 (6:5462) - TX_FAR _PewterCityText_19462 +PewterCityText14: + TX_FAR _PewterCityText14 db "@" -PewterCityText6: ; 19467 (6:5467) +PewterCityText6: TX_FAR _PewterCityText6 db "@" -PewterCityText7: ; 1946c (6:546c) +PewterCityText7: TX_FAR _PewterCityText7 db "@" -PewterCityText10: ; 19471 (6:5471) +PewterCityText10: TX_FAR _PewterCityText10 db "@" -PewterCityText11: ; 19476 (6:5476) +PewterCityText11: TX_FAR _PewterCityText11 db "@" -PewterCityText12: ; 1947b (6:547b) +PewterCityText12: TX_FAR _PewterCityText12 db "@" diff --git a/scripts/pewtergym.asm b/scripts/pewtergym.asm index 9f9c7c3b..2cfee6c0 100755 --- a/scripts/pewtergym.asm +++ b/scripts/pewtergym.asm @@ -1,90 +1,85 @@ -PewterGymScript: ; 5c387 (17:4387) - ld hl, wd126 +PewterGymScript: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] call nz, PewterGymScript_5c3a4 call EnableAutoTextBoxDrawing - ld hl, PewterGymTrainerHeaders + ld hl, PewterGymTrainerHeader0 ld de, PewterGymScriptPointers - ld a, [W_PEWTERGYMCURSCRIPT] + ld a, [wPewterGymCurScript] call ExecuteCurMapScriptInTable - ld [W_PEWTERGYMCURSCRIPT], a + ld [wPewterGymCurScript], a ret -PewterGymScript_5c3a4: ; 5c3a4 (17:43a4) - ld hl, Gym1CityName ; $43ad - ld de, Gym1LeaderName ; $43b9 +PewterGymScript_5c3a4: + ld hl, Gym1CityName + ld de, Gym1LeaderName jp LoadGymLeaderAndCityName -Gym1CityName: ; 5c3ad (17:43ad) +Gym1CityName: db "PEWTER CITY@" -Gym1LeaderName: ; 5c3b9 (17:43b9) +Gym1LeaderName: db "BROCK@" -PewterGymScript_5c3bf: ; 5c3bf (17:43bf) +PewterGymScript_5c3bf: xor a ld [wJoyIgnore], a - ld [W_PEWTERGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPewterGymCurScript], a + ld [wCurMapScript], a ret -PewterGymScriptPointers: ; 5c3ca (17:43ca) +PewterGymScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw PewterGymScript3 -PewterGymScript3: ; 5c3d2 (17:43d2) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +PewterGymScript3: + ld a, [wIsInBattle] cp $ff jp z, PewterGymScript_5c3bf ld a, $f0 ld [wJoyIgnore], a -PewterGymScript_5c3df: ; 5c3df (17:43df) +PewterGymScript_5c3df: ld a, $4 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd755 - set 7, [hl] - ld bc, (TM_34 << 8) | 1 + SetEvent EVENT_BEAT_BROCK + lb bc, TM_34, 1 call GiveItem jr nc, .BagFull ld a, $5 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd755 - set 6, [hl] + SetEvent EVENT_GOT_TM34 jr .asm_5c408 .BagFull ld a, $6 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_5c408 - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges set 0, [hl] - ld hl, wd72a + ld hl, wBeatGymFlags set 0, [hl] ld a, HS_GYM_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_ROUTE_22_RIVAL_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject - ld hl, wd7eb - res 0, [hl] - res 7, [hl] + ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE ; deactivate gym trainers - ld hl, wd755 - set 2, [hl] + SetEvent EVENT_BEAT_PEWTER_GYM_TRAINER_0 jp PewterGymScript_5c3bf -PewterGymTextPointers: ; 5c435 (17:4435) +PewterGymTextPointers: dw PewterGymText1 dw PewterGymText2 dw PewterGymText3 @@ -92,33 +87,31 @@ PewterGymTextPointers: ; 5c435 (17:4435) dw PewterGymText5 dw PewterGymText6 -PewterGymTrainerHeaders: ; 5c441 (17:4441) -PewterGymTrainerHeader0: ; 5c441 (17:4441) - db $2 ; flag's bit +PewterGymTrainerHeader0: + dbEventFlagBit EVENT_BEAT_PEWTER_GYM_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_PEWTER_GYM_TRAINER_0 + dw PewterGymBattleText1 ; TextBeforeBattle + dw PewterGymAfterBattleText1 ; TextAfterBattle + dw PewterGymEndBattleText1 ; TextEndBattle + dw PewterGymEndBattleText1 ; TextEndBattle db $ff -PewterGymText1: ; 5c44e (17:444e) - db $08 ; asm - ld a, [wd755] - bit 7, a - jr z, .asm_4a735 ; 0x5c454 - bit 6, a - jr nz, .asm_ff7d0 ; 0x5c458 +PewterGymText1: + TX_ASM + CheckEvent EVENT_BEAT_BROCK + jr z, .asm_5c46a + CheckEventReuseA EVENT_GOT_TM34 + 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,109 +120,109 @@ 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 + ld [wGymLeaderNo], a xor a - ldh [$b4], a + ld [hJoyHeld], a ld a, $3 - ld [W_PEWTERGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a -.asm_e0ffb ; 0x5c49b + ld [wPewterGymCurScript], a + ld [wCurMapScript], a +.asm_5c49b jp TextScriptEnd -PewterGymText_5c49e: ; 5c49e (17:449e) +PewterGymText_5c49e: TX_FAR _PewterGymText_5c49e db "@" -PewterGymText_5c4a3: ; 5c4a3 (17:44a3) +PewterGymText_5c4a3: TX_FAR _PewterGymText_5c4a3 db "@" -PewterGymText4: ; 5c4a8 (17:44a8) +PewterGymText4: TX_FAR _TM34PreReceiveText db "@" -PewterGymText5: ; 5c4ad (17:44ad) +PewterGymText5: TX_FAR _ReceivedTM34Text - db $0B + TX_SFX_ITEM_1 TX_FAR _TM34ExplanationText db "@" -PewterGymText6: ; 5c4b7 (17:44b7) +PewterGymText6: TX_FAR _TM34NoRoomText db "@" -PewterGymText_5c4bc: ; 5c4bc (17:44bc) +PewterGymText_5c4bc: TX_FAR _PewterGymText_5c4bc - db $0B + TX_SFX_LEVEL_UP ; probably supposed to play SFX_GET_ITEM_1 but the wrong music bank is loaded TX_FAR _PewterGymText_5c4c1 db "@" -PewterGymText2: ; 5c4c6 (17:44c6) - db $08 ; asm +PewterGymText2: + TX_ASM ld hl, PewterGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd -PewterGymBattleText1: ; 5c4d0 (17:44d0) +PewterGymBattleText1: TX_FAR _PewterGymBattleText1 db "@" -PewterGymEndBattleText1: ; 5c4d5 (17:44d5) +PewterGymEndBattleText1: TX_FAR _PewterGymEndBattleText1 db "@" -PewterGymAfterBattleText1: ; 5c4da (17:44da) +PewterGymAfterBattleText1: TX_FAR _PewterGymAfterBattleText1 db "@" -PewterGymText3: ; 5c4df (17:44df) - db $08 ; asm - ld a, [wd72a] +PewterGymText3: + TX_ASM + ld a, [wBeatGymFlags] 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) +PewterGymText_5c515: TX_FAR _PewterGymText_5c515 db "@" -PewterGymText_5c51a: ; 5c51a (17:451a) +PewterGymText_5c51a: TX_FAR _PewterGymText_5c51a db "@" -PewterGymText_5c51f: ; 5c51f (17:451f) +PewterGymText_5c51f: TX_FAR _PewterGymText_5c51f db "@" -PewterGymText_5c524: ; 5c524 (17:4524) +PewterGymText_5c524: TX_FAR _PewterGymText_5c524 db "@" -PewterGymText_5c529: ; 5c529 (17:4529) +PewterGymText_5c529: TX_FAR _PewterGymText_5c529 db "@" diff --git a/scripts/pewterhouse1.asm b/scripts/pewterhouse1.asm index 05d27a14..8fa8dc3c 100755 --- a/scripts/pewterhouse1.asm +++ b/scripts/pewterhouse1.asm @@ -1,23 +1,23 @@ -PewterHouse1Script: ; 1d5f3 (7:55f3) +PewterHouse1Script: jp EnableAutoTextBoxDrawing -PewterHouse1TextPointers: ; 1d5f6 (7:55f6) +PewterHouse1TextPointers: dw PewterHouse1Text1 dw PewterHouse1Text2 dw PewterHouse1Text3 -PewterHouse1Text1: ; 1d5fc (7:55fc) +PewterHouse1Text1: TX_FAR _PewterHouse1Text1 - db $08 ; asm + TX_ASM ld a, NIDORAN_M call PlayCry call WaitForSoundToFinish jp TextScriptEnd -PewterHouse1Text2: ; 1d60c (7:560c) +PewterHouse1Text2: TX_FAR _PewterHouse1Text2 db "@" -PewterHouse1Text3: ; 1d611 (7:5611) +PewterHouse1Text3: TX_FAR _PewterHouse1Text3 db "@" diff --git a/scripts/pewterhouse2.asm b/scripts/pewterhouse2.asm index 92e40de2..e3bbe01e 100755 --- a/scripts/pewterhouse2.asm +++ b/scripts/pewterhouse2.asm @@ -1,14 +1,14 @@ -PewterHouse2Script: ; 1d648 (7:5648) +PewterHouse2Script: jp EnableAutoTextBoxDrawing -PewterHouse2TextPointers: ; 1d64b (7:564b) +PewterHouse2TextPointers: dw PewterHouse2Text1 dw PewterHouse2Text2 -PewterHouse2Text1: ; 1d64f (7:564f) +PewterHouse2Text1: TX_FAR _PewterHouse2Text1 db "@" -PewterHouse2Text2: ; 1d654 (7:5654) +PewterHouse2Text2: TX_FAR _PewterHouse2Text2 db "@" diff --git a/scripts/pewtermart.asm b/scripts/pewtermart.asm index 8fe99d94..d5281704 100755 --- a/scripts/pewtermart.asm +++ b/scripts/pewtermart.asm @@ -1,30 +1,28 @@ -PewterMartScript: ; 74cad (1d:4cad) +PewterMartScript: call EnableAutoTextBoxDrawing ld a, $1 ld [wAutoTextBoxDrawingControl], a ret -PewterMartTextPointers: ; 74cb6 (1d:4cb6) - dw PewterMartText1 +PewterMartTextPointers: + dw PewterCashierText dw PewterMartText2 dw PewterMartText3 -PewterMartText2: ; 74cbc (1d:4cbc) - db $08 ; asm - ld hl, PewterMartText_74cc6 +PewterMartText2: + TX_ASM + ld hl, .Text call PrintText jp TextScriptEnd - -PewterMartText_74cc6: ; 74cc6 (1d:4cc6) - TX_FAR _PewterMartText_74cc6 +.Text + TX_FAR _PewterMartText2 db "@" -PewterMartText3: ; 74ccb (1d:4ccb) - db $08 ; asm - ld hl, PewterMartText_74cd5 +PewterMartText3: + TX_ASM + ld hl, .Text call PrintText jp TextScriptEnd - -PewterMartText_74cd5: ; 74cd5 (1d:4cd5) - TX_FAR _PewterMartText_74cd5 +.Text + TX_FAR _PewterMartText3 db "@" diff --git a/scripts/pewterpokecenter.asm b/scripts/pewterpokecenter.asm index 1f3cabe0..5de1e6b7 100755 --- a/scripts/pewterpokecenter.asm +++ b/scripts/pewterpokecenter.asm @@ -1,75 +1,84 @@ -PewterPokecenterScript: ; 5c587 (17:4587) +PewterPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -PewterPokecenterTextPointers: ; 5c58d (17:458d) - dw PewterPokecenterText1 +PewterPokecenterTextPointers: + dw PewterHealNurseText dw PewterPokecenterText2 - dw PewterPokecenterText3 - dw PewterPokecenterText4 + dw PewterJigglypuffText + dw PewterTradeNurseText -PewterPokecenterText1: ; 5c595 (17:4595) - db $ff +PewterHealNurseText: + TX_POKECENTER_NURSE -PewterPokecenterText2: ; 5c596 (17:4596) - TX_FAR _PewterPokecenterText1 +PewterPokecenterText2: + TX_FAR _PewterPokecenterText2 db "@" -PewterPokecenterText3: ; 5c59b (17:459b) - db $8 +PewterJigglypuffText: + TX_ASM ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, PewterPokecenterText5 + ld hl, .Text call PrintText - ld a, $ff - call PlaySound - ld c, $20 + StopAllMusic + ld c, 32 call DelayFrames - ld hl, Unknown_5c608 ; $4608 - ld de, wTrainerFacingDirection - ld bc, $0004 + ld hl, JigglypuffFacingDirections + ld de, wJigglypuffFacingDirections + ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections call CopyData - ld a, [wSpriteStateData1 + $32] - ld hl, wTrainerFacingDirection -.asm_5c5c3 + + ld a, [Sprite03SpriteImageIdx] + ld hl, wJigglypuffFacingDirections +.findMatchingFacingDirectionLoop cp [hl] inc hl - jr nz, .asm_5c5c3 ; 0x5c5c5 $fc + jr nz, .findMatchingFacingDirectionLoop dec hl push hl ld c, BANK(Music_JigglypuffSong) ld a, MUSIC_JIGGLYPUFF_SONG call PlayMusic pop hl -.asm_5c5d1 +.loop ld a, [hl] - ld [wSpriteStateData1 + $32], a + ld [Sprite03SpriteImageIdx], a + +; rotate the array push hl - ld hl, wTrainerFacingDirection - ld de, wTrainerEngageDistance - ld bc, $0004 + ld hl, wJigglypuffFacingDirections + ld de, wJigglypuffFacingDirections - 1 + ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections call CopyData - ld a, [wTrainerEngageDistance] - ld [wcd42], a + ld a, [wJigglypuffFacingDirections - 1] + ld [wJigglypuffFacingDirections + 3], a pop hl - ld c, $18 + + ld c, 24 call DelayFrames - ld a, [wc026] + + ld a, [wChannelSoundIDs] ld b, a - ld a, [wc027] + ld a, [wChannelSoundIDs + Ch1] or b - jr nz, .asm_5c5d1 ; 0x5c5f6 $d9 - ld c, $30 + jr nz, .loop + + ld c, 48 call DelayFrames call PlayDefaultMusic jp TextScriptEnd -PewterPokecenterText5: ; 5c603 (17:4603) - TX_FAR _PewterPokecenterText5 +.Text + TX_FAR _PewterJigglypuffText db "@" -Unknown_5c608: ; 5c608 (17:4608) - db $30, $38, $34, $3c +JigglypuffFacingDirections: + db $30 | SPRITE_FACING_DOWN + db $30 | SPRITE_FACING_LEFT + db $30 | SPRITE_FACING_UP + db $30 | SPRITE_FACING_RIGHT +JigglypuffFacingDirectionsEnd: -PewterPokecenterText4: ; 5c60c (17:460c) - db $f6 +PewterTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST diff --git a/scripts/pokemontower1.asm b/scripts/pokemontower1.asm index 4887e740..6d9d1b3f 100755 --- a/scripts/pokemontower1.asm +++ b/scripts/pokemontower1.asm @@ -1,29 +1,29 @@ -PokemonTower1Script: ; 6042c (18:442c) +PokemonTower1Script: jp EnableAutoTextBoxDrawing -PokemonTower1TextPointers: ; 6042f (18:442f) +PokemonTower1TextPointers: dw PokemonTower1Text1 dw PokemonTower1Text2 dw PokemonTower1Text3 dw PokemonTower1Text4 dw PokemonTower1Text5 -PokemonTower1Text1: ; 60439 (18:4439) +PokemonTower1Text1: TX_FAR _PokemonTower1Text1 db "@" -PokemonTower1Text2: ; 6043e (18:443e) +PokemonTower1Text2: TX_FAR _PokemonTower1Text2 db "@" -PokemonTower1Text3: ; 60443 (18:4443) +PokemonTower1Text3: TX_FAR _PokemonTower1Text3 db "@" -PokemonTower1Text4: ; 60448 (18:4448) +PokemonTower1Text4: TX_FAR _PokemonTower1Text4 db "@" -PokemonTower1Text5: ; 6044d (18:444d) +PokemonTower1Text5: TX_FAR _PokemonTower1Text5 db "@" diff --git a/scripts/pokemontower2.asm b/scripts/pokemontower2.asm index dc9275f2..383b175d 100755 --- a/scripts/pokemontower2.asm +++ b/scripts/pokemontower2.asm @@ -1,177 +1,188 @@ -PokemonTower2Script: ; 604f2 (18:44f2) +PokemonTower2Script: call EnableAutoTextBoxDrawing ld hl, PokemonTower2ScriptPointers - ld a, [W_POKEMONTOWER2CURSCRIPT] + ld a, [wPokemonTower2CurScript] jp CallFunctionInTable -PokemonTower2Script_604fe: ; 604fe (18:44fe) +PokemonTower2Script_604fe: xor a ld [wJoyIgnore], a - ld [W_POKEMONTOWER2CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower2CurScript], a + ld [wCurMapScript], a ret -PokemonTower2ScriptPointers: ; 60509 (18:4509) +PokemonTower2ScriptPointers: dw PokemonTower2Script0 dw PokemonTower2Script1 dw PokemonTower2Script2 -PokemonTower2Script0: ; 6050f (18:450f) - ld a, [wd764] - bit 7, a +PokemonTower2Script0: + CheckEvent EVENT_BEAT_POKEMON_TOWER_RIVAL ret nz - ld hl, CoordsData_6055e ; $455e + ld hl, CoordsData_6055e call ArePlayerCoordsInArray ret nc ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic - ld hl, wd764 - res 6, [hl] - ld a, [wWhichTrade] + ResetEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT + ld a, [wCoordIndex] cp $1 - ld a, $8 - ld b, $0 - jr nz, .asm_60544 ; 0x60539 $9 - ld hl, wd764 - set 6, [hl] - ld a, $2 - ld b, $c + ld a, PLAYER_DIR_UP + ld b, SPRITE_FACING_DOWN + jr nz, .asm_60544 +; the rival is on the left side and the player is on the right side + SetEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT + ld a, PLAYER_DIR_LEFT + ld b, SPRITE_FACING_RIGHT .asm_60544 - ld [wd528], a + ld [wPlayerMovingDirection], a ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, b - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [hJoyHeld], a ld [hJoyPressed], a ret -CoordsData_6055e: ; 6055e (18:455e) +CoordsData_6055e: db $05,$0F db $06,$0E db $0F ; isn't this supposed to end in $ff? -PokemonTower2Script1: ; 60563 (18:4563) - ld a, [W_ISINBATTLE] +PokemonTower2Script1: + ld a, [wIsInBattle] cp $ff jp z, PokemonTower2Script_604fe ld a, $f0 ld [wJoyIgnore], a - ld hl, wd764 - set 7, [hl] + SetEvent EVENT_BEAT_POKEMON_TOWER_RIVAL ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld de, MovementData_605b2 - ld a, [wd764] - bit 6, a - jr nz, .asm_60589 ; 0x60584 $3 + CheckEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT + jr nz, .asm_60589 ld de, MovementData_605a9 .asm_60589 ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call MoveSprite ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateStart ld a, $2 - ld [W_POKEMONTOWER2CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower2CurScript], a + ld [wCurMapScript], a ret -MovementData_605a9: ; 605a9 (18:45a9) - db $C0,$00,$00,$C0,$00,$00,$C0,$C0,$FF - -MovementData_605b2: ; 605b2 (18:45b2) - db $00,$00,$C0,$C0,$C0,$C0,$00,$00,$FF - -PokemonTower2Script2: ; 605bb (18:45bb) +MovementData_605a9: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db $FF + +MovementData_605b2: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF + +PokemonTower2Script2: ld a, [wd730] bit 0, a ret nz ld a, HS_POKEMONTOWER_2_RIVAL - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject xor a ld [wJoyIgnore], a call PlayDefaultMusic ld a, $0 - ld [W_POKEMONTOWER2CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower2CurScript], a + ld [wCurMapScript], a ret -PokemonTower2TextPointers: ; 605db (18:45db) +PokemonTower2TextPointers: dw PokemonTower2Text1 dw PokemonTower2Text2 -PokemonTower2Text1: ; 605df (18:45df) - db $08 ; asm - ld a, [wd764] - bit 7, a - jr z, .asm_16f24 ; 0x605e5 +PokemonTower2Text1: + TX_ASM + CheckEvent EVENT_BEAT_POKEMON_TOWER_RIVAL + 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 + ld a, OPP_SONY2 + ld [wCurOpponent], a ; select which team to use during the encounter - ld a, [W_RIVALSTARTER] + ld a, [wRivalStarter] 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 + ld [wTrainerNo], a ld a, $1 - ld [W_POKEMONTOWER2CURSCRIPT], a - ld [W_CURMAPSCRIPT], a -.asm_41852 ; 0x6062a + ld [wPokemonTower2CurScript], a + ld [wCurMapScript], a +.asm_41852 jp TextScriptEnd -PokemonTower2Text_6062d: ; 6062d (18:462d) +PokemonTower2Text_6062d: TX_FAR _PokemonTower2Text_6062d db "@" -PokemonTower2Text_60632: ; 60632 (18:4632) +PokemonTower2Text_60632: TX_FAR _PokemonTower2Text_60632 db "@" -PokemonTower2Text_60637: ; 60637 (18:4637) +PokemonTower2Text_60637: TX_FAR _PokemonTower2Text_60637 db "@" -PokemonTower2Text_6063c: ; 6063c (18:463c) +PokemonTower2Text_6063c: TX_FAR _PokemonTower2Text_6063c db "@" -PokemonTower2Text2: ; 60641 (18:4641) +PokemonTower2Text2: TX_FAR _PokemonTower2Text2 db "@" diff --git a/scripts/pokemontower3.asm b/scripts/pokemontower3.asm index 8df5bfc5..6027b450 100755 --- a/scripts/pokemontower3.asm +++ b/scripts/pokemontower3.asm @@ -1,102 +1,101 @@ -PokemonTower3Script: ; 606cc (18:46cc) +PokemonTower3Script: call EnableAutoTextBoxDrawing - ld hl, PokemonTower3TrainerHeaders + ld hl, PokemonTower3TrainerHeader0 ld de, PokemonTower3ScriptPointers - ld a, [W_POKEMONTOWER3CURSCRIPT] + ld a, [wPokemonTower3CurScript] call ExecuteCurMapScriptInTable - ld [W_POKEMONTOWER3CURSCRIPT], a + ld [wPokemonTower3CurScript], a ret -PokemonTower3ScriptPointers: ; 606df (18:46df) +PokemonTower3ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -PokemonTower3TextPointers: ; 606e5 (18:46e5) +PokemonTower3TextPointers: dw PokemonTower3Text1 dw PokemonTower3Text2 dw PokemonTower3Text3 - dw Predef5CText + dw PickUpItemText -PokemonTower3TrainerHeaders: ; 606ed (18:46ed) -PokemonTower3TrainerHeader0: ; 606ed (18:46ed) - db $1 ; flag's bit +PokemonTower3TrainerHeader0: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_0 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 - -PokemonTower3TrainerHeader1: ; 606f9 (18:46f9) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_0 + dw PokemonTower3BattleText1 ; TextBeforeBattle + dw PokemonTower3AfterBattleText1 ; TextAfterBattle + dw PokemonTower3EndBattleText1 ; TextEndBattle + dw PokemonTower3EndBattleText1 ; TextEndBattle + +PokemonTower3TrainerHeader1: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_1 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 - -PokemonTower3TrainerHeader2: ; 60705 (18:4705) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_1 + dw PokemonTower3BattleText2 ; TextBeforeBattle + dw PokemonTower3AfterBattleText2 ; TextAfterBattle + dw PokemonTower3EndBattleText2 ; TextEndBattle + dw PokemonTower3EndBattleText2 ; TextEndBattle + +PokemonTower3TrainerHeader2: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_2 + dw PokemonTower3BattleText3 ; TextBeforeBattle + dw PokemonTower3AfterBattleText3 ; TextAfterBattle + dw PokemonTower3EndBattleText3 ; TextEndBattle + dw PokemonTower3EndBattleText3 ; TextEndBattle db $ff -PokemonTower3Text1: ; 60712 (18:4712) - db $08 ; asm +PokemonTower3Text1: + TX_ASM ld hl, PokemonTower3TrainerHeader0 call TalkToTrainer jp TextScriptEnd -PokemonTower3Text2: ; 6071c (18:471c) - db $08 ; asm +PokemonTower3Text2: + TX_ASM ld hl, PokemonTower3TrainerHeader1 call TalkToTrainer jp TextScriptEnd -PokemonTower3Text3: ; 60726 (18:4726) - db $08 ; asm +PokemonTower3Text3: + TX_ASM ld hl, PokemonTower3TrainerHeader2 call TalkToTrainer jp TextScriptEnd -PokemonTower3BattleText1: ; 60730 (18:4730) +PokemonTower3BattleText1: TX_FAR _PokemonTower3BattleText1 db "@" -PokemonTower3EndBattleText1: ; 60735 (18:4735) +PokemonTower3EndBattleText1: TX_FAR _PokemonTower3EndBattleText1 db "@" -PokemonTower3AfterBattleText1: ; 6073a (18:473a) +PokemonTower3AfterBattleText1: TX_FAR _PokemonTower3AfterBattleText1 db "@" -PokemonTower3BattleText2: ; 6073f (18:473f) +PokemonTower3BattleText2: TX_FAR _PokemonTower3BattleText2 db "@" -PokemonTower3EndBattleText2: ; 60744 (18:4744) +PokemonTower3EndBattleText2: TX_FAR _PokemonTower3EndBattleText2 db "@" -PokemonTower3AfterBattleText2: ; 60749 (18:4749) +PokemonTower3AfterBattleText2: TX_FAR _PokemonTower3AfterBattleText2 db "@" -PokemonTower3BattleText3: ; 6074e (18:474e) +PokemonTower3BattleText3: TX_FAR _PokemonTower3BattleText3 db "@" -PokemonTower3EndBattleText3: ; 60753 (18:4753) +PokemonTower3EndBattleText3: TX_FAR _PokemonTower3EndBattleText3 db "@" -PokemonTower3AfterBattleText3: ; 60758 (18:4758) +PokemonTower3AfterBattleText3: TX_FAR _PokemonTower3AfterBattleText3 db "@" diff --git a/scripts/pokemontower4.asm b/scripts/pokemontower4.asm index 760bb604..a8307c01 100755 --- a/scripts/pokemontower4.asm +++ b/scripts/pokemontower4.asm @@ -1,105 +1,104 @@ -PokemonTower4Script: ; 607f6 (18:47f6) +PokemonTower4Script: call EnableAutoTextBoxDrawing - ld hl, PokemonTower4TrainerHeaders + ld hl, PokemonTower4TrainerHeader0 ld de, PokemonTower4ScriptPointers - ld a, [W_POKEMONTOWER4CURSCRIPT] + ld a, [wPokemonTower4CurScript] call ExecuteCurMapScriptInTable - ld [W_POKEMONTOWER4CURSCRIPT], a + ld [wPokemonTower4CurScript], a ret -PokemonTower4ScriptPointers: ; 60809 (18:4809) +PokemonTower4ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -PokemonTower4TextPointers: ; 6080f (18:480f) +PokemonTower4TextPointers: dw PokemonTower4Text1 dw PokemonTower4Text2 dw PokemonTower4Text3 - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText -PokemonTower4TrainerHeaders: ; 6081b (18:481b) -PokemonTower4TrainerHeader0: ; 6081b (18:481b) - db $1 ; flag's bit +PokemonTower4TrainerHeader0: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_0 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 - -PokemonTower4TrainerHeader1: ; 60827 (18:4827) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_0 + dw PokemonTower4BattleText1 ; TextBeforeBattle + dw PokemonTower4AfterBattleText1 ; TextAfterBattle + dw PokemonTower4EndBattleText1 ; TextEndBattle + dw PokemonTower4EndBattleText1 ; TextEndBattle + +PokemonTower4TrainerHeader1: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_1 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 - -PokemonTower4TrainerHeader2: ; 60833 (18:4833) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_1 + dw PokemonTower4BattleText2 ; TextBeforeBattle + dw PokemonTower4AfterBattleText2 ; TextAfterBattle + dw PokemonTower4EndBattleText2 ; TextEndBattle + dw PokemonTower4EndBattleText2 ; TextEndBattle + +PokemonTower4TrainerHeader2: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_2 + dw PokemonTower4BattleText3 ; TextBeforeBattle + dw PokemonTower4AfterBattleText3 ; TextAfterBattle + dw PokemonTower4EndBattleText3 ; TextEndBattle + dw PokemonTower4EndBattleText3 ; TextEndBattle db $ff -PokemonTower4Text1: ; 60840 (18:4840) - db $08 ; asm +PokemonTower4Text1: + TX_ASM ld hl, PokemonTower4TrainerHeader0 call TalkToTrainer jp TextScriptEnd -PokemonTower4Text2: ; 6084a (18:484a) - db $08 ; asm +PokemonTower4Text2: + TX_ASM ld hl, PokemonTower4TrainerHeader1 call TalkToTrainer jp TextScriptEnd -PokemonTower4Text3: ; 60854 (18:4854) - db $08 ; asm +PokemonTower4Text3: + TX_ASM ld hl, PokemonTower4TrainerHeader2 call TalkToTrainer jp TextScriptEnd -PokemonTower4BattleText1: ; 6085e (18:485e) +PokemonTower4BattleText1: TX_FAR _PokemonTower4BattleText1 db "@" -PokemonTower4EndBattleText1: ; 60863 (18:4863) +PokemonTower4EndBattleText1: TX_FAR _PokemonTower4EndBattleText1 db "@" -PokemonTower4AfterBattleText1: ; 60868 (18:4868) +PokemonTower4AfterBattleText1: TX_FAR _PokemonTower4AfterBattleText1 db "@" -PokemonTower4BattleText2: ; 6086d (18:486d) +PokemonTower4BattleText2: TX_FAR _PokemonTower4BattleText2 db "@" -PokemonTower4EndBattleText2: ; 60872 (18:4872) +PokemonTower4EndBattleText2: TX_FAR _PokemonTower4EndBattleText2 db "@" -PokemonTower4AfterBattleText2: ; 60877 (18:4877) +PokemonTower4AfterBattleText2: TX_FAR _PokemonTower4AfterBattleText2 db "@" -PokemonTower4BattleText3: ; 6087c (18:487c) +PokemonTower4BattleText3: TX_FAR _PokemonTower4BattleText3 db "@" -PokemonTower4EndBattleText3: ; 60881 (18:4881) +PokemonTower4EndBattleText3: TX_FAR _PokemonTower4EndBattleText3 db "@" -PokemonTower4AfterBattleText3: ; 60886 (18:4886) +PokemonTower4AfterBattleText3: TX_FAR _PokemonTower4AfterBattleText3 db "@" diff --git a/scripts/pokemontower5.asm b/scripts/pokemontower5.asm index b70f9e28..9a13f286 100755 --- a/scripts/pokemontower5.asm +++ b/scripts/pokemontower5.asm @@ -1,30 +1,27 @@ -PokemonTower5Script: ; 60932 (18:4932) +PokemonTower5Script: call EnableAutoTextBoxDrawing - ld hl, PokemonTower5TrainerHeaders + ld hl, PokemonTower5TrainerHeader0 ld de, PokemonTower5ScriptPointers - ld a, [W_POKEMONTOWER5CURSCRIPT] + ld a, [wPokemonTower5CurScript] call ExecuteCurMapScriptInTable - ld [W_POKEMONTOWER5CURSCRIPT], a + ld [wPokemonTower5CurScript], a ret -PokemonTower5ScriptPointers: ; 60945 (18:4945) +PokemonTower5ScriptPointers: dw PokemonTower5Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -PokemonTower5Script0: ; 6094b (18:494b) - ld hl, CoordsData_60992 ; $4992 +PokemonTower5Script0: + ld hl, CoordsData_60992 call ArePlayerCoordsInArray jr c, .asm_60960 ld hl, wd72e res 4, [hl] - ld hl, wd767 - res 7, [hl] + ResetEvent EVENT_IN_PURIFIED_ZONE jp CheckFightingMapTrainers .asm_60960 - ld hl, wd767 - bit 7, [hl] - set 7, [hl] + CheckAndSetEvent EVENT_IN_PURIFIED_ZONE ret nz xor a ld [hJoyHeld], a @@ -38,143 +35,142 @@ PokemonTower5Script0: ; 6094b (18:494b) call Delay3 call GBFadeInFromWhite ld a, $7 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a ret -CoordsData_60992: ; 60992 (18:4992) +CoordsData_60992: db $08,$0A db $08,$0B db $09,$0A db $09,$0B db $FF -PokemonTower5TextPointers: ; 6099b (18:499b) +PokemonTower5TextPointers: dw PokemonTower5Text1 dw PokemonTower5Text2 dw PokemonTower5Text3 dw PokemonTower5Text4 dw PokemonTower5Text5 - dw Predef5CText + dw PickUpItemText dw PokemonTower5Text7 -PokemonTower5TrainerHeaders: ; 609a9 (18:49a9) -PokemonTower5TrainerHeader0: ; 609a9 (18:49a9) - db $2 ; flag's bit +PokemonTower5TrainerHeader0: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_0 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 - -PokemonTower5TrainerHeader1: ; 609b5 (18:49b5) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_0 + dw PokemonTower5BattleText1 ; TextBeforeBattle + dw PokemonTower5AfterBattleText1 ; TextAfterBattle + dw PokemonTower5EndBattleText1 ; TextEndBattle + dw PokemonTower5EndBattleText1 ; TextEndBattle + +PokemonTower5TrainerHeader1: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_1 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 - -PokemonTower5TrainerHeader2: ; 609c1 (18:49c1) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_1 + dw PokemonTower5BattleText2 ; TextBeforeBattle + dw PokemonTower5AfterBattleText2 ; TextAfterBattle + dw PokemonTower5EndBattleText2 ; TextEndBattle + dw PokemonTower5EndBattleText2 ; TextEndBattle + +PokemonTower5TrainerHeader2: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_2 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 - -PokemonTower5TrainerHeader3: ; 609cd (18:49cd) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_2 + dw PokemonTower5BattleText3 ; TextBeforeBattle + dw PokemonTower5AfterBattleText3 ; TextAfterBattle + dw PokemonTower5EndBattleText3 ; TextEndBattle + dw PokemonTower5EndBattleText3 ; TextEndBattle + +PokemonTower5TrainerHeader3: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_3 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 + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_3 + dw PokemonTower5BattleText4 ; TextBeforeBattle + dw PokemonTower5AfterBattleText4 ; TextAfterBattle + dw PokemonTower5EndBattleText4 ; TextEndBattle + dw PokemonTower5EndBattleText4 ; TextEndBattle db $ff -PokemonTower5Text1: ; 609da (18:49da) +PokemonTower5Text1: TX_FAR _PokemonTower5Text1 db "@" -PokemonTower5Text2: ; 609df (18:49df) - db $08 ; asm +PokemonTower5Text2: + TX_ASM ld hl, PokemonTower5TrainerHeader0 call TalkToTrainer jp TextScriptEnd -PokemonTower5BattleText1: ; 609e9 (18:49e9) +PokemonTower5BattleText1: TX_FAR _PokemonTower5BattleText1 db "@" -PokemonTower5EndBattleText1: ; 609ee (18:49ee) +PokemonTower5EndBattleText1: TX_FAR _PokemonTower5EndBattleText1 db "@" -PokemonTower5AfterBattleText1: ; 609f3 (18:49f3) +PokemonTower5AfterBattleText1: TX_FAR _PokemonTower5AfterBattleText1 db "@" -PokemonTower5Text3: ; 609f8 (18:49f8) - db $08 ; asm +PokemonTower5Text3: + TX_ASM ld hl, PokemonTower5TrainerHeader1 call TalkToTrainer jp TextScriptEnd -PokemonTower5BattleText2: ; 60a02 (18:4a02) +PokemonTower5BattleText2: TX_FAR _PokemonTower5BattleText2 db "@" -PokemonTower5EndBattleText2: ; 60a07 (18:4a07) +PokemonTower5EndBattleText2: TX_FAR _PokemonTower5EndBattleText2 db "@" -PokemonTower5AfterBattleText2: ; 60a0c (18:4a0c) +PokemonTower5AfterBattleText2: TX_FAR _PokemonTower5AfterBattleText2 db "@" -PokemonTower5Text4: ; 60a11 (18:4a11) - db $08 ; asm +PokemonTower5Text4: + TX_ASM ld hl, PokemonTower5TrainerHeader2 call TalkToTrainer jp TextScriptEnd -PokemonTower5BattleText3: ; 60a1b (18:4a1b) +PokemonTower5BattleText3: TX_FAR _PokemonTower5BattleText3 db "@" -PokemonTower5EndBattleText3: ; 60a20 (18:4a20) +PokemonTower5EndBattleText3: TX_FAR _PokemonTower5EndBattleText3 db "@" -PokemonTower5AfterBattleText3: ; 60a25 (18:4a25) +PokemonTower5AfterBattleText3: TX_FAR _PokemonTower5AfterBattleText3 db "@" -PokemonTower5Text5: ; 60a2a (18:4a2a) - db $08 ; asm - ld hl, PokemonTower5TrainerHeader3 ; $49cd +PokemonTower5Text5: + TX_ASM + ld hl, PokemonTower5TrainerHeader3 call TalkToTrainer jp TextScriptEnd -PokemonTower5BattleText4: ; 60a34 (18:4a34) +PokemonTower5BattleText4: TX_FAR _PokemonTower5BattleText4 db "@" -PokemonTower5EndBattleText4: ; 60a39 (18:4a39) +PokemonTower5EndBattleText4: TX_FAR _PokemonTower5EndBattleText4 db "@" -PokemonTower5AfterBattleText4: ; 60a3e (18:4a3e) +PokemonTower5AfterBattleText4: TX_FAR _PokemonTower5AfterBattleText4 db "@" -PokemonTower5Text7: ; 60a43 (18:4a43) +PokemonTower5Text7: TX_FAR _PokemonTower5Text7 db "@" diff --git a/scripts/pokemontower6.asm b/scripts/pokemontower6.asm index 58968d17..c3118f62 100755 --- a/scripts/pokemontower6.asm +++ b/scripts/pokemontower6.asm @@ -1,52 +1,51 @@ -PokemonTower6Script: ; 60aef (18:4aef) +PokemonTower6Script: call EnableAutoTextBoxDrawing - ld hl, PokemonTower6TrainerHeaders + ld hl, PokemonTower6TrainerHeader0 ld de, PokemonTower6ScriptPointers - ld a, [W_POKEMONTOWER6CURSCRIPT] + ld a, [wPokemonTower6CurScript] call ExecuteCurMapScriptInTable - ld [W_POKEMONTOWER6CURSCRIPT], a + ld [wPokemonTower6CurScript], a ret -PokemonTower6Script_60b02: ; 60b02 (18:4b02) +PokemonTower6Script_60b02: xor a ld [wJoyIgnore], a - ld [W_POKEMONTOWER6CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower6CurScript], a + ld [wCurMapScript], a ret -PokemonTower6ScriptPointers: ; 60b0d (18:4b0d) +PokemonTower6ScriptPointers: dw PokemonTower6Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw PokemonTower6Script3 dw PokemonTower6Script4 -PokemonTower6Script0: ; 60b17 (18:4b17) - ld a, [wd768] - bit 7, a +PokemonTower6Script0: + CheckEvent EVENT_BEAT_GHOST_MAROWAK 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 [hSpriteIndexOrTextID], a call DisplayTextID ld a, MAROWAK - ld [W_CUROPPONENT], a ; wd059 + ld [wCurOpponent], a ld a, 30 - ld [W_CURENEMYLVL], a ; W_CURENEMYLVL + ld [wCurEnemyLVL], a ld a, $4 - ld [W_POKEMONTOWER6CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower6CurScript], a + ld [wCurMapScript], a ret -CoordsData_60b45: ; 60b45 (18:4b45) +CoordsData_60b45: db $10,$0A,$FF -PokemonTower6Script4: ; 60b48 (18:4b48) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +PokemonTower6Script4: + ld a, [wIsInBattle] cp $ff jp z, PokemonTower6Script_60b02 ld a, $ff @@ -60,16 +59,15 @@ PokemonTower6Script4: ; 60b48 (18:4b48) ld a, [wBattleResult] and a jr nz, .asm_60b82 - ld hl, wd768 - set 7, [hl] + SetEvent EVENT_BEAT_GHOST_MAROWAK ld a, $7 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a ld a, $0 - ld [W_POKEMONTOWER6CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower6CurScript], a + ld [wCurMapScript], a ret .asm_60b82 ld a, $1 @@ -82,134 +80,133 @@ PokemonTower6Script4: ; 60b48 (18:4b48) ld hl, wd730 set 7, [hl] ld a, $3 - ld [W_POKEMONTOWER6CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower6CurScript], a + ld [wCurMapScript], a ret -PokemonTower6Script3: ; 60ba1 (18:4ba1) +PokemonTower6Script3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a - ld [W_POKEMONTOWER6CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower6CurScript], a + ld [wCurMapScript], a ret -PokemonTower6TextPointers: ; 60bb1 (18:4bb1) +PokemonTower6TextPointers: dw PokemonTower6Text1 dw PokemonTower6Text2 dw PokemonTower6Text3 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText dw PokemonTower6Text6 dw PokemonTower6Text7 -PokemonTower6TrainerHeaders: ; 60bbf (18:4bbf) -PokemonTower6TrainerHeader0: ; 60bbf (18:4bbf) - db $1 ; flag's bit +PokemonTower6TrainerHeader0: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_0 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 - -PokemonTower6TrainerHeader1: ; 60bcb (18:4bcb) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_0 + dw PokemonTower6BattleText1 ; TextBeforeBattle + dw PokemonTower6AfterBattleText1 ; TextAfterBattle + dw PokemonTower6EndBattleText1 ; TextEndBattle + dw PokemonTower6EndBattleText1 ; TextEndBattle + +PokemonTower6TrainerHeader1: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_1 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 - -PokemonTower6TrainerHeader2: ; 60bd7 (18:4bd7) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_1 + dw PokemonTower6BattleText2 ; TextBeforeBattle + dw PokemonTower6AfterBattleText2 ; TextAfterBattle + dw PokemonTower6EndBattleText2 ; TextEndBattle + dw PokemonTower6EndBattleText2 ; TextEndBattle + +PokemonTower6TrainerHeader2: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_2 + dw PokemonTower6BattleText3 ; TextBeforeBattle + dw PokemonTower6AfterBattleText3 ; TextAfterBattle + dw PokemonTower6EndBattleText3 ; TextEndBattle + dw PokemonTower6EndBattleText3 ; TextEndBattle db $ff -PokemonTower6Text1: ; 60be4 (18:4be4) - db $08 ; asm +PokemonTower6Text1: + TX_ASM ld hl, PokemonTower6TrainerHeader0 call TalkToTrainer jp TextScriptEnd -PokemonTower6Text2: ; 60bee (18:4bee) - db $08 ; asm +PokemonTower6Text2: + TX_ASM ld hl, PokemonTower6TrainerHeader1 call TalkToTrainer jp TextScriptEnd -PokemonTower6Text3: ; 60bf8 (18:4bf8) - db $08 ; asm +PokemonTower6Text3: + TX_ASM ld hl, PokemonTower6TrainerHeader2 call TalkToTrainer jp TextScriptEnd -PokemonTower6Text7: ; 60c02 (18:4c02) - db $8 +PokemonTower6Text7: + 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 jp TextScriptEnd -PokemonTower2Text_60c1f: ; 60c1f (18:4c1f) +PokemonTower2Text_60c1f: TX_FAR _PokemonTower2Text_60c1f db "@" -PokemonTower2Text_60c24: ; 60c24 (18:4c24) +PokemonTower2Text_60c24: TX_FAR _PokemonTower2Text_60c24 db "@" -PokemonTower6BattleText1: ; 60c29 (18:4c29) +PokemonTower6BattleText1: TX_FAR _PokemonTower6BattleText1 db "@" -PokemonTower6EndBattleText1: ; 60c2e (18:4c2e) +PokemonTower6EndBattleText1: TX_FAR _PokemonTower6EndBattleText1 db "@" -PokemonTower6AfterBattleText1: ; 60c33 (18:4c33) +PokemonTower6AfterBattleText1: TX_FAR _PokemonTower6AfterBattleText1 db "@" -PokemonTower6BattleText2: ; 60c38 (18:4c38) +PokemonTower6BattleText2: TX_FAR _PokemonTower6BattleText2 db "@" -PokemonTower6EndBattleText2: ; 60c3d (18:4c3d) +PokemonTower6EndBattleText2: TX_FAR _PokemonTower6EndBattleText2 db "@" -PokemonTower6AfterBattleText2: ; 60c42 (18:4c42) +PokemonTower6AfterBattleText2: TX_FAR _PokemonTower6AfterBattleText2 db "@" -PokemonTower6BattleText3: ; 60c47 (18:4c47) +PokemonTower6BattleText3: TX_FAR _PokemonTower6BattleText3 db "@" -PokemonTower6EndBattleText3: ; 60c4c (18:4c4c) +PokemonTower6EndBattleText3: TX_FAR _PokemonTower6EndBattleText3 db "@" -PokemonTower6AfterBattleText3: ; 60c51 (18:4c51) +PokemonTower6AfterBattleText3: TX_FAR _PokemonTower6AfterBattleText3 db "@" -PokemonTower6Text6: ; 60c56 (18:4c56) +PokemonTower6Text6: TX_FAR _PokemonTower6Text6 db "@" diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm index ab42121d..88c62c53 100755 --- a/scripts/pokemontower7.asm +++ b/scripts/pokemontower7.asm @@ -1,17 +1,17 @@ -PokemonTower7Script: ; 60d05 (18:4d05) +PokemonTower7Script: call EnableAutoTextBoxDrawing - ld hl, PokemonTower7TrainerHeaders + ld hl, PokemonTower7TrainerHeader0 ld de, PokemonTower7ScriptPointers - ld a, [W_POKEMONTOWER7CURSCRIPT] + ld a, [wPokemonTower7CurScript] call ExecuteCurMapScriptInTable - ld [W_POKEMONTOWER7CURSCRIPT], a + ld [wPokemonTower7CurScript], a ret -PokemonTower7Script_60d18: ; 60d18 (18:4d18) +PokemonTower7Script_60d18: xor a ld [wJoyIgnore], a - ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower7CurScript], a + ld [wCurMapScript], a ret PokemonTower7ScriptPointers: @@ -21,29 +21,29 @@ PokemonTower7ScriptPointers: dw PokemonTower7Script3 dw PokemonTower7Script4 -PokemonTower7Script2: ; 60d23 (18:4d23) +PokemonTower7Script2: ld hl, wFlags_0xcd60 res 0, [hl] - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [wIsInBattle] cp $ff jp z, PokemonTower7Script_60d18 call EndTrainerBattle ld a, $f0 ld [wJoyIgnore], a ld a, [wSpriteIndex] - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID call PokemonTower7Script_60db6 ld a, $3 - ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower7CurScript], a + ld [wCurMapScript], a ret -PokemonTower7Script3: ; 60d56 (18:4d56) +PokemonTower7Script3: ld a, [wd730] bit 0, a ret nz - ld hl, W_MISSABLEOBJECTLIST + ld hl, wMissableObjectList ld a, [wSpriteIndex] ld b, a .missableObjectsListLoop @@ -51,28 +51,28 @@ PokemonTower7Script3: ; 60d56 (18:4d56) cp b ; search for sprite ID in missing objects list ld a, [hli] jr nz, .missableObjectsListLoop - ld [wcc4d], a ; remove missable object + ld [wMissableObjectIndex], a ; remove missable object predef HideObject xor a ld [wJoyIgnore], a ld [wSpriteIndex], a ld [wTrainerHeaderFlagBit], a - ld [wda38], a + ld [wUnusedDA38], a ld a, $0 - ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower7CurScript], a + ld [wCurMapScript], a ret -PokemonTower7Script4: ; 60d86 (18:4d86) +PokemonTower7Script4: ld a, $ff ld [wJoyIgnore], a ld a, HS_POKEMONTOWER_7_MR_FUJI - ld [wcc4d], a + ld [wMissableObjectIndex], 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 [hWarpDestinationMap], a ld a, $1 ld [wDestinationWarpID], a ld a, LAVENDER_TOWN @@ -80,21 +80,21 @@ PokemonTower7Script4: ; 60d86 (18:4d86) ld hl, wd72d set 3, [hl] ld a, $0 - ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower7CurScript], a + ld [wCurMapScript], a ret -PokemonTower7Script_60db6: ; 60db6 (18:4db6) - ld hl, CoordsData_60de3 ; $4de3 +PokemonTower7Script_60db6: + 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, [wYCoord] ld b, a - ld a, [W_XCOORD] ; wd362 + ld a, [wXCoord] 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_SPRITEINDEX], a jp MoveSprite .asm_60dde inc hl @@ -116,7 +116,7 @@ PokemonTower7Script_60db6: ; 60db6 (18:4db6) inc hl jr .asm_60dcb -CoordsData_60de3: ; 60de3 (18:4de3) +CoordsData_60de3: db $0C,$09 dw MovementData_60e13 db $0B,$0A @@ -142,136 +142,171 @@ CoordsData_60de3: ; 60de3 (18:4de3) db $07,$0C dw MovementData_60e22 -MovementData_60e13: ; 60e13 - db $C0,$00,$00,$00,$00,$00,$80,$FF - -MovementData_60e1b: ; 60e1b - db $00,$C0,$00,$00,$00,$00,$FF - -MovementData_60e22: ; 60e22 - db $00,$00,$00,$00,$00,$FF - -MovementData_60e28: ; 60e28 - db $80,$00,$00,$00,$00,$00,$00,$FF - -MovementData_60e30: ; 60e30 - db $00,$00,$00,$80,$00,$00,$FF - -MovementData_60e37: ; 60e37 - db $C0,$00,$00,$00,$00,$00,$00,$FF - -PokemonTower7TextPointers: ; 60e3f (18:4e3f) +MovementData_60e13: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_LEFT + db $FF + +MovementData_60e1b: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF + +MovementData_60e22: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF + +MovementData_60e28: + db NPC_MOVEMENT_LEFT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF + +MovementData_60e30: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_LEFT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF + +MovementData_60e37: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF + +PokemonTower7TextPointers: dw PokemonTower7Text1 dw PokemonTower7Text2 dw PokemonTower7Text3 dw PokemonTower7FujiText -PokemonTower7TrainerHeaders: ; 60e47 (18:4e47) -PokemonTower7TrainerHeader0: ; 60e47 (18:4e47) - db $1 ; flag's bit +PokemonTower7TrainerHeader0: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_7_TRAINER_0 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 - -PokemonTower7TrainerHeader1: ; 60e53 (18:4e53) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_7_TRAINER_0 + dw PokemonTower7BattleText1 ; TextBeforeBattle + dw PokemonTower7AfterBattleText1 ; TextAfterBattle + dw PokemonTower7EndBattleText1 ; TextEndBattle + dw PokemonTower7EndBattleText1 ; TextEndBattle + +PokemonTower7TrainerHeader1: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 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 - -PokemonTower7TrainerHeader2: ; 60e5f (18:4e5f) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_7_TRAINER_1 + dw PokemonTower7BattleText2 ; TextBeforeBattle + dw PokemonTower7AfterBattleText2 ; TextAfterBattle + dw PokemonTower7EndBattleText2 ; TextEndBattle + dw PokemonTower7EndBattleText2 ; TextEndBattle + +PokemonTower7TrainerHeader2: + dbEventFlagBit EVENT_BEAT_POKEMONTOWER_7_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_7_TRAINER_2 + dw PokemonTower7BattleText3 ; TextBeforeBattle + dw PokemonTower7AfterBattleText3 ; TextAfterBattle + dw PokemonTower7EndBattleText3 ; TextEndBattle + dw PokemonTower7EndBattleText3 ; TextEndBattle db $ff -PokemonTower7Text1: ; 60e6c (18:4e6c) - db $08 ; asm +PokemonTower7Text1: + TX_ASM ld hl, PokemonTower7TrainerHeader0 call TalkToTrainer jp TextScriptEnd -PokemonTower7Text2: ; 60e76 (18:4e76) - db $08 ; asm +PokemonTower7Text2: + TX_ASM ld hl, PokemonTower7TrainerHeader1 call TalkToTrainer jp TextScriptEnd -PokemonTower7Text3: ; 60e80 (18:4e80) - db $08 ; asm +PokemonTower7Text3: + TX_ASM ld hl, PokemonTower7TrainerHeader2 call TalkToTrainer jp TextScriptEnd PokemonTower7FujiText: - db 8 ; asm + TX_ASM ld hl, TowerRescueFujiText call PrintText - ld hl, wd7e0 - set 7, [hl] - ld hl, wd769 - set 7, [hl] + SetEvent EVENT_RESCUED_MR_FUJI + SetEvent EVENT_RESCUED_MR_FUJI_2 ld a, HS_LAVENDER_HOUSE_1_MR_FUJI - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld a, HS_SAFFRON_CITY_E - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_SAFFRON_CITY_F - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld a, $4 - ld [W_POKEMONTOWER7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wPokemonTower7CurScript], a + ld [wCurMapScript], a jp TextScriptEnd TowerRescueFujiText: TX_FAR _TowerRescueFujiText db "@" -PokemonTower7BattleText1: ; 60ec9 (18:4ec9) +PokemonTower7BattleText1: TX_FAR _PokemonTower7BattleText1 db "@" -PokemonTower7EndBattleText1: ; 60ece (18:4ece) +PokemonTower7EndBattleText1: TX_FAR _PokemonTower7EndBattleText1 db "@" -PokemonTower7AfterBattleText1: ; 60ed3 (18:4ed3) +PokemonTower7AfterBattleText1: TX_FAR _PokemonTower7AfterBattleText1 db "@" -PokemonTower7BattleText2: ; 60ed8 (18:4ed8) +PokemonTower7BattleText2: TX_FAR _PokemonTower7BattleText2 db "@" -PokemonTower7EndBattleText2: ; 60edd (18:4edd) +PokemonTower7EndBattleText2: TX_FAR _PokemonTower7EndBattleText2 db "@" -PokemonTower7AfterBattleText2: ; 60ee2 (18:4ee2) +PokemonTower7AfterBattleText2: TX_FAR _PokemonTower7AfterBattleText2 db "@" -PokemonTower7BattleText3: ; 60ee7 (18:4ee7) +PokemonTower7BattleText3: TX_FAR _PokemonTower7BattleText3 db "@" -PokemonTower7EndBattleText3: ; 60eec (18:4eec) +PokemonTower7EndBattleText3: TX_FAR _PokemonTower7EndBattleText3 db "@" -PokemonTower7AfterBattleText3: ; 60ef1 (18:4ef1) +PokemonTower7AfterBattleText3: TX_FAR _PokemonTower7AfterBattleText3 db "@" diff --git a/scripts/powerplant.asm b/scripts/powerplant.asm index ec4f89b3..5391585d 100755 --- a/scripts/powerplant.asm +++ b/scripts/powerplant.asm @@ -1,110 +1,109 @@ -PowerPlantScript: ; 1e2c6 (7:62c6) +PowerPlantScript: call EnableAutoTextBoxDrawing - ld hl, PowerPlantTrainerHeaders - ld de, PowerPlantScriptPointers - ld a, [W_POWERPLANTCURSCRIPT] + ld hl, Voltorb0TrainerHeader + ld de, .ScriptPointers + ld a, [wPowerPlantCurScript] call ExecuteCurMapScriptInTable - ld [W_POWERPLANTCURSCRIPT], a + ld [wPowerPlantCurScript], a ret -PowerPlantScriptPointers: ; 1e2d9 (7:62d9) +.ScriptPointers dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -PowerPlantTextPointers: ; 1e2df (7:62df) - dw PowerPlantText1 - dw PowerPlantText2 - dw PowerPlantText3 - dw PowerPlantText4 - dw PowerPlantText5 - dw PowerPlantText6 - dw PowerPlantText7 - dw PowerPlantText8 - dw PowerPlantText9 - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText - -PowerPlantTrainerHeaders: ; 1e2fb (7:62fb) -PowerPlantTrainerHeader0: ; 1e2fb (7:62fb) - db 1 ; flag's bit +PowerPlantTextPointers: + dw Voltorb0Text + dw Voltorb1Text + dw Voltorb2Text + dw Voltorb3Text + dw Voltorb4Text + dw Voltorb5Text + dw Voltorb6Text + dw Voltorb7Text + dw ZapdosText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + +Voltorb0TrainerHeader: + dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_0 db 0 ; view range - dw wd7d3 ; flag's byte + dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_0 dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle -PowerPlantTrainerHeader1: ; 1e307 (7:6307) - db 2 ; flag's bit +Voltorb1TrainerHeader: + dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_1 db 0 ; view range - dw wd7d3 ; flag's byte + dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_1 dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle -PowerPlantTrainerHeader2: ; 1e313 (7:6313) - db 3 ; flag's bit +Voltorb2TrainerHeader: + dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_2 db 0 ; view range - dw wd7d3 ; flag's byte + dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_2 dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle -PowerPlantTrainerHeader3: ; 1e31f (7:631f) - db 4 ; flag's bit +Voltorb3TrainerHeader: + dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_3 db 0 ; view range - dw wd7d3 ; flag's byte + dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_3 dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle -PowerPlantTrainerHeader4: ; 1e32b (7:632b) - db 5 ; flag's bit +Voltorb4TrainerHeader: + dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_4 db 0 ; view range - dw wd7d3 ; flag's byte + dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_4 dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle -PowerPlantTrainerHeader5: ; 1e337 (7:6337) - db 6 ; flag's bit +Voltorb5TrainerHeader: + dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_5 db 0 ; view range - dw wd7d3 ; flag's byte + dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_5 dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle -PowerPlantTrainerHeader6: ; 1e343 (7:6343) - db 7 ; flag's bit +Voltorb6TrainerHeader: + dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_6 db 0 ; view range - dw wd7d3 ; flag's byte + dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_6 dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle -PowerPlantTrainerHeader7: ; 1e34f (7:634f) - db 8 ; flag's bit +Voltorb7TrainerHeader: + dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_7, 1 db 0 ; view range - dw wd7d3 ; flag's byte + dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_7, 1 dw VoltorbBattleText ; TextBeforeBattle dw VoltorbBattleText ; TextAfterBattle dw VoltorbBattleText ; TextEndBattle dw VoltorbBattleText ; TextEndBattle -PowerPlantTrainerHeader8: ; 1e35b (7:635b) - db 9 ; flag's bit +ZapdosTrainerHeader: + dbEventFlagBit EVENT_BEAT_ZAPDOS, 1 db 0 ; view range - dw wd7d3 ; flag's byte + dwEventFlagAddress EVENT_BEAT_ZAPDOS, 1 dw ZapdosBattleText ; TextBeforeBattle dw ZapdosBattleText ; TextAfterBattle dw ZapdosBattleText ; TextEndBattle @@ -112,64 +111,64 @@ PowerPlantTrainerHeader8: ; 1e35b (7:635b) db $ff -asm_234cc: ; 1e368 (7:6368) +InitVoltorbBattle: call TalkToTrainer - ld a, [W_CURMAPSCRIPT] - ld [W_POWERPLANTCURSCRIPT], a + ld a, [wCurMapScript] + ld [wPowerPlantCurScript], a jp TextScriptEnd -PowerPlantText1: ; 1e374 (7:6374) - db $8 ; asm - ld hl, PowerPlantTrainerHeader0 ; $62fb - jr asm_234cc ; 0x1e378 $ee - -PowerPlantText2: ; 1e37a (7:637a) - db $8 ; asm - ld hl, PowerPlantTrainerHeader1 ; $6307 - jr asm_234cc ; 0x1e37e $e8 - -PowerPlantText3: ; 1e380 (7:6380) - db $8 ; asm - ld hl, PowerPlantTrainerHeader2 ; $6313 - jr asm_234cc ; 0x1e384 $e2 - -PowerPlantText4: ; 1e386 (7:6386) - db $8 ; asm - ld hl, PowerPlantTrainerHeader3 ; $631f - jr asm_234cc ; 0x1e38a $dc - -PowerPlantText5: ; 1e38c (7:638c) - db $8 ; asm - ld hl, PowerPlantTrainerHeader4 ; $632b - jr asm_234cc ; 0x1e390 $d6 - -PowerPlantText6: ; 1e392 (7:6392) - db $8 ; asm - ld hl, PowerPlantTrainerHeader5 ; $6337 - jr asm_234cc ; 0x1e396 $d0 - -PowerPlantText7: ; 1e398 (7:6398) - db $8 ; asm - ld hl, PowerPlantTrainerHeader6 ; $6343 - jr asm_234cc ; 0x1e39c $ca - -PowerPlantText8: ; 1e39e (7:639e) - db $8 ; asm - ld hl, PowerPlantTrainerHeader7 ; $634f - jr asm_234cc ; 0x1e3a2 $c4 - -PowerPlantText9: ; 1e3a4 (7:63a4) - db $8 ; asm - ld hl, PowerPlantTrainerHeader8 ; $635b - jr asm_234cc ; 0x1e3a8 $be - -VoltorbBattleText: ; 1e3aa (7:63aa) +Voltorb0Text: + TX_ASM + ld hl, Voltorb0TrainerHeader + jr InitVoltorbBattle + +Voltorb1Text: + TX_ASM + ld hl, Voltorb1TrainerHeader + jr InitVoltorbBattle + +Voltorb2Text: + TX_ASM + ld hl, Voltorb2TrainerHeader + jr InitVoltorbBattle + +Voltorb3Text: + TX_ASM + ld hl, Voltorb3TrainerHeader + jr InitVoltorbBattle + +Voltorb4Text: + TX_ASM + ld hl, Voltorb4TrainerHeader + jr InitVoltorbBattle + +Voltorb5Text: + TX_ASM + ld hl, Voltorb5TrainerHeader + jr InitVoltorbBattle + +Voltorb6Text: + TX_ASM + ld hl, Voltorb6TrainerHeader + jr InitVoltorbBattle + +Voltorb7Text: + TX_ASM + ld hl, Voltorb7TrainerHeader + jr InitVoltorbBattle + +ZapdosText: + TX_ASM + ld hl, ZapdosTrainerHeader + jr InitVoltorbBattle + +VoltorbBattleText: TX_FAR _VoltorbBattleText db "@" -ZapdosBattleText: ; 1e3af (7:63af) +ZapdosBattleText: 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..cbfb35c8 100755 --- a/scripts/redshouse1f.asm +++ b/scripts/redshouse1f.asm @@ -1,12 +1,12 @@ -RedsHouse1FScript: ; 48168 (12:4168) +RedsHouse1FScript: jp EnableAutoTextBoxDrawing -RedsHouse1FTextPointers: ; 4816b (12:416b) +RedsHouse1FTextPointers: dw RedsHouse1FText1 dw RedsHouse1FText2 -RedsHouse1FText1: ; 4816f (12:416f) ; 416F Mom - db 8 +RedsHouse1FText1: ; Mom + TX_ASM ld a, [wd72e] bit 3, a jr nz, .heal ; if player has received a Pokémon from Oak, heal team @@ -18,52 +18,52 @@ RedsHouse1FText1: ; 4816f (12:416f) ; 416F Mom .done jp TextScriptEnd -MomWakeUpText: ; 48185 (12:4185) +MomWakeUpText: TX_FAR _MomWakeUpText db "@" -MomHealPokemon: ; 4818a (12:418a) +MomHealPokemon: ld hl, MomHealText1 call PrintText call GBFadeOutToWhite call ReloadMapData predef HealParty ld a, MUSIC_PKMN_HEALED - ld [wc0ee], a - call PlaySound ; play sound? + ld [wNewSoundID], a + call PlaySound .next - ld a, [wc026] + ld a, [wChannelSoundIDs] cp MUSIC_PKMN_HEALED jr z, .next - ld a, [wd35b] - ld [wc0ee], a + ld a, [wMapMusicSoundID] + ld [wNewSoundID], a call PlaySound call GBFadeInFromWhite ld hl, MomHealText2 jp PrintText -MomHealText1: ; 481bc (12:41bc) +MomHealText1: TX_FAR _MomHealText1 db "@" -MomHealText2: ; 481c1 (12:41c1) +MomHealText2: TX_FAR _MomHealText2 db "@" -RedsHouse1FText2: ; 0x481c6 TV - db 8 +RedsHouse1FText2: ; TV + 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 -StandByMeText: ; 481da (12:41da) +StandByMeText: TX_FAR _StandByMeText db "@" -TVWrongSideText: ; 481df (12:41df) +TVWrongSideText: TX_FAR _TVWrongSideText db "@" diff --git a/scripts/redshouse2f.asm b/scripts/redshouse2f.asm index 8fcdc66e..60c3ea67 100755 --- a/scripts/redshouse2f.asm +++ b/scripts/redshouse2f.asm @@ -1,24 +1,24 @@ -RedsHouse2FScript: ; 5c0b0 (17:40b0) +RedsHouse2FScript: call EnableAutoTextBoxDrawing ld hl,RedsHouse2FScriptPointers - ld a,[W_REDSHOUSE2CURSCRIPT] + ld a,[wRedsHouse2CurScript] jp CallFunctionInTable -RedsHouse2FScriptPointers: ; 5c0bc (17:40bc) +RedsHouse2FScriptPointers: dw RedsHouse2FScript0 dw RedsHouse2FScript1 -RedsHouse2FScript0: ; 5c0c0 (17:40c0) +RedsHouse2FScript0: xor a ld [hJoyHeld],a - ld a,8 - ld [wd528],a + ld a,PLAYER_DIR_UP + ld [wPlayerMovingDirection],a ld a,1 - ld [W_REDSHOUSE2CURSCRIPT],a + ld [wRedsHouse2CurScript],a ret -RedsHouse2FScript1: ; 5c0ce (17:40ce) +RedsHouse2FScript1: ret -RedsHouse2FTextPointers: ; 5c0cf (17:40cf) +RedsHouse2FTextPointers: db "@" diff --git a/scripts/rockethideout1.asm b/scripts/rockethideout1.asm index 499f77ef..88b3a7e9 100755 --- a/scripts/rockethideout1.asm +++ b/scripts/rockethideout1.asm @@ -1,192 +1,189 @@ -RocketHideout1Script: ; 44bca (11:4bca) +RocketHideout1Script: call RocketHideout1Script_44be0 call EnableAutoTextBoxDrawing - ld hl, RocketHideout1TrainerHeaders + ld hl, RocketHideout1TrainerHeader0 ld de, RocketHideout1ScriptPointers - ld a, [W_ROCKETHIDEOUT1CURSCRIPT] + ld a, [wRocketHideout1CurScript] call ExecuteCurMapScriptInTable - ld [W_ROCKETHIDEOUT1CURSCRIPT], a + ld [wRocketHideout1CurScript], a ret -RocketHideout1Script_44be0: ; 44be0 (11:4be0) - ld hl, wd126 +RocketHideout1Script_44be0: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd815] - bit 7, a + CheckEvent EVENT_677 jr nz, .asm_44c01 - bit 5, a + CheckEventReuseA EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4 jr nz, .asm_44bf7 ld a, $54 jr .asm_44c03 .asm_44bf7 - ld a, (SFX_02_57 - SFX_Headers_02) / 3 + ld a, SFX_GO_INSIDE call PlaySound - ld hl, wd815 - bit 7, [hl] + CheckEventHL EVENT_677 .asm_44c01 ld a, $e .asm_44c03 - ld [wd09f], a - ld bc, $080c + ld [wNewTileBlockID], a + lb bc, 8, 12 predef_jump ReplaceTileBlock -RocketHideout1ScriptPointers: ; 44c0e (11:4c0e) +RocketHideout1ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -RocketHideout1TextPointers: ; 44c14 (11:4c14) +RocketHideout1TextPointers: dw RocketHideout1Text1 dw RocketHideout1Text2 dw RocketHideout1Text3 dw RocketHideout1Text4 dw RocketHideout1Text5 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText -RocketHideout1TrainerHeaders: ; 44c22 (11:4c22) -RocketHideout1TrainerHeader0: ; 44c22 (11:4c22) - db $1 ; flag's bit +RocketHideout1TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0 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 - -RocketHideout1TrainerHeader2: ; 44c2e (11:4c2e) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0 + dw RocketHideout1BattleText2 ; TextBeforeBattle + dw RocketHideout1AfterBattleTxt2 ; TextAfterBattle + dw RocketHideout1EndBattleText2 ; TextEndBattle + dw RocketHideout1EndBattleText2 ; TextEndBattle + +RocketHideout1TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1 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 - -RocketHideout1TrainerHeader3: ; 44c3a (11:4c3a) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1 + dw RocketHideout1BattleText3 ; TextBeforeBattle + dw RocketHideout1AfterBattleTxt3 ; TextAfterBattle + dw RocketHideout1EndBattleText3 ; TextEndBattle + dw RocketHideout1EndBattleText3 ; TextEndBattle + +RocketHideout1TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2 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 - -RocketHideout1TrainerHeader4: ; 44c46 (11:4c46) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2 + dw RocketHideout1BattleText4 ; TextBeforeBattle + dw RocketHideout1AfterBattleTxt4 ; TextAfterBattle + dw RocketHideout1EndBattleText4 ; TextEndBattle + dw RocketHideout1EndBattleText4 ; TextEndBattle + +RocketHideout1TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3 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 - -RocketHideout1TrainerHeader5: ; 44c52 (11:4c52) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3 + dw RocketHideout1BattleText5 ; TextBeforeBattle + dw RocketHideout1AfterBattleTxt5 ; TextAfterBattle + dw RocketHideout1EndBattleText5 ; TextEndBattle + dw RocketHideout1EndBattleText5 ; TextEndBattle + +RocketHideout1TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4 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 + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4 + dw RocketHideout1BattleText6 ; TextBeforeBattle + dw RocketHideout1AfterBattleTxt6 ; TextAfterBattle + dw RocketHideout1EndBattleText6 ; TextEndBattle + dw RocketHideout1EndBattleText6 ; TextEndBattle db $ff -RocketHideout1Text1: ; 44c5f (11:4c5f) - db $08 ; asm +RocketHideout1Text1: + TX_ASM ld hl, RocketHideout1TrainerHeader0 call TalkToTrainer jp TextScriptEnd -RocketHideout1Text2: ; 44c69 (11:4c69) - db $08 ; asm - ld hl, RocketHideout1TrainerHeader2 +RocketHideout1Text2: + TX_ASM + ld hl, RocketHideout1TrainerHeader1 call TalkToTrainer jp TextScriptEnd -RocketHideout1Text3: ; 44c73 (11:4c73) - db $08 ; asm - ld hl, RocketHideout1TrainerHeader3 +RocketHideout1Text3: + TX_ASM + ld hl, RocketHideout1TrainerHeader2 call TalkToTrainer jp TextScriptEnd -RocketHideout1Text4: ; 44c7d (11:4c7d) - db $08 ; asm - ld hl, RocketHideout1TrainerHeader4 +RocketHideout1Text4: + TX_ASM + ld hl, RocketHideout1TrainerHeader3 call TalkToTrainer jp TextScriptEnd -RocketHideout1Text5: ; 44c87 (11:4c87) - db $08 ; asm - ld hl, RocketHideout1TrainerHeader5 +RocketHideout1Text5: + TX_ASM + ld hl, RocketHideout1TrainerHeader4 call TalkToTrainer jp TextScriptEnd -RocketHideout1EndBattleText6: ; 44c91 (11:4c91) +RocketHideout1EndBattleText6: TX_FAR _RocketHideout1EndBattleText6 - db $8 - ld hl, wd815 - set 5, [hl] + TX_ASM + SetEvent EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4 ld hl, RocketHideout1Text_44c9f ret -RocketHideout1Text_44c9f: ; 44c9f (11:4c9f) - db $6, "@" +RocketHideout1Text_44c9f: + TX_BLINK + db "@" -RocketHideout1BattleText2: ; 44ca1 (11:4ca1) +RocketHideout1BattleText2: TX_FAR _RocketHideout1BattleText2 db "@" -RocketHideout1EndBattleText2: ; 44ca6 (11:4ca6) +RocketHideout1EndBattleText2: TX_FAR _RocketHideout1EndBattleText2 db "@" -RocketHideout1AfterBattleTxt2: ; 44cab (11:4cab) +RocketHideout1AfterBattleTxt2: TX_FAR _RocketHideout1AfterBattleTxt2 db "@" -RocketHideout1BattleText3: ; 44cb0 (11:4cb0) +RocketHideout1BattleText3: TX_FAR _RocketHideout1BattleText3 db "@" -RocketHideout1EndBattleText3: ; 44cb5 (11:4cb5) +RocketHideout1EndBattleText3: TX_FAR _RocketHideout1EndBattleText3 db "@" -RocketHideout1AfterBattleTxt3: ; 44cba (11:4cba) +RocketHideout1AfterBattleTxt3: TX_FAR _RocketHideout1AfterBattleTxt3 db "@" -RocketHideout1BattleText4: ; 44cbf (11:4cbf) +RocketHideout1BattleText4: TX_FAR _RocketHideout1BattleText4 db "@" -RocketHideout1EndBattleText4: ; 44cc4 (11:4cc4) +RocketHideout1EndBattleText4: TX_FAR _RocketHideout1EndBattleText4 db "@" -RocketHideout1AfterBattleTxt4: ; 44cc9 (11:4cc9) +RocketHideout1AfterBattleTxt4: TX_FAR _RocketHideout1AfterBattleTxt4 db "@" -RocketHideout1BattleText5: ; 44cce (11:4cce) +RocketHideout1BattleText5: TX_FAR _RocketHideout1BattleText5 db "@" -RocketHideout1EndBattleText5: ; 44cd3 (11:4cd3) +RocketHideout1EndBattleText5: TX_FAR _RocketHideout1EndBattleText5 db "@" -RocketHideout1AfterBattleTxt5: ; 44cd8 (11:4cd8) +RocketHideout1AfterBattleTxt5: TX_FAR _RocketHideout1AfterBattleTxt5 db "@" -RocketHideout1BattleText6: ; 44cdd (11:4cdd) +RocketHideout1BattleText6: TX_FAR _RocketHideout1BattleText6 db "@" -RocketHideout1AfterBattleTxt6: ; 44ce2 (11:4ce2) +RocketHideout1AfterBattleTxt6: TX_FAR _RocketHideout1AfterBattleTxt6 db "@" diff --git a/scripts/rockethideout2.asm b/scripts/rockethideout2.asm index 99754658..c5f026d5 100755 --- a/scripts/rockethideout2.asm +++ b/scripts/rockethideout2.asm @@ -1,22 +1,22 @@ -RocketHideout2Script: ; 44e27 (11:4e27) +RocketHideout2Script: call EnableAutoTextBoxDrawing - ld hl, RocketHideout2TrainerHeaders + ld hl, RocketHideout2TrainerHeader0 ld de, RocketHideout2ScriptPointers - ld a, [W_ROCKETHIDEOUT2CURSCRIPT] + ld a, [wRocketHideout2CurScript] call ExecuteCurMapScriptInTable - ld [W_ROCKETHIDEOUT2CURSCRIPT], a + ld [wRocketHideout2CurScript], a ret -RocketHideout2ScriptPointers: ; 44e3a (11:4e3a) +RocketHideout2ScriptPointers: dw RocketHideout2Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw RocketHideout2Script3 -RocketHideout2Script0: ; 44e42 (11:4e42) - ld a, [W_YCOORD] +RocketHideout2Script0: + ld a, [wYCoord] ld b, a - ld a, [W_XCOORD] + ld a, [wXCoord] ld c, a ld hl, RocketHideout2ArrowTilePlayerMovement call DecodeArrowMovementRLE @@ -25,18 +25,18 @@ RocketHideout2Script0: ; 44e42 (11:4e42) ld hl, wd736 set 7, [hl] call StartSimulatingJoypadStates - ld a, (SFX_02_52 - SFX_Headers_02) / 3 + ld a, SFX_ARROW_TILES call PlaySound ld a, $ff ld [wJoyIgnore], a ld a, $3 - ld [W_CURMAPSCRIPT], a + ld [wCurMapScript], a ret ;format: ;db y,x ;dw pointer to movement -RocketHideout2ArrowTilePlayerMovement: ; 44e6d (11:4e6d) +RocketHideout2ArrowTilePlayerMovement: db $9,$4 dw RocketHideout2ArrowMovement1 db $b,$4 @@ -126,186 +126,182 @@ RocketHideout2ArrowTilePlayerMovement: ; 44e6d (11:4e6d) db $FF ;format: direction, count -;right: $10 -;left: $20 -;up: $40 -;down: $80 ;each list is read starting from the $FF and working backwards -RocketHideout2ArrowMovement1: ; 44f1a (11:4f1a) - db $20,$02 +RocketHideout2ArrowMovement1: + db D_LEFT,$02 db $FF -RocketHideout2ArrowMovement2: ; 44f1d (11:4f1d) - db $10,$04 +RocketHideout2ArrowMovement2: + db D_RIGHT,$04 db $FF -RocketHideout2ArrowMovement3: ; 44f20 (11:4f20) - db $40,$04 - db $10,$04 +RocketHideout2ArrowMovement3: + db D_UP,$04 + db D_RIGHT,$04 db $FF -RocketHideout2ArrowMovement4: ; 44f25 (11:4f25) - db $40,$04 - db $10,$04 - db $40,$01 +RocketHideout2ArrowMovement4: + db D_UP,$04 + db D_RIGHT,$04 + db D_UP,$01 db $FF -RocketHideout2ArrowMovement5: ; 44f2c (11:4f2c) - db $20,$02 - db $40,$03 +RocketHideout2ArrowMovement5: + db D_LEFT,$02 + db D_UP,$03 db $FF -RocketHideout2ArrowMovement6: ; 44f31 (11:4f31) - db $80,$02 - db $10,$04 +RocketHideout2ArrowMovement6: + db D_DOWN,$02 + db D_RIGHT,$04 db $FF -RocketHideout2ArrowMovement7: ; 44f36 (11:4f36) - db $40,$02 +RocketHideout2ArrowMovement7: + db D_UP,$02 db $FF -RocketHideout2ArrowMovement8: ; 44f39 (11:4f39) - db $40,$04 +RocketHideout2ArrowMovement8: + db D_UP,$04 db $FF -RocketHideout2ArrowMovement9: ; 44f3c (11:4f3c) - db $20,$06 +RocketHideout2ArrowMovement9: + db D_LEFT,$06 db $FF -RocketHideout2ArrowMovement10: ; 44f3f (11:4f3f) - db $40,$01 +RocketHideout2ArrowMovement10: + db D_UP,$01 db $FF -RocketHideout2ArrowMovement11: ; 44f42 (11:4f42) - db $20,$06 - db $40,$04 +RocketHideout2ArrowMovement11: + db D_LEFT,$06 + db D_UP,$04 db $FF -RocketHideout2ArrowMovement12: ; 44f47 (11:4f47) - db $80,$02 +RocketHideout2ArrowMovement12: + db D_DOWN,$02 db $FF -RocketHideout2ArrowMovement13: ; 44f4a (11:4f4a) - db $20,$08 +RocketHideout2ArrowMovement13: + db D_LEFT,$08 db $FF -RocketHideout2ArrowMovement14: ; 44f4d (11:4f4d) - db $20,$08 - db $40,$01 +RocketHideout2ArrowMovement14: + db D_LEFT,$08 + db D_UP,$01 db $FF -RocketHideout2ArrowMovement15: ; 44f52 (11:4f52) - db $20,$08 - db $40,$06 +RocketHideout2ArrowMovement15: + db D_LEFT,$08 + db D_UP,$06 db $FF -RocketHideout2ArrowMovement16: ; 44f57 (11:4f57) - db $40,$02 - db $10,$04 +RocketHideout2ArrowMovement16: + db D_UP,$02 + db D_RIGHT,$04 db $FF -RocketHideout2ArrowMovement17: ; 44f5c (11:4f5c) - db $40,$02 - db $10,$04 - db $40,$02 +RocketHideout2ArrowMovement17: + db D_UP,$02 + db D_RIGHT,$04 + db D_UP,$02 db $FF -RocketHideout2ArrowMovement18: ; 44f63 (11:4f63) - db $80,$02 - db $10,$04 - db $80,$02 +RocketHideout2ArrowMovement18: + db D_DOWN,$02 + db D_RIGHT,$04 + db D_DOWN,$02 db $FF -RocketHideout2ArrowMovement19: ; 44f6a (11:4f6a) - db $80,$02 - db $10,$04 +RocketHideout2ArrowMovement19: + db D_DOWN,$02 + db D_RIGHT,$04 db $FF -RocketHideout2ArrowMovement20: ; 44f6f (11:4f6f) - db $20,$0A +RocketHideout2ArrowMovement20: + db D_LEFT,$0A db $FF -RocketHideout2ArrowMovement21: ; 44f72 (11:4f72) - db $20,$0A - db $40,$02 +RocketHideout2ArrowMovement21: + db D_LEFT,$0A + db D_UP,$02 db $FF -RocketHideout2ArrowMovement22: ; 44f77 (11:4f77) - db $20,$0A - db $40,$04 +RocketHideout2ArrowMovement22: + db D_LEFT,$0A + db D_UP,$04 db $FF -RocketHideout2ArrowMovement23: ; 44f7c (11:4f7c) - db $40,$02 - db $10,$02 +RocketHideout2ArrowMovement23: + db D_UP,$02 + db D_RIGHT,$02 db $FF -RocketHideout2ArrowMovement24: ; 44f81 (11:4f81) - db $10,$01 - db $80,$02 +RocketHideout2ArrowMovement24: + db D_RIGHT,$01 + db D_DOWN,$02 db $FF -RocketHideout2ArrowMovement25: ; 44f86 (11:4f86) - db $10,$01 +RocketHideout2ArrowMovement25: + db D_RIGHT,$01 db $FF -RocketHideout2ArrowMovement26: ; 44f89 (11:4f89) - db $80,$02 - db $10,$02 +RocketHideout2ArrowMovement26: + db D_DOWN,$02 + db D_RIGHT,$02 db $FF -RocketHideout2ArrowMovement27: ; 44f8e (11:4f8e) - db $80,$02 - db $20,$02 +RocketHideout2ArrowMovement27: + db D_DOWN,$02 + db D_LEFT,$02 db $FF -RocketHideout2ArrowMovement28: ; 44f93 (11:4f93) - db $40,$02 - db $10,$04 - db $40,$02 - db $20,$03 +RocketHideout2ArrowMovement28: + db D_UP,$02 + db D_RIGHT,$04 + db D_UP,$02 + db D_LEFT,$03 db $FF -RocketHideout2ArrowMovement29: ; 44f9c (11:4f9c) - db $80,$02 - db $20,$04 +RocketHideout2ArrowMovement29: + db D_DOWN,$02 + db D_LEFT,$04 db $FF -RocketHideout2ArrowMovement30: ; 44fa1 (11:4fa1) - db $20,$06 - db $40,$04 - db $20,$05 +RocketHideout2ArrowMovement30: + db D_LEFT,$06 + db D_UP,$04 + db D_LEFT,$05 db $FF -RocketHideout2ArrowMovement31: ; 44fa8 (11:4fa8) - db $40,$02 +RocketHideout2ArrowMovement31: + db D_UP,$02 db $FF -RocketHideout2ArrowMovement32: ; 44fab (11:4fab) - db $40,$01 +RocketHideout2ArrowMovement32: + db D_UP,$01 db $FF -RocketHideout2ArrowMovement33: ; 44fae (11:4fae) - db $40,$03 +RocketHideout2ArrowMovement33: + db D_UP,$03 db $FF -RocketHideout2ArrowMovement34: ; 44fb1 (11:4fb1) - db $40,$05 +RocketHideout2ArrowMovement34: + db D_UP,$05 db $FF -RocketHideout2ArrowMovement35: ; 44fb4 (11:4fb4) - db $10,$01 - db $80,$02 - db $20,$04 +RocketHideout2ArrowMovement35: + db D_RIGHT,$01 + db D_DOWN,$02 + db D_LEFT,$04 db $FF -RocketHideout2ArrowMovement36: ; 44fbb (11:4fbb) - db $20,$0A - db $40,$02 - db $20,$05 +RocketHideout2ArrowMovement36: + db D_LEFT,$0A + db D_UP,$02 + db D_LEFT,$05 db $FF -RocketHideout2Script3: ; 44fc2 (11:4fc2) +RocketHideout2Script3: ld a, [wSimulatedJoypadStatesIndex] and a jr nz, LoadSpinnerArrowTiles @@ -314,24 +310,24 @@ RocketHideout2Script3: ; 44fc2 (11:4fc2) ld hl, wd736 res 7, [hl] ld a, $0 - ld [W_CURMAPSCRIPT], a + ld [wCurMapScript], a ret -LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7) +LoadSpinnerArrowTiles: 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, [wCurMapTileset] 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 @@ -404,7 +400,7 @@ vGymSpinner EQU vTileset + GYM_SPINNER spinner Gym_GFX, GYM_SPINNER + $100, 1, vGymSpinner + $100 spinner Gym_GFX, GYM_SPINNER + $110, 1, vGymSpinner + $110 -SpinnerPlayerFacingDirections: ; 45083 (11:5083) +SpinnerPlayerFacingDirections: ; This isn't the order of the facing directions. Rather, it's a list of ; the facing directions that come next. For example, when the player is ; facing down (00), the next facing direction is left (08). @@ -414,42 +410,41 @@ SpinnerPlayerFacingDirections: ; 45083 (11:5083) db $00 ; right -> down ; these tiles are the animation for the tiles that push the player in dungeons like Rocket HQ -SpinnerArrowAnimTiles: ; 45087 (11:5087) +SpinnerArrowAnimTiles: INCBIN "gfx/spinner_arrow.2bpp" -RocketHideout2TextPointers: ; 450c7 (11:50c7) +RocketHideout2TextPointers: dw RocketHideout2Text1 - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText - -RocketHideout2TrainerHeaders: ; 450d1 (11:50d1) -RocketHideout2TrainerHeader0: ; 450d1 (11:50d1) - db $1 ; flag's bit + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + +RocketHideout2TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0 + dw RocketHideout2BattleText2 ; TextBeforeBattle + dw RocketHideout2AfterBattleTxt2 ; TextAfterBattle + dw RocketHideout2EndBattleText2 ; TextEndBattle + dw RocketHideout2EndBattleText2 ; TextEndBattle db $ff -RocketHideout2Text1: ; 450de (11:50de) - db $08 ; asm +RocketHideout2Text1: + TX_ASM ld hl, RocketHideout2TrainerHeader0 call TalkToTrainer jp TextScriptEnd -RocketHideout2BattleText2: ; 450e8 (11:50e8) +RocketHideout2BattleText2: TX_FAR _RocketHideout2BattleText2 db "@" -RocketHideout2EndBattleText2: ; 450ed (11:50ed) +RocketHideout2EndBattleText2: TX_FAR _RocketHideout2EndBattleText2 db "@" -RocketHideout2AfterBattleTxt2: ; 450f2 (11:50f2) +RocketHideout2AfterBattleTxt2: TX_FAR _RocketHideout2AfterBattleTxt2 db "@" diff --git a/scripts/rockethideout3.asm b/scripts/rockethideout3.asm index 6dc467ab..00a61568 100755 --- a/scripts/rockethideout3.asm +++ b/scripts/rockethideout3.asm @@ -1,22 +1,22 @@ -RocketHideout3Script: ; 45225 (11:5225) +RocketHideout3Script: call EnableAutoTextBoxDrawing - ld hl, RocketHideout3TrainerHeaders + ld hl, RocketHideout3TrainerHeader0 ld de, RocketHideout3ScriptPointers - ld a, [W_ROCKETHIDEOUT3CURSCRIPT] + ld a, [wRocketHideout3CurScript] call ExecuteCurMapScriptInTable - ld [W_ROCKETHIDEOUT3CURSCRIPT], a + ld [wRocketHideout3CurScript], a ret -RocketHideout3ScriptPointers: ; 45238 (11:5238) +RocketHideout3ScriptPointers: dw RocketHideout3Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw RocketHideout3Script3 -RocketHideout3Script0: ; 45240 (11:5240) - ld a, [W_YCOORD] +RocketHideout3Script0: + ld a, [wYCoord] ld b, a - ld a, [W_XCOORD] + ld a, [wXCoord] ld c, a ld hl, RocketHideout3ArrowTilePlayerMovement call DecodeArrowMovementRLE @@ -25,18 +25,18 @@ RocketHideout3Script0: ; 45240 (11:5240) ld hl, wd736 set 7, [hl] call StartSimulatingJoypadStates - ld a, (SFX_02_52 - SFX_Headers_02) / 3 + ld a, SFX_ARROW_TILES call PlaySound ld a, $ff ld [wJoyIgnore], a ld a, $3 - ld [W_CURMAPSCRIPT], a + ld [wCurMapScript], a ret ;format: ;db y,x ;dw pointer to movement -RocketHideout3ArrowTilePlayerMovement: ; 4526b (11:526b) +RocketHideout3ArrowTilePlayerMovement: db $d,$a dw RocketHideout3ArrowMovement6 db $13,$a @@ -72,70 +72,66 @@ RocketHideout3ArrowTilePlayerMovement: ; 4526b (11:526b) db $FF ;format: direction, count -;right: $10 -;left: $20 -;up: $40 -;down: $80 ;each list is read starting from the $FF and working backwards -RocketHideout3ArrowMovement1: ; 452ac (11:52ac) - db $10,$04 - db $40,$04 - db $10,$04 +RocketHideout3ArrowMovement1: + db D_RIGHT,$04 + db D_UP,$04 + db D_RIGHT,$04 db $FF -RocketHideout3ArrowMovement2: ; 452b3 (11:52b3) - db $80,$04 - db $10,$04 +RocketHideout3ArrowMovement2: + db D_DOWN,$04 + db D_RIGHT,$04 db $FF -RocketHideout3ArrowMovement3: ; 452b8 (11:52b8) - db $20,$02 +RocketHideout3ArrowMovement3: + db D_LEFT,$02 db $FF -RocketHideout3ArrowMovement4: ; 452bb (11:52bb) - db $10,$04 - db $40,$02 - db $10,$02 +RocketHideout3ArrowMovement4: + db D_RIGHT,$04 + db D_UP,$02 + db D_RIGHT,$02 db $FF -RocketHideout3ArrowMovement5: ; 452c2 (11:52c2) - db $10,$04 - db $40,$02 - db $10,$02 - db $40,$03 +RocketHideout3ArrowMovement5: + db D_RIGHT,$04 + db D_UP,$02 + db D_RIGHT,$02 + db D_UP,$03 db $FF -RocketHideout3ArrowMovement6: ; 452cb (11:52cb) - db $10,$04 +RocketHideout3ArrowMovement6: + db D_RIGHT,$04 db $FF -RocketHideout3ArrowMovement7: ; 452ce (11:52ce) - db $10,$02 +RocketHideout3ArrowMovement7: + db D_RIGHT,$02 db $FF -RocketHideout3ArrowMovement8: ; 452d1 (11:52d1) - db $10,$04 - db $40,$02 +RocketHideout3ArrowMovement8: + db D_RIGHT,$04 + db D_UP,$02 db $FF -RocketHideout3ArrowMovement9: ; 452d6 (11:52d6) - db $10,$04 - db $40,$04 +RocketHideout3ArrowMovement9: + db D_RIGHT,$04 + db D_UP,$04 db $FF -RocketHideout3ArrowMovement10: ; 452db (11:52db) - db $80,$04 +RocketHideout3ArrowMovement10: + db D_DOWN,$04 db $FF -RocketHideout3ArrowMovement11: ; 452de (11:52de) - db $40,$02 +RocketHideout3ArrowMovement11: + db D_UP,$02 db $FF -RocketHideout3ArrowMovement12: ; 452e1 (11:52e1) - db $40,$01 +RocketHideout3ArrowMovement12: + db D_UP,$01 db $FF -RocketHideout3Script3 ; 452e4 (11:452e4) +RocketHideout3Script3: ld a, [wSimulatedJoypadStatesIndex] and a jp nz, LoadSpinnerArrowTiles @@ -144,68 +140,67 @@ RocketHideout3Script3 ; 452e4 (11:452e4) ld hl, wd736 res 7, [hl] ld a, $0 - ld [W_CURMAPSCRIPT], a + ld [wCurMapScript], a ret -RocketHideout3TextPointers: ; 452fa (11:52fa) +RocketHideout3TextPointers: dw RocketHideout3Text1 dw RocketHideout3Text2 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText -RocketHideout3TrainerHeaders: ; 45302 (11:5302) -RocketHideout3TrainerHeader0: ; 45302 (11:5302) - db $1 ; flag's bit +RocketHideout3TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0 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 - -RocketHideout3TrainerHeader2: ; 4530e (11:530e) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0 + dw RocketHideout3BattleText2 ; TextBeforeBattle + dw RocketHideout3AfterBattleTxt2 ; TextAfterBattle + dw RocketHideout3EndBattleText2 ; TextEndBattle + dw RocketHideout3EndBattleText2 ; TextEndBattle + +RocketHideout3TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1 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 + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1 + dw RocketHideout3BattleTxt ; TextBeforeBattle + dw RocketHideout3AfterBattleText3 ; TextAfterBattle + dw RocketHideout3EndBattleText3 ; TextEndBattle + dw RocketHideout3EndBattleText3 ; TextEndBattle db $ff -RocketHideout3Text1: ; 4531b (11:531b) - db $08 ; asm +RocketHideout3Text1: + TX_ASM ld hl, RocketHideout3TrainerHeader0 call TalkToTrainer jp TextScriptEnd -RocketHideout3BattleText2: ; 45325 (11:5325) +RocketHideout3BattleText2: TX_FAR _RocketHideout3BattleText2 db "@" -RocketHideout3EndBattleText2: ; 4532a (11:532a) +RocketHideout3EndBattleText2: TX_FAR _RocketHideout3EndBattleText2 db "@" -RocketHideout3AfterBattleTxt2: ; 4532f (11:532f) +RocketHideout3AfterBattleTxt2: TX_FAR _RocketHideout3AfterBattleTxt2 db "@" -RocketHideout3Text2: ; 45334 (11:5334) - db $08 ; asm - ld hl, RocketHideout3TrainerHeader2 +RocketHideout3Text2: + TX_ASM + ld hl, RocketHideout3TrainerHeader1 call TalkToTrainer jp TextScriptEnd -RocketHideout3BattleTxt: ; 4533e (11:533e) +RocketHideout3BattleTxt: TX_FAR _RocketHideout3BattleTxt db "@" -RocketHideout3EndBattleText3: ; 45343 (11:5343) +RocketHideout3EndBattleText3: TX_FAR _RocketHideout3EndBattleText3 db "@" -RocketHideout3AfterBattleText3: ; 45348 (11:5348) +RocketHideout3AfterBattleText3: TX_FAR _RocketHide3AfterBattleText3 db "@" diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm index f1b46653..e8361988 100755 --- a/scripts/rockethideout4.asm +++ b/scripts/rockethideout4.asm @@ -1,127 +1,121 @@ -RocketHideout4Script: ; 4545d (11:545d) +RocketHideout4Script: call RocketHideout4Script_45473 call EnableAutoTextBoxDrawing ld hl, RocketHideout4TrainerHeader0 ld de, RocketHideout4ScriptPointers - ld a, [W_ROCKETHIDEOUT4CURSCRIPT] + ld a, [wRocketHideout4CurScript] call ExecuteCurMapScriptInTable - ld [W_ROCKETHIDEOUT4CURSCRIPT], a + ld [wRocketHideout4CurScript], a ret -RocketHideout4Script_45473: ; 45473 (11:5473) - ld hl, wd126 +RocketHideout4Script_45473: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld a, [wd81b] - bit 5, a + CheckEvent EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED jr nz, .asm_45496 - and $c - cp $c + CheckBothEventsSet EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0, EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1, 1 jr z, .asm_4548c ld a, $2d jr .asm_45498 .asm_4548c - ld a, (SFX_02_57 - SFX_Headers_02) / 3 + ld a, SFX_GO_INSIDE call PlaySound - ld hl, wd81b - set 5, [hl] + SetEvent EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED .asm_45496 ld a, $e .asm_45498 - ld [wd09f], a - ld bc, $050c + ld [wNewTileBlockID], a + lb bc, 5, 12 predef_jump ReplaceTileBlock -RocketHideout4Script_454a3: ; 454a3 (11:54a3) +RocketHideout4Script_454a3: xor a ld [wJoyIgnore], a - ld [W_ROCKETHIDEOUT4CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRocketHideout4CurScript], a + ld [wCurMapScript], a ret -RocketHideout4ScriptPointers: ; 454ae (11:54ae)c +RocketHideout4ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw RocketHideout4Script3 -RocketHideout4Script3: ; 454b6 (11:54b6) - ld a, [W_ISINBATTLE] +RocketHideout4Script3: + ld a, [wIsInBattle] cp $ff jp z, RocketHideout4Script_454a3 call UpdateSprites ld a, $f0 ld [wJoyIgnore], a - ld hl, wd81b - set 7, [hl] + SetEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI ld a, $a - ld [H_SPRITEHEIGHT], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call GBFadeOutToBlack ld a, HS_ROCKET_HIDEOUT_4_GIOVANNI - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_ROCKET_HIDEOUT_4_ITEM_4 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject call UpdateSprites call GBFadeInFromBlack xor a ld [wJoyIgnore], a - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] ld a, $0 - ld [W_ROCKETHIDEOUT4CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRocketHideout4CurScript], a + ld [wCurMapScript], a ret -RocketHideout4TextPointers: ; 45501 (11:5501) +RocketHideout4TextPointers: dw RocketHideout4Text1 dw RocketHideout4Text2 dw RocketHideout4Text3 dw RocketHideout4Text4 - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw RocketHideout4Text10 -RocketHideout4TrainerHeaders: ; 45515 (11:5515) -RocketHideout4TrainerHeader0: ; 45515 (11:5515) - db $2 ; flag's bit +RocketHideout4TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0 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 - -RocketHideout4TrainerHeader2: ; 45521 (11:5521) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0 + dw RocketHideout4BattleText2 ; TextBeforeBattle + dw RocketHideout4AfterBattleText2 ; TextAfterBattle + dw RocketHideout4EndBattleText2 ; TextEndBattle + dw RocketHideout4EndBattleText2 ; TextEndBattle + +RocketHideout4TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1 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 - -RocketHideout4TrainerHeader3: ; 4552d (11:552d) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1 + dw RocketHideout4BattleText3 ; TextBeforeBattle + dw RocketHideout4AfterBattleText3 ; TextAfterBattle + dw RocketHideout4EndBattleText3 ; TextEndBattle + dw RocketHideout4EndBattleText3 ; TextEndBattle + +RocketHideout4TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 + dw RocketHideout4BattleText4 ; TextBeforeBattle + dw RocketHideout4AfterBattleText4 ; TextAfterBattle + dw RocketHideout4EndBattleText4 ; TextEndBattle + dw RocketHideout4EndBattleText4 ; TextEndBattle db $ff -RocketHideout4Text1: ; 4553a (11:553a) - db $08 ; asm - ld a, [wd81b] - bit 7, a +RocketHideout4Text1: + TX_ASM + CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI jp nz, .asm_545571 ld hl, RocketHideout4Text_4557a call PrintText @@ -131,98 +125,96 @@ 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 + ld [wRocketHideout4CurScript], a + ld [wCurMapScript], a + jr .asm_209f0 .asm_545571 ld hl, RocketHideout4Text10 call PrintText -.asm_209f0 ; 0x45577 +.asm_209f0 jp TextScriptEnd -RocketHideout4Text_4557a: ; 4557a (11:557a) +RocketHideout4Text_4557a: TX_FAR _RocketHideout4Text_4557a db "@" -RocketHideout4Text_4557f: ; 4557f (11:557f) +RocketHideout4Text_4557f: TX_FAR _RocketHideout4Text_4557f db "@" -RocketHideout4Text10: ; 45584 (11:5584) +RocketHideout4Text10: TX_FAR _RocketHideout4Text_45584 db "@" -RocketHideout4Text2: ; 45589 (11:5589) - db $08 ; asm +RocketHideout4Text2: + TX_ASM ld hl, RocketHideout4TrainerHeader0 call TalkToTrainer jp TextScriptEnd -RocketHideout4BattleText2: ; 45593 (11:5593) +RocketHideout4BattleText2: TX_FAR _RocketHideout4BattleText2 db "@" -RocketHideout4EndBattleText2: ; 45598 (11:5598) +RocketHideout4EndBattleText2: TX_FAR _RocketHideout4EndBattleText2 db "@" -RocketHideout4AfterBattleText2: ; 4559d (11:559d) +RocketHideout4AfterBattleText2: TX_FAR _RocketHide4AfterBattleText2 db "@" -RocketHideout4Text3: ; 455a2 (11:55a2) - db $08 ; asm - ld hl, RocketHideout4TrainerHeader2 +RocketHideout4Text3: + TX_ASM + ld hl, RocketHideout4TrainerHeader1 call TalkToTrainer jp TextScriptEnd -RocketHideout4BattleText3: ; 455ac (11:55ac) +RocketHideout4BattleText3: TX_FAR _RocketHideout4BattleText3 db "@" -RocketHideout4EndBattleText3: ; 455b1 (11:55b1) +RocketHideout4EndBattleText3: TX_FAR _RocketHideout4EndBattleText3 db "@" -RocketHideout4AfterBattleText3: ; 455b6 (11:55b6) +RocketHideout4AfterBattleText3: TX_FAR _RocketHide4AfterBattleText3 db "@" -RocketHideout4Text4: ; 455bb (11:55bb) - db $08 ; asm - ld hl, RocketHideout4TrainerHeader3 +RocketHideout4Text4: + TX_ASM + ld hl, RocketHideout4TrainerHeader2 call TalkToTrainer jp TextScriptEnd -RocketHideout4BattleText4: ; 455c5 (11:55c5) +RocketHideout4BattleText4: TX_FAR _RocketHideout4BattleText4 db "@" -RocketHideout4EndBattleText4: ; 455ca (11:55ca) +RocketHideout4EndBattleText4: TX_FAR _RocketHideout4EndBattleText4 db "@" -RocketHideout4AfterBattleText4: ; 455cf (11:55cf) - db $8 - ld hl, RocketHideout4Text_455ec ; $55ec +RocketHideout4AfterBattleText4: + TX_ASM + ld hl, RocketHideout4Text_455ec call PrintText - ld hl, wd81b - bit 6, [hl] - set 6, [hl] - jr nz, .asm_455e9 ; 0x455dd $a + CheckAndSetEvent EVENT_ROCKET_DROPPED_LIFT_KEY + jr nz, .asm_455e9 ld a, HS_ROCKET_HIDEOUT_4_ITEM_5 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject .asm_455e9 jp TextScriptEnd -RocketHideout4Text_455ec: ; 455ec (11:55ec) +RocketHideout4Text_455ec: TX_FAR _RocketHideout4Text_455ec db "@" diff --git a/scripts/rockethideoutelevator.asm b/scripts/rockethideoutelevator.asm index e7bc24f3..aed0f0cf 100755 --- a/scripts/rockethideoutelevator.asm +++ b/scripts/rockethideoutelevator.asm @@ -1,5 +1,5 @@ -RocketHideoutElevatorScript: ; 45710 (11:5710) - ld hl, wd126 +RocketHideoutElevatorScript: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] push hl @@ -14,15 +14,15 @@ RocketHideoutElevatorScript: ; 45710 (11:5710) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret -RocketHideoutElevatorScript_4572c: ; 4572c (11:572c) +RocketHideoutElevatorScript_4572c: ld hl, wWarpEntries - ld a, [wd73b] + ld a, [wWarpedFromWhichWarp] ld b, a - ld a, [wd73c] + ld a, [wWarpedFromWhichMap] ld c, a call RocketHideoutElevatorScript_4573a -RocketHideoutElevatorScript_4573a: ; 4573a (11:573a) +RocketHideoutElevatorScript_4573a: inc hl inc hl ld a, b @@ -31,51 +31,55 @@ RocketHideoutElevatorScript_4573a: ; 4573a (11:573a) ld [hli], a ret -RocketHideoutElevatorScript_45741: ; 45741 (11:5741) - ld hl, RocketHideoutElavatorFloors ; $5754 +RocketHideoutElevatorScript_45741: + ld hl, RocketHideoutElavatorFloors call LoadItemList - ld hl, RocketHideoutElevatorWarpMaps ; $5759 - ld de, wcc5b - ld bc, $0006 + ld hl, RocketHideoutElevatorWarpMaps + ld de, wElevatorWarpMaps + ld bc, RocketHideoutElevatorWarpMapsEnd - RocketHideoutElevatorWarpMaps call CopyData ret -RocketHideoutElavatorFloors: ; 45754 (11:5754) +RocketHideoutElavatorFloors: db $03 ; num elements in list - db $55, $54, $61 ; "B1F", "B2F", "B4F" + db FLOOR_B1F + db FLOOR_B2F + db FLOOR_B4F db $FF ; terminator -RocketHideoutElevatorWarpMaps: ; 45759 (11:5759) +RocketHideoutElevatorWarpMaps: ; first byte is warp number ; second byte is map number ; These specify where the player goes after getting out of the elevator. db $04, ROCKET_HIDEOUT_1 db $04, ROCKET_HIDEOUT_2 db $02, ROCKET_HIDEOUT_4 +RocketHideoutElevatorWarpMapsEnd: -RocketHideoutElevatorScript_4575f: ; 4575f (11:575f) +RocketHideoutElevatorScript_4575f: call Delay3 callba ShakeElevator ret -RocketHideoutElevatorTextPointers: ; 4576b (11:576b) +RocketHideoutElevatorTextPointers: dw RocketHideoutElevatorText1 -RocketHideoutElevatorText1: ; 4576d (11:576d) - db $08 ; asm +RocketHideoutElevatorText1: + TX_ASM ld b, LIFT_KEY call IsItemInBag - jr z, .asm_8d8f0 ; 0x45773 + jr z, .asm_45782 call RocketHideoutElevatorScript_45741 - ld hl, RocketHideoutElevatorWarpMaps ; $5759 - predef Func_1c9c6 - jr .asm_46c43 ; 0x45780 -.asm_8d8f0 ; 0x45782 + ld hl, RocketHideoutElevatorWarpMaps + predef DisplayElevatorFloorMenu + 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 - db $d, "@" +RocketHideoutElevatorText_4578b: + TX_FAR _RocketElevatorText_4578b + TX_WAIT + db "@" diff --git a/scripts/rocktunnel1.asm b/scripts/rocktunnel1.asm index 1d514a05..390330e8 100755 --- a/scripts/rocktunnel1.asm +++ b/scripts/rocktunnel1.asm @@ -1,18 +1,18 @@ -RockTunnel1Script: ; 444dc (11:44dc) +RockTunnel1Script: call EnableAutoTextBoxDrawing - ld hl, RockTunnel1TrainerHeaders + ld hl, RockTunnel1TrainerHeader0 ld de, RockTunnel1ScriptPointers - ld a, [W_ROCKTUNNEL1CURSCRIPT] + ld a, [wRockTunnel1CurScript] call ExecuteCurMapScriptInTable - ld [W_ROCKTUNNEL1CURSCRIPT], a + ld [wRockTunnel1CurScript], a ret -RockTunnel1ScriptPointers: ; 444ef (11:44ef) +RockTunnel1ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -RockTunnel1TextPointers: ; 444f5 (11:44f5) +RockTunnel1TextPointers: dw RockTunnel1Text1 dw RockTunnel1Text2 dw RockTunnel1Text3 @@ -22,193 +22,192 @@ RockTunnel1TextPointers: ; 444f5 (11:44f5) dw RockTunnel1Text7 dw RockTunnel1Text8 -RockTunnel1TrainerHeaders: ; 44505 (11:4505) -RockTunnel1TrainerHeader1: ; 44505 (11:4505) - db $1 ; flag's bit +RockTunnel1TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0 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 - -RockTunnel1TrainerHeader2: ; 44511 (11:4511) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0 + dw RockTunnel1BattleText1 ; TextBeforeBattle + dw RockTunnel1AfterBattleText1 ; TextAfterBattle + dw RockTunnel1EndBattleText1 ; TextEndBattle + dw RockTunnel1EndBattleText1 ; TextEndBattle + +RockTunnel1TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1 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 - -RockTunnel1TrainerHeader3: ; 4451d (11:451d) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1 + dw RockTunnel1BattleText2 ; TextBeforeBattle + dw RockTunnel1AfterBattleText2 ; TextAfterBattle + dw RockTunnel1EndBattleText2 ; TextEndBattle + dw RockTunnel1EndBattleText2 ; TextEndBattle + +RockTunnel1TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2 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 - -RockTunnel1TrainerHeader4: ; 44529 (11:4529) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2 + dw RockTunnel1BattleText3 ; TextBeforeBattle + dw RockTunnel1AfterBattleText3 ; TextAfterBattle + dw RockTunnel1EndBattleText3 ; TextEndBattle + dw RockTunnel1EndBattleText3 ; TextEndBattle + +RockTunnel1TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3 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 - -RockTunnel1TrainerHeader5: ; 44535 (11:4535) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3 + dw RockTunnel1BattleText4 ; TextBeforeBattle + dw RockTunnel1AfterBattleText4 ; TextAfterBattle + dw RockTunnel1EndBattleText4 ; TextEndBattle + dw RockTunnel1EndBattleText4 ; TextEndBattle + +RockTunnel1TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4 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 - -RockTunnel1TrainerHeader6: ; 44541 (11:4541) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4 + dw RockTunnel1BattleText5 ; TextBeforeBattle + dw RockTunnel1AfterBattleText5 ; TextAfterBattle + dw RockTunnel1EndBattleText5 ; TextEndBattle + dw RockTunnel1EndBattleText5 ; TextEndBattle + +RockTunnel1TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5 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 - -RockTunnel1TrainerHeader7: ; 4454d (11:454d) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5 + dw RockTunnel1BattleText6 ; TextBeforeBattle + dw RockTunnel1AfterBattleText6 ; TextAfterBattle + dw RockTunnel1EndBattleText6 ; TextEndBattle + dw RockTunnel1EndBattleText6 ; TextEndBattle + +RockTunnel1TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6 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 + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6 + 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 - -RockTunnel1Text2: ; 44560 (11:4560) - db $8 - ld hl, RockTunnel1TrainerHeader2 ; $4511 - jr asm_0c916 ; 0x44564 $1c - -RockTunnel1Text3: ; 44566 (11:4566) - db $8 - ld hl, RockTunnel1TrainerHeader3 ; $451d - jr asm_0c916 ; 0x4456a $16 - -RockTunnel1Text4: ; 4456c (11:456c) - db $8 - ld hl, RockTunnel1TrainerHeader4 ; $4529 - jr asm_0c916 ; 0x44570 $10 - -RockTunnel1Text5: ; 44572 (11:4572) - db $8 - ld hl, RockTunnel1TrainerHeader5 ; $4535 - jr asm_0c916 ; 0x44576 $a - -RockTunnel1Text6: ; 44578 (11:4578) - db $8 - ld hl, RockTunnel1TrainerHeader6 ; $4541 - jr asm_0c916 ; 0x4457c $4 - -RockTunnel1Text7: ; 4457e (11:457e) - db $8 - ld hl, RockTunnel1TrainerHeader7 ; $454d -asm_0c916: ; 44582 (11:4582) +RockTunnel1Text1: + TX_ASM + ld hl, RockTunnel1TrainerHeader0 + jr RockTunnel1TalkToTrainer + +RockTunnel1Text2: + TX_ASM + ld hl, RockTunnel1TrainerHeader1 + jr RockTunnel1TalkToTrainer + +RockTunnel1Text3: + TX_ASM + ld hl, RockTunnel1TrainerHeader2 + jr RockTunnel1TalkToTrainer + +RockTunnel1Text4: + TX_ASM + ld hl, RockTunnel1TrainerHeader3 + jr RockTunnel1TalkToTrainer + +RockTunnel1Text5: + TX_ASM + ld hl, RockTunnel1TrainerHeader4 + jr RockTunnel1TalkToTrainer + +RockTunnel1Text6: + TX_ASM + ld hl, RockTunnel1TrainerHeader5 + jr RockTunnel1TalkToTrainer + +RockTunnel1Text7: + TX_ASM + ld hl, RockTunnel1TrainerHeader6 +RockTunnel1TalkToTrainer: call TalkToTrainer jp TextScriptEnd -RockTunnel1BattleText1: ; 44588 (11:4588) +RockTunnel1BattleText1: TX_FAR _RockTunnel1BattleText1 db "@" -RockTunnel1EndBattleText1: ; 4458d (11:458d) +RockTunnel1EndBattleText1: TX_FAR _RockTunnel1EndBattleText1 db "@" -RockTunnel1AfterBattleText1: ; 44592 (11:4592) +RockTunnel1AfterBattleText1: TX_FAR _RockTunnel1AfterBattleText1 db "@" -RockTunnel1BattleText2: ; 44597 (11:4597) +RockTunnel1BattleText2: TX_FAR _RockTunnel1BattleText2 db "@" -RockTunnel1EndBattleText2: ; 4459c (11:459c) +RockTunnel1EndBattleText2: TX_FAR _RockTunnel1EndBattleText2 db "@" -RockTunnel1AfterBattleText2: ; 445a1 (11:45a1) +RockTunnel1AfterBattleText2: TX_FAR _RockTunnel1AfterBattleText2 db "@" -RockTunnel1BattleText3: ; 445a6 (11:45a6) +RockTunnel1BattleText3: TX_FAR _RockTunnel1BattleText3 db "@" -RockTunnel1EndBattleText3: ; 445ab (11:45ab) +RockTunnel1EndBattleText3: TX_FAR _RockTunnel1EndBattleText3 db "@" -RockTunnel1AfterBattleText3: ; 445b0 (11:45b0) +RockTunnel1AfterBattleText3: TX_FAR _RockTunnel1AfterBattleText3 db "@" -RockTunnel1BattleText4: ; 445b5 (11:45b5) +RockTunnel1BattleText4: TX_FAR _RockTunnel1BattleText4 db "@" -RockTunnel1EndBattleText4: ; 445ba (11:45ba) +RockTunnel1EndBattleText4: TX_FAR _RockTunnel1EndBattleText4 db "@" -RockTunnel1AfterBattleText4: ; 445bf (11:45bf) +RockTunnel1AfterBattleText4: TX_FAR _RockTunnel1AfterBattleText4 db "@" -RockTunnel1BattleText5: ; 445c4 (11:45c4) +RockTunnel1BattleText5: TX_FAR _RockTunnel1BattleText5 db "@" -RockTunnel1EndBattleText5: ; 445c9 (11:45c9) +RockTunnel1EndBattleText5: TX_FAR _RockTunnel1EndBattleText5 db "@" -RockTunnel1AfterBattleText5: ; 445ce (11:45ce) +RockTunnel1AfterBattleText5: TX_FAR _RockTunnel1AfterBattleText5 db "@" -RockTunnel1BattleText6: ; 445d3 (11:45d3) +RockTunnel1BattleText6: TX_FAR _RockTunnel1BattleText6 db "@" -RockTunnel1EndBattleText6: ; 445d8 (11:45d8) +RockTunnel1EndBattleText6: TX_FAR _RockTunnel1EndBattleText6 db "@" -RockTunnel1AfterBattleText6: ; 445dd (11:45dd) +RockTunnel1AfterBattleText6: TX_FAR _RockTunnel1AfterBattleText6 db "@" -RockTunnel1BattleText7: ; 445e2 (11:45e2) +RockTunnel1BattleText7: TX_FAR _RockTunnel1BattleText7 db "@" -RockTunnel1EndBattleText7: ; 445e7 (11:45e7) +RockTunnel1EndBattleText7: TX_FAR _RockTunnel1EndBattleText7 db "@" -RockTunnel1AfterBattleText7: ; 445ec (11:45ec) +RockTunnel1AfterBattleText7: TX_FAR _RockTunnel1AfterBattleText7 db "@" -RockTunnel1Text8: ; 445f1 (11:45f1) +RockTunnel1Text8: TX_FAR _RockTunnel1Text8 db "@" diff --git a/scripts/rocktunnel2.asm b/scripts/rocktunnel2.asm index 98b804a7..4385b5f7 100755 --- a/scripts/rocktunnel2.asm +++ b/scripts/rocktunnel2.asm @@ -1,18 +1,18 @@ -RockTunnel2Script: ; 45feb (11:5feb) +RockTunnel2Script: call EnableAutoTextBoxDrawing - ld hl, RockTunnel2TrainerHeaders + ld hl, RockTunnel2TrainerHeader0 ld de, RockTunnel2ScriptPointers - ld a, [W_ROCKTUNNEL2CURSCRIPT] + ld a, [wRockTunnel2CurScript] call ExecuteCurMapScriptInTable - ld [W_ROCKTUNNEL2CURSCRIPT], a + ld [wRockTunnel2CurScript], a ret -RockTunnel2ScriptPointers: ; 45ffe (11:5ffe) +RockTunnel2ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -RockTunnel2TextPointers: ; 46004 (11:6004) +RockTunnel2TextPointers: dw RockTunnel2Text1 dw RockTunnel2Text2 dw RockTunnel2Text3 @@ -22,221 +22,220 @@ RockTunnel2TextPointers: ; 46004 (11:6004) dw RockTunnel2Text7 dw RockTunnel2Text8 -RockTunnel2TrainerHeaders: ; 46014 (11:6014) -RockTunnel2TrainerHeader0: ; 46014 (11:6014) - db $1 ; flag's bit +RockTunnel2TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0 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 - -RockTunnel2TrainerHeader2: ; 46020 (11:6020) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0 + dw RockTunnel2BattleText2 ; TextBeforeBattle + dw RockTunnel2AfterBattleText2 ; TextAfterBattle + dw RockTunnel2EndBattleText2 ; TextEndBattle + dw RockTunnel2EndBattleText2 ; TextEndBattle + +RockTunnel2TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1 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 - -RockTunnel2TrainerHeader3: ; 4602c (11:602c) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1 + dw RockTunnel2BattleText3 ; TextBeforeBattle + dw RockTunnel2AfterBattleText3 ; TextAfterBattle + dw RockTunnel2EndBattleText3 ; TextEndBattle + dw RockTunnel2EndBattleText3 ; TextEndBattle + +RockTunnel2TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2 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 - -RockTunnel2TrainerHeader4: ; 46038 (11:6038) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2 + dw RockTunnel2BattleText4 ; TextBeforeBattle + dw RockTunnel2AfterBattleText4 ; TextAfterBattle + dw RockTunnel2EndBattleText4 ; TextEndBattle + dw RockTunnel2EndBattleText4 ; TextEndBattle + +RockTunnel2TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3 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 - -RockTunnel2TrainerHeader5: ; 46044 (11:6044) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3 + dw RockTunnel2BattleText5 ; TextBeforeBattle + dw RockTunnel2AfterBattleText5 ; TextAfterBattle + dw RockTunnel2EndBattleText5 ; TextEndBattle + dw RockTunnel2EndBattleText5 ; TextEndBattle + +RockTunnel2TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4 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 - -RockTunnel2TrainerHeader6: ; 46050 (11:6050) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4 + dw RockTunnel2BattleText6 ; TextBeforeBattle + dw RockTunnel2AfterBattleText6 ; TextAfterBattle + dw RockTunnel2EndBattleText6 ; TextEndBattle + dw RockTunnel2EndBattleText6 ; TextEndBattle + +RockTunnel2TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5 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 - -RockTunnel2TrainerHeader7: ; 4605c (11:605c) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5 + dw RockTunnel2BattleText7 ; TextBeforeBattle + dw RockTunnel2AfterBattleText7 ; TextAfterBattle + dw RockTunnel2EndBattleText7 ; TextEndBattle + dw RockTunnel2EndBattleText7 ; TextEndBattle + +RockTunnel2TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6 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 - -RockTunnel2TrainerHeader8: ; 46068 (11:6068) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6 + dw RockTunnel2BattleText8 ; TextBeforeBattle + dw RockTunnel2AfterBattleText8 ; TextAfterBattle + dw RockTunnel2EndBattleText8 ; TextEndBattle + dw RockTunnel2EndBattleText8 ; TextEndBattle + +RockTunnel2TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 1 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 + dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 1 + dw RockTunnel2BattleText9 ; TextBeforeBattle + dw RockTunnel2AfterBattleText9 ; TextAfterBattle + dw RockTunnel2EndBattleText9 ; TextEndBattle + dw RockTunnel2EndBattleText9 ; TextEndBattle db $ff -RockTunnel2Text1: ; 46075 (11:6075) - db $08 ; asm +RockTunnel2Text1: + TX_ASM ld hl, RockTunnel2TrainerHeader0 call TalkToTrainer jp TextScriptEnd -RockTunnel2Text2: ; 4607f (11:607f) - db $08 ; asm +RockTunnel2Text2: + TX_ASM + ld hl, RockTunnel2TrainerHeader1 + call TalkToTrainer + jp TextScriptEnd + +RockTunnel2Text3: + TX_ASM ld hl, RockTunnel2TrainerHeader2 call TalkToTrainer jp TextScriptEnd -RockTunnel2Text3: ; 46089 (11:6089) - db $08 ; asm +RockTunnel2Text4: + TX_ASM ld hl, RockTunnel2TrainerHeader3 call TalkToTrainer jp TextScriptEnd -RockTunnel2Text4: ; 46093 (11:6093) - db $08 ; asm +RockTunnel2Text5: + TX_ASM ld hl, RockTunnel2TrainerHeader4 call TalkToTrainer jp TextScriptEnd -RockTunnel2Text5: ; 4609d (11:609d) - db $08 ; asm +RockTunnel2Text6: + TX_ASM ld hl, RockTunnel2TrainerHeader5 call TalkToTrainer jp TextScriptEnd -RockTunnel2Text6: ; 460a7 (11:60a7) - db $08 ; asm +RockTunnel2Text7: + TX_ASM ld hl, RockTunnel2TrainerHeader6 call TalkToTrainer jp TextScriptEnd -RockTunnel2Text7: ; 460b1 (11:60b1) - db $08 ; asm +RockTunnel2Text8: + TX_ASM ld hl, RockTunnel2TrainerHeader7 call TalkToTrainer jp TextScriptEnd -RockTunnel2Text8: ; 460bb (11:60bb) - db $08 ; asm - ld hl, RockTunnel2TrainerHeader8 - call TalkToTrainer - jp TextScriptEnd - -RockTunnel2BattleText2: ; 460c5 (11:60c5) +RockTunnel2BattleText2: TX_FAR _RockTunnel2BattleText2 db "@" -RockTunnel2EndBattleText2: ; 460ca (11:60ca) +RockTunnel2EndBattleText2: TX_FAR _RockTunnel2EndBattleText2 db "@" -RockTunnel2AfterBattleText2: ; 460cf (11:60cf) +RockTunnel2AfterBattleText2: TX_FAR _RockTunnel2AfterBattleText2 db "@" -RockTunnel2BattleText3: ; 460d4 (11:60d4) +RockTunnel2BattleText3: TX_FAR _RockTunnel2BattleText3 db "@" -RockTunnel2EndBattleText3: ; 460d9 (11:60d9) +RockTunnel2EndBattleText3: TX_FAR _RockTunnel2EndBattleText3 db "@" -RockTunnel2AfterBattleText3: ; 460de (11:60de) +RockTunnel2AfterBattleText3: TX_FAR _RockTunnel2AfterBattleText3 db "@" -RockTunnel2BattleText4: ; 460e3 (11:60e3) +RockTunnel2BattleText4: TX_FAR _RockTunnel2BattleText4 db "@" -RockTunnel2EndBattleText4: ; 460e8 (11:60e8) +RockTunnel2EndBattleText4: TX_FAR _RockTunnel2EndBattleText4 db "@" -RockTunnel2AfterBattleText4: ; 460ed (11:60ed) +RockTunnel2AfterBattleText4: TX_FAR _RockTunnel2AfterBattleText4 db "@" -RockTunnel2BattleText5: ; 460f2 (11:60f2) +RockTunnel2BattleText5: TX_FAR _RockTunnel2BattleText5 db "@" -RockTunnel2EndBattleText5: ; 460f7 (11:60f7) +RockTunnel2EndBattleText5: TX_FAR _RockTunnel2EndBattleText5 db "@" -RockTunnel2AfterBattleText5: ; 460fc (11:60fc) +RockTunnel2AfterBattleText5: TX_FAR _RockTunnel2AfterBattleText5 db "@" -RockTunnel2BattleText6: ; 46101 (11:6101) +RockTunnel2BattleText6: TX_FAR _RockTunnel2BattleText6 db "@" -RockTunnel2EndBattleText6: ; 46106 (11:6106) +RockTunnel2EndBattleText6: TX_FAR _RockTunnel2EndBattleText6 db "@" -RockTunnel2AfterBattleText6: ; 4610b (11:610b) +RockTunnel2AfterBattleText6: TX_FAR _RockTunnel2AfterBattleText6 db "@" -RockTunnel2BattleText7: ; 46110 (11:6110) +RockTunnel2BattleText7: TX_FAR _RockTunnel2BattleText7 db "@" -RockTunnel2EndBattleText7: ; 46115 (11:6115) +RockTunnel2EndBattleText7: TX_FAR _RockTunnel2EndBattleText7 db "@" -RockTunnel2AfterBattleText7: ; 4611a (11:611a) +RockTunnel2AfterBattleText7: TX_FAR _RockTunnel2AfterBattleText7 db "@" -RockTunnel2BattleText8: ; 4611f (11:611f) +RockTunnel2BattleText8: TX_FAR _RockTunnel2BattleText8 db "@" -RockTunnel2EndBattleText8: ; 46124 (11:6124) +RockTunnel2EndBattleText8: TX_FAR _RockTunnel2EndBattleText8 db "@" -RockTunnel2AfterBattleText8: ; 46129 (11:6129) +RockTunnel2AfterBattleText8: TX_FAR _RockTunnel2AfterBattleText8 db "@" -RockTunnel2BattleText9: ; 4612e (11:612e) +RockTunnel2BattleText9: TX_FAR _RockTunnel2BattleText9 db "@" -RockTunnel2EndBattleText9: ; 46133 (11:6133) +RockTunnel2EndBattleText9: TX_FAR _RockTunnel2EndBattleText9 db "@" -RockTunnel2AfterBattleText9: ; 46138 (11:6138) +RockTunnel2AfterBattleText9: TX_FAR _RockTunnel2AfterBattleText9 db "@" diff --git a/scripts/rocktunnelpokecenter.asm b/scripts/rocktunnelpokecenter.asm index 5e822bca..7bcdc1ae 100755 --- a/scripts/rocktunnelpokecenter.asm +++ b/scripts/rocktunnelpokecenter.asm @@ -1,23 +1,23 @@ -RockTunnelPokecenterScript: ; 493ba (12:53ba) +RockTunnelPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -RockTunnelPokecenterTextPointers: ; 493c0 (12:53c0) - dw RockTunnelPokecenterText1 +RockTunnelPokecenterTextPointers: + dw RockTunnelHealNurseText dw RockTunnelPokecenterText2 dw RockTunnelPokecenterText3 - dw RockTunnelPokecenterText4 + dw RockTunnelTradeNurseText -RockTunnelPokecenterText1: ; 493c8 (12:53c8) +RockTunnelHealNurseText: db $ff -RockTunnelPokecenterText2: ; 493c9 (12:53c9) - TX_FAR _RockTunnelPokecenterText1 +RockTunnelPokecenterText2: + TX_FAR _RockTunnelPokecenterText2 db "@" -RockTunnelPokecenterText3: ; 493ce (12:53ce) +RockTunnelPokecenterText3: TX_FAR _RockTunnelPokecenterText3 db "@" -RockTunnelPokecenterText4: ; 493d3 (12:53d3) +RockTunnelTradeNurseText: db $f6 diff --git a/scripts/route1.asm b/scripts/route1.asm index 189b987b..7f988fab 100755 --- a/scripts/route1.asm +++ b/scripts/route1.asm @@ -1,53 +1,52 @@ -Route1Script: ; 1caaf (7:4aaf) +Route1Script: jp EnableAutoTextBoxDrawing -Route1TextPointers: ; 1cab2 (7:4ab2) +Route1TextPointers: dw Route1Text1 dw Route1Text2 dw Route1Text3 -Route1Text1: ; 1cab8 (7:4ab8) - db $08 ; asm - ld hl, wd7bf - bit 0, [hl] - set 0, [hl] - jr nz, .asm_02840 ; 0x1cac0 +Route1Text1: + TX_ASM + CheckAndSetEvent EVENT_GOT_POTION_SAMPLE + jr nz, .asm_1cada ld hl, Route1ViridianMartSampleText call PrintText - ld bc, (POTION << 8) | 1 + lb bc, POTION, 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 -Route1ViridianMartSampleText: ; 1cae3 (7:4ae3) +Route1ViridianMartSampleText: TX_FAR _Route1ViridianMartSampleText db "@" -Route1Text_1cae8: ; 1cae8 (7:4ae8) +Route1Text_1cae8: TX_FAR _Route1Text_1cae8 - db $0b,"@" + TX_SFX_ITEM_1 + db "@" -Route1Text_1caee: ; 1caee (7:4aee) +Route1Text_1caee: TX_FAR _Route1Text_1caee db "@" -Route1Text_1caf3: ; 1caf3 (7:4af3) +Route1Text_1caf3: TX_FAR _Route1Text_1caf3 db "@" -Route1Text2: ; 1caf8 (7:4af8) +Route1Text2: TX_FAR _Route1Text2 db "@" -Route1Text3: ; 1cafd (7:4afd) +Route1Text3: TX_FAR _Route1Text3 db "@" diff --git a/scripts/route10.asm b/scripts/route10.asm index c587b1df..03a1e818 100755 --- a/scripts/route10.asm +++ b/scripts/route10.asm @@ -1,18 +1,18 @@ -Route10Script: ; 59336 (16:5336) +Route10Script: call EnableAutoTextBoxDrawing - ld hl, Route10TrainerHeaders + ld hl, Route10TrainerHeader0 ld de, Route10ScriptPointers - ld a, [W_ROUTE10CURSCRIPT] + ld a, [wRoute10CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE10CURSCRIPT], a + ld [wRoute10CurScript], a ret -Route10ScriptPointers: ; 59349 (16:5349) +Route10ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route10TextPointers: ; 5934f (16:534f) +Route10TextPointers: dw Route10Text1 dw Route10Text2 dw Route10Text3 @@ -24,176 +24,175 @@ Route10TextPointers: ; 5934f (16:534f) dw Route10Text9 dw Route10Text10 -Route10TrainerHeaders: ; 59363 (16:5363) -Route10TrainerHeader0: ; 59363 (16:5363) - db $1 ; flag's bit +Route10TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_0 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 - -Route10TrainerHeader1: ; 5936f (16:536f) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_0 + dw Route10BattleText1 ; TextBeforeBattle + dw Route10AfterBattleText1 ; TextAfterBattle + dw Route10EndBattleText1 ; TextEndBattle + dw Route10EndBattleText1 ; TextEndBattle + +Route10TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_1 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 - -Route10TrainerHeader2: ; 5937b (16:537b) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_1 + dw Route10BattleText2 ; TextBeforeBattle + dw Route10AfterBattleText2 ; TextAfterBattle + dw Route10EndBattleText2 ; TextEndBattle + dw Route10EndBattleText2 ; TextEndBattle + +Route10TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_2 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 - -Route10TrainerHeader3: ; 59387 (16:5387) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_2 + dw Route10BattleText3 ; TextBeforeBattle + dw Route10AfterBattleText3 ; TextAfterBattle + dw Route10EndBattleText3 ; TextEndBattle + dw Route10EndBattleText3 ; TextEndBattle + +Route10TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_3 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 - -Route10TrainerHeader4: ; 59393 (16:5393) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_3 + dw Route10BattleText4 ; TextBeforeBattle + dw Route10AfterBattleText4 ; TextAfterBattle + dw Route10EndBattleText4 ; TextEndBattle + dw Route10EndBattleText4 ; TextEndBattle + +Route10TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_4 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 - -Route10TrainerHeader5: ; 5939f (16:539f) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_4 + dw Route10BattleText5 ; TextBeforeBattle + dw Route10AfterBattleText5 ; TextAfterBattle + dw Route10EndBattleText5 ; TextEndBattle + dw Route10EndBattleText5 ; TextEndBattle + +Route10TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_5 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_5 + dw Route10BattleText6 ; TextBeforeBattle + dw Route10AfterBattleText6 ; TextAfterBattle + dw Route10EndBattleText6 ; TextEndBattle + dw Route10EndBattleText6 ; TextEndBattle db $ff -Route10Text1: ; 593ac (16:53ac) - db $08 ; asm +Route10Text1: + TX_ASM ld hl, Route10TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route10BattleText1: ; 593b6 (16:53b6) +Route10BattleText1: TX_FAR _Route10BattleText1 db "@" -Route10EndBattleText1: ; 593bb (16:53bb) +Route10EndBattleText1: TX_FAR _Route10EndBattleText1 db "@" -Route10AfterBattleText1: ; 593c0 (16:53c0) +Route10AfterBattleText1: TX_FAR _Route10AfterBattleText1 db "@" -Route10Text2: ; 593c5 (16:53c5) - db $08 ; asm +Route10Text2: + TX_ASM ld hl, Route10TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route10BattleText2: ; 593cf (16:53cf) +Route10BattleText2: TX_FAR _Route10BattleText2 db "@" -Route10EndBattleText2: ; 593d4 (16:53d4) +Route10EndBattleText2: TX_FAR _Route10EndBattleText2 db "@" -Route10AfterBattleText2: ; 593d9 (16:53d9) +Route10AfterBattleText2: TX_FAR _Route10AfterBattleText2 db "@" -Route10Text3: ; 593de (16:53de) - db $08 ; asm +Route10Text3: + TX_ASM ld hl, Route10TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route10BattleText3: ; 593e8 (16:53e8) +Route10BattleText3: TX_FAR _Route10BattleText3 db "@" -Route10EndBattleText3: ; 593ed (16:53ed) +Route10EndBattleText3: TX_FAR _Route10EndBattleText3 db "@" -Route10AfterBattleText3: ; 593f2 (16:53f2) +Route10AfterBattleText3: TX_FAR _Route10AfterBattleText3 db "@" -Route10Text4: ; 593f7 (16:53f7) - db $08 ; asm +Route10Text4: + TX_ASM ld hl, Route10TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route10BattleText4: ; 59401 (16:5401) +Route10BattleText4: TX_FAR _Route10BattleText4 db "@" -Route10EndBattleText4: ; 59406 (16:5406) +Route10EndBattleText4: TX_FAR _Route10EndBattleText4 db "@" -Route10AfterBattleText4: ; 5940b (16:540b) +Route10AfterBattleText4: TX_FAR _Route10AfterBattleText4 db "@" -Route10Text5: ; 59410 (16:5410) - db $08 ; asm +Route10Text5: + TX_ASM ld hl, Route10TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route10BattleText5: ; 5941a (16:541a) +Route10BattleText5: TX_FAR _Route10BattleText5 db "@" -Route10EndBattleText5: ; 5941f (16:541f) +Route10EndBattleText5: TX_FAR _Route10EndBattleText5 db "@" -Route10AfterBattleText5: ; 59424 (16:5424) +Route10AfterBattleText5: TX_FAR _Route10AfterBattleText5 db "@" -Route10Text6: ; 59429 (16:5429) - db $08 ; asm +Route10Text6: + TX_ASM ld hl, Route10TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route10BattleText6: ; 59433 (16:5433) +Route10BattleText6: TX_FAR _Route10BattleText6 db "@" -Route10EndBattleText6: ; 59438 (16:5438) +Route10EndBattleText6: TX_FAR _Route10EndBattleText6 db "@" -Route10AfterBattleText6: ; 5943d (16:543d) +Route10AfterBattleText6: TX_FAR _Route10AfterBattleText6 db "@" -Route10Text9: ; 59442 (16:5442) -Route10Text7: ; 59442 (16:5442) +Route10Text9: +Route10Text7: TX_FAR _Route10Text7 ; _Route10Text9 db "@" -Route10Text10: ; 59447 (16:5447) +Route10Text10: TX_FAR _Route10Text10 db "@" diff --git a/scripts/route11.asm b/scripts/route11.asm index 629a6efd..afedfc32 100755 --- a/scripts/route11.asm +++ b/scripts/route11.asm @@ -1,18 +1,18 @@ -Route11Script: ; 5944c (16:544c) +Route11Script: call EnableAutoTextBoxDrawing - ld hl, Route11TrainerHeaders + ld hl, Route11TrainerHeader0 ld de, Route11ScriptPointers - ld a, [W_ROUTE11CURSCRIPT] + ld a, [wRoute11CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE11CURSCRIPT], a + ld [wRoute11CurScript], a ret -Route11ScriptPointers: ; 5945f (16:545f) +Route11ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route11TextPointers: ; 59465 (16:5465) +Route11TextPointers: dw Route11Text1 dw Route11Text2 dw Route11Text3 @@ -25,279 +25,278 @@ Route11TextPointers: ; 59465 (16:5465) dw Route11Text10 dw Route11Text11 -Route11TrainerHeaders: ; 5947b (16:547b) -Route11TrainerHeader0: ; 5947b (16:547b) - db $1 ; flag's bit +Route11TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_0 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 - -Route11TrainerHeader1: ; 59487 (16:5487) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_0 + dw Route11BattleText1 ; TextBeforeBattle + dw Route11AfterBattleText1 ; TextAfterBattle + dw Route11EndBattleText1 ; TextEndBattle + dw Route11EndBattleText1 ; TextEndBattle + +Route11TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_1 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 - -Route11TrainerHeader2: ; 59493 (16:5493) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_1 + dw Route11BattleText2 ; TextBeforeBattle + dw Route11AfterBattleText2 ; TextAfterBattle + dw Route11EndBattleText2 ; TextEndBattle + dw Route11EndBattleText2 ; TextEndBattle + +Route11TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_2 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 - -Route11TrainerHeader3: ; 5949f (16:549f) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_2 + dw Route11BattleText3 ; TextBeforeBattle + dw Route11AfterBattleText3 ; TextAfterBattle + dw Route11EndBattleText3 ; TextEndBattle + dw Route11EndBattleText3 ; TextEndBattle + +Route11TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_3 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 - -Route11TrainerHeader4: ; 594ab (16:54ab) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_3 + dw Route11BattleText4 ; TextBeforeBattle + dw Route11AfterBattleText4 ; TextAfterBattle + dw Route11EndBattleText4 ; TextEndBattle + dw Route11EndBattleText4 ; TextEndBattle + +Route11TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_4 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 - -Route11TrainerHeader5: ; 594b7 (16:54b7) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_4 + dw Route11BattleText5 ; TextBeforeBattle + dw Route11AfterBattleText5 ; TextAfterBattle + dw Route11EndBattleText5 ; TextEndBattle + dw Route11EndBattleText5 ; TextEndBattle + +Route11TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_5 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 - -Route11TrainerHeader6: ; 594c3 (16:54c3) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_5 + dw Route11BattleText6 ; TextBeforeBattle + dw Route11AfterBattleText6 ; TextAfterBattle + dw Route11EndBattleText6 ; TextEndBattle + dw Route11EndBattleText6 ; TextEndBattle + +Route11TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_6 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 - -Route11TrainerHeader7: ; 594cf (16:54cf) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_6 + dw Route11BattleText7 ; TextBeforeBattle + dw Route11AfterBattleText7 ; TextAfterBattle + dw Route11EndBattleText7 ; TextEndBattle + dw Route11EndBattleText7 ; TextEndBattle + +Route11TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_7, 1 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 - -Route11TrainerHeader8: ; 594db (16:54db) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_7, 1 + dw Route11BattleText8 ; TextBeforeBattle + dw Route11AfterBattleText8 ; TextAfterBattle + dw Route11EndBattleText8 ; TextEndBattle + dw Route11EndBattleText8 ; TextEndBattle + +Route11TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_8, 1 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 - -Route11TrainerHeader9: ; 594e7 (16:54e7) - db $a ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_8, 1 + dw Route11BattleText9 ; TextBeforeBattle + dw Route11AfterBattleText9 ; TextAfterBattle + dw Route11EndBattleText9 ; TextEndBattle + dw Route11EndBattleText9 ; TextEndBattle + +Route11TrainerHeader9: + dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_9, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_9, 1 + dw Route11BattleText10 ; TextBeforeBattle + dw Route11AfterBattleText10 ; TextAfterBattle + dw Route11EndBattleText10 ; TextEndBattle + dw Route11EndBattleText10 ; TextEndBattle db $ff -Route11Text1: ; 594f4 (16:54f4) - db $8 +Route11Text1: + TX_ASM ld hl, Route11TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route11BattleText1: ; 594fe (16:54fe) +Route11BattleText1: TX_FAR _Route11BattleText1 db "@" -Route11EndBattleText1: ; 59503 (16:5503) +Route11EndBattleText1: TX_FAR _Route11EndBattleText1 db "@" -Route11AfterBattleText1: ; 59508 (16:5508) +Route11AfterBattleText1: TX_FAR _Route11AfterBattleText1 db "@" -Route11Text2: ; 5950d (16:550d) - db $08 ; asm +Route11Text2: + TX_ASM ld hl, Route11TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route11BattleText2: ; 59517 (16:5517) +Route11BattleText2: TX_FAR _Route11BattleText2 db "@" -Route11EndBattleText2: ; 5951c (16:551c) +Route11EndBattleText2: TX_FAR _Route11EndBattleText2 db "@" -Route11AfterBattleText2: ; 59521 (16:5521) +Route11AfterBattleText2: TX_FAR _Route11AfterBattleText2 db "@" -Route11Text3: ; 59526 (16:5526) - db $08 ; asm +Route11Text3: + TX_ASM ld hl, Route11TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route11BattleText3: ; 59530 (16:5530) +Route11BattleText3: TX_FAR _Route11BattleText3 db "@" -Route11EndBattleText3: ; 59535 (16:5535) +Route11EndBattleText3: TX_FAR _Route11EndBattleText3 db "@" -Route11AfterBattleText3: ; 5953a (16:553a) +Route11AfterBattleText3: TX_FAR _Route11AfterBattleText3 db "@" -Route11Text4: ; 5953f (16:553f) - db $08 ; asm +Route11Text4: + TX_ASM ld hl, Route11TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route11BattleText4: ; 59549 (16:5549) +Route11BattleText4: TX_FAR _Route11BattleText4 db "@" -Route11EndBattleText4: ; 5954e (16:554e) +Route11EndBattleText4: TX_FAR _Route11EndBattleText4 db "@" -Route11AfterBattleText4: ; 59553 (16:5553) +Route11AfterBattleText4: TX_FAR _Route11AfterBattleText4 db "@" -Route11Text5: ; 59558 (16:5558) - db $08 ; asm +Route11Text5: + TX_ASM ld hl, Route11TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route11BattleText5: ; 59562 (16:5562) +Route11BattleText5: TX_FAR _Route11BattleText5 db "@" -Route11EndBattleText5: ; 59567 (16:5567) +Route11EndBattleText5: TX_FAR _Route11EndBattleText5 db "@" -Route11AfterBattleText5: ; 5956c (16:556c) +Route11AfterBattleText5: TX_FAR _Route11AfterBattleText5 db "@" -Route11Text6: ; 59571 (16:5571) - db $08 ; asm +Route11Text6: + TX_ASM ld hl, Route11TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route11BattleText6: ; 5957b (16:557b) +Route11BattleText6: TX_FAR _Route11BattleText6 db "@" -Route11EndBattleText6: ; 59580 (16:5580) +Route11EndBattleText6: TX_FAR _Route11EndBattleText6 db "@" -Route11AfterBattleText6: ; 59585 (16:5585) +Route11AfterBattleText6: TX_FAR _Route11AfterBattleText6 db "@" -Route11Text7: ; 5958a (16:558a) - db $08 ; asm +Route11Text7: + TX_ASM ld hl, Route11TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route11BattleText7: ; 59594 (16:5594) +Route11BattleText7: TX_FAR _Route11BattleText7 db "@" -Route11EndBattleText7: ; 59599 (16:5599) +Route11EndBattleText7: TX_FAR _Route11EndBattleText7 db "@" -Route11AfterBattleText7: ; 5959e (16:559e) +Route11AfterBattleText7: TX_FAR _Route11AfterBattleText7 db "@" -Route11Text8: ; 595a3 (16:55a3) - db $08 ; asm +Route11Text8: + TX_ASM ld hl, Route11TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route11BattleText8: ; 595ad (16:55ad) +Route11BattleText8: TX_FAR _Route11BattleText8 db "@" -Route11EndBattleText8: ; 595b2 (16:55b2) +Route11EndBattleText8: TX_FAR _Route11EndBattleText8 db "@" -Route11AfterBattleText8: ; 595b7 (16:55b7) +Route11AfterBattleText8: TX_FAR _Route11AfterBattleText8 db "@" -Route11Text9: ; 595bc (16:55bc) - db $08 ; asm +Route11Text9: + TX_ASM ld hl, Route11TrainerHeader8 call TalkToTrainer jp TextScriptEnd -Route11BattleText9: ; 595c6 (16:55c6) +Route11BattleText9: TX_FAR _Route11BattleText9 db "@" -Route11EndBattleText9: ; 595cb (16:55cb) +Route11EndBattleText9: TX_FAR _Route11EndBattleText9 db "@" -Route11AfterBattleText9: ; 595d0 (16:55d0) +Route11AfterBattleText9: TX_FAR _Route11AfterBattleText9 db "@" -Route11Text10: ; 595d5 (16:55d5) - db $08 ; asm +Route11Text10: + TX_ASM ld hl, Route11TrainerHeader9 call TalkToTrainer jp TextScriptEnd -Route11BattleText10: ; 595df (16:55df) +Route11BattleText10: TX_FAR _Route11BattleText10 db "@" -Route11EndBattleText10: ; 595e4 (16:55e4) +Route11EndBattleText10: TX_FAR _Route11EndBattleText10 db "@" -Route11AfterBattleText10: ; 595e9 (16:55e9) +Route11AfterBattleText10: TX_FAR _Route11AfterBattleText10 db "@" -Route11Text11: ; 595ee (16:55ee) +Route11Text11: TX_FAR _Route11Text11 db "@" diff --git a/scripts/route11gate.asm b/scripts/route11gate.asm index e53fc63a..9ecfe0ca 100755 --- a/scripts/route11gate.asm +++ b/scripts/route11gate.asm @@ -1,9 +1,9 @@ -Route11GateScript: ; 4940c (12:540c) +Route11GateScript: jp EnableAutoTextBoxDrawing -Route11GateTextPointers: ; 4940f (12:540f) +Route11GateTextPointers: dw Route11GateText1 -Route11GateText1: ; 49411 (12:5411) +Route11GateText1: TX_FAR _Route11GateText1 db "@" diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm index d8740986..6c8d6e99 100755 --- a/scripts/route11gateupstairs.asm +++ b/scripts/route11gateupstairs.asm @@ -1,59 +1,56 @@ -Route11GateUpstairsScript: ; 49454 (12:5454) +Route11GateUpstairsScript: jp DisableAutoTextBoxDrawing -Route11GateUpstairsTextPointers: ; 49457 (12:5457) +Route11GateUpstairsTextPointers: dw Route11GateUpstairsText1 dw Route11GateUpstairsText2 dw Route11GateUpstairsText3 dw Route11GateUpstairsText4 -Route11GateUpstairsText1: ; 4945f (12:545f) - db $08 ; asm +Route11GateUpstairsText1: + TX_ASM xor a ld [wWhichTrade], a predef DoInGameTradeDialogue -asm_49469: ; 49469 (12:5469) +Route11GateUpstairsScriptEnd: jp TextScriptEnd -Route11GateUpstairsText2: ; 4946c (12:546c) - db $8 - ld a, [wd7d6] - add a - jr c, .asm_4949b ; 0x49471 $28 +Route11GateUpstairsText2: + TX_ASM + CheckEvent EVENT_GOT_ITEMFINDER, 1 + jr c, .asm_4949b ld a, 30 ; pokemon needed - ld [$ffdb], a + ld [hOaksAideRequirement], a ld a, ITEMFINDER ; oak's aide reward - ld [$ffdc], a + ld [hOaksAideRewardItem], a ld [wd11e], a call GetItemName ld h, d ld l, e - ld de, wcc5b - ld bc, $000d + ld de, wOaksAideRewardItemName + ld bc, ITEM_NAME_LENGTH call CopyData - predef OaksAideScript ; call oak's aide script - ld a, [$ffdb] + predef OaksAideScript + ld a, [hOaksAideResult] dec a - jr nz, .asm_494a1 ; 0x49494 $b - ld hl, wd7d6 - set 7, [hl] + jr nz, .asm_494a1 + SetEvent EVENT_GOT_ITEMFINDER .asm_4949b ld hl, Route11GateUpstairsText_494a3 call PrintText .asm_494a1 - jr asm_49469 ; 0x494a1 $c6 + jr Route11GateUpstairsScriptEnd -Route11GateUpstairsText_494a3: ; 494a3 (12:54a3) +Route11GateUpstairsText_494a3: TX_FAR _Route11GateUpstairsText_494a3 db "@" -Route11GateUpstairsText3: ; 494a8 (12:54a8) - db $08 ; asm +Route11GateUpstairsText3: + TX_ASM ld a, [wSpriteStateData1 + 9] - cp $4 - jp nz, Route12GateUpstairsScript_495c9 - ld a, [wd7d8] - bit 7, a ; fought snorlax? + cp SPRITE_FACING_UP + jp nz, GateUpstairsScript_PrintIfFacingUp + CheckEvent EVENT_BEAT_ROUTE12_SNORLAX ld hl, BinocularsSnorlaxText jr z, .print ld hl, BinocularsNoSnorlaxText @@ -69,11 +66,11 @@ BinocularsNoSnorlaxText: TX_FAR _BinocularsNoSnorlaxText db "@" -Route11GateUpstairsText4: ; 494ce (12:54ce) - db $8 - ld hl, Route11GateUpstairsText_494d5 ; $54d5 - jp Route12GateUpstairsScript_495c9 +Route11GateUpstairsText4: + TX_ASM + ld hl, Route11GateUpstairsText_494d5 + jp GateUpstairsScript_PrintIfFacingUp -Route11GateUpstairsText_494d5: ; 494d5 (12:54d5) +Route11GateUpstairsText_494d5: TX_FAR _Route11GateUpstairsText_494d5 db "@" diff --git a/scripts/route12.asm b/scripts/route12.asm index fdaf2a85..07b5833b 100755 --- a/scripts/route12.asm +++ b/scripts/route12.asm @@ -1,49 +1,48 @@ -Route12Script: ; 595f3 (16:55f3) +Route12Script: call EnableAutoTextBoxDrawing - ld hl, Route12TrainerHeaders + ld hl, Route12TrainerHeader0 ld de, Route12ScriptPointers - ld a, [W_ROUTE12CURSCRIPT] + ld a, [wRoute12CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE12CURSCRIPT], a + ld [wRoute12CurScript], a ret -Route12Script_59606: ; 59606 (16:5606) +Route12Script_59606: xor a ld [wJoyIgnore], a - ld [W_ROUTE12CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute12CurScript], a + ld [wCurMapScript], a ret -Route12ScriptPointers: ; 59611 (16:5611) +Route12ScriptPointers: dw Route12Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw Route12Script3 -Route12Script0: ; 59619 (16:5619) - ld hl, wd7d8 - bit 7, [hl] +Route12Script0: + CheckEventHL EVENT_BEAT_ROUTE12_SNORLAX jp nz, CheckFightingMapTrainers - bit 6, [hl] - res 6, [hl] + CheckEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX + ResetEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX jp z, CheckFightingMapTrainers ld a, $d - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, SNORLAX - ld [W_CUROPPONENT], a ; wd059 + ld [wCurOpponent], a ld a, 30 - ld [W_CURENEMYLVL], a ; W_CURENEMYLVL + ld [wCurEnemyLVL], a ld a, HS_ROUTE_12_SNORLAX - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, $3 - ld [W_ROUTE12CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute12CurScript], a + ld [wCurMapScript], a ret -Route12Script3: ; 5964c (16:564c) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +Route12Script3: + ld a, [wIsInBattle] cp $ff jr z, Route12Script_59606 call UpdateSprites @@ -51,18 +50,17 @@ Route12Script3: ; 5964c (16:564c) cp $2 jr z, .asm_59664 ld a, $e - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_59664 - ld hl, wd7d8 - set 7, [hl] + SetEvent EVENT_BEAT_ROUTE12_SNORLAX call Delay3 ld a, $0 - ld [W_ROUTE12CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute12CurScript], a + ld [wCurMapScript], a ret -Route12TextPointers: ; 59675 (16:5675) +Route12TextPointers: dw Route12Text1 dw Route12Text2 dw Route12Text3 @@ -71,221 +69,220 @@ Route12TextPointers: ; 59675 (16:5675) dw Route12Text6 dw Route12Text7 dw Route12Text8 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText dw Route12Text11 dw Route12Text12 dw Route12Text13 dw Route12Text14 -Route12TrainerHeaders: ; 59691 (16:5691) -Route12TrainerHeader0: ; 59691 (16:5691) - db $2 ; flag's bit +Route12TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_0 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 - -Route12TrainerHeader1: ; 5969d (16:569d) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_0 + dw Route12BattleText1 ; TextBeforeBattle + dw Route12AfterBattleText1 ; TextAfterBattle + dw Route12EndBattleText1 ; TextEndBattle + dw Route12EndBattleText1 ; TextEndBattle + +Route12TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_1 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 - -Route12TrainerHeader2: ; 596a9 (16:56a9) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_1 + dw Route12BattleText2 ; TextBeforeBattle + dw Route12AfterBattleText2 ; TextAfterBattle + dw Route12EndBattleText2 ; TextEndBattle + dw Route12EndBattleText2 ; TextEndBattle + +Route12TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_2 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 - -Route12TrainerHeader3: ; 596b5 (16:56b5) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_2 + dw Route12BattleText3 ; TextBeforeBattle + dw Route12AfterBattleText3 ; TextAfterBattle + dw Route12EndBattleText3 ; TextEndBattle + dw Route12EndBattleText3 ; TextEndBattle + +Route12TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_3 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 - -Route12TrainerHeader4: ; 596c1 (16:56c1) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_3 + dw Route12BattleText4 ; TextBeforeBattle + dw Route12AfterBattleText4 ; TextAfterBattle + dw Route12EndBattleText4 ; TextEndBattle + dw Route12EndBattleText4 ; TextEndBattle + +Route12TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_4 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 - -Route12TrainerHeader5: ; 596cd (16:56cd) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_4 + dw Route12BattleText5 ; TextBeforeBattle + dw Route12AfterBattleText5 ; TextAfterBattle + dw Route12EndBattleText5 ; TextEndBattle + dw Route12EndBattleText5 ; TextEndBattle + +Route12TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_5 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 - -Route12TrainerHeader6: ; 596d9 (16:56d9) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_5 + dw Route12BattleText6 ; TextBeforeBattle + dw Route12AfterBattleText6 ; TextAfterBattle + dw Route12EndBattleText6 ; TextEndBattle + dw Route12EndBattleText6 ; TextEndBattle + +Route12TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_6, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_6, 1 + dw Route12BattleText7 ; TextBeforeBattle + dw Route12AfterBattleText7 ; TextAfterBattle + dw Route12EndBattleText7 ; TextEndBattle + dw Route12EndBattleText7 ; TextEndBattle db $ff -Route12Text1: ; 596e6 (16:56e6) +Route12Text1: TX_FAR _Route12Text1 db "@" -Route12Text13: ; 596eb (16:56eb) +Route12Text13: TX_FAR _Route12Text13 db "@" -Route12Text14: ; 596f0 (16:56f0) +Route12Text14: TX_FAR _Route12Text14 db "@" -Route12Text2: ; 596f5 (16:56f5) - db $08 ; asm +Route12Text2: + TX_ASM ld hl, Route12TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route12BattleText1: ; 596ff (16:56ff) +Route12BattleText1: TX_FAR _Route12BattleText1 db "@" -Route12EndBattleText1: ; 59704 (16:5704) +Route12EndBattleText1: TX_FAR _Route12EndBattleText1 db "@" -Route12AfterBattleText1: ; 59709 (16:5709) +Route12AfterBattleText1: TX_FAR _Route12AfterBattleText1 db "@" -Route12Text3: ; 5970e (16:570e) - db $08 ; asm +Route12Text3: + TX_ASM ld hl, Route12TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route12BattleText2: ; 59718 (16:5718) +Route12BattleText2: TX_FAR _Route12BattleText2 db "@" -Route12EndBattleText2: ; 5971d (16:571d) +Route12EndBattleText2: TX_FAR _Route12EndBattleText2 db "@" -Route12AfterBattleText2: ; 59722 (16:5722) +Route12AfterBattleText2: TX_FAR _Route12AfterBattleText2 db "@" -Route12Text4: ; 59727 (16:5727) - db $08 ; asm +Route12Text4: + TX_ASM ld hl, Route12TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route12BattleText3: ; 59731 (16:5731) +Route12BattleText3: TX_FAR _Route12BattleText3 db "@" -Route12EndBattleText3: ; 59736 (16:5736) +Route12EndBattleText3: TX_FAR _Route12EndBattleText3 db "@" -Route12AfterBattleText3: ; 5973b (16:573b) +Route12AfterBattleText3: TX_FAR _Route12AfterBattleText3 db "@" -Route12Text5: ; 59740 (16:5740) - db $08 ; asm +Route12Text5: + TX_ASM ld hl, Route12TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route12BattleText4: ; 5974a (16:574a) +Route12BattleText4: TX_FAR _Route12BattleText4 db "@" -Route12EndBattleText4: ; 5974f (16:574f) +Route12EndBattleText4: TX_FAR _Route12EndBattleText4 db "@" -Route12AfterBattleText4: ; 59754 (16:5754) +Route12AfterBattleText4: TX_FAR _Route12AfterBattleText4 db "@" -Route12Text6: ; 59759 (16:5759) - db $08 ; asm +Route12Text6: + TX_ASM ld hl, Route12TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route12BattleText5: ; 59763 (16:5763) +Route12BattleText5: TX_FAR _Route12BattleText5 db "@" -Route12EndBattleText5: ; 59768 (16:5768) +Route12EndBattleText5: TX_FAR _Route12EndBattleText5 db "@" -Route12AfterBattleText5: ; 5976d (16:576d) +Route12AfterBattleText5: TX_FAR _Route12AfterBattleText5 db "@" -Route12Text7: ; 59772 (16:5772) - db $08 ; asm +Route12Text7: + TX_ASM ld hl, Route12TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route12BattleText6: ; 5977c (16:577c) +Route12BattleText6: TX_FAR _Route12BattleText6 db "@" -Route12EndBattleText6: ; 59781 (16:5781) +Route12EndBattleText6: TX_FAR _Route12EndBattleText6 db "@" -Route12AfterBattleText6: ; 59786 (16:5786) +Route12AfterBattleText6: TX_FAR _Route12AfterBattleText6 db "@" -Route12Text8: ; 5978b (16:578b) - db $08 ; asm +Route12Text8: + TX_ASM ld hl, Route12TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route12BattleText7: ; 59795 (16:5795) +Route12BattleText7: TX_FAR _Route12BattleText7 db "@" -Route12EndBattleText7: ; 5979a (16:579a) +Route12EndBattleText7: TX_FAR _Route12EndBattleText7 db "@" -Route12AfterBattleText7: ; 5979f (16:579f) +Route12AfterBattleText7: TX_FAR _Route12AfterBattleText7 db "@" -Route12Text11: ; 597a4 (16:57a4) +Route12Text11: TX_FAR _Route12Text11 db "@" -Route12Text12: ; 597a9 (16:57a9) +Route12Text12: TX_FAR _Route12Text12 db "@" diff --git a/scripts/route12gate.asm b/scripts/route12gate.asm index d8f09c92..8474100d 100755 --- a/scripts/route12gate.asm +++ b/scripts/route12gate.asm @@ -1,9 +1,9 @@ -Route12GateScript: ; 49504 (12:5504) +Route12GateScript: jp EnableAutoTextBoxDrawing -Route12GateTextPointers: ; 49507 (12:5507) +Route12GateTextPointers: dw Route12GateText1 -Route12GateText1: ; 49509 (12:5509) +Route12GateText1: TX_FAR _Route12GateText1 db "@" diff --git a/scripts/route12gateupstairs.asm b/scripts/route12gateupstairs.asm index c4c05cd6..cd355265 100755 --- a/scripts/route12gateupstairs.asm +++ b/scripts/route12gateupstairs.asm @@ -1,79 +1,78 @@ -Route12GateUpstairsScript: ; 49560 (12:5560) +Route12GateUpstairsScript: jp DisableAutoTextBoxDrawing -Route12GateUpstairsTextPointers: ; 49563 (12:5563) +Route12GateUpstairsTextPointers: dw Route12GateUpstairsText1 dw Route12GateUpstairsText2 dw Route12GateUpstairsText3 -Route12GateUpstairsText1: ; 49569 (12:5569) - db $08 ; asm - ld a, [wd7d7] - rrca - jr c, .asm_0ad3c ; 0x4956e +Route12GateUpstairsText1: + TX_ASM + CheckEvent EVENT_GOT_TM39, 1 + jr c, .asm_0ad3c ld hl, TM39PreReceiveText call PrintText - ld bc, (TM_39 << 8) | 1 + lb bc, TM_39, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM39Text call PrintText - ld hl, wd7d7 - set 0, [hl] - jr .asm_4ba56 ; 0x49589 + SetEvent EVENT_GOT_TM39 + 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) +TM39PreReceiveText: TX_FAR _TM39PreReceiveText db "@" -ReceivedTM39Text: ; 495a1 (12:55a1) +ReceivedTM39Text: TX_FAR _ReceivedTM39Text - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -TM39ExplanationText: ; 495a7 (12:55a7) +TM39ExplanationText: TX_FAR _TM39ExplanationText db "@" -TM39NoRoomText: ; 495ac (12:55ac) +TM39NoRoomText: TX_FAR _TM39NoRoomText db "@" -Route12GateUpstairsText2: ; 495b1 (12:55b1) - db $08 ; asm +Route12GateUpstairsText2: + TX_ASM ld hl, Route12GateUpstairsText_495b8 - jp Route12GateUpstairsScript_495c9 + jp GateUpstairsScript_PrintIfFacingUp -Route12GateUpstairsText_495b8: ; 495b8 (12:55b8) +Route12GateUpstairsText_495b8: TX_FAR _Route12GateUpstairsText_495b8 db "@" -Route12GateUpstairsText3: ; 495bd (12:55bd) - db $8 +Route12GateUpstairsText3: + TX_ASM ld hl, Route12GateUpstairsText_495c4 - jp Route12GateUpstairsScript_495c9 + jp GateUpstairsScript_PrintIfFacingUp -Route12GateUpstairsText_495c4: ; 495c4 (12:55c4) +Route12GateUpstairsText_495c4: TX_FAR _Route12GateUpstairsText_495c4 db "@" -Route12GateUpstairsScript_495c9: ; 495c9 (12:55c9) +GateUpstairsScript_PrintIfFacingUp: 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..4b93395f 100755 --- a/scripts/route12house.asm +++ b/scripts/route12house.asm @@ -1,11 +1,11 @@ -Route12HouseScript: ; 5647f (15:647f) +Route12HouseScript: jp EnableAutoTextBoxDrawing -Route12HouseTextPointers: ; 56482 (15:6482) +Route12HouseTextPointers: dw Route12HouseText1 -Route12HouseText1: ; 56484 (15:6484) - db $08 ; asm +Route12HouseText1: + TX_ASM ld a, [wd728] bit 5, a jr nz, .asm_b4cad @@ -15,7 +15,7 @@ Route12HouseText1: ; 56484 (15:6484) ld a, [wCurrentMenuItem] and a jr nz, .asm_a2d76 - ld bc, (SUPER_ROD << 8) | 1 + lb bc, SUPER_ROD, 1 call GiveItem jr nc, .BagFull ld hl, wd728 @@ -27,31 +27,31 @@ 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 call PrintText jp TextScriptEnd -Route12HouseText_564c0: ; 564c0 (15:64c0) +Route12HouseText_564c0: TX_FAR _Route12HouseText_564c0 db "@" -Route12HouseText_564c5: ; 564c5 (15:64c5) - TX_FAR _Route12HouseText_564c5 ; 0x8ca00 - db $0B - TX_FAR _Route12HouseText_564ca ; 0x8ca4f +Route12HouseText_564c5: + TX_FAR _Route12HouseText_564c5 + TX_SFX_ITEM_1 + TX_FAR _Route12HouseText_564ca db "@" -Route12HouseText_564cf: ; 564cf (15:64cf) +Route12HouseText_564cf: TX_FAR _Route12HouseText_564cf db "@" -Route12HouseText_564d4: ; 564d4 (15:64d4) +Route12HouseText_564d4: TX_FAR _Route12HouseText_564d4 db "@" -Route12HouseText_564d9: ; 564d9 (15:64d9) +Route12HouseText_564d9: TX_FAR _Route12HouseText_564d9 db "@" diff --git a/scripts/route13.asm b/scripts/route13.asm index 21862dfc..54fb9d68 100755 --- a/scripts/route13.asm +++ b/scripts/route13.asm @@ -1,18 +1,18 @@ -Route13Script: ; 5581e (15:581e) +Route13Script: call EnableAutoTextBoxDrawing - ld hl, Route13TrainerHeaders + ld hl, Route13TrainerHeader0 ld de, Route13ScriptPointers - ld a, [W_ROUTE13CURSCRIPT] + ld a, [wRoute13CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE13CURSCRIPT], a + ld [wRoute13CurScript], a ret -Route13ScriptPointers: ; 55831 (15:5831) +Route13ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route13TextPointers: ; 55837 (15:5837) +Route13TextPointers: dw Route13Text1 dw Route13Text2 dw Route13Text3 @@ -27,287 +27,286 @@ Route13TextPointers: ; 55837 (15:5837) dw Route13Text12 dw Route13Text13 -Route13TrainerHeaders: ; 55851 (15:5851) -Route13TrainerHeader0: ; 55851 (15:5851) - db $1 ; flag's bit +Route13TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_0 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 - -Route13TrainerHeader2: ; 5585d (15:585d) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_0 + dw Route13BattleText2 ; TextBeforeBattle + dw Route13AfterBattleText2 ; TextAfterBattle + dw Route13EndBattleText2 ; TextEndBattle + dw Route13EndBattleText2 ; TextEndBattle + +Route13TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_1 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 - -Route13TrainerHeader3: ; 55869 (15:5869) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_1 + dw Route13BattleText3 ; TextBeforeBattle + dw Route13AfterBattleText3 ; TextAfterBattle + dw Route13EndBattleText3 ; TextEndBattle + dw Route13EndBattleText3 ; TextEndBattle + +Route13TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_2 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 - -Route13TrainerHeader4: ; 55875 (15:5875) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_2 + dw Route13BattleText4 ; TextBeforeBattle + dw Route13AfterBattleText4 ; TextAfterBattle + dw Route13EndBattleText4 ; TextEndBattle + dw Route13EndBattleText4 ; TextEndBattle + +Route13TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_3 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 - -Route13TrainerHeader5: ; 55881 (15:5881) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_3 + dw Route13BattleText5 ; TextBeforeBattle + dw Route13AfterBattleText5 ; TextAfterBattle + dw Route13EndBattleText5 ; TextEndBattle + dw Route13EndBattleText5 ; TextEndBattle + +Route13TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_4 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 - -Route13TrainerHeader6: ; 5588d (15:588d) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_4 + dw Route13BattleText6 ; TextBeforeBattle + dw Route13AfterBattleText6 ; TextAfterBattle + dw Route13EndBattleText6 ; TextEndBattle + dw Route13EndBattleText6 ; TextEndBattle + +Route13TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_5 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 - -Route13TrainerHeader7: ; 55899 (15:5899) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_5 + dw Route13BattleText7 ; TextBeforeBattle + dw Route13AfterBattleText7 ; TextAfterBattle + dw Route13EndBattleText7 ; TextEndBattle + dw Route13EndBattleText7 ; TextEndBattle + +Route13TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_6 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 - -Route13TrainerHeader8: ; 558a5 (15:58a5) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_6 + dw Route13BattleText8 ; TextBeforeBattle + dw Route13AfterBattleText8 ; TextAfterBattle + dw Route13EndBattleText8 ; TextEndBattle + dw Route13EndBattleText8 ; TextEndBattle + +Route13TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_7, 1 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 - -Route13TrainerHeader9: ; 558b1 (15:58b1) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_7, 1 + dw Route13BattleText9 ; TextBeforeBattle + dw Route13AfterBattleText9 ; TextAfterBattle + dw Route13EndBattleText9 ; TextEndBattle + dw Route13EndBattleText9 ; TextEndBattle + +Route13TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_8, 1 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 - -Route13TrainerHeader10: ; 558bd (15:58bd) - db $a ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_8, 1 + dw Route13BattleText10 ; TextBeforeBattle + dw Route13AfterBattleText10 ; TextAfterBattle + dw Route13EndBattleText10 ; TextEndBattle + dw Route13EndBattleText10 ; TextEndBattle + +Route13TrainerHeader9: + dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_9, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_9, 1 + dw Route13BattleText11 ; TextBeforeBattle + dw Route13AfterBattleText11 ; TextAfterBattle + dw Route13EndBattleText11 ; TextEndBattle + dw Route13EndBattleText11 ; TextEndBattle db $ff -Route13Text1: ; 558ca (15:58ca) - db $08 ; asm +Route13Text1: + TX_ASM ld hl, Route13TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route13BattleText2: ; 558d4 (15:58d4) +Route13BattleText2: TX_FAR _Route13BattleText2 db "@" -Route13EndBattleText2: ; 558d9 (15:58d9) +Route13EndBattleText2: TX_FAR _Route13EndBattleText2 db "@" -Route13AfterBattleText2: ; 558de (15:58de) +Route13AfterBattleText2: TX_FAR _Route13AfterBattleText2 db "@" -Route13Text2: ; 558e3 (15:58e3) - db $08 ; asm - ld hl, Route13TrainerHeader2 +Route13Text2: + TX_ASM + ld hl, Route13TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route13BattleText3: ; 558ed (15:58ed) +Route13BattleText3: TX_FAR _Route13BattleText3 db "@" -Route13EndBattleText3: ; 558f2 (15:58f2) +Route13EndBattleText3: TX_FAR _Route13EndBattleText3 db "@" -Route13AfterBattleText3: ; 558f7 (15:58f7) +Route13AfterBattleText3: TX_FAR _Route13AfterBattleText3 db "@" -Route13Text3: ; 558fc (15:58fc) - db $08 ; asm - ld hl, Route13TrainerHeader3 +Route13Text3: + TX_ASM + ld hl, Route13TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route13BattleText4: ; 55906 (15:5906) +Route13BattleText4: TX_FAR _Route13BattleText4 db "@" -Route13EndBattleText4: ; 5590b (15:590b) +Route13EndBattleText4: TX_FAR _Route13EndBattleText4 db "@" -Route13AfterBattleText4: ; 55910 (15:5910) +Route13AfterBattleText4: TX_FAR _Route13AfterBattleText4 db "@" -Route13Text4: ; 55915 (15:5915) - db $08 ; asm - ld hl, Route13TrainerHeader4 +Route13Text4: + TX_ASM + ld hl, Route13TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route13BattleText5: ; 5591f (15:591f) +Route13BattleText5: TX_FAR _Route13BattleText5 db "@" -Route13EndBattleText5: ; 55924 (15:5924) +Route13EndBattleText5: TX_FAR _Route13EndBattleText5 db "@" -Route13AfterBattleText5: ; 55929 (15:5929) +Route13AfterBattleText5: TX_FAR _Route13AfterBattleText5 db "@" -Route13Text5: ; 5592e (15:592e) - db $08 ; asm - ld hl, Route13TrainerHeader5 +Route13Text5: + TX_ASM + ld hl, Route13TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route13BattleText6: ; 55938 (15:5938) +Route13BattleText6: TX_FAR _Route13BattleText6 db "@" -Route13EndBattleText6: ; 5593d (15:593d) +Route13EndBattleText6: TX_FAR _Route13EndBattleText6 db "@" -Route13AfterBattleText6: ; 55942 (15:5942) +Route13AfterBattleText6: TX_FAR _Route13AfterBattleText6 db "@" -Route13Text6: ; 55947 (15:5947) - db $08 ; asm - ld hl, Route13TrainerHeader6 +Route13Text6: + TX_ASM + ld hl, Route13TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route13BattleText7: ; 55951 (15:5951) +Route13BattleText7: TX_FAR _Route13BattleText7 db "@" -Route13EndBattleText7: ; 55956 (15:5956) +Route13EndBattleText7: TX_FAR _Route13EndBattleText7 db "@" -Route13AfterBattleText7: ; 5595b (15:595b) +Route13AfterBattleText7: TX_FAR _Route13AfterBattleText7 db "@" -Route13Text7: ; 55960 (15:5960) - db $08 ; asm - ld hl, Route13TrainerHeader7 +Route13Text7: + TX_ASM + ld hl, Route13TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route13BattleText8: ; 5596a (15:596a) +Route13BattleText8: TX_FAR _Route13BattleText8 db "@" -Route13EndBattleText8: ; 5596f (15:596f) +Route13EndBattleText8: TX_FAR _Route13EndBattleText8 db "@" -Route13AfterBattleText8: ; 55974 (15:5974) +Route13AfterBattleText8: TX_FAR _Route13AfterBattleText8 db "@" -Route13Text8: ; 55979 (15:5979) - db $08 ; asm - ld hl, Route13TrainerHeader8 +Route13Text8: + TX_ASM + ld hl, Route13TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route13BattleText9: ; 55983 (15:5983) +Route13BattleText9: TX_FAR _Route13BattleText9 db "@" -Route13EndBattleText9: ; 55988 (15:5988) +Route13EndBattleText9: TX_FAR _Route13EndBattleText9 db "@" -Route13AfterBattleText9: ; 5598d (15:598d) +Route13AfterBattleText9: TX_FAR _Route13AfterBattleText9 db "@" -Route13Text9: ; 55992 (15:5992) - db $08 ; asm - ld hl, Route13TrainerHeader9 +Route13Text9: + TX_ASM + ld hl, Route13TrainerHeader8 call TalkToTrainer jp TextScriptEnd -Route13BattleText10: ; 5599c (15:599c) +Route13BattleText10: TX_FAR _Route13BattleText10 db "@" -Route13EndBattleText10: ; 559a1 (15:59a1) +Route13EndBattleText10: TX_FAR _Route13EndBattleText10 db "@" -Route13AfterBattleText10: ; 559a6 (15:59a6) +Route13AfterBattleText10: TX_FAR _Route13AfterBattleText10 db "@" -Route13Text10: ; 559ab (15:59ab) - db $08 ; asm - ld hl, Route13TrainerHeader10 +Route13Text10: + TX_ASM + ld hl, Route13TrainerHeader9 call TalkToTrainer jp TextScriptEnd -Route13BattleText11: ; 559b5 (15:59b5) +Route13BattleText11: TX_FAR _Route13BattleText11 db "@" -Route13EndBattleText11: ; 559ba (15:59ba) +Route13EndBattleText11: TX_FAR _Route13EndBattleText11 db "@" -Route13AfterBattleText11: ; 559bf (15:59bf) +Route13AfterBattleText11: TX_FAR _Route13AfterBattleText11 db "@" -Route13Text11: ; 559c4 (15:59c4) +Route13Text11: TX_FAR _Route13Text11 db "@" -Route13Text12: ; 559c9 (15:59c9) +Route13Text12: TX_FAR _Route13Text12 db "@" -Route13Text13: ; 559ce (15:59ce) +Route13Text13: TX_FAR _Route13Text13 db "@" diff --git a/scripts/route14.asm b/scripts/route14.asm index d430f858..c929451f 100755 --- a/scripts/route14.asm +++ b/scripts/route14.asm @@ -1,18 +1,18 @@ -Route14Script: ; 559d3 (15:59d3) +Route14Script: call EnableAutoTextBoxDrawing - ld hl, Route14TrainerHeaders + ld hl, Route14TrainerHeader0 ld de, Route14ScriptPointers - ld a, [W_ROUTE14CURSCRIPT] + ld a, [wRoute14CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE14CURSCRIPT], a + ld [wRoute14CurScript], a ret -Route14ScriptPointers: ; 559e6 (15:59e6) +Route14ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route14TextPointers: ; 559ec (15:59ec) +Route14TextPointers: dw Route14Text1 dw Route14Text2 dw Route14Text3 @@ -25,279 +25,278 @@ Route14TextPointers: ; 559ec (15:59ec) dw Route14Text10 dw Route14Text11 -Route14TrainerHeaders: ; 55a02 (15:5a02) -Route14TrainerHeader0: ; 55a02 (15:5a02) - db $1 ; flag's bit +Route14TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_0 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 - -Route14TrainerHeader1: ; 55a0e (15:5a0e) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_0 + dw Route14BattleText1 ; TextBeforeBattle + dw Route14AfterBattleText1 ; TextAfterBattle + dw Route14EndBattleText1 ; TextEndBattle + dw Route14EndBattleText1 ; TextEndBattle + +Route14TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_1 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 - -Route14TrainerHeader2: ; 55a1a (15:5a1a) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_1 + dw Route14BattleText2 ; TextBeforeBattle + dw Route14AfterBattleText2 ; TextAfterBattle + dw Route14EndBattleText2 ; TextEndBattle + dw Route14EndBattleText2 ; TextEndBattle + +Route14TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_2 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 - -Route14TrainerHeader3: ; 55a26 (15:5a26) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_2 + dw Route14BattleText3 ; TextBeforeBattle + dw Route14AfterBattleText3 ; TextAfterBattle + dw Route14EndBattleText3 ; TextEndBattle + dw Route14EndBattleText3 ; TextEndBattle + +Route14TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_3 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 - -Route14TrainerHeader4: ; 55a32 (15:5a32) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_3 + dw Route14BattleText4 ; TextBeforeBattle + dw Route14AfterBattleText4 ; TextAfterBattle + dw Route14EndBattleText4 ; TextEndBattle + dw Route14EndBattleText4 ; TextEndBattle + +Route14TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_4 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 - -Route14TrainerHeader5: ; 55a3e (15:5a3e) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_4 + dw Route14BattleText5 ; TextBeforeBattle + dw Route14AfterBattleText5 ; TextAfterBattle + dw Route14EndBattleText5 ; TextEndBattle + dw Route14EndBattleText5 ; TextEndBattle + +Route14TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_5 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 - -Route14TrainerHeader6: ; 55a4a (15:5a4a) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_5 + dw Route14BattleText6 ; TextBeforeBattle + dw Route14AfterBattleText6 ; TextAfterBattle + dw Route14EndBattleText6 ; TextEndBattle + dw Route14EndBattleText6 ; TextEndBattle + +Route14TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_6 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 - -Route14TrainerHeader7: ; 55a56 (15:5a56) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_6 + dw Route14BattleText7 ; TextBeforeBattle + dw Route14AfterBattleText7 ; TextAfterBattle + dw Route14EndBattleText7 ; TextEndBattle + dw Route14EndBattleText7 ; TextEndBattle + +Route14TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_7, 1 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 - -Route14TrainerHeader8: ; 55a62 (15:5a62) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_7, 1 + dw Route14BattleText8 ; TextBeforeBattle + dw Route14AfterBattleText8 ; TextAfterBattle + dw Route14EndBattleText8 ; TextEndBattle + dw Route14EndBattleText8 ; TextEndBattle + +Route14TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_8, 1 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 - -Route14TrainerHeader9: ; 55a6e (15:5a6e) - db $a ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_8, 1 + dw Route14BattleText9 ; TextBeforeBattle + dw Route14AfterBattleText9 ; TextAfterBattle + dw Route14EndBattleText9 ; TextEndBattle + dw Route14EndBattleText9 ; TextEndBattle + +Route14TrainerHeader9: + dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_9, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_9, 1 + dw Route14BattleText10 ; TextBeforeBattle + dw Route14AfterBattleText10 ; TextAfterBattle + dw Route14EndBattleText10 ; TextEndBattle + dw Route14EndBattleText10 ; TextEndBattle db $ff -Route14Text1: ; 55a7b (15:5a7b) - db $08 ; asm +Route14Text1: + TX_ASM ld hl, Route14TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route14BattleText1: ; 55a85 (15:5a85) +Route14BattleText1: TX_FAR _Route14BattleText1 db "@" -Route14EndBattleText1: ; 55a8a (15:5a8a) +Route14EndBattleText1: TX_FAR _Route14EndBattleText1 db "@" -Route14AfterBattleText1: ; 55a8f (15:5a8f) +Route14AfterBattleText1: TX_FAR _Route14AfterBattleText1 db "@" -Route14Text2: ; 55a94 (15:5a94) - db $08 ; asm +Route14Text2: + TX_ASM ld hl, Route14TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route14BattleText2: ; 55a9e (15:5a9e) +Route14BattleText2: TX_FAR _Route14BattleText2 db "@" -Route14EndBattleText2: ; 55aa3 (15:5aa3) +Route14EndBattleText2: TX_FAR _Route14EndBattleText2 db "@" -Route14AfterBattleText2: ; 55aa8 (15:5aa8) +Route14AfterBattleText2: TX_FAR _Route14AfterBattleText2 db "@" -Route14Text3: ; 55aad (15:5aad) - db $08 ; asm +Route14Text3: + TX_ASM ld hl, Route14TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route14BattleText3: ; 55ab7 (15:5ab7) +Route14BattleText3: TX_FAR _Route14BattleText3 db "@" -Route14EndBattleText3: ; 55abc (15:5abc) +Route14EndBattleText3: TX_FAR _Route14EndBattleText3 db "@" -Route14AfterBattleText3: ; 55ac1 (15:5ac1) +Route14AfterBattleText3: TX_FAR _Route14AfterBattleText3 db "@" -Route14Text4: ; 55ac6 (15:5ac6) - db $08 ; asm +Route14Text4: + TX_ASM ld hl, Route14TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route14BattleText4: ; 55ad0 (15:5ad0) +Route14BattleText4: TX_FAR _Route14BattleText4 db "@" -Route14EndBattleText4: ; 55ad5 (15:5ad5) +Route14EndBattleText4: TX_FAR _Route14EndBattleText4 db "@" -Route14AfterBattleText4: ; 55ada (15:5ada) +Route14AfterBattleText4: TX_FAR _Route14AfterBattleText4 db "@" -Route14Text5: ; 55adf (15:5adf) - db $08 ; asm +Route14Text5: + TX_ASM ld hl, Route14TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route14BattleText5: ; 55ae9 (15:5ae9) +Route14BattleText5: TX_FAR _Route14BattleText5 db "@" -Route14EndBattleText5: ; 55aee (15:5aee) +Route14EndBattleText5: TX_FAR _Route14EndBattleText5 db "@" -Route14AfterBattleText5: ; 55af3 (15:5af3) +Route14AfterBattleText5: TX_FAR _Route14AfterBattleText5 db "@" -Route14Text6: ; 55af8 (15:5af8) - db $08 ; asm +Route14Text6: + TX_ASM ld hl, Route14TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route14BattleText6: ; 55b02 (15:5b02) +Route14BattleText6: TX_FAR _Route14BattleText6 db "@" -Route14EndBattleText6: ; 55b07 (15:5b07) +Route14EndBattleText6: TX_FAR _Route14EndBattleText6 db "@" -Route14AfterBattleText6: ; 55b0c (15:5b0c) +Route14AfterBattleText6: TX_FAR _Route14AfterBattleText6 db "@" -Route14Text7: ; 55b11 (15:5b11) - db $08 ; asm +Route14Text7: + TX_ASM ld hl, Route14TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route14BattleText7: ; 55b1b (15:5b1b) +Route14BattleText7: TX_FAR _Route14BattleText7 db "@" -Route14EndBattleText7: ; 55b20 (15:5b20) +Route14EndBattleText7: TX_FAR _Route14EndBattleText7 db "@" -Route14AfterBattleText7: ; 55b25 (15:5b25) +Route14AfterBattleText7: TX_FAR _Route14AfterBattleText7 db "@" -Route14Text8: ; 55b2a (15:5b2a) - db $08 ; asm +Route14Text8: + TX_ASM ld hl, Route14TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route14BattleText8: ; 55b34 (15:5b34) +Route14BattleText8: TX_FAR _Route14BattleText8 db "@" -Route14EndBattleText8: ; 55b39 (15:5b39) +Route14EndBattleText8: TX_FAR _Route14EndBattleText8 db "@" -Route14AfterBattleText8: ; 55b3e (15:5b3e) +Route14AfterBattleText8: TX_FAR _Route14AfterBattleText8 db "@" -Route14Text9: ; 55b43 (15:5b43) - db $08 ; asm +Route14Text9: + TX_ASM ld hl, Route14TrainerHeader8 call TalkToTrainer jp TextScriptEnd -Route14BattleText9: ; 55b4d (15:5b4d) +Route14BattleText9: TX_FAR _Route14BattleText9 db "@" -Route14EndBattleText9: ; 55b52 (15:5b52) +Route14EndBattleText9: TX_FAR _Route14EndBattleText9 db "@" -Route14AfterBattleText9: ; 55b57 (15:5b57) +Route14AfterBattleText9: TX_FAR _Route14AfterBattleText9 db "@" -Route14Text10: ; 55b5c (15:5b5c) - db $08 ; asm +Route14Text10: + TX_ASM ld hl, Route14TrainerHeader9 call TalkToTrainer jp TextScriptEnd -Route14BattleText10: ; 55b66 (15:5b66) +Route14BattleText10: TX_FAR _Route14BattleText10 db "@" -Route14EndBattleText10: ; 55b6b (15:5b6b) +Route14EndBattleText10: TX_FAR _Route14EndBattleText10 db "@" -Route14AfterBattleText10: ; 55b70 (15:5b70) +Route14AfterBattleText10: TX_FAR _Route14AfterBattleText10 db "@" -Route14Text11: ; 55b75 (15:5b75) +Route14Text11: TX_FAR _Route14Text11 db "@" diff --git a/scripts/route15.asm b/scripts/route15.asm index 733d4a1c..58c5d0ab 100755 --- a/scripts/route15.asm +++ b/scripts/route15.asm @@ -1,18 +1,18 @@ -Route15Script: ; 597ae (16:57ae) +Route15Script: call EnableAutoTextBoxDrawing - ld hl, Route15TrainerHeaders + ld hl, Route15TrainerHeader0 ld de, Route15ScriptPointers - ld a, [W_ROUTE15CURSCRIPT] + ld a, [wRoute15CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE15CURSCRIPT], a + ld [wRoute15CurScript], a ret -Route15ScriptPointers: ; 597c1 (16:57c1) +Route15ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route15TextPointers: ; 597c7 (16:57c7) +Route15TextPointers: dw Route15Text1 dw Route15Text2 dw Route15Text3 @@ -23,274 +23,273 @@ Route15TextPointers: ; 597c7 (16:57c7) dw Route15Text8 dw Route15Text9 dw Route15Text10 - dw Predef5CText + dw PickUpItemText dw Route15Text12 -Route15TrainerHeaders: ; 597df (16:57df) -Route15TrainerHeader0: ; 597df (16:57df) - db $1 ; flag's bit +Route15TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_0 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 - -Route15TrainerHeader1: ; 597eb (16:57eb) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_0 + dw Route15BattleText1 ; TextBeforeBattle + dw Route15AfterBattleText1 ; TextAfterBattle + dw Route15EndBattleText1 ; TextEndBattle + dw Route15EndBattleText1 ; TextEndBattle + +Route15TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_1 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 - -Route15TrainerHeader2: ; 597f7 (16:57f7) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_1 + dw Route15BattleText2 ; TextBeforeBattle + dw Route15AfterBattleText2 ; TextAfterBattle + dw Route15EndBattleText2 ; TextEndBattle + dw Route15EndBattleText2 ; TextEndBattle + +Route15TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_2 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 - -Route15TrainerHeader3: ; 59803 (16:5803) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_2 + dw Route15BattleText3 ; TextBeforeBattle + dw Route15AfterBattleText3 ; TextAfterBattle + dw Route15EndBattleText3 ; TextEndBattle + dw Route15EndBattleText3 ; TextEndBattle + +Route15TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_3 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 - -Route15TrainerHeader4: ; 5980f (16:580f) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_3 + dw Route15BattleText4 ; TextBeforeBattle + dw Route15AfterBattleText4 ; TextAfterBattle + dw Route15EndBattleText4 ; TextEndBattle + dw Route15EndBattleText4 ; TextEndBattle + +Route15TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_4 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 - -Route15TrainerHeader5: ; 5981b (16:581b) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_4 + dw Route15BattleText5 ; TextBeforeBattle + dw Route15AfterBattleText5 ; TextAfterBattle + dw Route15EndBattleText5 ; TextEndBattle + dw Route15EndBattleText5 ; TextEndBattle + +Route15TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_5 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 - -Route15TrainerHeader6: ; 59827 (16:5827) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_5 + dw Route15BattleText6 ; TextBeforeBattle + dw Route15AfterBattleText6 ; TextAfterBattle + dw Route15EndBattleText6 ; TextEndBattle + dw Route15EndBattleText6 ; TextEndBattle + +Route15TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_6 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 - -Route15TrainerHeader7: ; 59833 (16:5833) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_6 + dw Route15BattleText7 ; TextBeforeBattle + dw Route15AfterBattleText7 ; TextAfterBattle + dw Route15EndBattleText7 ; TextEndBattle + dw Route15EndBattleText7 ; TextEndBattle + +Route15TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_7, 1 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 - -Route15TrainerHeader8: ; 5983f (16:583f) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_7, 1 + dw Route15BattleText8 ; TextBeforeBattle + dw Route15AfterBattleText8 ; TextAfterBattle + dw Route15EndBattleText8 ; TextEndBattle + dw Route15EndBattleText8 ; TextEndBattle + +Route15TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_8, 1 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 - -Route15TrainerHeader9: ; 5984b (16:584b) - db $a ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_8, 1 + dw Route15BattleText9 ; TextBeforeBattle + dw Route15AfterBattleText9 ; TextAfterBattle + dw Route15EndBattleText9 ; TextEndBattle + dw Route15EndBattleText9 ; TextEndBattle + +Route15TrainerHeader9: + dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_9, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_9, 1 + dw Route15BattleText10 ; TextBeforeBattle + dw Route15AfterBattleText10 ; TextAfterBattle + dw Route15EndBattleText10 ; TextEndBattle + dw Route15EndBattleText10 ; TextEndBattle db $ff -Route15Text1: ; 59858 (16:5858) - db $8 ; asm +Route15Text1: + TX_ASM ld hl, Route15TrainerHeader0 - jr asm_33cb7 ; 0x5985c $34 + jr Route15TalkToTrainer -Route15Text2: ; 5985e (16:585e) - db $8 ; asm +Route15Text2: + TX_ASM ld hl, Route15TrainerHeader1 - jr asm_33cb7 ; 0x59862 $2e + jr Route15TalkToTrainer -Route15Text3: ; 59864 (16:5864) - db $8 ; asm +Route15Text3: + TX_ASM ld hl, Route15TrainerHeader2 - jr asm_33cb7 ; 0x59868 $28 + jr Route15TalkToTrainer -Route15Text4: ; 5986a (16:586a) - db $8 ; asm +Route15Text4: + TX_ASM ld hl, Route15TrainerHeader3 - jr asm_33cb7 ; 0x5986e $22 + jr Route15TalkToTrainer -Route15Text5: ; 59870 (16:5870) - db $8 ; asm +Route15Text5: + TX_ASM ld hl, Route15TrainerHeader4 - jr asm_33cb7 ; 0x59874 $1c + jr Route15TalkToTrainer -Route15Text6: ; 59876 (16:5876) - db $8 ; asm +Route15Text6: + TX_ASM ld hl, Route15TrainerHeader5 - jr asm_33cb7 ; 0x5987a $16 + jr Route15TalkToTrainer -Route15Text7: ; 5987c (16:587c) - db $8 ; asm +Route15Text7: + TX_ASM ld hl, Route15TrainerHeader6 - jr asm_33cb7 ; 0x59880 $10 + jr Route15TalkToTrainer -Route15Text8: ; 59882 (16:5882) - db $8 ; asm +Route15Text8: + TX_ASM ld hl, Route15TrainerHeader7 - jr asm_33cb7 ; 0x59886 $a + jr Route15TalkToTrainer -Route15Text9: ; 59888 (16:5888) - db $8 ; asm +Route15Text9: + TX_ASM ld hl, Route15TrainerHeader8 - jr asm_33cb7 ; 0x5988c $4 + jr Route15TalkToTrainer -Route15Text10: ; 5988e (16:588e) - db $8 ; asm +Route15Text10: + TX_ASM ld hl, Route15TrainerHeader9 -asm_33cb7: ; 59892 (16:5892) +Route15TalkToTrainer: call TalkToTrainer jp TextScriptEnd -Route15BattleText1: ; 59898 (16:5898) +Route15BattleText1: TX_FAR _Route15BattleText1 db "@" -Route15EndBattleText1: ; 5989d (16:589d) +Route15EndBattleText1: TX_FAR _Route15EndBattleText1 db "@" -Route15AfterBattleText1: ; 598a2 (16:58a2) +Route15AfterBattleText1: TX_FAR _Route15AfterBattleText1 db "@" -Route15BattleText2: ; 598a7 (16:58a7) +Route15BattleText2: TX_FAR _Route15BattleText2 db "@" -Route15EndBattleText2: ; 598ac (16:58ac) +Route15EndBattleText2: TX_FAR _Route15EndBattleText2 db "@" -Route15AfterBattleText2: ; 598b1 (16:58b1) +Route15AfterBattleText2: TX_FAR _Route15AfterBattleText2 db "@" -Route15BattleText3: ; 598b6 (16:58b6) +Route15BattleText3: TX_FAR _Route15BattleText3 db "@" -Route15EndBattleText3: ; 598bb (16:58bb) +Route15EndBattleText3: TX_FAR _Route15EndBattleText3 db "@" -Route15AfterBattleText3: ; 598c0 (16:58c0) +Route15AfterBattleText3: TX_FAR _Route15AfterBattleText3 db "@" -Route15BattleText4: ; 598c5 (16:58c5) +Route15BattleText4: TX_FAR _Route15BattleText4 db "@" -Route15EndBattleText4: ; 598ca (16:58ca) +Route15EndBattleText4: TX_FAR _Route15EndBattleText4 db "@" -Route15AfterBattleText4: ; 598cf (16:58cf) +Route15AfterBattleText4: TX_FAR _Route15AfterBattleText4 db "@" -Route15BattleText5: ; 598d4 (16:58d4) +Route15BattleText5: TX_FAR _Route15BattleText5 db "@" -Route15EndBattleText5: ; 598d9 (16:58d9) +Route15EndBattleText5: TX_FAR _Route15EndBattleText5 db "@" -Route15AfterBattleText5: ; 598de (16:58de) +Route15AfterBattleText5: TX_FAR _Route15AfterBattleText5 db "@" -Route15BattleText6: ; 598e3 (16:58e3) +Route15BattleText6: TX_FAR _Route15BattleText6 db "@" -Route15EndBattleText6: ; 598e8 (16:58e8) +Route15EndBattleText6: TX_FAR _Route15EndBattleText6 db "@" -Route15AfterBattleText6: ; 598ed (16:58ed) +Route15AfterBattleText6: TX_FAR _Route15AfterBattleText6 db "@" -Route15BattleText7: ; 598f2 (16:58f2) +Route15BattleText7: TX_FAR _Route15BattleText7 db "@" -Route15EndBattleText7: ; 598f7 (16:58f7) +Route15EndBattleText7: TX_FAR _Route15EndBattleText7 db "@" -Route15AfterBattleText7: ; 598fc (16:58fc) +Route15AfterBattleText7: TX_FAR _Route15AfterBattleText7 db "@" -Route15BattleText8: ; 59901 (16:5901) +Route15BattleText8: TX_FAR _Route15BattleText8 db "@" -Route15EndBattleText8: ; 59906 (16:5906) +Route15EndBattleText8: TX_FAR _Route15EndBattleText8 db "@" -Route15AfterBattleText8: ; 5990b (16:590b) +Route15AfterBattleText8: TX_FAR _Route15AfterBattleText8 db "@" -Route15BattleText9: ; 59910 (16:5910) +Route15BattleText9: TX_FAR _Route15BattleText9 db "@" -Route15EndBattleText9: ; 59915 (16:5915) +Route15EndBattleText9: TX_FAR _Route15EndBattleText9 db "@" -Route15AfterBattleText9: ; 5991a (16:591a) +Route15AfterBattleText9: TX_FAR _Route15AfterBattleText9 db "@" -Route15BattleText10: ; 5991f (16:591f) +Route15BattleText10: TX_FAR _Route15BattleText10 db "@" -Route15EndBattleText10: ; 59924 (16:5924) +Route15EndBattleText10: TX_FAR _Route15EndBattleText10 db "@" -Route15AfterBattleText10: ; 59929 (16:5929) +Route15AfterBattleText10: TX_FAR _Route15AfterBattleText10 db "@" -Route15Text12: ; 5992e (16:592e) +Route15Text12: TX_FAR _Route15Text12 db "@" diff --git a/scripts/route15gate.asm b/scripts/route15gate.asm index 76e9aadf..40db02dd 100755 --- a/scripts/route15gate.asm +++ b/scripts/route15gate.asm @@ -1,9 +1,9 @@ -Route15GateScript: ; 49602 (12:5602) +Route15GateScript: jp EnableAutoTextBoxDrawing -Route15GateTextPointers: ; 49605 (12:5605) +Route15GateTextPointers: dw Route15GateText1 -Route15GateText1: ; 49607 (12:5607) +Route15GateText1: TX_FAR _Route15GateText1 db "@" diff --git a/scripts/route15gateupstairs.asm b/scripts/route15gateupstairs.asm index 2d328122..c7f6a2ad 100755 --- a/scripts/route15gateupstairs.asm +++ b/scripts/route15gateupstairs.asm @@ -1,46 +1,44 @@ -Route15GateUpstairsScript: ; 4964a (12:564a) +Route15GateUpstairsScript: jp DisableAutoTextBoxDrawing -Route15GateUpstairsTextPointers: ; 4964d (12:564d) +Route15GateUpstairsTextPointers: dw Route15GateUpstairsText1 dw Route15GateUpstairsText2 -Route15GateUpstairsText1: ; 49651 (12:5651) - db $8 - ld a, [wd7dd] - bit 0, a - jr nz, .asm_49683 ; 0x49657 $2a +Route15GateUpstairsText1: + TX_ASM + CheckEvent EVENT_GOT_EXP_ALL + jr nz, .asm_49683 ld a, 50 ; pokemon needed - ld [$ffdb], a - ld a, EXP__ALL ; oak's aide reward - ld [$ffdc], a + ld [hOaksAideRequirement], a + ld a, EXP_ALL ; oak's aide reward + ld [hOaksAideRewardItem], a ld [wd11e], a call GetItemName ld hl, wcd6d - ld de, wcc5b - ld bc, $000d + ld de, wOaksAideRewardItemName + ld bc, ITEM_NAME_LENGTH call CopyData - predef OaksAideScript ; call oak's aide script - ld a, [$ffdb] + predef OaksAideScript + ld a, [hOaksAideResult] cp $1 - jr nz, .asm_49689 ; 0x4967c $b - ld hl, wd7dd - set 0, [hl] + jr nz, .asm_49689 + SetEvent EVENT_GOT_EXP_ALL .asm_49683 ld hl, Route15GateUpstairsText_4968c call PrintText .asm_49689 jp TextScriptEnd -Route15GateUpstairsText_4968c: ; 4968c (12:568c) +Route15GateUpstairsText_4968c: TX_FAR _Route15GateUpstairsText_4968c db "@" -Route15GateUpstairsText2: ; 49691 (12:5691) - db $8 +Route15GateUpstairsText2: + TX_ASM ld hl, Route15GateUpstairsText_49698 - jp Route12GateUpstairsScript_495c9 + jp GateUpstairsScript_PrintIfFacingUp -Route15GateUpstairsText_49698: ; 49698 (12:5698) +Route15GateUpstairsText_49698: TX_FAR _Route15GateUpstairsText_49698 db "@" diff --git a/scripts/route16.asm b/scripts/route16.asm index ef5b5859..20431608 100755 --- a/scripts/route16.asm +++ b/scripts/route16.asm @@ -1,50 +1,49 @@ -Route16Script: ; 59933 (16:5933) +Route16Script: call EnableAutoTextBoxDrawing - ld hl, Route16TrainerHeaders + ld hl, Route16TrainerHeader0 ld de, Route16ScriptPointers - ld a, [W_ROUTE16CURSCRIPT] + ld a, [wRoute16CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE16CURSCRIPT], a + ld [wRoute16CurScript], a ret -Route16Script_59946: ; 59946 (16:5946) +Route16Script_59946: xor a ld [wJoyIgnore], a - ld [W_ROUTE16CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute16CurScript], a + ld [wCurMapScript], a ret -Route16ScriptPointers: ; 59951 (16:5951) +Route16ScriptPointers: dw Route16Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw Route16Script3 -Route16Script0: ; 59959 (16:5959) - ld hl, wd7e0 - bit 1, [hl] +Route16Script0: + CheckEventHL EVENT_BEAT_ROUTE16_SNORLAX jp nz, CheckFightingMapTrainers - bit 0, [hl] - res 0, [hl] + CheckEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX + ResetEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX jp z, CheckFightingMapTrainers ld a, $a - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, SNORLAX - ld [W_CUROPPONENT], a ; wd059 + ld [wCurOpponent], a ld a, 30 - ld [W_CURENEMYLVL], a ; W_CURENEMYLVL + ld [wCurEnemyLVL], a ld a, HS_ROUTE_16_SNORLAX - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject call UpdateSprites ld a, $3 - ld [W_ROUTE16CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute16CurScript], a + ld [wCurMapScript], a ret -Route16Script3: ; 5998f (16:598f) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +Route16Script3: + ld a, [wIsInBattle] cp $ff jp z, Route16Script_59946 call UpdateSprites @@ -52,18 +51,17 @@ Route16Script3: ; 5998f (16:598f) cp $2 jr z, .asm_599a8 ld a, $b - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_599a8 - ld hl, wd7e0 - set 1, [hl] + SetEvent EVENT_BEAT_ROUTE16_SNORLAX call Delay3 ld a, $0 - ld [W_ROUTE16CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute16CurScript], a + ld [wCurMapScript], a ret -Route16TextPointers: ; 599b9 (16:59b9) +Route16TextPointers: dw Route16Text1 dw Route16Text2 dw Route16Text3 @@ -76,187 +74,186 @@ Route16TextPointers: ; 599b9 (16:59b9) dw Route16Text10 dw Route16Text11 -Route16TrainerHeaders: ; 599cf (16:59cf) -Route16TrainerHeader0: ; 599cf (16:59cf) - db $1 ; flag's bit +Route16TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_0 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 - -Route16TrainerHeader1: ; 599db (16:59db) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_0 + dw Route16BattleText1 ; TextBeforeBattle + dw Route16AfterBattleText1 ; TextAfterBattle + dw Route16EndBattleText1 ; TextEndBattle + dw Route16EndBattleText1 ; TextEndBattle + +Route16TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_1 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 - -Route16TrainerHeader2: ; 599e7 (16:59e7) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_1 + dw Route16BattleText2 ; TextBeforeBattle + dw Route16AfterBattleText2 ; TextAfterBattle + dw Route16EndBattleText2 ; TextEndBattle + dw Route16EndBattleText2 ; TextEndBattle + +Route16TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_2 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 - -Route16TrainerHeader3: ; 599f3 (16:59f3) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_2 + dw Route16BattleText3 ; TextBeforeBattle + dw Route16AfterBattleText3 ; TextAfterBattle + dw Route16EndBattleText3 ; TextEndBattle + dw Route16EndBattleText3 ; TextEndBattle + +Route16TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_3 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 - -Route16TrainerHeader4: ; 599ff (16:59ff) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_3 + dw Route16BattleText4 ; TextBeforeBattle + dw Route16AfterBattleText4 ; TextAfterBattle + dw Route16EndBattleText4 ; TextEndBattle + dw Route16EndBattleText4 ; TextEndBattle + +Route16TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_4 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 - -Route16TrainerHeader5: ; 59a0b (16:5a0b) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_4 + dw Route16BattleText5 ; TextBeforeBattle + dw Route16AfterBattleText5 ; TextAfterBattle + dw Route16EndBattleText5 ; TextEndBattle + dw Route16EndBattleText5 ; TextEndBattle + +Route16TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_5 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_5 + dw Route16BattleText6 ; TextBeforeBattle + dw Route16AfterBattleText6 ; TextAfterBattle + dw Route16EndBattleText6 ; TextEndBattle + dw Route16EndBattleText6 ; TextEndBattle db $ff -Route16Text1: ; 59a18 (16:5a18) - db $08 ; asm +Route16Text1: + TX_ASM ld hl, Route16TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route16BattleText1: ; 59a22 (16:5a22) +Route16BattleText1: TX_FAR _Route16BattleText1 db "@" -Route16EndBattleText1: ; 59a27 (16:5a27) +Route16EndBattleText1: TX_FAR _Route16EndBattleText1 db "@" -Route16AfterBattleText1: ; 59a2c (16:5a2c) +Route16AfterBattleText1: TX_FAR _Route16AfterBattleText1 db "@" -Route16Text2: ; 59a31 (16:5a31) - db $08 ; asm +Route16Text2: + TX_ASM ld hl, Route16TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route16BattleText2: ; 59a3b (16:5a3b) +Route16BattleText2: TX_FAR _Route16BattleText2 db "@" -Route16EndBattleText2: ; 59a40 (16:5a40) +Route16EndBattleText2: TX_FAR _Route16EndBattleText2 db "@" -Route16AfterBattleText2: ; 59a45 (16:5a45) +Route16AfterBattleText2: TX_FAR _Route16AfterBattleText2 db "@" -Route16Text3: ; 59a4a (16:5a4a) - db $08 ; asm +Route16Text3: + TX_ASM ld hl, Route16TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route16BattleText3: ; 59a54 (16:5a54) +Route16BattleText3: TX_FAR _Route16BattleText3 db "@" -Route16EndBattleText3: ; 59a59 (16:5a59) +Route16EndBattleText3: TX_FAR _Route16EndBattleText3 db "@" -Route16AfterBattleText3: ; 59a5e (16:5a5e) +Route16AfterBattleText3: TX_FAR _Route16AfterBattleText3 db "@" -Route16Text4: ; 59a63 (16:5a63) - db $08 ; asm +Route16Text4: + TX_ASM ld hl, Route16TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route16BattleText4: ; 59a6d (16:5a6d) +Route16BattleText4: TX_FAR _Route16BattleText4 db "@" -Route16EndBattleText4: ; 59a72 (16:5a72) +Route16EndBattleText4: TX_FAR _Route16EndBattleText4 db "@" -Route16AfterBattleText4: ; 59a77 (16:5a77) +Route16AfterBattleText4: TX_FAR _Route16AfterBattleText4 db "@" -Route16Text5: ; 59a7c (16:5a7c) - db $08 ; asm +Route16Text5: + TX_ASM ld hl, Route16TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route16BattleText5: ; 59a86 (16:5a86) +Route16BattleText5: TX_FAR _Route16BattleText5 db "@" -Route16EndBattleText5: ; 59a8b (16:5a8b) +Route16EndBattleText5: TX_FAR _Route16EndBattleText5 db "@" -Route16AfterBattleText5: ; 59a90 (16:5a90) +Route16AfterBattleText5: TX_FAR _Route16AfterBattleText5 db "@" -Route16Text6: ; 59a95 (16:5a95) - db $08 ; asm +Route16Text6: + TX_ASM ld hl, Route16TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route16BattleText6: ; 59a9f (16:5a9f) +Route16BattleText6: TX_FAR _Route16BattleText6 db "@" -Route16EndBattleText6: ; 59aa4 (16:5aa4) +Route16EndBattleText6: TX_FAR _Route16EndBattleText6 db "@" -Route16AfterBattleText6: ; 59aa9 (16:5aa9) +Route16AfterBattleText6: TX_FAR _Route16AfterBattleText6 db "@" -Route16Text7: ; 59aae (16:5aae) +Route16Text7: TX_FAR _Route16Text7 db "@" -Route16Text10: ; 59ab3 (16:5ab3) +Route16Text10: TX_FAR _Route16Text10 db "@" -Route16Text11: ; 59ab8 (16:5ab8) +Route16Text11: TX_FAR _Route16Text11 db "@" -Route16Text8: ; 59abd (16:5abd) +Route16Text8: TX_FAR _Route16Text8 db "@" -Route16Text9: ; 59ac2 (16:5ac2) +Route16Text9: TX_FAR _Route16Text9 db "@" diff --git a/scripts/route16gate.asm b/scripts/route16gate.asm index 54bca413..e20ba6f7 100755 --- a/scripts/route16gate.asm +++ b/scripts/route16gate.asm @@ -1,76 +1,76 @@ -Route16GateScript: ; 496be (12:56be) +Route16GateScript: ld hl, wd732 res 5, [hl] call EnableAutoTextBoxDrawing - ld a, [W_ROUTE16GATECURSCRIPT] + ld a, [wRoute16GateCurScript] ld hl, Route16GateScriptPointers jp CallFunctionInTable -Route16GateScriptPointers: ; 496cf (12:56cf) +Route16GateScriptPointers: dw Route16GateScript0 dw Route16GateScript1 dw Route16GateScript2 dw Route16GateScript3 -Route16GateScript0: ; 496d7 (12:56d7) +Route16GateScript0: call Route16GateScript_49755 ret nz ld hl, CoordsData_49714 call ArePlayerCoordsInArray ret nc ld a, $3 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [hJoyHeld], a - ld a, [wWhichTrade] + ld a, [wCoordIndex] cp $1 - jr z, .asm_4970e ; 0x496f1 $1b - ld a, [wWhichTrade] + jr z, .asm_4970e + ld a, [wCoordIndex] dec a ld [wSimulatedJoypadStatesIndex], a ld b, $0 ld c, a - ld a, $40 + ld a, D_UP ld hl, wSimulatedJoypadStatesEnd call FillMemory call StartSimulatingJoypadStates ld a, $1 - ld [W_ROUTE16GATECURSCRIPT], a + ld [wRoute16GateCurScript], a ret .asm_4970e ld a, $2 - ld [W_ROUTE16GATECURSCRIPT], a + ld [wRoute16GateCurScript], a ret -CoordsData_49714: ; 49714 (12:5714) +CoordsData_49714: db $07,$04 db $08,$04 db $09,$04 db $0A,$04 db $FF -Route16GateScript1: ; 4971d (12:571d) +Route16GateScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $f0 ld [wJoyIgnore], a -Route16GateScript2: ; 49727 (12:5727) +Route16GateScript2: ld a, $1 - ld [H_SPRITEHEIGHT], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a - ld a, $10 + ld a, D_RIGHT ld [wSimulatedJoypadStatesEnd], a call StartSimulatingJoypadStates ld a, $3 - ld [W_ROUTE16GATECURSCRIPT], a + ld [wRoute16GateCurScript], a ret -Route16GateScript3: ; 49741 (12:5741) +Route16GateScript3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz @@ -79,43 +79,43 @@ Route16GateScript3: ; 49741 (12:5741) ld hl, wd730 res 7, [hl] ld a, $0 - ld [W_ROUTE16GATECURSCRIPT], a + ld [wRoute16GateCurScript], a ret -Route16GateScript_49755: ; 49755 (12:5755) +Route16GateScript_49755: ld b, BICYCLE jp IsItemInBag -Route16GateTextPointers: ; 4975a (12:575a) +Route16GateTextPointers: dw Route16GateText1 dw Route16GateText2 dw Route16GateText3 -Route16GateText1: ; 49760 (12:5760) - db $08 ; asm +Route16GateText1: + 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) +Route16GateText_49777: TX_FAR _Route16GateText_49777 db "@" -Route16GateText_4977c: ; 4977c (12:577c) +Route16GateText_4977c: TX_FAR _Route16GateText_4977c db "@" -Route16GateText3: ; 49781 (12:5781) +Route16GateText3: TX_FAR _Route16GateText_49781 db "@" -Route16GateText2: ; 49786 (12:5786) +Route16GateText2: TX_FAR _Route16GateText2 db "@" diff --git a/scripts/route16gateupstairs.asm b/scripts/route16gateupstairs.asm index c9996dcd..664976a2 100755 --- a/scripts/route16gateupstairs.asm +++ b/scripts/route16gateupstairs.asm @@ -1,46 +1,46 @@ -Route16GateUpstairsScript: ; 4980b (12:580b) +Route16GateUpstairsScript: jp DisableAutoTextBoxDrawing -Route16GateUpstairsTextPointers: ; 4980e (12:580e) +Route16GateUpstairsTextPointers: dw Route16GateUpstairsText1 dw Route16GateUpstairsText2 dw Route16GateUpstairsText3 dw Route16GateUpstairsText4 -Route16GateUpstairsText1: ; 49816 (12:5816) - db $08 ; asm +Route16GateUpstairsText1: + TX_ASM ld hl, Route16GateUpstairsText_49820 call PrintText jp TextScriptEnd -Route16GateUpstairsText_49820: ; 49820 (12:5820) +Route16GateUpstairsText_49820: TX_FAR _Route16GateUpstairsText_49820 db "@" -Route16GateUpstairsText2: ; 49825 (12:5825) - db $08 ; asm +Route16GateUpstairsText2: + TX_ASM ld hl, Route16GateUpstairsText_4982f call PrintText jp TextScriptEnd -Route16GateUpstairsText_4982f: ; 4982f (12:582f) +Route16GateUpstairsText_4982f: TX_FAR _Route16GateUpstairsText_4982f db "@" -Route16GateUpstairsText3: ; 49834 (12:5834) - db $8 +Route16GateUpstairsText3: + TX_ASM ld hl, Route16GateUpstairsText_4983b - jp Route12GateUpstairsScript_495c9 + jp GateUpstairsScript_PrintIfFacingUp -Route16GateUpstairsText_4983b: ; 4983b (12:583b) +Route16GateUpstairsText_4983b: TX_FAR _Route16GateUpstairsText_4983b db "@" -Route16GateUpstairsText4: ; 49840 (12:5840) - db $8 - ld hl, Route16GateUpstairsText_49847 ; $5847 - jp Route12GateUpstairsScript_495c9 +Route16GateUpstairsText4: + TX_ASM + ld hl, Route16GateUpstairsText_49847 + jp GateUpstairsScript_PrintIfFacingUp -Route16GateUpstairsText_49847: ; 49847 (12:5847) +Route16GateUpstairsText_49847: TX_FAR _Route16GateUpstairsText_49847 db "@" diff --git a/scripts/route16house.asm b/scripts/route16house.asm index 9a189757..5359248c 100755 --- a/scripts/route16house.asm +++ b/scripts/route16house.asm @@ -1,49 +1,48 @@ -Route16HouseScript: ; 1e5f8 (7:65f8) +Route16HouseScript: jp EnableAutoTextBoxDrawing -Route16HouseTextPointers: ; 1e5fb (7:65fb) +Route16HouseTextPointers: dw Route16HouseText1 dw Route16HouseText2 -Route16HouseText1: ; 1e5ff (7:65ff) - db $08 ; asm - ld a, [wd7e0] - bit 6, a +Route16HouseText1: + TX_ASM + CheckEvent EVENT_GOT_HM02 ld hl, HM02ExplanationText - jr nz, .asm_13616 ; 0x1e608 + jr nz, .asm_13616 ld hl, Route16HouseText3 call PrintText - ld bc, (HM_02 << 8) | 1 + lb bc, HM_02, 1 call GiveItem jr nc, .BagFull - ld hl, wd7e0 - set 6, [hl] + SetEvent EVENT_GOT_HM02 ld hl, ReceivedHM02Text - jr .asm_13616 ; 0x1e620 + jr .asm_13616 .BagFull ld hl, HM02NoRoomText -.asm_13616 ; 0x1e625 +.asm_13616 call PrintText jp TextScriptEnd -Route16HouseText3: ; 1e62b (7:662b) +Route16HouseText3: TX_FAR _Route16HouseText3 db "@" -ReceivedHM02Text: ; 1e630 (7:6630) +ReceivedHM02Text: TX_FAR _ReceivedHM02Text - db $11, "@" + TX_SFX_KEY_ITEM + db "@" -HM02ExplanationText: ; 1e636 (7:6636) +HM02ExplanationText: TX_FAR _HM02ExplanationText db "@" -HM02NoRoomText: ; 1e63b (7:663b) +HM02NoRoomText: TX_FAR _HM02NoRoomText db "@" -Route16HouseText2: ; 1e640 (7:6640) - db $08 ; asm +Route16HouseText2: + TX_ASM ld hl, Route16HouseText_1e652 call PrintText ld a, FEAROW @@ -51,6 +50,6 @@ Route16HouseText2: ; 1e640 (7:6640) call WaitForSoundToFinish jp TextScriptEnd -Route16HouseText_1e652: ; 1e652 (7:6652) +Route16HouseText_1e652: TX_FAR _Route16HouseText_1e652 db "@" diff --git a/scripts/route17.asm b/scripts/route17.asm index ffd00634..fb9f4cd8 100755 --- a/scripts/route17.asm +++ b/scripts/route17.asm @@ -1,18 +1,18 @@ -Route17Script: ; 55b7a (15:5b7a) +Route17Script: call EnableAutoTextBoxDrawing - ld hl, Route17TrainerHeaders + ld hl, Route17TrainerHeader0 ld de, Route17ScriptPointers - ld a, [W_ROUTE17CURSCRIPT] + ld a, [wRoute17CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE17CURSCRIPT], a + ld [wRoute17CurScript], a ret -Route17ScriptPointers: ; 55b8d (15:5b8d) +Route17ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route17TextPointers: ; 55b93 (15:5b93) +Route17TextPointers: dw Route17Text1 dw Route17Text2 dw Route17Text3 @@ -30,299 +30,298 @@ Route17TextPointers: ; 55b93 (15:5b93) dw Route17Text15 dw Route17Text16 -Route17TrainerHeaders: ; 55bb3 (15:5bb3) -Route17TrainerHeader0: ; 55bb3 (15:5bb3) - db $1 ; flag's bit +Route17TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_0 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 - -Route17TrainerHeader1: ; 55bbf (15:5bbf) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_0 + dw Route17BattleText1 ; TextBeforeBattle + dw Route17AfterBattleText1 ; TextAfterBattle + dw Route17EndBattleText1 ; TextEndBattle + dw Route17EndBattleText1 ; TextEndBattle + +Route17TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_1 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 - -Route17TrainerHeader2: ; 55bcb (15:5bcb) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_1 + dw Route17BattleText2 ; TextBeforeBattle + dw Route17AfterBattleText2 ; TextAfterBattle + dw Route17EndBattleText2 ; TextEndBattle + dw Route17EndBattleText2 ; TextEndBattle + +Route17TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_2 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 - -Route17TrainerHeader3: ; 55bd7 (15:5bd7) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_2 + dw Route17BattleText3 ; TextBeforeBattle + dw Route17AfterBattleText3 ; TextAfterBattle + dw Route17EndBattleText3 ; TextEndBattle + dw Route17EndBattleText3 ; TextEndBattle + +Route17TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_3 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 - -Route17TrainerHeader4: ; 55be3 (15:5be3) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_3 + dw Route17BattleText4 ; TextBeforeBattle + dw Route17AfterBattleText4 ; TextAfterBattle + dw Route17EndBattleText4 ; TextEndBattle + dw Route17EndBattleText4 ; TextEndBattle + +Route17TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_4 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 - -Route17TrainerHeader5: ; 55bef (15:5bef) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_4 + dw Route17BattleText5 ; TextBeforeBattle + dw Route17AfterBattleText5 ; TextAfterBattle + dw Route17EndBattleText5 ; TextEndBattle + dw Route17EndBattleText5 ; TextEndBattle + +Route17TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_5 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 - -Route17TrainerHeader6: ; 55bfb (15:5bfb) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_5 + dw Route17BattleText6 ; TextBeforeBattle + dw Route17AfterBattleText6 ; TextAfterBattle + dw Route17EndBattleText6 ; TextEndBattle + dw Route17EndBattleText6 ; TextEndBattle + +Route17TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_6 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 - -Route17TrainerHeader7: ; 55c07 (15:5c07) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_6 + dw Route17BattleText7 ; TextBeforeBattle + dw Route17AfterBattleText7 ; TextAfterBattle + dw Route17EndBattleText7 ; TextEndBattle + dw Route17EndBattleText7 ; TextEndBattle + +Route17TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_7, 1 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 - -Route17TrainerHeader8: ; 55c13 (15:5c13) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_7, 1 + dw Route17BattleText8 ; TextBeforeBattle + dw Route17AfterBattleText8 ; TextAfterBattle + dw Route17EndBattleText8 ; TextEndBattle + dw Route17EndBattleText8 ; TextEndBattle + +Route17TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_8, 1 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 - -Route17TrainerHeader9: ; 55c1f (15:5c1f) - db $a ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_8, 1 + dw Route17BattleText9 ; TextBeforeBattle + dw Route17AfterBattleText9 ; TextAfterBattle + dw Route17EndBattleText9 ; TextEndBattle + dw Route17EndBattleText9 ; TextEndBattle + +Route17TrainerHeader9: + dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_9, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_9, 1 + dw Route17BattleText10 ; TextBeforeBattle + dw Route17AfterBattleText10 ; TextAfterBattle + dw Route17EndBattleText10 ; TextEndBattle + dw Route17EndBattleText10 ; TextEndBattle db $ff -Route17Text1: ; 55c2c (15:5c2c) - db $08 ; asm +Route17Text1: + TX_ASM ld hl, Route17TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route17BattleText1: ; 55c36 (15:5c36) +Route17BattleText1: TX_FAR _Route17BattleText1 db "@" -Route17EndBattleText1: ; 55c3b (15:5c3b) +Route17EndBattleText1: TX_FAR _Route17EndBattleText1 db "@" -Route17AfterBattleText1: ; 55c40 (15:5c40) +Route17AfterBattleText1: TX_FAR _Route17AfterBattleText1 db "@" -Route17Text2: ; 55c45 (15:5c45) - db $08 ; asm +Route17Text2: + TX_ASM ld hl, Route17TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route17BattleText2: ; 55c4f (15:5c4f) +Route17BattleText2: TX_FAR _Route17BattleText2 db "@" -Route17EndBattleText2: ; 55c54 (15:5c54) +Route17EndBattleText2: TX_FAR _Route17EndBattleText2 db "@" -Route17AfterBattleText2: ; 55c59 (15:5c59) +Route17AfterBattleText2: TX_FAR _Route17AfterBattleText2 db "@" -Route17Text3: ; 55c5e (15:5c5e) - db $08 ; asm +Route17Text3: + TX_ASM ld hl, Route17TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route17BattleText3: ; 55c68 (15:5c68) +Route17BattleText3: TX_FAR _Route17BattleText3 db "@" -Route17EndBattleText3: ; 55c6d (15:5c6d) +Route17EndBattleText3: TX_FAR _Route17EndBattleText3 db "@" -Route17AfterBattleText3: ; 55c72 (15:5c72) +Route17AfterBattleText3: TX_FAR _Route17AfterBattleText3 db "@" -Route17Text4: ; 55c77 (15:5c77) - db $08 ; asm +Route17Text4: + TX_ASM ld hl, Route17TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route17BattleText4: ; 55c81 (15:5c81) +Route17BattleText4: TX_FAR _Route17BattleText4 db "@" -Route17EndBattleText4: ; 55c86 (15:5c86) +Route17EndBattleText4: TX_FAR _Route17EndBattleText4 db "@" -Route17AfterBattleText4: ; 55c8b (15:5c8b) +Route17AfterBattleText4: TX_FAR _Route17AfterBattleText4 db "@" -Route17Text5: ; 55c90 (15:5c90) - db $08 ; asm +Route17Text5: + TX_ASM ld hl, Route17TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route17BattleText5: ; 55c9a (15:5c9a) +Route17BattleText5: TX_FAR _Route17BattleText5 db "@" -Route17EndBattleText5: ; 55c9f (15:5c9f) +Route17EndBattleText5: TX_FAR _Route17EndBattleText5 db "@" -Route17AfterBattleText5: ; 55ca4 (15:5ca4) +Route17AfterBattleText5: TX_FAR _Route17AfterBattleText5 db "@" -Route17Text6: ; 55ca9 (15:5ca9) - db $08 ; asm +Route17Text6: + TX_ASM ld hl, Route17TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route17BattleText6: ; 55cb3 (15:5cb3) +Route17BattleText6: TX_FAR _Route17BattleText6 db "@" -Route17EndBattleText6: ; 55cb8 (15:5cb8) +Route17EndBattleText6: TX_FAR _Route17EndBattleText6 db "@" -Route17AfterBattleText6: ; 55cbd (15:5cbd) +Route17AfterBattleText6: TX_FAR _Route17AfterBattleText6 db "@" -Route17Text7: ; 55cc2 (15:5cc2) - db $08 ; asm +Route17Text7: + TX_ASM ld hl, Route17TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route17BattleText7: ; 55ccc (15:5ccc) +Route17BattleText7: TX_FAR _Route17BattleText7 db "@" -Route17EndBattleText7: ; 55cd1 (15:5cd1) +Route17EndBattleText7: TX_FAR _Route17EndBattleText7 db "@" -Route17AfterBattleText7: ; 55cd6 (15:5cd6) +Route17AfterBattleText7: TX_FAR _Route17AfterBattleText7 db "@" -Route17Text8: ; 55cdb (15:5cdb) - db $08 ; asm +Route17Text8: + TX_ASM ld hl, Route17TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route17BattleText8: ; 55ce5 (15:5ce5) +Route17BattleText8: TX_FAR _Route17BattleText8 db "@" -Route17EndBattleText8: ; 55cea (15:5cea) +Route17EndBattleText8: TX_FAR _Route17EndBattleText8 db "@" -Route17AfterBattleText8: ; 55cef (15:5cef) +Route17AfterBattleText8: TX_FAR _Route17AfterBattleText8 db "@" -Route17Text9: ; 55cf4 (15:5cf4) - db $08 ; asm +Route17Text9: + TX_ASM ld hl, Route17TrainerHeader8 call TalkToTrainer jp TextScriptEnd -Route17BattleText9: ; 55cfe (15:5cfe) +Route17BattleText9: TX_FAR _Route17BattleText9 db "@" -Route17EndBattleText9: ; 55d03 (15:5d03) +Route17EndBattleText9: TX_FAR _Route17EndBattleText9 db "@" -Route17AfterBattleText9: ; 55d08 (15:5d08) +Route17AfterBattleText9: TX_FAR _Route17AfterBattleText9 db "@" -Route17Text10: ; 55d0d (15:5d0d) - db $08 ; asm +Route17Text10: + TX_ASM ld hl, Route17TrainerHeader9 call TalkToTrainer jp TextScriptEnd -Route17BattleText10: ; 55d17 (15:5d17) +Route17BattleText10: TX_FAR _Route17BattleText10 db "@" -Route17EndBattleText10: ; 55d1c (15:5d1c) +Route17EndBattleText10: TX_FAR _Route17EndBattleText10 db "@" -Route17AfterBattleText10: ; 55d21 (15:5d21) +Route17AfterBattleText10: TX_FAR _Route17AfterBattleText10 db "@" -Route17Text11: ; 55d26 (15:5d26) +Route17Text11: TX_FAR _Route17Text11 db "@" -Route17Text12: ; 55d2b (15:5d2b) +Route17Text12: TX_FAR _Route17Text12 db "@" -Route17Text13: ; 55d30 (15:5d30) +Route17Text13: TX_FAR _Route17Text13 db "@" -Route17Text14: ; 55d35 (15:5d35) +Route17Text14: TX_FAR _Route17Text14 db "@" -Route17Text15: ; 55d3a (15:5d3a) +Route17Text15: TX_FAR _Route17Text15 db "@" -Route17Text16: ; 55d3f (15:5d3f) +Route17Text16: TX_FAR _Route17Text16 db "@" diff --git a/scripts/route18.asm b/scripts/route18.asm index de2fe19a..687b269c 100755 --- a/scripts/route18.asm +++ b/scripts/route18.asm @@ -1,112 +1,111 @@ -Route18Script: ; 59ac7 (16:5ac7) +Route18Script: call EnableAutoTextBoxDrawing - ld hl, Route18TrainerHeaders + ld hl, Route18TrainerHeader0 ld de, Route18ScriptPointers - ld a, [W_ROUTE18CURSCRIPT] + ld a, [wRoute18CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE18CURSCRIPT], a + ld [wRoute18CurScript], a ret -Route18ScriptPointers: ; 59ada (16:5ada) +Route18ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route18TextPointers: ; 59ae0 (16:5ae0) +Route18TextPointers: dw Route18Text1 dw Route18Text2 dw Route18Text3 dw Route18Text4 dw Route18Text5 -Route18TrainerHeaders: ; 59aea (16:5aea) -Route18TrainerHeader0: ; 59aea (16:5aea) - db $1 ; flag's bit +Route18TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_0 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 - -Route18TrainerHeader1: ; 59af6 (16:5af6) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_0 + dw Route18BattleText1 ; TextBeforeBattle + dw Route18AfterBattleText1 ; TextAfterBattle + dw Route18EndBattleText1 ; TextEndBattle + dw Route18EndBattleText1 ; TextEndBattle + +Route18TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_1 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 - -Route18TrainerHeader2: ; 59b02 (16:5b02) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_1 + dw Route18BattleText2 ; TextBeforeBattle + dw Route18AfterBattleText2 ; TextAfterBattle + dw Route18EndBattleText2 ; TextEndBattle + dw Route18EndBattleText2 ; TextEndBattle + +Route18TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_2 + dw Route18BattleText3 ; TextBeforeBattle + dw Route18AfterBattleText3 ; TextAfterBattle + dw Route18EndBattleText3 ; TextEndBattle + dw Route18EndBattleText3 ; TextEndBattle db $ff -Route18Text1: ; 59b0f (16:5b0f) - db $08 ; asm +Route18Text1: + TX_ASM ld hl, Route18TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route18BattleText1: ; 59b19 (16:5b19) +Route18BattleText1: TX_FAR _Route18BattleText1 db "@" -Route18EndBattleText1: ; 59b1e (16:5b1e) +Route18EndBattleText1: TX_FAR _Route18EndBattleText1 db "@" -Route18AfterBattleText1: ; 59b23 (16:5b23) +Route18AfterBattleText1: TX_FAR _Route18AfterBattleText1 db "@" -Route18Text2: ; 59b28 (16:5b28) - db $08 ; asm +Route18Text2: + TX_ASM ld hl, Route18TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route18BattleText2: ; 59b32 (16:5b32) +Route18BattleText2: TX_FAR _Route18BattleText2 db "@" -Route18EndBattleText2: ; 59b37 (16:5b37) +Route18EndBattleText2: TX_FAR _Route18EndBattleText2 db "@" -Route18AfterBattleText2: ; 59b3c (16:5b3c) +Route18AfterBattleText2: TX_FAR _Route18AfterBattleText2 db "@" -Route18Text3: ; 59b41 (16:5b41) - db $08 ; asm +Route18Text3: + TX_ASM ld hl, Route18TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route18BattleText3: ; 59b4b (16:5b4b) +Route18BattleText3: TX_FAR _Route18BattleText3 db "@" -Route18EndBattleText3: ; 59b50 (16:5b50) +Route18EndBattleText3: TX_FAR _Route18EndBattleText3 db "@" -Route18AfterBattleText3: ; 59b55 (16:5b55) +Route18AfterBattleText3: TX_FAR _Route18AfterBattleText3 db "@" -Route18Text4: ; 59b5a (16:5b5a) +Route18Text4: TX_FAR _Route18Text4 db "@" -Route18Text5: ; 59b5f (16:5b5f) +Route18Text5: TX_FAR _Route18Text5 db "@" diff --git a/scripts/route18gate.asm b/scripts/route18gate.asm index 1500f578..893801a1 100755 --- a/scripts/route18gate.asm +++ b/scripts/route18gate.asm @@ -1,76 +1,76 @@ -Route18GateScript: ; 49876 (12:5876) +Route18GateScript: ld hl, wd732 res 5, [hl] call EnableAutoTextBoxDrawing - ld a, [W_ROUTE18GATECURSCRIPT] + ld a, [wRoute18GateCurScript] ld hl, Route18GateScriptPointers jp CallFunctionInTable -Route18GateScriptPointers: ; 49887 (12:5887) +Route18GateScriptPointers: dw Route18GateScript0 dw Route18GateScript1 dw Route18GateScript2 dw Route18GateScript3 -Route18GateScript0: ; 4988f (12:588f) +Route18GateScript0: call Route16GateScript_49755 ret nz ld hl, CoordsData_498cc call ArePlayerCoordsInArray ret nc ld a, $2 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [hJoyHeld], a - ld a, [wWhichTrade] + ld a, [wCoordIndex] cp $1 - jr z, .asm_498c6 ; 0x498a9 $1b - ld a, [wWhichTrade] + jr z, .asm_498c6 + ld a, [wCoordIndex] dec a ld [wSimulatedJoypadStatesIndex], a - ld b, $0 + ld b, 0 ld c, a - ld a, $40 + ld a, D_UP ld hl, wSimulatedJoypadStatesEnd call FillMemory call StartSimulatingJoypadStates ld a, $1 - ld [W_ROUTE18GATECURSCRIPT], a + ld [wRoute18GateCurScript], a ret .asm_498c6 ld a, $2 - ld [W_ROUTE18GATECURSCRIPT], a + ld [wRoute18GateCurScript], a ret -CoordsData_498cc: ; 498cc (12:58cc) +CoordsData_498cc: db $03,$04 db $04,$04 db $05,$04 db $06,$04 db $FF -Route18GateScript1: ; 498d5 (12:58d5) +Route18GateScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $f0 ld [wJoyIgnore], a -Route18GateScript2: ; 498df (12:58df) +Route18GateScript2: ld a, $1 - ld [H_SPRITEHEIGHT], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a - ld a, $10 + ld a, D_RIGHT ld [wSimulatedJoypadStatesEnd], a call StartSimulatingJoypadStates ld a, $3 - ld [W_ROUTE18GATECURSCRIPT], a + ld [wRoute18GateCurScript], a ret -Route18GateScript3: ; 498f9 (12:58f9) +Route18GateScript3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz @@ -79,34 +79,34 @@ Route18GateScript3: ; 498f9 (12:58f9) ld hl, wd730 res 7, [hl] ld a, $0 - ld [W_ROUTE18GATECURSCRIPT], a + ld [wRoute18GateCurScript], a ret -Route18GateTextPointers: ; 4990d (12:590d) +Route18GateTextPointers: dw Route18GateText1 dw Route18GateText2 -Route18GateText1: ; 49911 (12:5911) - db $08 ; asm +Route18GateText1: + 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) +Route18GateText_49928: TX_FAR _Route18GateText_49928 db "@" -Route18GateText_4992d: ; 4992d (12:592d) +Route18GateText_4992d: TX_FAR _Route18GateText_4992d db "@" -Route18GateText2: ; 49932 (12:5932) +Route18GateText2: TX_FAR _Route18GateText_49932 db "@" diff --git a/scripts/route18gateupstairs.asm b/scripts/route18gateupstairs.asm index aaa1b34e..3d623142 100755 --- a/scripts/route18gateupstairs.asm +++ b/scripts/route18gateupstairs.asm @@ -1,32 +1,32 @@ -Route18GateUpstairsScript: ; 49975 (12:5975) +Route18GateUpstairsScript: jp DisableAutoTextBoxDrawing -Route18GateUpstairsTextPointers: ; 49978 (12:5978) +Route18GateUpstairsTextPointers: dw Route18GateUpstairsText1 dw Route18GateUpstairsText2 dw Route18GateUpstairsText3 -Route18GateUpstairsText1: ; 4997e (12:597e) - db $08 ; asm +Route18GateUpstairsText1: + 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 +Route18GateUpstairsText2: + TX_ASM + ld hl, Route18GateUpstairsText_49993 + jp GateUpstairsScript_PrintIfFacingUp -Route18GateUpstairsText_49993: ; 49993 (12:5993) +Route18GateUpstairsText_49993: TX_FAR _Route18GateUpstairsText_49993 db "@" -Route18GateUpstairsText3: ; 49998 (12:5998) - db $8 - ld hl, Route18GateUpstairsText_4999f ; $599f - jp Route12GateUpstairsScript_495c9 +Route18GateUpstairsText3: + TX_ASM + ld hl, Route18GateUpstairsText_4999f + jp GateUpstairsScript_PrintIfFacingUp -Route18GateUpstairsText_4999f: ; 4999f (12:599f) +Route18GateUpstairsText_4999f: TX_FAR _Route18GateUpstairsText_4999f db "@" diff --git a/scripts/route19.asm b/scripts/route19.asm index 40c7aeb3..01ea5dce 100755 --- a/scripts/route19.asm +++ b/scripts/route19.asm @@ -1,18 +1,18 @@ -Route19Script: ; 55d44 (15:5d44) +Route19Script: call EnableAutoTextBoxDrawing - ld hl, Route19TrainerHeaders + ld hl, Route19TrainerHeader0 ld de, Route19ScriptPointers - ld a, [W_ROUTE19CURSCRIPT] + ld a, [wRoute19CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE19CURSCRIPT], a + ld [wRoute19CurScript], a ret -Route19ScriptPointers: ; 55d57 (15:5d57) +Route19ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route19TextPointers: ; 55d5d (15:5d5d) +Route19TextPointers: dw Route19Text1 dw Route19Text2 dw Route19Text3 @@ -25,279 +25,278 @@ Route19TextPointers: ; 55d5d (15:5d5d) dw Route19Text10 dw Route19Text11 -Route19TrainerHeaders: ; 55d73 (15:5d73) -Route19TrainerHeader0: ; 55d73 (15:5d73) - db $1 ; flag's bit +Route19TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_0 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 - -Route19TrainerHeader1: ; 55d7f (15:5d7f) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_0 + dw Route19BattleText1 ; TextBeforeBattle + dw Route19AfterBattleText1 ; TextAfterBattle + dw Route19EndBattleText1 ; TextEndBattle + dw Route19EndBattleText1 ; TextEndBattle + +Route19TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_1 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 - -Route19TrainerHeader2: ; 55d8b (15:5d8b) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_1 + dw Route19BattleText2 ; TextBeforeBattle + dw Route19AfterBattleText2 ; TextAfterBattle + dw Route19EndBattleText2 ; TextEndBattle + dw Route19EndBattleText2 ; TextEndBattle + +Route19TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_2 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 - -Route19TrainerHeader3: ; 55d97 (15:5d97) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_2 + dw Route19BattleText3 ; TextBeforeBattle + dw Route19AfterBattleText3 ; TextAfterBattle + dw Route19EndBattleText3 ; TextEndBattle + dw Route19EndBattleText3 ; TextEndBattle + +Route19TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_3 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 - -Route19TrainerHeader4: ; 55da3 (15:5da3) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_3 + dw Route19BattleText4 ; TextBeforeBattle + dw Route19AfterBattleText4 ; TextAfterBattle + dw Route19EndBattleText4 ; TextEndBattle + dw Route19EndBattleText4 ; TextEndBattle + +Route19TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_4 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 - -Route19TrainerHeader5: ; 55daf (15:5daf) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_4 + dw Route19BattleText5 ; TextBeforeBattle + dw Route19AfterBattleText5 ; TextAfterBattle + dw Route19EndBattleText5 ; TextEndBattle + dw Route19EndBattleText5 ; TextEndBattle + +Route19TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_5 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 - -Route19TrainerHeader6: ; 55dbb (15:5dbb) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_5 + dw Route19BattleText6 ; TextBeforeBattle + dw Route19AfterBattleText6 ; TextAfterBattle + dw Route19EndBattleText6 ; TextEndBattle + dw Route19EndBattleText6 ; TextEndBattle + +Route19TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_6 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 - -Route19TrainerHeader7: ; 55dc7 (15:5dc7) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_6 + dw Route19BattleText7 ; TextBeforeBattle + dw Route19AfterBattleText7 ; TextAfterBattle + dw Route19EndBattleText7 ; TextEndBattle + dw Route19EndBattleText7 ; TextEndBattle + +Route19TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_7, 1 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 - -Route19TrainerHeader8: ; 55dd3 (15:5dd3) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_7, 1 + dw Route19BattleText8 ; TextBeforeBattle + dw Route19AfterBattleText8 ; TextAfterBattle + dw Route19EndBattleText8 ; TextEndBattle + dw Route19EndBattleText8 ; TextEndBattle + +Route19TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_8, 1 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 - -Route19TrainerHeader9: ; 55ddf (15:5ddf) - db $a ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_8, 1 + dw Route19BattleText9 ; TextBeforeBattle + dw Route19AfterBattleText9 ; TextAfterBattle + dw Route19EndBattleText9 ; TextEndBattle + dw Route19EndBattleText9 ; TextEndBattle + +Route19TrainerHeader9: + dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_9, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_9, 1 + dw Route19BattleText10 ; TextBeforeBattle + dw Route19AfterBattleText10 ; TextAfterBattle + dw Route19EndBattleText10 ; TextEndBattle + dw Route19EndBattleText10 ; TextEndBattle db $ff -Route19Text1: ; 55dec (15:5dec) - db $08 ; asm +Route19Text1: + TX_ASM ld hl, Route19TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route19Text2: ; 55df6 (15:5df6) - db $08 ; asm +Route19Text2: + TX_ASM ld hl, Route19TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route19Text3: ; 55e00 (15:5e00) - db $08 ; asm +Route19Text3: + TX_ASM ld hl, Route19TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route19Text4: ; 55e0a (15:5e0a) - db $08 ; asm +Route19Text4: + TX_ASM ld hl, Route19TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route19Text5: ; 55e14 (15:5e14) - db $08 ; asm +Route19Text5: + TX_ASM ld hl, Route19TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route19Text6: ; 55e1e (15:5e1e) - db $08 ; asm +Route19Text6: + TX_ASM ld hl, Route19TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route19Text7: ; 55e28 (15:5e28) - db $08 ; asm +Route19Text7: + TX_ASM ld hl, Route19TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route19Text8: ; 55e32 (15:5e32) - db $08 ; asm +Route19Text8: + TX_ASM ld hl, Route19TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route19Text9: ; 55e3c (15:5e3c) - db $08 ; asm +Route19Text9: + TX_ASM ld hl, Route19TrainerHeader8 call TalkToTrainer jp TextScriptEnd -Route19Text10: ; 55e46 (15:5e46) - db $08 ; asm +Route19Text10: + TX_ASM ld hl, Route19TrainerHeader9 call TalkToTrainer jp TextScriptEnd -Route19BattleText1: ; 55e50 (15:5e50) +Route19BattleText1: TX_FAR _Route19BattleText1 db "@" -Route19EndBattleText1: ; 55e55 (15:5e55) +Route19EndBattleText1: TX_FAR _Route19EndBattleText1 db "@" -Route19AfterBattleText1: ; 55e5a (15:5e5a) +Route19AfterBattleText1: TX_FAR _Route19AfterBattleText1 db "@" -Route19BattleText2: ; 55e5f (15:5e5f) +Route19BattleText2: TX_FAR _Route19BattleText2 db "@" -Route19EndBattleText2: ; 55e64 (15:5e64) +Route19EndBattleText2: TX_FAR _Route19EndBattleText2 db "@" -Route19AfterBattleText2: ; 55e69 (15:5e69) +Route19AfterBattleText2: TX_FAR _Route19AfterBattleText2 db "@" -Route19BattleText3: ; 55e6e (15:5e6e) +Route19BattleText3: TX_FAR _Route19BattleText3 db "@" -Route19EndBattleText3: ; 55e73 (15:5e73) +Route19EndBattleText3: TX_FAR _Route19EndBattleText3 db "@" -Route19AfterBattleText3: ; 55e78 (15:5e78) +Route19AfterBattleText3: TX_FAR _Route19AfterBattleText3 db "@" -Route19BattleText4: ; 55e7d (15:5e7d) +Route19BattleText4: TX_FAR _Route19BattleText4 db "@" -Route19EndBattleText4: ; 55e82 (15:5e82) +Route19EndBattleText4: TX_FAR _Route19EndBattleText4 db "@" -Route19AfterBattleText4: ; 55e87 (15:5e87) +Route19AfterBattleText4: TX_FAR _Route19AfterBattleText4 db "@" -Route19BattleText5: ; 55e8c (15:5e8c) +Route19BattleText5: TX_FAR _Route19BattleText5 db "@" -Route19EndBattleText5: ; 55e91 (15:5e91) +Route19EndBattleText5: TX_FAR _Route19EndBattleText5 db "@" -Route19AfterBattleText5: ; 55e96 (15:5e96) +Route19AfterBattleText5: TX_FAR _Route19AfterBattleText5 db "@" -Route19BattleText6: ; 55e9b (15:5e9b) +Route19BattleText6: TX_FAR _Route19BattleText6 db "@" -Route19EndBattleText6: ; 55ea0 (15:5ea0) +Route19EndBattleText6: TX_FAR _Route19EndBattleText6 db "@" -Route19AfterBattleText6: ; 55ea5 (15:5ea5) +Route19AfterBattleText6: TX_FAR _Route19AfterBattleText6 db "@" -Route19BattleText7: ; 55eaa (15:5eaa) +Route19BattleText7: TX_FAR _Route19BattleText7 db "@" -Route19EndBattleText7: ; 55eaf (15:5eaf) +Route19EndBattleText7: TX_FAR _Route19EndBattleText7 db "@" -Route19AfterBattleText7: ; 55eb4 (15:5eb4) +Route19AfterBattleText7: TX_FAR _Route19AfterBattleText7 db "@" -Route19BattleText8: ; 55eb9 (15:5eb9) +Route19BattleText8: TX_FAR _Route19BattleText8 db "@" -Route19EndBattleText8: ; 55ebe (15:5ebe) +Route19EndBattleText8: TX_FAR _Route19EndBattleText8 db "@" -Route19AfterBattleText8: ; 55ec3 (15:5ec3) +Route19AfterBattleText8: TX_FAR _Route19AfterBattleText8 db "@" -Route19BattleText9: ; 55ec8 (15:5ec8) +Route19BattleText9: TX_FAR _Route19BattleText9 db "@" -Route19EndBattleText9: ; 55ecd (15:5ecd) +Route19EndBattleText9: TX_FAR _Route19EndBattleText9 db "@" -Route19AfterBattleText9: ; 55ed2 (15:5ed2) +Route19AfterBattleText9: TX_FAR _Route19AfterBattleText9 db "@" -Route19BattleText10: ; 55ed7 (15:5ed7) +Route19BattleText10: TX_FAR _Route19BattleText10 db "@" -Route19EndBattleText10: ; 55edc (15:5edc) +Route19EndBattleText10: TX_FAR _Route19EndBattleText10 db "@" -Route19AfterBattleText10: ; 55ee1 (15:5ee1) +Route19AfterBattleText10: TX_FAR _Route19AfterBattleText10 db "@" -Route19Text11: ; 55ee6 (15:5ee6) +Route19Text11: TX_FAR _Route19Text11 db "@" diff --git a/scripts/route2.asm b/scripts/route2.asm index fdc5eb6c..810792ef 100755 --- a/scripts/route2.asm +++ b/scripts/route2.asm @@ -1,16 +1,16 @@ -Route2Script: ; 554e3 (15:54e3) +Route2Script: jp EnableAutoTextBoxDrawing -Route2TextPointers: ; 554e6 (15:54e6) - dw Predef5CText - dw Predef5CText +Route2TextPointers: + dw PickUpItemText + dw PickUpItemText dw Route2Text3 dw Route2Text4 -Route2Text3: ; 554ee (15:54ee) +Route2Text3: TX_FAR _Route2Text3 db "@" -Route2Text4: ; 554f3 (15:54f3) +Route2Text4: TX_FAR _Route2Text4 db "@" diff --git a/scripts/route20.asm b/scripts/route20.asm index 4ef57e23..53ff5e55 100755 --- a/scripts/route20.asm +++ b/scripts/route20.asm @@ -1,26 +1,22 @@ -Route20Script: ; 50ca9 (14:4ca9) - ld hl, wd7e7 - bit 0, [hl] - res 0, [hl] +Route20Script: + CheckAndResetEvent EVENT_IN_SEAFOAM_ISLANDS call nz, Route20Script_50cc6 call EnableAutoTextBoxDrawing - ld hl, Route20TrainerHeader0 ; $4d3a + ld hl, Route20TrainerHeader0 ld de, Route20ScriptPointers - ld a, [W_ROUTE20CURSCRIPT] + ld a, [wRoute20CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE20CURSCRIPT], a + ld [wRoute20CurScript], a ret -Route20Script_50cc6: ; 50cc6 (14:4cc6) - ld a, [wd880] - and $3 - cp $3 +Route20Script_50cc6: + CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE 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 @@ -30,7 +26,7 @@ Route20Script_50cc6: ; 50cc6 (14:4cc6) pop hl jr .asm_50cdc -.MissableObjectIDs: ; 50ce8 (14:4ce8) +.MissableObjectIDs: db HS_SEAFOAM_ISLANDS_2_BOULDER_1 db HS_SEAFOAM_ISLANDS_2_BOULDER_2 db HS_SEAFOAM_ISLANDS_3_BOULDER_1 @@ -40,9 +36,7 @@ Route20Script_50cc6: ; 50cc6 (14:4cc6) db $FF .asm_50cef - ld a, [wd881] - and $3 - cp $3 + CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ret z ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1 call Route20Script_50d0c @@ -54,20 +48,20 @@ Route20Script_50cc6: ; 50cc6 (14:4cc6) call Route20Script_50d14 ret -Route20Script_50d0c: ; 50d0c (14:4d0c) - ld [wcc4d], a +Route20Script_50d0c: + ld [wMissableObjectIndex], a predef_jump ShowObject -Route20Script_50d14: ; 50d14 (14:4d14) - ld [wcc4d], a +Route20Script_50d14: + ld [wMissableObjectIndex], a predef_jump HideObject -Route20ScriptPointers: ; 50d1c (14:4d1c) +Route20ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route20TextPointers: ; 50d22 (14:4d22) +Route20TextPointers: dw Route20Text1 dw Route20Text2 dw Route20Text3 @@ -81,280 +75,279 @@ Route20TextPointers: ; 50d22 (14:4d22) dw Route20Text11 dw Route20Text12 -Route20TrainerHeaders: ; 50d3a (14:4d3a) -Route20TrainerHeader0: ; 50d3a (14:4d3a) - db $1 ; flag's bit +Route20TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_0 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 - -Route20TrainerHeader2: ; 50d46 (14:4d46) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_0 + dw Route20BattleText1 ; TextBeforeBattle + dw Route20AfterBattleText1 ; TextAfterBattle + dw Route20EndBattleText1 ; TextEndBattle + dw Route20EndBattleText1 ; TextEndBattle + +Route20TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_1 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 - -Route20TrainerHeader3: ; 50d52 (14:4d52) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_1 + dw Route20BattleText2 ; TextBeforeBattle + dw Route20AfterBattleText2 ; TextAfterBattle + dw Route20EndBattleText2 ; TextEndBattle + dw Route20EndBattleText2 ; TextEndBattle + +Route20TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_2 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 - -Route20TrainerHeader4: ; 50d5e (14:4d5e) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_2 + dw Route20BattleText3 ; TextBeforeBattle + dw Route20AfterBattleText3 ; TextAfterBattle + dw Route20EndBattleText3 ; TextEndBattle + dw Route20EndBattleText3 ; TextEndBattle + +Route20TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_3 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 - -Route20TrainerHeader5: ; 50d6a (14:4d6a) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_3 + dw Route20BattleText4 ; TextBeforeBattle + dw Route20AfterBattleText4 ; TextAfterBattle + dw Route20EndBattleText4 ; TextEndBattle + dw Route20EndBattleText4 ; TextEndBattle + +Route20TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_4 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 - -Route20TrainerHeader6: ; 50d76 (14:4d76) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_4 + dw Route20BattleText5 ; TextBeforeBattle + dw Route20AfterBattleText5 ; TextAfterBattle + dw Route20EndBattleText5 ; TextEndBattle + dw Route20EndBattleText5 ; TextEndBattle + +Route20TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_5 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 - -Route20TrainerHeader7: ; 50d82 (14:4d82) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_5 + dw Route20BattleText6 ; TextBeforeBattle + dw Route20AfterBattleText6 ; TextAfterBattle + dw Route20EndBattleText6 ; TextEndBattle + dw Route20EndBattleText6 ; TextEndBattle + +Route20TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_6 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 - -Route20TrainerHeader8: ; 50d8e (14:4d8e) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_6 + dw Route20BattleText7 ; TextBeforeBattle + dw Route20AfterBattleText7 ; TextAfterBattle + dw Route20EndBattleText7 ; TextEndBattle + dw Route20EndBattleText7 ; TextEndBattle + +Route20TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_7, 1 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 - -Route20TrainerHeader9: ; 50d9a (14:4d9a) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_7, 1 + dw Route20BattleText8 ; TextBeforeBattle + dw Route20AfterBattleText8 ; TextAfterBattle + dw Route20EndBattleText8 ; TextEndBattle + dw Route20EndBattleText8 ; TextEndBattle + +Route20TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_8, 1 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 - -Route20TrainerHeader10: ; 50da6 (14:4da6) - db $a ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_8, 1 + dw Route20BattleText9 ; TextBeforeBattle + dw Route20AfterBattleText9 ; TextAfterBattle + dw Route20EndBattleText9 ; TextEndBattle + dw Route20EndBattleText9 ; TextEndBattle + +Route20TrainerHeader9: + dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_9, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_9, 1 + dw Route20BattleText10 ; TextBeforeBattle + dw Route20AfterBattleText10 ; TextAfterBattle + dw Route20EndBattleText10 ; TextEndBattle + dw Route20EndBattleText10 ; TextEndBattle db $ff -Route20Text1: ; 50db3 (14:4db3) - db $08 ; asm +Route20Text1: + TX_ASM ld hl, Route20TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route20Text2: ; 50dbd (14:4dbd) - db $08 ; asm +Route20Text2: + TX_ASM + ld hl, Route20TrainerHeader1 + call TalkToTrainer + jp TextScriptEnd + +Route20Text3: + TX_ASM ld hl, Route20TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route20Text3: ; 50dc7 (14:4dc7) - db $08 ; asm +Route20Text4: + TX_ASM ld hl, Route20TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route20Text4: ; 50dd1 (14:4dd1) - db $08 ; asm +Route20Text5: + TX_ASM ld hl, Route20TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route20Text5: ; 50ddb (14:4ddb) - db $08 ; asm +Route20Text6: + TX_ASM ld hl, Route20TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route20Text6: ; 50de5 (14:4de5) - db $08 ; asm +Route20Text7: + TX_ASM ld hl, Route20TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route20Text7: ; 50def (14:4def) - db $08 ; asm +Route20Text8: + TX_ASM ld hl, Route20TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route20Text8: ; 50df9 (14:4df9) - db $08 ; asm +Route20Text9: + TX_ASM ld hl, Route20TrainerHeader8 call TalkToTrainer jp TextScriptEnd -Route20Text9: ; 50e03 (14:4e03) - db $08 ; asm +Route20Text10: + TX_ASM ld hl, Route20TrainerHeader9 call TalkToTrainer jp TextScriptEnd -Route20Text10: ; 50e0d (14:4e0d) - db $08 ; asm - ld hl, Route20TrainerHeader10 - call TalkToTrainer - jp TextScriptEnd - -Route20BattleText1: ; 50e17 (14:4e17) +Route20BattleText1: TX_FAR _Route20BattleText1 db "@" -Route20EndBattleText1: ; 50e1c (14:4e1c) +Route20EndBattleText1: TX_FAR _Route20EndBattleText1 db "@" -Route20AfterBattleText1: ; 50e21 (14:4e21) +Route20AfterBattleText1: TX_FAR _Route20AfterBattleText1 db "@" -Route20BattleText2: ; 50e26 (14:4e26) +Route20BattleText2: TX_FAR _Route20BattleText2 db "@" -Route20EndBattleText2: ; 50e2b (14:4e2b) +Route20EndBattleText2: TX_FAR _Route20EndBattleText2 db "@" -Route20AfterBattleText2: ; 50e30 (14:4e30) +Route20AfterBattleText2: TX_FAR _Route20AfterBattleText2 db "@" -Route20BattleText3: ; 50e35 (14:4e35) +Route20BattleText3: TX_FAR _Route20BattleText3 db "@" -Route20EndBattleText3: ; 50e3a (14:4e3a) +Route20EndBattleText3: TX_FAR _Route20EndBattleText3 db "@" -Route20AfterBattleText3: ; 50e3f (14:4e3f) +Route20AfterBattleText3: TX_FAR _Route20AfterBattleText3 db "@" -Route20BattleText4: ; 50e44 (14:4e44) +Route20BattleText4: TX_FAR _Route20BattleText4 db "@" -Route20EndBattleText4: ; 50e49 (14:4e49) +Route20EndBattleText4: TX_FAR _Route20EndBattleText4 db "@" -Route20AfterBattleText4: ; 50e4e (14:4e4e) +Route20AfterBattleText4: TX_FAR _Route20AfterBattleText4 db "@" -Route20BattleText5: ; 50e53 (14:4e53) +Route20BattleText5: TX_FAR _Route20BattleText5 db "@" -Route20EndBattleText5: ; 50e58 (14:4e58) +Route20EndBattleText5: TX_FAR _Route20EndBattleText5 db "@" -Route20AfterBattleText5: ; 50e5d (14:4e5d) +Route20AfterBattleText5: TX_FAR _Route20AfterBattleText5 db "@" -Route20BattleText6: ; 50e62 (14:4e62) +Route20BattleText6: TX_FAR _Route20BattleText6 db "@" -Route20EndBattleText6: ; 50e67 (14:4e67) +Route20EndBattleText6: TX_FAR _Route20EndBattleText6 db "@" -Route20AfterBattleText6: ; 50e6c (14:4e6c) +Route20AfterBattleText6: TX_FAR _Route20AfterBattleText6 db "@" -Route20BattleText7: ; 50e71 (14:4e71) +Route20BattleText7: TX_FAR _Route20BattleText7 db "@" -Route20EndBattleText7: ; 50e76 (14:4e76) +Route20EndBattleText7: TX_FAR _Route20EndBattleText7 db "@" -Route20AfterBattleText7: ; 50e7b (14:4e7b) +Route20AfterBattleText7: TX_FAR _Route20AfterBattleText7 db "@" -Route20BattleText8: ; 50e80 (14:4e80) +Route20BattleText8: TX_FAR _Route20BattleText8 db "@" -Route20EndBattleText8: ; 50e85 (14:4e85) +Route20EndBattleText8: TX_FAR _Route20EndBattleText8 db "@" -Route20AfterBattleText8: ; 50e8a (14:4e8a) +Route20AfterBattleText8: TX_FAR _Route20AfterBattleText8 db "@" -Route20BattleText9: ; 50e8f (14:4e8f) +Route20BattleText9: TX_FAR _Route20BattleText9 db "@" -Route20EndBattleText9: ; 50e94 (14:4e94) +Route20EndBattleText9: TX_FAR _Route20EndBattleText9 db "@" -Route20AfterBattleText9: ; 50e99 (14:4e99) +Route20AfterBattleText9: TX_FAR _Route20AfterBattleText9 db "@" -Route20BattleText10: ; 50e9e (14:4e9e) +Route20BattleText10: TX_FAR _Route20BattleText10 db "@" -Route20EndBattleText10: ; 50ea3 (14:4ea3) +Route20EndBattleText10: TX_FAR _Route20EndBattleText10 db "@" -Route20AfterBattleText10: ; 50ea8 (14:4ea8) +Route20AfterBattleText10: TX_FAR _Route20AfterBattleText10 db "@" -Route20Text12: ; 50ead (14:4ead) -Route20Text11: ; 50ead (14:4ead) +Route20Text12: +Route20Text11: TX_FAR _Route20Text11 db "@" diff --git a/scripts/route21.asm b/scripts/route21.asm index de2046dc..dcdc8022 100755 --- a/scripts/route21.asm +++ b/scripts/route21.asm @@ -1,18 +1,18 @@ -Route21Script: ; 55eeb (15:5eeb) +Route21Script: call EnableAutoTextBoxDrawing - ld hl, Route21TrainerHeaders + ld hl, Route21TrainerHeader0 ld de, Route21ScriptPointers - ld a, [W_ROUTE21CURSCRIPT] + ld a, [wRoute21CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE21CURSCRIPT], a + ld [wRoute21CurScript], a ret -Route21ScriptPointers: ; 55efe (15:5efe) +Route21ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route21TextPointers: ; 55f04 (15:5f04) +Route21TextPointers: dw Route21Text1 dw Route21Text2 dw Route21Text3 @@ -23,248 +23,247 @@ Route21TextPointers: ; 55f04 (15:5f04) dw Route21Text8 dw Route21Text9 -Route21TrainerHeaders: ; 55f16 (15:5f16) -Route21TrainerHeader0: ; 55f16 (15:5f16) - db $1 ; flag's bit +Route21TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_0 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 - -Route21TrainerHeader1: ; 55f22 (15:5f22) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_0 + dw Route21BattleText1 ; TextBeforeBattle + dw Route21AfterBattleText1 ; TextAfterBattle + dw Route21EndBattleText1 ; TextEndBattle + dw Route21EndBattleText1 ; TextEndBattle + +Route21TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_1 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 - -Route21TrainerHeader2: ; 55f2e (15:5f2e) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_1 + dw Route21BattleText2 ; TextBeforeBattle + dw Route21AfterBattleText2 ; TextAfterBattle + dw Route21EndBattleText2 ; TextEndBattle + dw Route21EndBattleText2 ; TextEndBattle + +Route21TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_2 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 - -Route21TrainerHeader3: ; 55f3a (15:5f3a) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_2 + dw Route21BattleText3 ; TextBeforeBattle + dw Route21AfterBattleText3 ; TextAfterBattle + dw Route21EndBattleText3 ; TextEndBattle + dw Route21EndBattleText3 ; TextEndBattle + +Route21TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_3 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 - -Route21TrainerHeader4: ; 55f46 (15:5f46) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_3 + dw Route21BattleText4 ; TextBeforeBattle + dw Route21AfterBattleText4 ; TextAfterBattle + dw Route21EndBattleText4 ; TextEndBattle + dw Route21EndBattleText4 ; TextEndBattle + +Route21TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_4 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 - -Route21TrainerHeader5: ; 55f52 (15:5f52) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_4 + dw Route21BattleText5 ; TextBeforeBattle + dw Route21AfterBattleText5 ; TextAfterBattle + dw Route21EndBattleText5 ; TextEndBattle + dw Route21EndBattleText5 ; TextEndBattle + +Route21TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_5 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 - -Route21TrainerHeader6: ; 55f5e (15:5f5e) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_5 + dw Route21BattleText6 ; TextBeforeBattle + dw Route21AfterBattleText6 ; TextAfterBattle + dw Route21EndBattleText6 ; TextEndBattle + dw Route21EndBattleText6 ; TextEndBattle + +Route21TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_6 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 - -Route21TrainerHeader7: ; 55f6a (15:5f6a) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_6 + dw Route21BattleText7 ; TextBeforeBattle + dw Route21AfterBattleText7 ; TextAfterBattle + dw Route21EndBattleText7 ; TextEndBattle + dw Route21EndBattleText7 ; TextEndBattle + +Route21TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_7, 1 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 - -Route21TrainerHeader8: ; 55f76 (15:5f76) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_7, 1 + dw Route21BattleText8 ; TextBeforeBattle + dw Route21AfterBattleText8 ; TextAfterBattle + dw Route21EndBattleText8 ; TextEndBattle + dw Route21EndBattleText8 ; TextEndBattle + +Route21TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_8, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_8, 1 + dw Route21BattleText9 ; TextBeforeBattle + dw Route21AfterBattleText9 ; TextAfterBattle + dw Route21EndBattleText9 ; TextEndBattle + dw Route21EndBattleText9 ; TextEndBattle db $ff -Route21Text1: ; 55f83 (15:5f83) - db $08 ; asm +Route21Text1: + TX_ASM ld hl, Route21TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route21Text2: ; 55f8d (15:5f8d) - db $08 ; asm +Route21Text2: + TX_ASM ld hl, Route21TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route21Text3: ; 55f97 (15:5f97) - db $08 ; asm +Route21Text3: + TX_ASM ld hl, Route21TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route21Text4: ; 55fa1 (15:5fa1) - db $08 ; asm +Route21Text4: + TX_ASM ld hl, Route21TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route21Text5: ; 55fab (15:5fab) - db $08 ; asm +Route21Text5: + TX_ASM ld hl, Route21TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route21Text6: ; 55fb5 (15:5fb5) - db $08 ; asm +Route21Text6: + TX_ASM ld hl, Route21TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route21Text7: ; 55fbf (15:5fbf) - db $08 ; asm +Route21Text7: + TX_ASM ld hl, Route21TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route21Text8: ; 55fc9 (15:5fc9) - db $08 ; asm +Route21Text8: + TX_ASM ld hl, Route21TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route21Text9: ; 55fd3 (15:5fd3) - db $08 ; asm +Route21Text9: + TX_ASM ld hl, Route21TrainerHeader8 call TalkToTrainer jp TextScriptEnd -Route21BattleText1: ; 55fdd (15:5fdd) +Route21BattleText1: TX_FAR _Route21BattleText1 db "@" -Route21EndBattleText1: ; 55fe2 (15:5fe2) +Route21EndBattleText1: TX_FAR _Route21EndBattleText1 db "@" -Route21AfterBattleText1: ; 55fe7 (15:5fe7) +Route21AfterBattleText1: TX_FAR _Route21AfterBattleText1 db "@" -Route21BattleText2: ; 55fec (15:5fec) +Route21BattleText2: TX_FAR _Route21BattleText2 db "@" -Route21EndBattleText2: ; 55ff1 (15:5ff1) +Route21EndBattleText2: TX_FAR _Route21EndBattleText2 db "@" -Route21AfterBattleText2: ; 55ff6 (15:5ff6) +Route21AfterBattleText2: TX_FAR _Route21AfterBattleText2 db "@" -Route21BattleText3: ; 55ffb (15:5ffb) +Route21BattleText3: TX_FAR _Route21BattleText3 db "@" -Route21EndBattleText3: ; 56000 (15:6000) +Route21EndBattleText3: TX_FAR _Route21EndBattleText3 db "@" -Route21AfterBattleText3: ; 56005 (15:6005) +Route21AfterBattleText3: TX_FAR _Route21AfterBattleText3 db "@" -Route21BattleText4: ; 5600a (15:600a) +Route21BattleText4: TX_FAR _Route21BattleText4 db "@" -Route21EndBattleText4: ; 5600f (15:600f) +Route21EndBattleText4: TX_FAR _Route21EndBattleText4 db "@" -Route21AfterBattleText4: ; 56014 (15:6014) +Route21AfterBattleText4: TX_FAR _Route21AfterBattleText4 db "@" -Route21BattleText5: ; 56019 (15:6019) +Route21BattleText5: TX_FAR _Route21BattleText5 db "@" -Route21EndBattleText5: ; 5601e (15:601e) +Route21EndBattleText5: TX_FAR _Route21EndBattleText5 db "@" -Route21AfterBattleText5: ; 56023 (15:6023) +Route21AfterBattleText5: TX_FAR _Route21AfterBattleText5 db "@" -Route21BattleText6: ; 56028 (15:6028) +Route21BattleText6: TX_FAR _Route21BattleText6 db "@" -Route21EndBattleText6: ; 5602d (15:602d) +Route21EndBattleText6: TX_FAR _Route21EndBattleText6 db "@" -Route21AfterBattleText6: ; 56032 (15:6032) +Route21AfterBattleText6: TX_FAR _Route21AfterBattleText6 db "@" -Route21BattleText7: ; 56037 (15:6037) +Route21BattleText7: TX_FAR _Route21BattleText7 db "@" -Route21EndBattleText7: ; 5603c (15:603c) +Route21EndBattleText7: TX_FAR _Route21EndBattleText7 db "@" -Route21AfterBattleText7: ; 56041 (15:6041) +Route21AfterBattleText7: TX_FAR _Route21AfterBattleText7 db "@" -Route21BattleText8: ; 56046 (15:6046) +Route21BattleText8: TX_FAR _Route21BattleText8 db "@" -Route21EndBattleText8: ; 5604b (15:604b) +Route21EndBattleText8: TX_FAR _Route21EndBattleText8 db "@" -Route21AfterBattleText8: ; 56050 (15:6050) +Route21AfterBattleText8: TX_FAR _Route21AfterBattleText8 db "@" -Route21BattleText9: ; 56055 (15:6055) +Route21BattleText9: TX_FAR _Route21BattleText9 db "@" -Route21EndBattleText9: ; 5605a (15:605a) +Route21EndBattleText9: TX_FAR _Route21EndBattleText9 db "@" -Route21AfterBattleText9: ; 5605f (15:605f) +Route21AfterBattleText9: TX_FAR _Route21AfterBattleText9 db "@" diff --git a/scripts/route22.asm b/scripts/route22.asm index 9181380a..86c3768b 100755 --- a/scripts/route22.asm +++ b/scripts/route22.asm @@ -1,10 +1,10 @@ -Route22Script: ; 50eb2 (14:4eb2) +Route22Script: call EnableAutoTextBoxDrawing ld hl, Route22ScriptPointers - ld a, [W_ROUTE22CURSCRIPT] + ld a, [wRoute22CurScript] jp CallFunctionInTable -Route22ScriptPointers: ; 50ebe (14:4ebe) +Route22ScriptPointers: dw Route22Script0 dw Route22Script1 dw Route22Script2 @@ -14,15 +14,15 @@ Route22ScriptPointers: ; 50ebe (14:4ebe) dw Route22Script6 dw Route22Script7 -Route22Script_50ece: ; 50ece (14:4ece) +Route22Script_50ece: xor a ld [wJoyIgnore], a - ld [W_ROUTE22CURSCRIPT], a -Route22Script7: ; 50ed5 (14:4ed5) + ld [wRoute22CurScript], a +Route22Script7: ret -Route22Script_50ed6: ; 50ed6 (14:4ed6) - ld a, [W_RIVALSTARTER] ; wd715 +Route22Script_50ed6: + ld a, [wRivalStarter] ld b, a .asm_50eda ld a, [hli] @@ -32,43 +32,45 @@ Route22Script_50ed6: ; 50ed6 (14:4ed6) jr .asm_50eda .asm_50ee1 ld a, [hl] - ld [W_TRAINERNO], a ; wd05d + ld [wTrainerNo], a ret -Route22MoveRivalSprite: ; 50ee6 (14:4ee6) - ld de, Route22RivalMovementData ; $4efb +Route22MoveRivalSprite: + ld de, Route22RivalMovementData ld a, [wcf0d] cp $1 jr z, .asm_50ef1 inc de .asm_50ef1 call MoveSprite - ld a, $c - ld [$ff8d], a + ld a, SPRITE_FACING_RIGHT + ld [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay -Route22RivalMovementData: ; 50efb (14:4efb) - db $C0,$C0,$C0,$C0,$FF ; move right 4 times +Route22RivalMovementData: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db $FF -Route22Script0: ; 50f00 (14:4f00) - ld a, [wd7eb] - bit 7, a +Route22Script0: + CheckEvent EVENT_ROUTE22_RIVAL_WANTS_BATTLE ret z - ld hl, .Route22RivalBattleCoords ; $4f2d + ld hl, .Route22RivalBattleCoords call ArePlayerCoordsInArray ret nc - ld a, [wWhichTrade] + ld a, [wCoordIndex] ld [wcf0d], a xor a ld [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a - ld a, $2 - 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 - bit 1, a ; is this the rival at the end of the game? + ld a, PLAYER_DIR_LEFT + ld [wPlayerMovingDirection], a + CheckEvent EVENT_1ST_ROUTE22_RIVAL_BATTLE + jr nz, .firstRivalBattle + CheckEventReuseA EVENT_2ND_ROUTE22_RIVAL_BATTLE ; is this the rival at the end of the game? jp nz, Route22Script_5104e ret @@ -79,49 +81,49 @@ Route22Script0: ; 50f00 (14:4f00) .firstRivalBattle ld a, $1 - ld [wcd4f], a - xor a - ld [wcd50], a + ld [wEmotionBubbleSpriteIndex], a + xor a ; EXCLAMATION_BUBBLE + ld [wWhichEmotionBubble], a predef EmotionBubble ld a, [wWalkBikeSurfState] and a - jr z, .asm_50f4e ; 0x50f44 $8 + jr z, .asm_50f4e ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound .asm_50f4e ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call Route22MoveRivalSprite ld a, $1 - ld [W_ROUTE22CURSCRIPT], a + ld [wRoute22CurScript], a ret -Route22Script1: ; 50f62 (14:4f62) +Route22Script1: ld a, [wd730] bit 0, a ret nz ld a, [wcf0d] cp $1 - jr nz, .asm_50f78 ; 0x50f6d $9 - ld a, $4 - ld [wd528], a - ld a, $4 - jr .asm_50f7a ; 0x50f76 $2 + jr nz, .asm_50f78 + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a + ld a, SPRITE_FACING_UP + jr .asm_50f7a .asm_50f78 - ld a, $c + ld a, SPRITE_FACING_RIGHT .asm_50f7a - ld [$ff8d], a + ld [hSpriteFacingDirection], a ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call SetSpriteFacingDirectionAndDelay xor a ld [wJoyIgnore], a ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd72d set 6, [hl] @@ -129,190 +131,203 @@ Route22Script1: ; 50f62 (14:4f62) ld hl, Route22RivalDefeatedText1 ld de, Route22Text_511bc call SaveEndBattleTextPointers - ld a, SONY1 + $c8 - ld [W_CUROPPONENT], a - ld hl, StarterMons_50faf ; $4faf + ld a, OPP_SONY1 + ld [wCurOpponent], a + ld hl, StarterMons_50faf call Route22Script_50ed6 ld a, $2 - ld [W_ROUTE22CURSCRIPT], a + ld [wRoute22CurScript], a ret -StarterMons_50faf: ; 50faf (14:4faf) +StarterMons_50faf: ; starter the rival picked, rival trainer number db STARTER2,$04 db STARTER3,$05 db STARTER1,$06 -Route22Script2: ; 50fb5 (14:4fb5) - ld a, [W_ISINBATTLE] +Route22Script2: + ld a, [wIsInBattle] 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 - ld [$ff8d], a + and a ; cp SPRITE_FACING_DOWN + jr nz, .notDown + ld a, SPRITE_FACING_UP + jr .done +.notDown + ld a, SPRITE_FACING_RIGHT +.done + ld [hSpriteFacingDirection], a ld a, $1 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a - ld hl, wd7eb - set 5, [hl] + SetEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound 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 ld a, $3 - ld [W_ROUTE22CURSCRIPT], a + ld [wRoute22CurScript], a ret -Route22Script_51008: ; 51008 (14:5008) - ld de, Route22RivalExitMovementData1 ; $5017 - jr asm_51010 +Route22Script_51008: + ld de, Route22RivalExitMovementData1 + jr Route22MoveRival1 -Route22Script_5100d: ; 5100d (14:500d) - ld de, Route22RivalExitMovementData2 ; $501f -asm_51010 +Route22Script_5100d: + ld de, Route22RivalExitMovementData2 +Route22MoveRival1: ld a, $1 - ld [H_SPRITEHEIGHT], a + ld [H_SPRITEINDEX], a jp MoveSprite -Route22RivalExitMovementData1: ; 51017 (14:5017) - db $C0,$C0,$00,$00,$00,$00,$00,$FF +Route22RivalExitMovementData1: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF -Route22RivalExitMovementData2: ; 5101f (14:501f) - db $40,$C0,$C0,$C0,$00,$00,$00,$00,$00,$00,$FF +Route22RivalExitMovementData2: + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF -Route22Script3: ; 5102a (14:502a) +Route22Script3: ld a, [wd730] bit 0, a ret nz xor a ld [wJoyIgnore], a ld a, HS_ROUTE_22_RIVAL_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject call PlayDefaultMusic - ld hl, wd7eb - res 0, [hl] - res 7, [hl] + ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE ld a, $0 - ld [W_ROUTE22CURSCRIPT], a + ld [wRoute22CurScript], a ret -Route22Script_5104e: ; 5104e (14:504e) +Route22Script_5104e: ld a, $2 - ld [wcd4f], a - xor a - ld [wcd50], a + ld [wEmotionBubbleSpriteIndex], a + xor a ; EXCLAMATION_BUBBLE + ld [wWhichEmotionBubble], a predef EmotionBubble ld a, [wWalkBikeSurfState] and a jr z, .skipYVisibilityTesta ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound .skipYVisibilityTesta ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateTempo ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a call Route22MoveRivalSprite ld a, $4 - ld [W_ROUTE22CURSCRIPT], a + ld [wRoute22CurScript], a ret -Route22Script4: ; 51087 (14:5087) +Route22Script4: ld a, [wd730] bit 0, a ret nz ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a ld a, [wcf0d] cp $1 jr nz, .asm_510a1 - ld a, $4 - ld [wd528], a - ld a, $4 + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a + ld a, SPRITE_FACING_UP jr .asm_510a8 .asm_510a1 - ld a, $2 - ld [wd528], a - ld a, $c + ld a, PLAYER_DIR_LEFT + ld [wPlayerMovingDirection], a + ld a, SPRITE_FACING_RIGHT .asm_510a8 - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay xor a ld [wJoyIgnore], a ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], 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 a, OPP_SONY2 + ld [wCurOpponent], a + ld hl, StarterMons_510d9 call Route22Script_50ed6 ld a, $5 - ld [W_ROUTE22CURSCRIPT], a + ld [wRoute22CurScript], a ret -StarterMons_510d9: ; 510d9 (14:50d9) +StarterMons_510d9: db STARTER2,$0a db STARTER3,$0b db STARTER1,$0c -Route22Script5: ; 510df (14:50df) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +Route22Script5: + ld a, [wIsInBattle] cp $ff jp z, Route22Script_50ece ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a ld a, [wcf0d] cp $1 jr nz, .asm_510fb - ld a, $4 - ld [wd528], a - ld a, $4 + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a + ld a, SPRITE_FACING_UP jr .asm_51102 .asm_510fb - ld a, $2 - ld [wd528], a - ld a, $c + ld a, PLAYER_DIR_LEFT + ld [wPlayerMovingDirection], a + ld a, SPRITE_FACING_RIGHT .asm_51102 - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a - ld hl, wd7eb - set 6, [hl] + SetEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateStartAndTempo ld a, [wcf0d] @@ -324,108 +339,107 @@ Route22Script5: ; 510df (14:50df) call Route22Script_51142 .asm_51137 ld a, $6 - ld [W_ROUTE22CURSCRIPT], a + ld [wRoute22CurScript], a ret -Route22Script_5113d: ; 5113d (14:513d) - ld de, MovementData_5114c ; $514c - jr asm_51145 +Route22Script_5113d: + ld de, MovementData_5114c + jr Route22MoveRival2 -Route22Script_51142: ; 51142 (14:5142) - ld de, MovementData_5114d ; $514d -asm_51145: ; 51145 (14:5145) +Route22Script_51142: + ld de, MovementData_5114d +Route22MoveRival2: ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a jp MoveSprite -MovementData_5114c: ; 5114c (14:514c) - db $80 ; left +MovementData_5114c: + db NPC_MOVEMENT_LEFT -MovementData_5114d: ; 5114d (14:514d) - db $80,$80,$80,$FF ; left x3 +MovementData_5114d: + db NPC_MOVEMENT_LEFT + db NPC_MOVEMENT_LEFT + db NPC_MOVEMENT_LEFT + db $FF -Route22Script6: ; 51151 (14:5151) +Route22Script6: ld a, [wd730] bit 0, a ret nz xor a ld [wJoyIgnore], a ld a, HS_ROUTE_22_RIVAL_2 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject call PlayDefaultMusic - ld hl, wd7eb - res 1, [hl] - res 7, [hl] + ResetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE ld a, $7 - ld [W_ROUTE22CURSCRIPT], a + ld [wRoute22CurScript], a ret -Route22TextPointers: ; 51175 (14:5175) +Route22TextPointers: dw Route22Text1 dw Route22Text2 dw Route22FrontGateText -Route22Text1: ; 5117b (14:517b) - db $08 ; asm - ld a, [wd7eb] - bit 5, a - jr z, .asm_a88cf ; 0x51181 +Route22Text1: + TX_ASM + CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE + 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 - ld a, [wd7eb] - bit 6, a - jr z, .asm_58c0a ; 0x5119a +Route22Text2: + TX_ASM + CheckEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE + 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) +Route22RivalBeforeBattleText1: TX_FAR _Route22RivalBeforeBattleText1 db "@" -Route22RivalAfterBattleText1: ; 511b2 (14:51b2) +Route22RivalAfterBattleText1: TX_FAR _Route22RivalAfterBattleText1 db "@" -Route22RivalDefeatedText1: ; 511b7 (14:51b7) +Route22RivalDefeatedText1: TX_FAR _Route22RivalDefeatedText1 db "@" -Route22Text_511bc: ; 511bc (14:51bc) +Route22Text_511bc: TX_FAR _Route22Text_511bc db "@" -Route22RivalBeforeBattleText2: ; 511c1 (14:51c1) +Route22RivalBeforeBattleText2: TX_FAR _Route22RivalBeforeBattleText2 db "@" -Route22RivalAfterBattleText2: ; 511c6 (14:51c6) +Route22RivalAfterBattleText2: TX_FAR _Route22RivalAfterBattleText2 db "@" -Route22RivalDefeatedText2: ; 511cb (14:51cb) +Route22RivalDefeatedText2: TX_FAR _Route22RivalDefeatedText2 db "@" -Route22Text_511d0: ; 511d0 (14:51d0) +Route22Text_511d0: TX_FAR _Route22Text_511d0 db "@" -Route22FrontGateText: ; 511d5 (14:51d5) +Route22FrontGateText: TX_FAR _Route22FrontGateText db "@" diff --git a/scripts/route22gate.asm b/scripts/route22gate.asm index 6618d6a2..ee2e5b6b 100755 --- a/scripts/route22gate.asm +++ b/scripts/route22gate.asm @@ -1,47 +1,47 @@ -Route22GateScript: ; 1e683 (7:6683) +Route22GateScript: call EnableAutoTextBoxDrawing ld hl, Route22GateScriptPointers - ld a, [W_ROUTE22GATECURSCRIPT] + ld a, [wRoute22GateCurScript] call CallFunctionInTable - ld a, [W_YCOORD] + ld a, [wYCoord] 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 ret -Route22GateScriptPointers: ; 1e69e (7:669e) +Route22GateScriptPointers: dw Route22GateScript0 dw Route22GateScript1 dw Route22GateScript2 -Route22GateScript0: ; 1e6a4 (7:66a4) +Route22GateScript0: ld hl, Route22GateScriptCoords call ArePlayerCoordsInArray ret nc xor a ld [hJoyHeld], a ld a, $1 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID -Route22GateScriptCoords: ; 1e6b5 (7:66b5) +Route22GateScriptCoords: db 2,4 db 2,5 db $ff -Route22GateScript_1e6ba: ; 1e6ba (7:66ba) +Route22GateScript_1e6ba: ld a, $1 ld [wSimulatedJoypadStatesIndex], a - ld a, $80 + ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a ld [wSpriteStateData1 + 9], a ld [wJoyIgnore], a jp StartSimulatingJoypadStates -Route22GateScript1: ; 1e6cd (7:66cd) +Route22GateScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz @@ -49,44 +49,45 @@ Route22GateScript1: ; 1e6cd (7:66cd) ld [wJoyIgnore], a call Delay3 ld a, $0 - ld [W_ROUTE22GATECURSCRIPT], a -Route22GateScript2: ; 1e6de (7:66de) + ld [wRoute22GateCurScript], a +Route22GateScript2: ret -Route22GateTextPointers: ; 1e6df (7:66df) +Route22GateTextPointers: dw Route22GateText1 -Route22GateText1: ; 1e6e1 (7:66e1) - db $8 - ld a, [W_OBTAINEDBADGES] +Route22GateText1: + TX_ASM + ld a, [wObtainedBadges] 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 - ld [W_ROUTE22GATECURSCRIPT], a +.asm_1e6fe + ld [wRoute22GateCurScript], a jp TextScriptEnd -Route22GateText_1e704: ; 1e704 (7:6704) - TX_FAR _Route22GateText_1e704 ; 0x8cfbb - db $8 - ld a, (SFX_02_51 - SFX_Headers_02) / 3 +Route22GateText_1e704: + TX_FAR _Route22GateText_1e704 + TX_ASM + ld a, SFX_DENIED call PlaySoundWaitForCurrent call WaitForSoundToFinish - ld hl, Route22GateText_1e715 ; $6715 + ld hl, Route22GateText_1e715 ret -Route22GateText_1e715: ; 1e715 (7:6715) +Route22GateText_1e715: TX_FAR _Route22GateText_1e715 db "@" -Route22GateText_1e71a: ; 1e71a (7:671a) - TX_FAR _Route22GateText_1e71a ; 0x8d03e - db $0B, "@" +Route22GateText_1e71a: + TX_FAR _Route22GateText_1e71a + TX_SFX_ITEM_1 + db "@" diff --git a/scripts/route23.asm b/scripts/route23.asm index 6d3849f4..4eb6b5f7 100755 --- a/scripts/route23.asm +++ b/scripts/route23.asm @@ -1,39 +1,35 @@ -Route23Script: ; 511da (14:51da) +Route23Script: call Route23Script_511e9 call EnableAutoTextBoxDrawing ld hl, Route23ScriptPointers - ld a, [W_ROUTE23CURSCRIPT] + ld a, [wRoute23CurScript] jp CallFunctionInTable -Route23Script_511e9: ; 511e9 (14:51e9) - ld hl, wd126 +Route23Script_511e9: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] ret z - ld hl, wd7ee - res 0, [hl] - res 7, [hl] - ld hl, wd813 - res 0, [hl] - res 6, [hl] + ResetEvents EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2 + ResetEvents EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1, EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2 ld a, HS_VICTORY_ROAD_3_BOULDER - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject ld a, HS_VICTORY_ROAD_2_BOULDER - ld [wcc4d], a + ld [wMissableObjectIndex], a predef_jump HideObject -Route23ScriptPointers: ; 51213 (14:5213) +Route23ScriptPointers: dw Route23Script0 dw Route23Script1 dw Route23Script2 -Route23Script0: ; 51219 (14:5219) - ld hl, YCoordsData_51255 ; $5255 - ld a, [W_YCOORD] +Route23Script0: + ld hl, YCoordsData_51255 + ld a, [wYCoord] ld b, a ld e, $0 - ld c, $7 + EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK .asm_51224 ld a, [hli] cp $ff @@ -41,19 +37,19 @@ 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 - ld a, [W_XCOORD] + jr nz, .asm_51237 + ld a, [wXCoord] cp $e ret nc .asm_51237 ld a, e - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a ld a, c - ld [wWhichTrade], a - ld b, $2 - ld hl, wd7ed + ld [wWhichBadge], a + ld b, FLAG_TEST + EventFlagAddress hl, EVENT_PASSED_CASCADEBADGE_CHECK predef FlagActionPredef ld a, c and a @@ -64,29 +60,29 @@ Route23Script0: ; 51219 (14:5219) ld [hJoyHeld], a ret -YCoordsData_51255: ; 51255 (14:5255) +YCoordsData_51255: db $23,$38,$55,$60,$69,$77,$88,$FF -Route23Script_5125d: ; 5125d (14:525d) - ld hl, BadgeTextPointers ; $5276 - ld a, [wWhichTrade] ; wWhichTrade +Route23Script_5125d: + ld hl, BadgeTextPointers + ld a, [wWhichBadge] ld c, a - ld b, $0 + ld b, 0 add hl, bc add hl, bc ld a, [hli] ld h, [hl] ld l, a ld de, wcd6d -.asm_5126e +.copyTextLoop ld a, [hli] ld [de], a inc de - cp $50 - jr nz, .asm_5126e + cp "@" + jr nz, .copyTextLoop ret -BadgeTextPointers: ; 51276 (14:5276) +BadgeTextPointers: dw CascadeBadgeText dw ThunderBadgeText dw RainbowBadgeText @@ -95,47 +91,47 @@ BadgeTextPointers: ; 51276 (14:5276) dw VolcanoBadgeText dw EarthBadgeText -EarthBadgeText: ; 51284 (14:5284) +EarthBadgeText: db "EARTHBADGE@" -VolcanoBadgeText: ; 5128f (14:528f) +VolcanoBadgeText: db "VOLCANOBADGE@" -MarshBadgeText: ; 5129c (14:529c) +MarshBadgeText: db "MARSHBADGE@" -SoulBadgeText: ; 512a7 (14:52a7) +SoulBadgeText: db "SOULBADGE@" -RainbowBadgeText: ; 512b1 (14:52b1) +RainbowBadgeText: db "RAINBOWBADGE@" -ThunderBadgeText: ; 512be (14:52be) +ThunderBadgeText: db "THUNDERBADGE@" -CascadeBadgeText: ; 512cb (14:52cb) +CascadeBadgeText: db "CASCADEBADGE@" -Route23Script_512d8: ; 512d8 (14:52d8) +Route23Script_512d8: ld a, $1 ld [wSimulatedJoypadStatesIndex], a - ld a, $80 + ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a xor a ld [wSpriteStateData1 + 9], a ld [wJoyIgnore], a jp StartSimulatingJoypadStates -Route23Script1: ; 512ec (14:52ec) +Route23Script1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz -Route23Script2: ; 512f1 (14:52f1) +Route23Script2: ld a, $0 - ld [W_ROUTE23CURSCRIPT], a + ld [wRoute23CurScript], a ret -Route23TextPointers: ; 512f7 (14:52f7) +Route23TextPointers: dw Route23Text1 dw Route23Text2 dw Route23Text3 @@ -145,56 +141,56 @@ Route23TextPointers: ; 512f7 (14:52f7) dw Route23Text7 dw Route23Text8 -Route23Text1: ; 51307 (14:5307) - db $08 ; asm - ld a, $6 +Route23Text1: + TX_ASM + EventFlagBit a, EVENT_PASSED_EARTHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd -Route23Text2: ; 51310 (14:5310) - db $08 ; asm - ld a, $5 +Route23Text2: + TX_ASM + EventFlagBit a, EVENT_PASSED_VOLCANOBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd -Route23Text3: ; 51319 (14:5319) - db $08 ; asm - ld a, $4 +Route23Text3: + TX_ASM + EventFlagBit a, EVENT_PASSED_MARSHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd -Route23Text4: ; 51322 (14:5322) - db $08 ; asm - ld a, $3 +Route23Text4: + TX_ASM + EventFlagBit a, EVENT_PASSED_SOULBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd -Route23Text5: ; 5132b (14:532b) - db $08 ; asm - ld a, $2 +Route23Text5: + TX_ASM + EventFlagBit a, EVENT_PASSED_RAINBOWBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd -Route23Text6: ; 51334 (14:5334) - db $08 ; asm - ld a, $1 +Route23Text6: + TX_ASM + EventFlagBit a, EVENT_PASSED_THUNDERBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd -Route23Text7: ; 5133d (14:533d) - db $8 - ld a, $0 +Route23Text7: + TX_ASM + EventFlagBit a, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd -Route23Script_51346: ; 51346 (14:5346) - ld [wWhichTrade], a ; wWhichTrade +Route23Script_51346: + ld [wWhichBadge], a call Route23Script_5125d - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wWhichBadge] inc a ld c, a - ld b, $2 - ld hl, W_OBTAINEDBADGES + ld b, FLAG_TEST + ld hl, wObtainedBadges predef FlagActionPredef ld a, c and a @@ -203,38 +199,38 @@ Route23Script_51346: ; 51346 (14:5346) call PrintText call Route23Script_512d8 ld a, $1 - ld [W_ROUTE23CURSCRIPT], a + ld [wRoute23CurScript], a ret .asm_5136e ld hl, VictoryRoadGuardText2 call PrintText - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wWhichBadge] ld c, a - ld b, $1 - ld hl, wd7ed + ld b, FLAG_SET + EventFlagAddress hl, EVENT_PASSED_CASCADEBADGE_CHECK predef FlagActionPredef ld a, $2 - ld [W_ROUTE23CURSCRIPT], a + ld [wRoute23CurScript], a ret -Route23Script_51388: ; 51388 (14:5388) +Route23Script_51388: ld hl, VictoryRoadGuardText2 jp PrintText -VictoryRoadGuardText1: ; 5138e (14:538e) +VictoryRoadGuardText1: TX_FAR _VictoryRoadGuardText1 - db $08 ; asm - ld a, (SFX_02_51 - SFX_Headers_02) / 3 + TX_ASM + ld a, SFX_DENIED call PlaySoundWaitForCurrent call WaitForSoundToFinish jp TextScriptEnd -VictoryRoadGuardText2: ; 5139e (14:539e) +VictoryRoadGuardText2: TX_FAR _VictoryRoadGuardText2 - db $b + TX_SFX_ITEM_1 TX_FAR _VictoryRoadGuardText_513a3 db "@" -Route23Text8: ; 513a8 (14:53a8) +Route23Text8: TX_FAR _Route23Text8 db "@" diff --git a/scripts/route24.asm b/scripts/route24.asm index 6916cbe7..f55d2268 100755 --- a/scripts/route24.asm +++ b/scripts/route24.asm @@ -1,85 +1,81 @@ -Route24Script: ; 513ad (14:53ad) +Route24Script: call EnableAutoTextBoxDrawing - ld hl, Route24TrainerHeaders + ld hl, Route24TrainerHeader0 ld de, Route24ScriptPointers - ld a, [W_ROUTE24CURSCRIPT] + ld a, [wRoute24CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE24CURSCRIPT], a + ld [wRoute24CurScript], a ret -Route24Script_513c0: ; 513c0 (14:53c0) +Route24Script_513c0: xor a ld [wJoyIgnore], a - ld [W_ROUTE24CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute24CurScript], a + ld [wCurMapScript], a ret -Route24ScriptPointers: ; 513cb (14:53cb) +Route24ScriptPointers: dw Route24Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw Route24Script3 dw Route24Script4 -Route24Script0: ; 513d5 (14:53d5) - ld a, [wd7ef] - bit 0, a +Route24Script0: + CheckEvent EVENT_GOT_NUGGET 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 [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd7f0 - bit 1, [hl] - res 1, [hl] + CheckAndResetEvent EVENT_NUGGET_REWARD_AVAILABLE ret z - ld a, $80 + ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $4 - ld [W_ROUTE24CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute24CurScript], a + ld [wCurMapScript], a ret -CoordsData_5140e: ; 5140e (14:540e) +CoordsData_5140e: db $0F,$0A,$FF -Route24Script4: ; 51411 (14:5411) +Route24Script4: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 ld a, $0 - ld [W_ROUTE24CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute24CurScript], a + ld [wCurMapScript], a ret -Route24Script3: ; 51422 (14:5422) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +Route24Script3: + ld a, [wIsInBattle] cp $ff jp z, Route24Script_513c0 call UpdateSprites ld a, $f0 ld [wJoyIgnore], a - ld hl, wd7ef - set 1, [hl] + SetEvent EVENT_BEAT_ROUTE24_ROCKET ld a, $1 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a ld a, $0 - ld [W_ROUTE24CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute24CurScript], a + ld [wCurMapScript], a ret -Route24TextPointers: ; 5144b (14:544b) +Route24TextPointers: dw Route24Text1 dw Route24Text2 dw Route24Text3 @@ -87,79 +83,75 @@ Route24TextPointers: ; 5144b (14:544b) dw Route24Text5 dw Route24Text6 dw Route24Text7 - dw Predef5CText + dw PickUpItemText -Route24TrainerHeaders: ; 5145b (14:545b) -Route24TrainerHeader0: ; 5145b (14:545b) - db $2 ; flag's bit +Route24TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_0 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 - -Route24TrainerHeader2: ; 51467 (14:5467) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_0 + dw Route24BattleText1 ; TextBeforeBattle + dw Route24AfterBattleText1 ; TextAfterBattle + dw Route24EndBattleText1 ; TextEndBattle + dw Route24EndBattleText1 ; TextEndBattle + +Route24TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_1 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 - -Route24TrainerHeader3: ; 51473 (14:5473) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_1 + dw Route24BattleText2 ; TextBeforeBattle + dw Route24AfterBattleText2 ; TextAfterBattle + dw Route24EndBattleText2 ; TextEndBattle + dw Route24EndBattleText2 ; TextEndBattle + +Route24TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_2 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 - -Route24TrainerHeader4: ; 5147f (14:547f) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_2 + dw Route24BattleText3 ; TextBeforeBattle + dw Route24AfterBattleText3 ; TextAfterBattle + dw Route24EndBattleText3 ; TextEndBattle + dw Route24EndBattleText3 ; TextEndBattle + +Route24TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_3 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 - -Route24TrainerHeader5: ; 5148b (14:548b) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_3 + dw Route24BattleText4 ; TextBeforeBattle + dw Route24AfterBattleText4 ; TextAfterBattle + dw Route24EndBattleText4 ; TextEndBattle + dw Route24EndBattleText4 ; TextEndBattle + +Route24TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_4 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 - -Route24TrainerHeader6: ; 51497 (14:5497) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_4 + dw Route24BattleText5 ; TextBeforeBattle + dw Route24AfterBattleText5 ; TextAfterBattle + dw Route24EndBattleText5 ; TextEndBattle + dw Route24EndBattleText5 ; TextEndBattle + +Route24TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_5 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_5 + dw Route24BattleText6 ; TextBeforeBattle + dw Route24AfterBattleText6 ; TextAfterBattle + dw Route24EndBattleText6 ; TextEndBattle + dw Route24EndBattleText6 ; TextEndBattle db $ff -Route24Text1: ; 514a4 (14:54a4) - db $8 - ld hl, wd7f0 - res 1, [hl] - ld a, [wd7ef] - bit 0, a - jr nz, .asm_a03f5 ; 0x514af $48 +Route24Text1: + TX_ASM + ResetEvent EVENT_NUGGET_REWARD_AVAILABLE + CheckEvent EVENT_GOT_NUGGET + jr nz, .asm_514f9 ld hl, Route24Text_51510 call PrintText - ld bc, (NUGGET << 8) | 1 + lb bc, NUGGET, 1 call GiveItem jr nc, .BagFull - ld hl, wd7ef - set 0, [hl] + SetEvent EVENT_GOT_NUGGET ld hl, Route24Text_5151a call PrintText ld hl, Route24Text_51526 @@ -170,157 +162,158 @@ Route24Text1: ; 514a4 (14:54a4) ld hl, Route24Text_5152b ld de, Route24Text_5152b call SaveEndBattleTextPointers - ld a, [$ff8c] + ld a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a ld [hJoyHeld], a ld a, $3 - ld [W_ROUTE24CURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute24CurScript], a + ld [wCurMapScript], a jp TextScriptEnd -.asm_a03f5 ; 0x514f9 +.asm_514f9 ld hl, Route24Text_51530 call PrintText jp TextScriptEnd .BagFull ld hl, Route24Text_51521 call PrintText - ld hl, wd7f0 - set 1, [hl] + SetEvent EVENT_NUGGET_REWARD_AVAILABLE jp TextScriptEnd -Route24Text_51510: ; 51510 (14:5510) - TX_FAR _Route24Text_51510 ; 0x92721 - db $0B - TX_FAR _Route24Text_51515 ; 0x92755 +Route24Text_51510: + TX_FAR _Route24Text_51510 + TX_SFX_ITEM_1 + TX_FAR _Route24Text_51515 db "@" -Route24Text_5151a: ; 5151a (14:551a) - TX_FAR _Route24Text_5151a ; 0x92779 - db $0B, $6, "@" +Route24Text_5151a: + TX_FAR _Route24Text_5151a + TX_SFX_ITEM_1 + TX_BLINK + db "@" -Route24Text_51521: ; 51521 (14:5521) +Route24Text_51521: TX_FAR _Route24Text_51521 db "@" -Route24Text_51526: ; 51526 (14:5526) +Route24Text_51526: TX_FAR _Route24Text_51526 db "@" -Route24Text_5152b: ; 5152b (14:552b) +Route24Text_5152b: TX_FAR _Route24Text_5152b db "@" -Route24Text_51530: ; 51530 (14:5530) +Route24Text_51530: TX_FAR _Route24Text_51530 db "@" -Route24Text2: ; 51535 (14:5535) - db $08 ; asm +Route24Text2: + TX_ASM ld hl, Route24TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route24Text3: ; 5153f (14:553f) - db $08 ; asm +Route24Text3: + TX_ASM + ld hl, Route24TrainerHeader1 + call TalkToTrainer + jp TextScriptEnd + +Route24Text4: + TX_ASM ld hl, Route24TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route24Text4: ; 51549 (14:5549) - db $08 ; asm +Route24Text5: + TX_ASM ld hl, Route24TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route24Text5: ; 51553 (14:5553) - db $08 ; asm +Route24Text6: + TX_ASM ld hl, Route24TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route24Text6: ; 5155d (14:555d) - db $08 ; asm +Route24Text7: + TX_ASM ld hl, Route24TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route24Text7: ; 51567 (14:5567) - db $08 ; asm - ld hl, Route24TrainerHeader6 - call TalkToTrainer - jp TextScriptEnd - -Route24BattleText1: ; 51571 (14:5571) +Route24BattleText1: TX_FAR _Route24BattleText1 db "@" -Route24EndBattleText1: ; 51576 (14:5576) +Route24EndBattleText1: TX_FAR _Route24EndBattleText1 db "@" -Route24AfterBattleText1: ; 5157b (14:557b) +Route24AfterBattleText1: TX_FAR _Route24AfterBattleText1 db "@" -Route24BattleText2: ; 51580 (14:5580) +Route24BattleText2: TX_FAR _Route24BattleText2 db "@" -Route24EndBattleText2: ; 51585 (14:5585) +Route24EndBattleText2: TX_FAR _Route24EndBattleText2 db "@" -Route24AfterBattleText2: ; 5158a (14:558a) +Route24AfterBattleText2: TX_FAR _Route24AfterBattleText2 db "@" -Route24BattleText3: ; 5158f (14:558f) +Route24BattleText3: TX_FAR _Route24BattleText3 db "@" -Route24EndBattleText3: ; 51594 (14:5594) +Route24EndBattleText3: TX_FAR _Route24EndBattleText3 db "@" -Route24AfterBattleText3: ; 51599 (14:5599) +Route24AfterBattleText3: TX_FAR _Route24AfterBattleText3 db "@" -Route24BattleText4: ; 5159e (14:559e) +Route24BattleText4: TX_FAR _Route24BattleText4 db "@" -Route24EndBattleText4: ; 515a3 (14:55a3) +Route24EndBattleText4: TX_FAR _Route24EndBattleText4 db "@" -Route24AfterBattleText4: ; 515a8 (14:55a8) +Route24AfterBattleText4: TX_FAR _Route24AfterBattleText4 db "@" -Route24BattleText5: ; 515ad (14:55ad) +Route24BattleText5: TX_FAR _Route24BattleText5 db "@" -Route24EndBattleText5: ; 515b2 (14:55b2) +Route24EndBattleText5: TX_FAR _Route24EndBattleText5 db "@" -Route24AfterBattleText5: ; 515b7 (14:55b7) +Route24AfterBattleText5: TX_FAR _Route24AfterBattleText5 db "@" -Route24BattleText6: ; 515bc (14:55bc) +Route24BattleText6: TX_FAR _Route24BattleText6 db "@" -Route24EndBattleText6: ; 515c1 (14:55c1) +Route24EndBattleText6: TX_FAR _Route24EndBattleText6 db "@" -Route24AfterBattleText6: ; 515c6 (14:55c6) +Route24AfterBattleText6: TX_FAR _Route24AfterBattleText6 db "@" diff --git a/scripts/route25.asm b/scripts/route25.asm index b915bdee..c83c725b 100755 --- a/scripts/route25.asm +++ b/scripts/route25.asm @@ -1,47 +1,46 @@ -Route25Script: ; 515cb (14:55cb) +Route25Script: call Route25Script_515e1 call EnableAutoTextBoxDrawing - ld hl, Route25TrainerHeaders + ld hl, Route25TrainerHeader0 ld de, Route25ScriptPointers - ld a, [W_ROUTE25CURSCRIPT] + ld a, [wRoute25CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE25CURSCRIPT], a + ld [wRoute25CurScript], a ret -Route25Script_515e1: ; 515e1 (14:55e1) - ld hl, wd126 +Route25Script_515e1: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] ret z - ld hl, wd7f2 - bit 7, [hl] + CheckEventHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ret nz - bit 5, [hl] + CheckEventReuseHL EVENT_MET_BILL_2 jr nz, .asm_515ff - res 6, [hl] + ResetEventReuseHL EVENT_BILL_SAID_USE_CELL_SEPARATOR ld a, HS_BILL_POKEMON - ld [wcc4d], a + ld [wMissableObjectIndex], a predef_jump ShowObject .asm_515ff - bit 4, [hl] + CheckEventAfterBranchReuseHL EVENT_GOT_SS_TICKET, EVENT_MET_BILL_2 ret z - set 7, [hl] + SetEventReuseHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING ld a, HS_NUGGET_BRIDGE_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_BILL_1 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_BILL_2 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef_jump ShowObject -Route25ScriptPointers: ; 51622 (14:5622) +Route25ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route25TextPointers: ; 51628 (14:5628) +Route25TextPointers: dw Route25Text1 dw Route25Text2 dw Route25Text3 @@ -51,255 +50,254 @@ Route25TextPointers: ; 51628 (14:5628) dw Route25Text7 dw Route25Text8 dw Route25Text9 - dw Predef5CText + dw PickUpItemText dw Route25Text11 -Route25TrainerHeaders: ; 5163e (14:563e) -Route25TrainerHeader0: ; 5163e (14:563e) - db $1 ; flag's bit +Route25TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_0 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 - -Route25TrainerHeader2: ; 5164a (14:564a) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_0 + dw Route25BattleText1 ; TextBeforeBattle + dw Route25AfterBattleText1 ; TextAfterBattle + dw Route25EndBattleText1 ; TextEndBattle + dw Route25EndBattleText1 ; TextEndBattle + +Route25TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_1 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 - -Route25TrainerHeader3: ; 51656 (14:5656) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_1 + dw Route25BattleText2 ; TextBeforeBattle + dw Route25AfterBattleText2 ; TextAfterBattle + dw Route25EndBattleText2 ; TextEndBattle + dw Route25EndBattleText2 ; TextEndBattle + +Route25TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_2 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 - -Route25TrainerHeader4: ; 51662 (14:5662) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_2 + dw Route25BattleText3 ; TextBeforeBattle + dw Route25AfterBattleText3 ; TextAfterBattle + dw Route25EndBattleText3 ; TextEndBattle + dw Route25EndBattleText3 ; TextEndBattle + +Route25TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_3 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 - -Route25TrainerHeader5: ; 5166e (14:566e) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_3 + dw Route25BattleText4 ; TextBeforeBattle + dw Route25AfterBattleText4 ; TextAfterBattle + dw Route25EndBattleText4 ; TextEndBattle + dw Route25EndBattleText4 ; TextEndBattle + +Route25TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_4 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 - -Route25TrainerHeader6: ; 5167a (14:567a) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_4 + dw Route25BattleText5 ; TextBeforeBattle + dw Route25AfterBattleText5 ; TextAfterBattle + dw Route25EndBattleText5 ; TextEndBattle + dw Route25EndBattleText5 ; TextEndBattle + +Route25TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_5 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 - -Route25TrainerHeader7: ; 51686 (14:5686) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_5 + dw Route25BattleText6 ; TextBeforeBattle + dw Route25AfterBattleText6 ; TextAfterBattle + dw Route25EndBattleText6 ; TextEndBattle + dw Route25EndBattleText6 ; TextEndBattle + +Route25TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_6 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 - -Route25TrainerHeader8: ; 51692 (14:5692) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_6 + dw Route25BattleText7 ; TextBeforeBattle + dw Route25AfterBattleText7 ; TextAfterBattle + dw Route25EndBattleText7 ; TextEndBattle + dw Route25EndBattleText7 ; TextEndBattle + +Route25TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_7, 1 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 - -Route25TrainerHeader9: ; 5169e (14:569e) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_7, 1 + dw Route25BattleText8 ; TextBeforeBattle + dw Route25AfterBattleText8 ; TextAfterBattle + dw Route25EndBattleText8 ; TextEndBattle + dw Route25EndBattleText8 ; TextEndBattle + +Route25TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_8, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_8, 1 + dw Route25BattleText9 ; TextBeforeBattle + dw Route25AfterBattleText9 ; TextAfterBattle + dw Route25EndBattleText9 ; TextEndBattle + dw Route25EndBattleText9 ; TextEndBattle db $ff -Route25Text1: ; 516ab (14:56ab) - db $08 ; asm +Route25Text1: + TX_ASM ld hl, Route25TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route25Text2: ; 516b5 (14:56b5) - db $08 ; asm +Route25Text2: + TX_ASM + ld hl, Route25TrainerHeader1 + call TalkToTrainer + jp TextScriptEnd + +Route25Text3: + TX_ASM ld hl, Route25TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route25Text3: ; 516bf (14:56bf) - db $08 ; asm +Route25Text4: + TX_ASM ld hl, Route25TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route25Text4: ; 516c9 (14:56c9) - db $08 ; asm +Route25Text5: + TX_ASM ld hl, Route25TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route25Text5: ; 516d3 (14:56d3) - db $08 ; asm +Route25Text6: + TX_ASM ld hl, Route25TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route25Text6: ; 516dd (14:56dd) - db $08 ; asm +Route25Text7: + TX_ASM ld hl, Route25TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route25Text7: ; 516e7 (14:56e7) - db $08 ; asm +Route25Text8: + TX_ASM ld hl, Route25TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route25Text8: ; 516f1 (14:56f1) - db $08 ; asm +Route25Text9: + TX_ASM ld hl, Route25TrainerHeader8 call TalkToTrainer jp TextScriptEnd -Route25Text9: ; 516fb (14:56fb) - db $08 ; asm - ld hl, Route25TrainerHeader9 - call TalkToTrainer - jp TextScriptEnd - -Route25BattleText1: ; 51705 (14:5705) +Route25BattleText1: TX_FAR _Route25BattleText1 db "@" -Route25EndBattleText1: ; 5170a (14:570a) +Route25EndBattleText1: TX_FAR _Route25EndBattleText1 db "@" -Route25AfterBattleText1: ; 5170f (14:570f) +Route25AfterBattleText1: TX_FAR _Route25AfterBattleText1 db "@" -Route25BattleText2: ; 51714 (14:5714) +Route25BattleText2: TX_FAR _Route25BattleText2 db "@" -Route25EndBattleText2: ; 51719 (14:5719) +Route25EndBattleText2: TX_FAR _Route25EndBattleText2 db "@" -Route25AfterBattleText2: ; 5171e (14:571e) +Route25AfterBattleText2: TX_FAR _Route25AfterBattleText2 db "@" -Route25BattleText3: ; 51723 (14:5723) +Route25BattleText3: TX_FAR _Route25BattleText3 db "@" -Route25EndBattleText3: ; 51728 (14:5728) +Route25EndBattleText3: TX_FAR _Route25EndBattleText3 db "@" -Route25AfterBattleText3: ; 5172d (14:572d) +Route25AfterBattleText3: TX_FAR _Route25AfterBattleText3 db "@" -Route25BattleText4: ; 51732 (14:5732) +Route25BattleText4: TX_FAR _Route25BattleText4 db "@" -Route25EndBattleText4: ; 51737 (14:5737) +Route25EndBattleText4: TX_FAR _Route25EndBattleText4 db "@" -Route25AfterBattleText4: ; 5173c (14:573c) +Route25AfterBattleText4: TX_FAR _Route25AfterBattleText4 db "@" -Route25BattleText5: ; 51741 (14:5741) +Route25BattleText5: TX_FAR _Route25BattleText5 db "@" -Route25EndBattleText5: ; 51746 (14:5746) +Route25EndBattleText5: TX_FAR _Route25EndBattleText5 db "@" -Route25AfterBattleText5: ; 5174b (14:574b) +Route25AfterBattleText5: TX_FAR _Route25AfterBattleText5 db "@" -Route25BattleText6: ; 51750 (14:5750) +Route25BattleText6: TX_FAR _Route25BattleText6 db "@" -Route25EndBattleText6: ; 51755 (14:5755) +Route25EndBattleText6: TX_FAR _Route25EndBattleText6 db "@" -Route25AfterBattleText6: ; 5175a (14:575a) +Route25AfterBattleText6: TX_FAR _Route25AfterBattleText6 db "@" -Route25BattleText7: ; 5175f (14:575f) +Route25BattleText7: TX_FAR _Route25BattleText7 db "@" -Route25EndBattleText7: ; 51764 (14:5764) +Route25EndBattleText7: TX_FAR _Route25EndBattleText7 db "@" -Route25AfterBattleText7: ; 51769 (14:5769) +Route25AfterBattleText7: TX_FAR _Route25AfterBattleText7 db "@" -Route25BattleText8: ; 5176e (14:576e) +Route25BattleText8: TX_FAR _Route25BattleText8 db "@" -Route25EndBattleText8: ; 51773 (14:5773) +Route25EndBattleText8: TX_FAR _Route25EndBattleText8 db "@" -Route25AfterBattleText8: ; 51778 (14:5778) +Route25AfterBattleText8: TX_FAR _Route25AfterBattleText8 db "@" -Route25BattleText9: ; 5177d (14:577d) +Route25BattleText9: TX_FAR _Route25BattleText9 db "@" -Route25EndBattleText9: ; 51782 (14:5782) +Route25EndBattleText9: TX_FAR _Route25EndBattleText9 db "@" -Route25AfterBattleText9: ; 51787 (14:5787) +Route25AfterBattleText9: TX_FAR _Route25AfterBattleText9 db "@" -Route25Text11: ; 5178c (14:578c) +Route25Text11: TX_FAR _Route25Text11 db "@" diff --git a/scripts/route2gate.asm b/scripts/route2gate.asm index 8ee087c8..34f1aa35 100755 --- a/scripts/route2gate.asm +++ b/scripts/route2gate.asm @@ -1,41 +1,39 @@ -Route2GateScript: ; 5d5d4 (17:55d4) +Route2GateScript: jp EnableAutoTextBoxDrawing -Route2GateTextPointers: ; 5d5d7 (17:55d7) +Route2GateTextPointers: dw Route2GateText1 dw Route2GateText2 -Route2GateText1: ; 5d5db (17:55db) - db $08 ; asm - ld a, [wd7c2] - bit 0, a - jr nz, .asm_6592c ; 0x5d5e1 +Route2GateText1: + TX_ASM + CheckEvent EVENT_GOT_HM05 + jr nz, .asm_5d60d ld a, 10 ; pokemon needed - ldh [$db], a + ld [hOaksAideRequirement], a ld a, HM_05 ; oak's aide reward - ldh [$dc], a + ld [hOaksAideRewardItem], a ld [wd11e], a - call GetItemName ; $2fcf + call GetItemName ld hl, wcd6d - ld de, wcc5b - ld bc, $000d + ld de, wOaksAideRewardItemName + ld bc, ITEM_NAME_LENGTH call CopyData - predef OaksAideScript ; call oak's aide script - ldh a, [$db] + predef OaksAideScript + ld a, [hOaksAideResult] cp $1 - jr nz, .asm_ad646 ; 0x5d606 - ld hl, wd7c2 - set 0, [hl] -.asm_6592c ; 0x5d60d + jr nz, .asm_5d613 + SetEvent EVENT_GOT_HM05 +.asm_5d60d ld hl, Route2GateText_5d616 call PrintText -.asm_ad646 ; 0x5d613 +.asm_5d613 jp TextScriptEnd -Route2GateText_5d616: ; 5d616 (17:5616) +Route2GateText_5d616: TX_FAR _Route2GateText_5d616 db "@" -Route2GateText2: ; 5d61b (17:561b) +Route2GateText2: TX_FAR _Route2GateText2 db "@" diff --git a/scripts/route2house.asm b/scripts/route2house.asm index ba13605b..95055aec 100755 --- a/scripts/route2house.asm +++ b/scripts/route2house.asm @@ -1,16 +1,16 @@ -Route2HouseScript: ; 1deed (7:5eed) +Route2HouseScript: jp EnableAutoTextBoxDrawing -Route2HouseTextPointers: ; 1def0 (7:5ef0) +Route2HouseTextPointers: dw Route2HouseText1 dw Route2HouseText2 -Route2HouseText1: ; 1def4 (7:5ef4) +Route2HouseText1: TX_FAR _Route2HouseText1 db "@" -Route2HouseText2: ; 1def9 (7:5ef9) - db $08 ; asm +Route2HouseText2: + TX_ASM ld a, $1 ld [wWhichTrade], a predef DoInGameTradeDialogue diff --git a/scripts/route3.asm b/scripts/route3.asm index acb2afce..e4748b8c 100755 --- a/scripts/route3.asm +++ b/scripts/route3.asm @@ -1,18 +1,18 @@ -Route3Script: ; 554f8 (15:54f8) +Route3Script: call EnableAutoTextBoxDrawing ld hl, Route3TrainerHeader0 ld de, Route3ScriptPointers - ld a, [W_ROUTE3CURSCRIPT] + ld a, [wRoute3CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE3CURSCRIPT], a + ld [wRoute3CurScript], a ret -Route3ScriptPointers: ; 5550b (15:550b) +Route3ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route3TextPointers: ; 55511 (15:5511) +Route3TextPointers: dw Route3Text1 dw Route3Text2 dw Route3Text3 @@ -24,229 +24,228 @@ Route3TextPointers: ; 55511 (15:5511) dw Route3Text9 dw Route3Text10 -Route3TrainerHeaders: ; 55525 (15:5525) -Route3TrainerHeader0: ; 55525 (15:5525) - db $2 ; flag's bit +Route3TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_0 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 - -Route3TrainerHeader2: ; 55531 (15:5531) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_0 + dw Route3BattleText1 ; TextBeforeBattle + dw Route3AfterBattleText1 ; TextAfterBattle + dw Route3EndBattleText1 ; TextEndBattle + dw Route3EndBattleText1 ; TextEndBattle + +Route3TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_1 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 - -Route3TrainerHeader3: ; 5553d (15:553d) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_1 + dw Route3BattleText2 ; TextBeforeBattle + dw Route3AfterBattleText2 ; TextAfterBattle + dw Route3EndBattleText2 ; TextEndBattle + dw Route3EndBattleText2 ; TextEndBattle + +Route3TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_2 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 - -Route3TrainerHeader4: ; 55549 (15:5549) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_2 + dw Route3BattleText3 ; TextBeforeBattle + dw Route3AfterBattleText3 ; TextAfterBattle + dw Route3EndBattleText3 ; TextEndBattle + dw Route3EndBattleText3 ; TextEndBattle + +Route3TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_3 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 - -Route3TrainerHeader5: ; 55555 (15:5555) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_3 + dw Route3BattleText4 ; TextBeforeBattle + dw Route3AfterBattleText4 ; TextAfterBattle + dw Route3EndBattleText4 ; TextEndBattle + dw Route3EndBattleText4 ; TextEndBattle + +Route3TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_4 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 - -Route3TrainerHeader6: ; 55561 (15:5561) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_4 + dw Route3BattleText5 ; TextBeforeBattle + dw Route3AfterBattleText5 ; TextAfterBattle + dw Route3EndBattleText5 ; TextEndBattle + dw Route3EndBattleText5 ; TextEndBattle + +Route3TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_5 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 - -Route3TrainerHeader7: ; 5556d (15:556d) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_5 + dw Route3BattleText6 ; TextBeforeBattle + dw Route3AfterBattleText6 ; TextAfterBattle + dw Route3EndBattleText6 ; TextEndBattle + dw Route3EndBattleText6 ; TextEndBattle + +Route3TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_6, 1 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 - -Route3TrainerHeader8: ; 55579 (15:5579) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_6, 1 + dw Route3BattleText7 ; TextBeforeBattle + dw Route3AfterBattleText7 ; TextAfterBattle + dw Route3EndBattleText7 ; TextEndBattle + dw Route3EndBattleText7 ; TextEndBattle + +Route3TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_7, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_7, 1 + dw Route3BattleText8 ; TextBeforeBattle + dw Route3AfterBattleText8 ; TextAfterBattle + dw Route3EndBattleText8 ; TextEndBattle + dw Route3EndBattleText8 ; TextEndBattle db $ff -Route3Text1: ; 55586 (15:5586) +Route3Text1: TX_FAR _Route3Text1 db "@" -Route3Text2: ; 5558b (15:558b) - db $08 ; asm +Route3Text2: + TX_ASM ld hl, Route3TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route3BattleText1: ; 55595 (15:5595) +Route3BattleText1: TX_FAR _Route3BattleText1 db "@" -Route3EndBattleText1: ; 5559a (15:559a) +Route3EndBattleText1: TX_FAR _Route3EndBattleText1 db "@" -Route3AfterBattleText1: ; 5559f (15:559f) +Route3AfterBattleText1: TX_FAR _Route3AfterBattleText1 db "@" -Route3Text3: ; 555a4 (15:55a4) - db $08 ; asm - ld hl, Route3TrainerHeader2 +Route3Text3: + TX_ASM + ld hl, Route3TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route3BattleText2: ; 555ae (15:55ae) +Route3BattleText2: TX_FAR _Route3BattleText2 db "@" -Route3EndBattleText2: ; 555b3 (15:55b3) +Route3EndBattleText2: TX_FAR _Route3EndBattleText2 db "@" -Route3AfterBattleText2: ; 555b8 (15:55b8) +Route3AfterBattleText2: TX_FAR _Route3AfterBattleText2 db "@" -Route3Text4: ; 555bd (15:55bd) - db $08 ; asm - ld hl, Route3TrainerHeader3 +Route3Text4: + TX_ASM + ld hl, Route3TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route3BattleText3: ; 555c7 (15:55c7) +Route3BattleText3: TX_FAR _Route3BattleText3 db "@" -Route3EndBattleText3: ; 555cc (15:55cc) +Route3EndBattleText3: TX_FAR _Route3EndBattleText3 db "@" -Route3AfterBattleText3: ; 555d1 (15:55d1) +Route3AfterBattleText3: TX_FAR _Route3AfterBattleText3 db "@" -Route3Text5: ; 555d6 (15:55d6) - db $08 ; asm - ld hl, Route3TrainerHeader4 +Route3Text5: + TX_ASM + ld hl, Route3TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route3BattleText4: ; 555e0 (15:55e0) +Route3BattleText4: TX_FAR _Route3BattleText4 db "@" -Route3EndBattleText4: ; 555e5 (15:55e5) +Route3EndBattleText4: TX_FAR _Route3EndBattleText4 db "@" -Route3AfterBattleText4: ; 555ea (15:55ea) +Route3AfterBattleText4: TX_FAR _Route3AfterBattleText4 db "@" -Route3Text6: ; 555ef (15:55ef) - db $08 ; asm - ld hl, Route3TrainerHeader5 +Route3Text6: + TX_ASM + ld hl, Route3TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route3BattleText5: ; 555f9 (15:55f9) +Route3BattleText5: TX_FAR _Route3BattleText5 db "@" -Route3EndBattleText5: ; 555fe (15:55fe) +Route3EndBattleText5: TX_FAR _Route3EndBattleText5 db "@" -Route3AfterBattleText5: ; 55603 (15:5603) +Route3AfterBattleText5: TX_FAR _Route3AfterBattleText5 db "@" -Route3Text7: ; 55608 (15:5608) - db $08 ; asm - ld hl, Route3TrainerHeader6 +Route3Text7: + TX_ASM + ld hl, Route3TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route3BattleText6: ; 55612 (15:5612) +Route3BattleText6: TX_FAR _Route3BattleText6 db "@" -Route3EndBattleText6: ; 55617 (15:5617) +Route3EndBattleText6: TX_FAR _Route3EndBattleText6 db "@" -Route3AfterBattleText6: ; 5561c (15:561c) +Route3AfterBattleText6: TX_FAR _Route3AfterBattleText6 db "@" -Route3Text8: ; 55621 (15:5621) - db $08 ; asm - ld hl, Route3TrainerHeader7 +Route3Text8: + TX_ASM + ld hl, Route3TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route3BattleText7: ; 5562b (15:562b) +Route3BattleText7: TX_FAR _Route3BattleText7 db "@" -Route3EndBattleText7: ; 55630 (15:5630) +Route3EndBattleText7: TX_FAR _Route3EndBattleText7 db "@" -Route3AfterBattleText7: ; 55635 (15:5635) +Route3AfterBattleText7: TX_FAR _Route3AfterBattleText7 db "@" -Route3Text9: ; 5563a (15:563a) - db $08 ; asm - ld hl, Route3TrainerHeader8 +Route3Text9: + TX_ASM + ld hl, Route3TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route3BattleText8: ; 55644 (15:5644) +Route3BattleText8: TX_FAR _Route3BattleText8 db "@" -Route3EndBattleText8: ; 55649 (15:5649) +Route3EndBattleText8: TX_FAR _Route3EndBattleText8 db "@" -Route3AfterBattleText8: ; 5564e (15:564e) +Route3AfterBattleText8: TX_FAR _Route3AfterBattleText8 db "@" -Route3Text10: ; 55653 (15:5653) +Route3Text10: TX_FAR _Route3Text10 db "@" diff --git a/scripts/route4.asm b/scripts/route4.asm index 5eafb4f7..ee9e2cdf 100755 --- a/scripts/route4.asm +++ b/scripts/route4.asm @@ -1,63 +1,62 @@ -Route4Script: ; 55658 (15:5658) +Route4Script: call EnableAutoTextBoxDrawing - ld hl, Route4TrainerHeaders + ld hl, Route4TrainerHeader0 ld de, Route4ScriptPointers - ld a, [W_ROUTE4CURSCRIPT] + ld a, [wRoute4CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE4CURSCRIPT], a + ld [wRoute4CurScript], a ret -Route4ScriptPointers: ; 5566b (15:566b) +Route4ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route4TextPointers: ; 55671 (15:5671) +Route4TextPointers: dw Route4Text1 dw Route4Text2 - dw Predef5CText + dw PickUpItemText dw PokeCenterSignText dw Route4Text5 dw Route4Text6 -Route4TrainerHeaders: ; 5567d (15:567d) -Route4TrainerHeader0: ; 5567d (15:567d) - db $2 ; flag's bit +Route4TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_4_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_4_TRAINER_0 + dw Route4BattleText1 ; TextBeforeBattle + dw Route4AfterBattleText1 ; TextAfterBattle + dw Route4EndBattleText1 ; TextEndBattle + dw Route4EndBattleText1 ; TextEndBattle db $ff -Route4Text1: ; 5568a (15:568a) +Route4Text1: TX_FAR _Route4Text1 db "@" -Route4Text2: ; 5568f (15:568f) - db $08 ; asm +Route4Text2: + TX_ASM ld hl, Route4TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route4BattleText1: ; 55699 (15:5699) +Route4BattleText1: TX_FAR _Route4BattleText1 db "@" -Route4EndBattleText1: ; 5569e (15:569e) +Route4EndBattleText1: TX_FAR _Route4EndBattleText1 db "@" -Route4AfterBattleText1: ; 556a3 (15:56a3) +Route4AfterBattleText1: TX_FAR _Route4AfterBattleText1 db "@" -Route4Text5: ; 556a8 (15:56a8) +Route4Text5: TX_FAR _Route4Text5 db "@" -Route4Text6: ; 556ad (15:56ad) +Route4Text6: TX_FAR _Route4Text6 db "@" diff --git a/scripts/route5.asm b/scripts/route5.asm index 1fad3939..113212a4 100755 --- a/scripts/route5.asm +++ b/scripts/route5.asm @@ -1,9 +1,9 @@ -Route5Script: ; 556b2 (15:56b2) +Route5Script: jp EnableAutoTextBoxDrawing -Route5TextPointers: ; 556b5 (15:56b5) +Route5TextPointers: dw Route5Text1 -Route5Text1: ; 556b7 (15:56b7) +Route5Text1: TX_FAR _Route5Text1 db "@" diff --git a/scripts/route5gate.asm b/scripts/route5gate.asm index bee70e77..6072f943 100755 --- a/scripts/route5gate.asm +++ b/scripts/route5gate.asm @@ -1,116 +1,116 @@ -Route5GateScript: ; 1df33 (7:5f33) +Route5GateScript: call EnableAutoTextBoxDrawing - ld a, [W_ROUTE5GATECURSCRIPT] + ld a, [wRoute5GateCurScript] ld hl, Route5GateScriptPointers jp CallFunctionInTable -Route5GateScriptPointers: ; 1df3f (7:5f3f) +Route5GateScriptPointers: dw Route5GateScript0 dw Route5GateScript1 -Route5GateScript_1df43: ; 1df43 (7:5f43) - ld a, $40 +Route5GateScript_1df43: + ld a, D_UP ld [wSimulatedJoypadStatesEnd], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a jp StartSimulatingJoypadStates -Route5GateScript0: ; 1df50 (7:5f50) +Route5GateScript0: ld a, [wd728] bit 6, a ret nz ld hl, CoordsData_1df8f call ArePlayerCoordsInArray ret nc - ld a, $2 - ld [wd528], a + ld a, PLAYER_DIR_LEFT + ld [wPlayerMovingDirection], a xor a ld [hJoyHeld], a callba RemoveGuardDrink ld a, [$ffdb] and a - jr nz, .asm_1df82 ; 0x1df70 $10 + jr nz, .asm_1df82 ld a, $2 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Route5GateScript_1df43 ld a, $1 - ld [W_ROUTE5GATECURSCRIPT], a + ld [wRoute5GateCurScript], a ret .asm_1df82 ld a, $3 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd728 set 6, [hl] ret -CoordsData_1df8f: ; 1df8f (7:5f8f) +CoordsData_1df8f: db 3,3 db 3,4 db $ff -Route5GateScript1: ; 1df94 (7:5f94) +Route5GateScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a ld [wJoyIgnore], a - ld [W_ROUTE5GATECURSCRIPT], a + ld [wRoute5GateCurScript], a ret -Route5GateTextPointers: ; 1dfa4 (7:5fa4) +Route5GateTextPointers: dw Route5GateText1 dw Route5GateText2 dw Route5GateText3 -Route8GateText1: ; 1dfaa (7:5faa) -Route7GateText1: ; 1dfaa (7:5faa) -Route6GateText1: ; 1dfaa (7:5faa) -Route5GateText1: ; 1dfaa (7:5faa) - db $8 +Route8GateText1: +Route7GateText1: +Route6GateText1: +Route5GateText1: + 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 + ld [wRoute5GateCurScript], 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 -Route8GateText2: ; 1dfe7 (7:5fe7) -Route7GateText2: ; 1dfe7 (7:5fe7) -Route6GateText2: ; 1dfe7 (7:5fe7) -Route5GateText2: ; 1dfe7 (7:5fe7) +Route8GateText2: +Route7GateText2: +Route6GateText2: +Route5GateText2: TX_FAR _SaffronGateText_1dfe7 db "@" -Route8GateText3: ; 1dfec (7:5fec) -Route7GateText3: ; 1dfec (7:5fec) -Route6GateText3: ; 1dfec (7:5fec) -Route5GateText3: ; 1dfec (7:5fec) - TX_FAR _SaffronGateText_8aaa9 ; 0x8aaa9 - db $11 - TX_FAR _SaffronGateText_1dff1 ; 0x8aaef +Route8GateText3: +Route7GateText3: +Route6GateText3: +Route5GateText3: + TX_FAR _SaffronGateText_8aaa9 + TX_SFX_KEY_ITEM + TX_FAR _SaffronGateText_1dff1 db "@" -SaffronGateText_1dff6: ; 1dff6 (7:5ff6) +SaffronGateText_1dff6: TX_FAR _SaffronGateText_1dff6 db "@" diff --git a/scripts/route6.asm b/scripts/route6.asm index ee6258cd..ba727adc 100755 --- a/scripts/route6.asm +++ b/scripts/route6.asm @@ -1,18 +1,18 @@ -Route6Script: ; 590b0 (16:50b0) +Route6Script: call EnableAutoTextBoxDrawing - ld hl, Route6TrainerHeaders + ld hl, Route6TrainerHeader0 ld de, Route6ScriptPointers - ld a, [W_ROUTE6CURSCRIPT] + ld a, [wRoute6CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE6CURSCRIPT], a + ld [wRoute6CurScript], a ret -Route6ScriptPointers: ; 590c3 (16:50c3) +Route6ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route6TextPointers: ; 590c9 (16:50c9) +Route6TextPointers: dw Route6Text1 dw Route6Text2 dw Route6Text3 @@ -21,167 +21,166 @@ Route6TextPointers: ; 590c9 (16:50c9) dw Route6Text6 dw Route6Text7 -Route6TrainerHeaders: ; 590d7 (16:50d7) -Route6TrainerHeader0: ; 590d7 (16:50d7) - db $1 ; flag's bit +Route6TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_0 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 - -Route6TrainerHeader1: ; 590e3 (16:50e3) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_0 + dw Route6BattleText1 ; TextBeforeBattle + dw Route6AfterBattleText1 ; TextAfterBattle + dw Route6EndBattleText1 ; TextEndBattle + dw Route6EndBattleText1 ; TextEndBattle + +Route6TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_1 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 - -Route6TrainerHeader2: ; 590ef (16:50ef) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_1 + dw Route6BattleText2 ; TextBeforeBattle + dw Route6AfterBattleText1 ; TextAfterBattle + dw Route6EndBattleText2 ; TextEndBattle + dw Route6EndBattleText2 ; TextEndBattle + +Route6TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_2 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 - -Route6TrainerHeader3: ; 590fb (16:50fb) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_2 + dw Route6BattleText3 ; TextBeforeBattle + dw Route6AfterBattleText3 ; TextAfterBattle + dw Route6EndBattleText3 ; TextEndBattle + dw Route6EndBattleText3 ; TextEndBattle + +Route6TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_3 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 - -Route6TrainerHeader4: ; 59107 (16:5107) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_3 + dw Route6BattleText4 ; TextBeforeBattle + dw Route6AfterBattleText4 ; TextAfterBattle + dw Route6EndBattleText4 ; TextEndBattle + dw Route6EndBattleText4 ; TextEndBattle + +Route6TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_4 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 - -Route6TrainerHeader5: ; 59113 (16:5113) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_4 + dw Route6BattleText5 ; TextBeforeBattle + dw Route6AfterBattleText5 ; TextAfterBattle + dw Route6EndBattleText5 ; TextEndBattle + dw Route6EndBattleText5 ; TextEndBattle + +Route6TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_5 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_5 + dw Route6BattleText6 ; TextBeforeBattle + dw Route6AfterBattleText6 ; TextAfterBattle + dw Route6EndBattleText6 ; TextEndBattle + dw Route6EndBattleText6 ; TextEndBattle db $ff -Route6Text1: ; 59120 (16:5120) - db $8 +Route6Text1: + TX_ASM ld hl, Route6TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route6BattleText1: ; 5912a (16:512a) +Route6BattleText1: TX_FAR _Route6BattleText1 db "@" -Route6EndBattleText1: ; 5912f (16:512f) +Route6EndBattleText1: TX_FAR _Route6EndBattleText1 db "@" -Route6AfterBattleText1: ; 59134 (16:5134) +Route6AfterBattleText1: TX_FAR _Route6AfterBattleText1 db "@" -Route6Text2: ; 59139 (16:5139) - db $08 ; asm +Route6Text2: + TX_ASM ld hl, Route6TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route6BattleText2: ; 59143 (16:5143) +Route6BattleText2: TX_FAR _Route6BattleText2 db "@" -Route6EndBattleText2: ; 59148 (16:5148) +Route6EndBattleText2: TX_FAR _Route6EndBattleText2 db "@" -Route6Text3: ; 5914d (16:514d) - db $08 ; asm +Route6Text3: + TX_ASM ld hl, Route6TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route6BattleText3: ; 59157 (16:5157) +Route6BattleText3: TX_FAR _Route6BattleText3 db "@" -Route6EndBattleText3: ; 5915c (16:515c) +Route6EndBattleText3: TX_FAR _Route6EndBattleText3 db "@" -Route6AfterBattleText3: ; 59161 (16:5161) +Route6AfterBattleText3: TX_FAR _Route6AfterBattleText3 db "@" -Route6Text4: ; 59166 (16:5166) - db $08 ; asm +Route6Text4: + TX_ASM ld hl, Route6TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route6BattleText4: ; 59170 (16:5170) +Route6BattleText4: TX_FAR _Route6BattleText4 db "@" -Route6EndBattleText4: ; 59175 (16:5175) +Route6EndBattleText4: TX_FAR _Route6EndBattleText4 db "@" -Route6AfterBattleText4: ; 5917a (16:517a) +Route6AfterBattleText4: TX_FAR _Route6AfterBattleText4 db "@" -Route6Text5: ; 5917f (16:517f) - db $08 ; asm +Route6Text5: + TX_ASM ld hl, Route6TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route6BattleText5: ; 59189 (16:5189) +Route6BattleText5: TX_FAR _Route6BattleText5 db "@" -Route6EndBattleText5: ; 5918e (16:518e) +Route6EndBattleText5: TX_FAR _Route6EndBattleText5 db "@" -Route6AfterBattleText5: ; 59193 (16:5193) +Route6AfterBattleText5: TX_FAR _Route6AfterBattleText5 db "@" -Route6Text6: ; 59198 (16:5198) - db $08 ; asm +Route6Text6: + TX_ASM ld hl, Route6TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route6BattleText6: ; 591a2 (16:51a2) +Route6BattleText6: TX_FAR _Route6BattleText6 db "@" -Route6EndBattleText6: ; 591a7 (16:51a7) +Route6EndBattleText6: TX_FAR _Route6EndBattleText6 db "@" -Route6AfterBattleText6: ; 591ac (16:51ac) +Route6AfterBattleText6: TX_FAR _Route6AfterBattleText6 db "@" -Route6Text7: ; 591b1 (16:51b1) +Route6Text7: TX_FAR _Route6Text7 db "@" diff --git a/scripts/route6gate.asm b/scripts/route6gate.asm index 44d03a75..cf872f69 100755 --- a/scripts/route6gate.asm +++ b/scripts/route6gate.asm @@ -1,58 +1,58 @@ -Route6GateScript: ; 1e03d (7:603d) +Route6GateScript: call EnableAutoTextBoxDrawing ld hl, Route6GateScriptPointers - ld a, [W_ROUTE6GATECURSCRIPT] + ld a, [wRoute6GateCurScript] call CallFunctionInTable ret -Route6GateScriptPointers: ; 1e04a (7:604a) +Route6GateScriptPointers: dw Route6GateScript0 dw Route6GateScript1 -Route6GateScript0: ; 1e04e (7:604e) +Route6GateScript0: ld a, [wd728] bit 6, a ret nz ld hl, CoordsData_1e08c call ArePlayerCoordsInArray ret nc - ld a, $1 - ld [wd528], a + ld a, PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a xor a ld [hJoyHeld], a callba RemoveGuardDrink ld a, [$ffdb] and a - jr nz, .asm_1e080 ; 0x1e06e $10 + jr nz, .asm_1e080 ld a, $2 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Route6GateScript_1e0a1 ld a, $1 - ld [W_ROUTE6GATECURSCRIPT], a + ld [wRoute6GateCurScript], a ret .asm_1e080 ld hl, wd728 set 6, [hl] ld a, $3 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID -CoordsData_1e08c: ; 1e08c (7:608c) +CoordsData_1e08c: db $02,$03 db $02,$04,$FF -Route6GateScript1: ; 1e091 (7:6091) +Route6GateScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a ld [wJoyIgnore], a - ld [W_ROUTE6GATECURSCRIPT], a + ld [wRoute6GateCurScript], a ret -Route6GateScript_1e0a1: ; 1e0a1 (7:60a1) +Route6GateScript_1e0a1: ld hl, wd730 set 7, [hl] ld a, $80 @@ -64,7 +64,7 @@ Route6GateScript_1e0a1: ; 1e0a1 (7:60a1) ld [wOverrideSimulatedJoypadStatesMask], a ret -Route6GateTextPointers: ; 1e0b8 (7:60b8) +Route6GateTextPointers: dw Route6GateText1 dw Route6GateText2 dw Route6GateText3 diff --git a/scripts/route7.asm b/scripts/route7.asm index 484fc539..5e8288ea 100755 --- a/scripts/route7.asm +++ b/scripts/route7.asm @@ -1,9 +1,9 @@ -Route7Script: ; 48152 (12:4152) +Route7Script: jp EnableAutoTextBoxDrawing -Route7TextPointers: ; 48155 (12:4155) +Route7TextPointers: dw Route7Text1 -Route7Text1: ; 48157 (12:4157) +Route7Text1: TX_FAR _Route7Text1 db "@" diff --git a/scripts/route7gate.asm b/scripts/route7gate.asm index beab96bf..6d4e27bb 100755 --- a/scripts/route7gate.asm +++ b/scripts/route7gate.asm @@ -1,15 +1,15 @@ -Route7GateScript: ; 1e100 (7:6100) +Route7GateScript: call EnableAutoTextBoxDrawing - ld a, [W_ROUTE7GATECURSCRIPT] + ld a, [wRoute7GateCurScript] ld hl, Route7GateScriptPointers call CallFunctionInTable ret -Route7GateScriptPointers: ; 1e10d (7:610d) +Route7GateScriptPointers: dw Route7GateScript0 dw Route7GateScript1 -Route7GateScript_1e111: ; 1e111 (7:6111) +Route7GateScript_1e111: ld hl, wd730 set 7, [hl] ld a, $20 @@ -21,53 +21,53 @@ Route7GateScript_1e111: ; 1e111 (7:6111) ld [wOverrideSimulatedJoypadStatesMask], a ret -Route7GateScript0: ; 1e128 (7:6128) +Route7GateScript0: ld a, [wd728] bit 6, a ret nz ld hl, CoordsData_1e167 call ArePlayerCoordsInArray ret nc - ld a, $8 - ld [wd528], a + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a xor a ld [hJoyHeld], a callba RemoveGuardDrink ld a, [$ffdb] and a - jr nz, .asm_1e15a ; 0x1e148 $10 + jr nz, .asm_1e15a ld a, $2 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Route7GateScript_1e111 ld a, $1 - ld [W_ROUTE7GATECURSCRIPT], a + ld [wRoute7GateCurScript], a ret .asm_1e15a ld a, $3 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd728 set 6, [hl] ret -CoordsData_1e167: ; 1e167 (7:6167) +CoordsData_1e167: db 3,3 db 4,3 db $ff -Route7GateScript1: ; 1e16c (7:616c) +Route7GateScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a ld [wJoyIgnore], a - ld [W_ROUTE7GATECURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wRoute7GateCurScript], a + ld [wCurMapScript], a ret -Route7GateTextPointers: ; 1e17f (7:617f) +Route7GateTextPointers: dw Route7GateText1 dw Route7GateText2 dw Route7GateText3 diff --git a/scripts/route8.asm b/scripts/route8.asm index eed57c7b..e05508bb 100755 --- a/scripts/route8.asm +++ b/scripts/route8.asm @@ -1,18 +1,18 @@ -Route8Script: ; 591b6 (16:51b6) +Route8Script: call EnableAutoTextBoxDrawing - ld hl, Route8TrainerHeaders + ld hl, Route8TrainerHeader0 ld de, Route8ScriptPointers - ld a, [W_ROUTE8CURSCRIPT] + ld a, [wRoute8CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE8CURSCRIPT], a + ld [wRoute8CurScript], a ret -Route8ScriptPointers: ; 591c9 (16:51c9) +Route8ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route8TextPointers: ; 591cf (16:51cf) +Route8TextPointers: dw Route8Text1 dw Route8Text2 dw Route8Text3 @@ -24,252 +24,251 @@ Route8TextPointers: ; 591cf (16:51cf) dw Route8Text9 dw Route8Text10 -Route8TrainerHeaders: ; 591e3 (16:51e3) -Route8TrainerHeader0: ; 591e3 (16:51e3) - db $1 ; flag's bit +Route8TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_0 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 - -Route8TrainerHeader1: ; 591ef (16:51ef) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_0 + dw Route8BattleText1 ; TextBeforeBattle + dw Route8AfterBattleText1 ; TextAfterBattle + dw Route8EndBattleText1 ; TextEndBattle + dw Route8EndBattleText1 ; TextEndBattle + +Route8TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_1 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 - -Route8TrainerHeader2: ; 591fb (16:51fb) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_1 + dw Route8BattleText2 ; TextBeforeBattle + dw Route8AfterBattleText2 ; TextAfterBattle + dw Route8EndBattleText2 ; TextEndBattle + dw Route8EndBattleText2 ; TextEndBattle + +Route8TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_2 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 - -Route8TrainerHeader3: ; 59207 (16:5207) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_2 + dw Route8BattleText3 ; TextBeforeBattle + dw Route8AfterBattleText3 ; TextAfterBattle + dw Route8EndBattleText3 ; TextEndBattle + dw Route8EndBattleText3 ; TextEndBattle + +Route8TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_3 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 - -Route8TrainerHeader4: ; 59213 (16:5213) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_3 + dw Route8BattleText4 ; TextBeforeBattle + dw Route8AfterBattleText4 ; TextAfterBattle + dw Route8EndBattleText4 ; TextEndBattle + dw Route8EndBattleText4 ; TextEndBattle + +Route8TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_4 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 - -Route8TrainerHeader5: ; 5921f (16:521f) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_4 + dw Route8BattleText5 ; TextBeforeBattle + dw Route8AfterBattleText5 ; TextAfterBattle + dw Route8EndBattleText5 ; TextEndBattle + dw Route8EndBattleText5 ; TextEndBattle + +Route8TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_5 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 - -Route8TrainerHeader6: ; 5922b (16:522b) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_5 + dw Route8BattleText6 ; TextBeforeBattle + dw Route8AfterBattleText6 ; TextAfterBattle + dw Route8EndBattleText6 ; TextEndBattle + dw Route8EndBattleText6 ; TextEndBattle + +Route8TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_6 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 - -Route8TrainerHeader7: ; 59237 (16:5237) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_6 + dw Route8BattleText7 ; TextBeforeBattle + dw Route8AfterBattleText7 ; TextAfterBattle + dw Route8EndBattleText7 ; TextEndBattle + dw Route8EndBattleText7 ; TextEndBattle + +Route8TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_7, 1 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 - -Route8TrainerHeader8: ; 59243 (16:5243) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_7, 1 + dw Route8BattleText8 ; TextBeforeBattle + dw Route8AfterBattleText8 ; TextAfterBattle + dw Route8EndBattleText8 ; TextEndBattle + dw Route8EndBattleText8 ; TextEndBattle + +Route8TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_8, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_8, 1 + dw Route8BattleText9 ; TextBeforeBattle + dw Route8AfterBattleText9 ; TextAfterBattle + dw Route8EndBattleText9 ; TextEndBattle + dw Route8EndBattleText9 ; TextEndBattle db $ff -Route8Text1: ; 59250 (16:5250) - db $8 +Route8Text1: + TX_ASM ld hl, Route8TrainerHeader0 call TalkToTrainer jp TextScriptEnd -Route8BattleText1: ; 5925a (16:525a) +Route8BattleText1: TX_FAR _Route8BattleText1 db "@" -Route8EndBattleText1: ; 5925f (16:525f) +Route8EndBattleText1: TX_FAR _Route8EndBattleText1 db "@" -Route8AfterBattleText1: ; 59264 (16:5264) +Route8AfterBattleText1: TX_FAR _Route8AfterBattleText1 db "@" -Route8Text2: ; 59269 (16:5269) - db $08 ; asm +Route8Text2: + TX_ASM ld hl, Route8TrainerHeader1 call TalkToTrainer jp TextScriptEnd -Route8BattleText2: ; 59273 (16:5273) +Route8BattleText2: TX_FAR _Route8BattleText2 db "@" -Route8EndBattleText2: ; 59278 (16:5278) +Route8EndBattleText2: TX_FAR _Route8EndBattleText2 db "@" -Route8AfterBattleText2: ; 5927d (16:527d) +Route8AfterBattleText2: TX_FAR _Route8AfterBattleText2 db "@" -Route8Text3: ; 59282 (16:5282) - db $08 ; asm +Route8Text3: + TX_ASM ld hl, Route8TrainerHeader2 call TalkToTrainer jp TextScriptEnd -Route8BattleText3: ; 5928c (16:528c) +Route8BattleText3: TX_FAR _Route8BattleText3 db "@" -Route8EndBattleText3: ; 59291 (16:5291) +Route8EndBattleText3: TX_FAR _Route8EndBattleText3 db "@" -Route8AfterBattleText3: ; 59296 (16:5296) +Route8AfterBattleText3: TX_FAR _Route8AfterBattleText3 db "@" -Route8Text4: ; 5929b (16:529b) - db $08 ; asm +Route8Text4: + TX_ASM ld hl, Route8TrainerHeader3 call TalkToTrainer jp TextScriptEnd -Route8BattleText4: ; 592a5 (16:52a5) +Route8BattleText4: TX_FAR _Route8BattleText4 db "@" -Route8EndBattleText4: ; 592aa (16:52aa) +Route8EndBattleText4: TX_FAR _Route8EndBattleText4 db "@" -Route8AfterBattleText4: ; 592af (16:52af) +Route8AfterBattleText4: TX_FAR _Route8AfterBattleText4 db "@" -Route8Text5: ; 592b4 (16:52b4) - db $08 ; asm +Route8Text5: + TX_ASM ld hl, Route8TrainerHeader4 call TalkToTrainer jp TextScriptEnd -Route8BattleText5: ; 592be (16:52be) +Route8BattleText5: TX_FAR _Route8BattleText5 db "@" -Route8EndBattleText5: ; 592c3 (16:52c3) +Route8EndBattleText5: TX_FAR _Route8EndBattleText5 db "@" -Route8AfterBattleText5: ; 592c8 (16:52c8) +Route8AfterBattleText5: TX_FAR _Route8AfterBattleText5 db "@" -Route8Text6: ; 592cd (16:52cd) - db $08 ; asm +Route8Text6: + TX_ASM ld hl, Route8TrainerHeader5 call TalkToTrainer jp TextScriptEnd -Route8BattleText6: ; 592d7 (16:52d7) +Route8BattleText6: TX_FAR _Route8BattleText6 db "@" -Route8EndBattleText6: ; 592dc (16:52dc) +Route8EndBattleText6: TX_FAR _Route8EndBattleText6 db "@" -Route8AfterBattleText6: ; 592e1 (16:52e1) +Route8AfterBattleText6: TX_FAR _Route8AfterBattleText6 db "@" -Route8Text7: ; 592e6 (16:52e6) - db $08 ; asm +Route8Text7: + TX_ASM ld hl, Route8TrainerHeader6 call TalkToTrainer jp TextScriptEnd -Route8BattleText7: ; 592f0 (16:52f0) +Route8BattleText7: TX_FAR _Route8BattleText7 db "@" -Route8EndBattleText7: ; 592f5 (16:52f5) +Route8EndBattleText7: TX_FAR _Route8EndBattleText7 db "@" -Route8AfterBattleText7: ; 592fa (16:52fa) +Route8AfterBattleText7: TX_FAR _Route8AfterBattleText7 db "@" -Route8Text8: ; 592ff (16:52ff) - db $08 ; asm +Route8Text8: + TX_ASM ld hl, Route8TrainerHeader7 call TalkToTrainer jp TextScriptEnd -Route8BattleText8: ; 59309 (16:5309) +Route8BattleText8: TX_FAR _Route8BattleText8 db "@" -Route8EndBattleText8: ; 5930e (16:530e) +Route8EndBattleText8: TX_FAR _Route8EndBattleText8 db "@" -Route8AfterBattleText8: ; 59313 (16:5313) +Route8AfterBattleText8: TX_FAR _Route8AfterBattleText8 db "@" -Route8Text9: ; 59318 (16:5318) - db $08 ; asm +Route8Text9: + TX_ASM ld hl, Route8TrainerHeader8 call TalkToTrainer jp TextScriptEnd -Route8BattleText9: ; 59322 (16:5322) +Route8BattleText9: TX_FAR _Route8BattleText9 db "@" -Route8EndBattleText9: ; 59327 (16:5327) +Route8EndBattleText9: TX_FAR _Route8EndBattleText9 db "@" -Route8AfterBattleText9: ; 5932c (16:532c) +Route8AfterBattleText9: TX_FAR _Route8AfterBattleText9 db "@" -Route8Text10: ; 59331 (16:5331) +Route8Text10: TX_FAR _Route8Text10 db "@" diff --git a/scripts/route8gate.asm b/scripts/route8gate.asm index 8ea12f04..28835f9d 100755 --- a/scripts/route8gate.asm +++ b/scripts/route8gate.asm @@ -1,14 +1,14 @@ -Route8GateScript: ; 1e1c7 (7:61c7) +Route8GateScript: call EnableAutoTextBoxDrawing ld hl, Route8GateScriptPointers - ld a, [W_ROUTE8GATECURSCRIPT] + ld a, [wRoute8GateCurScript] jp CallFunctionInTable -Route8GateScriptPointers: ; 1e1d3 (7:61d3) +Route8GateScriptPointers: dw Route8GateScript0 dw Route8GateScript1 -Route8GateScript_1e1d7: ; 1e1d7 (7:61d7) +Route8GateScript_1e1d7: ld hl, wd730 set 7, [hl] ld a, $10 @@ -20,51 +20,51 @@ Route8GateScript_1e1d7: ; 1e1d7 (7:61d7) ld [wOverrideSimulatedJoypadStatesMask], a ret -Route8GateScript0: ; 1e1ee (7:61ee) +Route8GateScript0: ld a, [wd728] bit 6, a ret nz ld hl, CoordsData_1e22c call ArePlayerCoordsInArray ret nc - ld a, $2 - ld [wd528], a + ld a, PLAYER_DIR_LEFT + ld [wPlayerMovingDirection], a xor a ld [hJoyHeld], a callba RemoveGuardDrink ld a, [$ffdb] and a - jr nz, .asm_1e220 ; 0x1e20e $10 + jr nz, .asm_1e220 ld a, $2 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Route8GateScript_1e1d7 ld a, $1 - ld [W_ROUTE8GATECURSCRIPT], a + ld [wRoute8GateCurScript], a ret .asm_1e220 ld hl, wd728 set 6, [hl] ld a, $3 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID -CoordsData_1e22c: ; 1e22c (7:622c) +CoordsData_1e22c: db 3,2 db 4,2 db $ff -Route8GateScript1: ; 1e231 (7:6231) +Route8GateScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 xor a ld [wJoyIgnore], a - ld [W_ROUTE8GATECURSCRIPT], a + ld [wRoute8GateCurScript], a ret -Route8GateTextPointers: ; 1e241 (7:6241) +Route8GateTextPointers: dw Route8GateText1 dw Route8GateText2 dw Route8GateText3 diff --git a/scripts/route9.asm b/scripts/route9.asm index 77b216c6..c965d853 100755 --- a/scripts/route9.asm +++ b/scripts/route9.asm @@ -1,18 +1,18 @@ -Route9Script: ; 556bc (15:56bc) +Route9Script: call EnableAutoTextBoxDrawing - ld hl, Route9TrainerHeaders + ld hl, Route9TrainerHeader0 ld de, Route9ScriptPointers - ld a, [W_ROUTE9CURSCRIPT] + ld a, [wRoute9CurScript] call ExecuteCurMapScriptInTable - ld [W_ROUTE9CURSCRIPT], a + ld [wRoute9CurScript], a ret -Route9ScriptPointers: ; 556cf (15:56cf) +Route9ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -Route9TextPointers: ; 556d5 (15:56d5) +Route9TextPointers: dw Route9Text1 dw Route9Text2 dw Route9Text3 @@ -22,248 +22,247 @@ Route9TextPointers: ; 556d5 (15:56d5) dw Route9Text7 dw Route9Text8 dw Route9Text9 - dw Predef5CText + dw PickUpItemText dw Route9Text11 -Route9TrainerHeaders: ; 556eb (15:56eb) -Route9TrainerHeader0: ; 556eb (15:56eb) - db $1 ; flag's bit +Route9TrainerHeader0: + dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_0 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 - -Route9TrainerHeader2: ; 556f7 (15:56f7) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_0 + dw Route9BattleText1 ; TextBeforeBattle + dw Route9AfterBattleText1 ; TextAfterBattle + dw Route9EndBattleText1 ; TextEndBattle + dw Route9EndBattleText1 ; TextEndBattle + +Route9TrainerHeader1: + dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_1 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 - -Route9TrainerHeader3: ; 55703 (15:5703) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_1 + dw Route9BattleText2 ; TextBeforeBattle + dw Route9AfterBattleText2 ; TextAfterBattle + dw Route9EndBattleText2 ; TextEndBattle + dw Route9EndBattleText2 ; TextEndBattle + +Route9TrainerHeader2: + dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_2 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 - -Route9TrainerHeader4: ; 5570f (15:570f) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_2 + dw Route9BattleText3 ; TextBeforeBattle + dw Route9AfterBattleText3 ; TextAfterBattle + dw Route9EndBattleText3 ; TextEndBattle + dw Route9EndBattleText3 ; TextEndBattle + +Route9TrainerHeader3: + dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_3 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 - -Route9TrainerHeader5: ; 5571b (15:571b) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_3 + dw Route9BattleText4 ; TextBeforeBattle + dw Route9AfterBattleText4 ; TextAfterBattle + dw Route9EndBattleText4 ; TextEndBattle + dw Route9EndBattleText4 ; TextEndBattle + +Route9TrainerHeader4: + dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_4 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 - -Route9TrainerHeader6: ; 55727 (15:5727) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_4 + dw Route9BattleText5 ; TextBeforeBattle + dw Route9AfterBattleText5 ; TextAfterBattle + dw Route9EndBattleText5 ; TextEndBattle + dw Route9EndBattleText5 ; TextEndBattle + +Route9TrainerHeader5: + dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_5 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 - -Route9TrainerHeader7: ; 55733 (15:5733) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_5 + dw Route9BattleText6 ; TextBeforeBattle + dw Route9AfterBattleText6 ; TextAfterBattle + dw Route9EndBattleText6 ; TextEndBattle + dw Route9EndBattleText6 ; TextEndBattle + +Route9TrainerHeader6: + dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_6 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 - -Route9TrainerHeader8: ; 5573f (15:573f) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_6 + dw Route9BattleText7 ; TextBeforeBattle + dw Route9AfterBattleText7 ; TextAfterBattle + dw Route9EndBattleText7 ; TextEndBattle + dw Route9EndBattleText7 ; TextEndBattle + +Route9TrainerHeader7: + dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_7, 1 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 - -Route9TrainerHeader9: ; 5574b (15:574b) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_7, 1 + dw Route9BattleText8 ; TextBeforeBattle + dw Route9AfterBattleText8 ; TextAfterBattle + dw Route9EndBattleText8 ; TextEndBattle + dw Route9EndBattleText8 ; TextEndBattle + +Route9TrainerHeader8: + dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_8, 1 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 + dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_8, 1 + dw Route9BattleText9 ; TextBeforeBattle + dw Route9AfterBattleText9 ; TextAfterBattle + dw Route9EndBattleText9 ; TextEndBattle + dw Route9EndBattleText9 ; TextEndBattle db $ff -Route9Text1: ; 55758 (15:5758) - db $8 ; asm +Route9Text1: + TX_ASM ld hl, Route9TrainerHeader0 - jr asm_8be3d ; 0x5575c $2e + jr Route9TalkToTrainer + +Route9Text2: + TX_ASM + ld hl, Route9TrainerHeader1 + jr Route9TalkToTrainer -Route9Text2: ; 5575e (15:575e) - db $8 ; asm +Route9Text3: + TX_ASM ld hl, Route9TrainerHeader2 - jr asm_8be3d ; 0x55762 $28 + jr Route9TalkToTrainer -Route9Text3: ; 55764 (15:5764) - db $8 ; asm +Route9Text4: + TX_ASM ld hl, Route9TrainerHeader3 - jr asm_8be3d ; 0x55768 $22 + jr Route9TalkToTrainer -Route9Text4: ; 5576a (15:576a) - db $8 ; asm +Route9Text5: + TX_ASM ld hl, Route9TrainerHeader4 - jr asm_8be3d ; 0x5576e $1c + jr Route9TalkToTrainer -Route9Text5: ; 55770 (15:5770) - db $8 ; asm +Route9Text6: + TX_ASM ld hl, Route9TrainerHeader5 - jr asm_8be3d ; 0x55774 $16 + jr Route9TalkToTrainer -Route9Text6: ; 55776 (15:5776) - db $8 ; asm +Route9Text7: + TX_ASM ld hl, Route9TrainerHeader6 - jr asm_8be3d ; 0x5577a $10 + jr Route9TalkToTrainer -Route9Text7: ; 5577c (15:577c) - db $8 ; asm +Route9Text8: + TX_ASM ld hl, Route9TrainerHeader7 - jr asm_8be3d ; 0x55780 $a + jr Route9TalkToTrainer -Route9Text8: ; 55782 (15:5782) - db $8 ; asm +Route9Text9: + TX_ASM ld hl, Route9TrainerHeader8 - jr asm_8be3d ; 0x55786 $4 - -Route9Text9: ; 55788 (15:5788) - db $8 ; asm - ld hl, Route9TrainerHeader9 -asm_8be3d: ; 5578c (15:578c) +Route9TalkToTrainer: call TalkToTrainer jp TextScriptEnd -Route9BattleText1: ; 55792 (15:5792) +Route9BattleText1: TX_FAR _Route9BattleText1 db "@" -Route9EndBattleText1: ; 55797 (15:5797) +Route9EndBattleText1: TX_FAR _Route9EndBattleText1 db "@" -Route9AfterBattleText1: ; 5579c (15:579c) +Route9AfterBattleText1: TX_FAR _Route9AfterBattleText1 db "@" -Route9BattleText2: ; 557a1 (15:57a1) +Route9BattleText2: TX_FAR _Route9BattleText2 db "@" -Route9EndBattleText2: ; 557a6 (15:57a6) +Route9EndBattleText2: TX_FAR _Route9EndBattleText2 db "@" -Route9AfterBattleText2: ; 557ab (15:57ab) +Route9AfterBattleText2: TX_FAR _Route9AfterBattleText2 db "@" -Route9BattleText3: ; 557b0 (15:57b0) +Route9BattleText3: TX_FAR _Route9BattleText3 db "@" -Route9EndBattleText3: ; 557b5 (15:57b5) +Route9EndBattleText3: TX_FAR _Route9EndBattleText3 db "@" -Route9AfterBattleText3: ; 557ba (15:57ba) +Route9AfterBattleText3: TX_FAR _Route9AfterBattleText3 db "@" -Route9BattleText4: ; 557bf (15:57bf) +Route9BattleText4: TX_FAR _Route9BattleText4 db "@" -Route9EndBattleText4: ; 557c4 (15:57c4) +Route9EndBattleText4: TX_FAR _Route9EndBattleText4 db "@" -Route9AfterBattleText4: ; 557c9 (15:57c9) +Route9AfterBattleText4: TX_FAR _Route9AfterBattleText4 db "@" -Route9BattleText5: ; 557ce (15:57ce) +Route9BattleText5: TX_FAR _Route9BattleText5 db "@" -Route9EndBattleText5: ; 557d3 (15:57d3) +Route9EndBattleText5: TX_FAR _Route9EndBattleText5 db "@" -Route9AfterBattleText5: ; 557d8 (15:57d8) +Route9AfterBattleText5: TX_FAR _Route9AfterBattleText5 db "@" -Route9BattleText6: ; 557dd (15:57dd) +Route9BattleText6: TX_FAR _Route9BattleText6 db "@" -Route9EndBattleText6: ; 557e2 (15:57e2) +Route9EndBattleText6: TX_FAR _Route9EndBattleText6 db "@" -Route9AfterBattleText6: ; 557e7 (15:57e7) +Route9AfterBattleText6: TX_FAR _Route9AfterBattleText6 db "@" -Route9BattleText7: ; 557ec (15:57ec) +Route9BattleText7: TX_FAR _Route9BattleText7 db "@" -Route9EndBattleText7: ; 557f1 (15:57f1) +Route9EndBattleText7: TX_FAR _Route9EndBattleText7 db "@" -Route9AfterBattleText7: ; 557f6 (15:57f6) +Route9AfterBattleText7: TX_FAR _Route9AfterBattleText7 db "@" -Route9BattleText8: ; 557fb (15:57fb) +Route9BattleText8: TX_FAR _Route9BattleText8 db "@" -Route9EndBattleText8: ; 55800 (15:5800) +Route9EndBattleText8: TX_FAR _Route9EndBattleText8 db "@" -Route9AfterBattleText8: ; 55805 (15:5805) +Route9AfterBattleText8: TX_FAR _Route9AfterBattleText8 db "@" -Route9BattleText9: ; 5580a (15:580a) +Route9BattleText9: TX_FAR _Route9BattleText9 db "@" -Route9EndBattleText9: ; 5580f (15:580f) +Route9EndBattleText9: TX_FAR _Route9EndBattleText9 db "@" -Route9AfterBattleText9: ; 55814 (15:5814) +Route9AfterBattleText9: TX_FAR _Route9AfterBattleText9 db "@" -Route9Text11: ; 55819 (15:5819) +Route9Text11: TX_FAR _Route9Text11 db "@" diff --git a/scripts/safarizonecenter.asm b/scripts/safarizonecenter.asm index 6ff60ec6..d796c403 100755 --- a/scripts/safarizonecenter.asm +++ b/scripts/safarizonecenter.asm @@ -1,15 +1,15 @@ -SafariZoneCenterScript: ; 45bb2 (11:5bb2) +SafariZoneCenterScript: jp EnableAutoTextBoxDrawing -SafariZoneCenterTextPointers: ; 45bb5 (11:5bb5) - dw Predef5CText +SafariZoneCenterTextPointers: + dw PickUpItemText dw SafariZoneCenterText2 dw SafariZoneCenterText3 -SafariZoneCenterText2: ; 45bbb (11:5bbb) +SafariZoneCenterText2: TX_FAR _SafariZoneCenterText2 db "@" -SafariZoneCenterText3: ; 45bc0 (11:5bc0) +SafariZoneCenterText3: TX_FAR _SafariZoneCenterText3 db "@" diff --git a/scripts/safarizoneeast.asm b/scripts/safarizoneeast.asm index 3e6df139..25d0ee30 100755 --- a/scripts/safarizoneeast.asm +++ b/scripts/safarizoneeast.asm @@ -1,23 +1,23 @@ -SafariZoneEastScript: ; 4586b (11:586b) +SafariZoneEastScript: jp EnableAutoTextBoxDrawing -SafariZoneEastTextPointers: ; 4586e (11:586e) - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText +SafariZoneEastTextPointers: + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw SafariZoneEastText5 dw SafariZoneEastText6 dw SafariZoneEastText7 -SafariZoneEastText5: ; 4587c (11:587c) +SafariZoneEastText5: TX_FAR _SafariZoneEastText5 db "@" -SafariZoneEastText6: ; 45881 (11:5881) +SafariZoneEastText6: TX_FAR _SafariZoneEastText6 db "@" -SafariZoneEastText7: ; 45886 (11:5886) +SafariZoneEastText7: TX_FAR _SafariZoneEastText7 db "@" diff --git a/scripts/safarizoneentrance-yellow.asm b/scripts/safarizoneentrance-yellow.asm deleted file mode 100644 index c4343095..00000000 --- a/scripts/safarizoneentrance-yellow.asm +++ /dev/null @@ -1,256 +0,0 @@ -.xf1f77 - ld hl,.ForJust500Text - call PrintText - ld a,$13 - ld [wTextBoxID],a - call DisplayTextBoxID - call YesNoChoice - ld a,[wCurrentMenuItem] - and a - jp nz,.PleaseComeAgain - ld hl,$d346 ; yellow d346 - ld a,[hli] - or [hl] - inc hl - or [hl] - jr nz,.xf1f9f -.xf1f98 - call .xf20ce - jr c,.CantPayWalkDown - jr .xf1ff2 - -.xf1f9f - xor a - ld [$ff9f],a - ld a,$05 - ld [$ffa0],a - ld a,$00 - ld [$ffa1],a - call HasEnoughMoney - jr nc,.success - ld hl,.NotEnoughMoneyText - call PrintText - call .xf2077 - jr c,.CantPayWalkDown - jr .xf1ff2 - -.success - xor a - ld [wSubtrahend],a - ld a,$05 - ld [wSubtrahend+1],a - ld a,$00 - ld [wSubtrahend+2],a - ld hl,wTrainerFacingDirection - ld de,wPlayerMoney + 2 - ld c,3 - predef SubBCDPredef - ld a,$b2 - call $3736 - call $373e - ld a,$13 - ld [wTextBoxID],a - call DisplayTextBoxID - ld hl,.MakePaymentText - call PrintText - ld a,30 - ld hl,(502 / $100) << 8 | (502 % $100) -.xf1ff2 - ld [W_NUMSAFARIBALLS],a - ld a,h - ld [wSafariSteps],a - ld a,l - ld [wSafariSteps + 1],a - ld a,$40 - ld c,3 - call SafariZoneEntranceAutoWalk - ld hl,wd790 - set 7,[hl] - res 6,[hl] - ld a,3 - ld [W_SAFARIZONEENTRANCECURSCRIPT],a - jr .done - -.PleaseComeAgain - ld hl,.PleaseComeAgainText - call PrintText -.CantPayWalkDown - ld a,$80 - ld c,1 - call SafariZoneEntranceAutoWalk - ld a,4 - ld [W_SAFARIZONEENTRANCECURSCRIPT],a -.done - ret - -.ForJust500Text - TX_FAR SafariZoneEntranceText_9e6e4 - db "@" - -.MakePaymentText - TX_FAR SafariZoneEntranceText_9e747 - db $b - TX_FAR _SafariZoneEntranceText_75360 - db "@" - -.PleaseComeAgainText - TX_FAR _SafariZoneEntranceText_75365 - db "@" - -.NotEnoughMoneyText - TX_FAR _SafariZoneEntranceText_7536a - db "@" - -.SafariZoneEntranceText2 - ld hl,.FirstTimeQuestionText - call PrintText - call YesNoChoice - ld a,[wCurrentMenuItem] - and a - ld hl,.RegularText - jr nz,.Explanation - ld hl,.ExplanationText -.Explanation - call PrintText - ret - -.FirstTimeQuestionText - TX_FAR _SafariZoneEntranceText_753e6 - db "@" - -.ExplanationText - TX_FAR _SafariZoneEntranceText_753eb - db "@" - -.RegularText - TX_FAR _SafariZoneEntranceText_753f0 - db "@" - -SafariZoneEntranceAutoWalk: - push af - ld b,0 - ld a,c - ld [wSimulatedJoypadStatesIndex],a - ld hl,wSimulatedJoypadStatesEnd - pop af - call FillMemory - jp StartSimulatingJoypadStates - -.xf2077 - ld hl,wPlayerMoney - ld de,$ff9f - ld bc,3 - call $b1 ; yellow $00b1 - xor a - ld [$ffa2],a - ld [$ffa3],a - ld a,$17 ; ¥17 per safari ball - ld [$ffa4],a - predef DivideBCDPredef3 - ld a,[$ffa4] - call .xf211e - pop af - ld hl,$d346 - xor a - ld bc,3 - call FillMemory - ld hl,.OhAllRightText - call Func_3c59 - ld a,$13 - ld a,[$d124] - call DisplayTextBoxID - ld hl,.CantGive30BallsText - call PrintText - pop af - inc a - jr z,.xf20bd - cp 29 - jr c,.xf20bf -.xf20bd - ld a,29 -.xf20bf - ld hl,$1f6 - and a - ret - -.OhAllRightText - TX_FAR _SafariZoneLowCostText1 - db "@" - -.CantGive30BallsText - TX_FAR _SafariZoneLowCostText2 - db "@" - -.xf20ce - ld hl,$d70c - ld a,[hl] - push af - inc [hl] - ld e,a - ld d,0 - ld hl,.lowcosttextpointers - add hl,de - add hl,de - ld a,[hli] - ld h,[hl] - ld l,a - call PrintText - pop af - cp 3 - jr z,.next - scf - ret - -.next - ld hl,.xf20f6 - call $3c46 - ld a,1 - ld hl,$01f6 - and a - ret - -.xf20f6 - TX_FAR _SafariZoneLowCostText3 - db $b - TX_FAR _SafariZoneLowCostText4 - db "@" - -.lowcosttextpointers - dw .xf210a - dw .xf210f - dw .xf2114 - dw .xf2119 - dw .xf2119 - -.xf210a - TX_FAR _SafariZoneLowCostText5 - db "@" - -.xf210f - TX_FAR _SafariZoneLowCostText6 - db "@" - -.xf2114 - TX_FAR _SafariZoneLowCostText7 - db "@" - -.xf2119 - TX_FAR _SafariZoneLowCostText8 - db "@" - -.xf211e - push hl - ld c,a - and $f - ld l,a - ld h,0 - ld a,c - and $f0 - swap a - ld bc,$a - call $3a74 - ld a,l - pop hl - ret - -.xf2133 diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm index 294dcf58..80551e69 100755 --- a/scripts/safarizoneentrance.asm +++ b/scripts/safarizoneentrance.asm @@ -1,10 +1,10 @@ -SafariZoneEntranceScript: ; 751cd (1d:51cd) +SafariZoneEntranceScript: call EnableAutoTextBoxDrawing ld hl, SafariZoneEntranceScriptPointers - ld a, [W_SAFARIZONEENTRANCECURSCRIPT] + ld a, [wSafariZoneEntranceCurScript] jp CallFunctionInTable -SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) +SafariZoneEntranceScriptPointers: dw .SafariZoneEntranceScript0 dw .SafariZoneEntranceScript1 dw .SafariZoneEntranceScript2 @@ -18,31 +18,31 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) call ArePlayerCoordsInArray ret nc ld a, $3 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a xor a ld [hJoyHeld], a - ld a, $c + ld a, SPRITE_FACING_RIGHT ld [wSpriteStateData1 + 9], a - ld a, [wWhichTrade] + ld a, [wCoordIndex] cp $1 - jr z, .asm_7520f ; 0x75207 $6 + jr z, .asm_7520f ld a, $2 - ld [W_SAFARIZONEENTRANCECURSCRIPT], a + ld [wSafariZoneEntranceCurScript], a ret .asm_7520f - ld a, $10 + ld a, D_RIGHT ld c, $1 call SafariZoneEntranceAutoWalk ld a, $f0 ld [wJoyIgnore], a ld a, $1 - ld [W_SAFARIZONEENTRANCECURSCRIPT], a + ld [wSafariZoneEntranceCurScript], a ret -.CoordsData_75221: ; 75221 (1d:5221) +.CoordsData_75221: db $02,$03 db $02,$04 db $FF @@ -56,7 +56,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) ld [wJoyIgnore], a call UpdateSprites ld a, $4 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a @@ -68,34 +68,32 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) xor a ld [wJoyIgnore], a ld a, $5 - ld [W_SAFARIZONEENTRANCECURSCRIPT], a + ld [wSafariZoneEntranceCurScript], a ret .SafariZoneEntranceScript5 - ld a, $4 - ld [wd528], a - ld hl, wd790 - bit 6, [hl] - res 6, [hl] - jr z, .asm_7527f ; 0x7525a $23 - res 7, [hl] + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a + CheckAndResetEvent EVENT_SAFARI_GAME_OVER + jr z, .asm_7527f + ResetEventReuseHL EVENT_IN_SAFARI_ZONE call UpdateSprites ld a, $f0 ld [wJoyIgnore], a ld a, $6 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [W_NUMSAFARIBALLS], a - ld a, $80 + ld [wNumSafariBalls], a + ld a, D_DOWN ld c, $3 call SafariZoneEntranceAutoWalk ld a, $4 - ld [W_SAFARIZONEENTRANCECURSCRIPT], a - jr .asm_75286 ; 0x7527d $7 + ld [wSafariZoneEntranceCurScript], a + jr .asm_75286 .asm_7527f ld a, $5 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_75286 ret @@ -106,7 +104,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) xor a ld [wJoyIgnore], a ld a, $0 - ld [W_SAFARIZONEENTRANCECURSCRIPT], a + ld [wSafariZoneEntranceCurScript], a ret .SafariZoneEntranceScript6 @@ -114,7 +112,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) ret nz call Delay3 ld a, [wcf0d] - ld [W_SAFARIZONEENTRANCECURSCRIPT], a + ld [wSafariZoneEntranceCurScript], a ret SafariZoneEntranceAutoWalk: @@ -132,7 +130,7 @@ SafariZoneEntranceScript_752b4: and a ret -SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) +SafariZoneEntranceTextPointers: dw .SafariZoneEntranceText1 dw .SafariZoneEntranceText2 dw .SafariZoneEntranceText1 @@ -145,9 +143,9 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) db "@" .SafariZoneEntranceText4 - TX_FAR SafariZoneEntranceText_9e6e4 ; 0x9e6e4 - db $8 - ld a, $13 + TX_FAR SafariZoneEntranceText_9e6e4 + TX_ASM + ld a, MONEY_BOX ld [wTextBoxID],a call DisplayTextBoxID call YesNoChoice @@ -155,11 +153,11 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) and a jp nz,.PleaseComeAgain xor a - ld [$ff9f],a + ld [hMoney],a ld a,$05 - ld [$ffa0],a + ld [hMoney + 1],a ld a,$00 - ld [$ffa1],a + ld [hMoney + 2],a call HasEnoughMoney jr nc,.success ld hl,.NotEnoughMoneyText @@ -168,51 +166,50 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) .success xor a - ld [wSubtrahend],a + ld [wPriceTemp],a ld a,$05 - ld [wSubtrahend+1],a + ld [wPriceTemp + 1],a ld a,$00 - ld [wSubtrahend+2],a - ld hl,wTrainerFacingDirection + ld [wPriceTemp + 2],a + ld hl,wPriceTemp + 2 ld de,wPlayerMoney + 2 ld c,3 predef SubBCDPredef - ld a,$13 + ld a,MONEY_BOX ld [wTextBoxID],a call DisplayTextBoxID ld hl,.MakePaymentText call PrintText ld a,30 - ld [W_NUMSAFARIBALLS],a + ld [wNumSafariBalls],a ld a,502 / $100 ld [wSafariSteps],a ld a, 502 % $100 ld [wSafariSteps + 1],a - ld a,$40 + ld a,D_UP ld c,3 call SafariZoneEntranceAutoWalk - ld hl,wd790 - set 7,[hl] - res 6,[hl] + SetEvent EVENT_IN_SAFARI_ZONE + ResetEventReuseHL EVENT_SAFARI_GAME_OVER ld a,3 - ld [W_SAFARIZONEENTRANCECURSCRIPT],a + ld [wSafariZoneEntranceCurScript],a jr .done .PleaseComeAgain ld hl,.PleaseComeAgainText call PrintText .CantPayWalkDown - ld a,$80 + ld a,D_DOWN ld c,1 call SafariZoneEntranceAutoWalk ld a,4 - ld [W_SAFARIZONEENTRANCECURSCRIPT],a + ld [wSafariZoneEntranceCurScript],a .done jp TextScriptEnd .MakePaymentText TX_FAR SafariZoneEntranceText_9e747 - db $b + TX_SFX_ITEM_1 TX_FAR _SafariZoneEntranceText_75360 db "@" @@ -225,38 +222,36 @@ 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 ld [wSpriteStateData1 + 9], a - ld a, $80 + ld a, D_DOWN ld c, $3 call SafariZoneEntranceAutoWalk - ld hl, wd790 - res 6, [hl] - res 7, [hl] + ResetEvents EVENT_SAFARI_GAME_OVER, EVENT_IN_SAFARI_ZONE 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 a, D_UP ld c, $1 call SafariZoneEntranceAutoWalk ld a, $5 ld [wcf0d], a .asm_753b3 ld a, $6 - ld [W_SAFARIZONEENTRANCECURSCRIPT], a + ld [wSafariZoneEntranceCurScript], a jp TextScriptEnd .SafariZoneEntranceText_753bb @@ -272,7 +267,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) db "@" .SafariZoneEntranceText2 - db $08 ; asm + TX_ASM ld hl,.FirstTimeQuestionText call PrintText call YesNoChoice diff --git a/scripts/safarizonenorth.asm b/scripts/safarizonenorth.asm index 74790e76..b870c99e 100755 --- a/scripts/safarizonenorth.asm +++ b/scripts/safarizonenorth.asm @@ -1,31 +1,31 @@ -SafariZoneNorthScript: ; 459ab (11:59ab) +SafariZoneNorthScript: jp EnableAutoTextBoxDrawing -SafariZoneNorthTextPointers: ; 459ae (11:59ae) - dw Predef5CText - dw Predef5CText +SafariZoneNorthTextPointers: + dw PickUpItemText + dw PickUpItemText dw SafariZoneNorthText3 dw SafariZoneNorthText4 dw SafariZoneNorthText5 dw SafariZoneNorthText6 dw SafariZoneNorthText7 -SafariZoneNorthText3: ; 459bc (11:59bc) +SafariZoneNorthText3: TX_FAR _SafariZoneNorthText3 db "@" -SafariZoneNorthText4: ; 459c1 (11:59c1) +SafariZoneNorthText4: TX_FAR _SafariZoneNorthText4 db "@" -SafariZoneNorthText5: ; 459c6 (11:59c6) +SafariZoneNorthText5: TX_FAR _SafariZoneNorthText5 db "@" -SafariZoneNorthText6: ; 459cb (11:59cb) +SafariZoneNorthText6: TX_FAR _SafariZoneNorthText6 db "@" -SafariZoneNorthText7: ; 459d0 (11:59d0) +SafariZoneNorthText7: TX_FAR _SafariZoneNorthText7 db "@" diff --git a/scripts/safarizoneresthouse1.asm b/scripts/safarizoneresthouse1.asm index 424714e4..1d43890d 100755 --- a/scripts/safarizoneresthouse1.asm +++ b/scripts/safarizoneresthouse1.asm @@ -1,14 +1,14 @@ -SafariZoneRestHouse1Script: ; 45ced (11:5ced) +SafariZoneRestHouse1Script: jp EnableAutoTextBoxDrawing -SafariZoneRestHouse1TextPointers: ; 45cf0 (11:5cf0) +SafariZoneRestHouse1TextPointers: dw SafariZoneRestHouse1Text1 dw SafariZoneRestHouse1Text2 -SafariZoneRestHouse1Text1: ; 45cf4 (11:5cf4) +SafariZoneRestHouse1Text1: TX_FAR _SafariZoneRestHouse1Text1 db "@" -SafariZoneRestHouse1Text2: ; 45cf9 (11:5cf9) +SafariZoneRestHouse1Text2: TX_FAR _SafariZoneRestHouse1Text2 db "@" diff --git a/scripts/safarizoneresthouse2.asm b/scripts/safarizoneresthouse2.asm index 23cd53b2..4cd512f2 100755 --- a/scripts/safarizoneresthouse2.asm +++ b/scripts/safarizoneresthouse2.asm @@ -1,20 +1,20 @@ -SafariZoneRestHouse2Script: ; 45d2a (11:5d2a) +SafariZoneRestHouse2Script: call EnableAutoTextBoxDrawing ret -SafariZoneRestHouse2TextPointers: ; 45d2e (11:5d2e) +SafariZoneRestHouse2TextPointers: dw SafariZoneRestHouse2Text1 dw SafariZoneRestHouse2Text2 dw SafariZoneRestHouse2Text3 -SafariZoneRestHouse2Text1: ; 45d34 (11:5d34) +SafariZoneRestHouse2Text1: TX_FAR _SafariZoneRestHouse2Text1 db "@" -SafariZoneRestHouse2Text2: ; 45d39 (11:5d39) +SafariZoneRestHouse2Text2: TX_FAR _SafariZoneRestHouse2Text2 db "@" -SafariZoneRestHouse2Text3: ; 45d3e (11:5d3e) +SafariZoneRestHouse2Text3: TX_FAR _SafariZoneRestHouse2Text3 db "@" diff --git a/scripts/safarizoneresthouse3.asm b/scripts/safarizoneresthouse3.asm index 2faa1fbb..18c4770f 100755 --- a/scripts/safarizoneresthouse3.asm +++ b/scripts/safarizoneresthouse3.asm @@ -1,20 +1,20 @@ -SafariZoneRestHouse3Script: ; 45d75 (11:5d75) +SafariZoneRestHouse3Script: call EnableAutoTextBoxDrawing ret -SafariZoneRestHouse3TextPointers: ; 45d79 (11:5d79) +SafariZoneRestHouse3TextPointers: dw SafariZoneRestHouse3Text1 dw SafariZoneRestHouse3Text2 dw SafariZoneRestHouse3Text3 -SafariZoneRestHouse3Text1: ; 45d7f (11:5d7f) +SafariZoneRestHouse3Text1: TX_FAR _SafariZoneRestHouse3Text1 db "@" -SafariZoneRestHouse3Text2: ; 45d84 (11:5d84) +SafariZoneRestHouse3Text2: TX_FAR _SafariZoneRestHouse3Text2 db "@" -SafariZoneRestHouse3Text3: ; 45d89 (11:5d89) +SafariZoneRestHouse3Text3: TX_FAR _SafariZoneRestHouse3Text3 db "@" diff --git a/scripts/safarizoneresthouse4.asm b/scripts/safarizoneresthouse4.asm index b645431f..3ff3fa48 100755 --- a/scripts/safarizoneresthouse4.asm +++ b/scripts/safarizoneresthouse4.asm @@ -1,20 +1,20 @@ -SafariZoneRestHouse4Script: ; 45dc0 (11:5dc0) +SafariZoneRestHouse4Script: call EnableAutoTextBoxDrawing ret -SafariZoneRestHouse4TextPointers: ; 45dc4 (11:5dc4) +SafariZoneRestHouse4TextPointers: dw SafariZoneRestHouse4Text1 dw SafariZoneRestHouse4Text2 dw SafariZoneRestHouse4Text3 -SafariZoneRestHouse4Text1: ; 45dca (11:5dca) +SafariZoneRestHouse4Text1: TX_FAR _SafariZoneRestHouse4Text1 db "@" -SafariZoneRestHouse4Text2: ; 45dcf (11:5dcf) +SafariZoneRestHouse4Text2: TX_FAR _SafariZoneRestHouse4Text2 db "@" -SafariZoneRestHouse4Text3: ; 45dd4 (11:5dd4) +SafariZoneRestHouse4Text3: TX_FAR _SafariZoneRestHouse4Text3 db "@" diff --git a/scripts/safarizonesecrethouse.asm b/scripts/safarizonesecrethouse.asm index 28aae7c4..44c89281 100755 --- a/scripts/safarizonesecrethouse.asm +++ b/scripts/safarizonesecrethouse.asm @@ -1,46 +1,45 @@ -SafariZoneSecretHouseScript: ; 4a317 (12:6317) +SafariZoneSecretHouseScript: jp EnableAutoTextBoxDrawing -SafariZoneSecretHouseTextPointers: ; 4a31a (12:631a) +SafariZoneSecretHouseTextPointers: dw SafariZoneSecretHouseText1 -SafariZoneSecretHouseText1: ; 4a31c (12:631c) - db $08 ; asm - ld a, [wd857] - bit 0, a - jr nz, .asm_20a9b ; 0x4a322 +SafariZoneSecretHouseText1: + TX_ASM + CheckEvent EVENT_GOT_HM03 + jr nz, .asm_20a9b ld hl, SafariZoneSecretHouseText_4a350 call PrintText - ld bc, (HM_03 << 8) | 1 + lb bc, HM_03, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedHM03Text call PrintText - ld hl, wd857 - set 0, [hl] - jr .asm_8f1fc ; 0x4a33d + SetEvent EVENT_GOT_HM03 + 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) +SafariZoneSecretHouseText_4a350: TX_FAR _SecretHouseText_4a350 db "@" -ReceivedHM03Text: ; 4a355 (12:6355) +ReceivedHM03Text: TX_FAR _ReceivedHM03Text - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -HM03ExplanationText: ; 4a35b (12:635b) +HM03ExplanationText: TX_FAR _HM03ExplanationText db "@" -HM03NoRoomText: ; 4a360 (12:6360) +HM03NoRoomText: TX_FAR _HM03NoRoomText db "@" diff --git a/scripts/safarizonewest.asm b/scripts/safarizonewest.asm index 1465af56..81190c4c 100755 --- a/scripts/safarizonewest.asm +++ b/scripts/safarizonewest.asm @@ -1,28 +1,28 @@ -SafariZoneWestScript: ; 4a1b5 (12:61b5) +SafariZoneWestScript: jp EnableAutoTextBoxDrawing -SafariZoneWestTextPointers: ; 4a1b8 (12:61b8) - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText +SafariZoneWestTextPointers: + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw SafariZoneWestText5 dw SafariZoneWestText6 dw SafariZoneWestText7 dw SafariZoneWestText8 -SafariZoneWestText5: ; 4a1c8 (12:61c8) +SafariZoneWestText5: TX_FAR _SafariZoneWestText5 db "@" -SafariZoneWestText6: ; 4a1cd (12:61cd) +SafariZoneWestText6: TX_FAR _SafariZoneWestText6 db "@" -SafariZoneWestText7: ; 4a1d2 (12:61d2) +SafariZoneWestText7: TX_FAR _SafariZoneWestText7 db "@" -SafariZoneWestText8: ; 4a1d7 (12:61d7) +SafariZoneWestText8: TX_FAR _SafariZoneWestText8 db "@" diff --git a/scripts/saffroncity.asm b/scripts/saffroncity.asm index 93bb2c88..57a1a3a5 100755 --- a/scripts/saffroncity.asm +++ b/scripts/saffroncity.asm @@ -1,7 +1,7 @@ -SaffronCityScript: ; 50c00 (14:4c00) +SaffronCityScript: jp EnableAutoTextBoxDrawing -SaffronCityTextPointers: ; 50c03 (14:4c03) +SaffronCityTextPointers: dw SaffronCityText1 dw SaffronCityText2 dw SaffronCityText3 @@ -28,94 +28,95 @@ SaffronCityTextPointers: ; 50c03 (14:4c03) dw SaffronCityText24 dw SaffronCityText25 -SaffronCityText1: ; 50c35 (14:4c35) +SaffronCityText1: TX_FAR _SaffronCityText1 db "@" -SaffronCityText2: ; 50c3a (14:4c3a) +SaffronCityText2: TX_FAR _SaffronCityText2 db "@" -SaffronCityText3: ; 50c3f (14:4c3f) +SaffronCityText3: TX_FAR _SaffronCityText3 db "@" -SaffronCityText4: ; 50c44 (14:4c44) +SaffronCityText4: TX_FAR _SaffronCityText4 db "@" -SaffronCityText5: ; 50c49 (14:4c49) +SaffronCityText5: TX_FAR _SaffronCityText5 db "@" -SaffronCityText6: ; 50c4e (14:4c4e) +SaffronCityText6: TX_FAR _SaffronCityText6 db "@" -SaffronCityText7: ; 50c53 (14:4c53) +SaffronCityText7: TX_FAR _SaffronCityText7 db "@" -SaffronCityText8: ; 50c58 (14:4c58) +SaffronCityText8: TX_FAR _SaffronCityText8 db "@" -SaffronCityText9: ; 50c5d (14:4c5d) +SaffronCityText9: TX_FAR _SaffronCityText9 db "@" -SaffronCityText10: ; 50c62 (14:4c62) +SaffronCityText10: TX_FAR _SaffronCityText10 db "@" -SaffronCityText11: ; 50c67 (14:4c67) +SaffronCityText11: TX_FAR _SaffronCityText11 db "@" -SaffronCityText12: ; 50c6c (14:4c6c) +SaffronCityText12: TX_FAR _SaffronCityText12 - db $15, "@" ; play PIDGEOT cry from TextCommandSounds + TX_CRY_PIDGEOT + db "@" -SaffronCityText13: ; 50c72 (14:4c72) +SaffronCityText13: TX_FAR _SaffronCityText13 db "@" -SaffronCityText14: ; 50c77 (14:4c77) +SaffronCityText14: TX_FAR _SaffronCityText14 db "@" -SaffronCityText15: ; 50c7c (14:4c7c) +SaffronCityText15: TX_FAR _SaffronCityText15 db "@" -SaffronCityText16: ; 50c81 (14:4c81) +SaffronCityText16: TX_FAR _SaffronCityText16 db "@" -SaffronCityText17: ; 50c86 (14:4c86) +SaffronCityText17: TX_FAR _SaffronCityText17 db "@" -SaffronCityText18: ; 50c8b (14:4c8b) +SaffronCityText18: TX_FAR _SaffronCityText18 db "@" -SaffronCityText20: ; 50c90 (14:4c90) +SaffronCityText20: TX_FAR _SaffronCityText20 db "@" -SaffronCityText21: ; 50c95 (14:4c95) +SaffronCityText21: TX_FAR _SaffronCityText21 db "@" -SaffronCityText22: ; 50c9a (14:4c9a) +SaffronCityText22: TX_FAR _SaffronCityText22 db "@" -SaffronCityText24: ; 50c9f (14:4c9f) +SaffronCityText24: TX_FAR _SaffronCityText24 db "@" -SaffronCityText25: ; 50ca4 (14:4ca4) +SaffronCityText25: TX_FAR _SaffronCityText25 db "@" diff --git a/scripts/saffrongym.asm b/scripts/saffrongym.asm index 7c2eb559..cbf935e7 100755 --- a/scripts/saffrongym.asm +++ b/scripts/saffrongym.asm @@ -1,82 +1,76 @@ -SaffronGymScript: ; 5d00d (17:500d) - ld hl, wd126 +SaffronGymScript: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] call nz, .extra call EnableAutoTextBoxDrawing ld hl, SaffronGymTrainerHeader0 ld de, SaffronGymScriptPointers - ld a, [W_SAFFRONGYMCURSCRIPT] + ld a, [wSaffronGymCurScript] call ExecuteCurMapScriptInTable - ld [W_SAFFRONGYMCURSCRIPT], a + ld [wSaffronGymCurScript], a ret .extra - ld hl, Gym6CityName ; $5033 - ld de, Gym6LeaderName ; $5040 + ld hl, Gym6CityName + ld de, Gym6LeaderName jp LoadGymLeaderAndCityName -Gym6CityName: ; 5d033 (17:5033) +Gym6CityName: db "SAFFRON CITY@" -Gym6LeaderName: ; 5d040 (17:5040) +Gym6LeaderName: db "SABRINA@" -SaffronGymText_5d048: ; 5d048 (17:5048) +SaffronGymText_5d048: xor a ld [wJoyIgnore], a - ld [W_SAFFRONGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wSaffronGymCurScript], a + ld [wCurMapScript], a ret -SaffronGymScriptPointers: ; 5d053 (17:5053) +SaffronGymScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw SaffronGymScript3 -SaffronGymScript3: ; 5d05b (17:505b) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +SaffronGymScript3: + ld a, [wIsInBattle] cp $ff jp z, SaffronGymText_5d048 ld a, $f0 ld [wJoyIgnore], a -SaffronGymText_5d068: ; 5d068 (17:5068) +SaffronGymText_5d068: ld a, $a - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd7b3 - set 1, [hl] - ld bc, (TM_46 << 8) | 1 + SetEvent EVENT_BEAT_SABRINA + lb bc, TM_46, 1 call GiveItem jr nc, .BagFull ld a, $b - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd7b3 - set 0, [hl] + SetEvent EVENT_GOT_TM46 jr .asm_5d091 .BagFull ld a, $c - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_5d091 - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges set 5, [hl] - ld hl, wd72a + ld hl, wBeatGymFlags set 5, [hl] ; deactivate gym trainers - ld a, [wd7b3] - or %11111100 - ld [wd7b3], a - ld hl, wd7b4 - set 0, [hl] + SetEventRange EVENT_BEAT_SAFFRON_GYM_TRAINER_0, EVENT_BEAT_SAFFRON_GYM_TRAINER_6 jp SaffronGymText_5d048 -SaffronGymTextPointers: ; 5d0ab (17:50ab) +SaffronGymTextPointers: dw SaffronGymText1 dw SaffronGymText2 dw SaffronGymText3 @@ -90,87 +84,85 @@ SaffronGymTextPointers: ; 5d0ab (17:50ab) dw SaffronGymText11 dw SaffronGymText12 -SaffronGymTrainerHeaders: ; 5d0c3 (17:50c3) -SaffronGymTrainerHeader0: ; 5d0c3 (17:50c3) - db $2 ; flag's bit +SaffronGymTrainerHeader0: + dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_0 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 - -SaffronGymTrainerHeader1: ; 5d0cf (17:50cf) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_0 + dw SaffronGymBattleText1 ; TextBeforeBattle + dw SaffronGymAfterBattleText1 ; TextAfterBattle + dw SaffronGymEndBattleText1 ; TextEndBattle + dw SaffronGymEndBattleText1 ; TextEndBattle + +SaffronGymTrainerHeader1: + dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_1 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 - -SaffronGymTrainerHeader2: ; 5d0db (17:50db) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_1 + dw SaffronGymBattleText2 ; TextBeforeBattle + dw SaffronGymAfterBattleText2 ; TextAfterBattle + dw SaffronGymEndBattleText2 ; TextEndBattle + dw SaffronGymEndBattleText2 ; TextEndBattle + +SaffronGymTrainerHeader2: + dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_2 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 - -SaffronGymTrainerHeader3: ; 5d0e7 (17:50e7) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_2 + dw SaffronGymBattleText3 ; TextBeforeBattle + dw SaffronGymAfterBattleText3 ; TextAfterBattle + dw SaffronGymEndBattleText3 ; TextEndBattle + dw SaffronGymEndBattleText3 ; TextEndBattle + +SaffronGymTrainerHeader3: + dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_3 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 - -SaffronGymTrainerHeader4: ; 5d0f3 (17:50f3) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_3 + dw SaffronGymBattleText4 ; TextBeforeBattle + dw SaffronGymAfterBattleText4 ; TextAfterBattle + dw SaffronGymEndBattleText4 ; TextEndBattle + dw SaffronGymEndBattleText4 ; TextEndBattle + +SaffronGymTrainerHeader4: + dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_4 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 - -SaffronGymTrainerHeader5: ; 5d0ff (17:50ff) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_4 + dw SaffronGymBattleText5 ; TextBeforeBattle + dw SaffronGymAfterBattleText5 ; TextAfterBattle + dw SaffronGymEndBattleText5 ; TextEndBattle + dw SaffronGymEndBattleText5 ; TextEndBattle + +SaffronGymTrainerHeader5: + dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_5 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 - -SaffronGymTrainerHeader6: ; 5d10b (17:510b) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_5 + dw SaffronGymBattleText6 ; TextBeforeBattle + dw SaffronGymAfterBattleText6 ; TextAfterBattle + dw SaffronGymEndBattleText6 ; TextEndBattle + dw SaffronGymEndBattleText6 ; TextEndBattle + +SaffronGymTrainerHeader6: + dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1 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 + dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1 + dw SaffronGymBattleText7 ; TextBeforeBattle + dw SaffronGymAfterBattleText7 ; TextAfterBattle + dw SaffronGymEndBattleText7 ; TextEndBattle + dw SaffronGymEndBattleText7 ; TextEndBattle db $ff -SaffronGymText1: ; 5d118 (17:5118) - db $08 ; asm - ld a, [wd7b3] - bit 1, a - jr z, .asm_e3544 ; 0x5d11e - bit 0, a - jr nz, .asm_8d2f6 ; 0x5d122 +SaffronGymText1: + TX_ASM + CheckEvent EVENT_BEAT_SABRINA + jr z, .asm_5d134 + CheckEventReuseA EVENT_GOT_TM46 + 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,189 +171,188 @@ 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 ld a, $6 - ld [W_GYMLEADERNO], a + ld [wGymLeaderNo], a ld a, $3 - ld [W_SAFFRONGYMCURSCRIPT], a -.asm_34c2c ; 0x5d15f + ld [wSaffronGymCurScript], a +.asm_5d15f jp TextScriptEnd -SaffronGymText_5d162: ; 5d162 (17:5162) +SaffronGymText_5d162: TX_FAR _SaffronGymText_5d162 db "@" -SaffronGymText_5d167: ; 5d167 (17:5167) - TX_FAR _SaffronGymText_5d167 ; 0xa1c73 - db $11 ; play same sound as red giving oak parcel - db $6 ; wait for keypress +SaffronGymText_5d167: + TX_FAR _SaffronGymText_5d167 + TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded + TX_BLINK db "@" -SaffronGymText_5d16e: ; 5d16e (17:516e) +SaffronGymText_5d16e: TX_FAR _SaffronGymText_5d16e db "@" -SaffronGymText10: ; 5d173 (17:5173) +SaffronGymText10: TX_FAR _SaffronGymText_5d173 db "@" -SaffronGymText11: ; 5d178 (17:5178) +SaffronGymText11: TX_FAR ReceivedTM46Text - db $b + TX_SFX_ITEM_1 TX_FAR _TM46ExplanationText db "@" -SaffronGymText12: ; 5d182 (17:5182) +SaffronGymText12: TX_FAR _TM46NoRoomText db "@" -SaffronGymText2: ; 5d187 (17:5187) - db $08 ; asm +SaffronGymText2: + TX_ASM ld hl, SaffronGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd -SaffronGymText3: ; 5d191 (17:5191) - db $08 ; asm +SaffronGymText3: + TX_ASM ld hl, SaffronGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd -SaffronGymText4: ; 5d19b (17:519b) - db $08 ; asm +SaffronGymText4: + TX_ASM ld hl, SaffronGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd -SaffronGymText5: ; 5d1a5 (17:51a5) - db $08 ; asm +SaffronGymText5: + TX_ASM ld hl, SaffronGymTrainerHeader3 call TalkToTrainer jp TextScriptEnd -SaffronGymText6: ; 5d1af (17:51af) - db $08 ; asm +SaffronGymText6: + TX_ASM ld hl, SaffronGymTrainerHeader4 call TalkToTrainer jp TextScriptEnd -SaffronGymText7: ; 5d1b9 (17:51b9) - db $08 ; asm +SaffronGymText7: + TX_ASM ld hl, SaffronGymTrainerHeader5 call TalkToTrainer jp TextScriptEnd -SaffronGymText8: ; 5d1c3 (17:51c3) - db $08 ; asm +SaffronGymText8: + TX_ASM ld hl, SaffronGymTrainerHeader6 call TalkToTrainer jp TextScriptEnd -SaffronGymText9: ; 5d1cd (17:51cd) - db $08 ; asm - ld a, [wd7b3] - bit 1, a - jr nz, .asm_13f3c ; 0x5d1d3 +SaffronGymText9: + TX_ASM + CheckEvent EVENT_BEAT_SABRINA + 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) +SaffronGymText_5d1e6: TX_FAR _SaffronGymText_5d1e6 db "@" -SaffronGymText_5d1eb: ; 5d1eb (17:51eb) +SaffronGymText_5d1eb: TX_FAR _SaffronGymText_5d1eb db "@" -SaffronGymBattleText1: ; 5d1f0 (17:51f0) +SaffronGymBattleText1: TX_FAR _SaffronGymBattleText1 db "@" -SaffronGymEndBattleText1: ; 5d1f5 (17:51f5) +SaffronGymEndBattleText1: TX_FAR _SaffronGymEndBattleText1 db "@" -SaffronGymAfterBattleText1: ; 5d1fa (17:51fa) +SaffronGymAfterBattleText1: TX_FAR _SaffronGymAfterBattleText1 db "@" -SaffronGymBattleText2: ; 5d1ff (17:51ff) +SaffronGymBattleText2: TX_FAR _SaffronGymBattleText2 db "@" -SaffronGymEndBattleText2: ; 5d204 (17:5204) +SaffronGymEndBattleText2: TX_FAR _SaffronGymEndBattleText2 db "@" -SaffronGymAfterBattleText2: ; 5d209 (17:5209) +SaffronGymAfterBattleText2: TX_FAR _SaffronGymAfterBattleText2 db "@" -SaffronGymBattleText3: ; 5d20e (17:520e) +SaffronGymBattleText3: TX_FAR _SaffronGymBattleText3 db "@" -SaffronGymEndBattleText3: ; 5d213 (17:5213) +SaffronGymEndBattleText3: TX_FAR _SaffronGymEndBattleText3 db "@" -SaffronGymAfterBattleText3: ; 5d218 (17:5218) +SaffronGymAfterBattleText3: TX_FAR _SaffronGymAfterBattleText3 db "@" -SaffronGymBattleText4: ; 5d21d (17:521d) +SaffronGymBattleText4: TX_FAR _SaffronGymBattleText4 db "@" -SaffronGymEndBattleText4: ; 5d222 (17:5222) +SaffronGymEndBattleText4: TX_FAR _SaffronGymEndBattleText4 db "@" -SaffronGymAfterBattleText4: ; 5d227 (17:5227) +SaffronGymAfterBattleText4: TX_FAR _SaffronGymAfterBattleText4 db "@" -SaffronGymBattleText5: ; 5d22c (17:522c) +SaffronGymBattleText5: TX_FAR _SaffronGymBattleText5 db "@" -SaffronGymEndBattleText5: ; 5d231 (17:5231) +SaffronGymEndBattleText5: TX_FAR _SaffronGymEndBattleText5 db "@" -SaffronGymAfterBattleText5: ; 5d236 (17:5236) +SaffronGymAfterBattleText5: TX_FAR _SaffronGymAfterBattleText5 db "@" -SaffronGymBattleText6: ; 5d23b (17:523b) +SaffronGymBattleText6: TX_FAR _SaffronGymBattleText6 db "@" -SaffronGymEndBattleText6: ; 5d240 (17:5240) +SaffronGymEndBattleText6: TX_FAR _SaffronGymEndBattleText6 db "@" -SaffronGymAfterBattleText6: ; 5d245 (17:5245) +SaffronGymAfterBattleText6: TX_FAR _SaffronGymAfterBattleText6 db "@" -SaffronGymBattleText7: ; 5d24a (17:524a) +SaffronGymBattleText7: TX_FAR _SaffronGymBattleText7 db "@" -SaffronGymEndBattleText7: ; 5d24f (17:524f) +SaffronGymEndBattleText7: TX_FAR _SaffronGymEndBattleText7 db "@" -SaffronGymAfterBattleText7: ; 5d254 (17:5254) +SaffronGymAfterBattleText7: TX_FAR _SaffronGymAfterBattleText7 db "@" diff --git a/scripts/saffronhouse1.asm b/scripts/saffronhouse1.asm index 39a70ebf..5f417978 100755 --- a/scripts/saffronhouse1.asm +++ b/scripts/saffronhouse1.asm @@ -1,27 +1,27 @@ -SaffronHouse1Script: ; 1dddd (7:5ddd) +SaffronHouse1Script: jp EnableAutoTextBoxDrawing -SaffronHouse1TextPointers: ; 1dde0 (7:5de0) +SaffronHouse1TextPointers: dw SaffronHouse1Text1 dw SaffronHouse1Text2 dw SaffronHouse1Text3 dw SaffronHouse1Text4 -SaffronHouse1Text1: ; 1dde8 (7:5de8) +SaffronHouse1Text1: TX_FAR _SaffronHouse1Text1 db "@" -SaffronHouse1Text2: ; 1dded (7:5ded) +SaffronHouse1Text2: TX_FAR _SaffronHouse1Text2 - db $8 + TX_ASM ld a, PIDGEY call PlayCry jp TextScriptEnd -SaffronHouse1Text3: ; 1ddfa (7:5dfa) +SaffronHouse1Text3: TX_FAR _SaffronHouse1Text3 db "@" -SaffronHouse1Text4: ; 1ddff (7:5dff) +SaffronHouse1Text4: TX_FAR _SaffronHouse1Text4 db "@" diff --git a/scripts/saffronhouse2.asm b/scripts/saffronhouse2.asm index 727fd981..10c3d29e 100755 --- a/scripts/saffronhouse2.asm +++ b/scripts/saffronhouse2.asm @@ -1,46 +1,45 @@ -SaffronHouse2Script: ; 1de3c (7:5e3c) +SaffronHouse2Script: jp EnableAutoTextBoxDrawing -SaffronHouse2TextPointers: ; 1de3f (7:5e3f) +SaffronHouse2TextPointers: dw SaffronHouse2Text1 -SaffronHouse2Text1: ; 1de41 (7:5e41) - db $08 ; asm - ld a, [wd7bd] - bit 0, a - jr nz, .asm_9e72b ; 0x1de47 +SaffronHouse2Text1: + TX_ASM + CheckEvent EVENT_GOT_TM29 + jr nz, .asm_9e72b ld hl, TM29PreReceiveText call PrintText - ld bc,(TM_29 << 8) | 1 + lb bc, TM_29, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM29Text call PrintText - ld hl, wd7bd - set 0, [hl] - jr .asm_fe4e1 ; 0x1de62 + SetEvent EVENT_GOT_TM29 + 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) +TM29PreReceiveText: TX_FAR _TM29PreReceiveText db "@" -ReceivedTM29Text: ; 1de7a (7:5e7a) +ReceivedTM29Text: TX_FAR _ReceivedTM29Text - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -TM29ExplanationText: ; 1de80 (7:5e80) +TM29ExplanationText: TX_FAR _TM29ExplanationText db "@" -TM29NoRoomText: ; 1de85 (7:5e85) +TM29NoRoomText: TX_FAR _TM29NoRoomText db "@" diff --git a/scripts/saffronmart.asm b/scripts/saffronmart.asm index 9ee1db0e..8b140610 100755 --- a/scripts/saffronmart.asm +++ b/scripts/saffronmart.asm @@ -1,15 +1,15 @@ -SaffronMartScript: ; 5d409 (17:5409) +SaffronMartScript: jp EnableAutoTextBoxDrawing -SaffronMartTextPointers: ; 5d40c (17:540c) - dw SaffronMartText1 +SaffronMartTextPointers: + dw SaffronCashierText dw SaffronMartText2 dw SaffronMartText3 -SaffronMartText2: ; 5d412 (17:5412) +SaffronMartText2: TX_FAR _SaffronMartText2 db "@" -SaffronMartText3: ; 5d417 (17:5417) +SaffronMartText3: TX_FAR _SaffronMartText3 db "@" diff --git a/scripts/saffronpokecenter.asm b/scripts/saffronpokecenter.asm index 8f569a8e..82467215 100755 --- a/scripts/saffronpokecenter.asm +++ b/scripts/saffronpokecenter.asm @@ -1,23 +1,23 @@ -SaffronPokecenterScript: ; 5d535 (17:5535) +SaffronPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -SaffronPokecenterTextPointers: ; 5d53b (17:553b) - dw SaffronPokecenterText1 +SaffronPokecenterTextPointers: + dw SaffronHealNurseText dw SaffronPokecenterText2 dw SaffronPokecenterText3 - dw SaffronPokecenterText4 + dw SaffronTradeNurseText -SaffronPokecenterText1: ; 5d543 (17:5543) - db $ff +SaffronHealNurseText: + TX_POKECENTER_NURSE -SaffronPokecenterText2: ; 5d544 (17:5544) - TX_FAR _SaffronPokecenterText1 +SaffronPokecenterText2: + TX_FAR _SaffronPokecenterText2 db "@" -SaffronPokecenterText3: ; 5d549 (17:5549) +SaffronPokecenterText3: TX_FAR _SaffronPokecenterText3 db "@" -SaffronPokecenterText4: ; 5d54e (17:554e) - db $f6 +SaffronTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST diff --git a/scripts/school.asm b/scripts/school.asm index 57eb58c8..2300946b 100755 --- a/scripts/school.asm +++ b/scripts/school.asm @@ -1,14 +1,14 @@ -SchoolScript: ; 1d54c (7:554c) +SchoolScript: jp EnableAutoTextBoxDrawing -SchoolTextPointers: ; 1d54f (7:554f) +SchoolTextPointers: dw SchoolText1 dw SchoolText2 -SchoolText1: ; 1d553 (7:5553) +SchoolText1: TX_FAR _SchoolText1 db "@" -SchoolText2: ; 1d558 (7:5558) +SchoolText2: TX_FAR _SchoolText2 db "@" diff --git a/scripts/seafoamislands1.asm b/scripts/seafoamislands1.asm index 2e64c9d7..52561fa7 100755 --- a/scripts/seafoamislands1.asm +++ b/scripts/seafoamislands1.asm @@ -1,48 +1,47 @@ -SeafoamIslands1Script: ; 447e9 (11:47e9) +SeafoamIslands1Script: call EnableAutoTextBoxDrawing - ld hl, wd7e7 - set 0, [hl] + SetEvent EVENT_IN_SEAFOAM_ISLANDS 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] + EventFlagAddress hl, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE + ld a, [wCoordIndex] cp $1 - jr nz, .asm_44819 ; 0x44809 $e - set 6, [hl] + jr nz, .asm_44819 + SetEventReuseHL EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1 - ld [wd079], a + ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1 - ld [wd07a], a - jr .asm_44825 ; 0x44817 $c + ld [wObjectToShow], a + jr .asm_44825 .asm_44819 - set 7, [hl] + SetEventAfterBranchReuseHL EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2 - ld [wd079], a + ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2 - ld [wd07a], a + ld [wObjectToShow], a .asm_44825 - ld a, [wd079] - ld [wcc4d], a + ld a, [wObjectToHide] + ld [wMissableObjectIndex], a predef HideObject - ld a, [wd07a] - ld [wcc4d], a + ld a, [wObjectToShow] + ld [wMissableObjectIndex], a predef_jump ShowObject .asm_4483b ld a, $9f ld [wDungeonWarpDestinationMap], a ld hl, Seafoam1HolesCoords - jp Func_46981 + jp IsPlayerOnDungeonWarp -Seafoam1HolesCoords: ; 44846 (11:4846) +Seafoam1HolesCoords: db $06,$11 db $06,$18 db $ff -SeafoamIslands1TextPointers: ; 4484b (11:484b) +SeafoamIslands1TextPointers: dw BoulderText dw BoulderText diff --git a/scripts/seafoamislands2.asm b/scripts/seafoamislands2.asm index 66fe9297..50024bad 100755 --- a/scripts/seafoamislands2.asm +++ b/scripts/seafoamislands2.asm @@ -1,46 +1,46 @@ -SeafoamIslands2Script: ; 46315 (11:6315) +SeafoamIslands2Script: call EnableAutoTextBoxDrawing 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] + EventFlagAddress hl, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE + ld a, [wCoordIndex] cp $1 - jr nz, .asm_46340 ; 0x46330 $e - set 0, [hl] + jr nz, .asm_46340 + SetEventReuseHL EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1 - ld [wd079], a + ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1 - ld [wd07a], a - jr .asm_4634c ; 0x4633e $c + ld [wObjectToShow], a + jr .asm_4634c .asm_46340 - set 1, [hl] + SetEventAfterBranchReuseHL EVENT_SEAFOAM2_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2 - ld [wd079], a + ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2 - ld [wd07a], a + ld [wObjectToShow], a .asm_4634c - ld a, [wd079] - ld [wcc4d], a + ld a, [wObjectToHide] + ld [wMissableObjectIndex], a predef HideObject - ld a, [wd07a] - ld [wcc4d], a + ld a, [wObjectToShow] + ld [wMissableObjectIndex], a predef_jump ShowObject .asm_46362 ld a, $a0 ld [wDungeonWarpDestinationMap], a ld hl, Seafoam2HolesCoords - jp Func_46981 + jp IsPlayerOnDungeonWarp -Seafoam2HolesCoords: ; 4636d (11:636d) +Seafoam2HolesCoords: db $06,$12 db $06,$17 db $ff -SeafoamIslands2TextPointers: ; 46372 (11:6372) +SeafoamIslands2TextPointers: dw BoulderText dw BoulderText diff --git a/scripts/seafoamislands3.asm b/scripts/seafoamislands3.asm index fb7d05ba..4a7848a4 100755 --- a/scripts/seafoamislands3.asm +++ b/scripts/seafoamislands3.asm @@ -1,46 +1,46 @@ -SeafoamIslands3Script: ; 46451 (11:6451) +SeafoamIslands3Script: call EnableAutoTextBoxDrawing 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] + EventFlagAddress hl, EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE + ld a, [wCoordIndex] cp $1 - jr nz, .asm_4647c ; 0x4646c $e - set 0, [hl] + jr nz, .asm_4647c + SetEventReuseHL EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1 - ld [wd079], a + ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_3 - ld [wd07a], a - jr .asm_46488 ; 0x4647a $c + ld [wObjectToShow], a + jr .asm_46488 .asm_4647c - set 1, [hl] + SetEventAfterBranchReuseHL EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2 - ld [wd079], a + ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_4 - ld [wd07a], a + ld [wObjectToShow], a .asm_46488 - ld a, [wd079] - ld [wcc4d], a + ld a, [wObjectToHide] + ld [wMissableObjectIndex], a predef HideObject - ld a, [wd07a] - ld [wcc4d], a + ld a, [wObjectToShow] + ld [wMissableObjectIndex], a predef_jump ShowObject .asm_4649e ld a, $a1 ld [wDungeonWarpDestinationMap], a ld hl, Seafoam3HolesCoords - jp Func_46981 + jp IsPlayerOnDungeonWarp -Seafoam3HolesCoords: ; 464a9 (11:64a9) +Seafoam3HolesCoords: db $06,$13 db $06,$16 db $ff -SeafoamIslands3TextPointers: ; 464ae (11:64ae) +SeafoamIslands3TextPointers: dw BoulderText dw BoulderText diff --git a/scripts/seafoamislands4.asm b/scripts/seafoamislands4.asm index 7e519f86..34873004 100755 --- a/scripts/seafoamislands4.asm +++ b/scripts/seafoamislands4.asm @@ -1,69 +1,67 @@ -SeafoamIslands4Script: ; 4658d (11:658d) +SeafoamIslands4Script: call EnableAutoTextBoxDrawing 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] + EventFlagAddress hl, EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE + ld a, [wCoordIndex] cp $1 - jr nz, .asm_465b8 ; 0x465a8 $e - set 0, [hl] + jr nz, .asm_465b8 + SetEventReuseHL EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1 - ld [wd079], a + ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_1 - ld [wd07a], a - jr .asm_465c4 ; 0x465b6 $c + ld [wObjectToShow], a + jr .asm_465c4 .asm_465b8 - set 1, [hl] + SetEventAfterBranchReuseHL EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_2 - ld [wd079], a + ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_2 - ld [wd07a], a + ld [wObjectToShow], a .asm_465c4 - ld a, [wd079] - ld [wcc4d], a + ld a, [wObjectToHide] + ld [wMissableObjectIndex], a predef HideObject - ld a, [wd07a] - ld [wcc4d], a + ld a, [wObjectToShow] + ld [wMissableObjectIndex], a predef ShowObject - jr .asm_465ed ; 0x465da $11 + jr .asm_465ed .asm_465dc ld a, $a2 ld [wDungeonWarpDestinationMap], a ld hl, Seafoam4HolesCoords - call Func_46981 + call IsPlayerOnDungeonWarp ld a, [wd732] bit 4, a ret nz .asm_465ed ld hl, SeafoamIslands4ScriptPointers - ld a, [W_SEAFOAMISLANDS4CURSCRIPT] + ld a, [wSeafoamIslands4CurScript] jp CallFunctionInTable -Seafoam4HolesCoords: ; 465f6 (11:65f6) +Seafoam4HolesCoords: db $10,$03 db $10,$06 db $ff -SeafoamIslands4ScriptPointers: ; 465fb (11:65fb) +SeafoamIslands4ScriptPointers: dw SeafoamIslands4Script0 dw SeafoamIslands4Script1 dw SeafoamIslands4Script2 dw SeafoamIslands4Script3 -SeafoamIslands4Script0: ; 46603 (11:6603) - ld a, [wd880] - and $3 - cp $3 +SeafoamIslands4Script0: + CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ret z - ld a, [W_YCOORD] + ld a, [wYCoord] cp $8 ret nz - ld a, [W_XCOORD] + ld a, [wXCoord] cp $f ret nz ld hl, wSimulatedJoypadStatesEnd @@ -72,32 +70,30 @@ SeafoamIslands4Script0: ; 46603 (11:6603) dec a ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 set 2, [hl] ld a, $1 - ld [W_SEAFOAMISLANDS4CURSCRIPT], a + ld [wSeafoamIslands4CurScript], a ret -RLEMovement46632: ; 46632 (11:6632) - db $80,6 - db $10,5 - db $80,3 +RLEMovement46632: + db D_DOWN,6 + db D_RIGHT,5 + db D_DOWN,3 db $ff -SeafoamIslands4Script1: ; 46639 (11:6639) +SeafoamIslands4Script1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $0 - ld [W_SEAFOAMISLANDS4CURSCRIPT], a + ld [wSeafoamIslands4CurScript], a ret -SeafoamIslands4Script2: ; 46644 (11:6644) - ld a, [wd880] - and $3 - cp $3 +SeafoamIslands4Script2: + CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ret z - ld a, [W_XCOORD] + ld a, [wXCoord] cp $12 jr z, .asm_4665e cp $13 @@ -116,28 +112,35 @@ SeafoamIslands4Script2: ; 46644 (11:6644) ld [wSpriteStateData2 + $06], a ld hl, wd730 set 7, [hl] - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 set 2, [hl] ld a, $3 .asm_4667b - ld [W_SEAFOAMISLANDS4CURSCRIPT], a + ld [wSeafoamIslands4CurScript], a ret -RLEData_4667f: ; 4667f (11:667f) - db $80,$06,$10,$02,$80,$04,$20,$01,$FF +RLEData_4667f: + db D_DOWN,$06 + db D_RIGHT,$02 + db D_DOWN,$04 + db D_LEFT,$01 + db $FF -RLEData_46688: ; 46688 (11:6688) - db $80,$06,$10,$02,$80,$04,$FF +RLEData_46688: + db D_DOWN,$06 + db D_RIGHT,$02 + db D_DOWN,$04 + db $FF -SeafoamIslands4Script3: ; 4668f (11:668f) +SeafoamIslands4Script3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld a, $0 - ld [W_SEAFOAMISLANDS4CURSCRIPT], a + ld [wSeafoamIslands4CurScript], a ret -SeafoamIslands4TextPointers: ; 4669a (11:669a) +SeafoamIslands4TextPointers: dw BoulderText dw BoulderText dw BoulderText diff --git a/scripts/seafoamislands5.asm b/scripts/seafoamislands5.asm index b554034b..a233fb6a 100755 --- a/scripts/seafoamislands5.asm +++ b/scripts/seafoamislands5.asm @@ -1,87 +1,83 @@ -SeafoamIslands5Script: ; 46799 (11:6799) +SeafoamIslands5Script: call EnableAutoTextBoxDrawing - ld a, [W_SEAFOAMISLANDS5CURSCRIPT] + ld a, [wSeafoamIslands5CurScript] ld hl, SeafoamIslands5ScriptPointers jp CallFunctionInTable -SeafoamIslands5Script_467a5: ; 467a5 (11:67a5) +SeafoamIslands5Script_467a5: xor a - ld [W_SEAFOAMISLANDS5CURSCRIPT], a + ld [wSeafoamIslands5CurScript], a ld [wJoyIgnore], a ret -SeafoamIslands5ScriptPointers: ; 467ad (11:67ad) +SeafoamIslands5ScriptPointers: dw SeafoamIslands5Script0 dw SeafoamIslands5Script1 dw SeafoamIslands5Script2 dw SeafoamIslands5Script3 dw SeafoamIslands5Script4 -SeafoamIslands5Script4: ; 467b7 (11:67b7) - ld a, [W_ISINBATTLE] +SeafoamIslands5Script4: + ld a, [wIsInBattle] cp $ff jr z, SeafoamIslands5Script_467a5 call EndTrainerBattle ld a, $0 - ld [W_SEAFOAMISLANDS5CURSCRIPT], a + ld [wSeafoamIslands5CurScript], a ret -SeafoamIslands5Script0: ; 467c7 (11:67c7) - ld a, [wd880] - and $3 - cp $3 +SeafoamIslands5Script0: + CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ret z - ld hl, CoordsData_467fe + ld hl, .Coords call ArePlayerCoordsInArray ret nc - ld a, [wWhichTrade] + ld a, [wCoordIndex] cp $3 jr nc, .asm_467e6 - ld a, $40 - ld [wccd4], a - ld a, $2 + ld a, NPC_MOVEMENT_UP + ld [wSimulatedJoypadStatesEnd + 1], a + ld a, 2 jr .asm_467e8 .asm_467e6 - ld a, $1 + ld a, 1 .asm_467e8 ld [wSimulatedJoypadStatesIndex], a - ld a, $40 + ld a, D_UP ld [wSimulatedJoypadStatesEnd], a call StartSimulatingJoypadStates - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 res 2, [hl] ld a, $1 - ld [W_SEAFOAMISLANDS5CURSCRIPT], a + ld [wSeafoamIslands5CurScript], a ret -CoordsData_467fe: ; 467fe (11:67fe) +.Coords db $11,$14 db $11,$15 db $10,$14 db $10,$15 db $FF -SeafoamIslands5Script1: ; 46807 (11:6807) +SeafoamIslands5Script1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz xor a ld [wJoyIgnore], a ld a, $0 - ld [W_SEAFOAMISLANDS5CURSCRIPT], a + ld [wSeafoamIslands5CurScript], a ret -SeafoamIslands5Script2: ; 46816 (11:6816) - ld a, [wd881] - and $3 - cp $3 +SeafoamIslands5Script2: + CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ld a, $0 jr z, .asm_46849 - ld hl, CoordsData_4684d + ld hl, .Coords call ArePlayerCoordsInArray ld a, $0 jr nc, .asm_46849 - ld a, [wWhichTrade] + ld a, [wCoordIndex] cp $1 jr nz, .asm_46837 ld de, RLEMovementData_46859 @@ -96,27 +92,27 @@ SeafoamIslands5Script2: ; 46816 (11:6816) call StartSimulatingJoypadStates ld a, $3 .asm_46849 - ld [W_SEAFOAMISLANDS5CURSCRIPT], a + ld [wSeafoamIslands5CurScript], a ret -CoordsData_4684d: ; 4684d (11:684d) +.Coords db $0E,$04 db $0E,$05 db $FF -RLEMovementData_46852: ; 46852 (11:6852) - db $40,$03 - db $10,$02 - db $40,$01 +RLEMovementData_46852: + db D_UP,$03 + db D_RIGHT,$02 + db D_UP,$01 db $FF -RLEMovementData_46859: ; 46859 (11:6859) - db $40,$03 - db $10,$03 - db $40,$01 +RLEMovementData_46859: + db D_UP,$03 + db D_RIGHT,$03 + db D_UP,$01 db $FF -SeafoamIslands5Script3: ; 46860 (11:6860) +SeafoamIslands5Script3: ld a, [wSimulatedJoypadStatesIndex] ld b, a cp $1 @@ -125,54 +121,53 @@ SeafoamIslands5Script3: ; 46860 (11:6860) and a ret nz ld a, $0 - ld [W_SEAFOAMISLANDS5CURSCRIPT], a + ld [wSeafoamIslands5CurScript], a ret -SeaFoamIslands5Script_46872: ; 46872 (11:6872) +SeaFoamIslands5Script_46872: xor a ld [wWalkBikeSurfState], a ld [wWalkBikeSurfStateCopy], a jp ForceBikeOrSurf -SeafoamIslands5TextPointers: ; 4687c (11:687c) +SeafoamIslands5TextPointers: dw BoulderText dw BoulderText - dw SeafoamIslands5Text3 + dw ArticunoText dw SeafoamIslands5Text4 dw SeafoamIslands5Text5 -SeafoamIslands5TrainerHeaders: ; 46886 (11:6886) -SeafoamIslands5TrainerHeader0: ; 46886 (11:6886) - db $2 ; flag's bit +ArticunoTrainerHeader: + dbEventFlagBit EVENT_BEAT_ARTICUNO 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 + dwEventFlagAddress EVENT_BEAT_ARTICUNO + dw ArticunoBattleText ; TextBeforeBattle + dw ArticunoBattleText ; TextAfterBattle + dw ArticunoBattleText ; TextEndBattle + dw ArticunoBattleText ; TextEndBattle db $ff -SeafoamIslands5Text3: ; 46893 (11:6893) - db $08 ; asm - ld hl, SeafoamIslands5TrainerHeader0 +ArticunoText: + TX_ASM + ld hl, ArticunoTrainerHeader call TalkToTrainer ld a, $4 - ld [W_SEAFOAMISLANDS5CURSCRIPT], a + ld [wSeafoamIslands5CurScript], a jp TextScriptEnd -SeafoamIslands5BattleText2: ; 468a2 (11:68a2) - TX_FAR _SeafoamIslands5BattleText2 - db $8 +ArticunoBattleText: + TX_FAR _ArticunoBattleText + TX_ASM ld a, ARTICUNO call PlayCry call WaitForSoundToFinish jp TextScriptEnd -SeafoamIslands5Text4: ; 468b2 (11:68b2) +SeafoamIslands5Text4: TX_FAR _SeafoamIslands5Text4 db "@" -SeafoamIslands5Text5: ; 468b7 (11:68b7) +SeafoamIslands5Text5: TX_FAR _SeafoamIslands5Text5 db "@" diff --git a/scripts/silphco1.asm b/scripts/silphco1.asm index 8a399a4c..c0cb169b 100755 --- a/scripts/silphco1.asm +++ b/scripts/silphco1.asm @@ -1,19 +1,16 @@ -SilphCo1Script: ; 5d44e (17:544e) +SilphCo1Script: call EnableAutoTextBoxDrawing - ld a, [wd838] - bit 7, a + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ret z - ld hl, wd7b9 - bit 7, [hl] - set 7, [hl] + CheckAndSetEvent EVENT_SILPH_CO_RECEPTIONIST_AT_DESK ret nz - ld a, HS_SILPH_CO_1F_1 - ld [wcc4d], a + ld a, HS_SILPH_CO_1F_RECEPTIONIST + ld [wMissableObjectIndex], a predef_jump ShowObject -SilphCo1TextPointers: ; 5d469 (17:5469) +SilphCo1TextPointers: dw SilphCo1Text1 -SilphCo1Text1: ; 5d46b (17:546b) +SilphCo1Text1: TX_FAR _SilphCo1Text1 db "@" diff --git a/scripts/silphco10.asm b/scripts/silphco10.asm index 7d044aca..5cfb92b2 100755 --- a/scripts/silphco10.asm +++ b/scripts/silphco10.asm @@ -1,90 +1,87 @@ -SilphCo10Script: ; 5a139 (16:6139) +SilphCo10Script: call SilphCo10Script_5a14f call EnableAutoTextBoxDrawing - ld hl, SilphCo10TrainerHeaders + ld hl, SilphCo10TrainerHeader0 ld de, SilphCo10ScriptPointers - ld a, [W_SILPHCO10CURSCRIPT] + ld a, [wSilphCo10CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO10CURSCRIPT], a + ld [wSilphCo10CurScript], a ret -SilphCo10Script_5a14f: ; 5a14f (16:614f) - ld hl, wd126 +SilphCo10Script_5a14f: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_5a173 ; $6173 + ld hl, SilphCo10GateCoords call SilphCo2Script_59d43 call SilphCo10Text_5a176 - ld a, [wd836] - bit 0, a + CheckEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR ret nz ld a, $54 - ld [wd09f], a - ld bc, $405 + ld [wNewTileBlockID], a + lb bc, 4, 5 predef_jump ReplaceTileBlock -DataTable_5a173: ; 5a173 (16:6173) - db $04,$05,$FF +SilphCo10GateCoords: + db $04,$05 + db $FF -SilphCo10Text_5a176: ; 5a176 (16:6176) +SilphCo10Text_5a176: ld a, [$ffe0] and a ret z - ld hl, wd836 - set 0, [hl] + SetEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR ret -SilphCo10ScriptPointers: ; 5a180 (16:6180) +SilphCo10ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SilphCo10TextPointers: ; 5a186 (16:6186) +SilphCo10TextPointers: dw SilphCo10Text1 dw SilphCo10Text2 dw SilphCo10Text3 - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText -SilphCo10TrainerHeaders: ; 5a192 (16:6192) -SilphCo10TrainerHeader0: ; 5a192 (16:6192) - db $1 ; flag's bit +SilphCo10TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_10F_TRAINER_0 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 - -SilphCo10TrainerHeader1: ; 5a19e (16:619e) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_10F_TRAINER_0 + dw SilphCo10BattleText1 ; TextBeforeBattle + dw SilphCo10AfterBattleText1 ; TextAfterBattle + dw SilphCo10EndBattleText1 ; TextEndBattle + dw SilphCo10EndBattleText1 ; TextEndBattle + +SilphCo10TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_10F_TRAINER_1 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_10F_TRAINER_1 + dw SilphCo10BattleText2 ; TextBeforeBattle + dw SilphCo10AfterBattleText2 ; TextAfterBattle + dw SilphCo10EndBattleText2 ; TextEndBattle + dw SilphCo10EndBattleText2 ; TextEndBattle db $ff -SilphCo10Text1: ; 5a1ab (16:61ab) - db $08 ; asm +SilphCo10Text1: + TX_ASM ld hl, SilphCo10TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo10Text2: ; 5a1b5 (16:61b5) - db $08 ; asm +SilphCo10Text2: + TX_ASM ld hl, SilphCo10TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo10Text3: ; 5a1bf (16:61bf) - db $08 ; asm - ld a, [wd838] - bit 7, a +SilphCo10Text3: + TX_ASM + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SilphCo10Text_5a1d8 jr nz, .asm_cf85f ld hl, SilphCo10Text_5a1d3 @@ -92,34 +89,34 @@ SilphCo10Text3: ; 5a1bf (16:61bf) call PrintText jp TextScriptEnd -SilphCo10Text_5a1d3: ; 5a1d3 (16:61d3) +SilphCo10Text_5a1d3: TX_FAR _SilphCo10Text_5a1d3 db "@" -SilphCo10Text_5a1d8: ; 5a1d8 (16:61d8) +SilphCo10Text_5a1d8: TX_FAR _SilphCo10Text_5a1d8 db "@" -SilphCo10BattleText1: ; 5a1dd (16:61dd) +SilphCo10BattleText1: TX_FAR _SilphCo10BattleText1 db "@" -SilphCo10EndBattleText1: ; 5a1e2 (16:61e2) +SilphCo10EndBattleText1: TX_FAR _SilphCo10EndBattleText1 db "@" -SilphCo10AfterBattleText1: ; 5a1e7 (16:61e7) +SilphCo10AfterBattleText1: TX_FAR _SilphCo10AfterBattleText1 db "@" -SilphCo10BattleText2: ; 5a1ec (16:61ec) +SilphCo10BattleText2: TX_FAR _SilphCo10BattleText2 db "@" -SilphCo10EndBattleText2: ; 5a1f1 (16:61f1) +SilphCo10EndBattleText2: TX_FAR _SilphCo10EndBattleText2 db "@" -SilphCo10AfterBattleText2: ; 5a1f6 (16:61f6) +SilphCo10AfterBattleText2: TX_FAR _SilphCo10AfterBattleText2 db "@" diff --git a/scripts/silphco11.asm b/scripts/silphco11.asm index 7bb6e448..342fef07 100755 --- a/scripts/silphco11.asm +++ b/scripts/silphco11.asm @@ -1,33 +1,33 @@ -SilphCo11Script: ; 620fa (18:60fa) +SilphCo11Script: call SilphCo11Script_62110 call EnableAutoTextBoxDrawing - ld hl, SilphCo11TrainerHeaders + ld hl, SilphCo11TrainerHeader0 ld de, SilphCo11ScriptPointers - ld a, [W_SILPHCO11CURSCRIPT] + ld a, [wSilphCo11CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO11CURSCRIPT], a + ld [wSilphCo11CurScript], a ret -SilphCo11Script_62110: ; 62110 (18:6110) - ld hl, wd126 +SilphCo11Script_62110: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_62134 ; $6134 + ld hl, SilphCo11GateCoords call SilphCo11Script_62137 call SilphCo11Script_62163 - ld a, [wd838] - bit 0, a + CheckEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR ret nz ld a, $20 - ld [wd09f], a - ld bc, $603 + ld [wNewTileBlockID], a + lb bc, 6, 3 predef_jump ReplaceTileBlock -DataTable_62134: ; 62134 (18:6134) - db $06,$03,$FF +SilphCo11GateCoords: + db $06,$03 + db $FF -SilphCo11Script_62137: ; 62137 (18:6137) +SilphCo11Script_62137: push hl ld hl, wCardKeyDoorY ld a, [hli] @@ -63,38 +63,37 @@ SilphCo11Script_62137: ; 62137 (18:6137) ld [$ffe0], a ret -SilphCo11Script_62163: ; 62163 (18:6163) +SilphCo11Script_62163: ld a, [$ffe0] and a ret z - ld hl, wd838 - set 0, [hl] + SetEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR ret -SilphCo11Script_6216d: ; 6216d (18:616d) - ld hl, MissableObjectIDs_6219b ; $619b +SilphCo11Script_6216d: + ld hl, MissableObjectIDs_6219b .asm_62170 ld a, [hli] cp $ff jr z, .asm_62181 push hl - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject pop hl jr .asm_62170 .asm_62181 - ld hl, MissableObjectIDs_62194 ; $6194 + ld hl, MissableObjectIDs_62194 .asm_62184 ld a, [hli] cp $ff ret z push hl - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject pop hl jr .asm_62184 -MissableObjectIDs_62194: ; 62194 (18:6194) +MissableObjectIDs_62194: db HS_SAFFRON_CITY_8 db HS_SAFFRON_CITY_9 db HS_SAFFRON_CITY_A @@ -103,7 +102,7 @@ MissableObjectIDs_62194: ; 62194 (18:6194) db HS_SAFFRON_CITY_D db $FF -MissableObjectIDs_6219b: ; 6219b (18:619b) +MissableObjectIDs_6219b: db HS_SAFFRON_CITY_1 db HS_SAFFRON_CITY_2 db HS_SAFFRON_CITY_3 @@ -146,16 +145,16 @@ MissableObjectIDs_6219b: ; 6219b (18:619b) db HS_SILPH_CO_11F_3 db $FF -SilphCo11Script_621c4: ; 621c4 (18:61c4) +SilphCo11Script_621c4: xor a ld [wJoyIgnore], a -SilphCo11Script_621c8: ; 621c8 (18:61c8) - ld [W_SILPHCO11CURSCRIPT], a - ld [W_CURMAPSCRIPT], a +SilphCo11Script_621c8: + ld [wSilphCo11CurScript], a + ld [wCurMapScript], a ret -SilphCo11ScriptPointers: ; 621cf (18:61cf) +SilphCo11ScriptPointers: dw SilphCo11Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle @@ -163,107 +162,108 @@ SilphCo11ScriptPointers: ; 621cf (18:61cf) dw SilphCo11Script4 dw SilphCo11Script5 -SilphCo11Script0: ; 621db (18:61db) - ld a, [wd838] - bit 7, a +SilphCo11Script0: + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ret nz - ld hl, CoordsData_62211 ; $6211 + ld hl, CoordsData_62211 call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wCoordIndex] ld [wcf0d], a xor a ld [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld a, $3 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF ld de, MovementData_62216 call MoveSprite ld a, $3 jp SilphCo11Script_621c8 -CoordsData_62211: ; 62211 (18:6211) +CoordsData_62211: db $0D,$06 db $0C,$07 db $FF -MovementData_62216: ; 62216 (18:6216) - db $00,$00,$00,$FF +MovementData_62216: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF -SilphCo11Script_6221a: ; 6221a (18:621a) - ld [wd528], a +SilphCo11Script_6221a: + ld [wPlayerMovingDirection], a ld a, $3 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a ld a, b - ld [$ff8d], a + ld [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay -SilphCo11Script5: ; 62227 (18:6227) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +SilphCo11Script5: + ld a, [wIsInBattle] cp $ff jp z, SilphCo11Script_621c4 ld a, [wcf0d] cp $1 jr z, .asm_6223c - ld a, $2 - ld b, $c + ld a, PLAYER_DIR_LEFT + ld b, SPRITE_FACING_RIGHT jr .asm_62240 .asm_6223c - ld a, $8 - ld b, $0 + ld a, PLAYER_DIR_UP + ld b, SPRITE_FACING_DOWN .asm_62240 call SilphCo11Script_6221a ld a, $f0 ld [wJoyIgnore], a ld a, $6 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID call GBFadeOutToBlack call SilphCo11Script_6216d call UpdateSprites call Delay3 call GBFadeInFromBlack - ld hl, wd838 - set 7, [hl] + SetEvent EVENT_BEAT_SILPH_CO_GIOVANNI xor a ld [wJoyIgnore], a jp SilphCo11Script_621c8 -SilphCo11Script3: ; 6226a (18:626a) +SilphCo11Script3: ld a, [wd730] bit 0, a ret nz ld a, $3 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF ld a, [wcf0d] cp $1 jr z, .asm_62284 - ld a, $2 - ld b, $c + ld a, PLAYER_DIR_LEFT + ld b, SPRITE_FACING_RIGHT jr .asm_62288 .asm_62284 - ld a, $8 - ld b, $0 + ld a, PLAYER_DIR_UP + ld b, SPRITE_FACING_DOWN .asm_62288 call SilphCo11Script_6221a call Delay3 ld a, $4 jp SilphCo11Script_621c8 -SilphCo11Script4: ; 62293 (18:6293) +SilphCo11Script4: 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_SPRITEINDEX] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -272,7 +272,7 @@ SilphCo11Script4: ; 62293 (18:6293) ld a, $5 jp SilphCo11Script_621c8 -SilphCo11TextPointers: ; 622b7 (18:62b7) +SilphCo11TextPointers: dw SilphCo11Text1 dw SilphCo11Text2 dw SilphCo11Text3 @@ -280,128 +280,126 @@ SilphCo11TextPointers: ; 622b7 (18:62b7) dw SilphCo11Text5 dw SilphCo11Text6 -SilphCo11TrainerHeaders: ; 622c3 (18:62c3) -SilphCo11TrainerHeader0: ; 622c3 (18:62c3) - db $4 ; flag's bit +SilphCo11TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_11F_TRAINER_0 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 - -SilphCo11TrainerHeader1: ; 622cf (18:62cf) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_11F_TRAINER_0 + dw SilphCo11BattleText1 ; TextBeforeBattle + dw SilphCo11AfterBattleText1 ; TextAfterBattle + dw SilphCo11EndBattleText1 ; TextEndBattle + dw SilphCo11EndBattleText1 ; TextEndBattle + +SilphCo11TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_11F_TRAINER_1 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_11F_TRAINER_1 + dw SilphCo11BattleText2 ; TextBeforeBattle + dw SilphCo11AfterBattleText2 ; TextAfterBattle + dw SilphCo11EndBattleText2 ; TextEndBattle + dw SilphCo11EndBattleText2 ; TextEndBattle db $ff -SilphCo11Text1: ; 622dc (18:62dc) - db $08 ; asm - ld a, [wd838] - bit 5, a +SilphCo11Text1: + TX_ASM + CheckEvent EVENT_GOT_MASTER_BALL jp nz, .asm_62308 ld hl, SilphCoPresidentText call PrintText - ld bc, (MASTER_BALL << 8) | 1 + lb bc, MASTER_BALL, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedSilphCoMasterBallText call PrintText - ld hl, wd838 - set 5, [hl] - jr .asm_fd405 ; 0x622fe + SetEvent EVENT_GOT_MASTER_BALL + 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) +SilphCoPresidentText: TX_FAR _SilphCoPresidentText db "@" -ReceivedSilphCoMasterBallText: ; 62316 (18:6316) +ReceivedSilphCoMasterBallText: TX_FAR _ReceivedSilphCoMasterBallText - db $11, "@" + TX_SFX_KEY_ITEM + db "@" -SilphCo10Text_6231c: ; 6231c (18:631c) +SilphCo10Text_6231c: TX_FAR _SilphCo10Text_6231c db "@" -SilphCoMasterBallNoRoomText: ; 62321 (18:6321) +SilphCoMasterBallNoRoomText: TX_FAR _SilphCoMasterBallNoRoomText db "@" -SilphCo11Text2: ; 62326 (18:6326) +SilphCo11Text2: TX_FAR _SilphCo11Text2 db "@" -SilphCo11Text3: ; 6232b (18:632b) +SilphCo11Text3: TX_FAR _SilphCo11Text3 db "@" -SilphCo10Text_62330: ; 62330 (18:6330) +SilphCo10Text_62330: TX_FAR _SilphCo10Text_62330 db "@" -SilphCo11Text6: ; 62335 (18:6335) +SilphCo11Text6: TX_FAR _SilphCo10Text_62335 db "@" -SilphCo11Text4: ; 6233a (18:633a) - db $08 ; asm +SilphCo11Text4: + TX_ASM ld hl, SilphCo11TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo11BattleText1: ; 62344 (18:6344) +SilphCo11BattleText1: TX_FAR _SilphCo11BattleText1 db "@" -SilphCo11EndBattleText1: ; 62349 (18:6349) +SilphCo11EndBattleText1: TX_FAR _SilphCo11EndBattleText1 db "@" -SilphCo11AfterBattleText1: ; 6234e (18:634e) +SilphCo11AfterBattleText1: TX_FAR _SilphCo11AfterBattleText1 db "@" -SilphCo11Text5: ; 62353 (18:6353) - db $08 ; asm +SilphCo11Text5: + TX_ASM ld hl, SilphCo11TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo11BattleText2: ; 6235d (18:635d) +SilphCo11BattleText2: TX_FAR _SilphCo11BattleText2 db "@" -SilphCo11EndBattleText2: ; 62362 (18:6362) +SilphCo11EndBattleText2: TX_FAR _SilphCo11EndBattleText2 db "@" -SilphCo11AfterBattleText2: ; 62367 (18:6367) +SilphCo11AfterBattleText2: TX_FAR _SilphCo11AfterBattleText2 db "@" -SilphCo10Text_6236c: ; 6236c (18:636c) - db $8 +SilphCo10Text_6236c: + TX_ASM ld hl, SilphCo10Text_6237b call PrintText ld a, PORYGON call DisplayPokedex jp TextScriptEnd -SilphCo10Text_6237b: ; 6237b (18:637b) +SilphCo10Text_6237b: TX_FAR _SilphCo10Text_6237b db "@" diff --git a/scripts/silphco2.asm b/scripts/silphco2.asm index 63803acd..e77c45dd 100755 --- a/scripts/silphco2.asm +++ b/scripts/silphco2.asm @@ -1,42 +1,43 @@ -SilphCo2Script: ; 59cf1 (16:5cf1) +SilphCo2Script: call SilphCo2Script_59d07 call EnableAutoTextBoxDrawing - ld hl, SilphCo2TrainerHeaders + ld hl, SilphCo2TrainerHeader0 ld de, SilphCo2ScriptPointers - ld a, [W_SILPHCO2CURSCRIPT] + ld a, [wSilphCo2CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO2CURSCRIPT], a + ld [wSilphCo2CurScript], a ret -SilphCo2Script_59d07: ; 59d07 (16:5d07) - ld hl, wd126 +SilphCo2Script_59d07: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_59d3e + ld hl, SilphCo2GateCoords call SilphCo2Script_59d43 call SilphCo2Script_59d6f - ld a, [wd826] - bit 5, a + CheckEvent EVENT_SILPH_CO_2_UNLOCKED_DOOR1 jr nz, .asm_59d2e push af ld a, $54 - ld [wd09f], a - ld bc, $0202 + ld [wNewTileBlockID], a + lb bc, 2, 2 predef ReplaceTileBlock pop af .asm_59d2e - bit 6, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_2_UNLOCKED_DOOR2, EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ret nz ld a, $54 - ld [wd09f], a - ld bc, $0502 + ld [wNewTileBlockID], a + lb bc, 5, 2 predef_jump ReplaceTileBlock -DataTable_59d3e: ; 59d3e (16:5d3e) - db $02,$02,$05,$02,$FF +SilphCo2GateCoords: + db $02,$02 + db $05,$02 + db $FF -SilphCo2Script_59d43: ; 59d43 (16:5d43) +SilphCo2Script_59d43: push hl ld hl, wCardKeyDoorY ld a, [hli] @@ -72,175 +73,173 @@ SilphCo2Script_59d43: ; 59d43 (16:5d43) ld [$ffe0], a ret -SilphCo2Script_59d6f: ; 59d6f (16:5d6f) - ld hl, wd826 +SilphCo2Script_59d6f: + EventFlagAddress hl, EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_59d7d - set 5, [hl] + jr nz, .next + SetEventReuseHL EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ret -.asm_59d7d - set 6, [hl] +.next + SetEventAfterBranchReuseHL EVENT_SILPH_CO_2_UNLOCKED_DOOR2, EVENT_SILPH_CO_2_UNLOCKED_DOOR1 ret -SilphCo2ScriptPointers: ; 59d80 (16:5d80) +SilphCo2ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SilphCo2TextPointers: ; 59d86 (16:5d86) +SilphCo2TextPointers: dw SilphCo2Text1 dw SilphCo2Text2 dw SilphCo2Text3 dw SilphCo2Text4 dw SilphCo2Text5 -SilphCo2TrainerHeaders: ; 59d90 (16:5d90) -SilphCo2TrainerHeader0: ; 59d90 (16:5d90) - db $2 ; flag's bit +SilphCo2TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_0 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 - -SilphCo2TrainerHeader1: ; 59d9c (16:5d9c) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_0 + dw SilphCo2BattleText1 ; TextBeforeBattle + dw SilphCo2AfterBattleText1 ; TextAfterBattle + dw SilphCo2EndBattleText1 ; TextEndBattle + dw SilphCo2EndBattleText1 ; TextEndBattle + +SilphCo2TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_1 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 - -SilphCo2TrainerHeader2: ; 59da8 (16:5da8) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_1 + dw SilphCo2BattleText2 ; TextBeforeBattle + dw SilphCo2AfterBattleText2 ; TextAfterBattle + dw SilphCo2EndBattleText2 ; TextEndBattle + dw SilphCo2EndBattleText2 ; TextEndBattle + +SilphCo2TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_2 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 - -SilphCo2TrainerHeader3: ; 59db4 (16:5db4) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_2 + dw SilphCo2BattleText3 ; TextBeforeBattle + dw SilphCo2AfterBattleText3 ; TextAfterBattle + dw SilphCo2EndBattleText3 ; TextEndBattle + dw SilphCo2EndBattleText3 ; TextEndBattle + +SilphCo2TrainerHeader3: + dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_3 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_3 + dw SilphCo2BattleText4 ; TextBeforeBattle + dw SilphCo2AfterBattleText4 ; TextAfterBattle + dw SilphCo2EndBattleText4 ; TextEndBattle + dw SilphCo2EndBattleText4 ; TextEndBattle db $ff -SilphCo2Text1: ; 59dc1 (16:5dc1) - db $08 ; asm - ld a, [wd826] - bit 7, a - jr nz, asm_b8a0d ; 0x59dc7 +SilphCo2Text1: + TX_ASM + CheckEvent EVENT_GOT_TM36 + jr nz, .asm_59de4 ld hl, SilphCo2Text_59ded call PrintText - ld bc, (TM_36 << 8) | 1 + lb bc, TM_36, 1 call GiveItem ld hl, TM36NoRoomText - jr nc, asm_2c1e0 ; 0x59dd8 - ld hl, wd826 - set 7, [hl] + jr nc, .asm_59de7 + SetEvent EVENT_GOT_TM36 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 -SilphCo2Text_59ded: ; 59ded (16:5ded) +SilphCo2Text_59ded: TX_FAR _SilphCo2Text_59ded db "@" -ReceivedTM36Text: ; 59df2 (16:5df2) +ReceivedTM36Text: TX_FAR _ReceivedTM36Text - db $0B, "@" + TX_SFX_ITEM_1 + db "@" -TM36ExplanationText: ; 59df8 (16:5df8) +TM36ExplanationText: TX_FAR _TM36ExplanationText db "@" -TM36NoRoomText: ; 59dfd (16:5dfd) +TM36NoRoomText: TX_FAR _TM36NoRoomText db "@" -SilphCo2Text2: ; 59e02 (16:5e02) - db $08 ; asm +SilphCo2Text2: + TX_ASM ld hl, SilphCo2TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo2Text3: ; 59e0c (16:5e0c) - db $08 ; asm +SilphCo2Text3: + TX_ASM ld hl, SilphCo2TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo2Text4: ; 59e16 (16:5e16) - db $08 ; asm +SilphCo2Text4: + TX_ASM ld hl, SilphCo2TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SilphCo2Text5: ; 59e20 (16:5e20) - db $08 ; asm +SilphCo2Text5: + TX_ASM ld hl, SilphCo2TrainerHeader3 call TalkToTrainer jp TextScriptEnd -SilphCo2BattleText1: ; 59e2a (16:5e2a) +SilphCo2BattleText1: TX_FAR _SilphCo2BattleText1 db "@" -SilphCo2EndBattleText1: ; 59e2f (16:5e2f) +SilphCo2EndBattleText1: TX_FAR _SilphCo2EndBattleText1 db "@" -SilphCo2AfterBattleText1: ; 59e34 (16:5e34) +SilphCo2AfterBattleText1: TX_FAR _SilphCo2AfterBattleText1 db "@" -SilphCo2BattleText2: ; 59e39 (16:5e39) +SilphCo2BattleText2: TX_FAR _SilphCo2BattleText2 db "@" -SilphCo2EndBattleText2: ; 59e3e (16:5e3e) +SilphCo2EndBattleText2: TX_FAR _SilphCo2EndBattleText2 db "@" -SilphCo2AfterBattleText2: ; 59e43 (16:5e43) +SilphCo2AfterBattleText2: TX_FAR _SilphCo2AfterBattleText2 db "@" -SilphCo2BattleText3: ; 59e48 (16:5e48) +SilphCo2BattleText3: TX_FAR _SilphCo2BattleText3 db "@" -SilphCo2EndBattleText3: ; 59e4d (16:5e4d) +SilphCo2EndBattleText3: TX_FAR _SilphCo2EndBattleText3 db "@" -SilphCo2AfterBattleText3: ; 59e52 (16:5e52) +SilphCo2AfterBattleText3: TX_FAR _SilphCo2AfterBattleText3 db "@" -SilphCo2BattleText4: ; 59e57 (16:5e57) +SilphCo2BattleText4: TX_FAR _SilphCo2BattleText4 db "@" -SilphCo2EndBattleText4: ; 59e5c (16:5e5c) +SilphCo2EndBattleText4: TX_FAR _SilphCo2EndBattleText4 db "@" -SilphCo2AfterBattleText4: ; 59e61 (16:5e61) +SilphCo2AfterBattleText4: TX_FAR _SilphCo2AfterBattleText4 db "@" diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index 7b0c67c1..0d12b768 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -1,137 +1,136 @@ -SilphCo3Script: ; 59f5b (16:5f5b) +SilphCo3Script: call SilphCo3Script_59f71 call EnableAutoTextBoxDrawing - ld hl, SilphCo3TrainerHeaders + ld hl, SilphCo3TrainerHeader0 ld de, SilphCo3ScriptPointers - ld a, [W_SILPHCO3CURSCRIPT] + ld a, [wSilphCo3CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO3CURSCRIPT], a + ld [wSilphCo3CurScript], a ret -SilphCo3Script_59f71: ; 59f71 (16:5f71) - ld hl, wd126 +SilphCo3Script_59f71: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_59fa8 ; $5fa8 + ld hl, SilphCo3GateCoords call SilphCo2Script_59d43 call SilphCo3Script_59fad - ld a, [wd828] - bit 0, a + CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1 jr nz, .asm_59f98 push af ld a, $5f - ld [wd09f], a - ld bc, $404 + ld [wNewTileBlockID], a + lb bc, 4, 4 predef ReplaceTileBlock pop af .asm_59f98 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret nz ld a, $5f - ld [wd09f], a - ld bc, $408 + ld [wNewTileBlockID], a + lb bc, 4, 8 predef_jump ReplaceTileBlock -DataTable_59fa8: ; 59fa8 (16:5fa8) - db $04,$04,$04,$08,$FF +SilphCo3GateCoords: + db $04,$04 + db $04,$08 + db $FF -SilphCo3Script_59fad: ; 59fad (16:5fad) - ld hl, wd828 +SilphCo3Script_59fad: + EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_59fbb - set 0, [hl] + jr nz, .next + SetEventReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret -.asm_59fbb - set 1, [hl] +.next + SetEventAfterBranchReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret -SilphCo3ScriptPointers: ; 59fbe (16:5fbe) +SilphCo3ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SilphCo3TextPointers: ; 59fc4 (16:5fc4) +SilphCo3TextPointers: dw SilphCo3Text1 dw SilphCo3Text2 dw SilphCo3Text3 - dw Predef5CText + dw PickUpItemText -SilphCo3TrainerHeaders: ; 59fcc (16:5fcc) -SilphCo3TrainerHeader0: ; 59fcc (16:5fcc) - db $2 ; flag's bit +SilphCo3TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_3F_TRAINER_0 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 - -SilphCo3TrainerHeader1: ; 59fd8 (16:5fd8) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_3F_TRAINER_0 + dw SilphCo3BattleText1 ; TextBeforeBattle + dw SilphCo3AfterBattleText1 ; TextAfterBattle + dw SilphCo3EndBattleText1 ; TextEndBattle + dw SilphCo3EndBattleText1 ; TextEndBattle + +SilphCo3TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_3F_TRAINER_1 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_3F_TRAINER_1 + dw SilphCo3BattleText2 ; TextBeforeBattle + dw SilphCo3AfterBattleText2 ; TextAfterBattle + dw SilphCo3EndBattleText2 ; TextEndBattle + dw SilphCo3EndBattleText2 ; TextEndBattle db $ff -SilphCo3Text1: ; 59fe5 (16:5fe5) - db $08 ; asm - ld a, [wd838] - bit 7, a +SilphCo3Text1: + TX_ASM + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI 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 -SilphCo3Text_59ff9: ; 59ff9 (16:5ff9) +SilphCo3Text_59ff9: TX_FAR _SilphCo3Text_59ff9 db "@" -SilphCo3Text_59ffe: ; 59ffe (16:5ffe) +SilphCo3Text_59ffe: TX_FAR _SilphCo3Text_59ffe db "@" -SilphCo3Text2: ; 5a003 (16:6003) - db $08 ; asm +SilphCo3Text2: + TX_ASM ld hl, SilphCo3TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo3BattleText1: ; 5a00d (16:600d) +SilphCo3BattleText1: TX_FAR _SilphCo3BattleText1 db "@" -SilphCo3EndBattleText1: ; 5a012 (16:6012) +SilphCo3EndBattleText1: TX_FAR _SilphCo3EndBattleText1 db "@" -SilphCo3AfterBattleText1: ; 5a017 (16:6017) +SilphCo3AfterBattleText1: TX_FAR _SilphCo3AfterBattleText1 db "@" -SilphCo3Text3: ; 5a01c (16:601c) - db $08 ; asm +SilphCo3Text3: + TX_ASM ld hl, SilphCo3TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo3BattleText2: ; 5a026 (16:6026) +SilphCo3BattleText2: TX_FAR _SilphCo3BattleText2 db "@" -SilphCo3EndBattleText2: ; 5a02b (16:602b) +SilphCo3EndBattleText2: TX_FAR _SilphCo3EndBattleText2 db "@" -SilphCo3AfterBattleText2: ; 5a030 (16:6030) +SilphCo3AfterBattleText2: TX_FAR _SilphCo3AfterBattleText2 db "@" diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index 15a46dd3..1cfd1ceb 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -1,42 +1,43 @@ -SilphCo4Script: ; 19d0b (6:5d0b) +SilphCo4Script: call SilphCo4Script_19d21 call EnableAutoTextBoxDrawing - ld hl, SilphCo4TrainerHeaders + ld hl, SilphCo4TrainerHeader0 ld de, SilphCo4ScriptPointers - ld a, [W_SILPHCO4CURSCRIPT] + ld a, [wSilphCo4CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO4CURSCRIPT], a + ld [wSilphCo4CurScript], a ret -SilphCo4Script_19d21: ; 19d21 (6:5d21) - ld hl, wd126 +SilphCo4Script_19d21: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, SilphCo4Data19d58 + ld hl, SilphCo4GateCoords call SilphCo4Script_19d5d call SilphCo4Script_19d89 - ld a, [wd82a] - bit 0, a + CheckEvent EVENT_SILPH_CO_4_UNLOCKED_DOOR1 jr nz, .asm_19d48 push af ld a, $54 - ld [wd09f], a - ld bc, $0602 + ld [wNewTileBlockID], a + lb bc, 6, 2 predef ReplaceTileBlock pop af .asm_19d48 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret nz ld a, $54 - ld [wd09f], a - ld bc, $0406 + ld [wNewTileBlockID], a + lb bc, 4, 6 predef_jump ReplaceTileBlock -SilphCo4Data19d58: ; 19d58 (6:5d58) - db $06, $02, $04, $06, $ff +SilphCo4GateCoords: + db $06,$02 + db $04,$06 + db $FF -SilphCo4Script_19d5d: ; 19d5d (6:5d5d) +SilphCo4Script_19d5d: push hl ld hl, wCardKeyDoorY ld a, [hli] @@ -49,19 +50,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 @@ -72,128 +73,127 @@ SilphCo4Script_19d5d: ; 19d5d (6:5d5d) ld [$ffe0], a ret -SilphCo4Script_19d89: ; 19d89 (6:5d89) - ld hl, wd82a +SilphCo4Script_19d89: + EventFlagAddress hl, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_19d97 ; 0x19d92 $3 - set 0, [hl] + jr nz, .next + SetEventReuseHL EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret -.asm_19d97 - set 1, [hl] +.next + SetEventAfterBranchReuseHL EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret -SilphCo4ScriptPointers: ; 19d9a (6:5d9a) +SilphCo4ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SilphCo4TextPointers: ; 19da0 (6:5da0) +SilphCo4TextPointers: dw SilphCo4Text1 dw SilphCo4Text2 dw SilphCo4Text3 dw SilphCo4Text4 - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText -SilphCo4TrainerHeaders: ; 19dae (6:5dae) -SilphCo4TrainerHeader0: ; 19dae (6:5dae) - db $2 ; flag's bit +SilphCo4TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_0 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 - -SilphCo4TrainerHeader2: ; 19dba (6:5dba) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_0 + dw SilphCo4BattleText2 ; TextBeforeBattle + dw SilphCo4AfterBattleText2 ; TextAfterBattle + dw SilphCo4EndBattleText2 ; TextEndBattle + dw SilphCo4EndBattleText2 ; TextEndBattle + +SilphCo4TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_1 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 - -SilphCo4TrainerHeader3: ; 19dc6 (6:5dc6) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_1 + dw SilphCo4BattleText3 ; TextBeforeBattle + dw SilphCo4AfterBattleText3 ; TextAfterBattle + dw SilphCo4EndBattleText3 ; TextEndBattle + dw SilphCo4EndBattleText3 ; TextEndBattle + +SilphCo4TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_2 + dw SilphCo4BattleText4 ; TextBeforeBattle + dw SilphCo4AfterBattleText4 ; TextAfterBattle + dw SilphCo4EndBattleText4 ; TextEndBattle + dw SilphCo4EndBattleText4 ; TextEndBattle db $ff -SilphCo4Text1: ; 19dd3 (6:5dd3) - db $08 ; asm +SilphCo4Text1: + TX_ASM ld hl, SilphCo4Text_19de0 ld de, SilphCo4Text_19de5 call SilphCo6Script_1a22f jp TextScriptEnd -SilphCo4Text_19de0: ; 19de0 (6:5de0) +SilphCo4Text_19de0: TX_FAR _SilphCo4Text_19de0 db "@" -SilphCo4Text_19de5: ; 19de5 (6:5de5) +SilphCo4Text_19de5: TX_FAR _SilphCo4Text_19de5 db "@" -SilphCo4Text2: ; 19dea (6:5dea) - db $08 ; asm +SilphCo4Text2: + TX_ASM ld hl, SilphCo4TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo4BattleText2: ; 19df4 (6:5df4) +SilphCo4BattleText2: TX_FAR _SilphCo4BattleText2 db "@" -SilphCo4EndBattleText2: ; 19df9 (6:5df9) +SilphCo4EndBattleText2: TX_FAR _SilphCo4EndBattleText2 db "@" -SilphCo4AfterBattleText2: ; 19dfe (6:5dfe) +SilphCo4AfterBattleText2: TX_FAR _SilphCo4AfterBattleText2 db "@" -SilphCo4Text3: ; 19e03 (6:5e03) - db $08 ; asm - ld hl, SilphCo4TrainerHeader2 +SilphCo4Text3: + TX_ASM + ld hl, SilphCo4TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo4BattleText3: ; 19e0d (6:5e0d) +SilphCo4BattleText3: TX_FAR _SilphCo4BattleText3 db "@" -SilphCo4EndBattleText3: ; 19e12 (6:5e12) +SilphCo4EndBattleText3: TX_FAR _SilphCo4EndBattleText3 db "@" -SilphCo4AfterBattleText3: ; 19e17 (6:5e17) +SilphCo4AfterBattleText3: TX_FAR _SilphCo4AfterBattleText3 db "@" -SilphCo4Text4: ; 19e1c (6:5e1c) - db $08 ; asm - ld hl, SilphCo4TrainerHeader3 +SilphCo4Text4: + TX_ASM + ld hl, SilphCo4TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SilphCo4BattleText4: ; 19e26 (6:5e26) +SilphCo4BattleText4: TX_FAR _SilphCo4BattleText4 db "@" -SilphCo4EndBattleText4: ; 19e2b (6:5e2b) +SilphCo4EndBattleText4: TX_FAR _SilphCo4EndBattleText4 db "@" -SilphCo4AfterBattleText4: ; 19e30 (6:5e30) +SilphCo4AfterBattleText4: TX_FAR _SilphCo4AfterBattleText4 db "@" diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index 0b63708b..45a81b68 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -1,220 +1,221 @@ -SilphCo5Script: ; 19f37 (6:5f37) +SilphCo5Script: call SilphCo5Script_19f4d call EnableAutoTextBoxDrawing - ld hl, SilphCo5TrainerHeaders + ld hl, SilphCo5TrainerHeader0 ld de, SilphCo5ScriptPointers - ld a, [W_SILPHCO5CURSCRIPT] + ld a, [wSilphCo5CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO5CURSCRIPT], a + ld [wSilphCo5CurScript], a ret -SilphCo5Script_19f4d: ; 19f4d (6:5f4d) - ld hl, wd126 +SilphCo5Script_19f4d: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, SilphCo5Coords + ld hl, SilphCo5GateCoords call SilphCo4Script_19d5d call SilphCo5Script_19f9e - ld a, [wd82c] - bit 0, a - jr nz, .asm_19f74 ; 0x19f63 $f + CheckEvent EVENT_SILPH_CO_5_UNLOCKED_DOOR1 + jr nz, .asm_19f74 push af ld a, $5f - ld [wd09f], a - ld bc, $0203 + ld [wNewTileBlockID], a + lb bc, 2, 3 predef ReplaceTileBlock pop af .asm_19f74 - bit 1, a - jr nz, .asm_19f87 ; 0x19f76 $f + CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 + jr nz, .asm_19f87 push af ld a, $5f - ld [wd09f], a - ld bc, $0603 + ld [wNewTileBlockID], a + lb bc, 6, 3 predef ReplaceTileBlock pop af .asm_19f87 - bit 2, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR2 ret nz ld a, $5f - ld [wd09f], a - ld bc, $0507 + ld [wNewTileBlockID], a + lb bc, 5, 7 predef_jump ReplaceTileBlock -SilphCo5Coords: ; 19f97 (6:5f97) ; coords? - db $02, $03, $06, $03, $05, $07, $ff +SilphCo5GateCoords: + db $02,$03 + db $06,$03 + db $05,$07 + db $FF -SilphCo5Script_19f9e: ; 19f9e (6:5f9e) - ld hl, wd82c +SilphCo5Script_19f9e: + EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_19fac ; 0x19fa7 $3 - set 0, [hl] + jr nz, .next1 + SetEventReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ret -.asm_19fac +.next1 cp $2 - jr nz, .asm_19fb3 ; 0x19fae $3 - set 1, [hl] + jr nz, .next2 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ret -.asm_19fb3 - set 2, [hl] +.next2 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ret -SilphCo5ScriptPointers: ; 19fb6 (6:5fb6) +SilphCo5ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SilphCo5TextPointers: ; 19fbc (6:5fbc) +SilphCo5TextPointers: dw SilphCo5Text1 dw SilphCo5Text2 dw SilphCo5Text3 dw SilphCo5Text4 dw SilphCo5Text5 - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw SilphCo5Text9 dw SilphCo5Text10 dw SilphCo5Text11 -SilphCo5TrainerHeaders: ; 19fd2 (6:5fd2) -Silphco5TrainerHeader0: ; 19fd2 (6:5fd2) - db $2 ; flag's bit +SilphCo5TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_0 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 - -Silphco5TrainerHeader2: ; 19fde (6:5fde) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_0 + dw SilphCo5BattleText2 ; TextBeforeBattle + dw SilphCo5AfterBattleText2 ; TextAfterBattle + dw SilphCo5EndBattleText2 ; TextEndBattle + dw SilphCo5EndBattleText2 ; TextEndBattle + +SilphCo5TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_1 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 - -Silphco5TrainerHeader3: ; 19fea (6:5fea) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_1 + dw SilphCo5BattleText3 ; TextBeforeBattle + dw SilphCo5AfterBattleText3 ; TextAfterBattle + dw SilphCo5EndBattleText3 ; TextEndBattle + dw SilphCo5EndBattleText3 ; TextEndBattle + +SilphCo5TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_2 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 - -Silphco5TrainerHeader4: ; 19ff6 (6:5ff6) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_2 + dw SilphCo5BattleText4 ; TextBeforeBattle + dw SilphCo5AfterBattleText4 ; TextAfterBattle + dw SilphCo5EndBattleText4 ; TextEndBattle + dw SilphCo5EndBattleText4 ; TextEndBattle + +SilphCo5TrainerHeader3: + dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_3 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_3 + dw SilphCo5BattleText5 ; TextBeforeBattle + dw SilphCo5AfterBattleText5 ; TextAfterBattle + dw SilphCo5EndBattleText5 ; TextEndBattle + dw SilphCo5EndBattleText5 ; TextEndBattle db $ff -SilphCo5Text1: ; 1a003 (6:6003) - db $08 ; asm +SilphCo5Text1: + TX_ASM ld hl, SilphCo5Text_1a010 ld de, SilphCo5Text_1a015 call SilphCo6Script_1a22f jp TextScriptEnd -SilphCo5Text_1a010: ; 1a010 (6:6010) +SilphCo5Text_1a010: TX_FAR _SilphCo5Text_1a010 db "@" -SilphCo5Text_1a015: ; 1a015 (6:6015) +SilphCo5Text_1a015: TX_FAR _SilphCo5Text_1a015 db "@" -SilphCo5Text2: ; 1a01a (6:601a) - db $08 ; asm - ld hl, Silphco5TrainerHeader0 +SilphCo5Text2: + TX_ASM + ld hl, SilphCo5TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo5BattleText2: ; 1a024 (6:6024) +SilphCo5BattleText2: TX_FAR _SilphCo5BattleText2 db "@" -SilphCo5EndBattleText2: ; 1a029 (6:6029) +SilphCo5EndBattleText2: TX_FAR _SilphCo5EndBattleText2 db "@" -SilphCo5AfterBattleText2: ; 1a02e (6:602e) +SilphCo5AfterBattleText2: TX_FAR _SilphCo5AfterBattleText2 db "@" -SilphCo5Text3: ; 1a033 (6:6033) - db $08 ; asm - ld hl, Silphco5TrainerHeader2 +SilphCo5Text3: + TX_ASM + ld hl, SilphCo5TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo5BattleText3: ; 1a03d (6:603d) +SilphCo5BattleText3: TX_FAR _SilphCo5BattleText3 db "@" -SilphCo5EndBattleText3: ; 1a042 (6:6042) +SilphCo5EndBattleText3: TX_FAR _SilphCo5EndBattleText3 db "@" -SilphCo5AfterBattleText3: ; 1a047 (6:6047) +SilphCo5AfterBattleText3: TX_FAR _SilphCo5AfterBattleText3 db "@" -SilphCo5Text4: ; 1a04c (6:604c) - db $08 ; asm - ld hl, Silphco5TrainerHeader3 +SilphCo5Text4: + TX_ASM + ld hl, SilphCo5TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SilphCo5BattleText4: ; 1a056 (6:6056) +SilphCo5BattleText4: TX_FAR _SilphCo5BattleText4 db "@" -SilphCo5EndBattleText4: ; 1a05b (6:605b) +SilphCo5EndBattleText4: TX_FAR _SilphCo5EndBattleText4 db "@" -SilphCo5AfterBattleText4: ; 1a060 (6:6060) +SilphCo5AfterBattleText4: TX_FAR _SilphCo5AfterBattleText4 db "@" -SilphCo5Text5: ; 1a065 (6:6065) - db $08 ; asm - ld hl, Silphco5TrainerHeader4 +SilphCo5Text5: + TX_ASM + ld hl, SilphCo5TrainerHeader3 call TalkToTrainer jp TextScriptEnd -SilphCo5BattleText5: ; 1a06f (6:606f) +SilphCo5BattleText5: TX_FAR _SilphCo5BattleText5 db "@" -SilphCo5EndBattleText5: ; 1a074 (6:6074) +SilphCo5EndBattleText5: TX_FAR _SilphCo5EndBattleText5 db "@" -SilphCo5AfterBattleText5: ; 1a079 (6:6079) +SilphCo5AfterBattleText5: TX_FAR _SilphCo5AfterBattleText5 db "@" -SilphCo5Text9: ; 1a07e (6:607e) +SilphCo5Text9: TX_FAR _SilphCo5Text9 db "@" -SilphCo5Text10: ; 1a083 (6:6083) +SilphCo5Text10: TX_FAR _SilphCo5Text10 db "@" -SilphCo5Text11: ; 1a088 (6:6088) +SilphCo5Text11: TX_FAR _SilphCo5Text11 db "@" diff --git a/scripts/silphco6.asm b/scripts/silphco6.asm index 137e31be..240b6793 100755 --- a/scripts/silphco6.asm +++ b/scripts/silphco6.asm @@ -1,47 +1,45 @@ -SilphCo6Script: ; 1a1a9 (6:61a9) +SilphCo6Script: call SilphCo6Script_1a1bf call EnableAutoTextBoxDrawing - ld hl, SilphCo6TrainerHeaders + ld hl, SilphCo6TrainerHeader0 ld de, SilphCo6ScriptPointers - ld a, [W_SILPHCO6CURSCRIPT] + ld a, [wSilphCo6CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO6CURSCRIPT], a + ld [wSilphCo6CurScript], a ret -SilphCo6Script_1a1bf: ; 1a1bf (6:61bf) - ld hl, wd126 +SilphCo6Script_1a1bf: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, SilphCo6Coords1 + ld hl, SilphCo6GateCoords call SilphCo4Script_19d5d call SilphCo6Script_1a1e6 - ld a, [wd82e] - bit 7, a + CheckEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR ret nz ld a, $5f - ld [wd09f], a - ld bc, $0602 + ld [wNewTileBlockID], a + lb bc, 6, 2 predef_jump ReplaceTileBlock -SilphCo6Coords1: ; 1a1e3 (6:61e3) - db $06, $02 - db $ff +SilphCo6GateCoords: + db $06,$02 + db $FF -SilphCo6Script_1a1e6: ; 1a1e6 (6:61e6) +SilphCo6Script_1a1e6: ld a, [$ffe0] and a ret z - ld hl, wd82e - set 7, [hl] + SetEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR ret -SilphCo6ScriptPointers: ; 1a1f0 (6:61f0) +SilphCo6ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SilphCo6TextPointers: ; 1a1f6 (6:61f6) +SilphCo6TextPointers: dw SilphCo6Text1 dw SilphCo6Text2 dw SilphCo6Text3 @@ -50,175 +48,173 @@ SilphCo6TextPointers: ; 1a1f6 (6:61f6) dw SilphCo6Text6 dw SilphCo6Text7 dw SilphCo6Text8 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText -SilphCo6TrainerHeaders: ; 1a20a (6:620a) -SilphCo6TrainerHeader0: ; 1a20a (6:620a) - db $6 ; flag's bit +SilphCo6TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_0 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 - -SilphCo6TrainerHeader2: ; 1a216 (6:6216) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_0 + dw SilphCo6BattleText2 ; TextBeforeBattle + dw SilphCo6AfterBattleText2 ; TextAfterBattle + dw SilphCo6EndBattleText2 ; TextEndBattle + dw SilphCo6EndBattleText2 ; TextEndBattle + +SilphCo6TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_1 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 - -SilphCo6TrainerHeader3: ; 1a222 (6:6222) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_1 + dw SilphCo6BattleText3 ; TextBeforeBattle + dw SilphCo6AfterBattleText3 ; TextAfterBattle + dw SilphCo6EndBattleText3 ; TextEndBattle + dw SilphCo6EndBattleText3 ; TextEndBattle + +SilphCo6TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1 + 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 +SilphCo6Script_1a22f: + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI + jr nz, .asm_1a238 + jr .asm_1a23a .asm_1a238 ld h, d ld l, e .asm_1a23a jp PrintText -SilphCo6Text1: ; 1a23d (6:623d) - db $08 ; asm +SilphCo6Text1: + TX_ASM ld hl, SilphCo6Text_1a24a ld de, SilphCo6Text_1a24f call SilphCo6Script_1a22f jp TextScriptEnd -SilphCo6Text_1a24a: ; 1a24a (6:624a) +SilphCo6Text_1a24a: TX_FAR _SilphCo6Text_1a24a db "@" -SilphCo6Text_1a24f: ; 1a24f (6:624f) +SilphCo6Text_1a24f: TX_FAR _SilphCo6Text_1a24f db "@" -SilphCo6Text2: ; 1a254 (6:6254) - db $08 ; asm +SilphCo6Text2: + TX_ASM ld hl, SilphCo6Text_1a261 ld de, SilphCo6Text_1a266 call SilphCo6Script_1a22f jp TextScriptEnd -SilphCo6Text_1a261: ; 1a261 (6:6261) +SilphCo6Text_1a261: TX_FAR _SilphCo6Text_1a261 db "@" -SilphCo6Text_1a266: ; 1a266 (6:6266) +SilphCo6Text_1a266: TX_FAR _SilphCo6Text_1a266 db "@" -SilphCo6Text3: ; 1a26b (6:626b) - db $08 ; asm +SilphCo6Text3: + TX_ASM ld hl, SilphCo6Text_1a278 ld de, SilphCo6Text_1a27d call SilphCo6Script_1a22f jp TextScriptEnd -SilphCo6Text_1a278: ; 1a278 (6:6278) +SilphCo6Text_1a278: TX_FAR _SilphCo6Text_1a278 db "@" -SilphCo6Text_1a27d: ; 1a27d (6:627d) +SilphCo6Text_1a27d: TX_FAR _SilphCo6Text_1a27d db "@" -SilphCo6Text4: ; 1a282 (6:6282) - db $08 ; asm +SilphCo6Text4: + TX_ASM ld hl, SilphCo6Text_1a28f ld de, SilphCo6Text_1a294 call SilphCo6Script_1a22f jp TextScriptEnd -SilphCo6Text_1a28f: ; 1a28f (6:628f) +SilphCo6Text_1a28f: TX_FAR _SilphCo6Text_1a28f db "@" -SilphCo6Text_1a294: ; 1a294 (6:6294) +SilphCo6Text_1a294: TX_FAR _SilphCo6Text_1a294 db "@" -SilphCo6Text5: ; 1a299 (6:6299) - db $08 ; asm +SilphCo6Text5: + TX_ASM ld hl, SilphCo6Text_1a2a6 ld de, SilphCo6Text_1a2ab call SilphCo6Script_1a22f jp TextScriptEnd -SilphCo6Text_1a2a6: ; 1a2a6 (6:62a6) +SilphCo6Text_1a2a6: TX_FAR _SilphCo6Text_1a2a6 db "@" -SilphCo6Text_1a2ab: ; 1a2ab (6:62ab) +SilphCo6Text_1a2ab: TX_FAR _SilphCo6Text_1a2ab db "@" -SilphCo6Text6: ; 1a2b0 (6:62b0) - db $08 ; asm +SilphCo6Text6: + TX_ASM ld hl, SilphCo6TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo6BattleText2: ; 1a2ba (6:62ba) +SilphCo6BattleText2: TX_FAR _SilphCo6BattleText2 db "@" -SilphCo6EndBattleText2: ; 1a2bf (6:62bf) +SilphCo6EndBattleText2: TX_FAR _SilphCo6EndBattleText2 db "@" -SilphCo6AfterBattleText2: ; 1a2c4 (6:62c4) +SilphCo6AfterBattleText2: TX_FAR _SilphCo6AfterBattleText2 db "@" -SilphCo6Text7: ; 1a2c9 (6:62c9) - db $08 ; asm - ld hl, SilphCo6TrainerHeader2 +SilphCo6Text7: + TX_ASM + ld hl, SilphCo6TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo6BattleText3: ; 1a2d3 (6:62d3) +SilphCo6BattleText3: TX_FAR _SilphCo6BattleText3 db "@" -SilphCo6EndBattleText3: ; 1a2d8 (6:62d8) +SilphCo6EndBattleText3: TX_FAR _SilphCo6EndBattleText3 db "@" -SilphCo6AfterBattleText3: ; 1a2dd (6:62dd) +SilphCo6AfterBattleText3: TX_FAR _SilphCo6AfterBattleText3 db "@" -SilphCo6Text8: ; 1a2e2 (6:62e2) - db $08 ; asm - ld hl, SilphCo6TrainerHeader3 +SilphCo6Text8: + TX_ASM + ld hl, SilphCo6TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SilphCo6BattleText4: ; 1a2ec (6:62ec) +SilphCo6BattleText4: TX_FAR _SilphCo6BattleText4 db "@" -SilphCo6EndBattleText4: ; 1a2f1 (6:62f1) +SilphCo6EndBattleText4: TX_FAR _SilphCo6EndBattleText4 db "@" -SilphCo6AfterBattleText4: ; 1a2f6 (6:62f6) +SilphCo6AfterBattleText4: TX_FAR _SilphCo6AfterBattleText4 db "@" diff --git a/scripts/silphco7.asm b/scripts/silphco7.asm index 23eb795c..b211c8a9 100755 --- a/scripts/silphco7.asm +++ b/scripts/silphco7.asm @@ -1,51 +1,53 @@ -SilphCo7Script: ; 51b61 (14:5b61) +SilphCo7Script: call SilphCo7Script_51b77 call EnableAutoTextBoxDrawing - ld hl, SilphCo7TrainerHeaders + ld hl, SilphCo7TrainerHeader0 ld de, SilphCo7ScriptPointers - ld a, [W_SILPHCO7CURSCRIPT] + ld a, [wSilphCo7CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO7CURSCRIPT], a + ld [wSilphCo7CurScript], a ret -SilphCo7Script_51b77: ; 51b77 (14:5b77) - ld hl, wd126 +SilphCo7Script_51b77: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_51bc1 ; $5bc1 + ld hl, SilphCo7GateCoords call SilphCo7Text_51bc8 call SilphCo7Text_51bf4 - ld a, [wd830] - bit 4, a + CheckEvent EVENT_SILPH_CO_7_UNLOCKED_DOOR1 jr nz, .asm_51b9e push af ld a, $54 - ld [wd09f], a - ld bc, $305 + ld [wNewTileBlockID], a + lb bc, 3, 5 predef ReplaceTileBlock pop af .asm_51b9e - bit 5, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_7_UNLOCKED_DOOR2, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 jr nz, .asm_51bb1 push af ld a, $54 - ld [wd09f], a - ld bc, $20a + ld [wNewTileBlockID], a + lb bc, 2, 10 predef ReplaceTileBlock pop af .asm_51bb1 - bit 6, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_7_UNLOCKED_DOOR3, EVENT_SILPH_CO_7_UNLOCKED_DOOR2 ret nz ld a, $54 - ld [wd09f], a - ld bc, $60a + ld [wNewTileBlockID], a + lb bc, 6, 10 predef_jump ReplaceTileBlock -DataTable_51bc1: ; 51bc1 (14:5bc1) - db $03,$05,$02,$0A,$06,$0A,$FF +SilphCo7GateCoords: + db $03,$05 + db $02,$0A + db $06,$0A + db $FF -SilphCo7Text_51bc8: ; 51bc8 (14:5bc8) +SilphCo7Text_51bc8: push hl ld hl, wCardKeyDoorY ld a, [hli] @@ -81,34 +83,34 @@ SilphCo7Text_51bc8: ; 51bc8 (14:5bc8) ld [$ffe0], a ret -SilphCo7Text_51bf4: ; 51bf4 (14:5bf4) - ld hl, wd830 +SilphCo7Text_51bf4: + EventFlagAddress hl, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_51c02 - set 4, [hl] + jr nz, .next1 + SetEventReuseHL EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ret -.asm_51c02 +.next1 cp $2 - jr nz, .asm_51c09 - set 5, [hl] + jr nz, .next2 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_7_UNLOCKED_DOOR2, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ret -.asm_51c09 - set 6, [hl] +.next2 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_7_UNLOCKED_DOOR3, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 ret -SilphCo7Text_51c0c: ; 51c0c (14:5c0c) +SilphCo7Text_51c0c: xor a ld [wJoyIgnore], a -SilphCo7Text_51c10: ; 51c10 (14:5c10) - ld [W_SILPHCO7CURSCRIPT], a - ld [W_CURMAPSCRIPT], a +SilphCo7Text_51c10: + ld [wSilphCo7CurScript], a + ld [wCurMapScript], a ret -SilphCo7ScriptPointers: ; 51c17 (14:5c17) +SilphCo7ScriptPointers: dw SilphCo7Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle @@ -116,9 +118,8 @@ SilphCo7ScriptPointers: ; 51c17 (14:5c17) dw SilphCo7Script4 dw SilphCo7Script5 -SilphCo7Script0: ; 51c23 (14:5c23) - ld a, [wd82f] - bit 0, a +SilphCo7Script0: + CheckEvent EVENT_BEAT_SILPH_CO_RIVAL jp nz, CheckFightingMapTrainers ld hl, CoordsData_51c78 call ArePlayerCoordsInArray @@ -127,60 +128,64 @@ SilphCo7Script0: ; 51c23 (14:5c23) ld [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a - ld a, $4 - ld [wd528], a + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, $9 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $9 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF ld de, MovementData_51c7d - ld a, [wWhichTrade] ; wWhichTrade + ld a, [wCoordIndex] ld [wcf0d], a cp $1 jr z, .asm_51c6c inc de .asm_51c6c ld a, $9 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a call MoveSprite ld a, $3 jp SilphCo7Text_51c10 -CoordsData_51c78: ; 51c78 (14:5c78) +CoordsData_51c78: db $02,$03 db $03,$03 db $FF -MovementData_51c7d: ; 51c7d (14:5c7d) - db $40,$40,$40,$40,$FF +MovementData_51c7d: + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db $FF -SilphCo7Script3: ; 51c82 (14:5c82) +SilphCo7Script3: ld a, [wd730] bit 0, a ret nz xor a ld [wJoyIgnore], a ld a, $d - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], 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 a, OPP_SONY2 + ld [wCurOpponent], a + ld a, [wRivalStarter] cp STARTER2 jr nz, .asm_51cb6 ld a, $7 @@ -193,30 +198,29 @@ SilphCo7Script3: ; 51c82 (14:5c82) .asm_51cbe ld a, $9 .asm_51cc0 - ld [W_TRAINERNO], a ; wd05d + ld [wTrainerNo], a ld a, $4 jp SilphCo7Text_51c10 -SilphCo7Script4: ; 51cc8 (14:5cc8) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +SilphCo7Script4: + ld a, [wIsInBattle] cp $ff jp z, SilphCo7Text_51c0c ld a, $f0 ld [wJoyIgnore], a - ld hl, wd82f - set 0, [hl] - ld a, $4 - ld [wd528], a + SetEvent EVENT_BEAT_SILPH_CO_RIVAL + ld a, PLAYER_DIR_DOWN + ld [wPlayerMovingDirection], a ld a, $9 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c - ld a, $4 - ld [$ff8d], a + ld [H_SPRITEINDEX], a + ld a, SPRITE_FACING_UP + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $f - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateStart ld de, MovementData_51d1d @@ -226,30 +230,39 @@ SilphCo7Script4: ; 51cc8 (14:5cc8) ld de, MovementData_51d1a .asm_51d0e ld a, $9 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a call MoveSprite ld a, $5 jp SilphCo7Text_51c10 -MovementData_51d1a: ; 51d1a (14:5d1a) - db $C0,$C0,$FF +MovementData_51d1a: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db $FF -MovementData_51d1d: ; 51d1d (14:5d1d) - db $80,$40,$40,$C0,$C0,$C0,$00,$FF +MovementData_51d1d: + db NPC_MOVEMENT_LEFT + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_UP + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN + db $FF -SilphCo7Script5: ; 51d25 (14:5d25) +SilphCo7Script5: ld a, [wd730] bit 0, a ret nz ld a, HS_SILPH_CO_7F_RIVAL - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject call PlayDefaultMusic xor a ld [wJoyIgnore], a jp SilphCo7Text_51c10 -SilphCo7TextPointers: ; 51d3f (14:5d3f) +SilphCo7TextPointers: dw SilphCo7Text1 dw SilphCo7Text2 dw SilphCo7Text3 @@ -259,60 +272,58 @@ SilphCo7TextPointers: ; 51d3f (14:5d3f) dw SilphCo7Text7 dw SilphCo7Text8 dw SilphCo7Text9 - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw SilphCo7Text13 dw SilphCo7Text14 dw SilphCo7Text15 -SilphCo7TrainerHeaders: ; 51d5d (14:5d5d) -SilphCo7TrainerHeader0: ; 51d5d (14:5d5d) - db $5 ; flag's bit +SilphCo7TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_0 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 - -SilphCo7TrainerHeader2: ; 51d69 (14:5d69) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_0 + dw SilphCo7BattleText1 ; TextBeforeBattle + dw SilphCo7AfterBattleText1 ; TextAfterBattle + dw SilphCo7EndBattleText1 ; TextEndBattle + dw SilphCo7EndBattleText1 ; TextEndBattle + +SilphCo7TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_1 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 - -SilphCo7TrainerHeader3: ; 51d75 (14:5d75) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_1 + dw SilphCo7BattleText2 ; TextBeforeBattle + dw SilphCo7AfterBattleText2 ; TextAfterBattle + dw SilphCo7EndBattleText2 ; TextEndBattle + dw SilphCo7EndBattleText2 ; TextEndBattle + +SilphCo7TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_2 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 - -SilphCo7TrainerHeader4: ; 51d81 (14:5d81) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_2 + dw SilphCo7BattleText3 ; TextBeforeBattle + dw SilphCo7AfterBattleText3 ; TextAfterBattle + dw SilphCo7EndBattleText3 ; TextEndBattle + dw SilphCo7EndBattleText3 ; TextEndBattle + +SilphCo7TrainerHeader3: + dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 1 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 1 + 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 - ld a, [wd838] - bit 7, a ; saved silph? + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .LaprasGuyText call PrintText @@ -320,7 +331,7 @@ SilphCo7Text1: .givelapras ld hl, .MeetLaprasGuyText call PrintText - ld bc, (LAPRAS << 8) | 15 + lb bc, LAPRAS, 15 call GivePokemon jr nc, .done ld a, [wSimulatedJoypadStatesEnd] @@ -355,9 +366,8 @@ SilphCo7Text1: db "@" SilphCo7Text2: - db $8 - ld a, [wd838] - bit 7, a ; saved silph? + TX_ASM + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .rockettext call PrintText @@ -377,9 +387,8 @@ SilphCo7Text2: db "@" SilphCo7Text3: - db $08 ; asm - ld a, [wd838] - bit 7, a ; saved silph? + TX_ASM + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .rockettext call PrintText @@ -399,9 +408,8 @@ SilphCo7Text3: db "@" SilphCo7Text4: - db $08 ; asm - ld a, [wd838] - bit 7, a ; saved silph? + TX_ASM + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .rockettext call PrintText @@ -420,100 +428,100 @@ SilphCo7Text4: TX_FAR _SilphCo7Text_51e4b db "@" -SilphCo7Text5: ; 51e50 (14:5e50) - db $08 ; asm +SilphCo7Text5: + TX_ASM ld hl, SilphCo7TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo7BattleText1: ; 51e5a (14:5e5a) +SilphCo7BattleText1: TX_FAR _SilphCo7BattleText1 db "@" -SilphCo7EndBattleText1: ; 51e5f (14:5e5f) +SilphCo7EndBattleText1: TX_FAR _SilphCo7EndBattleText1 db "@" -SilphCo7AfterBattleText1: ; 51e64 (14:5e64) +SilphCo7AfterBattleText1: TX_FAR _SilphCo7AfterBattleText1 db "@" -SilphCo7Text6: ; 51e69 (14:5e69) - db $08 ; asm - ld hl, SilphCo7TrainerHeader2 +SilphCo7Text6: + TX_ASM + ld hl, SilphCo7TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo7BattleText2: ; 51e73 (14:5e73) +SilphCo7BattleText2: TX_FAR _SilphCo7BattleText2 db "@" -SilphCo7EndBattleText2: ; 51e78 (14:5e78) +SilphCo7EndBattleText2: TX_FAR _SilphCo7EndBattleText2 db "@" -SilphCo7AfterBattleText2: ; 51e7d (14:5e7d) +SilphCo7AfterBattleText2: TX_FAR _SilphCo7AfterBattleText2 db "@" -SilphCo7Text7: ; 51e82 (14:5e82) - db $08 ; asm - ld hl, SilphCo7TrainerHeader3 +SilphCo7Text7: + TX_ASM + ld hl, SilphCo7TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SilphCo7BattleText3: ; 51e8c (14:5e8c) +SilphCo7BattleText3: TX_FAR _SilphCo7BattleText3 db "@" -SilphCo7EndBattleText3: ; 51e91 (14:5e91) +SilphCo7EndBattleText3: TX_FAR _SilphCo7EndBattleText3 db "@" -SilphCo7AfterBattleText3: ; 51e96 (14:5e96) +SilphCo7AfterBattleText3: TX_FAR _SilphCo7AfterBattleText3 db "@" -SilphCo7Text8: ; 51e9b (14:5e9b) - db $08 ; asm - ld hl, SilphCo7TrainerHeader4 +SilphCo7Text8: + TX_ASM + ld hl, SilphCo7TrainerHeader3 call TalkToTrainer jp TextScriptEnd -SilphCo7BattleText4: ; 51ea5 (14:5ea5) +SilphCo7BattleText4: TX_FAR _SilphCo7BattleText4 db "@" -SilphCo7EndBattleText4: ; 51eaa (14:5eaa) +SilphCo7EndBattleText4: TX_FAR _SilphCo7EndBattleText4 db "@" -SilphCo7AfterBattleText4: ; 51eaf (14:5eaf) +SilphCo7AfterBattleText4: TX_FAR _SilphCo7AfterBattleText4 db "@" -SilphCo7Text9: ; 51eb4 (14:5eb4) - db $08 ; asm +SilphCo7Text9: + TX_ASM ld hl, SilphCo7Text_51ebe call PrintText jp TextScriptEnd -SilphCo7Text_51ebe: ; 51ebe (14:5ebe) +SilphCo7Text_51ebe: TX_FAR _SilphCo7Text_51ebe db "@" -SilphCo7Text13: ; 51ec3 (14:5ec3) +SilphCo7Text13: TX_FAR _SilphCo7Text_51ec3 db "@" -SilphCo7Text14: ; 51ec8 (14:5ec8) +SilphCo7Text14: TX_FAR _SilphCo7Text_51ec8 db "@" -SilphCo7Text_51ecd: ; 51ecd (14:5ecd) +SilphCo7Text_51ecd: TX_FAR _SilphCo7Text_51ecd db "@" -SilphCo7Text15: ; 51ed2 (14:5ed2) +SilphCo7Text15: TX_FAR _SilphCo7Text_51ed2 db "@" diff --git a/scripts/silphco8.asm b/scripts/silphco8.asm index ebca9b95..498fd569 100755 --- a/scripts/silphco8.asm +++ b/scripts/silphco8.asm @@ -1,33 +1,33 @@ -SilphCo8Script: ; 56504 (15:6504) +SilphCo8Script: call SilphCo8Script_5651a call EnableAutoTextBoxDrawing ld hl, SilphCo8TrainerHeader0 ld de, SilphCo8ScriptPointers - ld a, [W_SILPHCO8CURSCRIPT] + ld a, [wSilphCo8CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO8CURSCRIPT], a + ld [wSilphCo8CurScript], a ret -SilphCo8Script_5651a: ; 5651a (15:651a) - ld hl, wd126 +SilphCo8Script_5651a: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_5653e ; $653e + ld hl, SilphCo8GateCoords call SilphCo8Script_56541 call SilphCo8Script_5656d - ld a, [wd832] - bit 0, a + CheckEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR ret nz ld a, $5f - ld [wd09f], a - ld bc, $403 + ld [wNewTileBlockID], a + lb bc, 4, 3 predef_jump ReplaceTileBlock -DataTable_5653e: ; 5653e (15:653e) - db $04,$03,$FF +SilphCo8GateCoords: + db $04,$03 + db $FF -SilphCo8Script_56541: ; 56541 (15:6541) +SilphCo8Script_56541: push hl ld hl, wCardKeyDoorY ld a, [hli] @@ -63,124 +63,121 @@ SilphCo8Script_56541: ; 56541 (15:6541) ld [$ffe0], a ret -SilphCo8Script_5656d: ; 5656d (15:656d) +SilphCo8Script_5656d: ld a, [$ffe0] and a ret z - ld hl, wd832 - set 0, [hl] + SetEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR ret -SilphCo8ScriptPointers: ; 56577 (15:6577) +SilphCo8ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SilphCo8TextPointers: ; 5657d (15:657d) +SilphCo8TextPointers: dw SilphCo8Text1 dw SilphCo8Text2 dw SilphCo8Text3 dw SilphCo8Text4 -SilphCo8TrainerHeaders: ; 56585 (15:6585) -SilphCo8TrainerHeader0: ; 56585 (15:6585) - db $2 ; flag's bit +SilphCo8TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_8F_TRAINER_0 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 - -SilphCo8TrainerHeader1: ; 56591 (15:6591) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_8F_TRAINER_0 + dw SilphCo8BattleText1 ; TextBeforeBattle + dw SilphCo8AfterBattleText1 ; TextAfterBattle + dw SilphCo8EndBattleText1 ; TextEndBattle + dw SilphCo8EndBattleText1 ; TextEndBattle + +SilphCo8TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_8F_TRAINER_1 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 - -SilphCo8TrainerHeader2: ; 5659d (15:659d) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_8F_TRAINER_1 + dw SilphCo8BattleText2 ; TextBeforeBattle + dw SilphCo8AfterBattleText2 ; TextAfterBattle + dw SilphCo8EndBattleText2 ; TextEndBattle + dw SilphCo8EndBattleText2 ; TextEndBattle + +SilphCo8TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SILPH_CO_8F_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_8F_TRAINER_2 + dw SilphCo8BattleText3 ; TextBeforeBattle + dw SilphCo8AfterBattleText3 ; TextAfterBattle + dw SilphCo8EndBattleText3 ; TextEndBattle + dw SilphCo8EndBattleText3 ; TextEndBattle db $ff -SilphCo8Text1: ; 565aa (15:65aa) - db $08 ; asm - ld a, [wd838] - bit 7, a +SilphCo8Text1: + TX_ASM + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI 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 -SilphCo8Text_565be: ; 565be (15:65be) +SilphCo8Text_565be: TX_FAR _SilphCo8Text_565be db "@" -SilphCo8Text_565c3: ; 565c3 (15:65c3) +SilphCo8Text_565c3: TX_FAR _SilphCo8Text_565c3 db "@" -SilphCo8Text2: ; 565c8 (15:65c8) - db $08 ; asm +SilphCo8Text2: + TX_ASM ld hl, SilphCo8TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo8Text3: ; 565d2 (15:65d2) - db $08 ; asm +SilphCo8Text3: + TX_ASM ld hl, SilphCo8TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo8Text4: ; 565dc (15:65dc) - db $08 ; asm +SilphCo8Text4: + TX_ASM ld hl, SilphCo8TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SilphCo8BattleText1: ; 565e6 (15:65e6) +SilphCo8BattleText1: TX_FAR _SilphCo8BattleText1 db "@" -SilphCo8EndBattleText1: ; 565eb (15:65eb) +SilphCo8EndBattleText1: TX_FAR _SilphCo8EndBattleText1 db "@" -SilphCo8AfterBattleText1: ; 565f0 (15:65f0) +SilphCo8AfterBattleText1: TX_FAR _SilphCo8AfterBattleText1 db "@" -SilphCo8BattleText2: ; 565f5 (15:65f5) +SilphCo8BattleText2: TX_FAR _SilphCo8BattleText2 db "@" -SilphCo8EndBattleText2: ; 565fa (15:65fa) +SilphCo8EndBattleText2: TX_FAR _SilphCo8EndBattleText2 db "@" -SilphCo8AfterBattleText2: ; 565ff (15:65ff) +SilphCo8AfterBattleText2: TX_FAR _SilphCo8AfterBattleText2 db "@" -SilphCo8BattleText3: ; 56604 (15:6604) +SilphCo8BattleText3: TX_FAR _SilphCo8BattleText3 db "@" -SilphCo8EndBattleText3: ; 56609 (15:6609) +SilphCo8EndBattleText3: TX_FAR _SilphCo8EndBattleText3 db "@" -SilphCo8AfterBattleText3: ; 5660e (15:660e) +SilphCo8AfterBattleText3: TX_FAR _SilphCo8AfterBattleText3 db "@" diff --git a/scripts/silphco9.asm b/scripts/silphco9.asm index e8b16927..57b8bc89 100755 --- a/scripts/silphco9.asm +++ b/scripts/silphco9.asm @@ -1,60 +1,63 @@ -SilphCo9Script: ; 5d7bb (17:57bb) +SilphCo9Script: call SilphCo9Script_5d7d1 call EnableAutoTextBoxDrawing - ld hl, SilphCo9TrainerHeaders + ld hl, SilphCo9TrainerHeader0 ld de, SilphCo9ScriptPointers - ld a, [W_SILPHCO9CURSCRIPT] + ld a, [wSilphCo9CurScript] call ExecuteCurMapScriptInTable - ld [W_SILPHCO9CURSCRIPT], a + ld [wSilphCo9CurScript], a ret -SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1) - ld hl, wd126 +SilphCo9Script_5d7d1: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_5d82e ; $582e + ld hl, SilphCo9GateCoords call SilphCo9Script_5d837 call SilphCo9Script_5d863 - ld a, [wd834] - bit 0, a + CheckEvent EVENT_SILPH_CO_9_UNLOCKED_DOOR1 jr nz, .asm_5d7f8 push af ld a, $5f - ld [wd09f], a - ld bc, $401 + ld [wNewTileBlockID], a + lb bc, 4, 1 predef ReplaceTileBlock pop af .asm_5d7f8 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR2, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 jr nz, .asm_5d80b push af ld a, $54 - ld [wd09f], a - ld bc, $209 + ld [wNewTileBlockID], a + lb bc, 2, 9 predef ReplaceTileBlock pop af .asm_5d80b - bit 2, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR3, EVENT_SILPH_CO_9_UNLOCKED_DOOR2 jr nz, .asm_5d81e push af ld a, $54 - ld [wd09f], a - ld bc, $509 + ld [wNewTileBlockID], a + lb bc, 5, 9 predef ReplaceTileBlock pop af .asm_5d81e - bit 3, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR4, EVENT_SILPH_CO_9_UNLOCKED_DOOR3 ret nz ld a, $5f - ld [wd09f], a - ld bc, $605 + ld [wNewTileBlockID], a + lb bc, 6, 5 predef_jump ReplaceTileBlock -DataTable_5d82e: ; 5d82e (17:582e) - db $04,$01,$02,$09,$05,$09,$06,$05,$FF +SilphCo9GateCoords: + db $04,$01 + db $02,$09 + db $05,$09 + db $06,$05 + db $FF -SilphCo9Script_5d837: ; 5d837 (17:5837) +SilphCo9Script_5d837: push hl ld hl, wCardKeyDoorY ld a, [hli] @@ -90,77 +93,75 @@ SilphCo9Script_5d837: ; 5d837 (17:5837) ld [$ffe0], a ret -SilphCo9Script_5d863: ; 5d863 (17:5863) - ld hl, wd834 +SilphCo9Script_5d863: + EventFlagAddress hl, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_5d871 - set 0, [hl] + jr nz, .next1 + SetEventReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ret -.asm_5d871 +.next1 cp $2 - jr nz, .asm_5d878 - set 1, [hl] + jr nz, .next2 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR2, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ret -.asm_5d878 +.next2 cp $3 - jr nz, .asm_5d87f - set 2, [hl] + jr nz, .next3 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR3, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ret -.asm_5d87f +.next3 cp $4 ret nz - set 3, [hl] + SetEventAfterBranchReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR4, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 ret -SilphCo9ScriptPointers: ; 5d885 (17:5885) +SilphCo9ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SilphCo9TextPointers: ; 5d88b (17:588b) +SilphCo9TextPointers: dw SilphCo9Text1 dw SilphCo9Text2 dw SilphCo9Text3 dw SilphCo9Text4 -SilphCo9TrainerHeaders: ; 5d893 (17:5893) -SilphCo9TrainerHeader0: ; 5d893 (17:5893) - db $2 ; flag's bit +SilphCo9TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_0 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 - -SilphCo9TrainerHeader1: ; 5d89f (17:589f) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_0 + dw SilphCo9BattleText1 ; TextBeforeBattle + dw SilphCo9AfterBattleText1 ; TextAfterBattle + dw SilphCo9EndBattleText1 ; TextEndBattle + dw SilphCo9EndBattleText1 ; TextEndBattle + +SilphCo9TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_1 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 - -SilphCo9TrainerHeader2: ; 5d8ab (17:58ab) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_1 + dw SilphCo9BattleText2 ; TextBeforeBattle + dw SilphCo9AfterBattleText2 ; TextAfterBattle + dw SilphCo9EndBattleText2 ; TextEndBattle + dw SilphCo9EndBattleText2 ; TextEndBattle + +SilphCo9TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_2 + dw SilphCo9BattleText3 ; TextBeforeBattle + dw SilphCo9AfterBattleText3 ; TextAfterBattle + dw SilphCo9EndBattleText3 ; TextEndBattle + dw SilphCo9EndBattleText3 ; TextEndBattle db $ff -SilphCo9Text1: ; 5d8b8 (17:58b8) - db $08 ; asm - ld a, [wd838] - bit 7, a - jr nz, .asm_a14c3 ; 0x5d8be +SilphCo9Text1: + TX_ASM + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI + jr nz, .asm_5d8dc ld hl, SilphCo9Text_5d8e5 call PrintText predef HealParty @@ -169,75 +170,75 @@ 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) +SilphCo9Text_5d8e5: TX_FAR _SilphCo9Text_5d8e5 db "@" -SilphCo9Text_5d8ea: ; 5d8ea (17:58ea) +SilphCo9Text_5d8ea: TX_FAR _SilphCo9Text_5d8ea db "@" -SilphCo9Text_5d8ef: ; 5d8ef (17:58ef) +SilphCo9Text_5d8ef: TX_FAR _SilphCo9Text_5d8ef db "@" -SilphCo9Text2: ; 5d8f4 (17:58f4) - db $08 ; asm +SilphCo9Text2: + TX_ASM ld hl, SilphCo9TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SilphCo9Text3: ; 5d8fe (17:58fe) - db $08 ; asm +SilphCo9Text3: + TX_ASM ld hl, SilphCo9TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SilphCo9Text4: ; 5d908 (17:5908) - db $08 ; asm +SilphCo9Text4: + TX_ASM ld hl, SilphCo9TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SilphCo9BattleText1: ; 5d912 (17:5912) +SilphCo9BattleText1: TX_FAR _SilphCo9BattleText1 db "@" -SilphCo9EndBattleText1: ; 5d917 (17:5917) +SilphCo9EndBattleText1: TX_FAR _SilphCo9EndBattleText1 db "@" -SilphCo9AfterBattleText1: ; 5d91c (17:591c) +SilphCo9AfterBattleText1: TX_FAR _SilphCo9AfterBattleText1 db "@" -SilphCo9BattleText2: ; 5d921 (17:5921) +SilphCo9BattleText2: TX_FAR _SilphCo9BattleText2 db "@" -SilphCo9EndBattleText2: ; 5d926 (17:5926) +SilphCo9EndBattleText2: TX_FAR _SilphCo9EndBattleText2 db "@" -SilphCo9AfterBattleText2: ; 5d92b (17:592b) +SilphCo9AfterBattleText2: TX_FAR _SilphCo9AfterBattleText2 db "@" -SilphCo9BattleText3: ; 5d930 (17:5930) +SilphCo9BattleText3: TX_FAR _SilphCo9BattleText3 db "@" -SilphCo9EndBattleText3: ; 5d935 (17:5935) +SilphCo9EndBattleText3: TX_FAR _SilphCo9EndBattleText3 db "@" -SilphCo9AfterBattleText3: ; 5d93a (17:593a) +SilphCo9AfterBattleText3: TX_FAR _SilphCo9AfterBattleText3 db "@" diff --git a/scripts/silphcoelevator.asm b/scripts/silphcoelevator.asm index 48d406cc..df4d08c7 100755 --- a/scripts/silphcoelevator.asm +++ b/scripts/silphcoelevator.asm @@ -1,5 +1,5 @@ -SilphCoElevatorScript: ; 457c0 (11:57c0) - ld hl, wd126 +SilphCoElevatorScript: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] push hl @@ -14,15 +14,15 @@ SilphCoElevatorScript: ; 457c0 (11:57c0) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret -SilphCoElevatorScript_457dc: ; 457dc (11:57dc) +SilphCoElevatorScript_457dc: ld hl, wWarpEntries - ld a, [wd73b] + ld a, [wWarpedFromWhichWarp] ld b, a - ld a, [wd73c] + ld a, [wWarpedFromWhichMap] ld c, a call SilphCoElevatorScript_457ea -SilphCoElevatorScript_457ea: ; 457ea (11:57ea) +SilphCoElevatorScript_457ea: inc hl inc hl ld a, b @@ -31,21 +31,31 @@ SilphCoElevatorScript_457ea: ; 457ea (11:57ea) ld [hli], a ret -SilphCoElevatorScript_457f1: ; 457f1 (11:57f1) - ld hl, SilphCoElavatorFloors ; $5804 +SilphCoElevatorScript_457f1: + ld hl, SilphCoElavatorFloors call LoadItemList - ld hl, SilphCoElevatorWarpMaps ; $5811 - ld de, wcc5b - ld bc, $16 + ld hl, SilphCoElevatorWarpMaps + ld de, wElevatorWarpMaps + ld bc, SilphCoElevatorWarpMapsEnd - SilphCoElevatorWarpMaps call CopyData ret -SilphCoElavatorFloors: ; 45804 (11:45804) +SilphCoElavatorFloors: db $0B ; num elements in list - db $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F, $60 ; "1F", "2F", "3F", "4F", ... , "11F" + db FLOOR_1F + db FLOOR_2F + db FLOOR_3F + db FLOOR_4F + db FLOOR_5F + db FLOOR_6F + db FLOOR_7F + db FLOOR_8F + db FLOOR_9F + db FLOOR_10F + db FLOOR_11F db $FF ; terminator -SilphCoElevatorWarpMaps: ; 45811 (11:45811) +SilphCoElevatorWarpMaps: ; first byte is warp number ; second byte is map number ; These specify where the player goes after getting out of the elevator. @@ -60,18 +70,19 @@ SilphCoElevatorWarpMaps: ; 45811 (11:45811) db $02, SILPH_CO_9F db $02, SILPH_CO_10F db $01, SILPH_CO_11F +SilphCoElevatorWarpMapsEnd: -SilphCoElevatorScript_45827: ; 45827 (11:5827) +SilphCoElevatorScript_45827: call Delay3 callba ShakeElevator ret -SilphCoElevatorTextPointers: ; 45833 (11:5833) +SilphCoElevatorTextPointers: dw SilphCoElevatorText1 -SilphCoElevatorText1: ; 45835 (11:5835) - db $08 ; asm +SilphCoElevatorText1: + TX_ASM call SilphCoElevatorScript_457f1 - ld hl, SilphCoElevatorWarpMaps ; $5811 - predef Func_1c9c6 + ld hl, SilphCoElevatorWarpMaps + predef DisplayElevatorFloorMenu jp TextScriptEnd diff --git a/scripts/ssanne1.asm b/scripts/ssanne1.asm index 4814dfe9..3f8861d5 100755 --- a/scripts/ssanne1.asm +++ b/scripts/ssanne1.asm @@ -1,15 +1,15 @@ -SSAnne1Script: ; 61265 (18:5265) +SSAnne1Script: call EnableAutoTextBoxDrawing ret -SSAnne1TextPointers: ; 61269 (18:5269) +SSAnne1TextPointers: dw SSAnne1Text1 dw SSAnne1Text2 -SSAnne1Text1: ; 6126d (18:526d) +SSAnne1Text1: TX_FAR _SSAnne1Text1 db "@" -SSAnne1Text2: ; 61272 (18:5272) +SSAnne1Text2: TX_FAR _SSAnne1Text2 db "@" diff --git a/scripts/ssanne10.asm b/scripts/ssanne10.asm index 8f3ff9a4..12433732 100755 --- a/scripts/ssanne10.asm +++ b/scripts/ssanne10.asm @@ -1,18 +1,18 @@ -SSAnne10Script: ; 61d55 (18:5d55) +SSAnne10Script: call EnableAutoTextBoxDrawing - ld hl, SSAnne10TrainerHeaders + ld hl, SSAnne10TrainerHeader0 ld de, SSAnne10ScriptPointers - ld a, [W_SSANNE10CURSCRIPT] + ld a, [wSSAnne10CurScript] call ExecuteCurMapScriptInTable - ld [W_SSANNE10CURSCRIPT], a + ld [wSSAnne10CurScript], a ret -SSAnne10ScriptPointers: ; 61d68 (18:5d68) +SSAnne10ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SSAnne10TextPointers: ; 61d6e (18:5d6e) +SSAnne10TextPointers: dw SSAnne10Text1 dw SSAnne10Text2 dw SSAnne10Text3 @@ -21,182 +21,181 @@ SSAnne10TextPointers: ; 61d6e (18:5d6e) dw SSAnne10Text6 dw SSAnne10Text7 dw SSAnne10Text8 - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText -SSAnne10TrainerHeaders: ; 61d84 (18:5d84) -SSAnne10TrainerHeader0: ; 61d84 (18:5d84) - db $1 ; flag's bit +SSAnne10TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_0 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 - -SSAnne10TrainerHeader1: ; 61d90 (18:5d90) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_0 + dw SSAnne10BattleText1 ; TextBeforeBattle + dw SSAnne10AfterBattleText1 ; TextAfterBattle + dw SSAnne10EndBattleText1 ; TextEndBattle + dw SSAnne10EndBattleText1 ; TextEndBattle + +SSAnne10TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_1 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 - -SSAnne10TrainerHeader2: ; 61d9c (18:5d9c) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_1 + dw SSAnne10BattleText2 ; TextBeforeBattle + dw SSAnne10AfterBattleText2 ; TextAfterBattle + dw SSAnne10EndBattleText2 ; TextEndBattle + dw SSAnne10EndBattleText2 ; TextEndBattle + +SSAnne10TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_2 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 - -SSAnne10TrainerHeader3: ; 61da8 (18:5da8) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_2 + dw SSAnne10BattleText3 ; TextBeforeBattle + dw SSAnne10AfterBattleText3 ; TextAfterBattle + dw SSAnne10EndBattleText3 ; TextEndBattle + dw SSAnne10EndBattleText3 ; TextEndBattle + +SSAnne10TrainerHeader3: + dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_3 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 - -SSAnne10TrainerHeader4: ; 61db4 (18:5db4) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_3 + dw SSAnne10BattleText4 ; TextBeforeBattle + dw SSAnne10AfterBattleText4 ; TextAfterBattle + dw SSAnne10EndBattleText4 ; TextEndBattle + dw SSAnne10EndBattleText4 ; TextEndBattle + +SSAnne10TrainerHeader4: + dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_4 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 - -SSAnne10TrainerHeader5: ; 61dc0 (18:5dc0) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_4 + dw SSAnne10BattleText5 ; TextBeforeBattle + dw SSAnne10AfterBattleText5 ; TextAfterBattle + dw SSAnne10EndBattleText5 ; TextEndBattle + dw SSAnne10EndBattleText5 ; TextEndBattle + +SSAnne10TrainerHeader5: + dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_5 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 + dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_5 + dw SSAnne10BattleText6 ; TextBeforeBattle + dw SSAnne10AfterBattleText6 ; TextAfterBattle + dw SSAnne10EndBattleText6 ; TextEndBattle + dw SSAnne10EndBattleText6 ; TextEndBattle db $ff -SSAnne10Text1: ; 61dcd (18:5dcd) - db $08 ; asm +SSAnne10Text1: + TX_ASM ld hl, SSAnne10TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SSAnne10Text2: ; 61dd7 (18:5dd7) - db $08 ; asm +SSAnne10Text2: + TX_ASM ld hl, SSAnne10TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SSAnne10Text3: ; 61de1 (18:5de1) - db $08 ; asm +SSAnne10Text3: + TX_ASM ld hl, SSAnne10TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SSAnne10Text4: ; 61deb (18:5deb) - db $08 ; asm +SSAnne10Text4: + TX_ASM ld hl, SSAnne10TrainerHeader3 call TalkToTrainer jp TextScriptEnd -SSAnne10Text5: ; 61df5 (18:5df5) - db $08 ; asm +SSAnne10Text5: + TX_ASM ld hl, SSAnne10TrainerHeader4 call TalkToTrainer jp TextScriptEnd -SSAnne10Text6: ; 61dff (18:5dff) - db $08 ; asm +SSAnne10Text6: + TX_ASM ld hl, SSAnne10TrainerHeader5 call TalkToTrainer jp TextScriptEnd -SSAnne10Text8: ; 61e09 (18:5e09) +SSAnne10Text8: TX_FAR _SSAnne10Text8 - db $8 ; 0x61e0d + TX_ASM ld a, MACHOKE call PlayCry jp TextScriptEnd -SSAnne10BattleText1: ; 61e16 (18:5e16) +SSAnne10BattleText1: TX_FAR _SSAnne10BattleText1 db "@" -SSAnne10EndBattleText1: ; 61e1b (18:5e1b) +SSAnne10EndBattleText1: TX_FAR _SSAnne10EndBattleText1 db "@" -SSAnne10AfterBattleText1: ; 61e20 (18:5e20) +SSAnne10AfterBattleText1: TX_FAR _SSAnne10AfterBattleText1 db "@" -SSAnne10BattleText2: ; 61e25 (18:5e25) +SSAnne10BattleText2: TX_FAR _SSAnne10BattleText2 db "@" -SSAnne10EndBattleText2: ; 61e2a (18:5e2a) +SSAnne10EndBattleText2: TX_FAR _SSAnne10EndBattleText2 db "@" -SSAnne10AfterBattleText2: ; 61e2f (18:5e2f) +SSAnne10AfterBattleText2: TX_FAR _SSAnne10AfterBattleText2 db "@" -SSAnne10BattleText3: ; 61e34 (18:5e34) +SSAnne10BattleText3: TX_FAR _SSAnne10BattleText3 db "@" -SSAnne10EndBattleText3: ; 61e39 (18:5e39) +SSAnne10EndBattleText3: TX_FAR _SSAnne10EndBattleText3 db "@" -SSAnne10AfterBattleText3: ; 61e3e (18:5e3e) +SSAnne10AfterBattleText3: TX_FAR _SSAnne10AfterBattleText3 db "@" -SSAnne10BattleText4: ; 61e43 (18:5e43) +SSAnne10BattleText4: TX_FAR _SSAnne10BattleText4 db "@" -SSAnne10EndBattleText4: ; 61e48 (18:5e48) +SSAnne10EndBattleText4: TX_FAR _SSAnne10EndBattleText4 db "@" -SSAnne10AfterBattleText4: ; 61e4d (18:5e4d) +SSAnne10AfterBattleText4: TX_FAR _SSAnne10AfterBattleText4 db "@" -SSAnne10BattleText5: ; 61e52 (18:5e52) +SSAnne10BattleText5: TX_FAR _SSAnne10BattleText5 db "@" -SSAnne10EndBattleText5: ; 61e57 (18:5e57) +SSAnne10EndBattleText5: TX_FAR _SSAnne10EndBattleText5 db "@" -SSAnne10AfterBattleText5: ; 61e5c (18:5e5c) +SSAnne10AfterBattleText5: TX_FAR _SSAnne10AfterBattleText5 db "@" -SSAnne10BattleText6: ; 61e61 (18:5e61) +SSAnne10BattleText6: TX_FAR _SSAnne10BattleText6 db "@" -SSAnne10EndBattleText6: ; 61e66 (18:5e66) +SSAnne10EndBattleText6: TX_FAR _SSAnne10EndBattleText6 db "@" -SSAnne10AfterBattleText6: ; 61e6b (18:5e6b) +SSAnne10AfterBattleText6: TX_FAR _SSAnne10AfterBattleText6 db "@" -SSAnne10Text7: ; 61e70 (18:5e70) +SSAnne10Text7: TX_FAR _SSAnne10Text7 db "@" diff --git a/scripts/ssanne2.asm b/scripts/ssanne2.asm index 474aaa60..654b881a 100755 --- a/scripts/ssanne2.asm +++ b/scripts/ssanne2.asm @@ -1,43 +1,43 @@ -SSAnne2Script: ; 6139f (18:539f) +SSAnne2Script: call EnableAutoTextBoxDrawing ld hl, SSAnne2ScriptPointers - ld a, [W_SSANNE2CURSCRIPT] + ld a, [wSSAnne2CurScript] jp CallFunctionInTable -SSAnne2Script_613ab: ; 613ab (18:53ab) +SSAnne2Script_613ab: xor a ld [wJoyIgnore], a - ld [W_SSANNE2CURSCRIPT], a + ld [wSSAnne2CurScript], a ret -SSAnne2ScriptPointers: ; 613b3 (18:53b3) +SSAnne2ScriptPointers: dw SSAnne2Script0 dw SSAnne2Script1 dw SSAnne2Script2 dw SSAnne2Script3 dw SSAnne2Script4 -SSAnne2Script4: ; 613bd (18:53bd) +SSAnne2Script4: ret -SSAnne2Script0: ; 613be (18:53be) - ld hl, CoordsData_61411 ; $5411 +SSAnne2Script0: + ld hl, CoordsData_61411 call ArePlayerCoordsInArray ret nc ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic - ld a, [wWhichTrade] + ld a, [wCoordIndex] ld [$ffdb], a ld a, HS_SS_ANNE_2_RIVAL - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject call Delay3 ld a, $2 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF xor a ld [hJoyHeld], a @@ -45,43 +45,48 @@ 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 call MoveSprite ld a, $1 - ld [W_SSANNE2CURSCRIPT], a + ld [wSSAnne2CurScript], a ret -MovementData_6140c: ; 6140c (18:540c) - db $00 +MovementData_6140c: + db NPC_MOVEMENT_DOWN -MovementData_6140d: ; 6140d (18:540d) - db $00,$00,$00,$FF +MovementData_6140d: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF -CoordsData_61411: ; 61411 (18:5411) - db $08,$24,$08,$25,$FF +CoordsData_61411: + db $08,$24 + db $08,$25 + db $FF -SSAnne2Script_61416: ; 61416 (18:5416) - ld a, [W_XCOORD] ; wd362 +SSAnne2Script_61416: + ld a, [wXCoord] cp $25 jr nz, .asm_61426 - ld a, $2 - ld [wd528], a - ld a, $c + ld a, PLAYER_DIR_LEFT + ld [wPlayerMovingDirection], a + ld a, SPRITE_FACING_RIGHT jr .asm_61427 .asm_61426 - xor a + xor a ; SPRITE_FACING_DOWN .asm_61427 - ld [$ff8d], a + ld [hSpriteFacingDirection], a ld a, $2 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [H_SPRITEINDEX], a jp SetSpriteFacingDirectionAndDelay -SSAnne2Script1: ; 61430 (18:5430) +SSAnne2Script1: ld a, [wd730] bit 0, a ret nz @@ -89,96 +94,101 @@ SSAnne2Script1: ; 61430 (18:5430) xor a ld [wJoyIgnore], a ld a, $2 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 - ld a, SONY2 + $c8 - ld [W_CUROPPONENT], a + ld a, OPP_SONY2 + ld [wCurOpponent], a ; select which team to use during the encounter - ld a, [W_RIVALSTARTER] + ld a, [wRivalStarter] 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 ld a, $3 .done - ld [W_TRAINERNO], a + ld [wTrainerNo], a call SSAnne2Script_61416 ld a, $2 - ld [W_SSANNE2CURSCRIPT], a + ld [wSSAnne2CurScript], a ret -SSAnne2Script2: ; 6146d (18:546d) - ld a, [W_ISINBATTLE] +SSAnne2Script2: + ld a, [wIsInBattle] cp $ff jp z, SSAnne2Script_613ab call SSAnne2Script_61416 ld a, $f0 ld [wJoyIgnore], a ld a, $3 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $2 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call SetSpriteMovementBytesToFF - ld a, [W_XCOORD] + ld a, [wXCoord] 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 ld a, $2 - ld [$ff8c], a + ld [H_SPRITEINDEX], a call MoveSprite ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateStart ld a, $3 - ld [W_SSANNE2CURSCRIPT], a + ld [wSSAnne2CurScript], a ret -MovementData_614b7: ; 614b7 (18:54b7) - db $C0,$00 +MovementData_614b7: + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN -MovementData_614b9: ; 614b9 (18:54b9) - db $00,$00,$00,$00,$FF +MovementData_614b9: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF -SSAnne2Script3: ; 614be (18:54be) +SSAnne2Script3: ld a, [wd730] bit 0, a ret nz xor a ld [wJoyIgnore], a ld a, HS_SS_ANNE_2_RIVAL - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject call PlayDefaultMusic ld a, $4 - ld [W_SSANNE2CURSCRIPT], a + ld [wSSAnne2CurScript], a ret -SSAnne2TextPointers: ; 614db (18:54db) +SSAnne2TextPointers: dw SSAnne2Text1 dw SSAnne2Text2 dw SSAnne2Text3 -SSAnne2Text1: ; 614e1 (18:54e1) +SSAnne2Text1: TX_FAR _SSAnne2Text1 db "@" -SSAnne2Text2: ; 614e6 (18:54e6) - db $8 +SSAnne2Text2: + TX_ASM ld hl, SSAnneRivalBeforeBattleText call PrintText ld hl, wd72d @@ -189,18 +199,18 @@ SSAnne2Text2: ; 614e6 (18:54e6) call SaveEndBattleTextPointers jp TextScriptEnd -SSAnneRivalBeforeBattleText: ; 61500 (18:5500) +SSAnneRivalBeforeBattleText: TX_FAR _SSAnneRivalBeforeBattleText db "@" -SSAnneRivalDefeatedText: ; 61505 (18:5505) +SSAnneRivalDefeatedText: TX_FAR _SSAnneRivalDefeatedText db "@" -SSAnneRivalWonText: ; 6150a (18:550a) +SSAnneRivalWonText: TX_FAR _SSAnneRivalWonText db "@" -SSAnne2Text3: ; 6150f (18:550f) +SSAnne2Text3: TX_FAR _SSAnneRivalCaptainText db "@" diff --git a/scripts/ssanne3.asm b/scripts/ssanne3.asm index 56cbdd9c..e681591a 100755 --- a/scripts/ssanne3.asm +++ b/scripts/ssanne3.asm @@ -1,9 +1,9 @@ -SSAnne3Script: ; 44932 (11:4932) +SSAnne3Script: jp EnableAutoTextBoxDrawing -SSAnne3TextPointers: ; 44935 (11:4935) +SSAnne3TextPointers: dw SSAnne3Text1 -SSAnne3Text1: ; 44937 (11:4937) +SSAnne3Text1: TX_FAR _SSAnne3Text1 db "@" diff --git a/scripts/ssanne4.asm b/scripts/ssanne4.asm index 6cc0e7b9..c9411717 100755 --- a/scripts/ssanne4.asm +++ b/scripts/ssanne4.asm @@ -1,5 +1,5 @@ -SSAnne4Script: ; 6162e (18:562e) +SSAnne4Script: jp EnableAutoTextBoxDrawing -SSAnne4TextPointers: ; 61631 (18:5631) +SSAnne4TextPointers: db "@" diff --git a/scripts/ssanne5.asm b/scripts/ssanne5.asm index 96b94c52..0cfef9f4 100755 --- a/scripts/ssanne5.asm +++ b/scripts/ssanne5.asm @@ -1,89 +1,88 @@ -SSAnne5Script: ; 616ae (18:56ae) +SSAnne5Script: call EnableAutoTextBoxDrawing - ld hl, SSAnne5TrainerHeader0 ; $56d1 + ld hl, SSAnne5TrainerHeader0 ld de, SSAnne5ScriptPointers - ld a, [W_SSANNE5CURSCRIPT] + ld a, [wSSAnne5CurScript] call ExecuteCurMapScriptInTable - ld [W_SSANNE5CURSCRIPT], a + ld [wSSAnne5CurScript], a ret -SSAnne5ScriptPointers: ; 616c1 (18:56c1) +SSAnne5ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SSAnne5TextPointers: ; 616c7 (18:56c7) +SSAnne5TextPointers: dw SSAnne5Text1 dw SSAnne5Text2 dw SSAnne5Text3 dw SSAnne5Text4 dw SSAnne5Text5 -SSAnne5TrainerHeaders: ; 616d1 (18:56d1) -SSAnne5TrainerHeader0: ; 616d1 (18:56d1) - db $4 ; flag's bit +SSAnne5TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SS_ANNE_5_TRAINER_0 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 - -SSAnne5TrainerHeader1: ; 616dd (18:56dd) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_5_TRAINER_0 + dw SSAnne5BattleText1 ; TextBeforeBattle + dw SSAnne5AfterBattleText1 ; TextAfterBattle + dw SSAnne5EndBattleText1 ; TextEndBattle + dw SSAnne5EndBattleText1 ; TextEndBattle + +SSAnne5TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SS_ANNE_5_TRAINER_1 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 + dwEventFlagAddress EVENT_BEAT_SS_ANNE_5_TRAINER_1 + dw SSAnne5BattleText2 ; TextBeforeBattle + dw SSAnne5AfterBattleText2 ; TextAfterBattle + dw SSAnne5EndBattleText2 ; TextEndBattle + dw SSAnne5EndBattleText2 ; TextEndBattle db $ff -SSAnne5Text1: ; 616ea (18:56ea) +SSAnne5Text1: TX_FAR _SSAnne5Text1 db "@" -SSAnne5Text2: ; 616ef (18:56ef) +SSAnne5Text2: TX_FAR _SSAnne5Text2 db "@" -SSAnne5Text3: ; 616f4 (18:56f4) +SSAnne5Text3: TX_FAR _SSAnne5Text3 db "@" -SSAnne5Text4: ; 616f9 (18:56f9) - db $08 ; asm +SSAnne5Text4: + TX_ASM ld hl, SSAnne5TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SSAnne5BattleText1: ; 61703 (18:5703) +SSAnne5BattleText1: TX_FAR _SSAnne5BattleText1 db "@" -SSAnne5EndBattleText1: ; 61708 (18:5708) +SSAnne5EndBattleText1: TX_FAR _SSAnne5EndBattleText1 db "@" -SSAnne5AfterBattleText1: ; 6170d (18:570d) +SSAnne5AfterBattleText1: TX_FAR _SSAnne5AfterBattleText1 db "@" -SSAnne5Text5: ; 61712 (18:5712) - db $08 ; asm +SSAnne5Text5: + TX_ASM ld hl, SSAnne5TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SSAnne5BattleText2: ; 6171c (18:571c) +SSAnne5BattleText2: TX_FAR _SSAnne5BattleText2 db "@" -SSAnne5EndBattleText2: ; 61721 (18:5721) +SSAnne5EndBattleText2: TX_FAR _SSAnne5EndBattleText2 db "@" -SSAnne5AfterBattleText2: ; 61726 (18:5726) +SSAnne5AfterBattleText2: TX_FAR _SSAnne5AfterBattleText2 db "@" diff --git a/scripts/ssanne6.asm b/scripts/ssanne6.asm index d3ec191f..e1998858 100755 --- a/scripts/ssanne6.asm +++ b/scripts/ssanne6.asm @@ -1,8 +1,8 @@ -SSAnne6Script: ; 617b3 (18:57b3) +SSAnne6Script: call EnableAutoTextBoxDrawing ret -SSAnne6TextPointers: ; 617b7 (18:57b7) +SSAnne6TextPointers: dw SSAnne6Text1 dw SSAnne6Text2 dw SSAnne6Text3 @@ -11,62 +11,62 @@ SSAnne6TextPointers: ; 617b7 (18:57b7) dw SSAnne6Text6 dw SSAnne6Text7 -SSAnne6Text1: ; 617c5 (18:57c5) +SSAnne6Text1: TX_FAR _SSAnne6Text1 db "@" -SSAnne6Text2: ; 617ca (18:57ca) +SSAnne6Text2: TX_FAR _SSAnne6Text2 db "@" -SSAnne6Text3: ; 617cf (18:57cf) +SSAnne6Text3: TX_FAR _SSAnne6Text3 db "@" -SSAnne6Text4: ; 617d4 (18:57d4) +SSAnne6Text4: TX_FAR _SSAnne6Text4 db "@" -SSAnne6Text5: ; 617d9 (18:57d9) +SSAnne6Text5: TX_FAR _SSAnne6Text5 db "@" -SSAnne6Text6: ; 617de (18:57de) +SSAnne6Text6: TX_FAR _SSAnne6Text6 db "@" -SSAnne6Text7: ; 617e3 (18:57e3) - db $08 ; asm +SSAnne6Text7: + 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 -SSAnne6Text_61807: ; 61807 (18:5807) +SSAnne6Text_61807: TX_FAR _SSAnne6Text_61807 db "@" -SSAnne6Text_6180c: ; 6180c (18:580c) +SSAnne6Text_6180c: TX_FAR _SSAnne6Text_6180c db "@" -SSAnne6Text_61811: ; 61811 (18:5811) +SSAnne6Text_61811: TX_FAR _SSAnne6Text_61811 db "@" -SSAnne6Text_61816: ; 61816 (18:5816) +SSAnne6Text_61816: TX_FAR _SSAnne6Text_61816 db "@" diff --git a/scripts/ssanne7.asm b/scripts/ssanne7.asm index 1ca97ce2..0df842c2 100755 --- a/scripts/ssanne7.asm +++ b/scripts/ssanne7.asm @@ -1,96 +1,93 @@ -SSAnne7Script: ; 61895 (18:5895) +SSAnne7Script: call SSAnne7Script_6189b jp EnableAutoTextBoxDrawing -SSAnne7Script_6189b: ; 6189b (18:589b) - ld a, [wd803] - bit 1, a +SSAnne7Script_6189b: + CheckEvent EVENT_RUBBED_CAPTAINS_BACK ret nz ld hl, wd72d set 5, [hl] ret -SSAnne7TextPointers: ; 618a7 (18:58a7) +SSAnne7TextPointers: dw SSAnne7Text1 dw SSAnne7Text2 dw SSAnne7Text3 -SSAnne7Text1: ; 618ad (18:58ad) - db $08 ; asm - ld a, [wd803] - bit 0, a - jr nz, .asm_797c4 ; 0x618b3 +SSAnne7Text1: + TX_ASM + CheckEvent EVENT_GOT_HM01 + jr nz, .asm_797c4 ld hl, SSAnne7RubText call PrintText ld hl, ReceivingHM01Text call PrintText - ld bc, (HM_01 << 8) | 1 + lb bc, HM_01, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedHM01Text call PrintText - ld hl, wd803 - set 0, [hl] - jr .asm_0faf5 ; 0x618d4 + SetEvent EVENT_GOT_HM01 + 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) +SSAnne7RubText: TX_FAR _SSAnne7RubText - db $8 - ld a, [wc0ef] - cp $1f - ld [wc0f0], a - jr nz, .asm_61908 ; 0x618f9 $d + TX_ASM + ld a, [wAudioROMBank] + cp BANK(Audio3_UpdateMusic) + ld [wAudioSavedROMBank], a + jr nz, .asm_61908 ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound - ld a, Bank(Func_9876) - ld [wc0ef], a + ld a, Bank(Music_PkmnHealed) + ld [wAudioROMBank], a .asm_61908 ld a, MUSIC_PKMN_HEALED - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound .asm_61910 - ld a, [wc026] + ld a, [wChannelSoundIDs] cp MUSIC_PKMN_HEALED - jr z, .asm_61910 ; 0x61915 $f9 + jr z, .asm_61910 call PlayDefaultMusic - ld hl, wd803 - set 1, [hl] + SetEvent EVENT_RUBBED_CAPTAINS_BACK ld hl, wd72d res 5, [hl] jp TextScriptEnd -ReceivingHM01Text: ; 61927 (18:5927) +ReceivingHM01Text: TX_FAR _ReceivingHM01Text db "@" -ReceivedHM01Text: ; 6192c (18:592c) +ReceivedHM01Text: TX_FAR _ReceivedHM01Text - db $11, "@" + TX_SFX_KEY_ITEM + db "@" -SSAnne7Text_61932: ; 61932 (18:5932) +SSAnne7Text_61932: TX_FAR _SSAnne7Text_61932 db "@" -HM01NoRoomText: ; 61937 (18:5937) +HM01NoRoomText: TX_FAR _HM01NoRoomText db "@" -SSAnne7Text2: ; 6193c (18:593c) +SSAnne7Text2: TX_FAR _SSAnne7Text2 db "@" -SSAnne7Text3: ; 61941 (18:5941) +SSAnne7Text3: TX_FAR _SSAnne7Text3 db "@" diff --git a/scripts/ssanne8.asm b/scripts/ssanne8.asm index ff7fc57b..c684f84b 100755 --- a/scripts/ssanne8.asm +++ b/scripts/ssanne8.asm @@ -1,18 +1,18 @@ -SSAnne8Script: ; 61976 (18:5976) +SSAnne8Script: call EnableAutoTextBoxDrawing - ld hl, SSAnne8TrainerHeaders + ld hl, SSAnne8TrainerHeader0 ld de, SSAnne8ScriptPointers - ld a, [W_SSANNE8CURSCRIPT] + ld a, [wSSAnne8CurScript] call ExecuteCurMapScriptInTable - ld [W_SSANNE8CURSCRIPT], a + ld [wSSAnne8CurScript], a ret -SSAnne8ScriptPointers: ; 61989 (18:5989) +SSAnne8ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SSAnne8TextPointers: ; 6198f (18:598f) +SSAnne8TextPointers: dw SSAnne8Text1 dw SSAnne8Text2 dw SSAnne8Text3 @@ -22,143 +22,142 @@ SSAnne8TextPointers: ; 6198f (18:598f) dw SSAnne8Text7 dw SSAnne8Text8 dw SSAnne8Text9 - dw Predef5CText + dw PickUpItemText dw SSAnne8Text11 -SSAnne8TrainerHeaders: ; 619a5 (18:59a5) -SSAnne8TrainerHeader0: ; 619a5 (18:59a5) - db $1 ; flag's bit +SSAnne8TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_0 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 - -SSAnne8TrainerHeader1: ; 619b1 (18:59b1) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_0 + dw SSAnne8BattleText1 ; TextBeforeBattle + dw SSAnne8AfterBattleText1 ; TextAfterBattle + dw SSAnne8EndBattleText1 ; TextEndBattle + dw SSAnne8EndBattleText1 ; TextEndBattle + +SSAnne8TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_1 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 - -SSAnne8TrainerHeader2: ; 619bd (18:59bd) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_1 + dw SSAnne8BattleText2 ; TextBeforeBattle + dw SSAnne8AfterBattleText2 ; TextAfterBattle + dw SSAnne8EndBattleText2 ; TextEndBattle + dw SSAnne8EndBattleText2 ; TextEndBattle + +SSAnne8TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_2 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 - -SSAnne8TrainerHeader3: ; 619c9 (18:59c9) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_2 + dw SSAnne8BattleText3 ; TextBeforeBattle + dw SSAnne8AfterBattleText3 ; TextAfterBattle + dw SSAnne8EndBattleText3 ; TextEndBattle + dw SSAnne8EndBattleText3 ; TextEndBattle + +SSAnne8TrainerHeader3: + dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_3 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 + dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_3 + dw SSAnne8BattleText4 ; TextBeforeBattle + dw SSAnne8AfterBattleText4 ; TextAfterBattle + dw SSAnne8EndBattleText4 ; TextEndBattle + dw SSAnne8EndBattleText4 ; TextEndBattle db $ff -SSAnne8Text1: ; 619d6 (18:59d6) - db $08 ; asm +SSAnne8Text1: + TX_ASM ld hl, SSAnne8TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SSAnne8Text2: ; 619e0 (18:59e0) - db $08 ; asm +SSAnne8Text2: + TX_ASM ld hl, SSAnne8TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SSAnne8Text3: ; 619ea (18:59ea) - db $08 ; asm +SSAnne8Text3: + TX_ASM ld hl, SSAnne8TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SSAnne8Text4: ; 619f4 (18:59f4) - db $08 ; asm +SSAnne8Text4: + TX_ASM ld hl, SSAnne8TrainerHeader3 call TalkToTrainer jp TextScriptEnd -SSAnne8Text8: ; 619fe (18:59fe) +SSAnne8Text8: TX_FAR _SSAnne8Text8 - db $08 ; asm + TX_ASM ld a, WIGGLYTUFF call PlayCry jp TextScriptEnd -SSAnne8BattleText1: ; 61a0b (18:5a0b) +SSAnne8BattleText1: TX_FAR _SSAnne8BattleText1 db "@" -SSAnne8EndBattleText1: ; 61a10 (18:5a10) +SSAnne8EndBattleText1: TX_FAR _SSAnne8EndBattleText1 db "@" -SSAnne8AfterBattleText1: ; 61a15 (18:5a15) +SSAnne8AfterBattleText1: TX_FAR _SSAnne8AfterBattleText1 db "@" -SSAnne8BattleText2: ; 61a1a (18:5a1a) +SSAnne8BattleText2: TX_FAR _SSAnne8BattleText2 db "@" -SSAnne8EndBattleText2: ; 61a1f (18:5a1f) +SSAnne8EndBattleText2: TX_FAR _SSAnne8EndBattleText2 db "@" -SSAnne8AfterBattleText2: ; 61a24 (18:5a24) +SSAnne8AfterBattleText2: TX_FAR _SSAnne8AfterBattleText2 db "@" -SSAnne8BattleText3: ; 61a29 (18:5a29) +SSAnne8BattleText3: TX_FAR _SSAnne8BattleText3 db "@" -SSAnne8EndBattleText3: ; 61a2e (18:5a2e) +SSAnne8EndBattleText3: TX_FAR _SSAnne8EndBattleText3 db "@" -SSAnne8AfterBattleText3: ; 61a33 (18:5a33) +SSAnne8AfterBattleText3: TX_FAR _SSAnne8AfterBattleText3 db "@" -SSAnne8BattleText4: ; 61a38 (18:5a38) +SSAnne8BattleText4: TX_FAR _SSAnne8BattleText4 db "@" -SSAnne8EndBattleText4: ; 61a3d (18:5a3d) +SSAnne8EndBattleText4: TX_FAR _SSAnne8EndBattleText4 db "@" -SSAnne8AfterBattleText4: ; 61a42 (18:5a42) +SSAnne8AfterBattleText4: TX_FAR _SSAnne8AfterBattleText4 db "@" -SSAnne8Text5: ; 61a47 (18:5a47) +SSAnne8Text5: TX_FAR _SSAnne8Text5 db "@" -SSAnne8Text6: ; 61a4c (18:5a4c) +SSAnne8Text6: TX_FAR _SSAnne8Text6 db "@" -SSAnne8Text7: ; 61a51 (18:5a51) +SSAnne8Text7: TX_FAR _SSAnne8Text7 db "@" -SSAnne8Text9: ; 61a56 (18:5a56) +SSAnne8Text9: TX_FAR _SSAnne8Text9 db "@" -SSAnne8Text11: ; 61a5b (18:5a5b) +SSAnne8Text11: TX_FAR _SSAnne8Text11 db "@" diff --git a/scripts/ssanne9.asm b/scripts/ssanne9.asm index db34fcf2..1f965e0d 100755 --- a/scripts/ssanne9.asm +++ b/scripts/ssanne9.asm @@ -1,100 +1,99 @@ -SSAnne9Script: ; 61b4b (18:5b4b) +SSAnne9Script: ld a, $1 ld [wAutoTextBoxDrawingControl], a xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, SSAnne9TrainerHeaders + ld hl, SSAnne9TrainerHeader0 ld de, SSAnne9ScriptPointers - ld a, [W_SSANNE9CURSCRIPT] + ld a, [wSSAnne9CurScript] call ExecuteCurMapScriptInTable - ld [W_SSANNE9CURSCRIPT], a + ld [wSSAnne9CurScript], a ret -SSAnne9ScriptPointers: ; 61b64 (18:5b64) +SSAnne9ScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -SSAnne9TextPointers: ; 61b6a (18:5b6a) +SSAnne9TextPointers: dw SSAnne9Text1 dw SSAnne9Text2 dw SSAnne9Text3 dw SSAnne9Text4 dw SSAnne9Text5 - dw Predef5CText + dw PickUpItemText dw SSAnne9Text7 dw SSAnne9Text8 - dw Predef5CText + dw PickUpItemText dw SSAnne9Text10 dw SSAnne9Text11 dw SSAnne9Text12 dw SSAnne9Text13 -SSAnne9TrainerHeaders: ; 61b84 (18:5b84) -SSAnne9TrainerHeader0: ; 61b84 (18:5b84) - db $1 ; flag's bit +SSAnne9TrainerHeader0: + dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_0 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 - -SSAnne9TrainerHeader1: ; 61b90 (18:5b90) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_0 + dw SSAnne9BattleText1 ; TextBeforeBattle + dw SSAnne9AfterBattleText1 ; TextAfterBattle + dw SSAnne9EndBattleText1 ; TextEndBattle + dw SSAnne9EndBattleText1 ; TextEndBattle + +SSAnne9TrainerHeader1: + dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_1 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 - -SSAnne9TrainerHeader2: ; 61b9c (18:5b9c) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_1 + dw SSAnne9BattleText2 ; TextBeforeBattle + dw SSAnne9AfterBattleText2 ; TextAfterBattle + dw SSAnne9EndBattleText2 ; TextEndBattle + dw SSAnne9EndBattleText2 ; TextEndBattle + +SSAnne9TrainerHeader2: + dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_2 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 - -SSAnne9TrainerHeader3: ; 61ba8 (18:5ba8) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_2 + dw SSAnne9BattleText3 ; TextBeforeBattle + dw SSAnne9AfterBattleText3 ; TextAfterBattle + dw SSAnne9EndBattleText3 ; TextEndBattle + dw SSAnne9EndBattleText3 ; TextEndBattle + +SSAnne9TrainerHeader3: + dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_3 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 + dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_3 + dw SSAnne9BattleText4 ; TextBeforeBattle + dw SSAnne9AfterBattleText4 ; TextAfterBattle + dw SSAnne9EndBattleText4 ; TextEndBattle + dw SSAnne9EndBattleText4 ; TextEndBattle db $ff -SSAnne9Text1: ; 61bb5 (18:5bb5) - db $08 ; asm +SSAnne9Text1: + TX_ASM ld hl, SSAnne9TrainerHeader0 call TalkToTrainer jp TextScriptEnd -SSAnne9Text2: ; 61bbf (18:5bbf) - db $08 ; asm +SSAnne9Text2: + TX_ASM ld hl, SSAnne9TrainerHeader1 call TalkToTrainer jp TextScriptEnd -SSAnne9Text3: ; 61bc9 (18:5bc9) - db $08 ; asm +SSAnne9Text3: + TX_ASM ld hl, SSAnne9TrainerHeader2 call TalkToTrainer jp TextScriptEnd -SSAnne9Text4: ; 61bd3 (18:5bd3) - db $08 ; asm +SSAnne9Text4: + TX_ASM ld hl, SSAnne9TrainerHeader3 call TalkToTrainer jp TextScriptEnd -SSAnne9Text5: ; 61bdd (18:5bdd) - db $08 ; asm +SSAnne9Text5: + TX_ASM call SaveScreenTilesToBuffer1 ld hl, SSAnne9Text_61bf2 call PrintText @@ -103,114 +102,114 @@ SSAnne9Text5: ; 61bdd (18:5bdd) call DisplayPokedex jp TextScriptEnd -SSAnne9Text_61bf2: ; 61bf2 (18:5bf2) +SSAnne9Text_61bf2: TX_FAR _SSAnne9Text_61bf2 db "@" -SSAnne9Text7: ; 61bf7 (18:5bf7) - db $08 ; asm +SSAnne9Text7: + TX_ASM ld hl, SSAnne9Text_61c01 call PrintText jp TextScriptEnd -SSAnne9Text_61c01: ; 61c01 (18:5c01) +SSAnne9Text_61c01: TX_FAR _SSAnne9Text_61c01 db "@" -SSAnne9Text8: ; 61c06 (18:5c06) - db $08 ; asm +SSAnne9Text8: + TX_ASM ld hl, SSAnne9Text_61c10 call PrintText jp TextScriptEnd -SSAnne9Text_61c10: ; 61c10 (18:5c10) +SSAnne9Text_61c10: TX_FAR _SSAnne9Text_61c10 db "@" -SSAnne9Text10: ; 61c15 (18:5c15) - db $08 ; asm +SSAnne9Text10: + TX_ASM ld hl, SSAnne9Text_61c1f call PrintText jp TextScriptEnd -SSAnne9Text_61c1f: ; 61c1f (18:5c1f) +SSAnne9Text_61c1f: TX_FAR _SSAnne9Text_61c1f db "@" -SSAnne9Text11: ; 61c24 (18:5c24) - db $08 ; asm +SSAnne9Text11: + TX_ASM ld hl, SSAnne9Text_61c2e call PrintText jp TextScriptEnd -SSAnne9Text_61c2e: ; 61c2e (18:5c2e) +SSAnne9Text_61c2e: TX_FAR _SSAnne9Text_61c2e db "@" -SSAnne9Text12: ; 61c33 (18:5c33) - db $08 ; asm +SSAnne9Text12: + TX_ASM ld hl, SSAnne9Text_61c3d call PrintText jp TextScriptEnd -SSAnne9Text_61c3d: ; 61c3d (18:5c3d) +SSAnne9Text_61c3d: TX_FAR _SSAnne9Text_61c3d db "@" -SSAnne9Text13: ; 61c42 (18:5c42) - db $08 ; asm +SSAnne9Text13: + TX_ASM ld hl, SSAnne9Text_61c4c call PrintText jp TextScriptEnd -SSAnne9Text_61c4c: ; 61c4c (18:5c4c) +SSAnne9Text_61c4c: TX_FAR _SSAnne9Text_61c4c db "@" -SSAnne9BattleText1: ; 61c51 (18:5c51) +SSAnne9BattleText1: TX_FAR _SSAnne9BattleText1 db "@" -SSAnne9EndBattleText1: ; 61c56 (18:5c56) +SSAnne9EndBattleText1: TX_FAR _SSAnne9EndBattleText1 db "@" -SSAnne9AfterBattleText1: ; 61c5b (18:5c5b) +SSAnne9AfterBattleText1: TX_FAR _SSAnne9AfterBattleText1 db "@" -SSAnne9BattleText2: ; 61c60 (18:5c60) +SSAnne9BattleText2: TX_FAR _SSAnne9BattleText2 db "@" -SSAnne9EndBattleText2: ; 61c65 (18:5c65) +SSAnne9EndBattleText2: TX_FAR _SSAnne9EndBattleText2 db "@" -SSAnne9AfterBattleText2: ; 61c6a (18:5c6a) +SSAnne9AfterBattleText2: TX_FAR _SSAnne9AfterBattleText2 db "@" -SSAnne9BattleText3: ; 61c6f (18:5c6f) +SSAnne9BattleText3: TX_FAR _SSAnne9BattleText3 db "@" -SSAnne9EndBattleText3: ; 61c74 (18:5c74) +SSAnne9EndBattleText3: TX_FAR _SSAnne9EndBattleText3 db "@" -SSAnne9AfterBattleText3: ; 61c79 (18:5c79) +SSAnne9AfterBattleText3: TX_FAR _SSAnne9AfterBattleText3 db "@" -SSAnne9BattleText4: ; 61c7e (18:5c7e) +SSAnne9BattleText4: TX_FAR _SSAnne9BattleText4 db "@" -SSAnne9EndBattleText4: ; 61c83 (18:5c83) +SSAnne9EndBattleText4: TX_FAR _SSAnne9EndBattleText4 db "@" -SSAnne9AfterBattleText4: ; 61c88 (18:5c88) +SSAnne9AfterBattleText4: TX_FAR _SSAnne9AfterBattleText4 db "@" diff --git a/scripts/tradecenter.asm b/scripts/tradecenter.asm new file mode 100755 index 00000000..80efe4f9 --- /dev/null +++ b/scripts/tradecenter.asm @@ -0,0 +1,38 @@ +TradeCenterScript: + call EnableAutoTextBoxDrawing + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + ld a, SPRITE_FACING_LEFT + jr z, .next + ld a, SPRITE_FACING_RIGHT +.next + ld [hSpriteFacingDirection], a + ld a, $1 + ld [H_SPRITEINDEX], a + call SetSpriteFacingDirection + ld hl, wd72d + bit 0, [hl] + set 0, [hl] + ret nz + ld hl, wSpriteStateData2 + $14 + ld a, $8 + ld [hli], a + ld a, $a + ld [hl], a + ld a, SPRITE_FACING_LEFT + ld [wSpriteStateData1 + $19], a + ld a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + ret z + ld a, $7 + ld [wSpriteStateData2 + $15], a + ld a, SPRITE_FACING_RIGHT + ld [wSpriteStateData1 + $19], a + ret + +TradeCenterTextPointers: + dw TradeCenterText1 + +TradeCenterText1: + TX_FAR _TradeCenterText1 + db "@" diff --git a/scripts/tradecenterm.asm b/scripts/tradecenterm.asm deleted file mode 100755 index 662a1df7..00000000 --- a/scripts/tradecenterm.asm +++ /dev/null @@ -1,9 +0,0 @@ -TradeCenterMScript: ; 4fd7d (13:7d7d) - jp BattleCenterMScript - -TradeCenterMTextPointers: ; 4fd80 (13:7d80) - dw TradeCenterMText1 - -TradeCenterMText1: ; 4fd82 (13:7d82) - TX_FAR _TradeCenterMText1 - db "@" diff --git a/scripts/undergroundpathentranceroute5.asm b/scripts/undergroundpathentranceroute5.asm index 03f1c35d..18707c4a 100755 --- a/scripts/undergroundpathentranceroute5.asm +++ b/scripts/undergroundpathentranceroute5.asm @@ -1,16 +1,16 @@ -UndergroundPathEntranceRoute5Script: ; 5d6a9 (17:56a9) +UndergroundPathEntranceRoute5Script: ld a, ROUTE_5 ld [wLastMap], a ret -UndergroundPathEntranceRoute5_5d6af: ; 5d6af (17:56af) +UndergroundPathEntranceRoute5_5d6af: db "@" -UndergroundPathEntranceRoute5TextPointers: ; 5d6b0 (17:56b0) +UndergroundPathEntranceRoute5TextPointers: dw UndergroundPathEntranceRoute5Text1 -UndergroundPathEntranceRoute5Text1: ; 5d6b2 (17:56b2) - db $08 ; asm +UndergroundPathEntranceRoute5Text1: + TX_ASM ld a, $9 ld [wWhichTrade], a predef DoInGameTradeDialogue diff --git a/scripts/undergroundpathentranceroute6.asm b/scripts/undergroundpathentranceroute6.asm index 6d356fec..c6dfdcc9 100755 --- a/scripts/undergroundpathentranceroute6.asm +++ b/scripts/undergroundpathentranceroute6.asm @@ -1,11 +1,11 @@ -UndergroundPathEntranceRoute6Script: ; 5d6ef (17:56ef) +UndergroundPathEntranceRoute6Script: ld a, ROUTE_6 ld [wLastMap], a jp EnableAutoTextBoxDrawing -UndergroundPathEntranceRoute6TextPointers: ; 5d6f7 (17:56f7) +UndergroundPathEntranceRoute6TextPointers: dw UndergroundPathEntranceRoute6Text1 -UndergroundPathEntranceRoute6Text1: ; 5d6f9 (17:56f9) +UndergroundPathEntranceRoute6Text1: TX_FAR _UndergrdTunnelEntRoute6Text1 db "@" diff --git a/scripts/undergroundpathentranceroute7.asm b/scripts/undergroundpathentranceroute7.asm index c188a823..84c8e4d5 100755 --- a/scripts/undergroundpathentranceroute7.asm +++ b/scripts/undergroundpathentranceroute7.asm @@ -1,11 +1,11 @@ -UndergroundPathEntranceRoute7Script: ; 5d72c (17:572c) +UndergroundPathEntranceRoute7Script: ld a, ROUTE_7 ld [wLastMap], a jp EnableAutoTextBoxDrawing -UndergroundPathEntranceRoute7TextPointers: ; 5d734 (17:5734) +UndergroundPathEntranceRoute7TextPointers: dw UndergroundPathEntranceRoute7Text1 -UndergroundPathEntranceRoute7Text1: ; 5d736 (17:5736) +UndergroundPathEntranceRoute7Text1: TX_FAR _UndergroundPathEntRoute7Text1 db "@" diff --git a/scripts/undergroundpathentranceroute7copy.asm b/scripts/undergroundpathentranceroute7copy.asm index 2462a254..c623eeec 100755 --- a/scripts/undergroundpathentranceroute7copy.asm +++ b/scripts/undergroundpathentranceroute7copy.asm @@ -1,24 +1,24 @@ -UndergroundPathEntranceRoute7CopyScript: ; 5d769 (17:5769) +UndergroundPathEntranceRoute7CopyScript: ld a, ROUTE_7 ld [wLastMap], a ret -UndergroundPathEntranceRoute7CopyTextPointers: ; 5d76f (17:576f) - dw UnnamedText_5d773 - dw UnnamedText_5d77d +UndergroundPathEntranceRoute7CopyTextPointers: + dw UGPathRoute7EntranceUnusedText_5d773 + dw UGPathRoute7EntranceUnusedText_5d77d -UnnamedText_5d773: ; 5d773 (17:5773) - TX_FAR _UnnamedText_5d773 +UGPathRoute7EntranceUnusedText_5d773: + TX_FAR _UGPathRoute7EntranceUnusedText_5d773 db "@" -UnnamedText_5d778: ; 5d778 (17:5778) - TX_FAR _UnnamedText_5d778 +UGPathRoute7EntranceUnusedText_5d778: + TX_FAR _UGPathRoute7EntranceUnusedText_5d778 db "@" -UnnamedText_5d77d: ; 5d77d (17:577d) - TX_FAR _UnnamedText_5d77d +UGPathRoute7EntranceUnusedText_5d77d: + TX_FAR _UGPathRoute7EntranceUnusedText_5d77d db "@" -UnnamedText_5d782: ; 5d782 (17:5782) - TX_FAR _UnnamedText_5d782 +UGPathRoute7EntranceUnusedText_5d782: + TX_FAR _UGPathRoute7EntranceUnusedText_5d782 db "@" diff --git a/scripts/undergroundpathentranceroute8.asm b/scripts/undergroundpathentranceroute8.asm index 873cf902..ad0b60ab 100755 --- a/scripts/undergroundpathentranceroute8.asm +++ b/scripts/undergroundpathentranceroute8.asm @@ -1,11 +1,11 @@ -UndergroundPathEntranceRoute8Script: ; 1e289 (7:6289) +UndergroundPathEntranceRoute8Script: ld a, ROUTE_8 ld [wLastMap], a jp EnableAutoTextBoxDrawing -UndergroundPathEntranceRoute8TextPointers: ; 1e291 (7:6291) +UndergroundPathEntranceRoute8TextPointers: dw UndergroundPathEntranceRoute8Text1 -UndergroundPathEntranceRoute8Text1: ; 1e293 (7:6293) +UndergroundPathEntranceRoute8Text1: TX_FAR _UndergroundPathEntRoute8Text1 db "@" diff --git a/scripts/undergroundpathns.asm b/scripts/undergroundpathns.asm index 96bf82a6..8c744740 100755 --- a/scripts/undergroundpathns.asm +++ b/scripts/undergroundpathns.asm @@ -1,5 +1,5 @@ -UndergroundPathNSScript: ; 61f26 (18:5f26) +UndergroundPathNSScript: jp EnableAutoTextBoxDrawing -UndergroundPathNSTextPointers: ; 61f29 (18:5f29) +UndergroundPathNSTextPointers: db "@" diff --git a/scripts/undergroundpathwe.asm b/scripts/undergroundpathwe.asm index f7e3755e..921d3dab 100755 --- a/scripts/undergroundpathwe.asm +++ b/scripts/undergroundpathwe.asm @@ -1,5 +1,5 @@ -UndergroundPathWEScript: ; 61f4a (18:5f4a) +UndergroundPathWEScript: jp EnableAutoTextBoxDrawing -UndergroundPathWETextPointers: ; 61f4d (18:5f4d) +UndergroundPathWETextPointers: db "@" diff --git a/scripts/unknowndungeon1.asm b/scripts/unknowndungeon1.asm index 008a7bd7..9d7f120e 100755 --- a/scripts/unknowndungeon1.asm +++ b/scripts/unknowndungeon1.asm @@ -1,7 +1,7 @@ -UnknownDungeon1Script: ; 74d0c (1d:4d0c) +UnknownDungeon1Script: jp EnableAutoTextBoxDrawing -UnknownDungeon1TextPointers: ; 74d0f (1d:4d0f) - dw Predef5CText - dw Predef5CText - dw Predef5CText +UnknownDungeon1TextPointers: + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText diff --git a/scripts/unknowndungeon2.asm b/scripts/unknowndungeon2.asm index c8249b27..3ed00a45 100755 --- a/scripts/unknowndungeon2.asm +++ b/scripts/unknowndungeon2.asm @@ -1,7 +1,7 @@ -UnknownDungeon2Script: ; 45e0b (11:5e0b) +UnknownDungeon2Script: jp EnableAutoTextBoxDrawing -UnknownDungeon2TextPointers: ; 45e0e (11:5e0e) - dw Predef5CText - dw Predef5CText - dw Predef5CText +UnknownDungeon2TextPointers: + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText diff --git a/scripts/unknowndungeon3.asm b/scripts/unknowndungeon3.asm index d2078916..78b1ab80 100755 --- a/scripts/unknowndungeon3.asm +++ b/scripts/unknowndungeon3.asm @@ -1,43 +1,42 @@ -UnknownDungeon3Script: ; 45ef0 (11:5ef0) +UnknownDungeon3Script: call EnableAutoTextBoxDrawing - ld hl, UnknownDungeon3TrainerHeaders - ld de, UnknownDungeon3ScriptPointers - ld a, [W_UNKNOWNDUNGEON3CURSCRIPT] + ld hl, MewtwoTrainerHeader + ld de, .ScriptPointers + ld a, [wUnknownDungeon3CurScript] call ExecuteCurMapScriptInTable - ld [W_UNKNOWNDUNGEON3CURSCRIPT], a + ld [wUnknownDungeon3CurScript], a ret -UnknownDungeon3ScriptPointers: ; 45f03 (11:5f03) +.ScriptPointers dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -UnknownDungeon3TextPointers: ; 45f09 (11:5f09) - dw UnknownDungeon3Text1 - dw Predef5CText - dw Predef5CText +UnknownDungeon3TextPointers: + dw MewtwoText + dw PickUpItemText + dw PickUpItemText -UnknownDungeon3TrainerHeaders: ; 45f0f (11:5f0f) -UnknownDungeon3TrainerHeader0: ; 45f0f (11:5f0f) - db $1 ; flag's bit +MewtwoTrainerHeader: + dbEventFlagBit EVENT_BEAT_MEWTWO 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 + dwEventFlagAddress EVENT_BEAT_MEWTWO + dw MewtwoBattleText ; TextBeforeBattle + dw MewtwoBattleText ; TextAfterBattle + dw MewtwoBattleText ; TextEndBattle + dw MewtwoBattleText ; TextEndBattle db $ff -UnknownDungeon3Text1: ; 45f1c (11:5f1c) - db $08 ; asm - ld hl, UnknownDungeon3TrainerHeader0 +MewtwoText: + TX_ASM + ld hl, MewtwoTrainerHeader call TalkToTrainer jp TextScriptEnd -UnknownDungeon3MewtwoText: ; 45f26 (11:5f26) - TX_FAR _UnknownDungeon3MewtwoText - db $8 +MewtwoBattleText: + TX_FAR _MewtwoBattleText + TX_ASM ld a, MEWTWO call PlayCry call WaitForSoundToFinish diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm index 1214b27c..0a734e25 100755 --- a/scripts/vermilioncity.asm +++ b/scripts/vermilioncity.asm @@ -1,6 +1,6 @@ -VermilionCityScript: ; 197a1 (6:57a1) +VermilionCityScript: call EnableAutoTextBoxDrawing - ld hl, wd126 + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] push hl @@ -10,37 +10,36 @@ VermilionCityScript: ; 197a1 (6:57a1) res 5, [hl] call nz, VermilionCityScript_197c0 ld hl, VermilionCityScriptPointers - ld a, [W_VERMILIONCITYCURSCRIPT] + ld a, [wVermilionCityCurScript] jp CallFunctionInTable -VermilionCityScript_197c0: ; 197c0 (6:57c0) +VermilionCityScript_197c0: call Random ld a, [$ffd4] and $e - ld [wd743], a + ld [wFirstLockTrashCanIndex], a ret -VermilionCityScript_197cb: ; 197cb (6:57cb) - ld hl, wd803 - bit 2, [hl] +VermilionCityScript_197cb: + CheckEventHL EVENT_SS_ANNE_LEFT ret z - bit 3, [hl] - set 3, [hl] + CheckEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT + SetEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT ret nz ld a, $2 - ld [W_VERMILIONCITYCURSCRIPT], a + ld [wVermilionCityCurScript], a ret -VermilionCityScriptPointers: ; 197dc (6:57dc) +VermilionCityScriptPointers: dw VermilionCityScript0 dw VermilionCityScript1 dw VermilionCityScript2 dw VermilionCityScript3 dw VermilionCityScript4 -VermilionCityScript0: ; 197e6 (6:57e6) +VermilionCityScript0: ld a, [wSpriteStateData1 + 9] - and a + and a ; cp SPRITE_FACING_DOWN ret nz ld hl, CoordsData_19823 call ArePlayerCoordsInArray @@ -49,52 +48,51 @@ VermilionCityScript0: ; 197e6 (6:57e6) ld [hJoyHeld], a ld [wcf0d], a ld a, $3 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld a, [wd803] - bit 2, a - jr nz, .asm_19810 ; 0x19804 $a - ld b, $3f - predef IsItemInBag_ + CheckEvent EVENT_SS_ANNE_LEFT + jr nz, .asm_19810 + ld b, S_S_TICKET + predef GetQuantityOfItemInBag ld a, b and a ret nz .asm_19810 - ld a, $40 + ld a, D_UP ld [wSimulatedJoypadStatesEnd], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $1 - ld [W_VERMILIONCITYCURSCRIPT], a + ld [wVermilionCityCurScript], a ret -CoordsData_19823: ; 19823 (6:5823) +CoordsData_19823: db $1e,$12 db $ff -VermilionCityScript4: ; 19826 (6:5826) +VermilionCityScript4: ld hl, CoordsData_19823 call ArePlayerCoordsInArray ret c ld a, $0 - ld [W_VERMILIONCITYCURSCRIPT], a + ld [wVermilionCityCurScript], a ret -VermilionCityScript2: ; 19833 (6:5833) +VermilionCityScript2: ld a, $ff ld [wJoyIgnore], a - ld a, $40 + ld a, D_UP ld [wSimulatedJoypadStatesEnd], a - ld [wccd4], a - ld a, $2 + ld [wSimulatedJoypadStatesEnd + 1], a + ld a, 2 ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $3 - ld [W_VERMILIONCITYCURSCRIPT], a + ld [wVermilionCityCurScript], a ret -VermilionCityScript3: ; 1984e (6:584e) +VermilionCityScript3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz @@ -102,20 +100,20 @@ VermilionCityScript3: ; 1984e (6:584e) ld [wJoyIgnore], a ld [hJoyHeld], a ld a, $0 - ld [W_VERMILIONCITYCURSCRIPT], a + ld [wVermilionCityCurScript], a ret -VermilionCityScript1: ; 1985f (6:585f) +VermilionCityScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz - ld c, $a + ld c, 10 call DelayFrames ld a, $0 - ld [W_VERMILIONCITYCURSCRIPT], a + ld [wVermilionCityCurScript], a ret -VermilionCityTextPointers: ; 1986f (6:586f) +VermilionCityTextPointers: dw VermilionCityText1 dw VermilionCityText2 dw VermilionCityText3 @@ -130,132 +128,130 @@ VermilionCityTextPointers: ; 1986f (6:586f) dw VermilionCityText12 dw VermilionCityText13 -VermilionCityText1: ; 19889 (6:5889) +VermilionCityText1: TX_FAR _VermilionCityText1 db "@" -VermilionCityText2: ; 1988e (6:588e) - db $08 ; asm - ld a, [wd803] - bit 2, a - jr nz, .asm_359bd ; 0x19894 +VermilionCityText2: + TX_ASM + CheckEvent EVENT_SS_ANNE_LEFT + 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) +VermilionCityText_198a7: TX_FAR _VermilionCityText_198a7 db "@" -VermilionCityText_198ac: ; 198ac (6:58ac) +VermilionCityText_198ac: TX_FAR _VermilionCityText_198ac db "@" -VermilionCityText3: ; 198b1 (6:58b1) - db $08 ; asm - ld a, [wd803] - bit 2, a - jr nz, .asm_3e0e9 ; 0x198b7 +VermilionCityText3: + TX_ASM + CheckEvent EVENT_SS_ANNE_LEFT + 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 b, S_S_TICKET + predef GetQuantityOfItemInBag 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 + ld [wVermilionCityCurScript], a + jr .asm_198fc +.asm_198f6 ld hl, SSAnneNotHereText call PrintText -.asm_79bd1 ; 0x198fc +.asm_198fc jp TextScriptEnd -VermilionCityCoords1: ; 198ff (6:58ff) +VermilionCityCoords1: db $1d,$13 db $1f,$13 db $ff -SSAnneWelcomeText4: ; 19904 (6:5904) +SSAnneWelcomeText4: TX_FAR _SSAnneWelcomeText4 db "@" -SSAnneWelcomeText9: ; 19909 (6:5909) +SSAnneWelcomeText9: TX_FAR _SSAnneWelcomeText9 db "@" -SSAnneFlashedTicketText: ; 1990e (6:590e) +SSAnneFlashedTicketText: TX_FAR _SSAnneFlashedTicketText db "@" -SSAnneNoTicketText: ; 19913 (6:5913) +SSAnneNoTicketText: TX_FAR _SSAnneNoTicketText db "@" -SSAnneNotHereText: ; 19918 (6:5918) +SSAnneNotHereText: TX_FAR _SSAnneNotHereText db "@" -VermilionCityText4: ; 1991d (6:591d) +VermilionCityText4: TX_FAR _VermilionCityText4 db "@" -VermilionCityText5: ; 19922 (6:5922) +VermilionCityText5: 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) +VermilionCityText14: TX_FAR _VermilionCityText14 db "@" -VermilionCityText6: ; 19938 (6:5938) +VermilionCityText6: TX_FAR _VermilionCityText6 db "@" -VermilionCityText7: ; 1993d (6:593d) +VermilionCityText7: TX_FAR _VermilionCityText7 db "@" -VermilionCityText8: ; 19942 (6:5942) +VermilionCityText8: TX_FAR _VermilionCityText8 db "@" -VermilionCityText11: ; 19947 (6:5947) +VermilionCityText11: TX_FAR _VermilionCityText11 db "@" -VermilionCityText12: ; 1994c (6:594c) +VermilionCityText12: TX_FAR _VermilionCityText12 db "@" -VermilionCityText13: ; 19951 (6:5951) +VermilionCityText13: TX_FAR _VermilionCityText13 db "@" diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm index 7b23c41e..5b5d520b 100755 --- a/scripts/vermiliondock.asm +++ b/scripts/vermiliondock.asm @@ -1,21 +1,20 @@ -VermilionDockScript: ; 1db52 (7:5b52) +VermilionDockScript: call EnableAutoTextBoxDrawing - ld hl, wd803 - bit 4, [hl] - jr nz, .asm_1db8d ; 0x1db5a $31 - bit 0, [hl] + CheckEventHL EVENT_STARTED_WALKING_OUT_OF_DOCK + jr nz, .asm_1db8d + CheckEventReuseHL EVENT_GOT_HM01 ret z ld a, [wDestinationWarpID] cp $1 ret nz - bit 2, [hl] + CheckEventReuseHL EVENT_SS_ANNE_LEFT jp z, VermilionDock_1db9b - set 4, [hl] + SetEventReuseHL EVENT_STARTED_WALKING_OUT_OF_DOCK call Delay3 ld hl, wd730 set 7, [hl] ld hl, wSimulatedJoypadStatesEnd - ld a, $40 + ld a, D_UP ld [hli], a ld [hli], a ld [hl], a @@ -28,20 +27,20 @@ VermilionDockScript: ; 1db52 (7:5b52) ld [wJoyIgnore], a ret .asm_1db8d - bit 5, [hl] + CheckEventAfterBranchReuseHL EVENT_WALKED_OUT_OF_DOCK, EVENT_STARTED_WALKING_OUT_OF_DOCK ret nz ld a, [wSimulatedJoypadStatesIndex] and a ret nz ld [wJoyIgnore], a - set 5, [hl] + SetEventReuseHL EVENT_WALKED_OUT_OF_DOCK ret -VermilionDock_1db9b: ; 1db9b (7:5b9b) - set 2, [hl] +VermilionDock_1db9b: + SetEventForceReuseHL EVENT_SS_ANNE_LEFT ld a, $ff ld [wJoyIgnore], a - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld c, BANK(Music_Surfing) ld a, MUSIC_SURFING @@ -49,30 +48,30 @@ 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 - hlCoord 0, 10 - ld bc, $0078 - ld a, $14 + coord hl, 0, 10 + ld bc, SCREEN_WIDTH * 6 + ld a, $14 ; water tile call FillMemory - ld a, $1 - ld [$ffba], a + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 xor a - ld [$ffba], a - ld [wWhichTrade], a - ld [$ff49], a - ld a, $58 - ld [wTrainerEngageDistance], a + ld [H_AUTOBGTRANSFERENABLED], a + ld [wSSAnneSmokeDriftAmount], a + ld [rOBP1], a + ld a, 88 + ld [wSSAnneSmokeX], a ld hl, wMapViewVRAMPointer ld c, [hl] inc hl ld b, [hl] push bc push hl - ld a, (SFX_02_54 - SFX_Headers_02) / 3 + ld a, SFX_SS_ANNE_HORN call PlaySoundWaitForCurrent ld a, $ff ld [wUpdateSpritesEnabled], a @@ -88,26 +87,26 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b) push hl push de call ScheduleEastColumnRedraw - call VermilionDock_1dc59 + call VermilionDock_EmitSmokePuff pop de ld b, $10 .asm_1dc11 - call VermilionDock_1dc42 + call VermilionDock_AnimSmokePuffDriftRight ld c, $8 .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 [rWY], a ld [hWY], a - call VermilionDock_1dc94 + call VermilionDock_EraseSSAnne ld a, $90 ld [hWY], a ld a, $1 @@ -122,86 +121,95 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b) dec [hl] ret -VermilionDock_1dc42: ; 1dc42 (7:5c42) +VermilionDock_AnimSmokePuffDriftRight: push bc push de ld hl, wOAMBuffer + $11 - ld a, [wWhichTrade] + ld a, [wSSAnneSmokeDriftAmount] swap a ld c, a - ld de, $0004 -.asm_1dc50 + ld de, 4 +.loop inc [hl] inc [hl] add hl, de dec c - jr nz, .asm_1dc50 ; 0x1dc54 $fa + jr nz, .loop pop de pop bc ret -VermilionDock_1dc59: ; 1dc59 (7:5c59) - ld a, [wTrainerEngageDistance] - sub $10 - ld [wTrainerEngageDistance], a +VermilionDock_EmitSmokePuff: +; new smoke puff above the S.S. Anne's front smokestack + ld a, [wSSAnneSmokeX] + sub 16 + ld [wSSAnneSmokeX], a ld c, a - ld b, $64 - ld a, [wWhichTrade] + ld b, 100 ; Y + ld a, [wSSAnneSmokeDriftAmount] inc a - ld [wWhichTrade], a + ld [wSSAnneSmokeDriftAmount], a ld a, $1 ld de, VermilionDockOAMBlock call WriteOAMBlock ret -VermilionDockOAMBlock: ; 1dc74 (7:5c74) +VermilionDockOAMBlock: db $fc, $10 db $fd, $10 db $fe, $10 db $ff, $10 -VermilionDock_1dc7c: ; 1dc7c (7:5c7c) +VermilionDock_1dc7c: ld h, d ld l, $50 call .asm_1dc86 ld h, $0 ld l, $80 .asm_1dc86 - ld a, [$ff44] + ld a, [rLY] cp l - jr nz, .asm_1dc86 ; 0x1dc89 $fb + jr nz, .asm_1dc86 ld a, h - ld [$ff43], a + ld [rSCX], a .asm_1dc8e - ld a, [$ff44] + ld a, [rLY] cp h - jr z, .asm_1dc8e ; 0x1dc91 $fb + jr z, .asm_1dc8e ret -VermilionDock_1dc94: ; 1dc94 (7:5c94) - ld hl, wcc5b - ld bc, $00b4 - ld a, $14 +VermilionDock_EraseSSAnne: +; Fill the area the S.S. Anne occupies in BG map 0 with water tiles. + ld hl, wVermilionDockTileMapBuffer + ld bc, (5 * BG_MAP_WIDTH) + SCREEN_WIDTH + ld a, $14 ; water tile call FillMemory - ld hl, vBGMap0 + 10 * 32 - ld de, wcc5b - ld bc, $000c + ld hl, vBGMap0 + 10 * BG_MAP_WIDTH + ld de, wVermilionDockTileMapBuffer + ld bc, (6 * BG_MAP_WIDTH) / 16 call CopyVideoData - ld hl, wOverworldMap + 10 + 7 * VERMILION_DOCK_WIDTH ; 10, 7 - ld a, $d + +; Replace the blocks of the lower half of the ship with water blocks. This +; leaves the upper half alone, but that doesn't matter because replacing any of +; the blocks is unnecessary because the blocks the ship occupies are south of +; the player and won't be redrawn when the player automatically walks north and +; exits the map. This code could be removed without affecting anything. + overworldMapCoord hl, 5, 2, VERMILION_DOCK_WIDTH + ld a, $d ; water block ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld a, (SFX_02_54 - SFX_Headers_02) / 3 + + ld a, SFX_SS_ANNE_HORN call PlaySound - ld c, $78 + ld c, 120 call DelayFrames ret -VermilionDockTextPointers: ; 1dcbf (7:5cbf) +VermilionDockTextPointers: dw VermilionDockText1 -VermilionDockText1: ; 1dcc1 (7:5cc1) +VermilionDockText1: TX_FAR _VermilionDockText1 db "@" diff --git a/scripts/vermiliongym.asm b/scripts/vermiliongym.asm index 6178dafb..c22ce9ce 100755 --- a/scripts/vermiliongym.asm +++ b/scripts/vermiliongym.asm @@ -1,5 +1,5 @@ -VermilionGymScript: ; 5ca26 (17:4a26) - ld hl, wd126 +VermilionGymScript: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] push hl @@ -11,90 +11,85 @@ VermilionGymScript: ; 5ca26 (17:4a26) call EnableAutoTextBoxDrawing ld hl, VermilionGymTrainerHeader0 ld de, VermilionGymScriptPointers - ld a, [W_VERMILIONGYMCURSCRIPT] + ld a, [wVermilionGymCurScript] call ExecuteCurMapScriptInTable - ld [W_VERMILIONGYMCURSCRIPT], a + ld [wVermilionGymCurScript], a ret -VermilionGymScript_5ca4c: ; 5ca4c (17:4a4c) - ld hl, Gym3CityName ; $4a55 - ld de, Gym3LeaderName ; $4a64 +VermilionGymScript_5ca4c: + ld hl, Gym3CityName + ld de, Gym3LeaderName jp LoadGymLeaderAndCityName -Gym3CityName: ; 5ca55 (17:4a55) +Gym3CityName: db "VERMILION CITY@" -Gym3LeaderName: ; 5ca64 (17:4a64) +Gym3LeaderName: db "LT.SURGE@" -VermilionGymScript_5ca6d: ; 5ca6d (17:4a6d) - ld a, [wd773] - bit 0, a +VermilionGymScript_5ca6d: + CheckEvent EVENT_2ND_LOCK_OPENED jr nz, .asm_5ca78 ld a, $24 jr .asm_5ca7f .asm_5ca78 - ld a, (SFX_02_57 - SFX_Headers_02) / 3 + ld a, SFX_GO_INSIDE call PlaySound ld a, $5 .asm_5ca7f - ld [wd09f], a - ld bc, $202 + ld [wNewTileBlockID], a + lb bc, 2, 2 predef_jump ReplaceTileBlock -VermilionGymScript_5ca8a: ; 5ca8a (17:4a8a) +VermilionGymScript_5ca8a: xor a ld [wJoyIgnore], a - ld [W_VERMILIONGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wVermilionGymCurScript], a + ld [wCurMapScript], a ret -VermilionGymScriptPointers: ; 5ca95 (17:4a95) +VermilionGymScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw VermilionGymScript3 -VermilionGymScript3: ; 5ca9d (17:4a9d) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +VermilionGymScript3: + ld a, [wIsInBattle] cp $ff jp z, VermilionGymScript_5ca8a ld a, $f0 ld [wJoyIgnore], a -VermilionGymScript_5caaa: ; 5caaa (17:4aaa) +VermilionGymScript_5caaa: ld a, $6 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd773 - set 7, [hl] - ld bc, (TM_24 << 8) | 1 + SetEvent EVENT_BEAT_LT_SURGE + lb bc, TM_24, 1 call GiveItem jr nc, .BagFull ld a, $7 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd773 - set 6, [hl] + SetEvent EVENT_GOT_TM24 jr .asm_5cad3 .BagFull ld a, $8 - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_5cad3 - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges set 2, [hl] - ld hl, wd72a + ld hl, wBeatGymFlags set 2, [hl] ; deactivate gym trainers - ld a, [wd773] - or %00011100 - ld [wd773], a + SetEventRange EVENT_BEAT_VERMILION_GYM_TRAINER_0, EVENT_BEAT_VERMILION_GYM_TRAINER_2 jp VermilionGymScript_5ca8a -VermilionGymTextPointers: ; 5cae8 (17:4ae8) +VermilionGymTextPointers: dw VermilionGymText1 dw VermilionGymText2 dw VermilionGymText3 @@ -104,51 +99,49 @@ VermilionGymTextPointers: ; 5cae8 (17:4ae8) dw VermilionGymText7 dw VermilionGymText8 -VermilionGymTrainerHeaders: ; 5caf8 (17:4af8) -VermilionGymTrainerHeader0: ; 5caf8 (17:4af8) - db $2 ; flag's bit +VermilionGymTrainerHeader0: + dbEventFlagBit EVENT_BEAT_VERMILION_GYM_TRAINER_0 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 - -VermilionGymTrainerHeader1: ; 5cb04 (17:4b04) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VERMILION_GYM_TRAINER_0 + dw VermilionGymBattleText1 ; TextBeforeBattle + dw VermilionGymAfterBattleText1 ; TextAfterBattle + dw VermilionGymEndBattleText1 ; TextEndBattle + dw VermilionGymEndBattleText1 ; TextEndBattle + +VermilionGymTrainerHeader1: + dbEventFlagBit EVENT_BEAT_VERMILION_GYM_TRAINER_1 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 - -VermilionGymTrainerHeader2: ; 5cb10 (17:4b10) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VERMILION_GYM_TRAINER_1 + dw VermilionGymBattleText2 ; TextBeforeBattle + dw VermilionGymAfterBattleText2 ; TextAfterBattle + dw VermilionGymEndBattleText2 ; TextEndBattle + dw VermilionGymEndBattleText2 ; TextEndBattle + +VermilionGymTrainerHeader2: + dbEventFlagBit EVENT_BEAT_VERMILION_GYM_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_VERMILION_GYM_TRAINER_2 + dw VermilionGymBattleText3 ; TextBeforeBattle + dw VermilionGymAfterBattleText3 ; TextAfterBattle + dw VermilionGymEndBattleText3 ; TextEndBattle + dw VermilionGymEndBattleText3 ; TextEndBattle db $ff -VermilionGymText1: ; 5cb1d (17:4b1d) - db $08 ; asm - ld a, [wd773] - bit 7, a - jr z, .asm_7cc29 ; 0x5cb23 - bit 6, a - jr nz, .asm_41203 ; 0x5cb27 +VermilionGymText1: + TX_ASM + CheckEvent EVENT_BEAT_LT_SURGE + jr z, .asm_5cb39 + CheckEventReuseA EVENT_GOT_TM24 + 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,118 +150,118 @@ 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 + ld [wGymLeaderNo], a xor a - ldh [$b4], a + ld [hJoyHeld], a ld a, $3 - ld [W_VERMILIONGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a -.asm_23621 ; 0x5cb6a + ld [wVermilionGymCurScript], a + ld [wCurMapScript], a +.asm_5cb6a jp TextScriptEnd -VermilionGymText_5cb6d: ; 5cb6d (17:4b6d) +VermilionGymText_5cb6d: TX_FAR _VermilionGymText_5cb6d db "@" -VermilionGymText_5cb72: ; 5cb72 (17:4b72) +VermilionGymText_5cb72: TX_FAR _VermilionGymText_5cb72 db "@" -VermilionGymText6: ; 5cb77 (17:4b77) +VermilionGymText6: TX_FAR _VermilionGymText_5cb77 db "@" -VermilionGymText7: ; 5cb7c (17:4b7c) +VermilionGymText7: TX_FAR _ReceivedTM24Text - db $11 + TX_SFX_KEY_ITEM TX_FAR _TM24ExplanationText db "@" -VermilionGymText8: ; 5cb86 (17:4b86) +VermilionGymText8: TX_FAR _TM24NoRoomText db "@" -ReceivedThunderbadgeText: ; 5cb8b (17:4b8b) +ReceivedThunderbadgeText: TX_FAR _ReceivedThunderbadgeText db "@" -VermilionGymText2: ; 5cb90 (17:4b90) - db $08 ; asm +VermilionGymText2: + TX_ASM ld hl, VermilionGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd -VermilionGymBattleText1: ; 5cb9a (17:4b9a) +VermilionGymBattleText1: TX_FAR _VermilionGymBattleText1 db "@" -VermilionGymEndBattleText1: ; 5cb9f (17:4b9f) +VermilionGymEndBattleText1: TX_FAR _VermilionGymEndBattleText1 db "@" -VermilionGymAfterBattleText1: ; 5cba4 (17:4ba4) +VermilionGymAfterBattleText1: TX_FAR _VermilionGymAfterBattleText1 db "@" -VermilionGymText3: ; 5cba9 (17:4ba9) - db $08 ; asm +VermilionGymText3: + TX_ASM ld hl, VermilionGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd -VermilionGymBattleText2: ; 5cbb3 (17:4bb3) +VermilionGymBattleText2: TX_FAR _VermilionGymBattleText2 db "@" -VermilionGymEndBattleText2: ; 5cbb8 (17:4bb8) +VermilionGymEndBattleText2: TX_FAR _VermilionGymEndBattleText2 db "@" -VermilionGymAfterBattleText2: ; 5cbbd (17:4bbd) +VermilionGymAfterBattleText2: TX_FAR _VermilionGymAfterBattleText2 db "@" -VermilionGymText4: ; 5cbc2 (17:4bc2) - db $08 ; asm +VermilionGymText4: + TX_ASM ld hl, VermilionGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd -VermilionGymBattleText3: ; 5cbcc (17:4bcc) +VermilionGymBattleText3: TX_FAR _VermilionGymBattleText3 db "@" -VermilionGymEndBattleText3: ; 5cbd1 (17:4bd1) +VermilionGymEndBattleText3: TX_FAR _VermilionGymEndBattleText3 db "@" -VermilionGymAfterBattleText3: ; 5cbd6 (17:4bd6) +VermilionGymAfterBattleText3: TX_FAR _VermilionGymAfterBattleText3 db "@" -VermilionGymText5: ; 5cbdb (17:4bdb) - db $08 ; asm - ld a, [wd72a] +VermilionGymText5: + TX_ASM + ld a, [wBeatGymFlags] 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) +VermilionGymText_5cbf4: TX_FAR _VermilionGymText_5cbf4 db "@" -VermilionGymText_5cbf9: ; 5cbf9 (17:4bf9) +VermilionGymText_5cbf9: TX_FAR _VermilionGymText_5cbf9 db "@" diff --git a/scripts/vermilionhouse1.asm b/scripts/vermilionhouse1.asm index 4ead1af7..d2dac4ca 100755 --- a/scripts/vermilionhouse1.asm +++ b/scripts/vermilionhouse1.asm @@ -1,24 +1,24 @@ -VermilionHouse1Script: ; 1dafc (7:5afc) +VermilionHouse1Script: call EnableAutoTextBoxDrawing ret -VermilionHouse1TextPointers: ; 1db00 (7:5b00) +VermilionHouse1TextPointers: dw VermilionHouse1Text1 dw VermilionHouse1Text2 dw VermilionHouse1Text3 -VermilionHouse1Text1: ; 1db06 (7:5b06) +VermilionHouse1Text1: TX_FAR _VermilionHouse1Text1 db "@" -VermilionHouse1Text2: ; 1db0b (7:5b0b) +VermilionHouse1Text2: TX_FAR _VermilionHouse1Text2 - db $08 ; asm + TX_ASM ld a, PIDGEY call PlayCry call WaitForSoundToFinish jp TextScriptEnd -VermilionHouse1Text3: ; 1db1b (7:5b1b) +VermilionHouse1Text3: TX_FAR _VermilionHouse1Text3 db "@" diff --git a/scripts/vermilionhouse2.asm b/scripts/vermilionhouse2.asm index 7c06c6e9..c0735f32 100755 --- a/scripts/vermilionhouse2.asm +++ b/scripts/vermilionhouse2.asm @@ -1,11 +1,11 @@ -VermilionHouse2Script: ; 56070 (15:6070) +VermilionHouse2Script: jp EnableAutoTextBoxDrawing -VermilionHouse2TextPointers: ; 56073 (15:6073) +VermilionHouse2TextPointers: dw VermilionHouse2Text1 -VermilionHouse2Text1: ; 56075 (15:6075) - db $08 ; asm +VermilionHouse2Text1: + TX_ASM ld a, [wd728] bit 3, a jr nz, .asm_03ef5 @@ -15,7 +15,7 @@ VermilionHouse2Text1: ; 56075 (15:6075) ld a, [wCurrentMenuItem] and a jr nz, .asm_eb1b7 - ld bc, (OLD_ROD << 8) | 1 + lb bc, OLD_ROD, 1 call GiveItem jr nc, .BagFull ld hl, wd728 @@ -34,24 +34,24 @@ VermilionHouse2Text1: ; 56075 (15:6075) call PrintText jp TextScriptEnd -VermilionHouse2Text_560b1: ; 560b1 (15:60b1) +VermilionHouse2Text_560b1: TX_FAR _VermilionHouse2Text_560b1 db "@" -VermilionHouse2Text_560b6: ; 560b6 (15:60b6) - TX_FAR _VermilionHouse2Text_560b6 ; 0x9c554 - db $0B - TX_FAR _VermilionHouse2Text_560bb ; 0x9c5a4 +VermilionHouse2Text_560b6: + TX_FAR _VermilionHouse2Text_560b6 + TX_SFX_ITEM_1 + TX_FAR _VermilionHouse2Text_560bb db "@" -VermilionHouse2Text_560c0: ; 560c0 (15:60c0) +VermilionHouse2Text_560c0: TX_FAR _VermilionHouse2Text_560c0 db "@" -VermilionHouse2Text_560c5: ; 560c5 (15:60c5) +VermilionHouse2Text_560c5: TX_FAR _VermilionHouse2Text_560c5 db "@" -VermilionHouse2Text_560ca: ; 560ca (15:60ca) +VermilionHouse2Text_560ca: TX_FAR _VermilionHouse2Text_560ca db "@" diff --git a/scripts/vermilionhouse3.asm b/scripts/vermilionhouse3.asm index 08e2e395..1f0af501 100755 --- a/scripts/vermilionhouse3.asm +++ b/scripts/vermilionhouse3.asm @@ -1,11 +1,11 @@ -VermilionHouse3Script: ; 19c12 (6:5c12) +VermilionHouse3Script: jp EnableAutoTextBoxDrawing -VermilionHouse3TextPointers: ; 19c15 (6:5c15) +VermilionHouse3TextPointers: dw VermilionHouse3Text1 -VermilionHouse3Text1: ; 19c17 (6:5c17) - db $08 ; asm +VermilionHouse3Text1: + TX_ASM ld a, $4 ld [wWhichTrade], a predef DoInGameTradeDialogue diff --git a/scripts/vermilionmart.asm b/scripts/vermilionmart.asm index 921e7852..2d4df78d 100755 --- a/scripts/vermilionmart.asm +++ b/scripts/vermilionmart.asm @@ -1,15 +1,15 @@ -VermilionMartScript: ; 5c9e1 (17:49e1) +VermilionMartScript: jp EnableAutoTextBoxDrawing -VermilionMartTextPointers: ; 5c9e4 (17:49e4) - dw VermilionMartText1 +VermilionMartTextPointers: + dw VermilionCashierText dw VermilionMartText2 dw VermilionMartText3 -VermilionMartText2: ; 5c9ea (17:49ea) +VermilionMartText2: TX_FAR _VermilionMartText2 db "@" -VermilionMartText3: ; 5c9ef (17:49ef) +VermilionMartText3: TX_FAR _VermilionMartText3 db "@" diff --git a/scripts/vermilionpokecenter.asm b/scripts/vermilionpokecenter.asm index 6e85b3e3..f70aed31 100755 --- a/scripts/vermilionpokecenter.asm +++ b/scripts/vermilionpokecenter.asm @@ -1,23 +1,23 @@ -VermilionPokecenterScript: ; 5c98f (17:498f) +VermilionPokecenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -VermilionPokecenterTextPointers: ; 5c995 (17:4995) - dw VermilionPokecenterText1 +VermilionPokecenterTextPointers: + dw VermilionHealNurseText dw VermilionPokecenterText2 dw VermilionPokecenterText3 - dw VermilionPokecenterText4 + dw VermilionTradeNurseText -VermilionPokecenterText1: ; 5c99d (17:499d) - db $ff +VermilionHealNurseText: + TX_POKECENTER_NURSE -VermilionPokecenterText2: ; 5c99e (17:499e) - TX_FAR _VermilionPokecenterText1 +VermilionPokecenterText2: + TX_FAR _VermilionPokecenterText2 db "@" -VermilionPokecenterText3: ; 5c9a3 (17:49a3) +VermilionPokecenterText3: TX_FAR _VermilionPokecenterText3 db "@" -VermilionPokecenterText4: ; 5c9a8 (17:49a8) - db $f6 +VermilionTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST diff --git a/scripts/victoryroad1.asm b/scripts/victoryroad1.asm index b6d2bf3e..5409d733 100755 --- a/scripts/victoryroad1.asm +++ b/scripts/victoryroad1.asm @@ -1,107 +1,103 @@ -VictoryRoad1Script: ; 5da0a (17:5a0a) - ld hl, wd126 +VictoryRoad1Script: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] call nz, .next call EnableAutoTextBoxDrawing - ld hl, VictoryRoad1TrainerHeaders + ld hl, VictoryRoad1TrainerHeader0 ld de, VictoryRoad1ScriptPointers - ld a, [W_VICTORYROAD1CURSCRIPT] + ld a, [wVictoryRoad1CurScript] call ExecuteCurMapScriptInTable - ld [W_VICTORYROAD1CURSCRIPT], a + ld [wVictoryRoad1CurScript], a ret .next - ld a, [wd869] - bit 7, a + CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH ret z ld a, $1d - ld [wd09f], a - ld bc, $604 + ld [wNewTileBlockID], a + lb bc, 6, 4 predef_jump ReplaceTileBlock -VictoryRoad1ScriptPointers: ; 5da3a (17:5a3a) +VictoryRoad1ScriptPointers: dw VictoryRoad1Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -VictoryRoad1Script0: ; 5da40 (17:5a40) - ld a, [wd869] - bit 7, a +VictoryRoad1Script0: + CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH jp nz, CheckFightingMapTrainers - ld hl, CoordsData_5da5c ; $5a5c + ld hl, CoordsData_5da5c call CheckBoulderCoords jp nc, CheckFightingMapTrainers - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] - ld hl, wd869 - set 7, [hl] + SetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH ret -CoordsData_5da5c: ; 5da5c (17:5a5c) +CoordsData_5da5c: db $0D,$11,$FF -VictoryRoad1TextPointers: ; 5da5f (17:5a5f) +VictoryRoad1TextPointers: dw VictoryRoad1Text1 dw VictoryRoad1Text2 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText dw BoulderText dw BoulderText dw BoulderText -VictoryRoad1TrainerHeaders: ; 5da6d (17:5a6d) -VictoryRoad1TrainerHeader0: ; 5da6d (17:5a6d) - db $1 ; flag's bit +VictoryRoad1TrainerHeader0: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0 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 + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0 + dw VictoryRoad1BattleText1 ; TextBeforeBattle + dw VictoryRoad1AfterBattleText1 ; TextAfterBattle + dw VictoryRoad1EndBattleText1 ; TextEndBattle + dw VictoryRoad1EndBattleText1 ; TextEndBattle -VictoryRoad1TrainerHeader1: ; 5da79 (17:5a79) - db $2 ; flag's bit +VictoryRoad1TrainerHeader1: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1 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 + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1 + dw VictoryRoad1BattleText2 ; TextBeforeBattle + dw VictoryRoad1AfterBattleText2 ; TextAfterBattle + dw VictoryRoad1EndBattleText2 ; TextEndBattle + dw VictoryRoad1EndBattleText2 ; TextEndBattle db $ff -VictoryRoad1Text1: ; 5da86 (17:5a86) - db $08 ; asm +VictoryRoad1Text1: + TX_ASM ld hl, VictoryRoad1TrainerHeader0 call TalkToTrainer jp TextScriptEnd -VictoryRoad1Text2: ; 5da90 (17:5a90) - db $08 ; asm +VictoryRoad1Text2: + TX_ASM ld hl, VictoryRoad1TrainerHeader1 call TalkToTrainer jp TextScriptEnd -VictoryRoad1BattleText1: ; 5da9a (17:5a9a) +VictoryRoad1BattleText1: TX_FAR _VictoryRoad1BattleText1 db "@" -VictoryRoad1EndBattleText1: ; 5da9f (17:5a9f) +VictoryRoad1EndBattleText1: TX_FAR _VictoryRoad1EndBattleText1 db "@" -VictoryRoad1AfterBattleText1: ; 5daa4 (17:5aa4) +VictoryRoad1AfterBattleText1: TX_FAR _VictoryRoad1AfterBattleText1 db "@" -VictoryRoad1BattleText2: ; 5daa9 (17:5aa9) +VictoryRoad1BattleText2: TX_FAR _VictoryRoad1BattleText2 db "@" -VictoryRoad1EndBattleText2: ; 5daae (17:5aae) +VictoryRoad1EndBattleText2: TX_FAR _VictoryRoad1EndBattleText2 db "@" -VictoryRoad1AfterBattleText2: ; 5dab3 (17:5ab3) +VictoryRoad1AfterBattleText2: TX_FAR _VictoryRoad1AfterBattleText2 db "@" diff --git a/scripts/victoryroad2.asm b/scripts/victoryroad2.asm index 4aab61ca..847573d8 100755 --- a/scripts/victoryroad2.asm +++ b/scripts/victoryroad2.asm @@ -1,247 +1,244 @@ -VictoryRoad2Script: ; 5179d (14:579d) - ld hl, wd126 +VictoryRoad2Script: + ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] call nz, VictoryRoad2Script_517c4 - ld hl, wd126 + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] call nz, VictoryRoad2Script_517c9 call EnableAutoTextBoxDrawing - ld hl, VictoryRoad2TrainerHeaders + ld hl, VictoryRoad2TrainerHeader0 ld de, VictoryRoad2ScriptPointers - ld a, [W_VICTORYROAD2CURSCRIPT] + ld a, [wVictoryRoad2CurScript] call ExecuteCurMapScriptInTable - ld [W_VICTORYROAD2CURSCRIPT], a + ld [wVictoryRoad2CurScript], a ret -VictoryRoad2Script_517c4: ; 517c4 (14:57c4) - ld hl, wd869 - res 7, [hl] +VictoryRoad2Script_517c4: + ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH -VictoryRoad2Script_517c9: ; 517c9 (14:57c9) - ld a, [wd7ee] - bit 0, a +VictoryRoad2Script_517c9: + CheckEvent EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 jr z, .asm_517da push af ld a, $15 - ld bc, $403 + lb bc, 4, 3 call VictoryRoad2Script_517e2 pop af .asm_517da bit 7, a ret z ld a, $1d - ld bc, $70b + lb bc, 7, 11 -VictoryRoad2Script_517e2: ; 517e2 (14:57e2) - ld [wd09f], a +VictoryRoad2Script_517e2: + ld [wNewTileBlockID], a predef ReplaceTileBlock ret -VictoryRoad2ScriptPointers: ; 517eb (14:57eb) +VictoryRoad2ScriptPointers: dw VictoryRoad2Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -VictoryRoad2Script0: ; 517f1 (14:57f1) - ld hl, CoordsData_51816 ; $5816 +VictoryRoad2Script0: + ld hl, CoordsData_51816 call CheckBoulderCoords jp nc, CheckFightingMapTrainers - ld hl, wd7ee - ld a, [wWhichTrade] ; wWhichTrade + EventFlagAddress hl, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 + ld a, [wCoordIndex] cp $2 jr z, .asm_5180b - bit 0, [hl] - set 0, [hl] + CheckEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 + SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 ret nz jr .asm_51810 .asm_5180b - bit 7, [hl] - set 7, [hl] + CheckEventAfterBranchReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 + SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2 ret nz .asm_51810 - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] ret -CoordsData_51816: ; 51816 (14:5816) +CoordsData_51816: db $10,$01 db $10,$09 db $FF -VictoryRoad2TextPointers: ; 5181b (14:581b) +VictoryRoad2TextPointers: dw VictoryRoad2Text1 dw VictoryRoad2Text2 dw VictoryRoad2Text3 dw VictoryRoad2Text4 dw VictoryRoad2Text5 - dw VictoryRoad2Text6 - dw Predef5CText - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw MoltresText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw BoulderText dw BoulderText dw BoulderText -VictoryRoad2TrainerHeaders: ; 51835 (14:5835) -VictoryRoad2TrainerHeader0: ; 51835 (14:5835) - db $1 ; flag's bit +VictoryRoad2TrainerHeader0: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0 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 - -VictoryRoad2TrainerHeader2: ; 51841 (14:5841) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0 + dw VictoryRoad2BattleText1 ; TextBeforeBattle + dw VictoryRoad2AfterBattleText1 ; TextAfterBattle + dw VictoryRoad2EndBattleText1 ; TextEndBattle + dw VictoryRoad2EndBattleText1 ; TextEndBattle + +VictoryRoad2TrainerHeader1: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1 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 - -VictoryRoad2TrainerHeader3: ; 5184d (14:584d) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1 + dw VictoryRoad2BattleText2 ; TextBeforeBattle + dw VictoryRoad2AfterBattleText2 ; TextAfterBattle + dw VictoryRoad2EndBattleText2 ; TextEndBattle + dw VictoryRoad2EndBattleText2 ; TextEndBattle + +VictoryRoad2TrainerHeader2: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2 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 - -VictoryRoad2TrainerHeader4: ; 51859 (14:5859) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2 + dw VictoryRoad2BattleText3 ; TextBeforeBattle + dw VictoryRoad2AfterBattleText3 ; TextAfterBattle + dw VictoryRoad2EndBattleText3 ; TextEndBattle + dw VictoryRoad2EndBattleText3 ; TextEndBattle + +VictoryRoad2TrainerHeader3: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3 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 - -VictoryRoad2TrainerHeader5: ; 51865 (14:5865) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3 + dw VictoryRoad2BattleText4 ; TextBeforeBattle + dw VictoryRoad2AfterBattleText4 ; TextAfterBattle + dw VictoryRoad2EndBattleText4 ; TextEndBattle + dw VictoryRoad2EndBattleText4 ; TextEndBattle + +VictoryRoad2TrainerHeader4: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4 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 - -VictoryRoad2TrainerHeader6: ; 51871 (14:5871) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4 + dw VictoryRoad2BattleText5 ; TextBeforeBattle + dw VictoryRoad2AfterBattleText5 ; TextAfterBattle + dw VictoryRoad2EndBattleText5 ; TextEndBattle + dw VictoryRoad2EndBattleText5 ; TextEndBattle + +MoltresTrainerHeader: + dbEventFlagBit EVENT_BEAT_MOLTRES 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 + dwEventFlagAddress EVENT_BEAT_MOLTRES + dw MoltresBattleText ; TextBeforeBattle + dw MoltresBattleText ; TextAfterBattle + dw MoltresBattleText ; TextEndBattle + dw MoltresBattleText ; TextEndBattle db $ff -VictoryRoad2Text1: ; 5187e (14:587e) - db $08 ; asm +VictoryRoad2Text1: + TX_ASM ld hl, VictoryRoad2TrainerHeader0 call TalkToTrainer jp TextScriptEnd -VictoryRoad2Text2: ; 51888 (14:5888) - db $08 ; asm - ld hl, VictoryRoad2TrainerHeader2 +VictoryRoad2Text2: + TX_ASM + ld hl, VictoryRoad2TrainerHeader1 call TalkToTrainer jp TextScriptEnd -VictoryRoad2Text3: ; 51892 (14:5892) - db $08 ; asm - ld hl, VictoryRoad2TrainerHeader3 +VictoryRoad2Text3: + TX_ASM + ld hl, VictoryRoad2TrainerHeader2 call TalkToTrainer jp TextScriptEnd -VictoryRoad2Text4: ; 5189c (14:589c) - db $08 ; asm - ld hl, VictoryRoad2TrainerHeader4 +VictoryRoad2Text4: + TX_ASM + ld hl, VictoryRoad2TrainerHeader3 call TalkToTrainer jp TextScriptEnd -VictoryRoad2Text5: ; 518a6 (14:58a6) - db $08 ; asm - ld hl, VictoryRoad2TrainerHeader5 +VictoryRoad2Text5: + TX_ASM + ld hl, VictoryRoad2TrainerHeader4 call TalkToTrainer jp TextScriptEnd -VictoryRoad2Text6: ; 518b0 (14:58b0) - db $08 ; asm - ld hl, VictoryRoad2TrainerHeader6 +MoltresText: + TX_ASM + ld hl, MoltresTrainerHeader call TalkToTrainer jp TextScriptEnd -VictoryRoad2BattleText6: ; 518ba (14:58ba) - TX_FAR _VictoryRoad2BattleText6 - db $8 +MoltresBattleText: + TX_FAR _MoltresBattleText + TX_ASM ld a, MOLTRES call PlayCry call WaitForSoundToFinish jp TextScriptEnd -VictoryRoad2BattleText1: ; 518ca (14:58ca) +VictoryRoad2BattleText1: TX_FAR _VictoryRoad2BattleText1 db "@" -VictoryRoad2EndBattleText1: ; 518cf (14:58cf) +VictoryRoad2EndBattleText1: TX_FAR _VictoryRoad2EndBattleText1 db "@" -VictoryRoad2AfterBattleText1: ; 518d4 (14:58d4) +VictoryRoad2AfterBattleText1: TX_FAR _VictoryRoad2AfterBattleText1 db "@" -VictoryRoad2BattleText2: ; 518d9 (14:58d9) +VictoryRoad2BattleText2: TX_FAR _VictoryRoad2BattleText2 db "@" -VictoryRoad2EndBattleText2: ; 518de (14:58de) +VictoryRoad2EndBattleText2: TX_FAR _VictoryRoad2EndBattleText2 db "@" -VictoryRoad2AfterBattleText2: ; 518e3 (14:58e3) +VictoryRoad2AfterBattleText2: TX_FAR _VictoryRoad2AfterBattleText2 db "@" -VictoryRoad2BattleText3: ; 518e8 (14:58e8) +VictoryRoad2BattleText3: TX_FAR _VictoryRoad2BattleText3 db "@" -VictoryRoad2EndBattleText3: ; 518ed (14:58ed) +VictoryRoad2EndBattleText3: TX_FAR _VictoryRoad2EndBattleText3 db "@" -VictoryRoad2AfterBattleText3: ; 518f2 (14:58f2) +VictoryRoad2AfterBattleText3: TX_FAR _VictoryRoad2AfterBattleText3 db "@" -VictoryRoad2BattleText4: ; 518f7 (14:58f7) +VictoryRoad2BattleText4: TX_FAR _VictoryRoad2BattleText4 db "@" -VictoryRoad2EndBattleText4: ; 518fc (14:58fc) +VictoryRoad2EndBattleText4: TX_FAR _VictoryRoad2EndBattleText4 db "@" -VictoryRoad2AfterBattleText4: ; 51901 (14:5901) +VictoryRoad2AfterBattleText4: TX_FAR _VictoryRoad2AfterBattleText4 db "@" -VictoryRoad2BattleText5: ; 51906 (14:5906) +VictoryRoad2BattleText5: TX_FAR _VictoryRoad2BattleText5 db "@" -VictoryRoad2EndBattleText5: ; 5190b (14:590b) +VictoryRoad2EndBattleText5: TX_FAR _VictoryRoad2EndBattleText5 db "@" -VictoryRoad2AfterBattleText5: ; 51910 (14:5910) +VictoryRoad2AfterBattleText5: TX_FAR _VictoryRoad2AfterBattleText5 db "@" diff --git a/scripts/victoryroad3.asm b/scripts/victoryroad3.asm index 01269a3f..c615091b 100755 --- a/scripts/victoryroad3.asm +++ b/scripts/victoryroad3.asm @@ -1,70 +1,66 @@ -VictoryRoad3Script: ; 44980 (11:4980) +VictoryRoad3Script: call VictoryRoad3Script_44996 call EnableAutoTextBoxDrawing - ld hl, VictoryRoad3TrainerHeaders + ld hl, VictoryRoad3TrainerHeader0 ld de, VictoryRoad3ScriptPointers - ld a, [W_VICTORYROAD3CURSCRIPT] + ld a, [wVictoryRoad3CurScript] call ExecuteCurMapScriptInTable - ld [W_VICTORYROAD3CURSCRIPT], a + ld [wVictoryRoad3CurScript], a ret -VictoryRoad3Script_44996: ; 44996 (11:4996) - ld hl, wd126 +VictoryRoad3Script_44996: + ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] ret z - ld hl, wd813 - bit 0, [hl] + CheckEventHL EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1 ret z ld a, $1d - ld [wd09f], a - ld bc, $503 + ld [wNewTileBlockID], a + lb bc, 5, 3 predef_jump ReplaceTileBlock -VictoryRoad3ScriptPointers: ; 449b1 (11:49b1) +VictoryRoad3ScriptPointers: dw VictoryRoad3Script0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -VictoryRoad3Script0: ; 449b7 (11:49b7) +VictoryRoad3Script0: ld hl, wFlags_0xcd60 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, [wCoordIndex] cp $1 jr nz, .asm_449dc - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] - ld hl, wd813 - set 0, [hl] + SetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1 ret .asm_449dc - ld hl, wd813 - bit 6, [hl] - set 6, [hl] + CheckAndSetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2 jr nz, .asm_449fe ld a, HS_VICTORY_ROAD_3_BOULDER - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, HS_VICTORY_ROAD_2_BOULDER - ld [wcc4d], a + ld [wMissableObjectIndex], a predef_jump ShowObject -.coordsData_449f9: ; 449f9 (11:49f9) +.coordsData_449f9: db $05,$03 db $0F,$17 db $FF .asm_449fe - ld a, $c2 + ld a, VICTORY_ROAD_2 ld [wDungeonWarpDestinationMap], a - ld hl, .coordsData_449f9 ; $49f9 - call Func_46981 - ld a, [wWhichTrade] ; wWhichTrade + ld hl, .coordsData_449f9 + call IsPlayerOnDungeonWarp + ld a, [wCoordIndex] cp $1 jr nz, .asm_44a1b ld hl, wd72d @@ -78,125 +74,124 @@ VictoryRoad3Script0: ; 449b7 (11:49b7) jp z, CheckFightingMapTrainers ret -VictoryRoad3TextPointers: ; 44a24 (11:4a24) +VictoryRoad3TextPointers: dw VictoryRoad3Text1 dw VictoryRoad3Text2 dw VictoryRoad3Text3 dw VictoryRoad3Text4 - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText dw BoulderText dw BoulderText dw BoulderText dw BoulderText -VictoryRoad3TrainerHeaders: ; 44a38 (11:4a38) -VictoryRoad3TrainerHeader0: ; 44a38 (11:4a38) - db $1 ; flag's bit +VictoryRoad3TrainerHeader0: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0 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 - -VictoryRoad3TrainerHeader2: ; 44a44 (11:4a44) - db $2 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0 + dw VictoryRoad3BattleText2 ; TextBeforeBattle + dw VictoryRoad3AfterBattleText2 ; TextAfterBattle + dw VictoryRoad3EndBattleText2 ; TextEndBattle + dw VictoryRoad3EndBattleText2 ; TextEndBattle + +VictoryRoad3TrainerHeader1: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1 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 - -VictoryRoad3TrainerHeader3: ; 44a50 (11:4a50) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1 + dw VictoryRoad3BattleText3 ; TextBeforeBattle + dw VictoryRoad3AfterBattleText3 ; TextAfterBattle + dw VictoryRoad3EndBattleText3 ; TextEndBattle + dw VictoryRoad3EndBattleText3 ; TextEndBattle + +VictoryRoad3TrainerHeader2: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2 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 - -VictoryRoad3TrainerHeader4: ; 44a5c (11:4a5c) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2 + dw VictoryRoad3BattleText4 ; TextBeforeBattle + dw VictoryRoad3AfterBattleText4 ; TextAfterBattle + dw VictoryRoad3EndBattleText4 ; TextEndBattle + dw VictoryRoad3EndBattleText4 ; TextEndBattle + +VictoryRoad3TrainerHeader3: + dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3 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 + dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3 + dw VictoryRoad3BattleText5 ; TextBeforeBattle + dw VictoryRoad3AfterBattleText5 ; TextAfterBattle + dw VictoryRoad3EndBattleText5 ; TextEndBattle + dw VictoryRoad3EndBattleText5 ; TextEndBattle db $ff -VictoryRoad3Text1: ; 44a69 (11:4a69) - db $08 ; asm +VictoryRoad3Text1: + TX_ASM ld hl, VictoryRoad3TrainerHeader0 call TalkToTrainer jp TextScriptEnd -VictoryRoad3Text2: ; 44a73 (11:4a73) - db $08 ; asm - ld hl, VictoryRoad3TrainerHeader2 +VictoryRoad3Text2: + TX_ASM + ld hl, VictoryRoad3TrainerHeader1 call TalkToTrainer jp TextScriptEnd -VictoryRoad3Text3: ; 44a7d (11:4a7d) - db $08 ; asm - ld hl, VictoryRoad3TrainerHeader3 +VictoryRoad3Text3: + TX_ASM + ld hl, VictoryRoad3TrainerHeader2 call TalkToTrainer jp TextScriptEnd -VictoryRoad3Text4: ; 44a87 (11:4a87) - db $08 ; asm - ld hl, VictoryRoad3TrainerHeader4 +VictoryRoad3Text4: + TX_ASM + ld hl, VictoryRoad3TrainerHeader3 call TalkToTrainer jp TextScriptEnd -VictoryRoad3BattleText2: ; 44a91 (11:4a91) +VictoryRoad3BattleText2: TX_FAR _VictoryRoad3BattleText2 db "@" -VictoryRoad3EndBattleText2: ; 44a96 (11:4a96) +VictoryRoad3EndBattleText2: TX_FAR _VictoryRoad3EndBattleText2 db "@" -VictoryRoad3AfterBattleText2: ; 44a9b (11:4a9b) +VictoryRoad3AfterBattleText2: TX_FAR _VictoryRoad3AfterBattleText2 db "@" -VictoryRoad3BattleText3: ; 44aa0 (11:4aa0) +VictoryRoad3BattleText3: TX_FAR _VictoryRoad3BattleText3 db "@" -VictoryRoad3EndBattleText3: ; 44aa5 (11:4aa5) +VictoryRoad3EndBattleText3: TX_FAR _VictoryRoad3EndBattleText3 db "@" -VictoryRoad3AfterBattleText3: ; 44aaa (11:4aaa) +VictoryRoad3AfterBattleText3: TX_FAR _VictoryRoad3AfterBattleText3 db "@" -VictoryRoad3BattleText4: ; 44aaf (11:4aaf) +VictoryRoad3BattleText4: TX_FAR _VictoryRoad3BattleText4 db "@" -VictoryRoad3EndBattleText4: ; 44ab4 (11:4ab4) +VictoryRoad3EndBattleText4: TX_FAR _VictoryRoad3EndBattleText4 db "@" -VictoryRoad3AfterBattleText4: ; 44ab9 (11:4ab9) +VictoryRoad3AfterBattleText4: TX_FAR _VictoryRoad3AfterBattleText4 db "@" -VictoryRoad3BattleText5: ; 44abe (11:4abe) +VictoryRoad3BattleText5: TX_FAR _VictoryRoad3BattleText5 db "@" -VictoryRoad3EndBattleText5: ; 44ac3 (11:4ac3) +VictoryRoad3EndBattleText5: TX_FAR _VictoryRoad3EndBattleText5 db "@" -VictoryRoad3AfterBattleText5: ; 44ac8 (11:4ac8) +VictoryRoad3AfterBattleText5: TX_FAR _VictoryRoad3AfterBattleText5 db "@" diff --git a/scripts/viridiancity.asm b/scripts/viridiancity.asm index d0b2b4ae..3ccdc509 100755 --- a/scripts/viridiancity.asm +++ b/scripts/viridiancity.asm @@ -1,67 +1,64 @@ -ViridianCityScript: ; 18ff1 (6:4ff1) +ViridianCityScript: call EnableAutoTextBoxDrawing ld hl, ViridianCityScriptPointers - ld a, [W_VIRIDIANCITYCURSCRIPT] + ld a, [wViridianCityCurScript] jp CallFunctionInTable -ViridianCityScriptPointers: ; 18ffd (6:4ffd) +ViridianCityScriptPointers: dw ViridianCityScript0 dw ViridianCityScript1 dw ViridianCityScript2 dw ViridianCityScript3 -ViridianCityScript0: ; 19005 (6:5005) +ViridianCityScript0: call ViridianCityScript_1900b jp ViridianCityScript_1903d -ViridianCityScript_1900b: ; 1900b (6:500b) - ld a, [wd74c] - bit 0, a +ViridianCityScript_1900b: + CheckEvent EVENT_VIRIDIAN_GYM_OPEN ret nz - ld a, [W_OBTAINEDBADGES] + ld a, [wObtainedBadges] cp %01111111 - jr nz, .asm_1901e ; 0x19016 $6 - ld hl, wd74c - set 0, [hl] + jr nz, .asm_1901e + SetEvent EVENT_VIRIDIAN_GYM_OPEN ret .asm_1901e - ld a, [W_YCOORD] + ld a, [wYCoord] cp $8 ret nz - ld a, [W_XCOORD] + ld a, [wXCoord] cp $20 ret nz ld a, $e - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [hJoyHeld], a call ViridianCityScript_190cf ld a, $3 - ld [W_VIRIDIANCITYCURSCRIPT], a + ld [wViridianCityCurScript], a ret -ViridianCityScript_1903d: ; 1903d (6:503d) - ld a, [wd74b] - bit 5, a +ViridianCityScript_1903d: + CheckEvent EVENT_GOT_POKEDEX ret nz - ld a, [W_YCOORD] + ld a, [wYCoord] cp $9 ret nz - ld a, [W_XCOORD] + ld a, [wXCoord] cp $13 ret nz ld a, $5 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [hJoyHeld], a call ViridianCityScript_190cf ld a, $3 - ld [W_VIRIDIANCITYCURSCRIPT], a + ld [wViridianCityCurScript], a ret -ViridianCityScript1: ; 19062 (6:5062) +ViridianCityScript1: ld a, [wSpriteStateData1 + $34] ld [$ffeb], a ld a, [wSpriteStateData1 + $36] @@ -74,17 +71,17 @@ ViridianCityScript1: ; 19062 (6:5062) ld [wListScrollOffset], a ; set up battle for Old Man - ld a, $1 - ld [W_BATTLETYPE], a + ld a, BATTLE_TYPE_OLD_MAN + ld [wBattleType], a ld a, 5 - ld [W_CURENEMYLVL], a + ld [wCurEnemyLVL], a ld a, WEEDLE - ld [W_CUROPPONENT], a + ld [wCurOpponent], a ld a, $2 - ld [W_VIRIDIANCITYCURSCRIPT], a + ld [wViridianCityCurScript], a ret -ViridianCityScript2: ; 1908f (6:508f) +ViridianCityScript2: ld a, [$ffeb] ld [wSpriteStateData1 + $34], a ld a, [$ffec] @@ -98,36 +95,36 @@ ViridianCityScript2: ; 1908f (6:508f) xor a ld [wJoyIgnore], a ld a, $f - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [W_BATTLETYPE], a + ld [wBattleType], a ld [wJoyIgnore], a ld a, $0 - ld [W_VIRIDIANCITYCURSCRIPT], a + ld [wViridianCityCurScript], a ret -ViridianCityScript3: ; 190c1 (6:50c1) +ViridianCityScript3: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 ld a, 0 - ld [W_VIRIDIANCITYCURSCRIPT], a + ld [wViridianCityCurScript], a ret -ViridianCityScript_190cf: ; 190cf (6:50cf) +ViridianCityScript_190cf: call StartSimulatingJoypadStates ld a, $1 ld [wSimulatedJoypadStatesIndex], a - ld a, $80 + ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a xor a ld [wSpriteStateData1 + 9], a ld [wJoyIgnore], a ret -ViridianCityTextPointers: ; 190e4 (6:50e4) +ViridianCityTextPointers: dw ViridianCityText1 dw ViridianCityText2 dw ViridianCityText3 @@ -144,190 +141,187 @@ ViridianCityTextPointers: ; 190e4 (6:50e4) dw ViridianCityText14 dw ViridianCityText15 -ViridianCityText1: ; 19102 (6:5102) +ViridianCityText1: TX_FAR _ViridianCityText1 db "@" -ViridianCityText2: ; 19107 (6:5107) - db $08 ; asm - ld a, [W_OBTAINEDBADGES] +ViridianCityText2: + TX_ASM + ld a, [wObtainedBadges] cp %01111111 ld hl, ViridianCityText_19127 - jr z, .asm_ae9fe ; 0x19110 - ld a, [wd751] - bit 1, a - jr nz, .asm_ae9fe ; 0x19117 + jr z, .asm_ae9fe + CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI + jr nz, .asm_ae9fe ld hl, ViridianCityText_19122 -.asm_ae9fe ; 0x1911c +.asm_ae9fe call PrintText jp TextScriptEnd -ViridianCityText_19122: ; 19122 (6:5122) +ViridianCityText_19122: TX_FAR _ViridianCityText_19122 db "@" -ViridianCityText_19127: ; 19127 (6:5127) +ViridianCityText_19127: TX_FAR _ViridianCityText_19127 db "@" -ViridianCityText3: ; 1912c (6:512c) - db $08 ; asm +ViridianCityText3: + 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) +ViridianCityText_1914d: TX_FAR _ViridianCityText_1914d db "@" -ViridianCityText_19152: ; 19152 (6:5152) +ViridianCityText_19152: TX_FAR _ViridianCityText_19152 db "@" -ViridianCityText_19157: ; 19157 (6:5157) +ViridianCityText_19157: TX_FAR _ViridianCityText_19157 db "@" -ViridianCityText4: ; 1915c (6:515c) - db $08 ; asm - ld a, [wd74b] - bit 5, a - jr nz, .asm_83894 ; 0x19162 +ViridianCityText4: + TX_ASM + CheckEvent EVENT_GOT_POKEDEX + 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) +ViridianCityText_19175: TX_FAR _ViridianCityText_19175 db "@" -ViridianCityText_1917a: ; 1917a (6:517a) +ViridianCityText_1917a: TX_FAR _ViridianCityText_1917a db "@" -ViridianCityText5: ; 1917f (6:517f) - db $08 ; asm +ViridianCityText5: + TX_ASM ld hl, ViridianCityText_19191 call PrintText call ViridianCityScript_190cf ld a, $3 - ld [W_VIRIDIANCITYCURSCRIPT], a + ld [wViridianCityCurScript], a jp TextScriptEnd -ViridianCityText_19191: ; 19191 (6:5191) +ViridianCityText_19191: TX_FAR _ViridianCityText_19191 db "@" -ViridianCityText6: ; 19196 (6:5196) - db $08 ; asm - ld a, [wd74c] - bit 1, a - jr nz, .asm_4e5a0 ; 0x1919c +ViridianCityText6: + TX_ASM + CheckEvent EVENT_GOT_TM42 + jr nz, .asm_4e5a0 ld hl, ViridianCityText_191ca call PrintText - ld bc, (TM_42 << 8) | 1 + lb bc, TM_42, 1 call GiveItem jr nc, .BagFull ld hl, ReceivedTM42Text call PrintText - ld hl, wd74c - set 1, [hl] - jr .asm_3c73c ; 0x191b7 + SetEvent EVENT_GOT_TM42 + 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) +ViridianCityText_191ca: TX_FAR _ViridianCityText_191ca db "@" -ReceivedTM42Text: ; 191cf (6:51cf) +ReceivedTM42Text: TX_FAR _ReceivedTM42Text - db $10, "@" + TX_SFX_ITEM_2 + db "@" -TM42Explanation: ; 191d5 (6:51d5) +TM42Explanation: TX_FAR _TM42Explanation db "@" -TM42NoRoomText: ; 191da (6:51da) +TM42NoRoomText: TX_FAR _TM42NoRoomText db "@" -ViridianCityText7: ; 191df (6:51df) - db $08 ; asm +ViridianCityText7: + 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 + ld [wViridianCityCurScript], a + jr .asm_2413a +.asm_42f68 ld hl, ViridianCityText_19214 call PrintText -.asm_2413a ; 0x19207 +.asm_2413a jp TextScriptEnd -ViridianCityText_1920a: ; 1920a (6:520a) +ViridianCityText_1920a: TX_FAR _ViridianCityText_1920a db "@" -ViridianCityText_1920f: ; 1920f (6:520f) +ViridianCityText_1920f: TX_FAR _ViridianCityText_1920f db "@" -ViridianCityText_19214: ; 19214 (6:5214) +ViridianCityText_19214: TX_FAR _ViridianCityText_19214 db "@" -ViridianCityText15: ; 19219 (6:5219) +ViridianCityText15: TX_FAR _ViridianCityText_19219 db "@" -ViridianCityText8: ; 1921e (6:521e) +ViridianCityText8: TX_FAR _ViridianCityText8 db "@" -ViridianCityText9: ; 19223 (6:5223) +ViridianCityText9: TX_FAR _ViridianCityText9 db "@" -ViridianCityText10: ; 19228 (6:5228) +ViridianCityText10: TX_FAR _ViridianCityText10 db "@" -ViridianCityText13: ; 1922d (6:522d) +ViridianCityText13: TX_FAR _ViridianCityText13 db "@" -ViridianCityText14: ; 19232 (6:5232) +ViridianCityText14: TX_FAR _ViridianCityText14 db "@" diff --git a/scripts/viridianforest.asm b/scripts/viridianforest.asm index 4ec1c0aa..bce093a9 100755 --- a/scripts/viridianforest.asm +++ b/scripts/viridianforest.asm @@ -1,25 +1,25 @@ -ViridianForestScript: ; 6110d (18:510d) +ViridianForestScript: call EnableAutoTextBoxDrawing - ld hl, ViridianForestTrainerHeaders + ld hl, ViridianForestTrainerHeader0 ld de, ViridianForestScriptPointers - ld a, [W_VIRIDIANFORESTCURSCRIPT] + ld a, [wViridianForestCurScript] call ExecuteCurMapScriptInTable - ld [W_VIRIDIANFORESTCURSCRIPT], a + ld [wViridianForestCurScript], a ret -ViridianForestScriptPointers: ; 61120 (18:5120) +ViridianForestScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle -ViridianForestTextPointers: ; 61126 (18:5126) +ViridianForestTextPointers: dw ViridianForestText1 dw ViridianForestText2 dw ViridianForestText3 dw ViridianForestText4 - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw ViridianForestText8 dw ViridianForestText9 dw ViridianForestText10 @@ -28,118 +28,117 @@ ViridianForestTextPointers: ; 61126 (18:5126) dw ViridianForestText13 dw ViridianForestText14 -ViridianForestTrainerHeaders: ; 61142 (18:5142) -ViridianForestTrainerHeader0: ; 61142 (18:5142) - db $2 ; flag's bit +ViridianForestTrainerHeader0: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0 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 - -ViridianForestTrainerHeader1: ; 6114e (18:514e) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0 + dw ViridianForestBattleText1 ; TextBeforeBattle + dw ViridianForestAfterBattleText1 ; TextAfterBattle + dw ViridianForestEndBattleText1 ; TextEndBattle + dw ViridianForestEndBattleText1 ; TextEndBattle + +ViridianForestTrainerHeader1: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1 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 - -ViridianForestTrainerHeader2: ; 6115a (18:515a) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1 + dw ViridianForestBattleText2 ; TextBeforeBattle + dw ViridianForestAfterBattleText2 ; TextAfterBattle + dw ViridianForestEndBattleText2 ; TextEndBattle + dw ViridianForestEndBattleText2 ; TextEndBattle + +ViridianForestTrainerHeader2: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2 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 + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2 + dw ViridianForestBattleText3 ; TextBeforeBattle + dw ViridianForestAfterBattleText3 ; TextAfterBattle + dw ViridianForestEndBattleText3 ; TextEndBattle + dw ViridianForestEndBattleText3 ; TextEndBattle db $ff -ViridianForestText1: ; 61167 (18:5167) +ViridianForestText1: TX_FAR _ViridianForestText1 db "@" -ViridianForestText2: ; 6116c (18:516c) - db $08 ; asm +ViridianForestText2: + TX_ASM ld hl, ViridianForestTrainerHeader0 call TalkToTrainer jp TextScriptEnd -ViridianForestText3: ; 61176 (18:5176) - db $08 ; asm +ViridianForestText3: + TX_ASM ld hl, ViridianForestTrainerHeader1 call TalkToTrainer jp TextScriptEnd -ViridianForestText4: ; 61180 (18:5180) - db $08 ; asm +ViridianForestText4: + TX_ASM ld hl, ViridianForestTrainerHeader2 call TalkToTrainer jp TextScriptEnd -ViridianForestBattleText1: ; 6118a (18:518a) +ViridianForestBattleText1: TX_FAR _ViridianForestBattleText1 db "@" -ViridianForestEndBattleText1: ; 6118f (18:518f) +ViridianForestEndBattleText1: TX_FAR _ViridianForestEndBattleText1 db "@" -ViridianForestAfterBattleText1: ; 61194 (18:5194) +ViridianForestAfterBattleText1: TX_FAR _ViridianFrstAfterBattleText1 db "@" -ViridianForestBattleText2: ; 61199 (18:5199) +ViridianForestBattleText2: TX_FAR _ViridianForestBattleText2 db "@" -ViridianForestEndBattleText2: ; 6119e (18:519e) +ViridianForestEndBattleText2: TX_FAR _ViridianForestEndBattleText2 db "@" -ViridianForestAfterBattleText2: ; 611a3 (18:51a3) +ViridianForestAfterBattleText2: TX_FAR _ViridianFrstAfterBattleText2 db "@" -ViridianForestBattleText3: ; 611a8 (18:51a8) +ViridianForestBattleText3: TX_FAR _ViridianForestBattleText3 db "@" -ViridianForestEndBattleText3: ; 611ad (18:51ad) +ViridianForestEndBattleText3: TX_FAR _ViridianForestEndBattleText3 db "@" -ViridianForestAfterBattleText3: ; 611b2 (18:51b2) +ViridianForestAfterBattleText3: TX_FAR _ViridianFrstAfterBattleText3 db "@" -ViridianForestText8: ; 611b7 (18:51b7) +ViridianForestText8: TX_FAR _ViridianForestText8 db "@" -ViridianForestText9: ; 611bc (18:51bc) +ViridianForestText9: TX_FAR _ViridianForestText9 db "@" -ViridianForestText10: ; 611c1 (18:51c1) +ViridianForestText10: TX_FAR _ViridianForestText10 db "@" -ViridianForestText11: ; 611c6 (18:51c6) +ViridianForestText11: TX_FAR _ViridianForestText11 db "@" -ViridianForestText12: ; 611cb (18:51cb) +ViridianForestText12: TX_FAR _ViridianForestText12 db "@" -ViridianForestText13: ; 611d0 (18:51d0) +ViridianForestText13: TX_FAR _ViridianForestText13 db "@" -ViridianForestText14: ; 611d5 (18:51d5) +ViridianForestText14: TX_FAR _ViridianForestText14 db "@" diff --git a/scripts/viridianforestentrance.asm b/scripts/viridianforestentrance.asm index 14b6cf49..e24225ed 100755 --- a/scripts/viridianforestentrance.asm +++ b/scripts/viridianforestentrance.asm @@ -1,14 +1,14 @@ -ViridianForestEntranceScript: ; 5d65c (17:565c) +ViridianForestEntranceScript: jp EnableAutoTextBoxDrawing -ViridianForestEntranceTextPointers: ; 5d65f (17:565f) +ViridianForestEntranceTextPointers: dw ViridianForestEntranceText1 dw ViridianForestEntranceText2 -ViridianForestEntranceText1: ; 5d663 (17:5663) +ViridianForestEntranceText1: TX_FAR _ViridianForestEntranceText1 db "@" -ViridianForestEntranceText2: ; 5d668 (17:5668) +ViridianForestEntranceText2: TX_FAR _ViridianForestEntranceText2 db "@" diff --git a/scripts/viridianforestexit.asm b/scripts/viridianforestexit.asm index 0d4d4b29..af7a8523 100755 --- a/scripts/viridianforestexit.asm +++ b/scripts/viridianforestexit.asm @@ -1,14 +1,14 @@ -ViridianForestExitScript: ; 5d587 (17:5587) +ViridianForestExitScript: jp EnableAutoTextBoxDrawing -ViridianForestExitTextPointers: ; 5d58a (17:558a) +ViridianForestExitTextPointers: dw ViridianForestExitText1 dw ViridianForestExitText2 -ViridianForestExitText1: ; 5d58e (17:558e) +ViridianForestExitText1: TX_FAR _ViridianForestExitText1 db "@" -ViridianForestExitText2: ; 5d593 (17:5593) +ViridianForestExitText2: TX_FAR _ViridianForestExitText2 db "@" diff --git a/scripts/viridiangym.asm b/scripts/viridiangym.asm index 6ced7d82..cc8dcb90 100755 --- a/scripts/viridiangym.asm +++ b/scripts/viridiangym.asm @@ -1,38 +1,38 @@ -ViridianGymScript: ; 748a3 (1d:48a3) +ViridianGymScript: ld hl, Gym8CityName ld de, Gym8LeaderName call LoadGymLeaderAndCityName call EnableAutoTextBoxDrawing - ld hl, ViridianGymTrainerHeaders + ld hl, ViridianGymTrainerHeader0 ld de, ViridianGymScriptPointers - ld a, [W_VIRIDIANGYMCURSCRIPT] + ld a, [wViridianGymCurScript] call ExecuteCurMapScriptInTable - ld [W_VIRIDIANGYMCURSCRIPT], a + ld [wViridianGymCurScript], a ret -Gym8CityName: ; 748bf (1d:48bf) +Gym8CityName: db "VIRIDIAN CITY@" -Gym8LeaderName: ; 748cd (1d:48cd) +Gym8LeaderName: db "GIOVANNI@" -ViridianGymScript_748d6: ; 748d6 (1d:48d6) +ViridianGymScript_748d6: xor a ld [wJoyIgnore], a - ld [W_VIRIDIANGYMCURSCRIPT], a - ld [W_CURMAPSCRIPT], a + ld [wViridianGymCurScript], a + ld [wCurMapScript], a ret -ViridianGymScriptPointers: ; 748e1 (1d:48e1) +ViridianGymScriptPointers: dw ViridianGymScript0 dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw ViridianGymScript3 dw ViridianGymScript4 -ViridianGymScript0: ; 748eb (1d:48eb) - ld a, [W_YCOORD] ; wd361 +ViridianGymScript0: + ld a, [wYCoord] ld b, a - ld a, [W_XCOORD] ; wd362 + ld a, [wXCoord] ld c, a ld hl, ViridianGymArrowTilePlayerMovement call DecodeArrowMovementRLE @@ -41,18 +41,18 @@ ViridianGymScript0: ; 748eb (1d:48eb) call StartSimulatingJoypadStates ld hl, wd736 set 7, [hl] - ld a, (SFX_02_52 - SFX_Headers_02) / 3 + ld a, SFX_ARROW_TILES call PlaySound ld a, $ff ld [wJoyIgnore], a ld a, $4 - ld [W_CURMAPSCRIPT], a + ld [wCurMapScript], a ret ;format: ;db y,x ;dw pointer to movement -ViridianGymArrowTilePlayerMovement: ; 74916 (1d:4916) +ViridianGymArrowTilePlayerMovement: db $b,$13 dw ViridianGymArrowMovement1 db $1,$13 @@ -80,47 +80,43 @@ ViridianGymArrowTilePlayerMovement: ; 74916 (1d:4916) db $FF ;format: direction, count -;right: $10 -;left: $20 -;up: $40 -;down: $80 -ViridianGymArrowMovement1: ; 74947 (1d:4947) - db $40,$09,$FF +ViridianGymArrowMovement1: + db D_UP,$09,$FF -ViridianGymArrowMovement2: ; 7494a (1d:494a) - db $20,$08,$FF +ViridianGymArrowMovement2: + db D_LEFT,$08,$FF -ViridianGymArrowMovement3: ; 7494d (1d:494d) - db $80,$09,$FF +ViridianGymArrowMovement3: + db D_DOWN,$09,$FF -ViridianGymArrowMovement4: ; 74950 (1d:4950) - db $10,$06,$FF +ViridianGymArrowMovement4: + db D_RIGHT,$06,$FF -ViridianGymArrowMovement5: ; 74953 (1d:4953) - db $80,$02,$FF +ViridianGymArrowMovement5: + db D_DOWN,$02,$FF -ViridianGymArrowMovement6: ; 74956 (1d:4956) - db $80,$07,$FF +ViridianGymArrowMovement6: + db D_DOWN,$07,$FF -ViridianGymArrowMovement7: ; 74959 (1d:4959) - db $10,$08,$FF +ViridianGymArrowMovement7: + db D_RIGHT,$08,$FF -ViridianGymArrowMovement8: ; 7495c (1d:495c) - db $10,$09,$FF +ViridianGymArrowMovement8: + db D_RIGHT,$09,$FF -ViridianGymArrowMovement9: ; 7495f (1d:495f) - db $40,$08,$FF +ViridianGymArrowMovement9: + db D_UP,$08,$FF -ViridianGymArrowMovement10: ; 74962 (1d:4962) - db $40,$06,$FF +ViridianGymArrowMovement10: + db D_UP,$06,$FF -ViridianGymArrowMovement11: ; 74965 (1d:4965) - db $20,$06,$FF +ViridianGymArrowMovement11: + db D_LEFT,$06,$FF -ViridianGymArrowMovement12: ; 74968 (1d:4968) - db $20,$0C,$FF +ViridianGymArrowMovement12: + db D_LEFT,$0C,$FF -ViridianGymScript4: ; 7496b (1d:496b) +ViridianGymScript4: ld a, [wSimulatedJoypadStatesIndex] and a jr nz, .asm_74980 @@ -129,61 +125,50 @@ ViridianGymScript4: ; 7496b (1d:496b) ld hl, wd736 res 7, [hl] ld a, $0 - ld [W_CURMAPSCRIPT], a + ld [wCurMapScript], a ret .asm_74980 - ld b, BANK(LoadSpinnerArrowTiles) - ld hl, LoadSpinnerArrowTiles - jp Bankswitch + jpba LoadSpinnerArrowTiles -ViridianGymScript3: ; 74988 (1d:4988) - ld a, [W_ISINBATTLE] ; W_ISINBATTLE +ViridianGymScript3: + ld a, [wIsInBattle] cp $ff jp z, ViridianGymScript_748d6 ld a, $f0 ld [wJoyIgnore], a -ViridianGymScript3_74995: ; 74995 (1d:4995) +ViridianGymScript3_74995: ld a, $c - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd751 - set 1, [hl] - ld bc, (TM_27 << 8) | 1 + SetEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI + lb bc, TM_27, 1 call GiveItem jr nc, .BagFull ld a, $d - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd751 - set 0, [hl] + SetEvent EVENT_GOT_TM27 jr .asm_749be .BagFull ld a, $e - ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_749be - ld hl, W_OBTAINEDBADGES + ld hl, wObtainedBadges set 7, [hl] - ld hl, wd72a + ld hl, wBeatGymFlags set 7, [hl] ; deactivate gym trainers - ld a, [wd751] - or %11111100 - ld [wd751], a - ld a, [wd752] - or %00000011 - ld [wd752], a + SetEventRange EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0, EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7 ld a, HS_ROUTE_22_RIVAL_2 - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject - ld hl, wd7eb - set 1, [hl] - set 7, [hl] + SetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE jp ViridianGymScript_748d6 -ViridianGymTextPointers: ; 749ec (1d:49ec) +ViridianGymTextPointers: dw ViridianGymText1 dw ViridianGymText2 dw ViridianGymText3 @@ -194,110 +179,108 @@ ViridianGymTextPointers: ; 749ec (1d:49ec) dw ViridianGymText8 dw ViridianGymText9 dw ViridianGymText10 - dw Predef5CText + dw PickUpItemText dw ViridianGymText12 dw ViridianGymText13 dw ViridianGymText14 -ViridianGymTrainerHeaders: ; 74a08 (1d:4a08) -ViridianGymTrainerHeader0: ; 74a08 (1d:4a08) - db $2 ; flag's bit +ViridianGymTrainerHeader0: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0 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 - -ViridianGymTrainerHeader1: ; 74a14 (1d:4a14) - db $3 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0 + dw ViridianGymBattleText1 ; TextBeforeBattle + dw ViridianGymAfterBattleText1 ; TextAfterBattle + dw ViridianGymEndBattleText1 ; TextEndBattle + dw ViridianGymEndBattleText1 ; TextEndBattle + +ViridianGymTrainerHeader1: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1 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 - -ViridianGymTrainerHeader2: ; 74a20 (1d:4a20) - db $4 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1 + dw ViridianGymBattleText2 ; TextBeforeBattle + dw ViridianGymAfterBattleText2 ; TextAfterBattle + dw ViridianGymEndBattleText2 ; TextEndBattle + dw ViridianGymEndBattleText2 ; TextEndBattle + +ViridianGymTrainerHeader2: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2 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 - -ViridianGymTrainerHeader3: ; 74a2c (1d:4a2c) - db $5 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2 + dw ViridianGymBattleText3 ; TextBeforeBattle + dw ViridianGymAfterBattleText3 ; TextAfterBattle + dw ViridianGymEndBattleText3 ; TextEndBattle + dw ViridianGymEndBattleText3 ; TextEndBattle + +ViridianGymTrainerHeader3: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3 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 - -ViridianGymTrainerHeader4: ; 74a38 (1d:4a38) - db $6 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3 + dw ViridianGymBattleText4 ; TextBeforeBattle + dw ViridianGymAfterBattleText4 ; TextAfterBattle + dw ViridianGymEndBattleText4 ; TextEndBattle + dw ViridianGymEndBattleText4 ; TextEndBattle + +ViridianGymTrainerHeader4: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4 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 - -ViridianGymTrainerHeader5: ; 74a44 (1d:4a44) - db $7 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4 + dw ViridianGymBattleText5 ; TextBeforeBattle + dw ViridianGymAfterBattleText5 ; TextAfterBattle + dw ViridianGymEndBattleText5 ; TextEndBattle + dw ViridianGymEndBattleText5 ; TextEndBattle + +ViridianGymTrainerHeader5: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5 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 - -ViridianGymTrainerHeader6: ; 74a50 (1d:4a50) - db $8 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5 + dw ViridianGymBattleText6 ; TextBeforeBattle + dw ViridianGymAfterBattleText6 ; TextAfterBattle + dw ViridianGymEndBattleText6 ; TextEndBattle + dw ViridianGymEndBattleText6 ; TextEndBattle + +ViridianGymTrainerHeader6: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 1 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 - -ViridianGymTrainerHeader7: ; 74a5c (1d:4a5c) - db $9 ; flag's bit + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 1 + dw ViridianGymBattleText7 ; TextBeforeBattle + dw ViridianGymAfterBattleText7 ; TextAfterBattle + dw ViridianGymEndBattleText7 ; TextEndBattle + dw ViridianGymEndBattleText7 ; TextEndBattle + +ViridianGymTrainerHeader7: + dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 1 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 + dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 1 + dw ViridianGymBattleText8 ; TextBeforeBattle + dw ViridianGymAfterBattleText8 ; TextAfterBattle + dw ViridianGymEndBattleText8 ; TextEndBattle + dw ViridianGymEndBattleText8 ; TextEndBattle db $ff -ViridianGymText1: ; 74a69 (1d:4a69) - db $08 ; asm - ld a, [wd751] - bit 1, a - jr z, .asm_6de66 ; 0x74a6f - bit 0, a - jr nz, .asm_9fc95 ; 0x74a73 +ViridianGymText1: + TX_ASM + CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI + jr z, .asm_6de66 + CheckEventReuseA EVENT_GOT_TM27 + 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 call PrintText call GBFadeOutToBlack ld a, HS_VIRIDIAN_GYM_GIOVANNI - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject 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,207 +289,208 @@ 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 ld a, $8 - ld [W_GYMLEADERNO], a + ld [wGymLeaderNo], a ld a, $3 - ld [W_VIRIDIANGYMCURSCRIPT], a -.asm_6dff7 ; 0x74acb + ld [wViridianGymCurScript], a +.asm_6dff7 jp TextScriptEnd -ViridianGymText_74ace: ; 74ace (1d:4ace) +ViridianGymText_74ace: TX_FAR _ViridianGymText_74ace db "@" -ViridianGymText_74ad3: ; 74ad3 (1d:4ad3) +ViridianGymText_74ad3: TX_FAR _ViridianGymText_74ad3 - db $0b, "@" + TX_SFX_LEVEL_UP ; probably supposed to play SFX_GET_ITEM_1 but the wrong music bank is loaded + db "@" -ViridianGymText_74ad9: ; 74ad9 (1d:4ad9) +ViridianGymText_74ad9: TX_FAR _ViridianGymText_74ad9 - db $0d, "@" + TX_WAIT + db "@" -ViridianGymText12: ; 74adf (1d:4adf) +ViridianGymText12: TX_FAR _ViridianGymText12 db "@" -ViridianGymText13: ; 74ae4 (1d:4ae4) +ViridianGymText13: TX_FAR _ReceivedTM27Text - db $0b + TX_SFX_ITEM_1 -TM27ExplanationText: ; 74ae9 (1d:4ae9) +TM27ExplanationText: TX_FAR _TM27ExplanationText db "@" -ViridianGymText14: ; 74aee (1d:4aee) +ViridianGymText14: TX_FAR _TM27NoRoomText db "@" -ViridianGymText2: ; 74af3 (1d:4af3) - db $08 ; asm +ViridianGymText2: + TX_ASM ld hl, ViridianGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd -ViridianGymBattleText1: ; 74afd (1d:4afd) +ViridianGymBattleText1: TX_FAR _ViridianGymBattleText1 db "@" -ViridianGymEndBattleText1: ; 74b02 (1d:4b02) +ViridianGymEndBattleText1: TX_FAR _ViridianGymEndBattleText1 db "@" -ViridianGymAfterBattleText1: ; 74b07 (1d:4b07) +ViridianGymAfterBattleText1: TX_FAR _ViridianGymAfterBattleText1 db "@" -ViridianGymText3: ; 74b0c (1d:4b0c) - db $08 ; asm +ViridianGymText3: + TX_ASM ld hl, ViridianGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd -ViridianGymBattleText2: ; 74b16 (1d:4b16) +ViridianGymBattleText2: TX_FAR _ViridianGymBattleText2 db "@" -ViridianGymEndBattleText2: ; 74b1b (1d:4b1b) +ViridianGymEndBattleText2: TX_FAR _ViridianGymEndBattleText2 db "@" -ViridianGymAfterBattleText2: ; 74b20 (1d:4b20) +ViridianGymAfterBattleText2: TX_FAR _ViridianGymAfterBattleText2 db "@" -ViridianGymText4: ; 74b25 (1d:4b25) - db $08 ; asm +ViridianGymText4: + TX_ASM ld hl, ViridianGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd -ViridianGymBattleText3: ; 74b2f (1d:4b2f) +ViridianGymBattleText3: TX_FAR _ViridianGymBattleText3 db "@" -ViridianGymEndBattleText3: ; 74b34 (1d:4b34) +ViridianGymEndBattleText3: TX_FAR _ViridianGymEndBattleText3 db "@" -ViridianGymAfterBattleText3: ; 74b39 (1d:4b39) +ViridianGymAfterBattleText3: TX_FAR _ViridianGymAfterBattleText3 db "@" -ViridianGymText5: ; 74b3e (1d:4b3e) - db $08 ; asm +ViridianGymText5: + TX_ASM ld hl, ViridianGymTrainerHeader3 call TalkToTrainer jp TextScriptEnd -ViridianGymBattleText4: ; 74b48 (1d:4b48) +ViridianGymBattleText4: TX_FAR _ViridianGymBattleText4 db "@" -ViridianGymEndBattleText4: ; 74b4d (1d:4b4d) +ViridianGymEndBattleText4: TX_FAR _ViridianGymEndBattleText4 db "@" -ViridianGymAfterBattleText4: ; 74b52 (1d:4b52) +ViridianGymAfterBattleText4: TX_FAR _ViridianGymAfterBattleText4 db "@" -ViridianGymText6: ; 74b57 (1d:4b57) - db $08 ; asm +ViridianGymText6: + TX_ASM ld hl, ViridianGymTrainerHeader4 call TalkToTrainer jp TextScriptEnd -ViridianGymBattleText5: ; 74b61 (1d:4b61) +ViridianGymBattleText5: TX_FAR _ViridianGymBattleText5 db "@" -ViridianGymEndBattleText5: ; 74b66 (1d:4b66) +ViridianGymEndBattleText5: TX_FAR _ViridianGymEndBattleText5 db "@" -ViridianGymAfterBattleText5: ; 74b6b (1d:4b6b) +ViridianGymAfterBattleText5: TX_FAR _ViridianGymAfterBattleText5 db "@" -ViridianGymText7: ; 74b70 (1d:4b70) - db $08 ; asm +ViridianGymText7: + TX_ASM ld hl, ViridianGymTrainerHeader5 call TalkToTrainer jp TextScriptEnd -ViridianGymBattleText6: ; 74b7a (1d:4b7a) +ViridianGymBattleText6: TX_FAR _ViridianGymBattleText6 db "@" -ViridianGymEndBattleText6: ; 74b7f (1d:4b7f) +ViridianGymEndBattleText6: TX_FAR _ViridianGymEndBattleText6 db "@" -ViridianGymAfterBattleText6: ; 74b84 (1d:4b84) +ViridianGymAfterBattleText6: TX_FAR _ViridianGymAfterBattleText6 db "@" -ViridianGymText8: ; 74b89 (1d:4b89) - db $08 ; asm +ViridianGymText8: + TX_ASM ld hl, ViridianGymTrainerHeader6 call TalkToTrainer jp TextScriptEnd -ViridianGymBattleText7: ; 74b93 (1d:4b93) +ViridianGymBattleText7: TX_FAR _ViridianGymBattleText7 db "@" -ViridianGymEndBattleText7: ; 74b98 (1d:4b98) +ViridianGymEndBattleText7: TX_FAR _ViridianGymEndBattleText7 db "@" -ViridianGymAfterBattleText7: ; 74b9d (1d:4b9d) +ViridianGymAfterBattleText7: TX_FAR _ViridianGymAfterBattleText7 db "@" -ViridianGymText9: ; 74ba2 (1d:4ba2) - db $08 ; asm +ViridianGymText9: + TX_ASM ld hl, ViridianGymTrainerHeader7 call TalkToTrainer jp TextScriptEnd -ViridianGymBattleText8: ; 74bac (1d:4bac) +ViridianGymBattleText8: TX_FAR _ViridianGymBattleText8 db "@" -ViridianGymEndBattleText8: ; 74bb1 (1d:4bb1) +ViridianGymEndBattleText8: TX_FAR _ViridianGymEndBattleText8 db "@" -ViridianGymAfterBattleText8: ; 74bb6 (1d:4bb6) +ViridianGymAfterBattleText8: TX_FAR _ViridianGymAfterBattleText8 db "@" -ViridianGymText10: ; 74bbb (1d:4bbb) - db $08 ; asm - ld a, [wd751] - bit 1, a - jr nz, .asm_1abd1 ; 0x74bc1 +ViridianGymText10: + TX_ASM + CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI + 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) +ViridianGymText_74bd4: TX_FAR _ViridianGymText_74bd4 db "@" -ViridianGymText_74bd9: ; 74bd9 (1d:4bd9) +ViridianGymText_74bd9: TX_FAR _ViridianGymText_74bd9 db "@" diff --git a/scripts/viridianhouse.asm b/scripts/viridianhouse.asm index ab8b6786..105c8fb6 100755 --- a/scripts/viridianhouse.asm +++ b/scripts/viridianhouse.asm @@ -1,22 +1,22 @@ -ViridianHouseScript: ; 1d58a (7:558a) +ViridianHouseScript: jp EnableAutoTextBoxDrawing -ViridianHouseTextPointers: ; 1d58d (7:558d) +ViridianHouseTextPointers: dw ViridianHouseText1 dw ViridianHouseText2 dw ViridianHouseText3 dw ViridianHouseText4 -ViridianHouseText1: ; 1d595 (7:5595) +ViridianHouseText1: TX_FAR _ViridianHouseText1 db "@" -ViridianHouseText2: ; 1d59a (7:559a) +ViridianHouseText2: TX_FAR _ViridianHouseText2 db "@" -ViridianHouseText3: ; 1d59f (7:559f) - db $08 ; asm +ViridianHouseText3: + TX_ASM ld hl, ViridianHouseText_1d5b1 call PrintText ld a, SPEAROW @@ -24,10 +24,10 @@ ViridianHouseText3: ; 1d59f (7:559f) call WaitForSoundToFinish jp TextScriptEnd -ViridianHouseText_1d5b1: ; 1d5b1 (7:55b1) +ViridianHouseText_1d5b1: TX_FAR _ViridianHouseText_1d5b1 db "@" -ViridianHouseText4: ; 1d5b6 (7:55b6) +ViridianHouseText4: TX_FAR _ViridianHouseText4 db "@" diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index d33dfe81..451ab989 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -1,34 +1,33 @@ -ViridianMartScript: ; 1d46e (7:546e) +ViridianMartScript: call ViridianMartScript_1d47d call EnableAutoTextBoxDrawing ld hl, ViridianMartScriptPointers - ld a, [W_VIRIDIANMARKETCURSCRIPT] + ld a, [wViridianMarketCurScript] jp CallFunctionInTable -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 +ViridianMartScript_1d47d: + CheckEvent EVENT_OAK_GOT_PARCEL + 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 + ld [wMapTextPtr], a ld a, h - ld [W_MAPTEXTPTR+1], a + ld [wMapTextPtr+1], a ret -ViridianMartScriptPointers: ; 1d495 (7:5495) +ViridianMartScriptPointers: dw ViridianMartScript0 dw ViridianMartScript1 dw ViridianMartScript2 -ViridianMartScript0: ; 1d49b (7:549b) +ViridianMartScript0: call UpdateSprites ld a, $4 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wSimulatedJoypadStatesEnd ld de, RLEMovement1d4bb @@ -37,59 +36,58 @@ ViridianMartScript0: ; 1d49b (7:549b) ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $1 - ld [W_VIRIDIANMARKETCURSCRIPT], a + ld [wViridianMarketCurScript], a ret -RLEMovement1d4bb: ; 1d4bb (7:54bb) - db $20, $01 - db $40, $02 +RLEMovement1d4bb: + db D_LEFT, $01 + db D_UP, $02 db $ff -ViridianMartScript1: ; 1d4c0 (7:54c0) +ViridianMartScript1: ld a, [wSimulatedJoypadStatesIndex] and a ret nz call Delay3 ld a, $5 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID - ld bc, (OAKS_PARCEL << 8) + 1 + lb bc, OAKS_PARCEL, 1 call GiveItem - ld hl, wd74e - set 1, [hl] + SetEvent EVENT_GOT_OAKS_PARCEL ld a, $2 - ld [W_VIRIDIANMARKETCURSCRIPT], a + ld [wViridianMarketCurScript], a ; fallthrough -ViridianMartScript2: ; 1d4df (7:54df) +ViridianMartScript2: ret -ViridianMartTextPointers: ; 1d4e0 (7:54e0) +ViridianMartTextPointers: dw ViridianMartText1 dw ViridianMartText2 dw ViridianMartText3 dw ViridianMartText4 dw ViridianMartText5 - dw ViridianMartText6 + dw ViridianCashierText dw ViridianMartText2 dw ViridianMartText3 -ViridianMartText1: ; 1d4f0 (7:54f0) +ViridianMartText1: TX_FAR _ViridianMartText1 db "@" -ViridianMartText4: ; 1d4f5 (7:54f5) +ViridianMartText4: TX_FAR _ViridianMartText4 db "@" -ViridianMartText5: ; 1d4fa (7:54fa) +ViridianMartText5: TX_FAR ViridianMartParcelQuestText - db $11 + TX_SFX_KEY_ITEM db "@" -ViridianMartText2: ; 1d500 (7:5500) +ViridianMartText2: TX_FAR _ViridianMartText2 db "@" -ViridianMartText3: ; 1d505 (7:5505) +ViridianMartText3: TX_FAR _ViridianMartText3 db "@" diff --git a/scripts/viridianpokecenter.asm b/scripts/viridianpokecenter.asm index ae5e32c8..904ff47f 100755 --- a/scripts/viridianpokecenter.asm +++ b/scripts/viridianpokecenter.asm @@ -1,23 +1,23 @@ -ViridianPokeCenterScript: ; 4425d (11:425d) +ViridianPokeCenterScript: call Serial_TryEstablishingExternallyClockedConnection jp EnableAutoTextBoxDrawing -ViridianPokecenterTextPointers: ; 44263 (11:4263) - dw ViridianPokeCenterText1 +ViridianPokecenterTextPointers: + dw ViridianHealNurseText dw ViridianPokeCenterText2 dw ViridianPokeCenterText3 - dw ViridianPokeCenterText4 + dw ViridianTradeNurseText -ViridianPokeCenterText1: ; 4426b (11:426b) - db $ff +ViridianHealNurseText: + TX_POKECENTER_NURSE -ViridianPokeCenterText2: ; 4426c (11:426c) - TX_FAR _ViridianPokeCenterText1 +ViridianPokeCenterText2: + TX_FAR _ViridianPokeCenterText2 db "@" -ViridianPokeCenterText3: ; 44271 (11:4271) +ViridianPokeCenterText3: TX_FAR _ViridianPokeCenterText3 db "@" -ViridianPokeCenterText4: ; 44276 (11:4276) - db $f6 +ViridianTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST diff --git a/sram.asm b/sram.asm new file mode 100644 index 00000000..3b51df77 --- /dev/null +++ b/sram.asm @@ -0,0 +1,45 @@ +SECTION "Sprite Buffers", SRAM[$a000], BANK[0] + +sSpriteBuffer0:: ds SPRITEBUFFERSIZE ; a000 +sSpriteBuffer1:: ds SPRITEBUFFERSIZE ; a188 +sSpriteBuffer2:: ds SPRITEBUFFERSIZE ; a310 + + ds $100 + +sHallOfFame:: ds HOF_TEAM * HOF_TEAM_CAPACITY ; a598 + + +SECTION "Save Data", SRAM[$a000], BANK[1] + ds $598 + +sPlayerName:: ds NAME_LENGTH ; a598 +sMainData:: ds wMainDataEnd - wMainDataStart ; a5a3 +sSpriteData:: ds wSpriteDataEnd - wSpriteDataStart ; ad2c +sPartyData:: ds wPartyDataEnd - wPartyDataStart ; af2c +sCurBoxData:: ds wBoxDataEnd - wBoxDataStart ; b0c0 +sTilesetType:: ds 1 ; b522 +sMainDataCheckSum:: ds 1 ; b523 + + +SECTION "Saved Boxes 1", SRAM[$a000], BANK[2] + +sBox1:: ds wBoxDataEnd - wBoxDataStart ; a000 +sBox2:: ds wBoxDataEnd - wBoxDataStart ; a462 +sBox3:: ds wBoxDataEnd - wBoxDataStart ; a8c4 +sBox4:: ds wBoxDataEnd - wBoxDataStart ; ad26 +sBox5:: ds wBoxDataEnd - wBoxDataStart ; b188 +sBox6:: ds wBoxDataEnd - wBoxDataStart ; b5ea +sBank2AllBoxesChecksum:: ds 1 ; ba4c +sBank2IndividualBoxChecksums:: ds 6 ; ba4d + + +SECTION "Saved Boxes 2", SRAM[$a000], BANK[3] + +sBox7:: ds wBoxDataEnd - wBoxDataStart ; a000 +sBox8:: ds wBoxDataEnd - wBoxDataStart ; a462 +sBox9:: ds wBoxDataEnd - wBoxDataStart ; a8c4 +sBox10:: ds wBoxDataEnd - wBoxDataStart ; ad26 +sBox11:: ds wBoxDataEnd - wBoxDataStart ; b188 +sBox12:: ds wBoxDataEnd - wBoxDataStart ; b5ea +sBank3AllBoxesChecksum:: ds 1 ; ba4c +sBank3IndividualBoxChecksums:: ds 6 ; ba4d @@ -1,149 +1,150 @@ - +INCLUDE "charmap.asm" +INCLUDE "constants/text_constants.asm" TEXT_1 EQU $20 -TEXT_2 EQU $21 -TEXT_3 EQU $22 -TEXT_4 EQU $23 -TEXT_5 EQU $24 -TEXT_6 EQU $25 -TEXT_7 EQU $26 -TEXT_8 EQU $27 -TEXT_9 EQU $28 -TEXT_10 EQU $29 -TEXT_11 EQU $2a - -POKEDEX_TEXT EQU $2b -MOVE_NAMES EQU $2c +TEXT_2 EQU TEXT_1 + 1 +TEXT_3 EQU TEXT_2 + 1 +TEXT_4 EQU TEXT_3 + 1 +TEXT_5 EQU TEXT_4 + 1 +TEXT_6 EQU TEXT_5 + 1 +TEXT_7 EQU TEXT_6 + 1 +TEXT_8 EQU TEXT_7 + 1 +TEXT_9 EQU TEXT_8 + 1 +TEXT_10 EQU TEXT_9 + 1 +TEXT_11 EQU TEXT_10 + 1 + +POKEDEX_TEXT EQU TEXT_11 + 1 +MOVE_NAMES EQU POKEDEX_TEXT + 1 INCLUDE "macros.asm" +INCLUDE "hram.asm" +SECTION "Text 1", ROMX[$4000], BANK[TEXT_1] -SECTION "Text 1", ROMX, BANK[TEXT_1] - -_CardKeySuccessText1:: ; 80000 (20:4000) +_CardKeySuccessText1:: text "Bingo!@@" -_CardKeySuccessText2:: ; 80009 (20:4009) - db $0 +_CardKeySuccessText2:: + text "" line "The CARD KEY" cont "opened the door!" done -_CardKeyFailText:: ; 80029 (20:4029) +_CardKeyFailText:: text "Darn! It needs a" line "CARD KEY!" done -_TrainerNameText:: ; 80045 (20:4045) +_TrainerNameText:: TX_RAM wcd6d text ": @@" -_NoNibbleText:: ; 8004d (20:404d) +_NoNibbleText:: text "Not even a nibble!" prompt -_NothingHereText:: ; 80061 (20:4061) +_NothingHereText:: text "Looks like there's" line "nothing here." prompt -_ItsABiteText:: ; 80082 (20:4082) +_ItsABiteText:: text "Oh!" line "It's a bite!" prompt -_ExclamationText:: ; 80093 (20:4093) +_ExclamationText:: text "!" done -_GroundRoseText:: ; 80096 (20:4096) +_GroundRoseText:: text "Ground rose up" line "somewhere!" done -_BoulderText:: ; 800b1 (20:40b1) +_BoulderText:: text "This requires" line "STRENGTH to move!" done -_MartSignText:: ; 800d2 (20:40d2) +_MartSignText:: text "All your item" line "needs fulfilled!" cont "#MON MART" done -_PokeCenterSignText:: ; 800fc (20:40fc) +_PokeCenterSignText:: text "Heal Your #MON!" line "#MON CENTER" done -_FoundItemText:: ; 80119 (20:4119) - text $52, " found" +_FoundItemText:: + text "<PLAYER> found" line "@" TX_RAM wcf4b text "!@@" -_NoMoreRoomForItemText:: ; 8012a (20:412a) +_NoMoreRoomForItemText:: text "No more room for" line "items!" done -_OaksAideHiText:: ; 80143 (20:4143) +_OaksAideHiText:: text "Hi! Remember me?" line "I'm PROF.OAK's" cont "AIDE!" para "If you caught @" - TX_NUM $ffdb, 1, 3 - db $0 + TX_NUM hOaksAideRequirement, 1, 3 + text "" line "kinds of #MON," cont "I'm supposed to" cont "give you an" cont "@" - TX_RAM wcc5b + TX_RAM wOaksAideRewardItemName text "!" - para "So, ", $52, "! Have" + para "So, <PLAYER>! Have" line "you caught at" cont "least @" - TX_NUM $ffdb, 1, 3 + TX_NUM hOaksAideRequirement, 1, 3 text " kinds of" cont "#MON?" done -_OaksAideUhOhText:: ; 801e4 (20:41e4) +_OaksAideUhOhText:: text "Let's see..." line "Uh-oh! You have" cont "caught only @" - TX_NUM $ffdd, 1, 3 - db $0 + TX_NUM hOaksAideNumMonsOwned, 1, 3 + text "" cont "kinds of #MON!" para "You need @" - TX_NUM $ffdb, 1, 3 + TX_NUM hOaksAideRequirement, 1, 3 text " kinds" line "if you want the" cont "@" - TX_RAM wcc5b + TX_RAM wOaksAideRewardItemName text "." done -_OaksAideComeBackText:: ; 80250 (20:4250) +_OaksAideComeBackText:: text "Oh. I see." para "When you get @" - TX_NUM $ffdb, 1, 3 - db $0 + TX_NUM hOaksAideRequirement, 1, 3 + text "" line "kinds, come back" cont "for @" - TX_RAM wcc5b + TX_RAM wOaksAideRewardItemName text "." done -_OaksAideHereYouGoText:: ; 8028c (20:428c) +_OaksAideHereYouGoText:: text "Great! You have" line "caught @" - TX_NUM $ffdd, 1, 3 + TX_NUM hOaksAideNumMonsOwned, 1, 3 text " kinds " cont "of #MON!" cont "Congratulations!" @@ -151,28 +152,21 @@ _OaksAideHereYouGoText:: ; 8028c (20:428c) para "Here you go!" prompt -_OaksAideGotItemText:: ; 802d9 (20:42d9) - text $52, " got the" +_OaksAideGotItemText:: + text "<PLAYER> got the" line "@" - TX_RAM wcc5b + TX_RAM wOaksAideRewardItemName text "!@@" -_OaksAideNoRoomText:: ; 802ec (20:42ec) +_OaksAideNoRoomText:: text "Oh! I see you" line "don't have any" cont "room for the" cont "@" - TX_RAM wcc5b + TX_RAM wOaksAideRewardItemName text "." done -IF DEF(_YELLOW) -_NurseChanseyText:: - text "CHANSEY: Chaaan" - line "sey!" - done -ENDC - INCLUDE "text/maps/viridian_forest.asm" INCLUDE "text/maps/mt_moon_1f.asm" INCLUDE "text/maps/mt_moon_b1f.asm" @@ -180,7 +174,6 @@ INCLUDE "text/maps/mt_moon_b2f.asm" INCLUDE "text/maps/ss_anne_1.asm" INCLUDE "text/maps/ss_anne_2.asm" INCLUDE "text/maps/ss_anne_3.asm" -INCLUDE "text/maps/ss_anne_4.asm" INCLUDE "text/maps/ss_anne_5.asm" INCLUDE "text/maps/ss_anne_6.asm" INCLUDE "text/maps/ss_anne_7.asm" @@ -199,7 +192,7 @@ INCLUDE "text/maps/silph_co_4f.asm" INCLUDE "text/maps/silph_co_5f_1.asm" -SECTION "Text 2", ROMX, BANK[TEXT_2] +SECTION "Text 2", ROMX[$4000], BANK[TEXT_2] INCLUDE "text/maps/silph_co_5f_2.asm" INCLUDE "text/maps/silph_co_6f.asm" @@ -220,8 +213,6 @@ INCLUDE "text/maps/safari_zone_secret_house.asm" INCLUDE "text/maps/safari_zone_rest_house_2.asm" INCLUDE "text/maps/safari_zone_rest_house_3.asm" INCLUDE "text/maps/safari_zone_rest_house_4.asm" -INCLUDE "text/maps/unknown_dungeon_1f.asm" -INCLUDE "text/maps/unknown_dungeon_2f.asm" INCLUDE "text/maps/unknown_dungeon_b1f.asm" INCLUDE "text/maps/victory_road_1f.asm" INCLUDE "text/maps/lance.asm" @@ -233,179 +224,175 @@ INCLUDE "text/maps/agatha.asm" INCLUDE "text/maps/rock_tunnel_b2f_1.asm" -SECTION "Text 3", ROMX, BANK[TEXT_3] +SECTION "Text 3", ROMX[$4000], BANK[TEXT_3] INCLUDE "text/maps/rock_tunnel_b2f_2.asm" -INCLUDE "text/maps/seafoam_islands_1f.asm" -INCLUDE "text/maps/seafoam_islands_b1f.asm" -INCLUDE "text/maps/seafoam_islands_b2f.asm" -INCLUDE "text/maps/seafoam_islands_b3f.asm" INCLUDE "text/maps/seafoam_islands_b4f.asm" -_AIBattleWithdrawText:: ; 880be (22:40be) - TX_RAM W_TRAINERNAME +_AIBattleWithdrawText:: + TX_RAM wTrainerName text " with-" line "drew @" TX_RAM wEnemyMonNick text "!" prompt -_AIBattleUseItemText:: ; 880d5 (22:40d5) - TX_RAM W_TRAINERNAME - db $0 +_AIBattleUseItemText:: + TX_RAM wTrainerName + text "" line "used @" TX_RAM wcd6d - db $0 + text "" cont "on @" TX_RAM wEnemyMonNick text "!" prompt -_TradeWentToText:: ; 880ef (22:40ef) +_TradeWentToText:: TX_RAM wcf4b text " went" line "to @" - TX_RAM W_GRASSRATE + TX_RAM wGrassRate text "." done -_TradeForText:: ; 88103 (22:4103) - text "For ", $52, "'s" +_TradeForText:: + text "For <PLAYER>'s" line "@" TX_RAM wcf4b text "," done -_TradeSendsText:: ; 88112 (22:4112) - TX_RAM W_GRASSRATE +_TradeSendsText:: + TX_RAM wGrassRate text " sends" line "@" TX_RAM wcd6d text "." done -_TradeWavesFarewellText:: ; 88124 (22:4124) - TX_RAM W_GRASSRATE +_TradeWavesFarewellText:: + TX_RAM wGrassRate text " waves" line "farewell as" done -_TradeTransferredText:: ; 8813b (22:413b) +_TradeTransferredText:: TX_RAM wcd6d text " is" line "transferred." done -_TradeTakeCareText:: ; 88150 (22:4150) +_TradeTakeCareText:: text "Take good care of" line "@" TX_RAM wcd6d text "." done -_TradeWillTradeText:: ; 8816a (22:416a) - TX_RAM W_GRASSRATE +_TradeWillTradeText:: + TX_RAM wGrassRate text " will" line "trade @" TX_RAM wcd6d - db $0 + text "" done -_TradeforText:: ; 88180 (22:4180) - text "for ", $52, "'s" +_TradeforText:: + text "for <PLAYER>'s" line "@" TX_RAM wcf4b text "." done -_PlaySlotMachineText:: ; 8818f (22:418f) +_PlaySlotMachineText:: text "A slot machine!" line "Want to play?" done -_OutOfCoinsSlotMachineText:: ; 881ae (22:41ae) +_OutOfCoinsSlotMachineText:: text "Darn!" line "Ran out of coins!" done -_BetHowManySlotMachineText:: ; 881c7 (22:41c7) +_BetHowManySlotMachineText:: text "Bet how many" line "coins?" done -_StartSlotMachineText:: ; 881dc (22:41dc) +_StartSlotMachineText:: text "Start!" done -_NotEnoughCoinsSlotMachineText:: ; 881e4 (22:41e4) +_NotEnoughCoinsSlotMachineText:: text "Not enough" line "coins!" prompt -_OneMoreGoSlotMachineText:: ; 881f7 (22:41f7) +_OneMoreGoSlotMachineText:: text "One more " line "go?" done -_LinedUpText:: ; 88206 (22:4206) +_LinedUpText:: text " lined up!" line "Scored @" TX_RAM wcf4b text " coins!" done -_NotThisTimeText:: ; 88226 (22:4226) +_NotThisTimeText:: text "Not this time!" prompt -_YeahText:: ; 88236 (22:4236) +_YeahText:: text "Yeah!@@" -_DexSeenOwnedText:: ; 8823e (22:423e) +_DexSeenOwnedText:: text "#DEX Seen:@" - TX_NUM wcc5b, 1, 3 - db $0 + TX_NUM wDexRatingNumMonsSeen, 1, 3 + text "" line " Owned:@" - TX_NUM wcc5c, 1, 3 + TX_NUM wDexRatingNumMonsOwned, 1, 3 db "@" -_DexRatingText:: ; 88267 (22:4267) +_DexRatingText:: text "#DEX Rating", $6d done -_GymStatueText1:: ; 88275 (22:4275) +_GymStatueText1:: TX_RAM wGymCityName - db $0 + text "" line "#MON GYM" cont "LEADER: @" TX_RAM wGymLeaderName - db $0 + text "" para "WINNING TRAINERS:" - line $53 + line "<RIVAL>" done -_GymStatueText2:: ; 882a5 (22:42a5) +_GymStatueText2:: TX_RAM wGymCityName - db $0 + text "" line "#MON GYM" cont "LEADER: @" TX_RAM wGymLeaderName - db $0 + text "" para "WINNING TRAINERS:" - line $53 - cont $52 + line "<RIVAL>" + cont "<PLAYER>" done -_ViridianCityPokecenterGuyText:: ; 882d7 (22:42d7) +_ViridianCityPokecenterGuyText:: text "#MON CENTERs" line "heal your tired," cont "hurt or fainted" cont "#MON!" done -_PewterCityPokecenterGuyText:: ; 8830c (22:430c) +_PewterCityPokecenterGuyText:: text "Yawn!" para "When JIGGLYPUFF" @@ -416,7 +403,7 @@ _PewterCityPokecenterGuyText:: ; 8830c (22:430c) line "Snore..." done -_CeruleanPokecenterGuyText:: ; 88353 (22:4353) +_CeruleanPokecenterGuyText:: text "BILL has lots of" line "#MON!" @@ -424,7 +411,7 @@ _CeruleanPokecenterGuyText:: ; 88353 (22:4353) line "ones too!" done -_LavenderPokecenterGuyText:: ; 88386 (22:4386) +_LavenderPokecenterGuyText:: text "CUBONEs wear" line "skulls, right?" @@ -432,36 +419,36 @@ _LavenderPokecenterGuyText:: ; 88386 (22:4386) line "lot for one!" done -_MtMoonPokecenterBenchGuyText:: ; 883c2 (22:43c2) +_MtMoonPokecenterBenchGuyText:: text "If you have too" line "many #MON, you" cont "should store them" cont "via PC!" done -_RockTunnelPokecenterGuyText:: ; 883fc (22:43fc) +_RockTunnelPokecenterGuyText:: text "I heard that" line "GHOSTs haunt" cont "LAVENDER TOWN!" done -_UnusedBenchGuyText1:: ; 88426 (22:4426) +_UnusedBenchGuyText1:: text "I wish I could" line "catch #MON." done -_UnusedBenchGuyText2:: ; 88442 (22:4442) +_UnusedBenchGuyText2:: text "I'm tired from" line "all the fun..." done -_UnusedBenchGuyText3:: ; 88460 (22:4460) +_UnusedBenchGuyText3:: text "SILPH's manager" line "is hiding in the" cont "SAFARI ZONE." done -_VermilionPokecenterGuyText:: ; 8848e (22:448e) +_VermilionPokecenterGuyText:: text "It is true that a" line "higher level" cont "#MON will be" @@ -477,13 +464,13 @@ _VermilionPokecenterGuyText:: ; 8848e (22:448e) cont "strong #MON." done -_CeladonCityPokecenterGuyText:: ; 88531 (22:4531) +_CeladonCityPokecenterGuyText:: text "If I had a BIKE," line "I would go to" cont "CYCLING ROAD!" done -_FuchsiaCityPokecenterGuyText:: ; 8855f (22:455f) +_FuchsiaCityPokecenterGuyText:: text "If you're studying " line "#MON, visit" cont "the SAFARI ZONE." @@ -492,7 +479,7 @@ _FuchsiaCityPokecenterGuyText:: ; 8855f (22:455f) line "of rare #MON." done -_CinnabarPokecenterGuyText:: ; 885af (22:45af) +_CinnabarPokecenterGuyText:: text "#MON can still" line "learn techniques" cont "after canceling" @@ -503,65 +490,65 @@ _CinnabarPokecenterGuyText:: ; 885af (22:45af) cont "have been learned." done -_SaffronCityPokecenterGuyText1:: ; 88621 (22:4621) +_SaffronCityPokecenterGuyText1:: text "It would be great" line "if the ELITE FOUR" cont "came and stomped" cont "TEAM ROCKET!" done -_SaffronCityPokecenterGuyText2:: ; 88664 (22:4664) +_SaffronCityPokecenterGuyText2:: text "TEAM ROCKET took" line "off! We can go" cont "out safely again!" cont "That's great!" done -_CeladonCityHotelText:: ; 886a4 (22:46a4) +_CeladonCityHotelText:: text "My sis brought me" line "on this vacation!" done -_BookcaseText:: ; 886c9 (22:46c9) +_BookcaseText:: text "Crammed full of" line "#MON books!" done -_NewBicycleText:: ; 886e6 (22:46e6) +_NewBicycleText:: text "A shiny new" line "BICYCLE!" done -_PushStartText:: ; 886fc (22:46fc) +_PushStartText:: text "Push START to" line "open the MENU!" done -_SaveOptionText:: ; 8871a (22:471a) +_SaveOptionText:: text "The SAVE option is" line "on the MENU" cont "screen." done -_StrengthsAndWeaknessesText:: ; 88742 (22:4742) +_StrengthsAndWeaknessesText:: text "All #MON types" line "have strong and" cont "weak points" cont "against others." done -_TimesUpText:: ; 8877e (22:477e) +_TimesUpText:: text "PA: Ding-dong!" para "Time's up!" prompt -_GameOverText:: ; 88798 (22:4798) +_GameOverText:: text "PA: Your SAFARI" line "GAME is over!" done -_CinnabarGymQuizIntroText:: ; 887b7 (22:47b7) +_CinnabarGymQuizIntroText:: text "#MON Quiz!" para "Get it right and" @@ -580,58 +567,52 @@ _CinnabarGymQuizIntroText:: ; 887b7 (22:47b7) line "Here we go!" prompt -IF DEF(_YELLOW) - text "#MON Quiz!" - line "Test your skill!" - done -ENDC - -_CinnabarQuizQuestionsText1:: ; 8886d (22:486d) +_CinnabarQuizQuestionsText1:: text "CATERPIE evolves" line "into BUTTERFREE?" done -_CinnabarQuizQuestionsText2:: ; 88890 (22:4890) +_CinnabarQuizQuestionsText2:: text "There are 9" line "certified #MON" cont "LEAGUE BADGEs?" done -_CinnabarQuizQuestionsText3:: ; 888bb (22:48bb) +_CinnabarQuizQuestionsText3:: text "POLIWAG evolves 3" line "times?" done -_CinnabarQuizQuestionsText4:: ; 888d5 (22:48d5) +_CinnabarQuizQuestionsText4:: text "Are thunder moves" line "effective against" cont "ground element-" cont "type #MON?" done -_CinnabarQuizQuestionsText5:: ; 88915 (22:4915) +_CinnabarQuizQuestionsText5:: text "#MON of the" line "same kind and" cont "level are not" cont "identical?" done -_CinnabarQuizQuestionsText6:: ; 88949 (22:4949) +_CinnabarQuizQuestionsText6:: text "TM28 contains" line "TOMBSTONER?" done -_CinnabarGymQuizCorrectText:: ; 88964 (22:4964) +_CinnabarGymQuizCorrectText:: text "You're absolutely" line "correct!" para "Go on through!@@" -_CinnabarGymQuizIncorrectText:: ; 8898f (22:498f) +_CinnabarGymQuizIncorrectText:: text "Sorry! Bad call!" prompt -_MagazinesText:: ; 889a1 (22:49a1) +_MagazinesText:: text "#MON magazines!" para "#MON notebooks!" @@ -639,28 +620,28 @@ _MagazinesText:: ; 889a1 (22:49a1) para "#MON graphs!" done -_BillsHouseMonitorText:: ; 889cf (22:49cf) +_BillsHouseMonitorText:: text "TELEPORTER is" line "displayed on the" cont "PC monitor." done -_BillsHouseInitiatedText:: ; 889fb (22:49fb) - text $52, " initiated" +_BillsHouseInitiatedText:: + text "<PLAYER> initiated" line "TELEPORTER's Cell" cont "Separator!@@" -_BillsHousePokemonListText1:: ; 88a25 (22:4a25) +_BillsHousePokemonListText1:: text "BILL's favorite" line "#MON list!" prompt -_BillsHousePokemonListText2:: ; 88a40 (22:4a40) +_BillsHousePokemonListText2:: text "Which #MON do" line "you want to see?" done -_OakLabEmailText:: ; 88a60 (22:4a60) +_OakLabEmailText:: text "There's an e-mail" line "message here!" @@ -687,36 +668,36 @@ _OakLabEmailText:: ; 88a60 (22:4a60) cont "..." done -_GameCornerCoinCaseText:: ; 88b5b (22:4b5b) +_GameCornerCoinCaseText:: text "A COIN CASE is" line "required!" done -_GameCornerNoCoinsText:: ; 88b75 (22:4b75) +_GameCornerNoCoinsText:: text "You don't have" line "any coins!" done -_GameCornerOutOfOrderText:: ; 88b8f (22:4b8f) +_GameCornerOutOfOrderText:: text "OUT OF ORDER" line "This is broken." done -_GameCornerOutToLunchText:: ; 88bad (22:4bad) +_GameCornerOutToLunchText:: text "OUT TO LUNCH" line "This is reserved." done -_GameCornerSomeonesKeysText:: ; 88bcd (22:4bcd) +_GameCornerSomeonesKeysText:: text "Someone's keys!" line "They'll be back." done -_JustAMomentText:: ; 88bed (22:4bed) +_JustAMomentText:: text "Just a moment." done -TMNotebookText:: ; 88bfd (22:4bfd) +TMNotebookText:: text "It's a pamphlet" line "on TMs." @@ -731,15 +712,15 @@ TMNotebookText:: ; 88bfd (22:4bfd) para "SILPH CO.@@" -_TurnPageText:: ; 88c6f (22:4c6f) +_TurnPageText:: text "Turn the page?" done -_ViridianSchoolNotebookText5:: ; 88c7f (22:4c7f) +_ViridianSchoolNotebookText5:: text "GIRL: Hey! Don't" line "look at my notes!@@" -_ViridianSchoolNotebookText1:: ; 88ca3 (22:4ca3) +_ViridianSchoolNotebookText1:: text "Looked at the" line "notebook!" @@ -758,7 +739,7 @@ _ViridianSchoolNotebookText1:: ; 88ca3 (22:4ca3) cont "#MON trainers." prompt -_ViridianSchoolNotebookText2:: ; 88d46 (22:4d46) +_ViridianSchoolNotebookText2:: text "Second page..." para "A healthy #MON" @@ -771,7 +752,7 @@ _ViridianSchoolNotebookText2:: ; 88d46 (22:4d46) cont "effective!" prompt -_ViridianSchoolNotebookText3:: ; 88dbd (22:4dbd) +_ViridianSchoolNotebookText3:: text "Third page..." para "#MON trainers" @@ -784,7 +765,7 @@ _ViridianSchoolNotebookText3:: ; 88dbd (22:4dbd) cont "at #MON GYMs." prompt -_ViridianSchoolNotebookText4:: ; 88e2c (22:4e2c) +_ViridianSchoolNotebookText4:: text "Fourth page..." para "The goal for" @@ -800,33 +781,33 @@ _ViridianSchoolNotebookText4:: ; 88e2c (22:4e2c) line "#MON LEAGUE!" prompt -_FightingDojoText_52a10:: ; 88ec1 (22:4ec1) +_EnemiesOnEverySideText:: text "Enemies on every" line "side!" done -_FightingDojoText_52a1d:: ; 88ed9 (22:4ed9) +_WhatGoesAroundComesAroundText:: text "What goes around" line "comes around!" done -_FightingDojoText:: ; 88ef9 (22:4ef9) +_FightingDojoText:: text "FIGHTING DOJO" done -_IndigoPlateauHQText:: ; 88f08 (22:4f08) +_IndigoPlateauHQText:: text "INDIGO PLATEAU" line "#MON LEAGUE HQ" done -_RedBedroomSNESText:: ; 88f27 (22:4f27) - text $52, " is" +_RedBedroomSNESText:: + text "<PLAYER> is" line "playing the SNES!" cont "...Okay!" cont "It's time to go!" done -_Route15UpstairsBinocularsText:: ; 88f58 (22:4f58) +_Route15UpstairsBinocularsText:: text "Looked into the" line "binoculars..." @@ -835,41 +816,31 @@ _Route15UpstairsBinocularsText:: ; 88f58 (22:4f58) cont "toward the sea." done -_AerodactylFossilText:: ; 88fa7 (22:4fa7) +_AerodactylFossilText:: text "AERODACTYL Fossil" line "A primitive and" cont "rare #MON." done -_KabutopsFossilText:: ; 88fd5 (22:4fd5) +_KabutopsFossilText:: text "KABUTOPS Fossil" line "A primitive and" cont "rare #MON." done -IF DEF(_YELLOW) -_FanClubPicture1Text:: - text "My cute RAPIDASH." - done - -_FanClubPicture2Text:: - text "My beloved FEAROW." - done -ENDC - -_LinkCableHelpText1:: ; 89001 (22:5001) +_LinkCableHelpText1:: text "TRAINER TIPS" para "Using a Game Link" line "Cable" prompt -_LinkCableHelpText2:: ; 89027 (22:5027) +_LinkCableHelpText2:: text "Which heading do" line "you want to read?" done -_LinkCableInfoText1:: ; 8904b (22:504b) +_LinkCableInfoText1:: text "When you have" line "linked your GAME" cont "BOY with another" @@ -879,31 +850,31 @@ _LinkCableInfoText1:: ; 8904b (22:504b) cont "#MON CENTER." prompt -_LinkCableInfoText2:: ; 890bd (22:50bd) +_LinkCableInfoText2:: text "COLOSSEUM lets" line "you play against" cont "a friend." prompt -_LinkCableInfoText3:: ; 890e8 (22:50e8) +_LinkCableInfoText3:: text "TRADE CENTER is" line "used for trading" cont "#MON." prompt -_ViridianSchoolBlackboardText1:: ; 89110 (22:5110) +_ViridianSchoolBlackboardText1:: text "The blackboard" line "describes #MON" cont "STATUS changes" cont "during battles." prompt -_ViridianSchoolBlackboardText2:: ; 8914e (22:514e) +_ViridianSchoolBlackboardText2:: text "Which heading do" line "you want to read?" done -_ViridianBlackboardSleepText:: ; 89172 (22:5172) +_ViridianBlackboardSleepText:: text "A #MON can't" line "attack if it's" cont "asleep!" @@ -916,7 +887,7 @@ _ViridianBlackboardSleepText:: ; 89172 (22:5172) line "wake them up!" prompt -_ViridianBlackboardPoisonText:: ; 891de (22:51de) +_ViridianBlackboardPoisonText:: text "When poisoned, a" line "#MON's health" cont "steadily drops." @@ -928,7 +899,7 @@ _ViridianBlackboardPoisonText:: ; 891de (22:51de) line "to cure poison!" prompt -_ViridianBlackbaordPrlzText:: ; 8924b (22:524b) +_ViridianBlackboardPrlzText:: text "Paralysis could" line "make #MON" cont "moves misfire!" @@ -940,7 +911,7 @@ _ViridianBlackbaordPrlzText:: ; 8924b (22:524b) line "for treatment!" prompt -_ViridianBlackboardBurnText:: ; 892b5 (22:52b5) +_ViridianBlackboardBurnText:: text "A burn reduces" line "power and speed." cont "It also causes" @@ -953,7 +924,7 @@ _ViridianBlackboardBurnText:: ; 892b5 (22:52b5) line "cure a burn!" prompt -_ViridianBlackboardFrozenText:: ; 8932f (22:532f) +_ViridianBlackboardFrozenText:: text "If frozen, a" line "#MON becomes" cont "totally immobile!" @@ -966,12 +937,12 @@ _ViridianBlackboardFrozenText:: ; 8932f (22:532f) line "thaw out #MON!" prompt -_VermilionGymTrashText:: ; 893a7 (22:53a7) +_VermilionGymTrashText:: text "Nope, there's" line "only trash here." done -_VermilionGymTrashSuccesText1:: ; 893c6 (22:53c6) +_VermilionGymTrashSuccessText1:: text "Hey! There's a" line "switch under the" cont "trash!" @@ -980,596 +951,591 @@ _VermilionGymTrashSuccesText1:: ; 893c6 (22:53c6) para "The 1st electric" line "lock opened!@@" -_VermilionGymTrashSuccesText2:: ; 89418 (22:5418) +_VermilionGymTrashSuccessText2:: text "Hey! There's" line "another switch" cont "under the trash!" cont "Turn it on!" prompt -_VermilionGymTrashSuccesText3:: ; 89451 (22:5451) +_VermilionGymTrashSuccessText3:: text "The 2nd electric" line "lock opened!" para "The motorized door" line "opened!@@" -_VermilionGymTrashFailText:: ; 8948c (22:548c) +_VermilionGymTrashFailText:: text "Nope! There's" line "only trash here." cont "Hey! The electric" cont "locks were reset!@@" -_FoundHiddenItemText:: ; 894d0 (22:54d0) - text $52, " found" +_FoundHiddenItemText:: + text "<PLAYER> found" line "@" TX_RAM wcd6d text "!@@" -_HiddenItemBagFullText:: ; 894e1 (22:54e1) - text "But, ", $52, " has" +_HiddenItemBagFullText:: + text "But, <PLAYER> has" line "no more room for" cont "other items!" done -_FoundHiddenCoinsText:: ; 8950b (22:550b) - text $52, " found" +_FoundHiddenCoinsText:: + text "<PLAYER> found" line "@" - TX_BCD $ffa0, $c2 + TX_BCD hCoins, 2 | LEADING_ZEROES | LEFT_ALIGN text " coins!@@" -_FoundHiddenCoins2Text:: ; 89523 (22:5523) - text $52, " found" +_FoundHiddenCoins2Text:: + text "<PLAYER> found" line "@" - TX_BCD $ffa0, $c2 + TX_BCD hCoins, 2 | LEADING_ZEROES | LEFT_ALIGN text " coins!@@" -_DroppedHiddenCoinsText:: ; 8953b (22:553b) - db $0 +_DroppedHiddenCoinsText:: + text "" para "Oops! Dropped" line "some coins!" done -_IndigoPlateauStatuesText1:: ; 89557 (22:5557) +_IndigoPlateauStatuesText1:: text "INDIGO PLATEAU" prompt -_IndigoPlateauStatuesText2:: ; 89567 (22:5567) +_IndigoPlateauStatuesText2:: text "The ultimate goal" line "of trainers!" cont "#MON LEAGUE HQ" done -_IndigoPlateauStatuesText3:: ; 89596 (22:5596) +_IndigoPlateauStatuesText3:: text "The highest" line "#MON authority" cont "#MON LEAGUE HQ" done -_PokemonBooksText:: ; 895c1 (22:55c1) +_PokemonBooksText:: text "Crammed full of" line "#MON books!" done -_DiglettSculptureText:: ; 895de (22:55de) +_DiglettSculptureText:: text "It's a sculpture" line "of DIGLETT." done -_ElevatorText:: ; 895fb (22:55fb) +_ElevatorText:: text "This is an" line "elevator." done -_TownMapText:: ; 89611 (22:5611) +_TownMapText:: text "A TOWN MAP.@@" -_PokemonStuffText:: ; 8961f (22:561f) +_PokemonStuffText:: text "Wow! Tons of" line "#MON stuff!" done -_OutOfSafariBallsText:: ; 89639 (22:5639) +_OutOfSafariBallsText:: text "PA: Ding-dong!" para "You are out of" line "SAFARI BALLs!" prompt -_WildRanText:: ; 89666 (22:5666) +_WildRanText:: text "Wild @" TX_RAM wEnemyMonNick - db $0 + text "" line "ran!" prompt -_EnemyRanText:: ; 89677 (22:5677) +_EnemyRanText:: text "Enemy @" TX_RAM wEnemyMonNick - db $0 + text "" line "ran!" prompt -_HurtByPoisonText:: ; 89689 (22:5689) - text $5a, "'s" +_HurtByPoisonText:: + text "<USER>'s" line "hurt by poison!" prompt -_HurtByBurnText:: ; 8969d (22:569d) - text $5a, "'s" +_HurtByBurnText:: + text "<USER>'s" line "hurt by the burn!" prompt -_HurtByLeechSeedText:: ; 896b3 (22:56b3) +_HurtByLeechSeedText:: text "LEECH SEED saps" - line $5a, "!" + line "<USER>!" prompt -_EnemyMonFaintedText:: ; 0x896c7 +_EnemyMonFaintedText:: text "Enemy @" TX_RAM wEnemyMonNick - db $0 + text "" line "fainted!" prompt -_MoneyForWinningText:: ; 896dd (22:56dd) - text $52, " got ¥@" - TX_BCD wd079, $c3 - db $0 +_MoneyForWinningText:: + text "<PLAYER> got ¥@" + TX_BCD wAmountMoneyWon, 3 | LEADING_ZEROES | LEFT_ALIGN + text "" line "for winning!" prompt -_TrainerDefeatedText:: ; 896f9 (22:56f9) - text $52, " defeated" +_TrainerDefeatedText:: + text "<PLAYER> defeated" line "@" - TX_RAM W_TRAINERNAME ; 0x89706 + TX_RAM wTrainerName text "!" prompt -_PlayerMonFaintedText:: ; 8970c (22:570c) +_PlayerMonFaintedText:: TX_RAM wBattleMonNick - db $0 + text "" line "fainted!" prompt -_UseNextMonText:: ; 8971a (22:571a) +_UseNextMonText:: text "Use next #MON?" done -_Sony1WinText:: ; 8972a (22:572a) - text $53, ": Yeah! Am" +_Sony1WinText:: + text "<RIVAL>: Yeah! Am" line "I great or what?" prompt -_PlayerBlackedOutText2:: ; 89748 (22:5748) - text $52, " is out of" +_PlayerBlackedOutText2:: + text "<PLAYER> is out of" line "useable #MON!" - para $52, " blacked" + para "<PLAYER> blacked" line "out!" prompt -_LinkBattleLostText:: ; 89772 (22:5772) - text $52, " lost to" +_LinkBattleLostText:: + text "<PLAYER> lost to" line "@" - TX_RAM W_TRAINERNAME ; 0x8977e + TX_RAM wTrainerName text "!" prompt -_TrainerAboutToUseText:: ; 89784 (22:5784) - TX_RAM W_TRAINERNAME +_TrainerAboutToUseText:: + TX_RAM wTrainerName text " is" line "about to use" cont"@" TX_RAM wEnemyMonNick text "!" - para "Will ", $52 + para "Will <PLAYER>" line "change #MON?" done -_TrainerSentOutText:: ; 897b4 (22:57b4) - TX_RAM W_TRAINERNAME +_TrainerSentOutText:: + TX_RAM wTrainerName text " sent" line "out @" TX_RAM wEnemyMonNick text "!" done -_NoWillText:: ; 897c9 (22:57c9) +_NoWillText:: text "There's no will" line "to fight!" prompt -_CantEscapeText:: ; 897e3 (22:57e3) +_CantEscapeText:: text "Can't escape!" prompt -_NoRunningText:: ; 897f1 (22:57f1) +_NoRunningText:: text "No! There's no" line "running from a" cont "trainer battle!" prompt -_GotAwayText:: ; 8981f (22:581f) +_GotAwayText:: text "Got away safely!" prompt -IF DEF(_YELLOW) -_RunAwayText:: - text "Hurry, get away!" - prompt -ENDC - -_ItemsCantBeUsedHereText:: ; 89831 (22:5831) +_ItemsCantBeUsedHereText:: text "Items can't be" line "used here." prompt -_AlreadyOutText:: ; 8984b (22:584b) +_AlreadyOutText:: TX_RAM wBattleMonNick text " is" line "already out!" prompt -_MoveNoPPText:: ; 89860 (22:5860) +_MoveNoPPText:: text "No PP left for" line "this move!" prompt -_MoveDisabledText:: ; 8987b (22:587b) +_MoveDisabledText:: text "The move is" line "disabled!" prompt -_NoMovesLeftText:: ; 89892 (22:5892) +_NoMovesLeftText:: TX_RAM wBattleMonNick text " has no" line "moves left!" done -_MultiHitText:: ; 898aa (22:58aa) +_MultiHitText:: text "Hit the enemy" line "@" TX_NUM wPlayerNumHits,1,1 text " times!" prompt -_ScaredText:: ; 898c7 (22:58c7) +_ScaredText:: TX_RAM wBattleMonNick text " is too" line "scared to move!" prompt -_GetOutText:: ; 898e3 (22:58e3) +_GetOutText:: text "GHOST: Get out..." line "Get out..." prompt -_FastAsleepText:: ; 89901 (22:5901) - text $5A +_FastAsleepText:: + text "<USER>" line "is fast asleep!" prompt -_WokeUpText:: ; 89914 (22:5914) - text $5A +_WokeUpText:: + text "<USER>" line "woke up!" prompt -_IsFrozenText:: ; 89920 (22:5920) - text $5A +_IsFrozenText:: + text "<USER>" line "is frozen solid!" prompt -_FullyParalyzedText:: ; 89934 (22:5934) - text $5A,"'s" +_FullyParalyzedText:: + text "<USER>'s" line "fully paralyzed!" prompt -_FlinchedText:: ; 89949 (22:5949) - text $5A +_FlinchedText:: + text "<USER>" line "flinched!" prompt -_MustRechargeText:: ; 89956 (22:5956) - text $5A +_MustRechargeText:: + text "<USER>" line "must recharge!" prompt -_DisabledNoMoreText:: ; 89968 (22:5968) - text $5A,"'s" +_DisabledNoMoreText:: + text "<USER>'s" line "disabled no more!" prompt -_IsConfusedText:: ; 8997e (22:597e) - text $5A +_IsConfusedText:: + text "<USER>" line "is confused!" prompt -_HurtItselfText:: ; 8998e (22:598e) +_HurtItselfText:: text "It hurt itself in" line "its confusion!" prompt -_ConfusedNoMoreText:: ; 899b0 (22:59b0) - text $5A,"'s" +_ConfusedNoMoreText:: + text "<USER>'s" line "confused no more!" prompt -_SavingEnergyText:: ; 899c6 (22:59c6) - text $5A +_SavingEnergyText:: + text "<USER>" line "is saving energy!" prompt -_UnleashedEnergyText:: ; 899db (22:59db) - text $5A +_UnleashedEnergyText:: + text "<USER>" line "unleashed energy!" prompt -_ThrashingAboutText:: ; 899f0 (22:59f0) - text $5A,"'s" +_ThrashingAboutText:: + text "<USER>'s" line "thrashing about!" done -_AttackContinuesText:: ; 89a05 (22:5a05) - text $5A,"'s" +_AttackContinuesText:: + text "<USER>'s" line "attack continues!" done -_CantMoveText:: ; 89a1b (22:5a1b) - text $5A +_CantMoveText:: + text "<USER>" line "can't move!" prompt -_MoveIsDisabledText:: ; 89a29 (22:5a29) - text $5a, "'s" +_MoveIsDisabledText:: + text "<USER>'s" line "@" TX_RAM wcd6d text " is" cont "disabled!" prompt -_MonName1Text:: ; 89a40 (22:5a40) - text $5a, "@@" +_MonName1Text:: + text "<USER>@@" -_Used1Text:: ; 89a44 (22:5a44) - db $0 +_Used1Text:: + text "" line "used @@" -_Used2Text:: ; 89a4d (22:5a4d) - db $0 +_Used2Text:: + text "" line "used @@" -_InsteadText:: ; 89a56 (22:5a56) +_InsteadText:: text "instead," cont "@@" -_CF4BText:: ; 89a62 (22:5a62) +_CF4BText:: TX_RAM wcf4b text "@" -_ExclamationPoint1Text:: ; 89a67 (22:5a67) +_ExclamationPoint1Text:: text "!" done -_ExclamationPoint2Text:: ; 89a6a (22:5a6a) +_ExclamationPoint2Text:: text "!" done -_ExclamationPoint3Text:: ; 89a6d (22:5a6d) +_ExclamationPoint3Text:: text "!" done -_ExclamationPoint4Text:: ; 89a70 (22:5a70) +_ExclamationPoint4Text:: text "!" done -_ExclamationPoint5Text:: ; 89a73 (22:5a73) +_ExclamationPoint5Text:: text "!" done -_AttackMissedText:: ; 89a76 (22:5a76) - text $5a, "'s" +_AttackMissedText:: + text "<USER>'s" line "attack missed!" prompt -_KeptGoingAndCrashedText:: ; 89a89 (22:5a89) - text $5a +_KeptGoingAndCrashedText:: + text "<USER>" line "kept going and" cont "crashed!" prompt -_UnaffectedText:: ; 89aa4 (22:5aa4) - text $59, "'s" +_UnaffectedText:: + text "<TARGET>'s" line "unaffected!" prompt -_DoesntAffectMonText:: ; 89ab4 (22:5ab4) +_DoesntAffectMonText:: text "It doesn't affect" - line $59, "!" + line "<TARGET>!" prompt -_CriticalHitText:: ; 89ac9 (22:5ac9) +_CriticalHitText:: text "Critical hit!" prompt -_OHKOText:: ; 89ad8 (22:5ad8) +_OHKOText:: text "One-hit KO!" prompt -_LoafingAroundText:: ; 89ae5 (22:5ae5) +_LoafingAroundText:: TX_RAM wBattleMonNick text " is" line "loafing around." prompt -_BeganToNapText:: ; 89afd (22:5afd) +_BeganToNapText:: TX_RAM wBattleMonNick text " began" line "to nap!" prompt -_WontObeyText:: ; 89b10 (22:5b10) +_WontObeyText:: TX_RAM wBattleMonNick text " won't" line "obey!" prompt -_TurnedAwayText:: ; 89b20 (22:5b20) +_TurnedAwayText:: TX_RAM wBattleMonNick text " turned" line "away!" prompt -_IgnoredOrdersText:: ; 89b32 (22:5b32) +_IgnoredOrdersText:: TX_RAM wBattleMonNick - db $0 + text "" line "ignored orders!" prompt -_SubstituteTookDamageText:: ; 89b47 (22:5b47) +_SubstituteTookDamageText:: text "The SUBSTITUTE" line "took damage for" - cont $59, "!" + cont "<TARGET>!" prompt -_SubstituteBrokeText:: ; 89b6a (22:5b6a) - text $59, "'s" +_SubstituteBrokeText:: + text "<TARGET>'s" line "SUBSTITUTE broke!" prompt -_BuildingRageText:: ; 89b80 (22:5b80) - text $5a, "'s" +_BuildingRageText:: + text "<USER>'s" line "RAGE is building!" prompt -_MirrorMoveFailedText:: ; 89b96 (22:5b96) +_MirrorMoveFailedText:: text "The MIRROR MOVE" next "failed!" prompt -_HitXTimesText:: ; 89baf (22:5baf) +_HitXTimesText:: text "Hit @" TX_NUM wEnemyNumHits, 1, 1 text " times!" prompt -_GainedText:: ; 89bc2 (22:5bc2) +_GainedText:: TX_RAM wcd6d text " gained" line "@@" -_WithExpAllText:: ; 89bd0 (22:5bd0) +_WithExpAllText:: text "with EXP.ALL," cont "@@" -_BoostedText:: ; 89be1 (22:5be1) +_BoostedText:: text "a boosted" cont "@@" -_ExpPointsText:: ; 89bee (22:5bee) - TX_NUM wcf4b, 2, 4 + +_ExpPointsText:: + TX_NUM wExpAmountGained, 2, 4 text " EXP. Points!" prompt -_GrewLevelText:: ; 89c01 (22:5c01) +_GrewLevelText:: TX_RAM wcd6d text " grew" line "to level @" - TX_NUM W_CURENEMYLVL, 1, 3 + TX_NUM wCurEnemyLVL, 1, 3 text "!@@" -_WildMonAppearedText:: ; 89c1d (22:5c1d) +_WildMonAppearedText:: text "Wild @" TX_RAM wEnemyMonNick - db $0 + text "" line "appeared!" prompt -_HookedMonAttackedText:: ; 89c33 (22:5c33) +_HookedMonAttackedText:: text "The hooked" line "@" TX_RAM wEnemyMonNick - db $0 + text "" cont "attacked!" prompt -_EnemyAppearedText:: ; 89c4f (22:5c4f) +_EnemyAppearedText:: TX_RAM wEnemyMonNick - db $0 + text "" line "appeared!" prompt -_TrainerWantsToFightText:: ; 89c5e (22:5c5e) - TX_RAM W_TRAINERNAME +_TrainerWantsToFightText:: + TX_RAM wTrainerName text " wants" line "to fight!" prompt -_UnveiledGhostText:: ; 89c73 (22:5c73) +_UnveiledGhostText:: text "SILPH SCOPE" line "unveiled the" cont "GHOST's identity!" prompt -_GhostCantBeIDdText:: ; 89c9e (22:5c9e) +_GhostCantBeIDdText:: text "Darn! The GHOST" line "can't be ID'd!" prompt -_GoText:: ; 89cbc (22:5cbc) +_GoText:: text "Go! @@" -_DoItText:: ; 89cc3 (22:5cc3) +_DoItText:: text "Do it! @@" -_GetmText:: ; 89ccd (22:5ccd) +_GetmText:: text "Get'm! @@" -_EnemysWeakText:: ; 89cd6 (22:5cd6) +_EnemysWeakText:: text "The enemy's weak!" line "Get'm! @@" -_PlayerMon1Text:: ; 89cf0 (22:5cf0) +_PlayerMon1Text:: TX_RAM wBattleMonNick text "!" done -_PlayerMon2Text:: ; 89cf6 (22:5cf6) +_PlayerMon2Text:: TX_RAM wBattleMonNick text " @@" -_EnoughText:: ; 89cfd (22:5cfd) +_EnoughText:: text "enough!@@" -_OKExclamationText:: ; 89d07 (22:5d07) +_OKExclamationText:: text "OK!@@" -_GoodText:: ; 89d0d (22:5d0d) +_GoodText:: text "good!@@" -_ComeBackText:: ; 89d15 (22:5d15) - db $0 +_ComeBackText:: + text "" line "Come back!" done -_SuperEffectiveText:: ; 89d22 (22:5d22) +_SuperEffectiveText:: text "It's super" line "effective!" prompt -_NotVeryEffectiveText:: ; 89d38 (22:5d38) +_NotVeryEffectiveText:: text "It's not very" line "effective..." prompt -_SafariZoneEatingText:: ; 89d53 (22:5d53) +_SafariZoneEatingText:: text "Wild @" TX_RAM wEnemyMonNick db $0 line "is eating!" prompt -_SafariZoneAngryText:: ; 89d6a (22:5d6a) +_SafariZoneAngryText:: text "Wild @" TX_RAM wEnemyMonNick db $0 @@ -1577,121 +1543,110 @@ _SafariZoneAngryText:: ; 89d6a (22:5d6a) prompt ; money related -_PickUpPayDayMoneyText:: ; 89d80 (22:5d80) - text $52, " picked up" +_PickUpPayDayMoneyText:: + text "<PLAYER> picked up" line "¥@" - TX_BCD wTotalPayDayMoney, $c3 + TX_BCD wTotalPayDayMoney, 3 | LEADING_ZEROES | LEFT_ALIGN text "!" prompt -_ClearSaveDataText:: ; 89d96 (22:5d96) +_ClearSaveDataText:: text "Clear all saved" line "data?" done -_WhichFloorText:: ; 89dad (22:5dad) +_WhichFloorText:: text "Which floor do" line "you want? " done -IF DEF(_YELLOW) -_SleepingPikachuText1:: - text "There isn't any" - line "response..." - prompt -ENDC - -_PartyMenuNormalText:: ; 89dc8 (22:5dc8) +_PartyMenuNormalText:: text "Choose a #MON." done -_PartyMenuItemUseText:: ; 89dd8 (22:5dd8) +_PartyMenuItemUseText:: text "Use item on which" line "#MON?" done -_PartyMenuBattleText:: ; 89df1 (22:5df1) +_PartyMenuBattleText:: text "Bring out which" line "#MON?" done -_PartyMenuUseTMText:: ; 89e08 (22:5e08) -IF DEF(_YELLOW) - text "Teach to which" -ELSE +_PartyMenuUseTMText:: text "Use TM on which" -ENDC line "#MON?" done -_PartyMenuSwapMonText:: ; 89e1f (22:5e1f) +_PartyMenuSwapMonText:: text "Move #MON" line "where?" done -_PotionText:: ; 89e31 (22:5e31) +_PotionText:: TX_RAM wcd6d - db $0 + text "" line "recovered by @" TX_NUM wHPBarHPDifference, 2, 3 text "!" done -_AntidoteText:: ; 89e4b (22:5e4b) +_AntidoteText:: TX_RAM wcd6d text " was" line "cured of poison!" done -_ParlyzHealText:: ; 89e65 (22:5e65) +_ParlyzHealText:: TX_RAM wcd6d text "'s" line "rid of paralysis!" done -_BurnHealText:: ; 89e7d (22:5e7d) +_BurnHealText:: TX_RAM wcd6d text "'s" line "burn was healed!" done -_IceHealText:: ; 89e94 (22:5e94) +_IceHealText:: TX_RAM wcd6d text " was" line "defrosted!" done -_AwakeningText:: ; 89ea8 (22:5ea8) +_AwakeningText:: TX_RAM wcd6d - db $0 + text "" line "woke up!" done -_FullHealText:: ; 89eb6 (22:5eb6) +_FullHealText:: TX_RAM wcd6d text "'s" line "health returned!" done -_ReviveText:: ; 89ecd (22:5ecd) +_ReviveText:: TX_RAM wcd6d - db $0 + text "" line "is revitalized!" done -_RareCandyText:: ; 89ee2 (22:5ee2) +_RareCandyText:: TX_RAM wcd6d text " grew" line "to level @" - TX_NUM W_CURENEMYLVL, $1,$3 + TX_NUM wCurEnemyLVL, 1, 3 text "!@@" -_TurnedOnPC1Text:: ; 89efe (22:5efe) - text $52, " turned on" +_TurnedOnPC1Text:: + text "<PLAYER> turned on" line "the PC." prompt -_AccessedBillsPCText:: ; 89f13 (22:5f13) +_AccessedBillsPCText:: text "Accessed BILL's" line "PC." @@ -1699,7 +1654,7 @@ _AccessedBillsPCText:: ; 89f13 (22:5f13) line "Storage System." prompt -_AccessedSomeonesPCText:: ; 89f45 (22:5f45) +_AccessedSomeonesPCText:: text "Accessed someone's" line "PC." @@ -1707,84 +1662,84 @@ _AccessedSomeonesPCText:: ; 89f45 (22:5f45) line "Storage System." prompt -_AccessedMyPCText:: ; 89f7a (22:5f7a) +_AccessedMyPCText:: text "Accessed my PC." para "Accessed Item" line "Storage System." prompt -_TurnedOnPC2Text:: ; 89fa9 (22:5fa9) - text $52, " turned on" +_TurnedOnPC2Text:: + text "<PLAYER> turned on" line "the PC." prompt -_WhatDoYouWantText:: ; 89fbe (22:5fbe) +_WhatDoYouWantText:: text "What do you want" line "to do?" done -_WhatToDepositText:: ; 89fd7 (22:5fd7) +_WhatToDepositText:: text "What do you want" line "to deposit?" done -_DepositHowManyText:: ; 89ff5 (22:5ff5) +_DepositHowManyText:: text "How many?" done -_ItemWasStoredText:: ; 8a000 (22:6000) +_ItemWasStoredText:: TX_RAM wcd6d text " was" line "stored via PC." prompt -_NothingToDepositText:: ; 8a018 (22:6018) +_NothingToDepositText:: text "You have nothing" line "to deposit." prompt -_NoRoomToStoreText:: ; 8a036 (22:6036) +_NoRoomToStoreText:: text "No room left to" line "store items." prompt -_WhatToWithdrawText:: ; 8a054 (22:6054) +_WhatToWithdrawText:: text "What do you want" line "to withdraw?" done -_WithdrawHowManyText:: ; 8a073 (22:6073) +_WithdrawHowManyText:: text "How many?" done -_WithdrewItemText:: ; 8a07e (22:607e) +_WithdrewItemText:: text "Withdrew" line "@" TX_RAM wcd6d text "." prompt -_NothingStoredText:: ; 8a08f (22:608f) +_NothingStoredText:: text "There is nothing" line "stored." prompt -_CantCarryMoreText:: ; 8a0a9 (22:60a9) +_CantCarryMoreText:: text "You can't carry" line "any more items." prompt -_WhatToTossText:: ; 8a0c9 (22:60c9) +_WhatToTossText:: text "What do you want" line "to toss away?" done -_TossHowManyText:: ; 8a0e9 (22:60e9) +_TossHowManyText:: text "How many?" done -_AccessedHoFPCText:: ; 8a0f4 (22:60f4) +_AccessedHoFPCText:: text "Accessed #MON" line "LEAGUE's site." @@ -1792,45 +1747,38 @@ _AccessedHoFPCText:: ; 8a0f4 (22:60f4) line "OF FAME List." prompt -IF DEF(_YELLOW) -_SleepingPikachuText2:: - text "There isn't any" - line "response..." - prompt -ENDC - -_SwitchOnText:: ; 0x8a131 +_SwitchOnText:: text "Switch on!" prompt -_WhatText:: ; 0x8a13d +_WhatText:: text "What?" done -_DepositWhichMonText:: ; 0x8a144 +_DepositWhichMonText:: text "Deposit which" line "#MON?" done -_MonWasStoredText:: ; 0x8a159 +_MonWasStoredText:: TX_RAM wcf4b text " was" line "stored in Box @" - TX_RAM wWhichTrade + TX_RAM wBoxNumString text "." prompt -_CantDepositLastMonText:: ; 0x8a177 +_CantDepositLastMonText:: text "You can't deposit" line "the last #MON!" prompt -_BoxFullText:: ; 0x8a198 +_BoxFullText:: text "Oops! This Box is" line "full of #MON." prompt -_MonIsTakenOutText:: ; 0x8a1b9 +_MonIsTakenOutText:: TX_RAM wcf4b text " is" line "taken out." @@ -1839,12 +1787,12 @@ _MonIsTakenOutText:: ; 0x8a1b9 text "." prompt -_NoMonText:: ; 0x8a1d7 +_NoMonText:: text "What? There are" line "no #MON here!" prompt -_CantTakeMonText:: ; 0x8a1f6 +_CantTakeMonText:: text "You can't take" line "any more #MON." @@ -1852,20 +1800,12 @@ _CantTakeMonText:: ; 0x8a1f6 line "first." prompt -IF DEF(_YELLOW) -_PikachuUnhappyText:: - TX_RAM $cd6d - text "looks" - line "unhappy about it!" - prompt -ENDC - -_ReleaseWhichMonText:: ; 0x8a228 +_ReleaseWhichMonText:: text "Release which" line "#MON?" done -_OnceReleasedText:: ; 0x8a23d +_OnceReleasedText:: text "Once released," line "@" TX_RAM wcf4b @@ -1873,62 +1813,62 @@ _OnceReleasedText:: ; 0x8a23d cont "gone forever. OK?" done -_MonWasReleasedText:: ; 0x8a268 +_MonWasReleasedText:: TX_RAM wcf4b text " was" line "released outside." cont "Bye @" -_CF4BExclamationText:: ; 8a288 (22:6288) +_CF4BExclamationText:: TX_RAM wcf4b text "!" prompt -_RequireCoinCaseText:: ; 8a28e (22:628e) +_RequireCoinCaseText:: text "A COIN CASE is" line "required!@@" -_ExchangeCoinsForPrizesText:: ; 8a2a9 (22:62a9) +_ExchangeCoinsForPrizesText:: text "We exchange your" line "coins for prizes." prompt -_WhichPrizeText:: ; 8a2cd (22:62cd) +_WhichPrizeText:: text "Which prize do" line "you want?" done -_HereYouGoText:: ; 8a2e7 (22:62e7) +_HereYouGoText:: text "Here you go!@@" -_SoYouWantPrizeText:: ; 8a2f6 (22:62f6) +_SoYouWantPrizeText:: text "So, you want" line "@" TX_RAM wcd6d text "?" done -_SorryNeedMoreCoinsText:: ; 8a30b (22:630b) +_SorryNeedMoreCoinsText:: text "Sorry, you need" line "more coins.@@" -_OopsYouDontHaveEnoughRoomText:: ; 8a329 (22:6329) +_OopsYouDontHaveEnoughRoomText:: text "Oops! You don't" line "have enough room.@@" -_OhFineThenText:: ; 8a34c (22:634c) +_OhFineThenText:: text "Oh, fine then.@@" -_GetDexRatedText:: ; 8a35d (22:635d) +_GetDexRatedText:: text "Want to get your" line "#DEX rated?" done -_ClosedOaksPCText:: ; 8a37b (22:637b) +_ClosedOaksPCText:: text "Closed link to" line "PROF.OAK's PC.@@" -_AccessedOaksPCText:: ; 8a39a (22:639a) +_AccessedOaksPCText:: text "Accessed PROF." line "OAK's PC." @@ -1936,24 +1876,24 @@ _AccessedOaksPCText:: ; 8a39a (22:639a) line "Rating System." prompt -_WhereWouldYouLikeText:: ; 8a3d0 (22:63d0) +_WhereWouldYouLikeText:: text "Where would you" line "like to go?" done -_PleaseWaitText:: ; 8a3ed (22:63ed) +_PleaseWaitText:: text "OK, please wait" line "just a moment." done -_LinkCanceledText:: ; 8a40d (22:640d) +_LinkCanceledText:: text "The link was" line "canceled." done INCLUDE "text/oakspeech.asm" -_DoYouWantToNicknameText:: ; 0x8a605 +_DoYouWantToNicknameText:: text "Do you want to" line "give a nickname" cont "to @" @@ -1961,18 +1901,18 @@ _DoYouWantToNicknameText:: ; 0x8a605 text "?" done -_YourNameIsText:: ; 8a62f (22:662f) +_YourNameIsText:: text "Right! So your" - line "name is ", $52, "!" + line "name is <PLAYER>!" prompt -_HisNameIsText:: ; 8a64a (22:664a) +_HisNameIsText:: text "That's right! I" line "remember now! His" - cont "name is ", $53, "!" + cont "name is <RIVAL>!" prompt -_WillBeTradedText:: ; 8a677 (22:6677) +_WillBeTradedText:: TX_RAM wNameOfPlayerMonToBeTraded text " and" line "@" @@ -1981,126 +1921,14 @@ _WillBeTradedText:: ; 8a677 (22:6677) cont "be traded." done -IF DEF(_YELLOW) -_Colosseum3MonsText:: - text "You need 3 #MON" - line "to fight!" - prompt - -_ColosseumMewText:: - text "Sorry, MEW can't" - line "attend!" - prompt - -_ColosseumDifferentMonsText:: - text "Your #MON must" - line "all be different!" - prompt - -_ColosseumMaxL55Text:: - text "No #MON can" - line "exceed L55!" - prompt - -_ColosseumMinL50Text:: - text "All #MON must" - line "be at least L50!" - prompt - -_ColosseumTotalL155Text:: - text "Your total levels" - line "exceed 155!" - prompt - -_ColosseumMaxL30Text:: - text "No #MON can" - line "exceed L30!" - prompt - -_ColosseumMinL25Text:: - text "All #MON must" - line "be at least L25!" - prompt - -_ColosseumTotalL80Text:: - text "Your total levels" - line "exceed 80!" - prompt - -_ColosseumMaxL20Text:: - text "No #MON can" - line "exceed L20!" - prompt - -_ColosseumMinL15Text:: - text "All #MON must" - line "be at least L15!" - prompt - -_ColosseumTotalL50Text:: - text "Your total levels" - line "exceed 50!" - prompt - -_ColosseumHeightText:: - TX_RAM $CD6D - text " is over" - line "6′8″ tall!" - prompt - -_ColosseumWeightText:: - TX_RAM $CD6D - text " weighs" - line "over 44 pounds!" - prompt - -_ColosseumEvolvedText:: - TX_RAM $CD6D - text " is an" - line "evolved #MON!" - prompt - -_ColosseumIneligibleText:: - text "Your opponent is" - line "ineligible." - prompt - -_ColosseumWhereToText:: - text "Where would you" - line "like to go?" - prompt - -_ColosseumPleaseWaitText:: - text "OK, please wait" - line "just a moment." - prompt - -_ColosseumCanceledText:: - text "The link was" - line "canceled." - prompt - -_ColosseumVersionText:: - text "The game versions" - line "don't match." - prompt -ENDC - -_Char00Text:: ; 8a696 (22:6696) - TX_NUM $FF8C,1,2 +_Char00Text:: + TX_NUM hSpriteIndexOrTextID,1,2 text " ERROR." done -_Char55Text:: ; 8a6a3 (22:66a3) +_Char55Text:: text $4B,"@@" -IF DEF(_YELLOW) -_NoPokemonText:: - text "There are no" - line "#MON here!" - prompt -ENDC - INCLUDE "text/maps/digletts_cave_route_2_entrance.asm" INCLUDE "text/maps/viridian_forest_exit.asm" INCLUDE "text/maps/route_2_house.asm" @@ -2111,10 +1939,9 @@ INCLUDE "text/maps/saffron_gates.asm" INCLUDE "text/maps/daycare_1.asm" -SECTION "Text 4", ROMX, BANK[TEXT_4] +SECTION "Text 4", ROMX[$4000], BANK[TEXT_4] INCLUDE "text/maps/daycare_2.asm" -INCLUDE "text/maps/underground_path_route_5_entrance.asm" INCLUDE "text/maps/underground_path_route_6_entrance.asm" INCLUDE "text/maps/underground_path_route_7_entrance.asm" INCLUDE "text/maps/underground_path_route_7_entrance_unused.asm" @@ -2135,9 +1962,6 @@ INCLUDE "text/maps/route_16_gate_upstairs.asm" INCLUDE "text/maps/route_16_house.asm" INCLUDE "text/maps/route_18_gate.asm" INCLUDE "text/maps/route_18_gate_upstairs.asm" -IF DEF(_OPTION_BEACH_HOUSE) -INCLUDE "text/maps/beach_house.asm" -ENDC INCLUDE "text/maps/pokemon_league_gate.asm" INCLUDE "text/maps/victory_road_2f.asm" INCLUDE "text/maps/bills_house.asm" @@ -2154,7 +1978,7 @@ INCLUDE "text/maps/route_10.asm" INCLUDE "text/maps/route_11_1.asm" -SECTION "Text 5", ROMX, BANK[TEXT_5] +SECTION "Text 5", ROMX[$4000], BANK[TEXT_5] INCLUDE "text/maps/route_11_2.asm" INCLUDE "text/maps/route_12.asm" @@ -2172,33 +1996,33 @@ INCLUDE "text/maps/route_23.asm" INCLUDE "text/maps/route_24_1.asm" -SECTION "Text 6", ROMX, BANK[TEXT_6] +SECTION "Text 6", ROMX[$4000], BANK[TEXT_6] INCLUDE "text/maps/route_24_2.asm" INCLUDE "text/maps/route_25.asm" -_FileDataDestroyedText:: ; 945f1 (25:45f1) +_FileDataDestroyedText:: text "The file data is" line "destroyed!" prompt -_WouldYouLikeToSaveText:: ; 9460e (25:460e) +_WouldYouLikeToSaveText:: text "Would you like to" line "SAVE the game?" done -_GameSavedText:: ; 94630 (25:4630) - text $52, " saved" +_GameSavedText:: + text "<PLAYER> saved" line "the game!" done -_OlderFileWillBeErasedText:: ; 94643 (25:4643) +_OlderFileWillBeErasedText:: text "The older file" line "will be erased to" cont "save. Okay?" done -_WhenYouChangeBoxText:: ; 94671 (25:4671) +_WhenYouChangeBoxText:: text "When you change a" line "#MON BOX, data" cont "will be saved." @@ -2206,305 +2030,306 @@ _WhenYouChangeBoxText:: ; 94671 (25:4671) para "Is that okay?" done -_ChooseABoxText:: ; 946b0 (25:46b0) +_ChooseABoxText:: text "Choose a" - line $4a, " BOX.@@" + line "<pkmn> BOX.@@" -_EvolvedText:: ; 946c2 (25:46c2) +_EvolvedText:: TX_RAM wcf4b text " evolved" done -_IntoText:: ; 946cf (25:46cf) - db $0 +_IntoText:: + text "" line "into @" TX_RAM wcd6d text "!" done -_StoppedEvolvingText:: ; 946dd (25:46dd) +_StoppedEvolvingText:: text "Huh? @" TX_RAM wcf4b - db $0 + text "" line "stopped evolving!" prompt -_IsEvolvingText:: ; 946fb (25:46fb) +_IsEvolvingText:: text "What? @" TX_RAM wcf4b - db $0 + text "" line "is evolving!" done -_FellAsleepText:: ; 94715 (25:4715) - text $59 +_FellAsleepText:: + text "<TARGET>" line "fell asleep!" prompt -_AlreadyAsleepText:: ; 94725 (25:4725) - text $59, "'s" +_AlreadyAsleepText:: + text "<TARGET>'s" line "already asleep!" prompt -_PoisonedText:: ; 94739 (25:4739) - text $59 +_PoisonedText:: + text "<TARGET>" line "was poisoned!" prompt -_BadlyPoisonedText:: ; 9474a (25:474a) - text $59, "'s" +_BadlyPoisonedText:: + text "<TARGET>'s" line "badly poisoned!" prompt -_BurnedText:: ; 9475e (25:475e) - text $59 +_BurnedText:: + text "<TARGET>" line "was burned!" prompt -_FrozenText:: ; 9476d (25:476d) - text $59 +_FrozenText:: + text "<TARGET>" line "was frozen solid!" prompt -_FireDefrostedText:: ; 94782 (25:4782) +_FireDefrostedText:: text "Fire defrosted" - line $59, "!" + line "<TARGET>!" prompt -_MonsStatsRoseText:: ; 94795 (25:4795) - text $5a, "'s" +_MonsStatsRoseText:: + text "<USER>'s" line "@" TX_RAM wcf4b text "@@" -_GreatlyRoseText:: ; 947a0 (25:47a0) +_GreatlyRoseText:: text $4c, "greatly@@" -_RoseText:: ; 947ab (25:47ab) +_RoseText:: text " rose!" prompt -_MonsStatsFellText:: ; 947b3 (25:47b3) - text $59, "'s" +_MonsStatsFellText:: + text "<TARGET>'s" line "@" TX_RAM wcf4b text "@@" -_GreatlyFellText:: ; 947be (25:47be) +_GreatlyFellText:: text $4c, "greatly@@" -_FellText:: ; 947c9 (25:47c9) +_FellText:: text " fell!" prompt -_RanFromBattleText:: ; 947d1 (25:47d1) - text $5a +_RanFromBattleText:: + text "<USER>" line "ran from battle!" prompt -_RanAwayScaredText:: ; 947e5 (25:47e5) - text $59 +_RanAwayScaredText:: + text "<TARGET>" line "ran away scared!" prompt -_WasBlownAwayText:: ; 947f9 (25:47f9) - text $59 +_WasBlownAwayText:: + text "<TARGET>" line "was blown away!" prompt -_ChargeMoveEffectText:: ; 9480c (25:480c) - text $5a, "@@" +_ChargeMoveEffectText:: + text "<USER>@@" -_MadeWhirlwindText:: ; 94810 (25:4810) - db $0 +_MadeWhirlwindText:: + text "" line "made a whirlwind!" prompt -_TookInSunlightText:: ; 94824 (25:4824) - db $0 +_TookInSunlightText:: + text "" line "took in sunlight!" prompt -_LoweredItsHeadText:: ; 94838 (25:4838) - db $0 +_LoweredItsHeadText:: + text "" line "lowered its head!" prompt -_SkyAttackGlowingText:: ; 9484c (25:484c) - db $0 +_SkyAttackGlowingText:: + text "" line "is glowing!" prompt -_FlewUpHighText:: ; 9485a (25:485a) - db $0 +_FlewUpHighText:: + text "" line "flew up high!" prompt -_DugAHoleText:: ; 9486a (25:486a) - db $0 +_DugAHoleText:: + text "" line "dug a hole!" prompt -_BecameConfusedText:: ; 94878 (25:4878) - text $59 +_BecameConfusedText:: + text "<TARGET>" line "became confused!" prompt -_MimicLearnedMoveText:: ; 9488c (25:488c) - text $5a +_MimicLearnedMoveText:: + text "<USER>" line "learned" cont "@" TX_RAM wcd6d text "!" prompt -_MoveWasDisabledText:: ; 9489e (25:489e) - text $59, "'s" +_MoveWasDisabledText:: + text "<TARGET>'s" line "@" TX_RAM wcd6d text " was" cont "disabled!" prompt -_NothingHappenedText:: ; 948b6 (25:48b6) +_NothingHappenedText:: text "Nothing happened!" prompt -_NoEffectText:: ; 948c9 (25:48c9) +_NoEffectText:: text "No effect!" prompt -_ButItFailedText:: ; 948d5 (25:48d5) +_ButItFailedText:: text "But, it failed! " prompt -_DidntAffectText:: ; 948e7 (25:48e7) +_DidntAffectText:: text "It didn't affect" - line $59, "!" + line "<TARGET>!" prompt -_IsUnaffectedText:: ; 948fb (25:48fb) - text $59 +_IsUnaffectedText:: + text "<TARGET>" line "is unaffected!" prompt -_ParalyzedMayNotAttackText:: ; 9490d (25:490d) - text $59, "'s" +_ParalyzedMayNotAttackText:: + text "<TARGET>'s" line "paralyzed! It may" cont "not attack!" prompt -_SubstituteText:: ; 9492f (25:492f) +_SubstituteText:: text "It created a" line "SUBSTITUTE!" prompt -_HasSubstituteText:: ; 94949 (25:4949) - text $5a +_HasSubstituteText:: + text "<USER>" line "has a SUBSTITUTE!" prompt -_TooWeakSubstituteText:: ; 9495e (25:495e) +_TooWeakSubstituteText:: text "Too weak to make" line "a SUBSTITUTE!" prompt -_CoinsScatteredText:: ; 9497e (25:497e) +_CoinsScatteredText:: text "Coins scattered" line "everywhere!" prompt -_GettingPumpedText:: ; 9499b (25:499b) +_GettingPumpedText:: text $5a, "'s" line "getting pumped!" prompt -_WasSeededText:: ; 949af (25:49af) - text $59 +_WasSeededText:: + text "<TARGET>" line "was seeded!" prompt -_EvadedAttackText:: ; 949be (25:49be) - text $59 +_EvadedAttackText:: + text "<TARGET>" line "evaded attack!" prompt -_HitWithRecoilText:: ; 949d0 (25:49d0) - text $5a, "'s" +_HitWithRecoilText:: + text "<USER>'s" line "hit with recoil!" prompt -_ConvertedTypeText:: ; 949e5 (25:49e5) +_ConvertedTypeText:: text "Converted type to" - line $59, "'s!" + line "<TARGET>'s!" prompt -_StatusChangesEliminatedText:: ; 949fc (25:49fc) +_StatusChangesEliminatedText:: text "All STATUS changes" line "are eliminated!" prompt -_StartedSleepingEffect:: ; 94a20 (25:4a20) - text $5a +_StartedSleepingEffect:: + text "<USER>" line "started sleeping!" done -_FellAsleepBecameHealthyText:: ; 94a35 (25:4a35) - text $5a +_FellAsleepBecameHealthyText:: + text "<USER>" line "fell asleep and" cont "became healthy!" done -_RegainedHealthText:: ; 94a58 (25:4a58) - text $5a +_RegainedHealthText:: + text "<USER>" line "regained health!" prompt -_TransformedText:: ; 94a6c (25:4a6c) - text $5a +_TransformedText:: + text "<USER>" line "transformed into" cont "@" TX_RAM wcd6d text "!" prompt -_LightScreenProtectedText:: ; 94a87 (25:4a87) - text $5a, "'s" +_LightScreenProtectedText:: + text "<USER>'s" line "protected against" cont "special attacks!" prompt -_ReflectGainedArmorText:: ; 94aae (25:4aae) - text $5a +_ReflectGainedArmorText:: + text "<USER>" line "gained armor!" prompt -_ShroudedInMistText:: ; 94abf (25:4abf) - text $5a, "'s" +_ShroudedInMistText:: + text "<USER>'s" line "shrouded in mist!" prompt -_SuckedHealthText:: ; 94ad5 (25:4ad5) +_SuckedHealthText:: text "Sucked health from" - line $59, "!" + line "<TARGET>!" prompt -_DreamWasEatenText:: ; 94aec (25:4aec) - text $59, "'s" +_DreamWasEatenText:: + text "<TARGET>'s" line "dream was eaten!" prompt -_BattleCenterMText1:: ; 94b01 (25:4b01) +_TradeCenterText1:: text "!" done -_TradeCenterMText1:: ; 94b04 (25:4b04) +_ColosseumText1:: text "!" done INCLUDE "text/maps/reds_house_1f.asm" INCLUDE "text/maps/blues_house.asm" INCLUDE "text/maps/oaks_lab.asm" +INCLUDE "text/maps/viridian_pokecenter.asm" INCLUDE "text/maps/viridian_mart.asm" INCLUDE "text/maps/school.asm" INCLUDE "text/maps/viridian_house.asm" @@ -2514,7 +2339,7 @@ INCLUDE "text/maps/museum_2f.asm" INCLUDE "text/maps/pewter_gym_1.asm" -SECTION "Text 7", ROMX, BANK[TEXT_7] +SECTION "Text 7", ROMX[$4000], BANK[TEXT_7] INCLUDE "text/maps/pewter_gym_2.asm" INCLUDE "text/maps/pewter_house_1.asm" @@ -2546,7 +2371,7 @@ INCLUDE "text/maps/vermilion_mart.asm" INCLUDE "text/maps/vermilion_gym_1.asm" -SECTION "Text 8", ROMX, BANK[TEXT_8] +SECTION "Text 8", ROMX[$4000], BANK[TEXT_8] INCLUDE "text/maps/vermilion_gym_2.asm" INCLUDE "text/maps/vermilion_house.asm" @@ -2578,7 +2403,7 @@ INCLUDE "text/maps/safari_zone_entrance.asm" INCLUDE "text/maps/fuchsia_gym_1.asm" -SECTION "Text 9", ROMX, BANK[TEXT_9] +SECTION "Text 9", ROMX[$4000], BANK[TEXT_9] INCLUDE "text/maps/fuchsia_gym_2.asm" INCLUDE "text/maps/fuchsia_meeting_room.asm" @@ -2602,119 +2427,119 @@ INCLUDE "text/maps/silph_co_1f.asm" INCLUDE "text/maps/saffron_pokecenter.asm" INCLUDE "text/maps/mr_psychics_house.asm" -_PokemartGreetingText:: ; a259c (28:659c) +_PokemartGreetingText:: text "Hi there!" next "May I help you?" done -_PokemonFaintedText:: ; a25b7 (28:65b7) +_PokemonFaintedText:: TX_RAM wcd6d - db $0 + text "" line "fainted!" done -_PlayerBlackedOutText:: ; a25c5 (28:65c5) - text $52, " is out of" +_PlayerBlackedOutText:: + text "<PLAYER> is out of" line "useable #MON!" - para $52, " blacked" + para "<PLAYER> blacked" line "out!" prompt -_RepelWoreOffText:: ; a25ef (28:65ef) +_RepelWoreOffText:: text "REPEL's effect" line "wore off." done -_PokemartBuyingGreetingText:: ; a2608 (28:6608) +_PokemartBuyingGreetingText:: text "Take your time." done -_PokemartTellBuyPriceText:: ; a2619 (28:6619) +_PokemartTellBuyPriceText:: TX_RAM wcf4b text "?" line "That will be" cont "¥@" - TX_BCD $ff9f, $c3 + TX_BCD hMoney, 3 | LEADING_ZEROES | LEFT_ALIGN text ". OK?" done -_PokemartBoughtItemText:: ; a2639 (28:6639) +_PokemartBoughtItemText:: text "Here you are!" line "Thank you!" prompt -_PokemartNotEnoughMoneyText:: ; a2653 (28:6653) +_PokemartNotEnoughMoneyText:: text "You don't have" line "enough money." prompt -_PokemartItemBagFullText:: ; a2670 (28:6670) +_PokemartItemBagFullText:: text "You can't carry" line "any more items." prompt -_PokemonSellingGreetingText:: ; a2690 (28:6690) +_PokemonSellingGreetingText:: text "What would you" line "like to sell?" done -_PokemartTellSellPriceText:: ; a26ae (28:66ae) +_PokemartTellSellPriceText:: text "I can pay you" line "¥@" - TX_BCD $ff9f, $c3 + TX_BCD hMoney, 3 | LEADING_ZEROES | LEFT_ALIGN text " for that." done -_PokemartItemBagEmptyText:: ; a26cf (28:66cf) +_PokemartItemBagEmptyText:: text "You don't have" line "anything to sell." prompt -_PokemartUnsellableItemText:: ; a26f0 (28:66f0) +_PokemartUnsellableItemText:: text "I can't put a" line "price on that." prompt -_PokemartThankYouText:: ; a270d (28:670d) +_PokemartThankYouText:: text "Thank you!" done -_PokemartAnythingElseText:: ; a2719 (28:6719) +_PokemartAnythingElseText:: text "Is there anything" line "else I can do?" done -_LearnedMove1Text:: ; a273b (28:673b) - TX_RAM wd036 +_LearnedMove1Text:: + TX_RAM wLearnMoveMonName text " learned" line "@" TX_RAM wcf4b text "!@@" -_WhichMoveToForgetText:: ; a2750 (28:6750) +_WhichMoveToForgetText:: text "Which move should" next "be forgotten?" done -_AbandonLearningText:: ; a2771 (28:6771) +_AbandonLearningText:: text "Abandon learning" line "@" TX_RAM wcf4b text "?" done -_DidNotLearnText:: ; a278a (28:678a) - TX_RAM wd036 - db $0 +_DidNotLearnText:: + TX_RAM wLearnMoveMonName + text "" line "did not learn" cont "@" TX_RAM wcf4b text "!" prompt -_TryingToLearnText:: ; a27a4 (28:67a4) - TX_RAM wd036 +_TryingToLearnText:: + TX_RAM wLearnMoveMonName text " is" line "trying to learn" cont "@" @@ -2722,8 +2547,8 @@ _TryingToLearnText:: ; a27a4 (28:67a4) text "!" para "But, @" - TX_RAM wd036 - db $0 + TX_RAM wLearnMoveMonName + text "" line "can't learn more" cont "than 4 moves!" @@ -2734,16 +2559,16 @@ _TryingToLearnText:: ; a27a4 (28:67a4) text "?" done -_OneTwoAndText:: ; a2819 (28:6819) +_OneTwoAndText:: text "1, 2 and...@@" -_PoofText:: ; a2827 (28:6827) +_PoofText:: text " Poof!@@" -_ForgotAndText:: ; a2830 (28:6830) - db $0 +_ForgotAndText:: + text "" para "@" - TX_RAM wd036 + TX_RAM wLearnMoveMonName text " forgot" line "@" TX_RAM wcd6d @@ -2752,12 +2577,12 @@ _ForgotAndText:: ; a2830 (28:6830) para "And..." prompt -_HMCantDeleteText:: ; a284d (28:684d) +_HMCantDeleteText:: text "HM techniques" line "can't be deleted!" prompt -_PokemonCenterWelcomeText:: ; a286d (28:686d) +_PokemonCenterWelcomeText:: text "Welcome to our" line "#MON CENTER!" @@ -2766,40 +2591,40 @@ _PokemonCenterWelcomeText:: ; a286d (28:686d) cont "perfect health!" prompt -_ShallWeHealYourPokemonText:: ; a28b4 (28:68b4) +_ShallWeHealYourPokemonText:: text "Shall we heal your" line "#MON?" done -_NeedYourPokemonText:: ; a28ce (28:68ce) +_NeedYourPokemonText:: text "OK. We'll need" line "your #MON." done -_PokemonFightingFitText:: ; a28e8 (28:68e8) +_PokemonFightingFitText:: text "Thank you!" line "Your #MON are" cont "fighting fit!" prompt -_PokemonCenterFarewellText:: ; a2910 (28:6910) +_PokemonCenterFarewellText:: text "We hope to see" line "you again!" done -_CableClubNPCAreaReservedFor2FriendsLinkedByCableText:: ; a292b (28:692b) +_CableClubNPCAreaReservedFor2FriendsLinkedByCableText:: text "This area is" line "reserved for 2" cont "friends who are" cont "linked by cable." done -_CableClubNPCWelcomeText:: ; a2969 (28:6969) +_CableClubNPCWelcomeText:: text "Welcome to the" line "Cable Club!" done -_CableClubNPCPleaseApplyHereHaveToSaveText:: ; a2985 (28:6985) +_CableClubNPCPleaseApplyHereHaveToSaveText:: text "Please apply here." para "Before opening" @@ -2807,10 +2632,10 @@ _CableClubNPCPleaseApplyHereHaveToSaveText:: ; a2985 (28:6985) cont "to save the game." done -_CableClubNPCPleaseWaitText:: ; a29cc (28:69cc) +_CableClubNPCPleaseWaitText:: text "Please wait.@@" -_CableClubNPCLinkClosedBecauseOfInactivityText:: ; a29db (28:69db) +_CableClubNPCLinkClosedBecauseOfInactivityText:: text "The link has been" line "closed because of" cont "inactivity." @@ -2821,88 +2646,88 @@ _CableClubNPCLinkClosedBecauseOfInactivityText:: ; a29db (28:69db) done -SECTION "Text 10", ROMX, BANK[TEXT_10] +SECTION "Text 10", ROMX[$4000], BANK[TEXT_10] -_CableClubNPCPleaseComeAgainText:: ; a4000 (29:4000) +_CableClubNPCPleaseComeAgainText:: text "Please come again!" done -_CableClubNPCMakingPreparationsText:: ; a4014 (29:4014) +_CableClubNPCMakingPreparationsText:: text "We're making" line "preparations." cont "Please wait." done -_UsedStrengthText:: ; a403c (29:403c) +_UsedStrengthText:: TX_RAM wcd6d text " used" line "STRENGTH.@@" -_CanMoveBouldersText:: ; a4051 (29:4051) +_CanMoveBouldersText:: TX_RAM wcd6d text " can" line "move boulders." prompt -_CurrentTooFastText:: ; a4069 (29:4069) +_CurrentTooFastText:: text "The current is" line "much too fast!" prompt -_CyclingIsFunText:: ; a4088 (29:4088) +_CyclingIsFunText:: text "Cycling is fun!" line "Forget SURFing!" prompt -_FlashLightsAreaText:: ; a40a9 (29:40a9) +_FlashLightsAreaText:: text "A blinding FLASH" line "lights the area!" prompt -_WarpToLastPokemonCenterText:: ; a40cc (29:40cc) +_WarpToLastPokemonCenterText:: text "Warp to the last" line "#MON CENTER." done -_CannotUseTeleportNowText:: ; a40eb (29:40eb) +_CannotUseTeleportNowText:: TX_RAM wcd6d text " can't" line "use TELEPORT now." prompt -_CannotFlyHereText:: ; a4107 (29:4107) +_CannotFlyHereText:: TX_RAM wcd6d text " can't" line "FLY here." prompt -_NotHealthyEnoughText:: ; a411b (29:411b) +_NotHealthyEnoughText:: text "Not healthy" line "enough." prompt -_NewBadgeRequiredText:: ; a4130 (29:4130) +_NewBadgeRequiredText:: text "No! A new BADGE" line "is required." prompt -_CannotUseItemsHereText:: ; a414e (29:414e) +_CannotUseItemsHereText:: text "You can't use items" line "here." prompt -_CannotGetOffHereText:: ; a4168 (29:4168) +_CannotGetOffHereText:: text "You can't get off" line "here." prompt -_GotMonText:: ; a4180 (29:4180) - text $52, " got" +_GotMonText:: + text "<PLAYER> got" line "@" TX_RAM wcd6d text "!@@" -_SetToBoxText:: ; a418f (29:418f) +_SetToBoxText:: text "There's no more" line "room for #MON!" cont "@" @@ -2914,7 +2739,7 @@ _SetToBoxText:: ; a418f (29:418f) text " on PC!" done -_BoxIsFullText:: ; a41d6 (29:41d6) +_BoxIsFullText:: text "There's no more" line "room for #MON!" @@ -2937,7 +2762,7 @@ INCLUDE "text/maps/fuchsia_city.asm" INCLUDE "text/maps/cinnabar_island.asm" INCLUDE "text/maps/saffron_city.asm" -_ItemUseBallText00:: ; a6729 (29:6729) +_ItemUseBallText00:: text "It dodged the" line "thrown BALL!" @@ -2945,67 +2770,67 @@ _ItemUseBallText00:: ; a6729 (29:6729) line "can't be caught!" prompt -_ItemUseBallText01:: ; a675f (29:675f) +_ItemUseBallText01:: text "You missed the" line "#MON!" prompt -_ItemUseBallText02:: ; a6775 (29:6775) +_ItemUseBallText02:: text "Darn! The #MON" line "broke free!" prompt -_ItemUseBallText03:: ; a6791 (29:6791) +_ItemUseBallText03:: text "Aww! It appeared" line "to be caught! " prompt -_ItemUseBallText04:: ; a67b2 (29:67b2) +_ItemUseBallText04:: text "Shoot! It was so" line "close too!" prompt -_ItemUseBallText05:: ; a67cf (29:67cf) +_ItemUseBallText05:: text "All right!" line "@" TX_RAM wEnemyMonNick text " was" cont "caught!@@" -_ItemUseBallText07:: ; a67ee (29:67ee) +_ItemUseBallText07:: TX_RAM wBoxMonNicks text " was" line "transferred to" cont "BILL's PC!" prompt -_ItemUseBallText08:: ; a6810 (29:6810) +_ItemUseBallText08:: TX_RAM wBoxMonNicks text " was" line "transferred to" cont "someone's PC!" prompt -_ItemUseBallText06:: ; a6835 (29:6835) +_ItemUseBallText06:: text "New #DEX data" line "will be added for" cont "@" TX_RAM wEnemyMonNick text "!@@" -_SurfingGotOnText:: ; a685e (29:685e) - text $52, " got on" +_SurfingGotOnText:: + text "<PLAYER> got on" line "@" TX_RAM wcd6d text "!" prompt -_SurfingNoPlaceToGetOffText:: ; a686f (29:686f) +_SurfingNoPlaceToGetOffText:: text "There's no place" line "to get off!" prompt -_VitaminStatRoseText:: ; a688c (29:688c) +_VitaminStatRoseText:: TX_RAM wcd6d text "'s" line "@" @@ -3013,22 +2838,22 @@ _VitaminStatRoseText:: ; a688c (29:688c) text " rose." prompt -_VitaminNoEffectText:: ; a689e (29:689e) +_VitaminNoEffectText:: text "It won't have any" line "effect." prompt -_ThrewBaitText:: ; a68b8 (29:68b8) - text $52, " threw" +_ThrewBaitText:: + text "<PLAYER> threw" line "some BAIT." done -_ThrewRockText:: ; a68cc (29:68cc) - text $52, " threw a" +_ThrewRockText:: + text "<PLAYER> threw a" line "ROCK." done -_PlayedFluteNoEffectText:: ; a68dd (29:68dd) +_PlayedFluteNoEffectText:: text "Played the #" line "FLUTE." @@ -3036,68 +2861,68 @@ _PlayedFluteNoEffectText:: ; a68dd (29:68dd) line "catchy tune!" prompt -_FluteWokeUpText:: ; a690c (29:690c) +_FluteWokeUpText:: text "All sleeping" line "#MON woke up." prompt -_PlayedFluteHadEffectText:: ; a6928 (29:6928) - text $52, " played the" +_PlayedFluteHadEffectText:: + text "<PLAYER> played the" line "# FLUTE.@@" -_CoinCaseNumCoinsText:: ; a6940 (29:6940) +_CoinCaseNumCoinsText:: text "Coins" line "@" - TX_BCD wPlayerCoins, $c2 + TX_BCD wPlayerCoins, 2 | LEADING_ZEROES | LEFT_ALIGN text " " prompt -_ItemfinderFoundItemText:: ; a694f (29:694f) +_ItemfinderFoundItemText:: text "Yes! ITEMFINDER" line "indicates there's" cont "an item nearby." prompt -_ItemfinderFoundNothingText:: ; a6981 (29:6981) +_ItemfinderFoundNothingText:: text "Nope! ITEMFINDER" line "isn't responding." prompt -_RaisePPWhichTechniqueText:: ; a69a4 (29:69a4) +_RaisePPWhichTechniqueText:: text "Raise PP of which" line "technique?" done -_RestorePPWhichTechniqueText:: ; a69c2 (29:69c2) +_RestorePPWhichTechniqueText:: text "Restore PP of" line "which technique?" done -_PPMaxedOutText:: ; a69e2 (29:69e2) +_PPMaxedOutText:: TX_RAM wcf4b text "'s PP" line "is maxed out." prompt -_PPIncreasedText:: ; a69f9 (29:69f9) +_PPIncreasedText:: TX_RAM wcf4b text "'s PP" line "increased." prompt -_PPRestoredText:: ; a6a0d (29:6a0d) +_PPRestoredText:: text "PP was restored." prompt -_BootedUpTMText:: ; a6a1f (29:6a1f) +_BootedUpTMText:: text "Booted up a TM!" prompt -_BootedUpHMText:: ; a6a30 (29:6a30) +_BootedUpHMText:: text "Booted up an HM!" prompt -_TeachMachineMoveText:: ; a6a42 (29:6a42) +_TeachMachineMoveText:: text "It contained" line "@" TX_RAM wcf4b @@ -3105,11 +2930,11 @@ _TeachMachineMoveText:: ; a6a42 (29:6a42) para "Teach @" TX_RAM wcf4b - db $0 + text "" line "to a #MON?" done -_MonCannotLearnMachineMoveText:: ; a6a6e (29:6a6e) +_MonCannotLearnMachineMoveText:: TX_RAM wcd6d text " is not" line "compatible with" @@ -3123,97 +2948,97 @@ _MonCannotLearnMachineMoveText:: ; a6a6e (29:6a6e) text "." prompt -_ItemUseNotTimeText:: ; a6aa6 (29:6aa6) - text "OAK: ", $52, "!" +_ItemUseNotTimeText:: + text "OAK: <PLAYER>!" line "This isn't the" cont "time to use that! " prompt -_ItemUseNotYoursToUseText:: ; a6ad0 (29:6ad0) +_ItemUseNotYoursToUseText:: text "This isn't yours" line "to use!" prompt -_ItemUseNoEffectText:: ; a6ae9 (29:6ae9) +_ItemUseNoEffectText:: text "It won't have any" line "effect." prompt -_ThrowBallAtTrainerMonText1:: ; a6b03 (29:6b03) +_ThrowBallAtTrainerMonText1:: text "The trainer" line "blocked the BALL!" prompt -_ThrowBallAtTrainerMonText2:: ; a6b22 (29:6b22) +_ThrowBallAtTrainerMonText2:: text "Don't be a thief!" prompt -_NoCyclingAllowedHereText:: ; a6b34 (29:6b34) +_NoCyclingAllowedHereText:: text "No cycling" next "allowed here." prompt -_NoSurfingHereText:: ; a6b4e (29:6b4e) +_NoSurfingHereText:: text "No SURFing on" line "@" TX_RAM wcd6d text " here!" prompt -_BoxFullCannotThrowBallText:: ; a6b69 (29:6b69) +_BoxFullCannotThrowBallText:: text "The #MON BOX" line "is full! Can't" cont "use that item!" prompt -SECTION "Text 11", ROMX, BANK[TEXT_11] +SECTION "Text 11", ROMX[$4000], BANK[TEXT_11] -_ItemUseText001:: ; a8000 (2a:4000) - text $52," used@@" +_ItemUseText001:: + text "<PLAYER> used@@" -_ItemUseText002:: ; a8009 (2a:4009) +_ItemUseText002:: TX_RAM wcf4b text "!" done -_GotOnBicycleText1:: ; a800f (2a:400f) - text $52, " got on the@@" +_GotOnBicycleText1:: + text "<PLAYER> got on the@@" -_GotOnBicycleText2:: ; a801e (2a:401e) +_GotOnBicycleText2:: TX_RAM wcf4b text "!" prompt -_GotOffBicycleText1:: ; a8024 (2a:4024) - text $52, " got off@@" +_GotOffBicycleText1:: + text "<PLAYER> got off@@" -_GotOffBicycleText2:: ; a8030 (2a:4030) +_GotOffBicycleText2:: text "the @" TX_RAM wcf4b text "." prompt -_ThrewAwayItemText:: ; a803c (2a:403c) +_ThrewAwayItemText:: text "Threw away" line "@" TX_RAM wcd6d text "." prompt -_IsItOKToTossItemText:: ; a804f (2a:404f) +_IsItOKToTossItemText:: text "Is it OK to toss" line "@" TX_RAM wcf4b text "?" prompt -_TooImportantToTossText:: ; a8068 (2a:4068) +_TooImportantToTossText:: text "That's too impor-" line "tant to toss!" prompt -_AlreadyKnowsText:: ; a8088 (2a:4088) +_AlreadyKnowsText:: TX_RAM wcd6d text " knows" line "@" @@ -3221,13 +3046,13 @@ _AlreadyKnowsText:: ; a8088 (2a:4088) text "!" prompt -_ConnectCableText:: ; a809a (2a:409a) +_ConnectCableText:: text "Okay, connect the" line "cable like so!" prompt -_TradedForText:: ; a80bc (2a:40bc) - text $52, " traded" +_TradedForText:: + text "<PLAYER> traded" line "@" TX_RAM wInGameTradeGiveMonName text " for" @@ -3235,7 +3060,7 @@ _TradedForText:: ; a80bc (2a:40bc) TX_RAM wInGameTradeReceiveMonName text "!@@" -_WannaTrade1Text:: ; a80d8 (2a:40d8) +_WannaTrade1Text:: text "I'm looking for" line "@" TX_RAM wInGameTradeGiveMonName @@ -3247,12 +3072,12 @@ _WannaTrade1Text:: ; a80d8 (2a:40d8) text "? " done -_NoTrade1Text:: ; a810b (2a:410b) +_NoTrade1Text:: text "Awww!" line "Oh well..." done -_WrongMon1Text:: ; a811d (2a:411d) +_WrongMon1Text:: text "What? That's not" line "@" TX_RAM wInGameTradeGiveMonName @@ -3262,35 +3087,35 @@ _WrongMon1Text:: ; a811d (2a:411d) line "come back here!" done -_Thanks1Text:: ; a8155 (2a:4155) +_Thanks1Text:: text "Hey thanks!" done -_AfterTrade1Text:: ; a8162 (2a:4162) +_AfterTrade1Text:: text "Isn't my old" line "@" TX_RAM wInGameTradeReceiveMonName text " great?" done -_WannaTrade2Text:: ; a817c (2a:417c) +_WannaTrade2Text:: text "Hello there! Do" line "you want to trade" para "your @" TX_RAM wInGameTradeGiveMonName - db $0 + text "" line "for @" TX_RAM wInGameTradeReceiveMonName text "?" done -_NoTrade2Text:: ; a81b5 (2a:41b5) +_NoTrade2Text:: text "Well, if you" line "don't want to..." done -_WrongMon2Text:: ; a81d3 (2a:41d3) +_WrongMon2Text:: text "Hmmm? This isn't" line "@" TX_RAM wInGameTradeGiveMonName @@ -3300,28 +3125,20 @@ _WrongMon2Text:: ; a81d3 (2a:41d3) line "you get one." done -_Thanks2Text:: ; a8209 (2a:4209) +_Thanks2Text:: text "Thanks!" done -_AfterTrade2Text:: ; a8212 (2a:4212) -IF DEF(_YELLOW) - text "Hello there! Your" - line "old @" - TX_RAM wcd13 - db " is" - cont "magnificent!" -ELSE +_AfterTrade2Text:: text "The @" TX_RAM wInGameTradeGiveMonName text " you" line "traded to me" para "went and evolved!" -ENDC done -_WannaTrade3Text:: ; a8240 (2a:4240) +_WannaTrade3Text:: text "Hi! Do you have" line "@" TX_RAM wInGameTradeGiveMonName @@ -3333,11 +3150,11 @@ _WannaTrade3Text:: ; a8240 (2a:4240) text "?" done -_NoTrade3Text:: ; a8274 (2a:4274) +_NoTrade3Text:: text "That's too bad." done -_WrongMon3Text:: ; a8284 (2a:4284) +_WrongMon3Text:: text "...This is no" line "@" TX_RAM wInGameTradeGiveMonName @@ -3347,15 +3164,11 @@ _WrongMon3Text:: ; a8284 (2a:4284) line "trade it with me!" done -_Thanks3Text:: ; a82bc (2a:42bc) -IF DEF(_YELLOW) - text "Thanks, pal!" -ELSE +_Thanks3Text:: text "Thanks pal!" -ENDC done -_AfterTrade3Text:: ; a82c9 (2a:42c9) +_AfterTrade3Text:: text "How is my old" line "@" TX_RAM wInGameTradeReceiveMonName @@ -3367,24 +3180,23 @@ _AfterTrade3Text:: ; a82c9 (2a:42c9) line "doing great!" done -_NothingToCutText:: ; a82f8 (2a:42f8) +_NothingToCutText:: text "There isn't" line "anything to CUT!" prompt -_UsedCutText:: ; a8315 (2a:4315) +_UsedCutText:: TX_RAM wcd6d text " hacked" line "away with CUT!" prompt -SECTION "Pokedex Text", ROMX, BANK[POKEDEX_TEXT] +SECTION "Pokedex Text", ROMX[$4000], BANK[POKEDEX_TEXT] INCLUDE "text/pokedex.asm" -SECTION "Move Names", ROMX, BANK[MOVE_NAMES] +SECTION "Move Names", ROMX[$4000], BANK[MOVE_NAMES] INCLUDE "text/move_names.asm" - diff --git a/text/credits_text.asm b/text/credits_text.asm index 2c638b9e..a68c33d3 100755 --- a/text/credits_text.asm +++ b/text/credits_text.asm @@ -1,4 +1,4 @@ -CreditsTextPointers: ; 742c3 (1d:42c3) +CreditsTextPointers: dw CredVersion dw CredTajiri dw CredTaOota @@ -64,136 +64,136 @@ CreditsTextPointers: ; 742c3 (1d:42c3) dw CredClub dw CredPAAD -CredVersion: ; 74343 (1d:4343) ; this 1 byte difference makes all bank addresses offset by 1 in the blue version +CredVersion: ; this 1 byte difference makes all bank addresses offset by 1 in the blue version IF DEF(_RED) db -8, "RED VERSION STAFF@" ENDC IF DEF(_BLUE) db -8, "BLUE VERSION STAFF@" ENDC -CredTajiri: ; 74356 (1d:4356) +CredTajiri: db -6, "SATOSHI TAJIRI@" -CredTaOota: ; 74366 (1d:4366) +CredTaOota: db -6, "TAKENORI OOTA@" -CredMorimoto: ; 74375 (1d:4375) +CredMorimoto: db -7, "SHIGEKI MORIMOTO@" -CredWatanabe: ; 74387 (1d:4387) +CredWatanabe: db -7, "TETSUYA WATANABE@" -CredMasuda: ; 74399 (1d:4399) +CredMasuda: db -6, "JUNICHI MASUDA@" -CredNisino: ; 743a9 (1d:43a9) +CredNisino: db -5, "KOHJI NISINO@" -CredSugimori: ; 743b7 (1d:43b7) +CredSugimori: db -5, "KEN SUGIMORI@" -CredNishida: ; 743c5 (1d:43c5) +CredNishida: db -6, "ATSUKO NISHIDA@" -CredMiyamoto: ; 743d5 (1d:43d5) +CredMiyamoto: db -7, "SHIGERU MIYAMOTO@" -CredKawaguchi: ; 743e7 (1d:43e7) +CredKawaguchi: db -8, "TAKASHI KAWAGUCHI@" -CredIshihara: ; 743fa (1d:43fa) +CredIshihara: db -8, "TSUNEKAZU ISHIHARA@" -CredYamauchi: ; 7440e (1d:440e) +CredYamauchi: db -7, "HIROSHI YAMAUCHI@" -CredZinnai: ; 74420 (1d:4420) +CredZinnai: db -7, "HIROYUKI ZINNAI@" -CredHishida: ; 74431 (1d:4431) +CredHishida: db -7, "TATSUYA HISHIDA@" -CredSakai: ; 74442 (1d:4442) +CredSakai: db -6, "YASUHIRO SAKAI@" -CredYamaguchi: ; 74452 (1d:4452) +CredYamaguchi: db -7, "WATARU YAMAGUCHI@" -CredYamamoto: ; 74464 (1d:4464) +CredYamamoto: db -8, "KAZUYUKI YAMAMOTO@" -CredTaniguchi: ; 74477 (1d:4477) +CredTaniguchi: db -8, "RYOHSUKE TANIGUCHI@" -CredNonomura: ; 7448b (1d:448b) +CredNonomura: db -8, "FUMIHIRO NONOMURA@" -CredFuziwara: ; 7449e (1d:449e) +CredFuziwara: db -7, "MOTOFUMI FUZIWARA@" -CredMatsusima: ; 744b1 (1d:44b1) +CredMatsusima: db -7, "KENJI MATSUSIMA@" -CredTomisawa: ; 744c2 (1d:44c2) +CredTomisawa: db -7, "AKIHITO TOMISAWA@" -CredKawamoto: ; 744d4 (1d:44d4) +CredKawamoto: db -7, "HIROSHI KAWAMOTO@" -CredKakei: ; 744e6 (1d:44e6) +CredKakei: db -6, "AKIYOSHI KAKEI@" -CredTsuchiya: ; 744f6 (1d:44f6) +CredTsuchiya: db -7, "KAZUKI TSUCHIYA@" -CredTaNakamura: ; 74507 (1d:4507) +CredTaNakamura: db -6, "TAKEO NAKAMURA@" -CredYuda: ; 74517 (1d:4517) +CredYuda: db -6, "MASAMITSU YUDA@" -CredMon: ; 74527 (1d:4527) +CredMon: db -3, "#MON@" -CredDirector: ; 7452d (1d:452d) +CredDirector: db -3, "DIRECTOR@" -CredProgrammers: ; 74537 (1d:4537) +CredProgrammers: db -5, "PROGRAMMERS@" -CredCharDesign: ; 74544 (1d:4544) +CredCharDesign: db -7, "CHARACTER DESIGN@" -CredMusic: ; 74556 (1d:4556) +CredMusic: db -2, "MUSIC@" -CredSoundEffects: ; 7455d (1d:455d) +CredSoundEffects: db -6, "SOUND EFFECTS@" -CredGameDesign: ; 7456c (1d:456c) +CredGameDesign: db -5, "GAME DESIGN@" -CredMonsterDesign: ; 74579 (1d:4579) +CredMonsterDesign: db -6, "MONSTER DESIGN@" -CredGameScene: ; 74589 (1d:4589) +CredGameScene: db -6, "GAME SCENARIO@" -CredParam: ; 74598 (1d:4598) +CredParam: db -8, "PARAMETRIC DESIGN@" -CredMap: ; 745ab (1d:45ab) +CredMap: db -4, "MAP DESIGN@" -CredTest: ; 745b7 (1d:45b7) +CredTest: db -7, "PRODUCT TESTING@" -CredSpecial: ; 745c8 (1d:45c8) +CredSpecial: db -6, "SPECIAL THANKS@" -CredProducers: ; 745d8 (1d:45d8) +CredProducers: db -4, "PRODUCERS@" -CredProducer: ; 745e3 (1d:45e3) +CredProducer: db -4, "PRODUCER@" -CredExecutive: ; 745ed (1d:45ed) +CredExecutive: db -8, "EXECUTIVE PRODUCER@" -CredTamada: ; 74601 (1d:4601) +CredTamada: db -6, "SOUSUKE TAMADA@" -CredSaOota: ; 74611 (1d:4611) +CredSaOota: db -5, "SATOSHI OOTA@" -CredYoshikawa: ; 7461f (1d:461f) +CredYoshikawa: db -6, "RENA YOSHIKAWA@" -CredToOota: ; 7462f (1d:462f) +CredToOota: db -6, "TOMOMICHI OOTA@" -CredUSStaff: ; 7463f (1d:463f) +CredUSStaff: db -7, "US VERSION STAFF@" -CredUSCoord: ; 74651 (1d:4651) +CredUSCoord: db -7, "US COORDINATION@" -CredTilden: ; 74662 (1d:4662) +CredTilden: db -5, "GAIL TILDEN@" -CredKawakami: ; 7466f (1d:466f) +CredKawakami: db -6, "NAOKO KAWAKAMI@" -CredHiNakamura: ; 7467f (1d:467f) +CredHiNakamura: db -6, "HIRO NAKAMURA@" -CredGiese: ; 7468e (1d:468e) +CredGiese: db -6, "WILLIAM GIESE@" -CredOsborne: ; 7469d (1d:469d) +CredOsborne: db -5, "SARA OSBORNE@" -CredTrans: ; 746ab (1d:46ab) +CredTrans: db -7, "TEXT TRANSLATION@" -CredOgasawara: ; 746bd (1d:46bd) +CredOgasawara: db -6, "NOB OGASAWARA@" -CredIwata: ; 746cc (1d:46cc) +CredIwata: db -5, "SATORU IWATA@" -CredIzushi: ; 746da (1d:46da) +CredIzushi: db -7, "TAKEHIRO IZUSHI@" -CredHarada: ; 746eb (1d:46eb) +CredHarada: db -7, "TAKAHIRO HARADA@" -CredMurakawa: ; 746fc (1d:46fc) +CredMurakawa: db -7, "TERUKI MURAKAWA@" -CredFukui: ; 7470d (1d:470d) +CredFukui: db -5, "KOHTA FUKUI@" -CredClub: ; 7471a (1d:471a) +CredClub: db -9, "NCL SUPER MARIO CLUB@" -CredPAAD: ; 74730 (1d:4730) +CredPAAD: db -5, "PAAD TESTING@" diff --git a/text/item_names.asm b/text/item_names.asm index 3c0f4c49..e436d74d 100755 --- a/text/item_names.asm +++ b/text/item_names.asm @@ -1,4 +1,4 @@ -ItemNames: ; 472b (1:472b) +ItemNames: db "MASTER BALL@" db "ULTRA BALL@" db "GREAT BALL@" diff --git a/text/map_names.asm b/text/map_names.asm index dd8592be..cd9f6640 100755 --- a/text/map_names.asm +++ b/text/map_names.asm @@ -1,107 +1,107 @@ -MapNames: ; 71473 (1c:5473) -PalletTownName: ; 71473 (1c:5473) +MapNames: +PalletTownName: db "PALLET TOWN@" -ViridianCityName: ; 7147f (1c:547f) +ViridianCityName: db "VIRIDIAN CITY@" -PewterCityName: ; 7148d (1c:548d) +PewterCityName: db "PEWTER CITY@" -CeruleanCityName: ; 71499 (1c:5499) +CeruleanCityName: db "CERULEAN CITY@" -LavenderTownName: ; 714a7 (1c:54a7) +LavenderTownName: db "LAVENDER TOWN@" -VermilionCityName: ; 714b5 (1c:54b5) +VermilionCityName: db "VERMILION CITY@" -CeladonCityName: ; 714c4 (1c:54c4) +CeladonCityName: db "CELADON CITY@" -FuchsiaCityName: ; 714d1 (1c:54d1) +FuchsiaCityName: db "FUCHSIA CITY@" -CinnabarIslandName: ; 714de (1c:54de) +CinnabarIslandName: db "CINNABAR ISLAND@" -IndigoPlateauName: ; 714ee (1c:54ee) +IndigoPlateauName: db "INDIGO PLATEAU@" -SaffronCityName: ; 714fd (1c:54fd) +SaffronCityName: db "SAFFRON CITY@" -Route1Name: ; 7150a (1c:550a) +Route1Name: db "ROUTE 1@" -Route2Name: ; 71512 (1c:5512) +Route2Name: db "ROUTE 2@" -Route3Name: ; 7151a (1c:551a) +Route3Name: db "ROUTE 3@" -Route4Name: ; 71522 (1c:5522) +Route4Name: db "ROUTE 4@" -Route5Name: ; 7152a (1c:552a) +Route5Name: db "ROUTE 5@" -Route6Name: ; 71532 (1c:5532) +Route6Name: db "ROUTE 6@" -Route7Name: ; 7153a (1c:553a) +Route7Name: db "ROUTE 7@" -Route8Name: ; 71542 (1c:5542) +Route8Name: db "ROUTE 8@" -Route9Name: ; 7154a (1c:554a) +Route9Name: db "ROUTE 9@" -Route10Name: ; 71552 (1c:5552) +Route10Name: db "ROUTE 10@" -Route11Name: ; 7155b (1c:555b) +Route11Name: db "ROUTE 11@" -Route12Name: ; 71564 (1c:5564) +Route12Name: db "ROUTE 12@" -Route13Name: ; 7156d (1c:556d) +Route13Name: db "ROUTE 13@" -Route14Name: ; 71576 (1c:5576) +Route14Name: db "ROUTE 14@" -Route15Name: ; 7157f (1c:557f) +Route15Name: db "ROUTE 15@" -Route16Name: ; 71588 (1c:5588) +Route16Name: db "ROUTE 16@" -Route17Name: ; 71591 (1c:5591) +Route17Name: db "ROUTE 17@" -Route18Name: ; 7159a (1c:559a) +Route18Name: db "ROUTE 18@" -Route19Name: ; 715a3 (1c:55a3) +Route19Name: db "SEA ROUTE 19@" -Route20Name: ; 715b0 (1c:55b0) +Route20Name: db "SEA ROUTE 20@" -Route21Name: ; 715bd (1c:55bd) +Route21Name: db "SEA ROUTE 21@" -Route22Name: ; 715ca (1c:55ca) +Route22Name: db "ROUTE 22@" -Route23Name: ; 715d3 (1c:55d3) +Route23Name: db "ROUTE 23@" -Route24Name: ; 715dc (1c:55dc) +Route24Name: db "ROUTE 24@" -Route25Name: ; 715e5 (1c:55e5) +Route25Name: db "ROUTE 25@" -ViridianForestName: ; 715ee (1c:55ee) +ViridianForestName: db "VIRIDIAN FOREST@" -MountMoonName: ; 715fe (1c:55fe) +MountMoonName: db "MT.MOON@" -RockTunnelName: ; 71606 (1c:5606) +RockTunnelName: db "ROCK TUNNEL@" -SeaCottageName: ; 71612 (1c:5612) +SeaCottageName: db "SEA COTTAGE@" -SSAnneName: ; 7161e (1c:561e) +SSAnneName: db "S.S.ANNE@" -PokemonLeagueName: ; 71627 (1c:5627) +PokemonLeagueName: db "#MON LEAGUE@" -UndergroundPathName: ; 71633 (1c:5633) +UndergroundPathName: db "UNDERGROUND PATH@" -PokemonTowerName: ; 71644 (1c:5644) +PokemonTowerName: db "#MON TOWER@" -SeafoamIslandsName: ; 7164f (1c:564f) +SeafoamIslandsName: db "SEAFOAM ISLANDS@" -VictoryRoadName: ; 7165f (1c:565f) +VictoryRoadName: db "VICTORY ROAD@" -DiglettsCaveName: ; 7166c (1c:566c) +DiglettsCaveName: db "DIGLETT's CAVE@" -RocketHQName: ; 7167a (1c:567a) +RocketHQName: db "ROCKET HQ@" -SilphCoName: ; 71684 (1c:5684) +SilphCoName: db "SILPH CO.@" -PokemonMansionName: ; 7168e (1c:568e) +PokemonMansionName: db $4a," MANSION@" -SafariZoneName: ; 71698 (1c:5698) +SafariZoneName: db "SAFARI ZONE@" -CeruleanCaveName: ; 716a4 (1c:56a4) +CeruleanCaveName: db "CERULEAN CAVE@" -PowerPlantName: ; 716b2 (1c:56b2) +PowerPlantName: db "POWER PLANT@" diff --git a/text/maps/agatha.asm b/text/maps/agatha.asm index 9e20b7aa..4957f4d4 100644 --- a/text/maps/agatha.asm +++ b/text/maps/agatha.asm @@ -1,4 +1,4 @@ -_AgathaBeforeBattleText:: ; 8686b (21:686b) +_AgathaBeforeBattleText:: text "I am AGATHA of" line "the ELITE FOUR!" @@ -22,17 +22,13 @@ _AgathaBeforeBattleText:: ; 8686b (21:686b) cont "trainer fights!" done -_AgathaEndBattleText:: ; 86970 (21:6970) -IF DEF(_YELLOW) - text "Woo-hoo!" -ELSE +_AgathaEndBattleText:: text "Oh ho!" -ENDC line "You're something" cont "special, child!" prompt -_AgathaAfterBattleText:: ; 86998 (21:6998) +_AgathaAfterBattleText:: text "You win! I see" line "what the old duff" cont "sees in you now!" @@ -42,8 +38,7 @@ _AgathaAfterBattleText:: ; 86998 (21:6998) cont "along now, child!" done -_AgathaText2:: ; 869fd (21:69fd) +_AgathaDontRunAwayText:: text "Someone's voice:" line "Don't run away!" done - diff --git a/text/maps/beach_house.asm b/text/maps/beach_house.asm deleted file mode 100644 index 318b6013..00000000 --- a/text/maps/beach_house.asm +++ /dev/null @@ -1,103 +0,0 @@ -_SurfinDudeText1:: - text "Whoa!" - - para "Your PIKACHU knows" - line "how to SURF! So," - cont "I'm not alone..." - - para "Great! You earned" - line "the right to SURF" - cont "with the DUDE!" - - para "Give it a go?" - done - -_SurfinDudeText2:: - text "Come SURF anytime," - line "my friend!" - done - -_SurfinDudeText3:: - text "Wanna go SURF?" - done - -_SurfinDudeText4:: - text "Dogs and burgers" - line "on special today!" - done - -_BeachHousePikachuText:: - text "PIKACHU: Pikaa." - done - -_BeachHouseSign1Text1:: - text "SURFIN' DUDE's" - line "scribbles..." - - para "When I shoot the" - line "tube, the tunes" - cont "hit the groove!" - done - -_BeachHouseSign1Text2:: - text "30 years of waves!" - line "SURFIN' DUDE" - done - -_BeachHouseSign2Text1:: - text "SURFING TIP 1!" - - para "After flips, line" - line "the board up with" - cont "a wave for a cool" - cont "effect!" - done - -_BeachHouseSign2Text2:: - text "SUMMER BEACH HOUSE" - line "#MON welcome!" - done - -_BeachHouseSign3Text1:: - text "SURFING TIP 2!" - - para "Pulling flips in" - line "a jump is totally" - cont "rad!" - done - -_BeachHouseSign3Text2:: - text "The sea unites" - line "all in surfdom!" - done - -_BeachHousePrinterText1:: - text "It's some sort of" - line "a machine...@@" - -_BeachHousePrinterText2:: - text "SUMMER BEACH HOUSE" - line "PRINTER, it says.@@" - -_BeachHousePrinterText3:: - text "The Hi.Score is" - line "shown." - - para "PRINT it out?" - done - -_BeachHousePrinterText4:: - text "SUMMER BEACH HOUSE" - line "PRINTER, it says." - - para "The Hi.Score is" - line "shown." - - para "PRINT it out?" - done - -_BeachHousePrinterText5:: - text "PRINT completed.@@" - -_BeachHousePrinterText6:: - text "PRINT error!@@" diff --git a/text/maps/bike_shop.asm b/text/maps/bike_shop.asm index 5f2c3f45..86799865 100644 --- a/text/maps/bike_shop.asm +++ b/text/maps/bike_shop.asm @@ -1,4 +1,4 @@ -_BikeShopText_1d810:: ; 98e03 (26:4e03) +_BikeShopText_1d810:: text "Hi! Welcome to" line "our BIKE SHOP." @@ -6,17 +6,17 @@ _BikeShopText_1d810:: ; 98e03 (26:4e03) line "the BIKE for you!" prompt -_BikeShopText_1d815:: ; 98e45 (26:4e45) +_BikeShopText_1d815:: text "It's a cool BIKE!" line "Do you want it?" done -_BikeShopText_1d81a:: ; 98e67 (26:4e67) +_BikeShopCantAffordText:: text "Sorry! You can't" line "afford it!" prompt -_BikeShopText_1d81f:: ; 98e83 (26:4e83) +_BikeShopText_1d81f:: text "Oh, that's..." para "A BIKE VOUCHER!" @@ -24,17 +24,17 @@ _BikeShopText_1d81f:: ; 98e83 (26:4e83) para "OK! Here you go!" prompt -_BikeShopText_1d824:: ; 98eb2 (26:4eb2) - text $52, " exchanged" +_BikeShopText_1d824:: + text "<PLAYER> exchanged" line "the BIKE VOUCHER" cont "for a BICYCLE.@@" -_BikeShopText_1d82a:: ; 98ee0 (26:4ee0) +_BikeShopComeAgainText:: text "Come back again" line "some time!" done -_BikeShopText_1d82f:: ; 98efc (26:4efc) +_BikeShopText_1d82f:: text "How do you like" line "your new BICYCLE?" @@ -43,12 +43,12 @@ _BikeShopText_1d82f:: ; 98efc (26:4efc) cont "and in caves!" done -_BikeShopText_1d834:: ; 98f4d (26:4f4d) +_BikeShopText_1d834:: text "You better make" line "room for this!" done -_BikeShopText_1d843:: ; 98f6d (26:4f6d) +_BikeShopText_1d843:: text "A plain city BIKE" line "is good enough" cont "for me!" @@ -58,14 +58,13 @@ _BikeShopText_1d843:: ; 98f6d (26:4f6d) cont "on an MTB!" done -_BikeShopText_1d85c:: ; 98fc1 (26:4fc1) +_BikeShopText_1d85c:: text "These BIKEs are" line "cool, but they're" cont "way expensive!" done -_BikeShopText_1d861:: ; 98ff2 (26:4ff2) +_BikeShopText_1d861:: text "Wow. Your BIKE is" line "really cool!" done - diff --git a/text/maps/bills_house.asm b/text/maps/bills_house.asm index 3ec1e3f3..463b13e6 100644 --- a/text/maps/bills_house.asm +++ b/text/maps/bills_house.asm @@ -1,11 +1,4 @@ -IF DEF(_YELLOW) -_BillsHouseDontLeaveText:: - text "Whoa, don't go" - line "anywhere, wait!" - done -ENDC - -_BillsHouseText_1e865:: ; 8d267 (23:5267) +_BillsHouseText_1e865:: text "Hiya! I'm a" line "#MON..." cont "...No I'm not!" @@ -26,7 +19,7 @@ _BillsHouseText_1e865:: ; 8d267 (23:5267) line "Help me out here!" done -_BillsHouseText_1e86a:: ; 8d345 (23:5345) +_BillsHouseText_1e86a:: text "When I'm in the" line "TELEPORTER, go to" cont "my PC and run the" @@ -34,7 +27,7 @@ _BillsHouseText_1e86a:: ; 8d345 (23:5345) cont "System!" done -_BillsHouseText_1e86f:: ; 8d391 (23:5391) +_BillsHouseText_1e86f:: text "No!? Come on, you" line "gotta help a guy" cont "in deep trouble!" @@ -44,7 +37,7 @@ _BillsHouseText_1e86f:: ; 8d391 (23:5391) cont "OK? All right!" prompt -_BillThankYouText:: ; 8d3f5 (23:53f5) +_BillThankYouText:: text "BILL: Yeehah!" line "Thanks, bud! I" cont "owe you one!" @@ -60,18 +53,18 @@ _BillThankYouText:: ; 8d3f5 (23:53f5) cont "maybe this'll do." prompt -_SSTicketReceivedText:: ; 8d499 (23:5499) +_SSTicketReceivedText:: text $52, " received" line "an @" TX_RAM wcf4b text "!@@" -_SSTicketNoRoomText:: ; 8d4b0 (23:54b0) +_SSTicketNoRoomText:: text "You've got too" line "much stuff, bud!" done -_BillsHouseText_1e8cb:: ; 8d4d0 (23:54d0) +_BillsHouseText_1e8cb:: text "That cruise ship," line "S.S.ANNE, is in" cont "VERMILION CITY." @@ -86,10 +79,9 @@ _BillsHouseText_1e8cb:: ; 8d4d0 (23:54d0) cont "instead of me?" done -_BillsHouseText_1e8da:: ; 8d57f (23:557f) +_BillsHouseText_1e8da:: text "BILL: Look, bud," line "just check out" cont "some of my rare" cont "#MON on my PC!" done - diff --git a/text/maps/blues_house.asm b/text/maps/blues_house.asm index a5b155f2..b676ea69 100644 --- a/text/maps/blues_house.asm +++ b/text/maps/blues_house.asm @@ -29,22 +29,13 @@ _DaisyUseMapText:: done _BluesHouseText2:: -IF DEF(_YELLOW) - text "Spending time" - line "with your #MON" - cont "makes them more" - cont "friendly to you." - done -ELSE text "#MON are living" line "things! If they" cont "get tired, give" cont "them a rest!" done -ENDC _BluesHouseText3:: text "It's a big map!" line "This is useful!" done - diff --git a/text/maps/bruno.asm b/text/maps/bruno.asm index f704a4a6..39898eb5 100644 --- a/text/maps/bruno.asm +++ b/text/maps/bruno.asm @@ -1,4 +1,4 @@ -_BrunoBeforeBattleText:: ; 86749 (21:6749) +_BrunoBeforeBattleText:: text "I am BRUNO of" line "the ELITE FOUR!" @@ -20,19 +20,18 @@ _BrunoBeforeBattleText:: ; 86749 (21:6749) para "Hoo hah!" done -_BrunoEndBattleText:: ; 86805 (21:6805) +_BrunoEndBattleText:: text "Why?" line "How could I lose?" prompt -_BrunoAfterBattleText:: ; 8681d (21:681d) +_BrunoAfterBattleText:: text "My job is done!" line "Go face your next" cont "challenge!" done -_UnnamedText_763d2:: ; 8684b (21:684b) +_BrunoDontRunAwayText:: text "Someone's voice:" line "Don't run away!" done - diff --git a/text/maps/celadon_city.asm b/text/maps/celadon_city.asm index 6a02d125..e2470ec1 100644 --- a/text/maps/celadon_city.asm +++ b/text/maps/celadon_city.asm @@ -1,33 +1,25 @@ -_CeladonCityText1:: ; a59fb (29:59fb) +_CeladonCityText1:: text "I got my KOFFING" -IF DEF(_YELLOW) - line "from my friend!" - - para "We get along now," - line "because I was" - cont "very nice to it!" -ELSE line "in CINNABAR!" para "It's nice, but it" line "breathes poison" cont "when it's angry!" -ENDC done -_CeladonCityText2:: ; a5a4b (29:5a4b) +_CeladonCityText2:: text "Heheh! This GYM" line "is great! It's" cont "full of women!" done -_CeladonCityText3:: ; a5a79 (29:5a79) +_CeladonCityText3:: text "The GAME CORNER" line "is bad for our" cont "city's image!" done -_CeladonCityText4:: ; a5aa6 (29:5aa6) +_CeladonCityText4:: text "Moan! I blew it" line "all at the slots!" @@ -36,7 +28,7 @@ _CeladonCityText4:: ; a5aa6 (29:5aa6) cont "coins for prizes!" done -_TM41PreText:: ; a5afd (29:5afd) +_TM41PreText:: text "Hello, there!" para "I've seen you," @@ -47,13 +39,13 @@ _TM41PreText:: ; a5afd (29:5afd) line "dropping by!" prompt -_ReceivedTM41Text:: ; a5b5a (29:5b5a) +_ReceivedTM41Text:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_TM41ExplanationText:: ; a5b6e (29:5b6e) +_TM41ExplanationText:: text "TM41 teaches" line "SOFTBOILED!" @@ -64,12 +56,12 @@ _TM41ExplanationText:: ; a5b6e (29:5b6e) line "CHANSEY!" done -_TM41NoRoomText:: ; a5bb8 (29:5bb8) +_TM41NoRoomText:: text "Oh, your pack is" line "full of items!" done -_CeladonCityText6:: ; a5bd9 (29:5bd9) +_CeladonCityText6:: text "This is my trusted" line "pal, POLIWRATH!" @@ -78,21 +70,21 @@ _CeladonCityText6:: ; a5bd9 (29:5bd9) cont "used WATER STONE!" done -_CeladonCityText7:: ; a5c30 (29:5c30) +_CeladonCityText7:: text "POLIWRATH: Ribi" line "ribit!@@" -_CeladonCityText8:: ; a5c49 (29:5c49) +_CeladonCityText8:: text "What are you" line "staring at?" done -_CeladonCityText9:: ; a5c63 (29:5c63) +_CeladonCityText9:: text "Keep out of TEAM" line "ROCKET's way!" done -_CeladonCityText10:: ; a5c82 (29:5c82) +_CeladonCityText10:: text "TRAINER TIPS" para "X ACCURACY boosts" @@ -108,36 +100,32 @@ _CeladonCityText10:: ; a5c82 (29:5c82) cont "STORE!" done -_CeladonCityText11:: ; a5d18 (29:5d18) +_CeladonCityText11:: text "CELADON CITY" line "The City of" cont "Rainbow Dreams" done -_CeladonCityText13:: ; a5d41 (29:5d41) +_CeladonCityText13:: text "CELADON CITY" line "#MON GYM" cont "LEADER: ERIKA" -IF DEF(_YELLOW) - para "The Nature-Loving" -ELSE para "The Nature Loving" -ENDC line "Princess!" done -_CeladonCityText14:: ; a5d82 (29:5d82) +_CeladonCityText14:: text "CELADON MANSION" done -_CeladonCityText15:: ; a5d93 (29:5d93) +_CeladonCityText15:: text "Find what you" line "need at CELADON" cont "DEPT. STORE!" done -_CeladonCityText16:: ; a5dbf (29:5dbf) +_CeladonCityText16:: text "TRAINER TIPS" para "GUARD SPEC." @@ -151,19 +139,14 @@ _CeladonCityText16:: ; a5dbf (29:5dbf) cont "STORE!" done -_CeladonCityText17:: ; a5e3e (29:5e3e) +_CeladonCityText17:: text "Coins exchanged" line "for prizes!" cont "PRIZE EXCHANGE" done -_CeladonCityText18:: ; a5e6a (29:5e6a) +_CeladonCityText18:: text "ROCKET GAME CORNER" line "The playground" -IF DEF(_YELLOW) - cont "for grownups!" -ELSE cont "for grown-ups!" -ENDC done - diff --git a/text/maps/celadon_dept_store_1f.asm b/text/maps/celadon_dept_store_1f.asm index 7751343b..8d805edc 100644 --- a/text/maps/celadon_dept_store_1f.asm +++ b/text/maps/celadon_dept_store_1f.asm @@ -1,4 +1,4 @@ -_CeladonMart1Text1:: ; 9c672 (27:4672) +_CeladonMart1Text1:: text "Hello! Welcome to" line "CELADON DEPT." cont "STORE." @@ -8,7 +8,7 @@ _CeladonMart1Text1:: ; 9c672 (27:4672) cont "the store layout." done -_CeladonMart1Text2:: ; 9c6cd (27:46cd) +_CeladonMart1Text2:: text "1F: SERVICE" line " COUNTER" @@ -25,8 +25,7 @@ _CeladonMart1Text2:: ; 9c6cd (27:46cd) line "VENDING MACHINES" done -_CeladonMart1Text3:: ; 9c752 (27:4752) +_CeladonMart1Text3:: text "1F: SERVICE" line " COUNTER" done - diff --git a/text/maps/celadon_dept_store_2f.asm b/text/maps/celadon_dept_store_2f.asm index 88fe9ff8..74869902 100644 --- a/text/maps/celadon_dept_store_2f.asm +++ b/text/maps/celadon_dept_store_2f.asm @@ -1,4 +1,4 @@ -_CeladonMart2Text3:: ; 9c76b (27:476b) +_CeladonMart2Text3:: text "SUPER REPEL keeps" line "weak #MON at" cont "bay..." @@ -7,17 +7,16 @@ _CeladonMart2Text3:: ; 9c76b (27:476b) line "powerful REPEL!" done -_CeladonMart2Text4:: ; 9c7b2 (27:47b2) +_CeladonMart2Text4:: text "For long outings," line "you should buy" cont "REVIVE." done -_CeladonMart2Text5:: ; 9c7dc (27:47dc) +_CeladonMart2Text5:: text "Top Grade Items" line "for Trainers!" para "2F: TRAINER'S" line " MARKET" done - diff --git a/text/maps/celadon_dept_store_3f.asm b/text/maps/celadon_dept_store_3f.asm index 289ed1d4..8211750d 100644 --- a/text/maps/celadon_dept_store_3f.asm +++ b/text/maps/celadon_dept_store_3f.asm @@ -1,4 +1,4 @@ -_TM18PreReceiveText:: ; 9c814 (27:4814) +_TM18PreReceiveText:: text "Oh, hi! I finally" line "finished #MON!" @@ -7,25 +7,25 @@ _TM18PreReceiveText:: ; 9c814 (27:4814) cont "useful!" prompt -_ReceivedTM18Text:: ; 9c85a (27:485a) - text $52, " received" +_ReceivedTM18Text:: + text "<PLAYER> received" line "@" TX_RAM wcf4b text "!@@" -_TM18ExplanationText:: ; 9c86e (27:486e) +_TM18ExplanationText:: text "TM18 is COUNTER!" line "Not like the one" cont "I'm leaning on," cont "mind you!" done -_TM18NoRoomText:: ; 9c8aa (27:48aa) +_TM18NoRoomText:: text "Your pack is full" line "of items!" done -_CeladonMart3Text2:: ; 9c8c7 (27:48c7) +_CeladonMart3Text2:: text "Captured #MON" line "are registered" cont "with an ID No." @@ -35,7 +35,7 @@ _CeladonMart3Text2:: ; 9c8c7 (27:48c7) cont "caught it!" done -_CeladonMart3Text3:: ; 9c92d (27:492d) +_CeladonMart3Text3:: text "All right!" para "My buddy's going" @@ -44,7 +44,7 @@ _CeladonMart3Text3:: ; 9c92d (27:492d) cont "GRAVELER!" done -_CeladonMart3Text4:: ; 9c975 (27:4975) +_CeladonMart3Text4:: text "Come on GRAVELER!" para "I love GRAVELER!" @@ -57,43 +57,42 @@ _CeladonMart3Text4:: ; 9c975 (27:4975) cont "#MON!" done -_CeladonMart3Text5:: ; 9c9d5 (27:49d5) +_CeladonMart3Text5:: text "You can identify" line "#MON you got" cont "in trades by" cont "their ID Numbers!" done -_CeladonMart3Text6:: ; 9ca13 (27:4a13) +_CeladonMart3Text6:: text "It's an SNES!" done -_CeladonMart3Text7:: ; 9ca21 (27:4a21) +_CeladonMart3Text7:: text "An RPG! There's" line "no time for that!" done -_CeladonMart3Text9:: ; 9ca43 (27:4a43) +_CeladonMart3Text9:: text "A sports game!" line "Dad'll like that!" done -_CeladonMart3Text11:: ; 9ca64 (27:4a64) +_CeladonMart3Text11:: text "A puzzle game!" line "Looks addictive!" done -_CeladonMart3Text13:: ; 9ca85 (27:4a85) +_CeladonMart3Text13:: text "A fighting game!" line "Looks tough!" done -_CeladonMart3Text14:: ; 9caa4 (27:4aa4) +_CeladonMart3Text14:: text "3F: TV GAME SHOP" done -_CeladonMart3Text15:: ; 9cab6 (27:4ab6) +_CeladonMart3Text15:: text "Red and Blue!" line "Both are #MON!" done - diff --git a/text/maps/celadon_dept_store_4f.asm b/text/maps/celadon_dept_store_4f.asm index de33021b..78fa0b66 100644 --- a/text/maps/celadon_dept_store_4f.asm +++ b/text/maps/celadon_dept_store_4f.asm @@ -1,19 +1,10 @@ -_CeladonMart4Text2:: ; 9cad4 (27:4ad4) +_CeladonMart4Text2:: text "I'm getting a" -IF DEF(_YELLOW) - line "gift for COPYCAT" - cont "in CERULEAN CITY." - - para "It's got to be a" - line "# DOLL. They" - cont "are trendy!" -ELSE line "# DOLL for my" cont "girl friend!" -ENDC done -_CeladonMart4Text3:: ; 9cafd (27:4afd) +_CeladonMart4Text3:: text "I heard something" line "useful." @@ -23,7 +14,7 @@ _CeladonMart4Text3:: ; 9cafd (27:4afd) cont "with a # DOLL!" done -_CeladonMart4Text4:: ; 9cb56 (27:4b56) +_CeladonMart4Text4:: text "Express yourself" line "with gifts!" @@ -33,4 +24,3 @@ _CeladonMart4Text4:: ; 9cb56 (27:4b56) line "Element STONEs on" cont "sale now!" done - diff --git a/text/maps/celadon_dept_store_5f.asm b/text/maps/celadon_dept_store_5f.asm index 630a56a5..1871194b 100644 --- a/text/maps/celadon_dept_store_5f.asm +++ b/text/maps/celadon_dept_store_5f.asm @@ -1,4 +1,4 @@ -_CeladonMart5Text1:: ; 9ddff (27:5dff) +_CeladonMart5Text1:: text "#MON ability" line "enhancers can be" cont "bought only here." @@ -11,7 +11,7 @@ _CeladonMart5Text1:: ; 9ddff (27:5dff) line "increase SPEED." done -_CeladonMart5Text2:: ; 9de79 (27:5e79) +_CeladonMart5Text2:: text "I'm here for" line "#MON ability" cont "enhancers." @@ -23,7 +23,6 @@ _CeladonMart5Text2:: ; 9de79 (27:5e79) line "DEFENSE!" done -_CeladonMart5Text5:: ; 9ded6 (27:5ed6) +_CeladonMart5Text5:: text "5F: DRUG STORE" done - diff --git a/text/maps/celadon_dept_store_roof.asm b/text/maps/celadon_dept_store_roof.asm index f2eef613..4689b023 100644 --- a/text/maps/celadon_dept_store_roof.asm +++ b/text/maps/celadon_dept_store_roof.asm @@ -1,9 +1,9 @@ -_CeladonMartRoofText_484ee:: ; 9cbb5 (27:4bb5) +_CeladonMartRoofText_484ee:: text "Give her which" line "drink?" done -_CeladonMartRoofText_484f3:: ; 9cbcc (27:4bcc) +_CeladonMartRoofText_484f3:: text "Yay!" para "FRESH WATER!" @@ -13,13 +13,13 @@ _CeladonMartRoofText_484f3:: ; 9cbcc (27:4bcc) para "You can have this" line "from me!@@" -_CeladonMartRoofText_484f9:: ; 9cc06 (27:4c06) +_CeladonMartRoofText_484f9:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_CeladonMartRoofText_484fe:: ; 9cc1a (27:4c1a) +_CeladonMartRoofText_484fe:: db $0 para "@" TX_RAM wcf4b @@ -29,7 +29,7 @@ _CeladonMartRoofText_484fe:: ; 9cc1a (27:4c1a) para "It can freeze the" line "target sometimes!@@" -_CeladonMartRoofText_48504:: ; 9cc5a (27:4c5a) +_CeladonMartRoofText_48504:: text "Yay!" para "SODA POP!" @@ -39,27 +39,23 @@ _CeladonMartRoofText_48504:: ; 9cc5a (27:4c5a) para "You can have this" line "from me!@@" -_CeladonMartRoofText_4850a:: ; 9cc91 (27:4c91) +_CeladonMartRoofText_4850a:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_CeladonMartRoofText_4850f:: ; 9cca5 (27:4ca5) +_CeladonMartRoofText_4850f:: db $0 para "@" TX_RAM wcf4b text " contains" -IF DEF(_YELLOW) - line "ROCK SLIDE!@@" -ELSE line "ROCK SLIDE!" para "It can spook the" line "target sometimes!@@" -ENDC -_CeladonMartRoofText_48515:: ; 9cce6 (27:4ce6) +_CeladonMartRoofText_48515:: text "Yay!" para "LEMONADE!" @@ -69,25 +65,25 @@ _CeladonMartRoofText_48515:: ; 9cce6 (27:4ce6) para "You can have this" line "from me!@@" -_ReceivedTM49Text:: ; 9cd1d (27:4d1d) +_ReceivedTM49Text:: text $52, " received" line "TM49!@@" -_CeladonMartRoofText_48520:: ; 9cd30 (27:4d30) +_CeladonMartRoofText_48520:: db $0 para "TM49 contains" line "TRI ATTACK!@@" -_CeladonMartRoofText_48526:: ; 9cd4d (27:4d4d) +_CeladonMartRoofText_48526:: text "You don't have" line "space for this!@@" -_CeladonMartRoofText_4852c:: ; 9cd6d (27:4d6d) +_CeladonMartRoofText_4852c:: text "No thank you!" line "I'm not thirsty" cont "after all!@@" -_CeladonMartRoofText1:: ; 9cd97 (27:4d97) +_CeladonMartRoofText1:: text "My sister is a" line "trainer, believe" cont "it or not." @@ -97,13 +93,13 @@ _CeladonMartRoofText1:: ; 9cd97 (27:4d97) cont "drives me nuts!" done -_CeladonMartRoofText_48598:: ; 9cdee (27:4dee) +_CeladonMartRoofText_48598:: text "I'm thirsty!" line "I want something" cont "to drink!" done -_CeladonMartRoofText4:: ; 9ce16 (27:4e16) +_CeladonMartRoofText4:: text "I'm thirsty!" line "I want something" cont "to drink!" @@ -111,33 +107,32 @@ _CeladonMartRoofText4:: ; 9ce16 (27:4e16) para "Give her a drink?" done -_CeladonMartRoofText6:: ; 9ce50 (27:4e50) +_CeladonMartRoofText6:: text "ROOFTOP SQUARE:" line "VENDING MACHINES" done -_VendingMachineText1:: ; 9ce72 (27:4e72) +_VendingMachineText1:: text "A vending machine!" line "Here's the menu!" prompt -_VendingMachineText4:: ; 9ce96 (27:4e96) +_VendingMachineText4:: text "Oops, not enough" line "money!" done -_VendingMachineText5:: ; 9ceaf (27:4eaf) +_VendingMachineText5:: TX_RAM wcf4b db $0 line "popped out!" done -_VendingMachineText6:: ; 9cec0 (27:4ec0) +_VendingMachineText6:: text "There's no more" line "room for stuff!" done -_VendingMachineText7:: ; 9cee0 (27:4ee0) +_VendingMachineText7:: text "Not thirsty!" done - diff --git a/text/maps/celadon_diner.asm b/text/maps/celadon_diner.asm index 2b4cc321..fd31eb20 100644 --- a/text/maps/celadon_diner.asm +++ b/text/maps/celadon_diner.asm @@ -1,24 +1,24 @@ -_CeladonDinerText1:: ; 9df3f (27:5f3f) +_CeladonDinerText1:: text "Hi!" para "We're taking a" line "break now." done -_CeladonDinerText2:: ; 9df5d (27:5f5d) +_CeladonDinerText2:: text "My #MON are" line "weak, so I often" cont "have to go to the" cont "DRUG STORE." done -_CeladonDinerText3:: ; 9df99 (27:5f99) +_CeladonDinerText3:: text "Psst! There's a" line "basement under" cont "the GAME CORNER." done -_CeladonDinerText4:: ; 9dfc9 (27:5fc9) +_CeladonDinerText4:: text "Munch..." para "The man at that" @@ -26,7 +26,7 @@ _CeladonDinerText4:: ; 9dfc9 (27:5fc9) cont "at the slots." done -_CeladonDinerText_491a7:: ; 9e003 (27:6003) +_CeladonDinerText_491a7:: text "Go ahead! Laugh!" para "I'm flat out" @@ -41,20 +41,19 @@ _CeladonDinerText_491a7:: ; 9e003 (27:6003) cont "more!" prompt -_ReceivedCoinCaseText:: ; 9e07a (27:607a) +_ReceivedCoinCaseText:: text $52, " received" line "a @" TX_RAM wcf4b text "!@@" -_CoinCaseNoRoomText:: ; 9e090 (27:6090) +_CoinCaseNoRoomText:: text "Make room for" line "this!" done -_CeladonDinerText_491b7:: ; 9e0a5 (27:60a5) +_CeladonDinerText_491b7:: text "I always thought" line "I was going to" cont "win it back..." done - diff --git a/text/maps/celadon_game_corner.asm b/text/maps/celadon_game_corner.asm index c08a81b1..2d263e80 100644 --- a/text/maps/celadon_game_corner.asm +++ b/text/maps/celadon_game_corner.asm @@ -1,4 +1,4 @@ -_CeladonGameCornerText1:: ; 9d8d5 (27:58d5) +_CeladonGameCornerText1:: text "Welcome!" para "You can exchange" @@ -7,7 +7,7 @@ _CeladonGameCornerText1:: ; 9d8d5 (27:58d5) cont "next door." done -_CeladonGameCornerText_48d22:: ; 9d91a (27:591a) +_CeladonGameCornerText_48d22:: text "Welcome to ROCKET" line "GAME CORNER!" @@ -19,32 +19,32 @@ _CeladonGameCornerText_48d22:: ; 9d91a (27:591a) cont "like some?" done -_CeladonGameCornerText_48d27:: ; 9d984 (27:5984) +_CeladonGameCornerText_48d27:: text "Thanks! Here are" line "your 50 coins!" done -_CeladonGameCornerText_48d2c:: ; 9d9a5 (27:59a5) +_CeladonGameCornerText_48d2c:: text "No? Please come" line "play sometime!" done -_CeladonGameCornerText_48d31:: ; 9d9c5 (27:59c5) +_CeladonGameCornerText_48d31:: text "You can't afford" line "the coins!" done -_CeladonGameCornerText_48d36:: ; 9d9e1 (27:59e1) +_CeladonGameCornerText_48d36:: text "Oops! Your COIN" line "CASE is full." done -_CeladonGameCornerText_48d3b:: ; 9da00 (27:5a00) +_CeladonGameCornerText_48d3b:: text "You don't have a" line "COIN CASE!" done -_CeladonGameCornerText3:: ; 9da1c (27:5a1c) +_CeladonGameCornerText3:: text "Keep this quiet." para "It's rumored that" @@ -52,37 +52,37 @@ _CeladonGameCornerText3:: ; 9da1c (27:5a1c) cont "by TEAM ROCKET." done -_CeladonGameCornerText4:: ; 9da61 (27:5a61) +_CeladonGameCornerText4:: text "I think these" line "machines have" cont "different odds." done -_CeladonGameCornerText_48d9c:: ; 9da8e (27:5a8e) +_CeladonGameCornerText_48d9c:: text "Kid, do you want" line "to play?" prompt -_Received10CoinsText:: ; 9daa9 (27:5aa9) +_Received10CoinsText:: text $52, " received" line "10 coins!@@" -_CeladonGameCornerText_48da7:: ; 9dac0 (27:5ac0) +_CeladonGameCornerText_48da7:: text "You don't need my" line "coins!" done -_CeladonGameCornerText_48dac:: ; 9dad9 (27:5ad9) +_CeladonGameCornerText_48dac:: text "Wins seem to come" line "and go." done -_CeladonGameCornerText6:: ; 9daf4 (27:5af4) +_CeladonGameCornerText6:: text "I'm having a" line "wonderful time!" done -_CeladonGameCornerText_48dca:: ; 9db11 (27:5b11) +_CeladonGameCornerText_48dca:: text "Hey!" para "You have better" @@ -99,7 +99,7 @@ _CeladonGameCornerText_48dca:: ; 9db11 (27:5b11) cont "be fooled!" done -_CeladonGameCornerText_48dcf:: ; 9dbac (27:5bac) +_CeladonGameCornerText_48dcf:: text "They offer rare" line "#MON that can" cont "be exchanged for" @@ -109,79 +109,78 @@ _CeladonGameCornerText_48dcf:: ; 9dbac (27:5bac) line "seem to win!" done -_CeladonGameCornerText8:: ; 9dc06 (27:5c06) +_CeladonGameCornerText8:: text "Games are scary!" line "It's so easy to" cont "get hooked!" done -_CeladonGameCornerText_48e26:: ; 9dc33 (27:5c33) +_CeladonGameCornerText_48e26:: text "What's up? Want" line "some coins?" prompt -_Received20CoinsText:: ; 9dc4f (27:5c4f) +_Received20CoinsText:: text $52, " received" line "20 coins!@@" -_CeladonGameCornerText_48e31:: ; 9dc66 (27:5c66) +_CeladonGameCornerText_48e31:: text "You have lots of" line "coins!" done -_CeladonGameCornerText_48e36:: ; 9dc7f (27:5c7f) +_CeladonGameCornerText_48e36:: text "Darn! I need more" line "coins for the" cont "#MON I want!" done -_CeladonGameCornerText_48e88:: ; 9dcad (27:5cad) +_CeladonGameCornerText_48e88:: text "Hey, what? You're" line "throwing me off!" cont "Here are some" cont "coins, shoo!" prompt -_CeladonGameCornerText_48e8d:: ; 9dceb (27:5ceb) +_CeladonGameCornerText_48e8d:: text $52, " received" line "20 coins!@@" -_CeladonGameCornerText_48e93:: ; 9dd02 (27:5d02) +_CeladonGameCornerText_48e93:: text "You've got your" line "own coins!" done -_CeladonGameCornerText_48e98:: ; 9dd1d (27:5d1d) +_CeladonGameCornerText_48e98:: text "The trick is to" line "watch the reels" cont "closely!" done -_CeladonGameCornerText_48ece:: ; 9dd47 (27:5d47) +_CeladonGameCornerText_48ece:: text "I'm guarding this" line "poster!" cont "Go away, or else!" done -_CeladonGameCornerText_48ed3:: ; 9dd73 (27:5d73) +_CeladonGameCornerText_48ed3:: text "Dang!" prompt -_CeladonGameCornerText_48ed8:: ; 9dd7a (27:5d7a) +_CeladonGameCornerText_48ed8:: text "Our hideout might" line "be discovered! I" cont "better tell BOSS!" done -_CeladonGameCornerText_48f09:: ; 9ddb0 (27:5db0) +_CeladonGameCornerText_48f09:: text "Hey!" para "A switch behind" line "the poster!?" cont "Let's push it!@@" -_CeladonGameCornerText_48f19:: ; 9dde2 (27:5de2) +_CeladonGameCornerText_48f19:: text "Oops! Forgot the" line "COIN CASE!" done - diff --git a/text/maps/celadon_gym.asm b/text/maps/celadon_gym.asm index 66452a2c..99833ee1 100644 --- a/text/maps/celadon_gym.asm +++ b/text/maps/celadon_gym.asm @@ -1,4 +1,4 @@ -_CeladonGymText_48a5e:: ; 9d28f (27:528f) +_CeladonGymText_48a5e:: text "Hello. Lovely" line "weather isn't it?" cont "It's so pleasant." @@ -25,7 +25,7 @@ _CeladonGymText_48a5e:: ; 9d28f (27:528f) line "shall not lose." done -_CeladonGymText_48a63:: ; 9d3c2 (27:53c2) +_CeladonGymText_48a63:: text "Oh!" line "I concede defeat." @@ -36,7 +36,7 @@ _CeladonGymText_48a63:: ; 9d3c2 (27:53c2) line "the RAINBOWBADGE." prompt -_CeladonGymText_48a68:: ; 9d418 (27:5418) +_CeladonGymText_48a68:: text "You are cataloging" line "#MON? I must" cont "say I'm impressed." @@ -47,7 +47,7 @@ _CeladonGymText_48a68:: ; 9d418 (27:5418) cont "unattractive." done -_CeladonGymText9:: ; 9d481 (27:5481) +_CeladonGymText9:: text "The RAINBOWBADGE" line "will make #MON" cont "up to L50 obey." @@ -61,13 +61,13 @@ _CeladonGymText9:: ; 9d481 (27:5481) line "this with you." done -_ReceivedTM21Text:: ; 9d50c (27:550c) +_ReceivedTM21Text:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_TM21ExplanationText:: ; 9d520 (27:5520) +_TM21ExplanationText:: db $0 para "TM21 contains" line "MEGA DRAIN." @@ -78,40 +78,40 @@ _TM21ExplanationText:: ; 9d520 (27:5520) cont "your #MON!" done -_TM21NoRoomText:: ; 9d576 (27:5576) +_TM21NoRoomText:: text "You should make" line "room for this." done -_CeladonGymBattleText2:: ; 9d596 (27:5596) +_CeladonGymBattleText2:: text "Hey!" para "You are not" line "allowed in here!" done -_CeladonGymEndBattleText2:: ; 9d5b9 (27:55b9) +_CeladonGymEndBattleText2:: text "You're" line "too rough!" prompt -_CeladonGymAfterBattleText2:: ; 9d5cb (27:55cb) +_CeladonGymAfterBattleText2:: text "Bleaah!" line "I hope ERIKA" cont "wipes you out!" done -_CeladonGymBattleText3:: ; 9d5f0 (27:55f0) +_CeladonGymBattleText3:: text "I was getting" line "bored." done -_CeladonGymEndBattleText3:: ; 9d606 (27:5606) +_CeladonGymEndBattleText3:: text "My" line "makeup!" prompt -_CeladonGymAfterBattleText3:: ; 9d612 (27:5612) +_CeladonGymAfterBattleText3:: text "Grass-type #MON" line "are tough against" cont "the water-type!" @@ -121,23 +121,23 @@ _CeladonGymAfterBattleText3:: ; 9d612 (27:5612) cont "ground #MON!" done -_CeladonGymBattleText4:: ; 9d675 (27:5675) +_CeladonGymBattleText4:: text "Aren't you the" line "peeping Tom?" done -_CeladonGymEndBattleText4:: ; 9d691 (27:5691) +_CeladonGymEndBattleText4:: text "I'm" line "in shock!" prompt -_CeladonGymAfterBattleText4:: ; 9d69f (27:569f) +_CeladonGymAfterBattleText4:: text "Oh, you weren't" line "peeping? We get a" cont "lot of gawkers!" done -_CeladonGymBattleText5:: ; 9d6d1 (27:56d1) +_CeladonGymBattleText5:: text "Look at my grass" line "#MON!" @@ -145,11 +145,11 @@ _CeladonGymBattleText5:: ; 9d6d1 (27:56d1) line "to raise!" done -_CeladonGymEndBattleText5:: ; 9d702 (27:5702) +_CeladonGymEndBattleText5:: text "No!" prompt -_CeladonGymAfterBattleText5:: ; 9d707 (27:5707) +_CeladonGymAfterBattleText5:: text "We only use grass-" line "type #MON at" cont "our GYM!" @@ -159,43 +159,43 @@ _CeladonGymAfterBattleText5:: ; 9d707 (27:5707) cont "arrangements!" done -_CeladonGymBattleText6:: ; 9d762 (27:5762) +_CeladonGymBattleText6:: text "Don't bring any" line "bugs or fire" cont "#MON in here!" done -_CeladonGymEndBattleText6:: ; 9d78d (27:578d) +_CeladonGymEndBattleText6:: text "Oh!" line "You!" prompt -_CeladonGymAfterBattleText6:: ; 9d797 (27:5797) +_CeladonGymAfterBattleText6:: text "Our LEADER, ERIKA," line "might be quiet," cont "but she's also" cont "very skilled!" done -_CeladonGymBattleText7:: ; 9d7d7 (27:57d7) +_CeladonGymBattleText7:: text "Pleased to meet" line "you. My hobby is" cont "#MON training." done -_CeladonGymEndBattleText7:: ; 9d808 (27:5808) +_CeladonGymEndBattleText7:: text "Oh!" line "Splendid!" prompt -_CeladonGymAfterBattleText7:: ; 9d817 (27:5817) +_CeladonGymAfterBattleText7:: text "I have a blind" line "date coming up." cont "I have to learn" cont "to be polite." done -_CeladonGymBattleText8:: ; 9d855 (27:5855) +_CeladonGymBattleText8:: text "Welcome to" line "CELADON GYM!" @@ -204,16 +204,15 @@ _CeladonGymBattleText8:: ; 9d855 (27:5855) cont "girl power!" done -_CeladonGymEndBattleText8:: ; 9d897 (27:5897) +_CeladonGymEndBattleText8:: text "Oh!" line "Beaten!" prompt -_CeladonGymAfterBattleText8:: ; 9d8a4 (27:58a4) +_CeladonGymAfterBattleText8:: text "I didn't bring my" line "best #MON!" para "Wait 'til next" line "time!" done - diff --git a/text/maps/celadon_hotel.asm b/text/maps/celadon_hotel.asm index a7b6ade3..f2eb059e 100644 --- a/text/maps/celadon_hotel.asm +++ b/text/maps/celadon_hotel.asm @@ -1,4 +1,4 @@ -_CeladonHotelText1:: ; 9e18a (27:618a) +_CeladonHotelText1:: text "#MON? No, this" line "is a hotel for" cont "people." @@ -6,7 +6,7 @@ _CeladonHotelText1:: ; 9e18a (27:618a) para "We're full up." done -_CeladonHotelText2:: ; 9e1bf (27:61bf) +_CeladonHotelText2:: text "I'm on vacation" line "with my brother" cont "and boy friend." @@ -15,8 +15,7 @@ _CeladonHotelText2:: ; 9e1bf (27:61bf) line "pretty city!" done -_CeladonHotelText3:: ; 9e20e (27:620e) +_CeladonHotelText3:: text "Why did she bring" line "her brother?" done - diff --git a/text/maps/celadon_house.asm b/text/maps/celadon_house.asm index 1a650a98..19e59bd6 100644 --- a/text/maps/celadon_house.asm +++ b/text/maps/celadon_house.asm @@ -1,10 +1,10 @@ -_CeladonHouseText1:: ; 9e0d5 (27:60d5) +_CeladonHouseText1:: text "Hehehe! The slots" line "just reel in the" cont "dough, big time!" done -_CeladonHouseText2:: ; 9e10a (27:610a) +_CeladonHouseText2:: text "CHIEF!" para "We just shipped" @@ -12,7 +12,7 @@ _CeladonHouseText2:: ; 9e10a (27:610a) cont "slot prizes!" done -_CeladonHouseText3:: ; 9e13c (27:613c) +_CeladonHouseText3:: text "Don't touch the" line "poster at the" cont "GAME CORNER!" @@ -20,4 +20,3 @@ _CeladonHouseText3:: ; 9e13c (27:613c) para "There's no secret" line "switch behind it!" done - diff --git a/text/maps/celadon_mansion_1f.asm b/text/maps/celadon_mansion_1f.asm index 7ea36a1a..fc175cd5 100644 --- a/text/maps/celadon_mansion_1f.asm +++ b/text/maps/celadon_mansion_1f.asm @@ -1,7 +1,7 @@ -_CeladonMansion1Text1:: ; 9ceee (27:4eee) +_CeladonMansion1Text1:: text "MEOWTH: Meow!@@" -_CeladonMansion1Text2:: ; 9cefe (27:4efe) +_CeladonMansion1Text2:: text "My dear #MON" line "keep me company." @@ -9,16 +9,15 @@ _CeladonMansion1Text2:: ; 9cefe (27:4efe) line "money home!" done -_CeladonMansion1Text3:: ; 9cf3c (27:4f3c) +_CeladonMansion1Text3:: text "CLEFAIRY: Pi" line "pippippi!@@" -_CeladonMansion1Text4:: ; 9cf55 (27:4f55) +_CeladonMansion1Text4:: text "NIDORAN: Kya" line "kyaoo!@@" -_CeladonMansion1Text5:: ; 9cf6b (27:4f6b) +_CeladonMansion1Text5:: text "CELADON MANSION" line "Manager's Suite" done - diff --git a/text/maps/celadon_mansion_2f.asm b/text/maps/celadon_mansion_2f.asm index 01841716..b2ecb4fa 100644 --- a/text/maps/celadon_mansion_2f.asm +++ b/text/maps/celadon_mansion_2f.asm @@ -1,5 +1,4 @@ -_CeladonMansion2Text1:: ; 9cf8b (27:4f8b) +_CeladonMansion2Text1:: text "GAME FREAK" line "Meeting Room" done - diff --git a/text/maps/celadon_mansion_3f.asm b/text/maps/celadon_mansion_3f.asm index 06220b23..c8858281 100644 --- a/text/maps/celadon_mansion_3f.asm +++ b/text/maps/celadon_mansion_3f.asm @@ -1,15 +1,15 @@ -_ProgrammerText:: ; 9cfa4 (27:4fa4) +_ProgrammerText:: text "Me? I'm the" line "programmer!" done -_GraphicArtistText:: ; 9cfbc (27:4fbc) +_GraphicArtistText:: text "I'm the graphic" line "artist!" cont "I drew you!" done -_WriterText:: ; 9cfe0 (27:4fe0) +_WriterText:: text "I wrote the story!" line "Isn't ERIKA cute?" @@ -20,7 +20,7 @@ _WriterText:: ; 9cfe0 (27:4fe0) line "I like her!" done -_GameDesignerText:: ; 9d03a (27:503a) +_GameDesignerText:: text "Is that right?" para "I'm the game" @@ -34,34 +34,33 @@ _GameDesignerText:: ; 9d03a (27:503a) line "come tell me!" done -_CompletedDexText:: ; 9d0ad (27:50ad) +_CompletedDexText:: text "Wow! Excellent!" line "You completed" cont "your #DEX!" cont "Congratulations!" cont "...@@" -_CeladonMansion3Text5:: ; 9d0ed (27:50ed) +_CeladonMansion3Text5:: text "It's the game" line "program! Messing" cont "with it could bug" cont "out the game!" done -_CeladonMansion3Text6:: ; 9d12c (27:512c) +_CeladonMansion3Text6:: text "Someone's playing" line "a game instead of" cont "working!" done -_CeladonMansion3Text7:: ; 9d159 (27:5159) +_CeladonMansion3Text7:: text "It's the script!" line "Better not look" cont "at the ending!" done -_CeladonMansion3Text8:: ; 9d189 (27:5189) +_CeladonMansion3Text8:: text "GAME FREAK" line "Development Room" done - diff --git a/text/maps/celadon_mansion_4f_inside.asm b/text/maps/celadon_mansion_4f_inside.asm index 7268d7be..dab81a8d 100644 --- a/text/maps/celadon_mansion_4f_inside.asm +++ b/text/maps/celadon_mansion_4f_inside.asm @@ -1,4 +1,4 @@ -_CeladonMansion5Text1:: ; 9d1ba (27:51ba) +_CeladonMansion5Text1:: text "I know everything" line "about the world" cont "of #MON in" @@ -8,4 +8,3 @@ _CeladonMansion5Text1:: ; 9d1ba (27:51ba) line "your friends and" cont "trade #MON!" done - diff --git a/text/maps/celadon_mansion_4f_outside.asm b/text/maps/celadon_mansion_4f_outside.asm index aab4a76f..c8fd7ec8 100644 --- a/text/maps/celadon_mansion_4f_outside.asm +++ b/text/maps/celadon_mansion_4f_outside.asm @@ -1,4 +1,3 @@ -_CeladonMansion4Text1:: ; 9d1a6 (27:51a6) +_CeladonMansion4Text1:: text "I KNOW EVERYTHING!" done - diff --git a/text/maps/celadon_pokecenter.asm b/text/maps/celadon_pokecenter.asm index 66feea37..a04f51c9 100644 --- a/text/maps/celadon_pokecenter.asm +++ b/text/maps/celadon_pokecenter.asm @@ -1,13 +1,12 @@ -_CeladonPokecenterText2:: ; 9d226 (27:5226) +_CeladonPokecenterText2:: text "# FLUTE awakens" line "#MON with a" cont "sound that only" cont "they can hear!" done -_CeladonPokecenterText3:: ; 9d262 (27:5262) +_CeladonPokecenterText3:: text "I rode uphill on" line "CYCLING ROAD from" cont "FUCHSIA!" done - diff --git a/text/maps/celadon_prize_room.asm b/text/maps/celadon_prize_room.asm index 7bf1f821..6b2bb537 100644 --- a/text/maps/celadon_prize_room.asm +++ b/text/maps/celadon_prize_room.asm @@ -1,4 +1,4 @@ -_CeladonPrizeRoomText1:: ; 9dee6 (27:5ee6) +_CeladonPrizeRoomText1:: text "I sure do fancy" line "that PORYGON!" @@ -6,8 +6,7 @@ _CeladonPrizeRoomText1:: ; 9dee6 (27:5ee6) line "win at slots!" done -_CeladonPrizeRoomText2:: ; 9df24 (27:5f24) +_CeladonPrizeRoomText2:: text "I had a major" line "haul today!" done - diff --git a/text/maps/cerulean_badge_house.asm b/text/maps/cerulean_badge_house.asm index d546066a..9d701443 100644 --- a/text/maps/cerulean_badge_house.asm +++ b/text/maps/cerulean_badge_house.asm @@ -1,4 +1,4 @@ -_CeruleanHouse2Text_74e77:: ; 990c9 (26:50c9) +_CeruleanHouse2Text_74e77:: text "#MON BADGEs" line "are owned only by" cont "skilled trainers." @@ -10,7 +10,7 @@ _CeruleanHouse2Text_74e77:: ; 990c9 (26:50c9) line "amazing secrets!" prompt -_CeruleanHouse2Text_74e7c:: ; 9913a (26:513a) +_CeruleanHouse2Text_74e7c:: text "Now then..." para "Which of the 8" @@ -18,30 +18,22 @@ _CeruleanHouse2Text_74e7c:: ; 9913a (26:513a) cont "describe?" done -_CeruleanHouse2Text_74e81:: ; 99170 (26:5170) -IF DEF(_YELLOW) - text "Come visit me any-" -ELSE +_CeruleanHouse2Text_74e81:: text "Come visit me any" -ENDC line "time you wish." done -_CeruleanHouse2Text_74e96:: ; 99192 (26:5192) +_CeruleanHouse2Text_74e96:: text "The ATTACK of all" line "#MON increases" cont "a little bit." para "It also lets you" -IF DEF(_YELLOW) - line "use FLASH any-" -ELSE line "use FLASH any" -ENDC cont "time you desire." prompt -_CeruleanHouse2Text_74e9b:: ; 991f2 (26:51f2) +_CeruleanHouse2Text_74e9b:: text "#MON up to L30" line "will obey you." @@ -53,7 +45,7 @@ _CeruleanHouse2Text_74e9b:: ; 991f2 (26:51f2) cont "of battle." prompt -_CeruleanHouse2Text_74ea0:: ; 9925d (26:525d) +_CeruleanHouse2Text_74ea0:: text "The SPEED of all" line "#MON increases" cont "a little bit." @@ -63,7 +55,7 @@ _CeruleanHouse2Text_74ea0:: ; 9925d (26:525d) cont "of battle." prompt -_CeruleanHouse2Text_74ea5:: ; 992b8 (26:52b8) +_CeruleanHouse2Text_74ea5:: text "#MON up to L50" line "will obey you." @@ -75,7 +67,7 @@ _CeruleanHouse2Text_74ea5:: ; 992b8 (26:52b8) cont "side of battle." prompt -_CeruleanHouse2Text_74eaa:: ; 9932a (26:532a) +_CeruleanHouse2Text_74eaa:: text "The DEFENSE of all" line "#MON increases" cont "a little bit." @@ -85,7 +77,7 @@ _CeruleanHouse2Text_74eaa:: ; 9932a (26:532a) cont "of battle." prompt -_CeruleanHouse2Text_74eaf:: ; 99388 (26:5388) +_CeruleanHouse2Text_74eaf:: text "#MON up to L70" line "will obey you." @@ -93,14 +85,13 @@ _CeruleanHouse2Text_74eaf:: ; 99388 (26:5388) line "become unruly!" prompt -_CeruleanHouse2Text_74eb4:: ; 993c7 (26:53c7) +_CeruleanHouse2Text_74eb4:: text "Your #MON's" line "SPECIAL abilities" cont "increase a bit." prompt -_CeruleanHouse2Text_74eb9:: ; 993f5 (26:53f5) +_CeruleanHouse2Text_74eb9:: text "All #MON will" line "obey you!" prompt - diff --git a/text/maps/cerulean_city.asm b/text/maps/cerulean_city.asm index f014ee5d..48d97e05 100644 --- a/text/maps/cerulean_city.asm +++ b/text/maps/cerulean_city.asm @@ -1,4 +1,4 @@ -_CeruleanCityText_19668:: ; a4d2b (29:4d2b) +_CeruleanCityText_19668:: text $53, ": Yo!" line $52, "!" @@ -16,19 +16,19 @@ _CeruleanCityText_19668:: ; a4d2b (29:4d2b) cont $52, "!" done -_CeruleanCityText_1966d:: ; a4dbe (29:4dbe) +_CeruleanCityText_1966d:: text "Hey!" line "Take it easy!" cont "You won already!" prompt -_CeruleanCityText_19672:: ; a4de3 (29:4de3) +_CeruleanCityText_19672:: text "Heh!" line "You're no match" cont "for my genius!" prompt -_CeruleanCityText_19677:: ; a4e07 (29:4e07) +_CeruleanCityText_19677:: text $53, ": Hey," line "guess what?" @@ -58,7 +58,7 @@ _CeruleanCityText_19677:: ; a4e07 (29:4e07) cont "Smell ya later!" done -_CeruleanCityText_196d9:: ; a4f27 (29:4f27) +_CeruleanCityText_196d9:: text "Hey! Stay out!" line "It's not your" cont "yard! Huh? Me?" @@ -68,16 +68,16 @@ _CeruleanCityText_196d9:: ; a4f27 (29:4f27) cont "you believe me?" done -_ReceivedTM28Text:: ; a4f82 (29:4f82) +_ReceivedTM28Text:: text $52, " recovered" line "TM28!@@" -_ReceivedTM28Text2:: ; a4f96 (29:4f96) +_ReceivedTM28Text2:: db $0 para "I better get" line "moving! Bye!@@" -_TM28NoRoomText:: ; a4fb3 (29:4fb3) +_TM28NoRoomText:: text "Make room for" line "this!" @@ -85,25 +85,25 @@ _TM28NoRoomText:: ; a4fb3 (29:4fb3) line "I give it to you!" done -_CeruleanCityText_196ee:: ; a4feb (29:4feb) +_CeruleanCityText_196ee:: text "Stop!" line "I give up! I'll" cont "leave quietly!" prompt -_CeruleanCityText_196f3:: ; a5010 (29:5010) +_CeruleanCityText_196f3:: text "OK! I'll return" line "the TM I stole!" prompt -_CeruleanCityText3:: ; a5030 (29:5030) +_CeruleanCityText3:: text "You're a trainer" line "too? Collecting," cont "fighting, it's a" cont "tough life." done -_CeruleanCityText4:: ; a506e (29:506e) +_CeruleanCityText4:: text "That bush in" line "front of the shop" cont "is in the way." @@ -112,23 +112,14 @@ _CeruleanCityText4:: ; a506e (29:506e) line "way around." done -_CeruleanCityText5:: ; a50ba (29:50ba) +_CeruleanCityText5:: text "You're making an" line "encyclopedia on" cont "#MON? That" cont "sounds amusing." done -_CeruleanCityText6:: ; a50f6 (29:50f6) -IF DEF(_YELLOW) - text "These poor people" - line "here were robbed." - - para "We're positive" - line "that TEAM ROCKET" - cont "is behind this" - cont "terrible deed." -ELSE +_CeruleanCityText6:: text "The people here" line "were robbed." @@ -136,57 +127,31 @@ ELSE line "TEAM ROCKET is" cont "behind this most" cont "heinous crime!" -ENDC para "Even our POLICE" -IF DEF(_YELLOW) - line "FORCE has trouble" -ELSE line "force has trouble" -ENDC cont "with the ROCKETs!" done -_CeruleanCityText_19730:: ; a5188 (29:5188) -IF DEF(_YELLOW) - text "OK! ELECTRODE!" -ELSE +_CeruleanCityText_19730:: text "OK! SLOWBRO!" -ENDC line "Use SONICBOOM!" -IF DEF(_YELLOW) - cont "Please ELECTRODE," -ELSE cont "Come on, SLOWBRO" -ENDC cont "pay attention!" done -_CeruleanCityText_19735:: ; a51c5 (29:51c5) -IF DEF(_YELLOW) - text "ELECTRODE, TACKLE!" -ELSE +_CeruleanCityText_19735:: text "SLOWBRO punch!" -ENDC line "No! You blew it" cont "again!" done -_CeruleanCityText_1973a:: ; a51ec (29:51ec) -IF DEF(_YELLOW) - text "ELECTRODE, SWIFT!" -ELSE +_CeruleanCityText_1973a:: text "SLOWBRO, WITHDRAW!" -ENDC line "No! That's wrong!" -IF DEF(_YELLOW) - para "Training #MON" - line "is difficult!" -ELSE para "It's so hard to" line "control #MON!" -ENDC para "Your #MON's" line "obedience depends" @@ -194,43 +159,27 @@ ENDC cont "as a trainer!" done -_CeruleanCityText_1976f:: ; a526b (29:526b) -IF DEF(_YELLOW) - text "ELECTRODE took a" -ELSE +_CeruleanCityText_1976f:: text "SLOWBRO took a" -ENDC line "snooze..." done -_CeruleanCityText_19774:: ; a5285 (29:5285) -IF DEF(_YELLOW) - text "ELECTRODE is" -ELSE +_CeruleanCityText_19774:: text "SLOWBRO is" -ENDC line "loafing around..." done -_CeruleanCityText_19779:: ; a52a3 (29:52a3) -IF DEF(_YELLOW) - text "ELECTRODE turned" -ELSE +_CeruleanCityText_19779:: text "SLOWBRO turned" -ENDC line "away..." done -_CeruleanCityText_1977e:: ; a52bb (29:52bb) -IF DEF(_YELLOW) - text "ELECTRODE" -ELSE +_CeruleanCityText_1977e:: text "SLOWBRO" -ENDC line "ignored orders..." done -_CeruleanCityText9:: ; a52d6 (29:52d6) +_CeruleanCityText9:: text "I want a bright" line "red BICYCLE!" @@ -239,7 +188,7 @@ _CeruleanCityText9:: ; a52d6 (29:52d6) cont "get dirty!" done -_CeruleanCityText10:: ; a531f (29:531f) +_CeruleanCityText10:: text "This is CERULEAN" line "CAVE! Horribly" cont "strong #MON" @@ -251,14 +200,14 @@ _CeruleanCityText10:: ; a531f (29:531f) cont "is allowed in!" done -_CeruleanCityText12:: ; a539a (29:539a) +_CeruleanCityText12:: text "CERULEAN CITY" line "A Mysterious," cont "Blue Aura" cont "Surrounds It" done -_CeruleanCityText13:: ; a53ce (29:53ce) +_CeruleanCityText13:: text "TRAINER TIPS" para "Pressing B Button" @@ -267,13 +216,13 @@ _CeruleanCityText13:: ; a53ce (29:53ce) cont "process." done -_CeruleanCityText16:: ; a541a (29:541a) +_CeruleanCityText16:: text "Grass and caves" line "handled easily!" cont "BIKE SHOP" done -_CeruleanCityText17:: ; a5445 (29:5445) +_CeruleanCityText17:: text "CERULEAN CITY" line "#MON GYM" cont "LEADER: MISTY" @@ -281,4 +230,3 @@ _CeruleanCityText17:: ; a5445 (29:5445) para "The Tomboyish" line "Mermaid!" done - diff --git a/text/maps/cerulean_gym.asm b/text/maps/cerulean_gym.asm index f4234fc4..dd6baaff 100644 --- a/text/maps/cerulean_gym.asm +++ b/text/maps/cerulean_gym.asm @@ -1,12 +1,7 @@ -_CeruleanGymText_5c7be:: ; 989c1 (26:49c1) +_CeruleanGymText_5c7be:: text "Hi, you're a new" line "face!" -IF DEF(_YELLOW) - para "What's your policy" - line "on #MON? What" - cont "is your approach?" -ELSE para "Trainers who want" line "to turn pro have" cont "to have a policy" @@ -15,24 +10,14 @@ ELSE para "What is your" line "approach when you" cont "catch #MON?" -ENDC para "My policy is an" line "all-out offensive" cont "with water-type" cont "#MON!" - -IF DEF(_YELLOW) - para "MISTY, the world-" - line "famous beauty, is" - cont "your host!" - - para "Are you ready," - line "sweetie?" -ENDC done -_CeruleanGymText_5c7c3:: ; 98a7b (26:4a7b) +_CeruleanGymText_5c7c3:: text "TM11 teaches" line "BUBBLEBEAM!" @@ -40,7 +25,7 @@ _CeruleanGymText_5c7c3:: ; 98a7b (26:4a7b) line "aquatic #MON!" done -_CeruleanGymText_5c7c8:: ; 98ab0 (26:4ab0) +_CeruleanGymText_5c7c8:: text "The CASCADEBADGE" line "makes all #MON" cont "up to L30 obey!" @@ -50,11 +35,7 @@ _CeruleanGymText_5c7c8:: ; 98ab0 (26:4ab0) para "There's more, you" line "can now use CUT" -IF DEF(_YELLOW) - cont "anytime!" -ELSE cont "any time!" -ENDC para "You can CUT down" line "small bushes to" @@ -64,23 +45,18 @@ ENDC line "my favorite TM!" done -_ReceivedTM11Text:: ; 98b7d (26:4b7d) +_ReceivedTM11Text:: text $52, " received" line "TM11!@@" -_CeruleanGymText_5c7d3:: ; 98b90 (26:4b90) +_CeruleanGymText_5c7d3:: text "You better make" line "room for this!" done -_CeruleanGymText_5c7d8:: ; 98bb0 (26:4bb0) -IF DEF(_YELLOW) - text "I can't" - line "believe I lost!" -ELSE +_CeruleanGymText_5c7d8:: text "Wow!" line "You're too much!" -ENDC para "All right!" @@ -88,38 +64,38 @@ ENDC line "CASCADEBADGE to" cont "show you beat me!@@" -_CeruleanGymBattleText1:: ; 98c05 (26:4c05) +_CeruleanGymBattleText1:: text "I'm more than good" line "enough for you!" para "MISTY can wait!" done -_CeruleanGymEndBattleText1:: ; 98c38 (26:4c38) +_CeruleanGymEndBattleText1:: text "You" line "overwhelmed me!" prompt -_CeruleanGymAfterBattleText1:: ; 98c4d (26:4c4d) +_CeruleanGymAfterBattleText1:: text "You have to face" line "other trainers to" cont "find out how good" cont "you really are." done -_CeruleanGymBattleText2:: ; 98c93 (26:4c93) +_CeruleanGymBattleText2:: text "Splash!" para "I'm first up!" line "Let's do it!" done -_CeruleanGymEndBattleText2:: ; 98cb5 (26:4cb5) +_CeruleanGymEndBattleText2:: text "That" line "can't be!" prompt -_CeruleanGymAfterBattleText2:: ; 98cc4 (26:4cc4) +_CeruleanGymAfterBattleText2:: text "MISTY is going to" line "keep improving!" @@ -127,7 +103,7 @@ _CeruleanGymAfterBattleText2:: ; 98cc4 (26:4cc4) line "someone like you!" done -_CeruleanGymText_5c82a:: ; 98d0a (26:4d0a) +_CeruleanGymText_5c82a:: text "Yo! Champ in" line "making!" @@ -145,16 +121,11 @@ _CeruleanGymText_5c82a:: ; 98d0a (26:4d0a) line "electricity!" done -_CeruleanGymText_5c82f:: ; 98db0 (26:4db0) +_CeruleanGymText_5c82f:: text "You beat MISTY!" line "What'd I tell ya?" -IF DEF(_YELLOW) - para "You and me, kid," -ELSE para "You and me kid," -ENDC line "we make a pretty" cont "darn good team!" done - diff --git a/text/maps/cerulean_mart.asm b/text/maps/cerulean_mart.asm index 936104ee..86a74588 100644 --- a/text/maps/cerulean_mart.asm +++ b/text/maps/cerulean_mart.asm @@ -1,4 +1,4 @@ -_CeruleanMartText2:: ; 99012 (26:5012) +_CeruleanMartText2:: text "Use REPEL to keep" line "bugs and weak" cont "#MON away." @@ -9,7 +9,7 @@ _CeruleanMartText2:: ; 99012 (26:5012) cont "for best results!" done -_CeruleanMartText3:: ; 9907f (26:507f) +_CeruleanMartText3:: text "Have you seen any" line "RARE CANDY?" @@ -17,4 +17,3 @@ _CeruleanMartText3:: ; 9907f (26:507f) line "make #MON go" cont "up one level!" done - diff --git a/text/maps/cerulean_pokecenter.asm b/text/maps/cerulean_pokecenter.asm index 6cc93144..497fbce3 100644 --- a/text/maps/cerulean_pokecenter.asm +++ b/text/maps/cerulean_pokecenter.asm @@ -1,4 +1,4 @@ -_CeruleanPokecenterText1:: ; 988e5 (26:48e5) +_CeruleanPokecenterText2:: text "That BILL!" para "I heard that" @@ -7,7 +7,7 @@ _CeruleanPokecenterText1:: ; 988e5 (26:48e5) cont "rare #MON!" done -_CeruleanPokecenterText3:: ; 9892a (26:492a) +_CeruleanPokecenterText3:: text "Have you heard" line "about BILL?" @@ -22,4 +22,3 @@ _CeruleanPokecenterText3:: ; 9892a (26:492a) line "to boast about" cont "their #MON?" done - diff --git a/text/maps/cerulean_trade_house.asm b/text/maps/cerulean_trade_house.asm index c22f24a9..b606613b 100644 --- a/text/maps/cerulean_trade_house.asm +++ b/text/maps/cerulean_trade_house.asm @@ -1,43 +1,4 @@ -IF DEF(_YELLOW) -MelanieText1:: - text "I nursed this" - line "BULBASAUR back to" - cont "health." - - para "It needs a good" - line "trainer to take" - cont "care of it now.@@" - -MelanieText2:: - text "I know! Would you" - line "take care of this" - cont "BULBASAUR?" - done - -MelanieText3:: - text "Please take care" - line "of BULBASAUR!@@" - -MelanieText4:: - text "Is BULBASAUR" - line "doing well?@@" - -MelanieText5:: - text "Oh..." - line "That's too bad...@@" - -MelanieBulbasaurText:: - text "BULBASAUR: Bubba!" - line "Zoar!@@" - -MelanieOddishText:: - text "ODDISH: Orddissh!@@" - -MelanieSandshrewText:: - text "SANDSHREW: Pikii!@@" -ENDC - -_CeruleanHouse1Text1:: ; 9888c (26:488c) +_CeruleanHouse1Text1:: text "My husband likes" line "trading #MON." diff --git a/text/maps/cerulean_trashed_house.asm b/text/maps/cerulean_trashed_house.asm index 83f87cb8..f79540ae 100644 --- a/text/maps/cerulean_trashed_house.asm +++ b/text/maps/cerulean_trashed_house.asm @@ -1,4 +1,4 @@ -_CeruleanTrashedText_1d6ab:: ; 9875c (26:475c) +_CeruleanTrashedText_1d6ab:: text "Those miserable" line "ROCKETs!" @@ -14,7 +14,7 @@ _CeruleanTrashedText_1d6ab:: ; 9875c (26:475c) line "bundle, it did!" done -_CeruleanTrashedText_1d6b0:: ; 987e2 (26:47e2) +_CeruleanTrashedText_1d6b0:: text "I figure what's" line "lost is lost!" @@ -23,15 +23,14 @@ _CeruleanTrashedText_1d6b0:: ; 987e2 (26:47e2) cont "DIG without a TM!" done -_CeruleanHouseTrashedText2:: ; 98834 (26:4834) +_CeruleanHouseTrashedText2:: text "TEAM ROCKET must" line "be trying to DIG" cont "their way into no" cont "good!" done -_CeruleanHouseTrashedText3:: ; 9886f (26:486f) +_CeruleanHouseTrashedText3:: text "TEAM ROCKET left" line "a way out!" done - diff --git a/text/maps/champion.asm b/text/maps/champion.asm index 19484c23..3ca7aadf 100644 --- a/text/maps/champion.asm +++ b/text/maps/champion.asm @@ -1,4 +1,4 @@ -_GaryText_760f4:: ; 860e1 (21:60e1) +_GaryChampionIntroText:: text $53, ": Hey!" para "I was looking" @@ -35,7 +35,7 @@ _GaryText_760f4:: ; 860e1 (21:60e1) cont "in the world!" done -_GaryText_760f9:: ; 8623b (21:623b) +_GaryDefeatedText:: text "NO!" line "That can't be!" cont "You beat my best!" @@ -49,7 +49,7 @@ _GaryText_760f9:: ; 8623b (21:623b) cont "It's not fair!" prompt -_GaryText_760fe:: ; 862b4 (21:62b4) +_GaryVictoryText:: text "Hahaha!" line "I won, I won!" @@ -65,7 +65,7 @@ _GaryText_760fe:: ; 862b4 (21:62b4) line "Hahaha!" prompt -_GaryText_76103:: ; 8632f (21:632f) +_GaryText_76103:: text "Why?" line "Why did I lose?" @@ -81,11 +81,11 @@ _GaryText_76103:: ; 8632f (21:632f) line "like to admit it." done -_GaryText2:: ; 863c1 (21:63c1) +_GaryText2:: text "OAK: ", $52, "!" done -_GaryText_76120:: ; 863ca (21:63ca) +_GaryText_76120:: text "OAK: So, you won!" line "Congratulations!" cont "You're the new" @@ -103,7 +103,7 @@ _GaryText_76120:: ; 863ca (21:63ca) line "come of age!" done -_GaryText_76125:: ; 86463 (21:6463) +_GaryText_76125:: text "OAK: ", $53, "! I'm" line "disappointed!" @@ -129,7 +129,7 @@ _GaryText_76125:: ; 86463 (21:6463) cont "a champ again!" done -_GaryText_7612a:: ; 86567 (21:6567) +_GaryText_7612a:: text "OAK: ", $52, "!" para "You understand" @@ -144,4 +144,3 @@ _GaryText_7612a:: ; 86567 (21:6567) para $52, "!" line "Come with me!" done - diff --git a/text/maps/cinnabar_gym.asm b/text/maps/cinnabar_gym.asm index c3208a84..b14f6f60 100644 --- a/text/maps/cinnabar_gym.asm +++ b/text/maps/cinnabar_gym.asm @@ -1,4 +1,4 @@ -_BlaineBattleText:: ; a0844 (28:4844) +_BlaineBattleText:: text "Hah!" para "I am BLAINE! I" @@ -13,14 +13,14 @@ _BlaineBattleText:: ; a0844 (28:4844) line "have BURN HEAL!" done -_BlaineEndBattleText:: ; a08c7 (28:48c7) +_BlaineEndBattleText:: text "I have" line "burnt out!" para "You have earned" line "the VOLCANOBADGE!@@" -_BlaineFireBlastText:: ; a08fd (28:48fd) +_BlaineFireBlastText:: text "FIRE BLAST is the" line "ultimate fire" cont "technique!" @@ -29,7 +29,7 @@ _BlaineFireBlastText:: ; a08fd (28:48fd) line "water #MON!" done -_BlaineBadgeText:: ; a0946 (28:4946) +_BlaineBadgeText:: text "Hah!" para "The VOLCANOBADGE" @@ -41,13 +41,13 @@ _BlaineBadgeText:: ; a0946 (28:4946) line "have this too!" done -_ReceivedTM38Text:: ; a09a8 (28:49a8) +_ReceivedTM38Text:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_TM38ExplanationText:: ; a09bc (28:49bc) +_TM38ExplanationText:: db $0 para "TM38 contains" line "FIRE BLAST!" @@ -60,23 +60,23 @@ _TM38ExplanationText:: ; a09bc (28:49bc) cont "good bets!" done -_TM38NoRoomText:: ; a0a1e (28:4a1e) +_TM38NoRoomText:: text "Make room for my" line "gift!" done -_CinnabarGymText_7595f:: ; a0a36 (28:4a36) +_CinnabarGymText_7595f:: text "Do you know how" line "hot #MON fire" cont "breath can get?" done -_CinnabarGymText_75964:: ; a0a65 (28:4a65) +_CinnabarGymText_75964:: text "Yow!" line "Hot, hot, hot!" prompt -_CinnabarGymText_75969:: ; a0a7a (28:4a7a) +_CinnabarGymText_75969:: text "Fire, or to be" line "more precise," cont "combustion..." @@ -85,66 +85,66 @@ _CinnabarGymText_75969:: ; a0a7a (28:4a7a) line "blah..." done -_CinnabarGymText_75994:: ; a0ac0 (28:4ac0) +_CinnabarGymText_75994:: text "I was a thief, but" line "I became straight" cont "as a trainer!" done -_CinnabarGymText_75999:: ; a0af4 (28:4af4) +_CinnabarGymText_75999:: text "I" line "surrender!" prompt -_CinnabarGymText_7599e:: ; a0b02 (28:4b02) +_CinnabarGymText_7599e:: text "I can't help" line "stealing other" cont "people's #MON!" done -_CinnabarGymText_759c9:: ; a0b2c (28:4b2c) +_CinnabarGymText_759c9:: text "You can't win!" line "I have studied" cont "#MON totally!" done -_CinnabarGymText_759ce:: ; a0b58 (28:4b58) +_CinnabarGymText_759ce:: text "Waah!" line "My studies!" prompt -_CinnabarGymText_759d3:: ; a0b6b (28:4b6b) +_CinnabarGymText_759d3:: text "My theories are" line "too complicated" cont "for you!" done -_CinnabarGymText_759fe:: ; a0b95 (28:4b95) +_CinnabarGymText_759fe:: text "I just like using" line "fire #MON!" done -_CinnabarGymText_75a03:: ; a0bb3 (28:4bb3) +_CinnabarGymText_75a03:: text "Too hot" line "to handle!" prompt -_CinnabarGymText_75a08:: ; a0bc7 (28:4bc7) +_CinnabarGymText_75a08:: text "I wish there was" line "a thief #MON!" cont "I'd use that!" done -_CinnabarGymText_75a33:: ; a0bf4 (28:4bf4) +_CinnabarGymText_75a33:: text "I know why BLAINE" line "became a trainer!" done -_CinnabarGymText_75a38:: ; a0c19 (28:4c19) +_CinnabarGymText_75a38:: text "Ow!" prompt -_CinnabarGymText_75a3d:: ; a0c1e (28:4c1e) +_CinnabarGymText_75a3d:: text "BLAINE was lost" line "in the mountains" cont "when a fiery bird" @@ -155,40 +155,40 @@ _CinnabarGymText_75a3d:: ; a0c1e (28:4c1e) cont "his way down!" done -_CinnabarGymText_75a68:: ; a0c90 (28:4c90) +_CinnabarGymText_75a68:: text "I've been to many" line "GYMs, but this is" cont "my favorite!" done -_CinnabarGymText_75a6d:: ; a0cc1 (28:4cc1) +_CinnabarGymText_75a6d:: text "Yowza!" line "Too hot!" prompt -_CinnabarGymText_75a72:: ; a0cd2 (28:4cd2) +_CinnabarGymText_75a72:: text "Us fire #MON" line "fans like PONYTA" cont "and NINETALES!" done -_CinnabarGymText_75a9d:: ; a0d00 (28:4d00) +_CinnabarGymText_75a9d:: text "Fire is weak" line "against H2O!" done -_CinnabarGymText_75aa2:: ; a0d1b (28:4d1b) +_CinnabarGymText_75aa2:: text "Oh!" line "Snuffed out!" prompt -_CinnabarGymText_75aa7:: ; a0d2d (28:4d2d) +_CinnabarGymText_75aa7:: text "Water beats fire!" line "But, fire melts" cont "ice #MON!" done -_CinnabarGymText_75ac2:: ; a0d5a (28:4d5a) +_CinnabarGymText_75ac2:: text "Yo! Champ in" line "making!" @@ -203,8 +203,7 @@ _CinnabarGymText_75ac2:: ; a0d5a (28:4d5a) line "some BURN HEALs!" done -_CinnabarGymText_75ac7:: ; a0dd9 (28:4dd9) +_CinnabarGymText_75ac7:: text $52, "! You beat" line "that fire brand!" done - diff --git a/text/maps/cinnabar_island.asm b/text/maps/cinnabar_island.asm index 897368d2..352ab8ea 100644 --- a/text/maps/cinnabar_island.asm +++ b/text/maps/cinnabar_island.asm @@ -1,37 +1,33 @@ -_CinnabarIslandText8:: ; a61cf (29:61cf) +_CinnabarIslandText8:: text "The door is" line "locked..." done -_CinnabarIslandText1:: ; a61e6 (29:61e6) +_CinnabarIslandText1:: text "CINNABAR GYM's" line "BLAINE is an odd" cont "man who has lived" cont "here for decades." done -_CinnabarIslandText2:: ; a622a (29:622a) +_CinnabarIslandText2:: text "Scientists conduct" line "experiments in" -IF DEF(_YELLOW) - cont "the burned-out" -ELSE cont "the burned out" -ENDC cont "building." done -_CinnabarIslandText3:: ; a6266 (29:6266) +_CinnabarIslandText3:: text "CINNABAR ISLAND" line "The Fiery Town of" cont "Burning Desire" done -_CinnabarIslandText6:: ; a6298 (29:6298) +_CinnabarIslandText6:: text "#MON LAB" done -_CinnabarIslandText7:: ; a62a2 (29:62a2) +_CinnabarIslandText7:: text "CINNABAR ISLAND" line "#MON GYM" cont "LEADER: BLAINE" @@ -39,4 +35,3 @@ _CinnabarIslandText7:: ; a62a2 (29:62a2) para "The Hot-Headed" line "Quiz Master!" done - diff --git a/text/maps/cinnabar_lab.asm b/text/maps/cinnabar_lab.asm index 712b139b..a93a484d 100644 --- a/text/maps/cinnabar_lab.asm +++ b/text/maps/cinnabar_lab.asm @@ -1,4 +1,4 @@ -_Lab1Text1:: ; a0df7 (28:4df7) +_Lab1Text1:: text "We study #MON" line "extensively here." @@ -7,24 +7,23 @@ _Lab1Text1:: ; a0df7 (28:4df7) cont "for examination." done -_Lab1Text2:: ; a0e49 (28:4e49) +_Lab1Text2:: text "A photo of the" line "LAB's founder," cont "DR.FUJI!" done -_Lab1Text3:: ; a0e70 (28:4e70) +_Lab1Text3:: text "#MON LAB" line "Meeting Room" done -_Lab1Text4:: ; a0e87 (28:4e87) +_Lab1Text4:: text "#MON LAB" line "R-and-D Room" done -_Lab1Text5:: ; a0e9e (28:4e9e) +_Lab1Text5:: text "#MON LAB" line "Testing Room" done - diff --git a/text/maps/cinnabar_lab_fossil_room.asm b/text/maps/cinnabar_lab_fossil_room.asm index cdbaca13..565104b3 100644 --- a/text/maps/cinnabar_lab_fossil_room.asm +++ b/text/maps/cinnabar_lab_fossil_room.asm @@ -1,4 +1,4 @@ -_Lab4Text_75dc6:: ; a10e8 (28:50e8) +_Lab4Text_75dc6:: text "Hiya!" para "I am important" @@ -11,11 +11,11 @@ _Lab4Text_75dc6:: ; a10e8 (28:50e8) line "fossil for me?" prompt -_Lab4Text_75dcb:: ; a1145 (28:5145) +_Lab4Text_75dcb:: text "No! Is too bad!" done -_Lab4Text_75dd0:: ; a1156 (28:5156) +_Lab4Text_75dd0:: text "I take a little" line "time!" @@ -23,7 +23,7 @@ _Lab4Text_75dd0:: ; a1156 (28:5156) line "little while!" done -_Lab4Text_75dd5:: ; a118d (28:518d) +_Lab4Text_75dd5:: text "Where were you?" para "Your fossil is" @@ -35,7 +35,7 @@ _Lab4Text_75dd5:: ; a118d (28:518d) line "like I think!" prompt -_Lab4Text_610ae:: ; a11d6 (28:51d6) +_Lab4Text_610ae:: text "Oh! That is" line "@" TX_RAM wcd6d @@ -54,7 +54,7 @@ _Lab4Text_610ae:: ; a11d6 (28:51d6) cont "again!" done -_Lab4Text_610b3:: ; a1259 (28:5259) +_Lab4Text_610b3:: text "So! You hurry and" line "give me that!" @@ -64,7 +64,7 @@ _Lab4Text_610b3:: ; a1259 (28:5259) text "!" prompt -_Lab4Text_610b8:: ; a128f (28:528f) +_Lab4Text_610b8:: text "I take a little" line "time!" @@ -72,8 +72,7 @@ _Lab4Text_610b8:: ; a128f (28:528f) line "little while!" done -_Lab4Text_610bd:: ; a12c6 (28:52c6) +_Lab4Text_610bd:: text "Aiyah! You come" line "again!" done - diff --git a/text/maps/cinnabar_lab_metronome_room.asm b/text/maps/cinnabar_lab_metronome_room.asm index af5dc150..e2fbb558 100644 --- a/text/maps/cinnabar_lab_metronome_room.asm +++ b/text/maps/cinnabar_lab_metronome_room.asm @@ -1,4 +1,4 @@ -_TM35PreReceiveText:: ; a0f09 (28:4f09) +_TM35PreReceiveText:: text "Tch-tch-tch!" line "I made a cool TM!" @@ -6,13 +6,13 @@ _TM35PreReceiveText:: ; a0f09 (28:4f09) line "kinds of fun!" prompt -_ReceivedTM35Text:: ; a0f48 (28:4f48) +_ReceivedTM35Text:: text $52, " received " line "@" TX_RAM wcf4b text "!@@" -_TM35ExplanationText:: ; a0f5d (28:4f5d) +_TM35ExplanationText:: text "Tch-tch-tch!" line "That's the sound" cont "of a METRONOME!" @@ -23,18 +23,18 @@ _TM35ExplanationText:: ; a0f5d (28:4f5d) cont "it doesn't know!" done -_TM35NoRoomText:: ; a0fc7 (28:4fc7) +_TM35NoRoomText:: text "Your pack is" line "crammed full!" done -_Lab3Text2:: ; a0fe3 (28:4fe3) +_Lab3Text2:: text "EEVEE can evolve" line "into 1 of 3 kinds" cont "of #MON." done -_Lab3Text3:: ; a1010 (28:5010) +_Lab3Text3:: text "There's an e-mail" line "message!" @@ -58,7 +58,6 @@ _Lab3Text3:: ; a1010 (28:5010) para "..." done -_Lab3Text5:: ; a10d8 (28:50d8) +_Lab3Text5:: text "An amber pipe!" done - diff --git a/text/maps/cinnabar_lab_trade_room.asm b/text/maps/cinnabar_lab_trade_room.asm index 02571da8..196124e7 100644 --- a/text/maps/cinnabar_lab_trade_room.asm +++ b/text/maps/cinnabar_lab_trade_room.asm @@ -1,4 +1,4 @@ -_Lab2Text1:: ; a0eb5 (28:4eb5) +_Lab2Text1:: text "I found this very" line "strange fossil in" cont "MT.MOON!" @@ -7,4 +7,3 @@ _Lab2Text1:: ; a0eb5 (28:4eb5) line "rare, prehistoric" cont "#MON!" done - diff --git a/text/maps/cinnabar_mart.asm b/text/maps/cinnabar_mart.asm index d7c50c9f..42a41d06 100644 --- a/text/maps/cinnabar_mart.asm +++ b/text/maps/cinnabar_mart.asm @@ -1,11 +1,10 @@ -_CinnabarMartText2:: ; a139b (28:539b) +_CinnabarMartText2:: text "Don't they have X" line "ATTACK? It's good" cont "for battles!" done -_CinnabarMartText3:: ; a13cb (28:53cb) +_CinnabarMartText3:: text "It never hurts to" line "have extra items!" done - diff --git a/text/maps/cinnabar_pokecenter.asm b/text/maps/cinnabar_pokecenter.asm index 09d9a120..cf481764 100644 --- a/text/maps/cinnabar_pokecenter.asm +++ b/text/maps/cinnabar_pokecenter.asm @@ -1,5 +1,4 @@ -_CinnabarPokecenterText2:: ; a12de (28:52de) -_CinnabarPokecenterText1:: ; a12de (28:52de) +_CinnabarPokecenterText2:: text "You can cancel" line "evolution." @@ -9,7 +8,7 @@ _CinnabarPokecenterText1:: ; a12de (28:52de) cont "it the way it is." done -_CinnabarPokecenterText3:: ; a133e (28:533e) +_CinnabarPokecenterText3:: text "Do you have any" line "friends?" @@ -20,4 +19,3 @@ _CinnabarPokecenterText3:: ; a133e (28:533e) para "I think it's" line "worth a try!" done - diff --git a/text/maps/copycats_house_1f.asm b/text/maps/copycats_house_1f.asm index da99566b..3ec2b151 100644 --- a/text/maps/copycats_house_1f.asm +++ b/text/maps/copycats_house_1f.asm @@ -1,11 +1,11 @@ -_CopycatsHouse1FText1:: ; a14f7 (28:54f7) +_CopycatsHouse1FText1:: text "My daughter is so" line "self-centered." cont "She only has a" cont "few friends." done -_CopycatsHouse1FText2:: ; a1535 (28:5535) +_CopycatsHouse1FText2:: text "My daughter likes" line "to mimic people." @@ -15,11 +15,6 @@ _CopycatsHouse1FText2:: ; a1535 (28:5535) cont "around here!" done -_CopycatsHouse1FText3:: ; a1596 (28:5596) -IF DEF(_YELLOW) - text "CHANSEY: Chaan" - line "sey!@@" -ELSE +_CopycatsHouse1FText3:: text "CHANSEY: Chaan!" line "Sii!@@" -ENDC diff --git a/text/maps/copycats_house_2f.asm b/text/maps/copycats_house_2f.asm index 85202aa8..90833127 100644 --- a/text/maps/copycats_house_2f.asm +++ b/text/maps/copycats_house_2f.asm @@ -1,4 +1,4 @@ -_CopycatsHouse2FText_5ccd4:: ; a15ad (28:55ad) +_CopycatsHouse2FText_5ccd4:: text $52, ": Hi! Do" line "you like #MON?" @@ -15,7 +15,7 @@ _CopycatsHouse2FText_5ccd4:: ; a15ad (28:55ad) line "favorite hobby!" prompt -_TM31PreReceiveText:: ; a1636 (28:5636) +_TM31PreReceiveText:: text "Oh wow!" line "A # DOLL!" @@ -26,13 +26,13 @@ _TM31PreReceiveText:: ; a1636 (28:5636) line "this, then!" prompt -_ReceivedTM31Text:: ; a1675 (28:5675) +_ReceivedTM31Text:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_TM31ExplanationText1:: ; a1689 (28:5689) +_TM31ExplanationText1:: db $0 para "TM31 contains my" line "favorite, MIMIC!" @@ -40,7 +40,7 @@ _TM31ExplanationText1:: ; a1689 (28:5689) para "Use it on a good" line "#MON!@@" -_TM31ExplanationText2:: ; a16c5 (28:56c5) +_TM31ExplanationText2:: text $52, ": Hi!" line "Thanks for TM31!" @@ -54,11 +54,11 @@ _TM31ExplanationText2:: ; a16c5 (28:56c5) line "It's a scream!" done -_TM31NoRoomText:: ; a1733 (28:5733) +_TM31NoRoomText:: text "Don't you want" line "this?@@" -_CopycatsHouse2FText2:: ; a1749 (28:5749) +_CopycatsHouse2FText2:: text "DODUO: Giiih!" para "MIRROR MIRROR ON" @@ -67,19 +67,19 @@ _CopycatsHouse2FText2:: ; a1749 (28:5749) cont "OF ALL?" done -_CopycatsHouse2FText3:: ; a1792 (28:5792) +_CopycatsHouse2FText3:: text "This is a rare" line "#MON! Huh?" cont "It's only a doll!" done -_CopycatsHouse2FText6:: ; a17be (28:57be) +_CopycatsHouse2FText6:: text "A game with MARIO" line "wearing a bucket" cont "on his head!" done -_CopycatsHouse2FText_5cd17:: ; a17ef (28:57ef) +_CopycatsHouse2FText_5cd17:: text "..." para "My Secrets!" @@ -91,7 +91,6 @@ _CopycatsHouse2FText_5cd17:: ; a17ef (28:57ef) cont "CLEFAIRY!" done -_CopycatsHouse2FText_5cd1c:: ; a1842 (28:5842) +_CopycatsHouse2FText_5cd1c:: text "Huh? Can't see!" done - diff --git a/text/maps/daycare_1.asm b/text/maps/daycare_1.asm index a4182351..6e3c5737 100644 --- a/text/maps/daycare_1.asm +++ b/text/maps/daycare_1.asm @@ -1,16 +1,16 @@ -_DayCareMText_5640f:: ; 8ab95 (22:6b95) +_DayCareIntroText:: text "I run a DAYCARE." line "Would you like me" cont "to raise one of" cont "your #MON?" done -_DayCareMText_56414:: ; 8abd4 (22:6bd4) +_DayCareWhichMonText:: text "Which #MON" line "should I raise?" prompt -_DayCareMText_56419:: ; 8abf0 (22:6bf0) +_DayCareWillLookAfterMonText:: text "Fine, I'll look" line "after @" TX_RAM wcd6d @@ -18,12 +18,12 @@ _DayCareMText_56419:: ; 8abf0 (22:6bf0) cont "for a while." prompt -_DayCareMText_5641e:: ; 8ac19 (22:6c19) +_DayCareComeSeeMeInAWhileText:: text "Come see me in" line "a while." done -_DayCareMText_56423:: ; 8ac32 (22:6c32) +_DayCareMonHasGrownText:: text "Your @" TX_RAM wcd6d db $0 @@ -31,30 +31,28 @@ _DayCareMText_56423:: ; 8ac32 (22:6c32) para "By level, it's" line "grown by @" - -DayCareMText_8ac67:: ; 8ac67 (22:6c67) - TX_NUM wTrainerEngageDistance,$1,$3 + TX_NUM wDayCareNumLevelsGrown,$1,$3 text "!" para "Aren't I great?" prompt -_DayCareMText_56428:: ; 8ac7d (22:6c7d) +_DayCareOweMoneyText:: text "You owe me ¥@" - TX_BCD wcd3f, $c2 + TX_BCD wDayCareTotalCost, $c2 db $0 line "for the return" cont "of this #MON." done -_DayCareMText_5642d:: ; 8acae (22:6cae) +_DayCareGotMonBackText:: text $52, " got" line "@" - TX_RAM W_DAYCAREMONNAME + TX_RAM wDayCareMonName text " back!" done -_DayCareMText_56432:: ; 8acc1 (22:6cc1) +_DayCareMonNeedsMoreTimeText:: text "Back already?" line "Your @" TX_RAM wcd6d @@ -62,4 +60,3 @@ _DayCareMText_56432:: ; 8acc1 (22:6cc1) cont "needs some more" cont "time with me." prompt - diff --git a/text/maps/daycare_2.asm b/text/maps/daycare_2.asm index c6478a76..20c0e5ad 100644 --- a/text/maps/daycare_2.asm +++ b/text/maps/daycare_2.asm @@ -1,38 +1,33 @@ -_DayCareMText_56437:: ; 8c000 (23:4000) +_DayCareAllRightThenText:: text "All right then," line "@@" -_DayCareMText_5643b:: ; 8c013 (23:4013) -IF DEF(_YELLOW) - text "Come again." -ELSE +_DayCareComeAgainText:: text "come again." -ENDC done -_DayCareMText_56440:: ; 8c020 (23:4020) +_DayCareNoRoomForMonText:: text "You have no room" line "for this #MON!" done -_DayCareMText_56445:: ; 8c041 (23:4041) +_DayCareOnlyHaveOneMonText:: text "You only have one" line "#MON with you." done -_DayCareMText_5644a:: ; 8c063 (23:4063) +_DayCareCantAcceptMonWithHMText:: text "I can't accept a" line "#MON that" cont "knows an HM move." done -_DayCareMText_5644f:: ; 8c090 (23:4090) +_DayCareHeresYourMonText:: text "Thank you! Here's" line "your #MON!" prompt -_DayCareMText_56454:: ; 8c0ad (23:40ad) +_DayCareNotEnoughMoneyText:: text "Hey, you don't" line "have enough ¥!" done - diff --git a/text/maps/digletts_cave_route_11_entrance.asm b/text/maps/digletts_cave_route_11_entrance.asm index 782fc645..ecd3225e 100644 --- a/text/maps/digletts_cave_route_11_entrance.asm +++ b/text/maps/digletts_cave_route_11_entrance.asm @@ -1,4 +1,4 @@ -_DiglettsCaveEntRoute11Text1:: ; 8c7f9 (23:47f9) +_DiglettsCaveEntRoute11Text1:: text "What a surprise!" line "DIGLETTs dug this" cont "long tunnel!" @@ -6,4 +6,3 @@ _DiglettsCaveEntRoute11Text1:: ; 8c7f9 (23:47f9) para "It goes right to" line "VIRIDIAN CITY!" done - diff --git a/text/maps/digletts_cave_route_2_entrance.asm b/text/maps/digletts_cave_route_2_entrance.asm index cfa69aa2..a04bbef7 100644 --- a/text/maps/digletts_cave_route_2_entrance.asm +++ b/text/maps/digletts_cave_route_2_entrance.asm @@ -1,4 +1,4 @@ -_DiglettsCaveRoute2Text1:: ; 8a6a7 (22:66a7) +_DiglettsCaveRoute2Text1:: text "I went to ROCK" line "TUNNEL, but it's" cont "dark and scary." @@ -7,4 +7,3 @@ _DiglettsCaveRoute2Text1:: ; 8a6a7 (22:66a7) line "FLASH could light" cont "it up..." done - diff --git a/text/maps/fan_club.asm b/text/maps/fan_club.asm index bb1ca0f0..4827f2e8 100644 --- a/text/maps/fan_club.asm +++ b/text/maps/fan_club.asm @@ -1,35 +1,15 @@ PikachuFanText:: text "Won't you admire" -IF DEF(_YELLOW) - line "my CLEFAIRY's" -ELSE line "my PIKACHU's" -ENDC cont "adorable tail?" done PikachuFanBetterText:: -IF DEF(_YELLOW) - text "Humph! My CLEFAIRY" -ELSE text "Humph! My PIKACHU" -ENDC line "is twice as cute" cont "as that one!" done -IF DEF(_YELLOW) -PikachuFanPrintText:: - text "Our CHAIRMAN's new" - line "hobby is taking" - cont "#MON photos." - - para "He gave me a nice" - line "PRINT of my cute" - cont "CLEFAIRY." - done -ENDC - SeelFanText:: text "I just love my" line "SEEL!" @@ -45,22 +25,9 @@ SeelFanBetterText:: line "more attractive!" done -IF DEF(_YELLOW) -SeelFanPrintText:: - text "I'm going to hook" - line "up the cable to" - cont "get a photo PRINT" - cont "of my SEEL!" - done -ENDC - FanClubPikachuText:: -IF DEF(_YELLOW) - text "CLEFAIRY: Pippii!" -ELSE text "PIKACHU: Chu!" line "Pikachu!" -ENDC done FanClubSeelText:: @@ -71,14 +38,8 @@ FanClubMeetChairText:: text "I chair the" line "#MON Fan Club!" -IF DEF(_YELLOW) - para "I have more than" - line "100 #MON. I" - cont "love them all!" -ELSE para "I have collected" line "over 100 #MON!" -ENDC para "I'm very fussy" line "when it comes to" @@ -86,13 +47,8 @@ ENDC para "So..." -IF DEF(_YELLOW) - para "Did you come to" - line "hear me brag" -ELSE para "Did you come" line "visit to hear" -ENDC cont "about my #MON?" done @@ -127,13 +83,13 @@ FanClubChairStoryText:: prompt ReceivedBikeVoucherText:: - text $52, " received" + text "<PLAYER> received" line "a @" TX_RAM wcf4b text "!@@" ExplainBikeVoucherText:: - db $0 + text "" para "Exchange that for" line "a BICYCLE!" @@ -155,7 +111,7 @@ FanClubNoStoryText:: done FanClubChairFinalText:: - text "Hello, ", $52, "!" + text "Hello, <PLAYER>!" para "Did you come see" line "me about my" @@ -169,55 +125,19 @@ FanClubBagFullText:: line "this!" done -IF DEF(_YELLOW) -FanClubChairPrintText1:: - text "Hi there, ",$52,"!" - line "Have you seen my" - cont "#MON photos?" - - para "I have them framed" - line "up on that wall." - - para "Ah, I know!" - - para "Would you like me" - line "to take a photo" - cont "of your #MON?" - done - -FanClubChairPrintText2:: - text "No? That's really" - line "disappointing." - done - -FanClubChairPrintText3:: - text "OK, I'm done." - done - -FanClubChairPrintText4:: - text "Maybe we won't" - line "PRINT this now." - done -ENDC - -_FanClubText6:: ; 9a948 (26:6948) -IF DEF(_YELLOW) - text "Our CHAIRMAN is" -ELSE +_FanClubText6:: text "Our Chairman is" -ENDC line "very vocal about" cont "#MON." done -_FanClubText7:: ; 9a970 (26:6970) +_FanClubText7:: text "Let's all listen" line "politely to other" cont "trainers!" done -_FanClubText8:: ; 9a99d (26:699d) +_FanClubText8:: text "If someone brags," line "brag right back!" done - diff --git a/text/maps/fighting_dojo.asm b/text/maps/fighting_dojo.asm index 9cf7ba4e..3df069c1 100644 --- a/text/maps/fighting_dojo.asm +++ b/text/maps/fighting_dojo.asm @@ -1,4 +1,4 @@ -_FightingDojoText_5ce8e:: ; a1852 (28:5852) +_FightingDojoText_5ce8e:: text "Grunt!" para "I am the KARATE" @@ -12,12 +12,12 @@ _FightingDojoText_5ce8e:: ; a1852 (28:5852) para "Fwaaa!" done -_FightingDojoText_5ce93:: ; a18ba (28:58ba) +_FightingDojoText_5ce93:: text "Hwa!" line "Arrgh! Beaten!" prompt -_FightingDojoText_5ce98:: ; a18cf (28:58cf) +_FightingDojoText_5ce98:: text "Indeed, I have" line "lost!" @@ -34,24 +34,24 @@ _FightingDojoText_5ce98:: ; a18cf (28:58cf) line "one you like!" done -_FightingDojoText_5ce9d:: ; a1972 (28:5972) +_FightingDojoText_5ce9d:: text "Ho!" para "Stay and train at" line "Karate with us!" done -_FightingDojoBattleText1:: ; a1999 (28:5999) +_FightingDojoBattleText1:: text "Hoargh! Take your" line "shoes off!" done -_FightingDojoEndBattleText1:: ; a19b7 (28:59b7) +_FightingDojoEndBattleText1:: text "I give" line "up!" prompt -_FightingDojoAfterBattleText1:: ; a19c3 (28:59c3) +_FightingDojoAfterBattleText1:: text "You wait 'til you" line "see our Master!" @@ -59,22 +59,22 @@ _FightingDojoAfterBattleText1:: ; a19c3 (28:59c3) line "compared to him!" done -_FightingDojoBattleText2:: ; a1a05 (28:5a05) +_FightingDojoBattleText2:: text "I hear you're" line "good! Show me!" done -_FightingDojoEndBattleText2:: ; a1a22 (28:5a22) +_FightingDojoEndBattleText2:: text "Judge!" line "1 point!" prompt -_FightingDojoAfterBattleText2:: ; a1a33 (28:5a33) +_FightingDojoAfterBattleText2:: text "Our Master is a" line "pro fighter!" done -_FightingDojoBattleText3:: ; a1a51 (28:5a51) +_FightingDojoBattleText3:: text "Nothing tough" line "frightens me!" @@ -82,18 +82,18 @@ _FightingDojoBattleText3:: ; a1a51 (28:5a51) line "for training!" done -_FightingDojoEndBattleText3:: ; a1a8d (28:5a8d) +_FightingDojoEndBattleText3:: text "Yow!" line "Stubbed fingers!" prompt -_FightingDojoAfterBattleText3:: ; a1aa4 (28:5aa4) +_FightingDojoAfterBattleText3:: text "The only thing" line "that frightens us" cont "is psychic power!" done -_FightingDojoBattleText4:: ; a1ad8 (28:5ad8) +_FightingDojoBattleText4:: text "Hoohah!" para "You're trespassing" @@ -101,39 +101,30 @@ _FightingDojoBattleText4:: ; a1ad8 (28:5ad8) cont "DOJO!" done -_FightingDojoEndBattleText4:: ; a1b09 (28:5b09) +_FightingDojoEndBattleText4:: text "Oof!" line "I give up!" prompt -_FightingDojoAfterBattleText4:: ; a1b1a (28:5b1a) +_FightingDojoAfterBattleText4:: text "The prime fighters" line "across the land" cont "train here." done -_WantHitmonleeText:: ; a1b4a (28:5b4a) +_WantHitmonleeText:: text "You want the" -IF DEF(_YELLOW) - line "hard-kicking" -ELSE line "hard kicking" -ENDC cont "HITMONLEE?" done -_WantHitmonchanText:: ; a1b70 (28:5b70) +_WantHitmonchanText:: text "You want the" -IF DEF(_YELLOW) - line "piston-punching" -ELSE line "piston punching" -ENDC cont "HITMONCHAN?" done -_OtherHitmonText:: ; a1b9a (28:5b9a) +_OtherHitmonText:: text "Better not get" line "greedy..." done - diff --git a/text/maps/fuchsia_city.asm b/text/maps/fuchsia_city.asm index bcb80d0e..a90d0021 100644 --- a/text/maps/fuchsia_city.asm +++ b/text/maps/fuchsia_city.asm @@ -1,11 +1,11 @@ -_FuchsiaCityText1:: ; a5e9c (29:5e9c) +_FuchsiaCityText1:: text "Did you try the" line "SAFARI GAME? Some" cont "#MON can only" cont "be caught there." done -_FuchsiaCityText2:: ; a5ede (29:5ede) +_FuchsiaCityText2:: text "SAFARI ZONE has a" line "zoo in front of" cont "the entrance." @@ -15,71 +15,67 @@ _FuchsiaCityText2:: ; a5ede (29:5ede) cont "catching #MON." done -_FuchsiaCityText3:: ; a5f3e (29:5f3e) +_FuchsiaCityText3:: text "ERIK: Where's" line "SARA? I said I'd" cont "meet her here." done -_FuchsiaCityText4:: ; a5f6b (29:5f6b) +_FuchsiaCityText4:: text "That item ball in" line "there is really a" cont "#MON." done -_FuchsiaCityText5:: ; a5f96 (29:5f96) +_FuchsiaCityText5:: text "!" done -_FuchsiaCityText11:: ; a5f99 (29:5f99) +_FuchsiaCityText11:: text "FUCHSIA CITY" line "Behold! It's" cont "Passion Pink!" done -_FuchsiaCityText13:: ; a5fc1 (29:5fc1) +_FuchsiaCityText13:: text "SAFARI GAME" line "#MON-U-CATCH!" done -_FuchsiaCityText16:: ; a5fdc (29:5fdc) +_FuchsiaCityText16:: text "SAFARI ZONE" line "WARDEN's HOME" done -_FuchsiaCityText17:: ; a5ff6 (29:5ff6) +_FuchsiaCityText17:: text "#MON PARADISE" line "SAFARI ZONE" done -_FuchsiaCityText18:: ; a6011 (29:6011) +_FuchsiaCityText18:: text "FUCHSIA CITY" line "#MON GYM" cont "LEADER: KOGA" para "The Poisonous" -IF DEF(_YELLOW) - line "Ninja Master!" -ELSE line "Ninja Master" -ENDC done -_FuchsiaCityChanseyText:: ; a6050 (29:6050) +_FuchsiaCityChanseyText:: text "Name: CHANSEY" para "Catching one is" line "all up to chance." prompt -_FuchsiaCityVoltorbText:: ; a6081 (29:6081) +_FuchsiaCityVoltorbText:: text "Name: VOLTORB" para "The very image of" line "a # BALL." prompt -_FuchsiaCityKangaskhanText:: ; a60ac (29:60ac) +_FuchsiaCityKangaskhanText:: text "Name: KANGASKHAN" para "A maternal #MON" @@ -88,21 +84,21 @@ _FuchsiaCityKangaskhanText:: ; a60ac (29:60ac) cont "on its belly." prompt -_FuchsiaCitySlowpokeText:: ; a60fd (29:60fd) +_FuchsiaCitySlowpokeText:: text "Name: SLOWPOKE" para "Friendly and very" line "slow moving." prompt -_FuchsiaCityLaprasText:: ; a612c (29:612c) +_FuchsiaCityLaprasText:: text "Name: LAPRAS" para "A.K.A. the king" line "of the seas." prompt -_FuchsiaCityOmanyteText:: ; a6157 (29:6157) +_FuchsiaCityOmanyteText:: text "Name: OMANYTE" para "A #MON that" @@ -110,7 +106,7 @@ _FuchsiaCityOmanyteText:: ; a6157 (29:6157) cont "from a fossil." prompt -_FuchsiaCityKabutoText:: ; a6191 (29:6191) +_FuchsiaCityKabutoText:: text "Name: KABUTO" para "A #MON that" @@ -118,7 +114,6 @@ _FuchsiaCityKabutoText:: ; a6191 (29:6191) cont "from a fossil." prompt -_FuchsiaCityText_19b2a:: ; a61ca (29:61ca) +_FuchsiaCityText_19b2a:: text "..." done - diff --git a/text/maps/fuchsia_fishing_house.asm b/text/maps/fuchsia_fishing_house.asm index 23d0476b..195dc8ef 100644 --- a/text/maps/fuchsia_fishing_house.asm +++ b/text/maps/fuchsia_fishing_house.asm @@ -1,4 +1,4 @@ -_FuchsiaHouse3Text_561bd:: ; a0695 (28:4695) +_FuchsiaHouse3Text_561bd:: text "I'm the FISHING" line "GURU's older" cont "brother!" @@ -10,7 +10,7 @@ _FuchsiaHouse3Text_561bd:: ; a0695 (28:4695) line "fish?" done -_FuchsiaHouse3Text_561c2:: ; a06e8 (28:46e8) +_FuchsiaHouse3Text_561c2:: text "Grand! I like" line "your style!" @@ -22,12 +22,12 @@ _FuchsiaHouse3Text_561c2:: ; a06e8 (28:46e8) TX_RAM wcf4b text "!@@" -_FuchsiaHouse3Text_56212:: ; a0737 (28:4737) +_FuchsiaHouse3Text_56212:: text "Oh... That's so" line "disappointing..." done -_FuchsiaHouse3Text_56217:: ; a0758 (28:4758) +_FuchsiaHouse3Text_56217:: text "Hello there," line $52, "!" @@ -35,10 +35,9 @@ _FuchsiaHouse3Text_56217:: ; a0758 (28:4758) line "biting?" done -_FuchsiaHouse3Text_5621c:: ; a0782 (28:4782) +_FuchsiaHouse3Text_5621c:: text "Oh no!" para "You have no room" line "for my gift!" done - diff --git a/text/maps/fuchsia_gym_1.asm b/text/maps/fuchsia_gym_1.asm index ded9b911..9108fc79 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:: 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:: text "Humph!" line "You have proven" cont "your worth!" @@ -24,4 +24,3 @@ _UnnamedText_75586:: ; 9ea66 (27:6a66) para "Here! Take the" line "SOULBADGE!" prompt - diff --git a/text/maps/fuchsia_gym_2.asm b/text/maps/fuchsia_gym_2.asm index e0cb6807..ba1970e6 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:: 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:: text "Now that you have" line "the SOULBADGE," cont "the DEFENSE of" @@ -24,13 +24,13 @@ _UnnamedText_75590:: ; a0069 (28:4069) line "too!" done -_ReceivedTM06Text:: ; a00eb (28:40eb) +_ReceivedTM06Text:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_TM06ExplanationText:: ; a00ff (28:40ff) +_TM06ExplanationText:: db $0 para "TM06 contains" line "TOXIC!" @@ -40,12 +40,12 @@ _TM06ExplanationText:: ; a00ff (28:40ff) cont "400 years old!" done -_TM06NoRoomText:: ; a0143 (28:4143) +_TM06NoRoomText:: text "Make space for" line "this, child!" done -_FuchsiaGymBattleText1:: ; a0160 (28:4160) +_FuchsiaGymBattleText1:: text "Strength isn't" line "the key for" cont "#MON!" @@ -57,54 +57,54 @@ _FuchsiaGymBattleText1:: ; a0160 (28:4160) cont "brute strength!" done -_FuchsiaGymEndBattleText1:: ; a01c2 (28:41c2) +_FuchsiaGymEndBattleText1:: text "What?" line "Extraordinary!" prompt -_FuchsiaGymAfterBattleText1:: ; a01d8 (28:41d8) +_FuchsiaGymAfterBattleText1:: text "So, you mix brawn" line "with brains?" cont "Good strategy!" done -_FuchsiaGymBattleText2:: ; a0207 (28:4207) +_FuchsiaGymBattleText2:: text "I wanted to become" line "a ninja, so I" cont "joined this GYM!" done -_FuchsiaGymEndBattleText2:: ; a023a (28:423a) +_FuchsiaGymEndBattleText2:: text "I'm done" line "for!" prompt -_FuchsiaGymAfterBattleText2:: ; a0248 (28:4248) +_FuchsiaGymAfterBattleText2:: text "I will keep on" line "training under" cont "KOGA, my ninja" cont "master!" done -_FuchsiaGymBattleText3:: ; a027e (28:427e) +_FuchsiaGymBattleText3:: text "Let's see you" line "beat my special" cont "techniques!" done -_FuchsiaGymEndBattleText3:: ; a02a8 (28:42a8) +_FuchsiaGymEndBattleText3:: text "You" line "had me fooled!" prompt -_FuchsiaGymAfterBattleText3:: ; a02bc (28:42bc) +_FuchsiaGymAfterBattleText3:: text "I like poison and" line "sleep techniques," cont "as they linger" cont "after battle!" done -_FuchsiaGymBattleText4:: ; a02fe (28:42fe) +_FuchsiaGymBattleText4:: text "Stop right there!" para "Our invisible" @@ -112,12 +112,12 @@ _FuchsiaGymBattleText4:: ; a02fe (28:42fe) cont "frustrated?" done -_FuchsiaGymEndBattleText4:: ; a033a (28:433a) +_FuchsiaGymEndBattleText4:: text "Whoa!" line "He's got it!" prompt -_FuchsiaGymAfterBattleText4:: ; a034d (28:434d) +_FuchsiaGymAfterBattleText4:: text "You impressed me!" line "Here's a hint!" @@ -126,7 +126,7 @@ _FuchsiaGymAfterBattleText4:: ; a034d (28:434d) cont "invisible walls!" done -_FuchsiaGymBattleText5:: ; a03a1 (28:43a1) +_FuchsiaGymBattleText5:: text "I also study the" line "way of the ninja" cont "with master KOGA!" @@ -136,16 +136,16 @@ _FuchsiaGymBattleText5:: ; a03a1 (28:43a1) cont "animals!" done -_FuchsiaGymEndBattleText5:: ; a0402 (28:4402) +_FuchsiaGymEndBattleText5:: text "Awoo!" prompt -_FuchsiaGymAfterBattleText5:: ; a0409 (28:4409) +_FuchsiaGymAfterBattleText5:: text "I still have much" line "to learn!" done -_FuchsiaGymBattleText6:: ; a0426 (28:4426) +_FuchsiaGymBattleText6:: text "Master KOGA comes" line "from a long line" cont "of ninjas!" @@ -154,12 +154,12 @@ _FuchsiaGymBattleText6:: ; a0426 (28:4426) line "descend from?" done -_FuchsiaGymEndBattleText6:: ; a0470 (28:4470) +_FuchsiaGymEndBattleText6:: text "Dropped" line "my balls!" prompt -_FuchsiaGymAfterBattleText6:: ; a0483 (28:4483) +_FuchsiaGymAfterBattleText6:: text "Where there is" line "light, there is" cont "shadow!" @@ -169,7 +169,7 @@ _FuchsiaGymAfterBattleText6:: ; a0483 (28:4483) cont "choose?" done -_UnnamedText_7564e:: ; a04d2 (28:44d2) +_FuchsiaGymText_7564e:: text "Yo! Champ in" line "making!" @@ -186,9 +186,8 @@ _UnnamedText_7564e:: ; a04d2 (28:44d2) cont "to reach him!" done -_UnnamedText_75653:: ; a0574 (28:4574) +_FuchsiaGymText_75653:: text "It's amazing how" line "ninja can terrify" cont "even now!" done - diff --git a/text/maps/fuchsia_house.asm b/text/maps/fuchsia_house.asm index de613e3d..7b6556b1 100644 --- a/text/maps/fuchsia_house.asm +++ b/text/maps/fuchsia_house.asm @@ -1,4 +1,4 @@ -_FuchsiaHouse1Text1:: ; 9e2a3 (27:62a3) +_FuchsiaHouse1Text1:: text "SAFARI ZONE's" line "WARDEN is old," cont "but still active!" @@ -7,7 +7,7 @@ _FuchsiaHouse1Text1:: ; 9e2a3 (27:62a3) line "false, though." done -_FuchsiaHouse1Text2:: ; 9e2f3 (27:62f3) +_FuchsiaHouse1Text2:: text "Hmm? You've met" line "BILL?" @@ -18,11 +18,10 @@ _FuchsiaHouse1Text2:: ; 9e2f3 (27:62f3) cont "even as a child!" done -_FuchsiaHouse1Text3:: ; 9e34d (27:634d) +_FuchsiaHouse1Text3:: text "BILL files his" line "own #MON data" cont "on his PC!" para "Did he show you?" done - diff --git a/text/maps/fuchsia_mart.asm b/text/maps/fuchsia_mart.asm index fe05f2af..574898ce 100644 --- a/text/maps/fuchsia_mart.asm +++ b/text/maps/fuchsia_mart.asm @@ -1,4 +1,4 @@ -_FuchsiaMartText2:: ; 9e22e (27:622e) +_FuchsiaMartText2:: text "Do you have a" line "SAFARI ZONE flag?" @@ -6,10 +6,9 @@ _FuchsiaMartText2:: ; 9e22e (27:622e) line "or calendars?" done -_FuchsiaMartText3:: ; 9e26e (27:626e) +_FuchsiaMartText3:: text "Did you try X" line "SPEED? It speeds" cont "up a #MON in" cont "battle!" done - diff --git a/text/maps/fuchsia_meeting_room.asm b/text/maps/fuchsia_meeting_room.asm index cfd7e1c2..10675ead 100644 --- a/text/maps/fuchsia_meeting_room.asm +++ b/text/maps/fuchsia_meeting_room.asm @@ -1,4 +1,4 @@ -_FuchsiaMeetingRoomText1:: ; a05a1 (28:45a1) +_FuchsiaMeetingRoomText1:: text "We nicknamed the" line "WARDEN SLOWPOKE." @@ -6,7 +6,7 @@ _FuchsiaMeetingRoomText1:: ; a05a1 (28:45a1) line "both look vacant!" done -_FuchsiaMeetingRoomText2:: ; a05e6 (28:45e6) +_FuchsiaMeetingRoomText2:: text "SLOWPOKE is very" line "knowledgeable" cont "about #MON!" @@ -16,7 +16,7 @@ _FuchsiaMeetingRoomText2:: ; a05e6 (28:45e6) cont "extinct #MON!" done -_FuchsiaMeetingRoomText3:: ; a0642 (28:4642) +_FuchsiaMeetingRoomText3:: text "SLOWPOKE came in," line "but I couldn't" cont "understand him." @@ -24,4 +24,3 @@ _FuchsiaMeetingRoomText3:: ; a0642 (28:4642) para "I think he's got" line "a speech problem!" done - diff --git a/text/maps/fuchsia_pokecenter.asm b/text/maps/fuchsia_pokecenter.asm index 7f9d1221..a0def7eb 100644 --- a/text/maps/fuchsia_pokecenter.asm +++ b/text/maps/fuchsia_pokecenter.asm @@ -1,4 +1,4 @@ -_FuchsiaPokecenterText1:: ; 9e387 (27:6387) +_FuchsiaPokecenterText1:: text "You can't win" line "with just one" cont "strong #MON." @@ -8,7 +8,7 @@ _FuchsiaPokecenterText1:: ; 9e387 (27:6387) cont "them evenly." done -_FuchsiaPokecenterText3:: ; 9e3de (27:63de) +_FuchsiaPokecenterText3:: text "There's a narrow" line "trail west of" cont "VIRIDIAN CITY." @@ -18,4 +18,3 @@ _FuchsiaPokecenterText3:: ; 9e3de (27:63de) cont "The HQ governs" cont "all trainers." done - diff --git a/text/maps/fujis_house.asm b/text/maps/fujis_house.asm index b54c55f2..7c61d1ed 100644 --- a/text/maps/fujis_house.asm +++ b/text/maps/fujis_house.asm @@ -1,16 +1,16 @@ -_LavenderHouse1Text_1d8d1:: ; 99e8d (26:5e8d) +_LavenderHouse1Text_1d8d1:: text "That's odd, MR.FUJI" line "isn't here." cont "Where'd he go?" done -_LavenderHouse1Text_1d8d6:: ; 99eba (26:5eba) +_LavenderHouse1Text_1d8d6:: text "MR.FUJI had been" line "praying alone for" cont "CUBONE's mother." done -_LavenderHouse1Text_1d8f4:: ; 99eee (26:5eee) +_LavenderHouse1Text_1d8f4:: text "This is really" line "MR.FUJI's house." @@ -21,19 +21,19 @@ _LavenderHouse1Text_1d8f4:: ; 99eee (26:5eee) cont "orphaned #MON!" done -_LavenderHouse1Text_1d8f9:: ; 99f4b (26:5f4b) +_LavenderHouse1Text_1d8f9:: text "It's so warm!" line "#MON are so" cont "nice to hug!" done -_LavenderHouse1Text3:: ; 99f72 (26:5f72) +_LavenderHouse1Text3:: text "PSYDUCK: Gwappa!@@" -_LavenderHouse1Text4:: ; 99f85 (26:5f85) +_LavenderHouse1Text4:: text "NIDORINO: Gaoo!@@" -_LavenderHouse1Text_1d94c:: ; 99f97 (26:5f97) +_LavenderHouse1Text_1d94c:: text "MR.FUJI: ", $52, "." para "Your #DEX quest" @@ -45,13 +45,13 @@ _LavenderHouse1Text_1d94c:: ; 99f97 (26:5f97) line "help your quest." prompt -_ReceivedFluteText:: ; 99ffb (26:5ffb) +_ReceivedFluteText:: text $52, " received" line "a @" TX_RAM wcf4b text "!@@" -_FluteExplanationText:: ; 9a011 (26:6011) +_FluteExplanationText:: db $0 para "Upon hearing #" line "FLUTE, sleeping" @@ -62,17 +62,17 @@ _FluteExplanationText:: ; 9a011 (26:6011) line "sleeping #MON." done -_FluteNoRoomText:: ; 9a069 (26:6069) +_FluteNoRoomText:: text "You must make" line "room for this!" done -_MrFujiAfterFluteText:: ; 9a087 (26:6087) +_MrFujiAfterFluteText:: text "MR.FUJI: Has my" line "FLUTE helped you?" done -_LavenderHouse1Text6:: ; 9a0aa (26:60aa) +_LavenderHouse1Text6:: text "#MON Monthly" line "Grand Prize" cont "Drawing!" @@ -83,4 +83,3 @@ _LavenderHouse1Text6:: ; 9a0aa (26:60aa) para "Gone! It's been" line "clipped out!" done - diff --git a/text/maps/hall_of_fame.asm b/text/maps/hall_of_fame.asm index cb0cc622..c799268b 100644 --- a/text/maps/hall_of_fame.asm +++ b/text/maps/hall_of_fame.asm @@ -1,11 +1,7 @@ -_HallofFameRoomText1:: ; 85fb5 (21:5fb5) +_HallofFameRoomText1:: text "OAK: Er-hem!" -IF DEF(_YELLOW) - line "Congratulations," -ELSE line "Congratulations" -ENDC - cont $52, "!" + cont "<PLAYER>!" para "This floor is the" line "#MON HALL OF" @@ -20,14 +16,13 @@ ENDC line "also recorded in" cont "the HALL OF FAME!" - para $52, "! You have" + para "<PLAYER>! You have" line "endeavored hard" cont "to become the new" cont "LEAGUE champion!" para "Congratulations," - line $52, ", you and" + line "<PLAYER>, you and" cont "your #MON are" cont "HALL OF FAMERs!" done - diff --git a/text/maps/indigo_plateau_lobby.asm b/text/maps/indigo_plateau_lobby.asm index b4b6d29d..8487e29a 100644 --- a/text/maps/indigo_plateau_lobby.asm +++ b/text/maps/indigo_plateau_lobby.asm @@ -1,4 +1,4 @@ -_IndigoPlateauLobbyText1:: ; a13f0 (28:53f0) +_IndigoPlateauLobbyText2:: text "Yo! Champ in" line "making!" @@ -13,7 +13,7 @@ _IndigoPlateauLobbyText1:: ; a13f0 (28:53f0) cont "is it! Go for it!" done -_IndigoPlateauLobbyText3:: ; a148b (28:548b) +_IndigoPlateauLobbyText3:: text "From here on, you" line "face the ELITE" cont "FOUR one by one!" @@ -23,4 +23,3 @@ _IndigoPlateauLobbyText3:: ; a148b (28:548b) cont "next trainer!" cont "Good luck!" done - diff --git a/text/maps/lance.asm b/text/maps/lance.asm index 35ef3546..0313b158 100644 --- a/text/maps/lance.asm +++ b/text/maps/lance.asm @@ -1,10 +1,6 @@ -_LanceBeforeBattleText:: ; 85d3c (21:5d3c) +_LanceBeforeBattleText:: text "Ah! I heard about" -IF DEF(_YELLOW) - line "you, ", $52, "!" -ELSE - line "you ", $52, "!" -ENDC + line "you <PLAYER>!" para "I lead the ELITE" line "FOUR! You can" @@ -31,7 +27,7 @@ ENDC cont "with me, ", $52, "!" done -_LanceEndBattleText:: ; 85e64 (21:5e64) +_LanceEndBattleText:: text "That's it!" para "I hate to admit" @@ -39,7 +35,7 @@ _LanceEndBattleText:: ; 85e64 (21:5e64) cont "#MON master!" prompt -_LanceAfterBattleText:: ; 85e9e (21:5e9e) +_LanceAfterBattleText:: text "I still can't" line "believe my" cont "dragons lost to" @@ -65,4 +61,3 @@ _LanceAfterBattleText:: ; 85e9e (21:5e9e) para "He is the real" line "#MON LEAGUE" cont "champion!@@" - diff --git a/text/maps/lavender_house.asm b/text/maps/lavender_house.asm index 0ae3a1fe..66cc85a5 100644 --- a/text/maps/lavender_house.asm +++ b/text/maps/lavender_house.asm @@ -1,7 +1,7 @@ -_LavenderHouse2Text1:: ; 9a238 (26:6238) +_LavenderHouse2Text1:: text "CUBONE: Kyarugoo!@@" -_LavenderHouse2Text_1d9dc:: ; 9a24c (26:624c) +_LavenderHouse2Text_1d9dc:: text "I hate those" line "horrible ROCKETs!" @@ -13,7 +13,7 @@ _LavenderHouse2Text_1d9dc:: ; 9a24c (26:624c) cont "from TEAM ROCKET!" done -_LavenderHouse2Text_1d9e1:: ; 9a2b9 (26:62b9) +_LavenderHouse2Text_1d9e1:: text "The GHOST of" line "#MON TOWER is" cont "gone!" @@ -22,4 +22,3 @@ _LavenderHouse2Text_1d9e1:: ; 9a2b9 (26:62b9) line "soothed its" cont "restless soul!" done - diff --git a/text/maps/lavender_mart.asm b/text/maps/lavender_mart.asm index 53ebdae3..222712c6 100644 --- a/text/maps/lavender_mart.asm +++ b/text/maps/lavender_mart.asm @@ -1,4 +1,4 @@ -_LavenderMartText2:: ; 9a104 (26:6104) +_LavenderMartText2:: text "I'm searching for" line "items that raise" cont "the abilities of" @@ -14,13 +14,13 @@ _LavenderMartText2:: ; 9a104 (26:6104) line "I can get them?" done -_LavenderMart_5c953:: ; 9a1b4 (26:61b4) +_LavenderMartReviveText:: text "You know REVIVE?" line "It revives any" cont "fainted #MON!" done -_LavenderMart_5c958:: ; 9a1e3 (26:61e3) +_LavenderMartNuggetText:: text "I found a NUGGET" line "in the mountains." @@ -28,4 +28,3 @@ _LavenderMart_5c958:: ; 9a1e3 (26:61e3) line "useless, but it" cont "sold for ¥5000!" done - diff --git a/text/maps/lavender_pokecenter.asm b/text/maps/lavender_pokecenter.asm index 9f8c3e34..3aa7b67d 100644 --- a/text/maps/lavender_pokecenter.asm +++ b/text/maps/lavender_pokecenter.asm @@ -1,15 +1,12 @@ -_LavenderPokecenterText4:: ; 9940e (26:540e) -_LavenderPokecenterText2:: ; 9940e (26:540e) -_LavenderPokecenterText1:: ; 9940e (26:540e) +_LavenderPokecenterText2:: text "TEAM ROCKET will" line "do anything for" cont "the sake of gold!" done -_LavenderPokecenterText3:: ; 99442 (26:5442) +_LavenderPokecenterText3:: text "I saw CUBONE's" line "mother die trying" cont "to escape from" cont "TEAM ROCKET!" done - diff --git a/text/maps/lavender_town.asm b/text/maps/lavender_town.asm index f6485c6f..19b6c8c8 100644 --- a/text/maps/lavender_town.asm +++ b/text/maps/lavender_town.asm @@ -1,14 +1,14 @@ -_LavenderTownText_4413c:: ; a5482 (29:5482) +_LavenderTownText_4413c:: text "Do you believe in" line "GHOSTs?" done -_LavenderTownText_44141:: ; a549d (29:549d) +_LavenderTownText_44141:: text "Really? So there" line "are believers..." done -_LavenderTownText_44146:: ; a54c0 (29:54c0) +_LavenderTownText_44146:: text "Hahaha, I guess" line "not." @@ -17,7 +17,7 @@ _LavenderTownText_44146:: ; a54c0 (29:54c0) cont "it's not real." done -_LavenderTownText2:: ; a5506 (29:5506) +_LavenderTownText2:: text "This town is known" line "as the grave site" cont "of #MON." @@ -27,7 +27,7 @@ _LavenderTownText2:: ; a5506 (29:5506) cont "#MON TOWER." done -_LavenderTownText3:: ; a555f (29:555f) +_LavenderTownText3:: text "GHOSTs appeared" line "in #MON TOWER." @@ -37,13 +37,13 @@ _LavenderTownText3:: ; a555f (29:555f) cont "ROCKETs killed." done -_LavenderTownText4:: ; a55bb (29:55bb) +_LavenderTownText4:: text "LAVENDER TOWN" line "The Noble Purple" cont "Town" done -_LavenderTownText5:: ; a55e0 (29:55e0) +_LavenderTownText5:: text "New SILPH SCOPE!" para "Make the Invisible" @@ -52,14 +52,13 @@ _LavenderTownText5:: ; a55e0 (29:55e0) para "SILPH CO." done -_LavenderTownText8:: ; a561d (29:561d) +_LavenderTownText8:: text "LAVENDER VOLUNTEER" line "#MON HOUSE" done -_LavenderTownText9:: ; a563c (29:563c) +_LavenderTownText9:: text "May the Souls of" line "#MON Rest Easy" cont "#MON TOWER" done - diff --git a/text/maps/lorelei.asm b/text/maps/lorelei.asm index a75b50d9..fdbb55b4 100644 --- a/text/maps/lorelei.asm +++ b/text/maps/lorelei.asm @@ -1,4 +1,4 @@ -_LoreleiBeforeBattleText:: ; 865ef (21:65ef) +_LoreleiBeforeBattleText:: text "Welcome to" line "#MON LEAGUE!" @@ -21,12 +21,12 @@ _LoreleiBeforeBattleText:: ; 865ef (21:65ef) line "Are you ready?" done -_LoreleiEndBattleText:: ; 866c4 (21:66c4) +_LoreleiEndBattleText:: text "How" line "dare you!" prompt -_LoreleiAfterBattleText:: ; 866d3 (21:66d3) +_LoreleiAfterBattleText:: text "You're better" line "than I thought!" cont "Go on ahead!" @@ -36,8 +36,7 @@ _LoreleiAfterBattleText:: ; 866d3 (21:66d3) cont "LEAGUE power!" done -_LoreleiText2:: ; 86729 (21:6729) +_LoreleiDontRunAwayText:: text "Someone's voice:" line "Don't run away!" done - diff --git a/text/maps/mansion_1f.asm b/text/maps/mansion_1f.asm index 96cc4c21..a3c517fb 100644 --- a/text/maps/mansion_1f.asm +++ b/text/maps/mansion_1f.asm @@ -1,30 +1,29 @@ -_Mansion1BattleText2:: ; a07a8 (28:47a8) +_Mansion1BattleText2:: text "Who are you? There" line "shouldn't be" cont "anyone here." done -_Mansion1EndBattleText2:: ; a07d5 (28:47d5) +_Mansion1EndBattleText2:: text "Ouch!" prompt -_Mansion1AfterBattleText2:: ; a07dc (28:47dc) +_Mansion1AfterBattleText2:: text "A key? I don't" line "know what you're" cont "talking about." done -_MansionSwitchText:: ; a080a (28:480a) +_MansionSwitchText:: text "A secret switch!" para "Press it?" done -_MansionSwitchPressedText:: ; a0826 (28:4826) +_MansionSwitchPressedText:: text "Who wouldn't?" prompt -_MansionSwitchNotPressedText:: ; a0834 (28:4834) +_MansionSwitchNotPressedText:: text "Not quite yet!" done - diff --git a/text/maps/mansion_2f.asm b/text/maps/mansion_2f.asm index 057e05e2..378efb30 100644 --- a/text/maps/mansion_2f.asm +++ b/text/maps/mansion_2f.asm @@ -1,21 +1,21 @@ -_Mansion2BattleText1:: ; 852b7 (21:52b7) +_Mansion2BattleText1:: text "I can't get out!" line "This old place is" cont "one big puzzle!" done -_Mansion2EndBattleText1:: ; 852ea (21:52ea) +_Mansion2EndBattleText1:: text "Oh no!" line "My bag of loot!" prompt -_Mansion2AfterBattleText1:: ; 85302 (21:5302) +_Mansion2AfterBattleText1:: text "Switches open and" line "close alternating" cont "sets of doors!" done -_Mansion2Text3:: ; 85336 (21:5336) +_Mansion2Text3:: text "Diary: July 5" line "Guyana," cont "South America" @@ -25,24 +25,23 @@ _Mansion2Text3:: ; 85336 (21:5336) cont "in the jungle." done -_Mansion2Text4:: ; 85389 (21:5389) +_Mansion2Text4:: text "Diary: July 10" line "We christened the" cont "newly discovered" cont "#MON, MEW." done -_Mansion2Text_520c2:: ; 853c7 (21:53c7) +_Mansion2Text_520c2:: text "A secret switch!" para "Press it?" done -_Mansion2Text_520c7:: ; 853e3 (21:53e3) +_Mansion2Text_520c7:: text "Who wouldn't?" prompt -_Mansion2Text_520cc:: ; 853f1 (21:53f1) +_Mansion2Text_520cc:: text "Not quite yet!" done - diff --git a/text/maps/mansion_3f.asm b/text/maps/mansion_3f.asm index e46532f9..70331fdf 100644 --- a/text/maps/mansion_3f.asm +++ b/text/maps/mansion_3f.asm @@ -1,38 +1,37 @@ -_Mansion3BattleText1:: ; 85401 (21:5401) +_Mansion3BattleText1:: text "This place is" line "like, huge!" done -_Mansion3EndBattleText1:: ; 8541c (21:541c) +_Mansion3EndBattleText1:: text "Ayah!" prompt -_Mansion3AfterBattleText1:: ; 85423 (21:5423) +_Mansion3AfterBattleText1:: text "I wonder where" line "my partner went." done -_Mansion3BattleText2:: ; 85444 (21:5444) +_Mansion3BattleText2:: text "My mentor once" line "lived here." done -_Mansion3EndBattleText2:: ; 85460 (21:5460) +_Mansion3EndBattleText2:: text "Whew!" line "Overwhelming!" prompt -_Mansion3AfterBattleText2:: ; 85475 (21:5475) +_Mansion3AfterBattleText2:: text "So, you're stuck?" line "Try jumping off" cont "over there!" done -_Mansion3Text5:: ; 854a3 (21:54a3) +_Mansion3Text5:: text "Diary: Feb. 6" line "MEW gave birth." para "We named the" line "newborn MEWTWO." done - diff --git a/text/maps/mansion_b1f.asm b/text/maps/mansion_b1f.asm index 761c2570..1bc1ef89 100644 --- a/text/maps/mansion_b1f.asm +++ b/text/maps/mansion_b1f.asm @@ -1,34 +1,34 @@ -_Mansion4BattleText1:: ; 854df (21:54df) +_Mansion4BattleText1:: text "Uh-oh. Where am" line "I now?" done -_Mansion4EndBattleText1:: ; 854f7 (21:54f7) +_Mansion4EndBattleText1:: text "Awooh!" prompt -_Mansion4AfterBattleText1:: ; 854ff (21:54ff) +_Mansion4AfterBattleText1:: text "You can find stuff" line "lying around." done -_Mansion4BattleText2:: ; 85521 (21:5521) +_Mansion4BattleText2:: text "This place is" line "ideal for a lab." done -_Mansion4EndBattleText2:: ; 85541 (21:5541) +_Mansion4EndBattleText2:: text "What" line "was that for?" prompt -_Mansion4AfterBattleText2:: ; 85555 (21:5555) +_Mansion4AfterBattleText2:: text "I like it here!" line "It's conducive to" cont "my studies!" done -_Mansion4Text7:: ; 85583 (21:5583) +_Mansion4Text7:: text "Diary; Sept. 1" line "MEWTWO is far too" cont "powerful." @@ -37,4 +37,3 @@ _Mansion4Text7:: ; 85583 (21:5583) line "curb its vicious" cont "tendencies..." done - diff --git a/text/maps/mr_psychics_house.asm b/text/maps/mr_psychics_house.asm index ed181eb6..8c37383d 100644 --- a/text/maps/mr_psychics_house.asm +++ b/text/maps/mr_psychics_house.asm @@ -1,17 +1,17 @@ -_TM29PreReceiveText:: ; a24fe (28:64fe) +_TM29PreReceiveText:: text "...Wait! Don't" line "say a word!" para "You wanted this!" prompt -_ReceivedTM29Text:: ; a252a (28:652a) +_ReceivedTM29Text:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_TM29ExplanationText:: ; a253e (28:653e) +_TM29ExplanationText:: text "TM29 is PSYCHIC!" para "It can lower the" @@ -19,8 +19,7 @@ _TM29ExplanationText:: ; a253e (28:653e) cont "abilities." done -_TM29NoRoomText:: ; a257c (28:657c) +_TM29NoRoomText:: text "Where do you plan" line "to put this?" done - diff --git a/text/maps/mt_moon_1f.asm b/text/maps/mt_moon_1f.asm index 0577adf3..761a5240 100644 --- a/text/maps/mt_moon_1f.asm +++ b/text/maps/mt_moon_1f.asm @@ -1,123 +1,119 @@ -_MtMoon1BattleText2:: ; 80692 (20:4692) +_MtMoon1BattleText2:: text "WHOA! You shocked" line "me! Oh, you're" cont "just a kid!" done -_MtMoon1EndBattleText2:: ; 806bf (20:46bf) +_MtMoon1EndBattleText2:: text "Wow!" line "Shocked again!" prompt -_MtMoon1AfterBattleText2:: ; 806d4 (20:46d4) +_MtMoon1AfterBattleText2:: text "Kids like you" line "shouldn't be" cont "here!" done -_MtMoon1BattleText3:: ; 806f5 (20:46f5) +_MtMoon1BattleText3:: text "Did you come to" line "explore too?" done -_MtMoon1EndBattleText3:: ; 80713 (20:4713) +_MtMoon1EndBattleText3:: text "Losing" line "stinks!" prompt -_MtMoon1AfterBattleText3:: ; 80723 (20:4723) +_MtMoon1AfterBattleText3:: text "I came down here" line "to show off to" cont "girls." done -_MtMoon1BattleText4:: ; 8074b (20:474b) +_MtMoon1BattleText4:: text "Wow! It's way" line "bigger in here" cont "than I thought!" done -_MtMoon1EndBattleText4:: ; 80778 (20:4778) +_MtMoon1EndBattleText4:: text "Oh!" line "I lost it!" prompt -_MtMoon1AfterBattleText4:: ; 80788 (20:4788) +_MtMoon1AfterBattleText4:: text "How do you get" line "out of here?" done -_MtMoon1BattleText5:: ; 807a5 (20:47a5) +_MtMoon1BattleText5:: text "What! Don't sneak" line "up on me!" done -_MtMoon1EndBattleText5:: ; 807c1 (20:47c1) +_MtMoon1EndBattleText5:: text "My" line "#MON won't do!" prompt -_MtMoon1AfterBattleText5:: ; 807d3 (20:47d3) +_MtMoon1AfterBattleText5:: text "I have to find" line "stronger #MON." done -_MtMoon1BattleText6:: ; 807f2 (20:47f2) +_MtMoon1BattleText6:: text "What? I'm waiting" line "for my friends to" cont "find me here." done -_MtMoon1EndBattleText6:: ; 80824 (20:4824) +_MtMoon1EndBattleText6:: text "I lost?" prompt -_MtMoon1AfterBattleText6:: ; 8082d (20:482d) +_MtMoon1AfterBattleText6:: text "I heard there are" line "some very rare" cont "fossils here." done -_MtMoon1BattleText7:: ; 8085d (20:485d) +_MtMoon1BattleText7:: text "Suspicious men" line "are in the cave." cont "What about you?" done -_MtMoon1EndBattleText7:: ; 8088e (20:488e) +_MtMoon1EndBattleText7:: text "You" line "got me!" prompt -_MtMoon1AfterBattleText7:: ; 8089b (20:489b) +_MtMoon1AfterBattleText7:: text "I saw them! I'm" line "sure they're from" cont "TEAM ROCKET!" done -_MtMoon1BattleText8:: ; 808c9 (20:48c9) +_MtMoon1BattleText8:: text "Go through this" line "cave to get to" cont "CERULEAN CITY!" done -_MtMoon1EndBattleText8:: ; 808f8 (20:48f8) +_MtMoon1EndBattleText8:: text "I" line "lost." prompt -_MtMoon1AfterBattleText8:: ; 80901 (20:4901) +_MtMoon1AfterBattleText8:: text "ZUBAT is tough!" line "But, it can be" cont "useful if you" cont "catch one." done -_MtMoon1Text14:: ; 8093a (20:493a) +_MtMoon1Text14:: text "Beware! ZUBAT is" -IF DEF(_YELLOW) - line "a bloodsucker!" -ELSE line "a blood sucker!" -ENDC done diff --git a/text/maps/mt_moon_b1f.asm b/text/maps/mt_moon_b1f.asm index 8421fdb0..cd995ed5 100644 --- a/text/maps/mt_moon_b1f.asm +++ b/text/maps/mt_moon_b1f.asm @@ -1,4 +1,3 @@ -_MtMoonText1:: ; 8095c (20:495c) +_MtMoonText1:: db $0 done - diff --git a/text/maps/mt_moon_b2f.asm b/text/maps/mt_moon_b2f.asm index 64823871..462c9d3c 100644 --- a/text/maps/mt_moon_b2f.asm +++ b/text/maps/mt_moon_b2f.asm @@ -1,47 +1,24 @@ -IF DEF(_YELLOW) -_MtMoonJessieJamesText1:: - text "Stop right there!@@" - -_MtMoonJessieJamesText2:: - text "That fossil is" - line "TEAM ROCKET's!" - - para "Surrender now, or" - line "prepare to fight!" - done - -_MtMoonJessieJamesText3:: - text "A" - line "brat beat us?" - prompt - -_MtMoonJessieJamesText4:: - text "TEAM ROCKET, blast" - line "off at the speed" - cont "of light!@@" -ENDC - -_MtMoon3Text_49f24:: ; 8095e (20:495e) +_MtMoon3Text_49f24:: text "You want the" line "DOME FOSSIL?" done -_MtMoon3Text_49f64:: ; 80979 (20:4979) +_MtMoon3Text_49f64:: text "You want the" line "HELIX FOSSIL?" done -_MtMoon3Text_49f6f:: ; 80995 (20:4995) +_MtMoon3Text_49f6f:: text $52, " got the" line "@" TX_RAM wcf4b text "!@@" -_MtMoon3Text_49f7f:: ; 809a8 (20:49a8) +_MtMoon3Text_49f7f:: text "Look, you've got" line "no room for this.@@" -_MtMoon3Text_49f85:: ; 809cc (20:49cc) +_MtMoon3Text_49f85:: text "Hey, stop!" para "I found these" @@ -49,18 +26,18 @@ _MtMoon3Text_49f85:: ; 809cc (20:49cc) cont "both mine!" done -_MtMoon3Text_49f8a:: ; 80a01 (20:4a01) +_MtMoon3Text_49f8a:: text "OK!" line "I'll share!" prompt -_MtMoon3Text_49f8f:: ; 80a11 (20:4a11) +_MtMoon3Text_49f8f:: text "We'll each take" line "one!" cont "No being greedy!" done -_MtMoon3Text_49f94:: ; 80a37 (20:4a37) +_MtMoon3Text_49f94:: text "Far away, on" line "CINNABAR ISLAND," cont "there's a #MON" @@ -71,74 +48,74 @@ _MtMoon3Text_49f94:: ; 80a37 (20:4a37) cont "fossils." done -_MtMoon3Text_49f99:: ; 80a93 (20:4a93) +_MtMoon3Text_49f99:: text "All right. Then" line "this is mine!@@" -_MtMoon3BattleText2:: ; 80ab3 (20:4ab3) +_MtMoon3BattleText2:: text "TEAM ROCKET will" line "find the fossils," cont "revive and sell" cont "them for cash!" done -_MtMoon3EndBattleText2:: ; 80af6 (20:4af6) +_MtMoon3EndBattleText2:: text "Urgh!" line "Now I'm mad!" prompt -_MtMoon3AfterBattleText2:: ; 80b09 (20:4b09) +_MtMoon3AfterBattleText2:: text "You made me mad!" line "TEAM ROCKET will" cont "blacklist you!" done -_MtMoon3BattleText3:: ; 80b3b (20:4b3b) +_MtMoon3BattleText3:: text "We, TEAM ROCKET," line "are #MON" cont "gangsters!" done -_MtMoon3EndBattleText3:: ; 80b61 (20:4b61) +_MtMoon3EndBattleText3:: text "I blew" line "it!" prompt -_MtMoon3AfterBattleText3:: ; 80b6d (20:4b6d) +_MtMoon3AfterBattleText3:: text "Darn it all! My" line "associates won't" cont "stand for this!" done -_MtMoon3BattleText4:: ; 80b9e (20:4b9e) +_MtMoon3BattleText4:: text "We're pulling a" line "big job here!" cont "Get lost, kid!" done -_MtMoon3EndBattleText4:: ; 80bcb (20:4bcb) +_MtMoon3EndBattleText4:: text "So, you" line "are good." prompt -_MtMoon3AfterBattleText4:: ; 80bde (20:4bde) +_MtMoon3AfterBattleText4:: text "If you find a" line "fossil, give it" cont "to me and scram!" done -_MtMoon3BattleText5:: ; 80c0e (20:4c0e) +_MtMoon3BattleText5:: text "Little kids" line "should leave" cont "grown-ups alone!" done -_MtMoon3EndBattleText5:: ; 80c39 (20:4c39) +_MtMoon3EndBattleText5:: text "I'm" line "steamed!" prompt -_MtMoon3AfterBattleText5:: ; 80c46 (20:4c46) +_MtMoon3AfterBattleText5:: text "#MON lived" line "here long before" cont "people came." diff --git a/text/maps/mt_moon_pokecenter.asm b/text/maps/mt_moon_pokecenter.asm index 2ae50a13..90fd811e 100644 --- a/text/maps/mt_moon_pokecenter.asm +++ b/text/maps/mt_moon_pokecenter.asm @@ -1,4 +1,4 @@ -_MtMoonPokecenterText1:: ; 8a8eb (22:68eb) +_MtMoonPokecenterText1:: text "I've 6 # BALLs" line "set in my belt." @@ -6,7 +6,7 @@ _MtMoonPokecenterText1:: ; 8a8eb (22:68eb) line "carry 6 #MON." done -_MtMoonPokecenterText3:: ; 8a929 (22:6929) +_MtMoonPokecenterText3:: text "TEAM ROCKET" line "attacks CERULEAN" cont "citizens..." @@ -16,7 +16,7 @@ _MtMoonPokecenterText3:: ; 8a929 (22:6929) cont "news!" done -_MtMoonPokecenterText_4935c:: ; 8a976 (22:6976) +_MagikarpSalesmanText1:: text "MAN: Hello, there!" line "Have I got a deal" cont "just for you!" @@ -27,23 +27,22 @@ _MtMoonPokecenterText_4935c:: ; 8a976 (22:6976) cont "What do you say?" done -_MtMoonPokecenterText_49361:: ; 8a9ec (22:69ec) +_MagikarpSalesmanNoText:: text "No? I'm only" line "doing this as a" cont "favor to you!" done -_MtMoonPokecenterText_49366:: ; 8aa17 (22:6a17) +_MagikarpSalesmanNoMoneyText:: text "You'll need more" line "money than that!" done -_MtMoonPokecenterText_4936b:: ; 8aa39 (22:6a39) +_MagikarpSalesmanText2:: text "MAN: Well, I don't" line "give refunds!" done -_MtMoonPokecenterText5:: ; 8aa5a (22:6a5a) +_MtMoonPokecenterText5:: db $0 done - diff --git a/text/maps/museum_1f.asm b/text/maps/museum_1f.asm index 7371a312..16431bda 100644 --- a/text/maps/museum_1f.asm +++ b/text/maps/museum_1f.asm @@ -1,8 +1,8 @@ -_Museum1FText_5c21a:: ; 9652c (25:652c) +_Museum1FText_5c21a:: text "Come again!" done -_Museum1FText_5c21f:: ; 96539 (25:6539) +_Museum1FText_5c21f:: text "It's ¥50 for a" line "child's ticket." @@ -10,17 +10,17 @@ _Museum1FText_5c21f:: ; 96539 (25:6539) line "come in?" done -_Museum1FText_5c224:: ; 96572 (25:6572) +_Museum1FText_5c224:: text "Right, ¥50!" line "Thank you!" done -_Museum1FText_5c229:: ; 9658a (25:658a) +_Museum1FText_5c229:: text "You don't have" line "enough money." prompt -_Museum1FText_5c22e:: ; 965a7 (25:65a7) +_Museum1FText_5c22e:: text "You can't sneak" line "in the back way!" @@ -29,7 +29,7 @@ _Museum1FText_5c22e:: ; 965a7 (25:65a7) cont "AMBER is?" done -_Museum1FText_5c233:: ; 965f1 (25:65f1) +_Museum1FText_5c233:: text "There's a lab" line "somewhere trying" cont "to resurrect" @@ -37,28 +37,28 @@ _Museum1FText_5c233:: ; 965f1 (25:65f1) cont "from AMBER." done -_Museum1FText_5c238:: ; 96636 (25:6636) +_Museum1FText_5c238:: text "AMBER is fossil-" line "ized tree sap." done -_Museum1FText_5c23d:: ; 96657 (25:6657) +_Museum1FText_5c23d:: text "Please go to the" line "other side!" done -_Museum1FText_5c242:: ; 96675 (25:6675) +_Museum1FText_5c242:: text "Take plenty of" line "time to look!" done -_Museum1FText_5c251:: ; 96693 (25:6693) +_Museum1FText_5c251:: text "That is one" line "magnificent" cont "fossil!" done -_Museum1FText_5c28e:: ; 966b4 (25:66b4) +_Museum1FText_5c28e:: text "Ssh! I think that" line "this chunk of" cont "AMBER contains" @@ -72,11 +72,7 @@ _Museum1FText_5c28e:: ; 966b4 (25:66b4) para "But, my colleagues" line "just ignore me!" -IF DEF(_YELLOW) - para "So, I have a favor" -ELSE para "So I have a favor" -ENDC line "to ask!" para "Take this to a" @@ -84,29 +80,28 @@ ENDC cont "get it examined!" prompt -_ReceivedOldAmberText:: ; 96790 (25:6790) - text $52, " received" +_ReceivedOldAmberText:: + text "<PLAYER> received" line "OLD AMBER!@@" -_Museum1FText_5c299:: ; 967a8 (25:67a8) +_Museum1FText_5c299:: text "Ssh! Get the OLD" line "AMBER checked!" done -_Museum1FText_5c29e:: ; 967c9 (25:67c9) +_Museum1FText_5c29e:: text "You don't have" line "space for this!" done -_Museum1FText_5c2ad:: ; 967e8 (25:67e8) +_Museum1FText_5c2ad:: text "We are proud of 2" line "fossils of very" cont "rare, prehistoric" cont "#MON!" done -_Museum1FText_5c2bc:: ; 96823 (25:6823) +_Museum1FText_5c2bc:: text "The AMBER is" line "clear and gold!" done - diff --git a/text/maps/museum_2f.asm b/text/maps/museum_2f.asm index 46238725..4f34a249 100644 --- a/text/maps/museum_2f.asm +++ b/text/maps/museum_2f.asm @@ -1,11 +1,11 @@ -_Museum2FText1:: ; 96841 (25:6841) +_Museum2FText1:: text "MOON STONE?" para "What's so special" line "about it?" done -_Museum2FText2:: ; 96869 (25:6869) +_Museum2FText2:: text "July 20, 1969!" para "The 1st lunar" @@ -15,12 +15,12 @@ _Museum2FText2:: ; 96869 (25:6869) line "TV to watch it!" done -_Museum2FText3:: ; 968b1 (25:68b1) +_Museum2FText3:: text "We have a space" line "exhibit now." done -_Museum2FText4:: ; 968cf (25:68cf) +_Museum2FText4:: text "I want a PIKACHU!" line "It's so cute!" @@ -28,32 +28,17 @@ _Museum2FText4:: ; 968cf (25:68cf) line "to catch me one!" done -_Museum2FText5:: ; 96911 (25:6911) +_Museum2FText5:: text "Yeah, a PIKACHU" line "soon, I promise!" done -IF DEF(_YELLOW) -_Museum2FPikachuText1:: - text "Your PIKACHU looks" - line "untamed." - cont "May I have it for" - cont "my daughter?" - done - -_Museum2FPikachuText2:: - text "I'd like to get" - line "that PIKACHU off" - cont "you, but it's too" - cont "attached to you." -ENDC - -_Museum2FText6:: ; 96933 (25:6933) +_Museum2FText6:: text "SPACE SHUTTLE" line "COLUMBIA" done -_Museum2FText7:: ; 9694b (25:694b) +_Museum2FText7:: text "Meteorite that" line "fell on MT.MOON." cont "(MOON STONE?)" diff --git a/text/maps/name_rater.asm b/text/maps/name_rater.asm index 2baec727..65d3e8a4 100644 --- a/text/maps/name_rater.asm +++ b/text/maps/name_rater.asm @@ -1,4 +1,4 @@ -_NameRaterText_1dab3:: ; 9a308 (26:6308) +_NameRaterText_1dab3:: text "Hello, hello!" line "I am the official" cont "NAME RATER!" @@ -8,12 +8,12 @@ _NameRaterText_1dab3:: ; 9a308 (26:6308) cont "your #MON?" done -_NameRaterText_1dab8:: ; 9a361 (26:6361) +_NameRaterText_1dab8:: text "Which #MON" line "should I look at?" prompt -_NameRaterText_1dabd:: ; 9a37f (26:637f) +_NameRaterText_1dabd:: TX_RAM wcd6d text ", is it?" line "That is a decent" @@ -26,32 +26,28 @@ _NameRaterText_1dabd:: ; 9a37f (26:637f) para "How about it?" done -_NameRaterText_1dac2:: ; 9a3e5 (26:63e5) +_NameRaterText_1dac2:: text "Fine! What should" line "we name it?" prompt -_NameRaterText_1dac7:: ; 9a404 (26:6404) +_NameRaterText_1dac7:: text "OK! This #MON" line "has been renamed" cont "@" - TX_RAM wHPBarMaxHP + TX_RAM wBuffer text "!" para "That's a better" line "name than before!" done -_NameRaterText_1dacc:: ; 9a44c (26:644c) -IF DEF(_YELLOW) - text "Fine! Come any-" -ELSE +_NameRaterText_1dacc:: text "Fine! Come any" -ENDC line "time you like!" done -_NameRaterText_1dad1:: ; 9a46b (26:646b) +_NameRaterText_1dad1:: TX_RAM wcd6d text ", is it?" line "That is a truly" @@ -62,4 +58,3 @@ _NameRaterText_1dad1:: ; 9a46b (26:646b) TX_RAM wcd6d text "!" done - diff --git a/text/maps/oaks_lab.asm b/text/maps/oaks_lab.asm index 58f55b85..1f02c355 100644 --- a/text/maps/oaks_lab.asm +++ b/text/maps/oaks_lab.asm @@ -1,129 +1,86 @@ -_OaksLabGaryText1:: ; 94d5b (25:4d5b) - text $53,": Yo" - line $52,"! Gramps" +_OaksLabGaryText1:: + text "<RIVAL>: Yo" + line "<PLAYER>! Gramps" cont "isn't around!" - -IF DEF(_YELLOW) - para "I ran here 'cos" - line "he said he had a" - cont "#MON for me." -ENDC done -_OaksLabText40:: ; 94d79 (25:4d79) -IF DEF(_YELLOW) - text $53,": Humph!" - line "I'll get a better" - cont "#MON than you!" - done -ELSE - text $53,": Heh, I" +_OaksLabText40:: + text "<RIVAL>: Heh, I" line "don't need to be" cont "greedy like you!" para "Go ahead and" line "choose, ", $52, "!" done -ENDC -_OaksLabText41:: ; 94dbd (25:4dbd) -IF DEF(_YELLOW) - text $53,": Heh, my" -ELSE - text $53,": My" -ENDC +_OaksLabText41:: + text "<RIVAL>: My" line "#MON looks a" cont "lot stronger." done -_OaksLabText39:: ; 94ddf (25:4ddf) -IF DEF(_YELLOW) - text "That's a #" - line "BALL. There's a" - cont "#MON inside!" - done -ELSE +_OaksLabText39:: text "Those are #" line "BALLs. They" cont "contain #MON!" done -ENDC -IF DEF(_YELLOW) -_OaksLabPikachuText:: - text "OAK: Go ahead," - line "it's yours!" - done -ENDC - -_OaksLabCharmanderText:: ; 94e06 (25:4e06) +_OaksLabCharmanderText:: text "So! You want the" line "fire #MON," cont "CHARMANDER?" done -_OaksLabSquirtleText:: ; 94e2f (25:4e2f) +_OaksLabSquirtleText:: text "So! You want the" line "water #MON," cont "SQUIRTLE?" done -_OaksLabBulbasaurText:: ; 94e57 (25:4e57) +_OaksLabBulbasaurText:: text "So! You want the" line "plant #MON," cont "BULBASAUR?" done -_OaksLabMonEnergeticText:: ; 94e80 (25:4e80) +_OaksLabMonEnergeticText:: text "This #MON is" line "really energetic!" prompt -_OaksLabReceivedMonText:: ; 94ea0 (25:4ea0) +_OaksLabReceivedMonText:: text $52, " received" line "a @" TX_RAM wcd6d text "!@@" -_OaksLabLastMonText:: ; 94eb6 (25:4eb6) +_OaksLabLastMonText:: text "That's PROF.OAK's" line "last #MON!" done -_OaksLabText_1d2f0:: ; 94ed2 (25:4ed2) - text "OAK: Now, ", $52, "," +_OaksLabText_1d2f0:: + text "OAK: Now, <PLAYER>," line "which #MON do" cont "you want?" done -_OaksLabText_1d2f5:: ; 94ef8 (25:4ef8) +_OaksLabText_1d2f5:: text "OAK: If a wild" line "#MON appears," cont "your #MON can" cont "fight against it!" - -IF DEF(_YELLOW) - para "Afterward, go on" - line "to the next town." -ENDC done -_OaksLabText_1d2fa:: ; 94f36 (25:4f36) -IF DEF(_YELLOW) - text "OAK: You should" - line "talk to it and" - cont "see how it feels." - done -ELSE - text "OAK: ", $52, "," +_OaksLabText_1d2fa:: + text "OAK: <PLAYER>," line "raise your young" cont "#MON by making" cont "it fight!" done -ENDC -_OaksLabDeliverParcelText1:: ; 94f69 (25:4f69) - text "OAK: Oh, ", $52, "!" +_OaksLabDeliverParcelText1:: + text "OAK: Oh, <PLAYER>!" para "How is my old" line "#MON?" @@ -138,32 +95,24 @@ _OaksLabDeliverParcelText1:: ; 94f69 (25:4f69) para "What? You have" line "something for me?" - para $52, " delivered" + para "<PLAYER> delivered" line "OAK's PARCEL.@@" -_OaksLabDeliverParcelText2:: ; 9500f (25:500f) - db $0 +_OaksLabDeliverParcelText2:: + text "" para "Ah! This is the" line "custom # BALL" cont "I ordered!" -IF DEF(_YELLOW) - cont "Thanks, ",$52,"!" - - para "By the way, I must" - line "ask you to do" - cont "something for me." -ELSE cont "Thank you!" -ENDC done -_OaksLabAroundWorldText:: ; 95045 (25:5045) +_OaksLabAroundWorldText:: text "#MON around the" line "world wait for" - cont "you, ", $52, "!" + cont "you, <PLAYER>!" done -_OaksLabGivePokeballsText1:: ; 9506d (25:506d) +_OaksLabGivePokeballsText1:: text "OAK: You can't get" line "detailed data on" cont "#MON by just" @@ -174,21 +123,16 @@ _OaksLabGivePokeballsText1:: ; 9506d (25:506d) cont "to capture wild" cont "#MON." - para $52, " got 5" + para "<PLAYER> got 5" line "# BALLs!@@" -_OaksLabGivePokeballsText2:: ; 950f2 (25:50f2) - db $0 +_OaksLabGivePokeballsText2:: + text "" para "When a wild" line "#MON appears," cont "it's fair game." -IF DEF(_YELLOW) - para "Just like I showed" - line "you, throw a #" -ELSE para "Just throw a #" -ENDC line "BALL at it and try" line "to catch it!" @@ -200,7 +144,7 @@ ENDC cont "have to be lucky!" done -_OaksLabPleaseVisitText:: ; 9519e (25:519e) +_OaksLabPleaseVisitText:: text "OAK: Come see me" line "sometimes." @@ -209,7 +153,7 @@ _OaksLabPleaseVisitText:: ; 9519e (25:519e) cont "coming along." done -_OaksLabText_1d31d:: ; 951e9 (25:51e9) +_OaksLabText_1d31d:: text "OAK: Good to see " line "you! How is your " cont "#DEX coming? " @@ -217,17 +161,17 @@ _OaksLabText_1d31d:: ; 951e9 (25:51e9) cont "a look!" prompt -_OaksLabText_1d32c:: ; 95236 (25:5236) +_OaksLabText_1d32c:: text "It's encyclopedia-" line "like, but the" cont "pages are blank!" done -_OaksLabText8:: ; 95268 (25:5268) +_OaksLabText8:: text "?" done -_OaksLabText_1d340:: ; 9526b (25:526b) +_OaksLabText_1d340:: text "PROF.OAK is the" line "authority on" cont "#MON!" @@ -237,44 +181,21 @@ _OaksLabText_1d340:: ; 9526b (25:526b) cont "in high regard!" done -_OaksLabRivalWaitingText:: ; 952bb (25:52bb) - text $53, ": Gramps!" +_OaksLabRivalWaitingText:: + text "<RIVAL>: Gramps!" line "I'm fed up with" cont "waiting!" done -_OaksLabChooseMonText:: ; 952df (25:52df) -IF DEF(_YELLOW) - text "OAK: Hmm? ",$53,"?" - line "Why are you here" - cont "already?" - - para "I said for you to" - line "come by later..." - - para "Ah, whatever!" - line "Just wait there." - - para "Look, ",$52,"! Do" - line "you see that ball" - cont "on the table?" - - para "It's called a #" - line "BALL. It holds a" - cont "#MON inside." - - para "You may have it!" - line "Go on, take it!" - done -ELSE - text "OAK: ", $53, "?" +_OaksLabChooseMonText:: + text "OAK: <RIVAL>?" line "Let me think..." para "Oh, that's right," line "I told you to" cont "come! Just wait!" - para "Here, ", $52, "!" + para "Here, <PLAYER>!" para "There are 3" line "#MON here!" @@ -293,99 +214,38 @@ ELSE cont "but you can have" cont "one! Choose!" done -ENDC -_OaksLabRivalInterjectionText:: ; 953dc (25:53dc) - text $53, ": Hey!" +_OaksLabRivalInterjectionText:: + text "<RIVAL>: Hey!" line "Gramps! What" cont "about me?" done -_OaksLabBePatientText:: ; 953fc (25:53fc) -IF DEF(_YELLOW) - text "OAK: Be patient," - line $53,", I'll give" - cont "you one later." - done -ELSE +_OaksLabBePatientText:: text "OAK: Be patient!" - line $53, ", you can" + line "<RIVAL>, you can" cont "have one too!" done -ENDC - -IF DEF(_YELLOW) -_OaksLabRivalTakesText1:: - text $53,": No way!" - line $52,", I want" - cont "this #MON!" - prompt - -_OaksLabRivalTakesText2:: - text $53," snatched" - line "the #MON!@@" - -_OaksLabRivalTakesText3:: - text "OAK: ",$53,"! What" - line "are you doing?" - prompt - -_OaksLabRivalTakesText4:: - text $53,": Gramps, I" - line "want this one!" - prompt -_OaksLabRivalTakesText5:: - text "OAK: But, I... Oh," - line "all right then." - cont "That #MON is" - cont "yours." - - para "I was going to" - line "give you one" - cont "anyway..." - - para $52,", come over" - line "here." - done - -_OaksLabOakGivesText:: - text "OAK: ",$52,", this" - line "is the #MON I" - cont "caught earlier." - - para "You can have it." - line "I caught it in" - cont "the wild and it's" - cont "not tame yet." - prompt - -_OaksLabReceivedText:: - text $52," received" - line "a " - TX_RAM $CD6D - text "!@@" -ENDC - -_OaksLabLeavingText:: ; 95427 (25:5427) +_OaksLabLeavingText:: text "OAK: Hey! Don't go" line "away yet!" done -_OaksLabRivalPickingMonText:: ; 95444 (25:5444) - text $53, ": I'll take" +_OaksLabRivalPickingMonText:: + text "<RIVAL>: I'll take" line "this one, then!" done -_OaksLabRivalReceivedMonText:: ; 95461 (25:5461) - text $53, " received" +_OaksLabRivalReceivedMonText:: + text "<RIVAL> received" line "a @" TX_RAM wcd6d text "!@@" -_OaksLabRivalChallengeText:: ; 95477 (25:5477) - text $53, ": Wait" - line $52, "!" +_OaksLabRivalChallengeText:: + text "<RIVAL>: Wait" + line "<PLAYER>!" cont "Let's check out" cont "our #MON!" @@ -393,88 +253,44 @@ _OaksLabRivalChallengeText:: ; 95477 (25:5477) line "you on!" done -_OaksLabText_1d3be:: ; 954b6 (25:54b6) +_OaksLabText_1d3be:: text "WHAT?" line "Unbelievable!" cont "I picked the" cont "wrong #MON!" prompt -_OaksLabText_1d3c3:: ; 954e4 (25:54e4) - text $53, ": Yeah! Am" +_OaksLabText_1d3c3:: + text "<RIVAL>: Yeah! Am" line "I great or what?" prompt -_OaksLabRivalToughenUpText:: ; 95502 (25:5502) - text $53, ": Okay!" +_OaksLabRivalToughenUpText:: + text "<RIVAL>: Okay!" line "I'll make my" cont "#MON fight to" cont "toughen it up!" - para $52, "! Gramps!" + para "<PLAYER>! Gramps!" line "Smell you later!" done -IF DEF(_YELLOW) -_OaksLabPikachuDislikesPokeballsText1:: - text "OAK: What?" +_OaksLabText21:: + text "<RIVAL>: Gramps!" done -_OaksLabPikachuDislikesPokeballsText2:: - text "OAK: Would you" - line "look at that!" - - para "It's odd, but it" - line "appears that your" - cont "PIKACHU dislikes" - cont "# BALLs." - - para "You should just" - line "keep it with you." - - para "That should make" - line "it happy!" - - para "You can talk to it" - line "and see how it" - cont "feels about you." - done -ENDC - -_OaksLabText21:: ; 95551 (25:5551) - text $53, ": Gramps!" - done - -_OaksLabText22:: ; 9555d (25:555d) -IF DEF(_YELLOW) - text $53,": Gramps," - line "my #MON has" - cont "grown stronger!" - cont "Check it out!" - done -ELSE - text $53, ": What did" +_OaksLabText22:: + text "<RIVAL>: What did" line "you call me for?" done -ENDC - -_OaksLabText23:: ; 9557b (25:557b) -IF DEF(_YELLOW) - text "OAK: Ah, ",$53,"," - line "good timing!" - para "I needed to ask" - line "both of you to do" - cont "something for me." - done -ELSE +_OaksLabText23:: text "OAK: Oh right! I" line "have a request" cont "of you two." done -ENDC -_OaksLabText24:: ; 955a8 (25:55a8) +_OaksLabText24:: text "On the desk there" line "is my invention," cont "#DEX!" @@ -488,15 +304,15 @@ _OaksLabText24:: ; 955a8 (25:55a8) line "encyclopedia!" done -_OaksLabText25:: ; 9562a (25:562a) - text "OAK: ", $52, " and" - line $53, "! Take" +_OaksLabText25:: + text "OAK: <PLAYER> and" + line "<RIVAL>! Take" cont "these with you!" - para $52, " got" + para "<PLAYER> got" line "#DEX from OAK!@@" -_OaksLabText26:: ; 95664 (25:5664) +_OaksLabText26:: text "To make a complete" line "guide on all the" cont "#MON in the" @@ -519,12 +335,12 @@ _OaksLabText26:: ; 95664 (25:5664) cont "#MON history!" done -_OaksLabText27:: ; 95741 (25:5741) - text $53, ": Alright" +_OaksLabText27:: + text "<RIVAL>: Alright" line "Gramps! Leave it" cont "all to me!" - para $52, ", I hate to" + para "<PLAYER>, I hate to" line "say it, but I" cont "don't need you!" @@ -534,64 +350,64 @@ _OaksLabText27:: ; 95741 (25:5741) para "I'll tell her not" line "to lend you one," - cont $52, "! Hahaha!" + cont "<PLAYER>! Hahaha!" done -_OaksLabText_1d405:: ; 957eb (25:57eb) +_OaksLabText_1d405:: text "I study #MON as" line "PROF.OAK's AIDE." done -_OaksLabText_441cc:: ; 9580c (25:580c) +_OaksLabText_441cc:: text "#DEX comp-" line "letion is:" para "@" - TX_NUM $ffdb, 1, 3 + TX_NUM hDexRatingNumMonsSeen, 1, 3 text " #MON seen" line "@" - TX_NUM $ffdc, 1, 3 + TX_NUM hDexRatingNumMonsOwned, 1, 3 text " #MON owned" para "PROF.OAK's" line "Rating:" prompt -_OaksLabText_44201:: ; 95858 (25:5858) +_OaksLabText_44201:: text "You still have" line "lots to do." cont "Look for #MON" cont "in grassy areas!" done -_OaksLabText_44206:: ; 95893 (25:5893) +_OaksLabText_44206:: text "You're on the" line "right track! " cont "Get a FLASH HM" cont "from my AIDE!" done -_OaksLabText_4420b:: ; 958cc (25:58cc) +_OaksLabText_4420b:: text "You still need" line "more #MON!" cont "Try to catch" cont "other species!" done -_OaksLabText_44210:: ; 95903 (25:5903) +_OaksLabText_44210:: text "Good, you're" line "trying hard!" cont "Get an ITEMFINDER" cont "from my AIDE!" done -_OaksLabText_44215:: ; 9593d (25:593d) +_OaksLabText_44215:: text "Looking good!" line "Go find my AIDE" cont "when you get 50!" done -_OaksLabText_4421a:: ; 9596d (25:596d) +_OaksLabText_4421a:: text "You finally got at" line "least 50 species!" cont "Be sure to get" @@ -599,73 +415,63 @@ _OaksLabText_4421a:: ; 9596d (25:596d) cont "AIDE!" done -_OaksLabText_4421f:: ; 959b8 (25:59b8) -IF DEF(_YELLOW) - text "Oh! This is get-" - line "ting even better!" -ELSE +_OaksLabText_4421f:: text "Ho! This is geting" line "even better!" -ENDC done -_OaksLabText_44224:: ; 959d9 (25:59d9) +_OaksLabText_44224:: text "Very good!" line "Go fish for some" cont "marine #MON!" done -_OaksLabText_44229:: ; 95a03 (25:5a03) +_OaksLabText_44229:: text "Wonderful!" line "Do you like to" cont "collect things?" done -_OaksLabText_4422e:: ; 95a2e (25:5a2e) +_OaksLabText_4422e:: text "I'm impressed!" line "It must have been" cont "difficult to do!" done -_OaksLabText_44233:: ; 95a60 (25:5a60) +_OaksLabText_44233:: text "You finally got at" line "least 100 species!" cont "I can't believe" cont "how good you are!" done -_OaksLabText_44238:: ; 95aa8 (25:5aa8) +_OaksLabText_44238:: text "You even have the" line "evolved forms of" cont "#MON! Super!" done -_OaksLabText_4423d:: ; 95ad9 (25:5ad9) +_OaksLabText_4423d:: text "Excellent! Trade" line "with friends to" cont "get some more!" done -_OaksLabText_44242:: ; 95b0a (25:5b0a) +_OaksLabText_44242:: text "Outstanding!" line "You've become a" cont "real pro at this!" done -_OaksLabText_44247:: ; 95b39 (25:5b39) +_OaksLabText_44247:: text "I have nothing" line "left to say!" cont "You're the" cont "authority now!" done -_OaksLabText_4424c:: ; 95b6f (25:5b6f) +_OaksLabText_4424c:: text "Your #DEX is" -IF DEF(_YELLOW) - line "fully complete!" -ELSE line "entirely complete!" -ENDC cont "Congratulations!" done - diff --git a/text/maps/pallet_town.asm b/text/maps/pallet_town.asm index f912e16e..64b3325b 100644 --- a/text/maps/pallet_town.asm +++ b/text/maps/pallet_town.asm @@ -53,4 +53,3 @@ _PalletTownText6:: _PalletTownText7:: text $53,"'s house " done - diff --git a/text/maps/pewter_city.asm b/text/maps/pewter_city.asm index 647832a3..14240c9e 100644 --- a/text/maps/pewter_city.asm +++ b/text/maps/pewter_city.asm @@ -1,4 +1,4 @@ -_PewterCityText1:: ; a497f (29:497f) +_PewterCityText1:: text "It's rumored that" line "CLEFAIRYs came" cont "from the moon!" @@ -8,7 +8,7 @@ _PewterCityText1:: ; a497f (29:497f) cont "fell on MT.MOON." done -_PewterCityText2:: ; a49e0 (29:49e0) +_PewterCityText2:: text "There aren't many" line "serious #MON" cont "trainers here!" @@ -20,24 +20,24 @@ _PewterCityText2:: ; a49e0 (29:49e0) cont "into it!" done -_PewterCityText_193f1:: ; a4a56 (29:4a56) +_PewterCityText_193f1:: text "Did you check out" line "the MUSEUM?" done -_PewterCityText_193f6:: ; a4a75 (29:4a75) +_PewterCityText_193f6:: text "Weren't those" line "fossils from MT." cont "MOON amazing?" done -_PewterCityText_193fb:: ; a4aa2 (29:4aa2) +_PewterCityText_193fb:: text "Really?" line "You absolutely" cont "have to go!" done -_PewterCityText13:: ; a4ac6 (29:4ac6) +_PewterCityText13:: text "It's right here!" line "You have to pay" cont "to get in, but" @@ -45,24 +45,24 @@ _PewterCityText13:: ; a4ac6 (29:4ac6) cont "See you around!" done -_PewterCityText_19427:: ; a4b14 (29:4b14) +_PewterCityText_19427:: text "Psssst!" line "Do you know what" cont "I'm doing?" done -_PewterCityText_1942c:: ; a4b38 (29:4b38) +_PewterCityText_1942c:: text "That's right!" line "It's hard work!" done -_PewterCityText_19431:: ; a4b55 (29:4b55) +_PewterCityText_19431:: text "I'm spraying REPEL" line "to keep #MON" cont "out of my garden!" done -_PewterCityText_1945d:: ; a4b87 (29:4b87) +_PewterCityText_1945d:: text "You're a trainer" line "right? BROCK's" cont "looking for new" @@ -70,13 +70,13 @@ _PewterCityText_1945d:: ; a4b87 (29:4b87) cont "Follow me!" done -_PewterCityText_19462:: ; a4bce (29:4bce) +_PewterCityText14:: text "If you have the" line "right stuff, go" cont "take on BROCK!" done -_PewterCityText6:: ; a4bfe (29:4bfe) +_PewterCityText6:: text "TRAINER TIPS" para "Any #MON that" @@ -85,7 +85,7 @@ _PewterCityText6:: ; a4bfe (29:4bfe) cont "short, earns EXP!" done -_PewterCityText7:: ; a4c4a (29:4c4a) +_PewterCityText7:: text "NOTICE!" para "Thieves have been" @@ -96,12 +96,12 @@ _PewterCityText7:: ; a4c4a (29:4c4a) cont "with any info!" done -_PewterCityText10:: ; a4cb1 (29:4cb1) +_PewterCityText10:: text "PEWTER MUSEUM" line "OF SCIENCE" done -_PewterCityText11:: ; a4ccb (29:4ccb) +_PewterCityText11:: text "PEWTER CITY" line "#MON GYM" cont "LEADER: BROCK" @@ -110,9 +110,8 @@ _PewterCityText11:: ; a4ccb (29:4ccb) line "#MON Trainer!" done -_PewterCityText12:: ; a4d0c (29:4d0c) +_PewterCityText12:: text "PEWTER CITY" line "A Stone Gray" cont "City" done - diff --git a/text/maps/pewter_gym_1.asm b/text/maps/pewter_gym_1.asm index 9f3a1213..6426dd72 100644 --- a/text/maps/pewter_gym_1.asm +++ b/text/maps/pewter_gym_1.asm @@ -1,4 +1,4 @@ -_PewterGymText_5c49e:: ; 9697a (25:697a) +_PewterGymText_5c49e:: text "I'm BROCK!" line "I'm PEWTER's GYM" cont "LEADER!" @@ -16,4 +16,3 @@ _PewterGymText_5c49e:: ; 9697a (25:697a) cont "Fine then! Show" cont "me your best!" done - diff --git a/text/maps/pewter_gym_2.asm b/text/maps/pewter_gym_2.asm index 433fd649..ff5f7242 100644 --- a/text/maps/pewter_gym_2.asm +++ b/text/maps/pewter_gym_2.asm @@ -1,25 +1,8 @@ -_PewterGymText_5c4a3:: ; 98000 (26:4000) +_PewterGymText_5c4a3:: text "There are all" line "kinds of trainers" cont "in the world!" -IF DEF(_YELLOW) - para "Some raise #MON" - line "for fights. Some" - cont "see them as pets." - - para "I'm in training to" - line "become a #MON" - cont "breeder." - - para "If you take your" - line "#MON training" - cont "seriously, go" - cont "visit the GYM in" - cont "CERULEAN and test" - cont "your abilities!" - done -ELSE para "You appear to be" line "very gifted as a" cont "#MON trainer!" @@ -28,18 +11,17 @@ ELSE line "CERULEAN and test" cont "your abilities!" done -ENDC -_TM34PreReceiveText:: ; 98092 (26:4092) +_TM34PreReceiveText:: text "Wait! Take this" line "with you!" done -_ReceivedTM34Text:: ; 980ad (26:40ad) +_ReceivedTM34Text:: text $52, " received" line "TM34!@@" -_TM34ExplanationText:: ; 980c0 (26:40c0) +_TM34ExplanationText:: db $0 para "A TM contains a" line "technique that" @@ -62,12 +44,12 @@ _TM34ExplanationText:: ; 980c0 (26:40c0) cont "it back double!" done -_TM34NoRoomText:: ; 981ab (26:41ab) +_TM34NoRoomText:: text "You don't have" line "room for this!" done -_PewterGymText_5c4bc:: ; 981c9 (26:41c9) +_PewterGymText_5c4bc:: text "I took" line "you for granted." @@ -78,7 +60,7 @@ _PewterGymText_5c4bc:: ; 981c9 (26:41c9) para $52, " received" line "the BOULDERBADGE!@@" -_PewterGymText_5c4c1:: ; 98232 (26:4232) +_PewterGymText_5c4c1:: db $0 para "That's an official" line "#MON LEAGUE" @@ -90,14 +72,10 @@ _PewterGymText_5c4c1:: ; 98232 (26:4232) para "The technique" line "FLASH can now be" -IF DEF(_YELLOW) - cont "used anytime!" -ELSE cont "used any time!" -ENDC prompt -_PewterGymBattleText1:: ; 982ae (26:42ae) +_PewterGymBattleText1:: text "Stop right there," line "kid!" @@ -106,7 +84,7 @@ _PewterGymBattleText1:: ; 982ae (26:42ae) cont "BROCK!" done -_PewterGymEndBattleText1:: ; 982f1 (26:42f1) +_PewterGymEndBattleText1:: text "Darn!" para "Light years isn't" @@ -114,13 +92,13 @@ _PewterGymEndBattleText1:: ; 982f1 (26:42f1) cont "distance!" prompt -_PewterGymAfterBattleText1:: ; 98325 (26:4325) +_PewterGymAfterBattleText1:: text "You're pretty hot," line "but not as hot" cont "as BROCK!" done -_PewterGymText_5c515:: ; 98351 (26:4351) +_PewterGymText_5c515:: text "Hiya! I can tell" line "you have what it" cont "takes to become a" @@ -134,12 +112,12 @@ _PewterGymText_5c515:: ; 98351 (26:4351) line "to the top!" done -_PewterGymText_5c51a:: ; 983dc (26:43dc) +_PewterGymText_5c51a:: text "All right! Let's" line "get happening!" prompt -_PewterGymText_5c51f:: ; 983fc (26:43fc) +_PewterGymText_5c51f:: text "The 1st #MON" line "out in a match is" cont "at the top of the" @@ -151,30 +129,14 @@ _PewterGymText_5c51f:: ; 983fc (26:43fc) cont "made easier!" done -_PewterGymText_5c524:: ; 98476 (26:4476) +_PewterGymText_5c524:: text "It's a free" line "service! Let's" cont "get happening!" prompt -_PewterGymText_5c529:: ; 9849f (26:449f) +_PewterGymText_5c529:: text "Just as I thought!" line "You're #MON" cont "champ material!" done - -IF DEF(_YELLOW) -_PewterGymGuyText:: - text "All right! Let's" - line "get happening!" - - para "It will be tough" - line "for your PIKACHU" - cont "at this GYM!" - - para "Electric attacks" - line "are harmless to" - cont "BROCK's ground-" - cont "type #MON." - done -ENDC diff --git a/text/maps/pewter_house_1.asm b/text/maps/pewter_house_1.asm index fa5ff179..450e8372 100644 --- a/text/maps/pewter_house_1.asm +++ b/text/maps/pewter_house_1.asm @@ -1,11 +1,11 @@ -_PewterHouse1Text1:: ; 984ce (26:44ce) +_PewterHouse1Text1:: text "NIDORAN: Bowbow!@@" -_PewterHouse1Text2:: ; 984e1 (26:44e1) +_PewterHouse1Text2:: text "NIDORAN sit!" done -_PewterHouse1Text3:: ; 984ef (26:44ef) +_PewterHouse1Text3:: text "Our #MON's an" line "outsider, so it's" cont "hard to handle." @@ -22,4 +22,3 @@ _PewterHouse1Text3:: ; 984ef (26:44ef) para "If only we had" line "some BADGEs..." done - diff --git a/text/maps/pewter_house_2.asm b/text/maps/pewter_house_2.asm index 1e7b1cd6..615536f7 100644 --- a/text/maps/pewter_house_2.asm +++ b/text/maps/pewter_house_2.asm @@ -1,4 +1,4 @@ -_PewterHouse2Text1:: ; 98656 (26:4656) +_PewterHouse2Text1:: text "#MON learn new" line "techniques as" cont "they grow!" @@ -8,7 +8,7 @@ _PewterHouse2Text1:: ; 98656 (26:4656) cont "the trainer!" done -_PewterHouse2Text2:: ; 986ae (26:46ae) +_PewterHouse2Text2:: text "#MON become" line "easier to catch" cont "when they are" @@ -17,4 +17,3 @@ _PewterHouse2Text2:: ; 986ae (26:46ae) para "But, it's not a" line "sure thing!" done - diff --git a/text/maps/pewter_mart.asm b/text/maps/pewter_mart.asm index 71760b7b..0d5b07a2 100644 --- a/text/maps/pewter_mart.asm +++ b/text/maps/pewter_mart.asm @@ -1,9 +1,5 @@ -_PewterMartText_74cc6:: ; 985ac (26:45ac) -IF DEF(_YELLOW) - text "A shady old man" -ELSE +_PewterMartText2:: text "A shady, old man" -ENDC line "got me to buy" cont "this really weird" cont "fish #MON!" @@ -12,11 +8,10 @@ ENDC line "and it cost ¥500!" done -_PewterMartText_74cd5:: ; 9860c (26:460c) +_PewterMartText3:: text "Good things can" line "happen if you" cont "raise #MON" cont "diligently, even" cont "the weak ones!" done - diff --git a/text/maps/pewter_pokecenter.asm b/text/maps/pewter_pokecenter.asm index 114fed16..6a1b373e 100644 --- a/text/maps/pewter_pokecenter.asm +++ b/text/maps/pewter_pokecenter.asm @@ -1,4 +1,4 @@ -_PewterPokecenterText1:: ; 98704 (26:4704) +_PewterPokecenterText2:: text "What!?" para "TEAM ROCKET is" @@ -8,22 +8,7 @@ _PewterPokecenterText1:: ; 98704 (26:4704) para "Scram!" done -IF DEF(_YELLOW) -_PewterPokecenterText2:: - text "#MON CENTERS" - line "are wonderful!" - - para "They heal #MON" - line "completely." - - para "Even conditions" - line "like sleep, burn," - cont "poison and others" - cont "are cured." - done -ENDC - -_PewterPokecenterText5:: ; 98744 (26:4744) +_PewterJigglypuffText:: text "JIGGLYPUFF: Puu" line "pupuu!" done diff --git a/text/maps/pokemon_league_gate.asm b/text/maps/pokemon_league_gate.asm index cadfea3b..ac92f4b0 100644 --- a/text/maps/pokemon_league_gate.asm +++ b/text/maps/pokemon_league_gate.asm @@ -1,4 +1,4 @@ -_Route22GateText_1e704:: ; 8cfbb (23:4fbb) +_Route22GateText_1e704:: text "Only truly skilled" line "trainers are" cont "allowed through." @@ -6,15 +6,14 @@ _Route22GateText_1e704:: ; 8cfbb (23:4fbb) para "You don't have the" line "BOULDERBADGE yet!@@" -_Route22GateText_1e715:: ; 8d012 (23:5012) +_Route22GateText_1e715:: db $0 para "The rules are" line "rules. I can't" cont "let you pass." done -_Route22GateText_1e71a:: ; 8d03e (23:503e) +_Route22GateText_1e71a:: text "Oh! That is the" line "BOULDERBADGE!" cont "Go right ahead!@@" - diff --git a/text/maps/pokemon_tower_1f.asm b/text/maps/pokemon_tower_1f.asm index 124888c0..50a2cd29 100644 --- a/text/maps/pokemon_tower_1f.asm +++ b/text/maps/pokemon_tower_1f.asm @@ -1,17 +1,17 @@ -_PokemonTower1Text1:: ; 9947f (26:547f) +_PokemonTower1Text1:: text "#MON TOWER was" line "erected in the" cont "memory of #MON" cont "that had died." done -_PokemonTower1Text2:: ; 994bc (26:54bc) +_PokemonTower1Text2:: text "Did you come to" line "pay respects?" cont "Bless you!" done -_PokemonTower1Text3:: ; 994e6 (26:54e6) +_PokemonTower1Text3:: text "I came to pray" line "for my CLEFAIRY." @@ -19,14 +19,13 @@ _PokemonTower1Text3:: ; 994e6 (26:54e6) line "stop crying..." done -_PokemonTower1Text4:: ; 99524 (26:5524) +_PokemonTower1Text4:: text "My GROWLITHE..." line "Why did you die?" done -_PokemonTower1Text5:: ; 99546 (26:5546) +_PokemonTower1Text5:: text "I am a CHANNELER!" line "There are spirits" cont "up to mischief!" done - diff --git a/text/maps/pokemon_tower_2f.asm b/text/maps/pokemon_tower_2f.asm index 6a33e085..ec2281fd 100644 --- a/text/maps/pokemon_tower_2f.asm +++ b/text/maps/pokemon_tower_2f.asm @@ -1,4 +1,4 @@ -_PokemonTower2Text_6062d:: ; 9957b (26:557b) +_PokemonTower2Text_6062d:: text $53, ": Hey," line $52, "! What" cont "brings you here?" @@ -10,7 +10,7 @@ _PokemonTower2Text_6062d:: ; 9957b (26:557b) cont "Let's go, pal!" done -_PokemonTower2Text_60632:: ; 995e5 (26:55e5) +_PokemonTower2Text_60632:: text "What?" line "You stinker!" @@ -18,7 +18,7 @@ _PokemonTower2Text_60632:: ; 995e5 (26:55e5) line "you too!" prompt -_PokemonTower2Text_60637:: ; 99614 (26:5614) +_PokemonTower2Text_60637:: text $53, ": Well," line "look at all your" cont "wimpy #MON!" @@ -27,7 +27,7 @@ _PokemonTower2Text_60637:: ; 99614 (26:5614) line "bit more!" prompt -_PokemonTower2Text_6063c:: ; 99657 (26:5657) +_PokemonTower2Text_6063c:: text "How's your #DEX" line "coming, pal?" cont "I just caught a" @@ -46,7 +46,7 @@ _PokemonTower2Text_6063c:: ; 99657 (26:5657) para "Smell ya later!" done -_PokemonTower2Text2:: ; 9971a (26:571a) +_PokemonTower2Text2:: text "Even we could not" line "identify the" cont "wayward GHOSTs!" @@ -55,4 +55,3 @@ _PokemonTower2Text2:: ; 9971a (26:571a) line "might be able to" cont "unmask them." done - diff --git a/text/maps/pokemon_tower_3f.asm b/text/maps/pokemon_tower_3f.asm index 267d8ab6..67098e6b 100644 --- a/text/maps/pokemon_tower_3f.asm +++ b/text/maps/pokemon_tower_3f.asm @@ -1,46 +1,45 @@ -_PokemonTower3BattleText1:: ; 99776 (26:5776) +_PokemonTower3BattleText1:: text "Urrg...Awaa..." line "Huhu...graa.." done -_PokemonTower3EndBattleText1:: ; 99794 (26:5794) +_PokemonTower3EndBattleText1:: text "Hwa!" line "I'm saved!" prompt -_PokemonTower3AfterBattleText1:: ; 997a4 (26:57a4) +_PokemonTower3AfterBattleText1:: text "The GHOSTs can be" line "identified by the" cont "SILPH SCOPE." done -_PokemonTower3BattleText2:: ; 997d6 (26:57d6) +_PokemonTower3BattleText2:: text "Kekeke...." line "Kwaaah!" done -_PokemonTower3EndBattleText2:: ; 997ea (26:57ea) +_PokemonTower3EndBattleText2:: text "Hmm?" line "What am I doing?" prompt -_PokemonTower3AfterBattleText2:: ; 99801 (26:5801) +_PokemonTower3AfterBattleText2:: text "Sorry! I was" line "possessed!" done -_PokemonTower3BattleText3:: ; 9981a (26:581a) +_PokemonTower3BattleText3:: text "Be gone!" line "Evil spirit!" done -_PokemonTower3EndBattleText3:: ; 99831 (26:5831) +_PokemonTower3EndBattleText3:: text "Whew!" line "The spirit left!" prompt -_PokemonTower3AfterBattleText3:: ; 99849 (26:5849) +_PokemonTower3AfterBattleText3:: text "My friends were" line "possessed too!" done - diff --git a/text/maps/pokemon_tower_4f.asm b/text/maps/pokemon_tower_4f.asm index cde92b0c..771325a0 100644 --- a/text/maps/pokemon_tower_4f.asm +++ b/text/maps/pokemon_tower_4f.asm @@ -1,46 +1,45 @@ -_PokemonTower4BattleText1:: ; 99869 (26:5869) +_PokemonTower4BattleText1:: text "GHOST! No!" line "Kwaaah!" done -_PokemonTower4EndBattleText1:: ; 9987d (26:587d) +_PokemonTower4EndBattleText1:: text "Where" line "is the GHOST?" prompt -_PokemonTower4AfterBattleText1:: ; 99892 (26:5892) +_PokemonTower4AfterBattleText1:: text "I must have been" line "dreaming..." done -_PokemonTower4BattleText2:: ; 998b0 (26:58b0) +_PokemonTower4BattleText2:: text "Be cursed with" line "me! Kwaaah!" done -_PokemonTower4EndBattleText2:: ; 998cc (26:58cc) +_PokemonTower4EndBattleText2:: text "What!" prompt -_PokemonTower4AfterBattleText2:: ; 998d3 (26:58d3) +_PokemonTower4AfterBattleText2:: text "We can't crack" line "the identity of" cont "the GHOSTs." done -_PokemonTower4BattleText3:: ; 998fe (26:58fe) +_PokemonTower4BattleText3:: text "Huhuhu..." line "Beat me not!" done -_PokemonTower4EndBattleText3:: ; 99916 (26:5916) +_PokemonTower4EndBattleText3:: text "Huh?" line "Who? What?" prompt -_PokemonTower4AfterBattleText3:: ; 99927 (26:5927) +_PokemonTower4AfterBattleText3:: text "May the departed" line "souls of #MON" cont "rest in peace..." done - diff --git a/text/maps/pokemon_tower_5f.asm b/text/maps/pokemon_tower_5f.asm index 95ce2f4b..f2cadfcb 100644 --- a/text/maps/pokemon_tower_5f.asm +++ b/text/maps/pokemon_tower_5f.asm @@ -1,4 +1,4 @@ -_PokemonTower5Text1:: ; 99958 (26:5958) +_PokemonTower5Text1:: text "Come, child! I" line "sealed this space" cont "with white magic!" @@ -6,67 +6,66 @@ _PokemonTower5Text1:: ; 99958 (26:5958) para "You can rest here!" done -_PokemonTower5BattleText1:: ; 9999f (26:599f) +_PokemonTower5BattleText1:: text "Give...me..." line "your...soul..." done -_PokemonTower5EndBattleText1:: ; 999bc (26:59bc) +_PokemonTower5EndBattleText1:: text "Gasp!" prompt -_PokemonTower5AfterBattleText1:: ; 999c3 (26:59c3) +_PokemonTower5AfterBattleText1:: text "I was under" line "possession!" done -_PokemonTower5BattleText2:: ; 999dc (26:59dc) +_PokemonTower5BattleText2:: text "You...shall..." line "join...us..." done -_PokemonTower5EndBattleText2:: ; 999f9 (26:59f9) +_PokemonTower5EndBattleText2:: text "What" line "a nightmare!" prompt -_PokemonTower5AfterBattleText2:: ; 99a0c (26:5a0c) +_PokemonTower5AfterBattleText2:: text "I was possessed!" done -_PokemonTower5BattleText3:: ; 99a1e (26:5a1e) +_PokemonTower5BattleText3:: text "Zombies!" done -_PokemonTower5EndBattleText3:: ; 99a28 (26:5a28) +_PokemonTower5EndBattleText3:: text "Ha?" prompt -_PokemonTower5AfterBattleText3:: ; 99a2d (26:5a2d) +_PokemonTower5AfterBattleText3:: text "I regained my" line "senses!" done -_PokemonTower5BattleText4:: ; 99a44 (26:5a44) +_PokemonTower5BattleText4:: text "Urgah..." line "Urff...." done -_PokemonTower5EndBattleText4:: ; 99a57 (26:5a57) +_PokemonTower5EndBattleText4:: text "Whoo!" prompt -_PokemonTower5AfterBattleText4:: ; 99a5e (26:5a5e) +_PokemonTower5AfterBattleText4:: text "I fell to evil" line "spirits despite" cont "my training!" done -_PokemonTower5Text7:: ; 99a8b (26:5a8b) +_PokemonTower5Text7:: text "Entered purified," line "protected zone!" para $52, "'s #MON" line "are fully healed!" done - diff --git a/text/maps/pokemon_tower_6f.asm b/text/maps/pokemon_tower_6f.asm index 08eb6b1a..7532d56d 100644 --- a/text/maps/pokemon_tower_6f.asm +++ b/text/maps/pokemon_tower_6f.asm @@ -1,10 +1,10 @@ -_PokemonTower2Text_60c1f:: ; 99ac8 (26:5ac8) +_PokemonTower2Text_60c1f:: text "The GHOST was the" line "restless soul of" cont "CUBONE's mother!" done -_PokemonTower2Text_60c24:: ; 99afc (26:5afc) +_PokemonTower2Text_60c24:: text "The mother's soul" line "was calmed." @@ -12,51 +12,50 @@ _PokemonTower2Text_60c24:: ; 99afc (26:5afc) line "the afterlife!" done -_PokemonTower6BattleText1:: ; 99b38 (26:5b38) +_PokemonTower6BattleText1:: text "Give...me..." line "blood..." done -_PokemonTower6EndBattleText1:: ; 99b4f (26:5b4f) +_PokemonTower6EndBattleText1:: text "Groan!" prompt -_PokemonTower6AfterBattleText1:: ; 99b57 (26:5b57) +_PokemonTower6AfterBattleText1:: text "I feel anemic and" line "weak..." done -_PokemonTower6BattleText2:: ; 99b72 (26:5b72) +_PokemonTower6BattleText2:: text "Urff... Kwaah!" done -_PokemonTower6EndBattleText2:: ; 99b82 (26:5b82) +_PokemonTower6EndBattleText2:: text "Some-" line "thing fell out!" prompt -_PokemonTower6AfterBattleText2:: ; 99b99 (26:5b99) +_PokemonTower6AfterBattleText2:: text "Hair didn't fall" line "out! It was an" cont "evil spirit!" done -_PokemonTower6BattleText3:: ; 99bc6 (26:5bc6) +_PokemonTower6BattleText3:: text "Ke..ke...ke..." line "ke..ke...ke!!" done -_PokemonTower6EndBattleText3:: ; 99be4 (26:5be4) +_PokemonTower6EndBattleText3:: text "Keee!" prompt -_PokemonTower6AfterBattleText3:: ; 99beb (26:5beb) +_PokemonTower6AfterBattleText3:: text "What's going on" line "here?" done -_PokemonTower6Text6:: ; 99c01 (26:5c01) +_PokemonTower6Text6:: text "Be gone..." line "Intruders..." done - diff --git a/text/maps/pokemon_tower_7f.asm b/text/maps/pokemon_tower_7f.asm index 2c1449b1..704a71eb 100644 --- a/text/maps/pokemon_tower_7f.asm +++ b/text/maps/pokemon_tower_7f.asm @@ -1,30 +1,4 @@ -IF DEF(_YELLOW) -_PokemonTowerJessieJamesText1:: - text "Stop right there!@@" - -_PokemonTowerJessieJamesText2:: - text "Grampa here wanted" - line "to complain, so" - cont "we're setting him" - cont "straight." - - para "So render yourself" - line "invisible, or" - cont "prepare to fight!" - done - -_PokemonTowerJessieJamesText3:: - text "You" - line "will regret this!" - prompt - -_PokemonTowerJessieJamesText4:: - text "Looks like TEAM" - line "ROCKET's blasting" - cont "off again!@@" -ENDC - -_TowerRescueFujiText:: ; 99c1a (26:5c1a) +_TowerRescueFujiText:: text "MR.FUJI: Heh? You" line "came to save me?" @@ -50,21 +24,21 @@ _TowerRescueFujiText:: ; 99c1a (26:5c1a) cont "of this tower." done -_PokemonTower7BattleText1:: ; 99d31 (26:5d31) +_PokemonTower7BattleText1:: text "What do you want?" line "Why are you here?" done -_PokemonTower7EndBattleText1:: ; 99d56 (26:5d56) +_PokemonTower7EndBattleText1:: text "I give up!" prompt -_PokemonTower7AfterBattleText1:: ; 99d62 (26:5d62) +_PokemonTower7AfterBattleText1:: text "I'm not going to" line "forget this!" done -_PokemonTower7BattleText2:: ; 99d80 (26:5d80) +_PokemonTower7BattleText2:: text "This old guy came" line "and complained" cont "about us harming" @@ -74,12 +48,12 @@ _PokemonTower7BattleText2:: ; 99d80 (26:5d80) line "over as adults!" done -_PokemonTower7EndBattleText2:: ; 99de1 (26:5de1) +_PokemonTower7EndBattleText2:: text "Please!" line "No more!" prompt -_PokemonTower7AfterBattleText2:: ; 99df3 (26:5df3) +_PokemonTower7AfterBattleText2:: text "#MON are only" line "good for making" cont "money!" @@ -88,18 +62,17 @@ _PokemonTower7AfterBattleText2:: ; 99df3 (26:5df3) line "business!" done -_PokemonTower7BattleText3:: ; 99e33 (26:5e33) +_PokemonTower7BattleText3:: text "You're not saving" line "anyone, kid!" done -_PokemonTower7EndBattleText3:: ; 99e52 (26:5e52) +_PokemonTower7EndBattleText3:: text "Don't" line "fight us ROCKETs!" prompt -_PokemonTower7AfterBattleText3:: ; 99e6a (26:5e6a) +_PokemonTower7AfterBattleText3:: text "You're not getting" line "away with this!" done - diff --git a/text/maps/power_plant.asm b/text/maps/power_plant.asm index 477bf60a..e5df6674 100644 --- a/text/maps/power_plant.asm +++ b/text/maps/power_plant.asm @@ -1,7 +1,6 @@ -_VoltorbBattleText:: ; 8c5e2 (23:45e2) +_VoltorbBattleText:: text "Bzzzt!" done -_ZapdosBattleText:: ; 8c5ea (23:45ea) +_ZapdosBattleText:: text "Gyaoo!@@" - diff --git a/text/maps/reds_house_1f.asm b/text/maps/reds_house_1f.asm index 16cf5129..07768af9 100644 --- a/text/maps/reds_house_1f.asm +++ b/text/maps/reds_house_1f.asm @@ -1,11 +1,7 @@ _MomWakeUpText:: text "MOM: Right." line "All boys leave" -IF DEF(_YELLOW) - cont "home someday." -ELSE cont "home some day." -ENDC cont "It said so on TV." para "PROF.OAK, next" @@ -14,22 +10,10 @@ ENDC done _MomHealText1:: -IF DEF(_YELLOW) - text "MOM: ",$52,", if" - line "your drive your" - cont "#MON too hard," - cont "they'll dislike" - cont "you." - - para "You should take a" - line "rest." - prompt -ELSE - text "MOM: ",$52,"!" + text "MOM: <PLAYER>!" line "You should take a" cont "quick rest." prompt -ENDC _MomHealText2:: text "MOM: Oh good!" @@ -51,4 +35,3 @@ _StandByMeText:: _TVWrongSideText:: text "Oops, wrong side." done - diff --git a/text/maps/rock_tunnel_b1f.asm b/text/maps/rock_tunnel_b1f.asm index 4ad2b255..472c52f8 100644 --- a/text/maps/rock_tunnel_b1f.asm +++ b/text/maps/rock_tunnel_b1f.asm @@ -1,116 +1,115 @@ -_RockTunnel1BattleText1:: ; 8c33a (23:433a) +_RockTunnel1BattleText1:: text "This tunnel goes" line "a long way, kid!" done -_RockTunnel1EndBattleText1:: ; 8c35d (23:435d) +_RockTunnel1EndBattleText1:: text "Doh!" line "You win!" prompt -_RockTunnel1AfterBattleText1:: ; 8c36c (23:436c) +_RockTunnel1AfterBattleText1:: text "Watch for ONIX!" line "It can put the" cont "squeeze on you!" done -_RockTunnel1BattleText2:: ; 8c39c (23:439c) +_RockTunnel1BattleText2:: text "Hmm. Maybe I'm" line "lost in here..." done -_RockTunnel1EndBattleText2:: ; 8c3bb (23:43bb) +_RockTunnel1EndBattleText2:: text "Ease up!" line "What am I doing?" cont "Which way is out?" prompt -_RockTunnel1AfterBattleText2:: ; 8c3e8 (23:43e8) +_RockTunnel1AfterBattleText2:: text "That sleeping" line "#MON on ROUTE" cont "12 forced me to" cont "take this detour." done -_RockTunnel1BattleText3:: ; 8c427 (23:4427) +_RockTunnel1BattleText3:: text "Outsiders like" line "you need to show" cont "me some respect!" done -_RockTunnel1EndBattleText3:: ; 8c459 (23:4459) +_RockTunnel1EndBattleText3:: text "I give!" prompt -_RockTunnel1AfterBattleText3:: ; 8c462 (23:4462) +_RockTunnel1AfterBattleText3:: text "You're talented" line "enough to hike!" done -_RockTunnel1BattleText4:: ; 8c482 (23:4482) +_RockTunnel1BattleText4:: text "#MON fight!" line "Ready, go!" done -_RockTunnel1EndBattleText4:: ; 8c49a (23:449a) +_RockTunnel1EndBattleText4:: text "Game" line "over!" prompt -_RockTunnel1AfterBattleText4:: ; 8c4a6 (23:44a6) +_RockTunnel1AfterBattleText4:: text "Oh well, I'll get" line "a ZUBAT as I go!" done -_RockTunnel1BattleText5:: ; 8c4c9 (23:44c9) +_RockTunnel1BattleText5:: text "Eek! Don't try" line "anything funny in" cont "the dark!" done -_RockTunnel1EndBattleText5:: ; 8c4f4 (23:44f4) +_RockTunnel1EndBattleText5:: text "It" line "was too dark!" prompt -_RockTunnel1AfterBattleText5:: ; 8c506 (23:4506) +_RockTunnel1AfterBattleText5:: text "I saw a MACHOP" line "in this tunnel!" done -_RockTunnel1BattleText6:: ; 8c526 (23:4526) +_RockTunnel1BattleText6:: text "I came this far" line "for #MON!" done -_RockTunnel1EndBattleText6:: ; 8c541 (23:4541) +_RockTunnel1EndBattleText6:: text "I'm" line "out of #MON!" prompt -_RockTunnel1AfterBattleText6:: ; 8c552 (23:4552) +_RockTunnel1AfterBattleText6:: text "You looked cute" line "and harmless!" done -_RockTunnel1BattleText7:: ; 8c571 (23:4571) +_RockTunnel1BattleText7:: text "You have #MON!" line "Let's start!" done -_RockTunnel1EndBattleText7:: ; 8c58d (23:458d) +_RockTunnel1EndBattleText7:: text "You" line "play hard!" prompt -_RockTunnel1AfterBattleText7:: ; 8c59d (23:459d) +_RockTunnel1AfterBattleText7:: text "Whew! I'm all" line "sweaty now!" done -_RockTunnel1Text8:: ; 8c5b7 (23:45b7) +_RockTunnel1Text8:: text "ROCK TUNNEL" line "CERULEAN CITY -" cont "LAVENDER TOWN" done - diff --git a/text/maps/rock_tunnel_b2f_1.asm b/text/maps/rock_tunnel_b2f_1.asm index 47dc2bb9..1a565eb3 100644 --- a/text/maps/rock_tunnel_b2f_1.asm +++ b/text/maps/rock_tunnel_b2f_1.asm @@ -1,109 +1,108 @@ -_RockTunnel2BattleText2:: ; 86a1d (21:6a1d) +_RockTunnel2BattleText2:: text "Hikers leave twigs" line "as trail markers." done -_RockTunnel2EndBattleText2:: ; 86a43 (21:6a43) +_RockTunnel2EndBattleText2:: text "Ohhh!" line "I did my best!" prompt -_RockTunnel2AfterBattleText2:: ; 86a59 (21:6a59) +_RockTunnel2AfterBattleText2:: text "I want to go " line "home!" done -_RockTunnel2BattleText3:: ; 86a6e (21:6a6e) +_RockTunnel2BattleText3:: text "Hahaha! Can you" line "beat my power?" done -_RockTunnel2EndBattleText3:: ; 86a8e (21:6a8e) +_RockTunnel2EndBattleText3:: text "Oops!" line "Out-muscled!" prompt -_RockTunnel2AfterBattleText3:: ; 86aa2 (21:6aa2) +_RockTunnel2AfterBattleText3:: text "I go for power" line "because I hate" cont "thinking!" done -_RockTunnel2BattleText4:: ; 86acb (21:6acb) +_RockTunnel2BattleText4:: text "You have a" line "#DEX?" cont "I want one too!" done -_RockTunnel2EndBattleText4:: ; 86aed (21:6aed) +_RockTunnel2EndBattleText4:: text "Shoot!" line "I'm so jealous!" prompt -_RockTunnel2AfterBattleText4:: ; 86b04 (21:6b04) +_RockTunnel2AfterBattleText4:: text "When you finish" line "your #DEX, can" cont "I have it?" done -_RockTunnel2BattleText5:: ; 86b2f (21:6b2f) +_RockTunnel2BattleText5:: text "Do you know about" line "costume players?" done -_RockTunnel2EndBattleText5:: ; 86b53 (21:6b53) +_RockTunnel2EndBattleText5:: text "Well," line "that's that." prompt -_RockTunnel2AfterBattleText5:: ; 86b66 (21:6b66) +_RockTunnel2AfterBattleText5:: text "Costume players" line "dress up as" cont "#MON for fun." done -_RockTunnel2BattleText6:: ; 86b91 (21:6b91) +_RockTunnel2BattleText6:: text "My #MON" line "techniques will" cont "leave you crying!" done -_RockTunnel2EndBattleText6:: ; 86bbc (21:6bbc) +_RockTunnel2EndBattleText6:: text "I give!" line "You're a better" cont "technician!" prompt -_RockTunnel2AfterBattleText6:: ; 86be0 (21:6be0) +_RockTunnel2AfterBattleText6:: text "In mountains," line "you'll often find" cont "rock-type #MON." done -_RockTunnel2BattleText7:: ; 86c10 (21:6c10) +_RockTunnel2BattleText7:: text "I don't often" line "come here, but I" cont "will fight you." done -_RockTunnel2EndBattleText7:: ; 86c3f (21:6c3f) +_RockTunnel2EndBattleText7:: text "Oh!" line "I lost!" prompt -_RockTunnel2AfterBattleText7:: ; 86c4c (21:6c4c) +_RockTunnel2AfterBattleText7:: text "I like tiny" line "#MON, big ones" cont "are too scary!" done -_RockTunnel2BattleText8:: ; 86c77 (21:6c77) +_RockTunnel2BattleText8:: text "Hit me with your" line "best shot!" done -_RockTunnel2EndBattleText8:: ; 86c94 (21:6c94) +_RockTunnel2EndBattleText8:: text "Fired" line "away!" prompt - diff --git a/text/maps/rock_tunnel_b2f_2.asm b/text/maps/rock_tunnel_b2f_2.asm index e76cdaaf..e8e45a7f 100644 --- a/text/maps/rock_tunnel_b2f_2.asm +++ b/text/maps/rock_tunnel_b2f_2.asm @@ -1,21 +1,20 @@ -_RockTunnel2AfterBattleText8:: ; 88000 (22:4000) +_RockTunnel2AfterBattleText8:: text "I'll raise my" line "#MON to beat" cont "yours, kid!" done -_RockTunnel2BattleText9:: ; 88027 (22:4027) +_RockTunnel2BattleText9:: text "I draw #MON" line "when I'm home." done -_RockTunnel2EndBattleText9:: ; 88042 (22:4042) +_RockTunnel2EndBattleText9:: text "Whew!" line "I'm exhausted!" prompt -_RockTunnel2AfterBattleText9:: ; 88057 (22:4057) +_RockTunnel2AfterBattleText9:: text "I'm an artist," line "not a fighter." done - diff --git a/text/maps/rock_tunnel_pokecenter.asm b/text/maps/rock_tunnel_pokecenter.asm index 715031ff..0fc249ff 100644 --- a/text/maps/rock_tunnel_pokecenter.asm +++ b/text/maps/rock_tunnel_pokecenter.asm @@ -1,4 +1,4 @@ -_RockTunnelPokecenterText1:: ; 8c2c0 (23:42c0) +_RockTunnelPokecenterText2:: text "The element types" line "of #MON make" cont "them stronger" @@ -7,8 +7,7 @@ _RockTunnelPokecenterText1:: ; 8c2c0 (23:42c0) cont "others!" done -_RockTunnelPokecenterText3:: ; 8c316 (23:4316) +_RockTunnelPokecenterText3:: text "I sold a useless" line "NUGGET for ¥5000!" done - diff --git a/text/maps/rocket_hideout_b1f.asm b/text/maps/rocket_hideout_b1f.asm index bb75bb08..36117804 100644 --- a/text/maps/rocket_hideout_b1f.asm +++ b/text/maps/rocket_hideout_b1f.asm @@ -1,74 +1,73 @@ -_RocketHideout1EndBattleText6:: ; 81f2a (20:5f2a) +_RocketHideout1EndBattleText6:: text "Why...?@@" -_RocketHideout1BattleText2:: ; 81f34 (20:5f34) +_RocketHideout1BattleText2:: text "Who are you? How" line "did you get here?" done -_RocketHideout1EndBattleText2:: ; 81f58 (20:5f58) +_RocketHideout1EndBattleText2:: text "Oww!" line "Beaten!" prompt -_RocketHideout1AfterBattleTxt2:: ; 81f66 (20:5f66) +_RocketHideout1AfterBattleTxt2:: text "Are you dissing" line "TEAM ROCKET?" done -_RocketHideout1BattleText3:: ; 81f84 (20:5f84) +_RocketHideout1BattleText3:: text "You broke into" line "our operation?" done -_RocketHideout1EndBattleText3:: ; 81fa3 (20:5fa3) +_RocketHideout1EndBattleText3:: text "Burnt!" prompt -_RocketHideout1AfterBattleTxt3:: ; 81fab (20:5fab) +_RocketHideout1AfterBattleTxt3:: text "You're not going" line "to get away with" cont "this, brat!" done -_RocketHideout1BattleText4:: ; 81fd9 (20:5fd9) +_RocketHideout1BattleText4:: text "Intruder alert!" done -_RocketHideout1EndBattleText4:: ; 81fea (20:5fea) +_RocketHideout1EndBattleText4:: text "I" line "can't do it!" prompt -_RocketHideout1AfterBattleTxt4:: ; 81ff9 (20:5ff9) +_RocketHideout1AfterBattleTxt4:: text "SILPH SCOPE?" line "I don't know" cont "where it is!" done -_RocketHideout1BattleText5:: ; 82020 (20:6020) +_RocketHideout1BattleText5:: text "Why did you come" line "here?" done -_RocketHideout1EndBattleText5:: ; 82038 (20:6038) +_RocketHideout1EndBattleText5:: text "This" line "won't do!" prompt -_RocketHideout1AfterBattleTxt5:: ; 82047 (20:6047) +_RocketHideout1AfterBattleTxt5:: text "OK, I'll talk!" line "Take the elevator" cont "to see my BOSS!" done -_RocketHideout1BattleText6:: ; 82078 (20:6078) +_RocketHideout1BattleText6:: text "Are you lost, you" line "little rat?" done -_RocketHideout1AfterBattleTxt6:: ; 82097 (20:6097) +_RocketHideout1AfterBattleTxt6:: text "Uh-oh, that fight" line "opened the door!" done - diff --git a/text/maps/rocket_hideout_b2f.asm b/text/maps/rocket_hideout_b2f.asm index abbdf646..c13c3593 100644 --- a/text/maps/rocket_hideout_b2f.asm +++ b/text/maps/rocket_hideout_b2f.asm @@ -1,18 +1,17 @@ -_RocketHideout2BattleText2:: ; 820bb (20:60bb) +_RocketHideout2BattleText2:: text "BOSS said you can" line "see GHOSTs with" cont "the SILPH SCOPE!" done -_RocketHideout2EndBattleText2:: ; 820ef (20:60ef) +_RocketHideout2EndBattleText2:: text "I" line "surrender!" prompt -_RocketHideout2AfterBattleTxt2:: ; 820fd (20:60fd) +_RocketHideout2AfterBattleTxt2:: text "The TEAM ROCKET" line "HQ has 4 basement" cont "floors. Can you" cont "reach the BOSS?" done - diff --git a/text/maps/rocket_hideout_b3f.asm b/text/maps/rocket_hideout_b3f.asm index 78f0656b..a146a383 100644 --- a/text/maps/rocket_hideout_b3f.asm +++ b/text/maps/rocket_hideout_b3f.asm @@ -1,36 +1,35 @@ -_RocketHideout3BattleText2:: ; 82140 (20:6140) +_RocketHideout3BattleText2:: text "Stop meddling in" line "TEAM ROCKET's" cont "affairs!" done -_RocketHideout3EndBattleText2:: ; 82168 (20:6168) +_RocketHideout3EndBattleText2:: text "Oof!" line "Taken down!" prompt -_RocketHideout3AfterBattleTxt2:: ; 8217a (20:617a) +_RocketHideout3AfterBattleTxt2:: text "SILPH SCOPE?" line "The machine the" cont "BOSS stole. It's" cont "here somewhere." done -_RocketHideout3BattleTxt:: ; 821b8 (20:61b8) +_RocketHideout3BattleTxt:: text "We got word from" line "upstairs that you" cont "were coming!" done -_RocketHideout3EndBattleText3:: ; 821e9 (20:61e9) +_RocketHideout3EndBattleText3:: text "What?" line "I lost? No!" prompt -_RocketHide3AfterBattleText3:: ; 821fc (20:61fc) +_RocketHide3AfterBattleText3:: text "Go ahead and go!" line "But, you need the" cont "LIFT KEY to run" cont "the elevator!" done - diff --git a/text/maps/rocket_hideout_b4f.asm b/text/maps/rocket_hideout_b4f.asm index e069e4a9..f3ba43f3 100644 --- a/text/maps/rocket_hideout_b4f.asm +++ b/text/maps/rocket_hideout_b4f.asm @@ -1,40 +1,15 @@ -IF DEF(_YELLOW) -_RocketHideoutJessieJamesText1:: - text "Not another step," - line "brat!@@" - -_RocketHideoutJessieJamesText2:: - text "How dare you" - line "humiliate us at" - cont "MT.MOON!" - - para "It's payback time," - line "you brat!" - done - -_RocketHideoutJessieJamesText3:: - text "Such" - line "a dreadful twerp!" - prompt - -_RocketHideoutJessieJamesText4:: - text "Looks like TEAM" - line "ROCKET's blasting" - cont "off again!@@" -ENDC - -_RocketHideout4Text_4557a:: ; 8223e (20:623e) +_RocketHideout4Text_4557a:: text "So! I must say, I" line "am impressed you" cont "got here!" done -_RocketHideout4Text_4557f:: ; 8226c (20:626c) +_RocketHideout4Text_4557f:: text "WHAT!" line "This cannot be!" prompt -_RocketHideout4Text_45584:: ; 82283 (20:6283) +_RocketHideout4Text_45584:: text "I see that you" line "raise #MON" cont "with utmost care." @@ -51,50 +26,49 @@ _RocketHideout4Text_45584:: ; 82283 (20:6283) line "again..." done -_RocketHideout4BattleText2:: ; 82326 (20:6326) +_RocketHideout4BattleText2:: text "I know you! You" line "ruined our plans" cont "at MT.MOON!" done -_RocketHideout4EndBattleText2:: ; 82354 (20:6354) +_RocketHideout4EndBattleText2:: text "Burned" line "again!" prompt -_RocketHide4AfterBattleText2:: ; 82363 (20:6363) +_RocketHide4AfterBattleText2:: text "Do you have" line "something against" cont "TEAM ROCKET?" done -_RocketHideout4BattleText3:: ; 8238f (20:638f) +_RocketHideout4BattleText3:: text "How can you not" line "see the beauty of" cont "our evil?" done -_RocketHideout4EndBattleText3:: ; 823bc (20:63bc) +_RocketHideout4EndBattleText3:: text "Ayaya!" prompt -_RocketHide4AfterBattleText3:: ; 823c4 (20:63c4) +_RocketHide4AfterBattleText3:: text "BOSS! I'm sorry I" line "failed you!" done -_RocketHideout4BattleText4:: ; 823e2 (20:63e2) +_RocketHideout4BattleText4:: text "The elevator" line "doesn't work? Who" cont "has the LIFT KEY?" done -_RocketHideout4EndBattleText4:: ; 82413 (20:6413) +_RocketHideout4EndBattleText4:: text "No!" prompt -_RocketHideout4Text_455ec:: ; 82418 (20:6418) +_RocketHideout4Text_455ec:: text "Oh no! I dropped" line "the LIFT KEY!" done - diff --git a/text/maps/rocket_hideout_elevator.asm b/text/maps/rocket_hideout_elevator.asm index 12fbad6d..6f2aa638 100644 --- a/text/maps/rocket_hideout_elevator.asm +++ b/text/maps/rocket_hideout_elevator.asm @@ -1,4 +1,3 @@ -_RocketElevatorText_4578b:: ; 82438 (20:6438) +_RocketElevatorText_4578b:: text "It appears to" line "need a key.@@" - diff --git a/text/maps/route_1.asm b/text/maps/route_1.asm index 99807e3e..adffd705 100644 --- a/text/maps/route_1.asm +++ b/text/maps/route_1.asm @@ -1,4 +1,4 @@ -_Route1ViridianMartSampleText:: ; 8d5bf (23:55bf) +_Route1ViridianMartSampleText:: text "Hi! I work at a" line "#MON MART." @@ -12,24 +12,24 @@ _Route1ViridianMartSampleText:: ; 8d5bf (23:55bf) cont "Here you go!" prompt -_Route1Text_1cae8:: ; 8d643 (23:5643) +_Route1Text_1cae8:: text $52, " got" line "@" TX_RAM wcf4b text "!@@" -_Route1Text_1caee:: ; 8d652 (23:5652) +_Route1Text_1caee:: text "We also carry" line "# BALLs for" cont "catching #MON!" done -_Route1Text_1caf3:: ; 8d67c (23:567c) +_Route1Text_1caf3:: text "You have too much" line "stuff with you!" done -_Route1Text2:: ; 8d69f (23:569f) +_Route1Text2:: text "See those ledges" line "along the road?" @@ -42,9 +42,8 @@ _Route1Text2:: ; 8d69f (23:569f) cont "quicker that way." done -_Route1Text3:: ; 8d720 (23:5720) +_Route1Text3:: text "ROUTE 1" line "PALLET TOWN -" cont "VIRIDIAN CITY" done - diff --git a/text/maps/route_10.asm b/text/maps/route_10.asm index 795f7e69..057ddcb5 100644 --- a/text/maps/route_10.asm +++ b/text/maps/route_10.asm @@ -1,101 +1,97 @@ -_Route10BattleText1:: ; 8e642 (23:6642) +_Route10BattleText1:: text "Wow, are you a" line "#MANIAC too?" cont "Want to see my" cont "collection?" done -_Route10EndBattleText1:: ; 8e67a (23:667a) +_Route10EndBattleText1:: text "Humph." line "I'm not angry!" prompt -_Route10AfterBattleText1:: ; 8e690 (23:6690) +_Route10AfterBattleText1:: text "I have more rare" line "#MON at home!" done -_Route10BattleText2:: ; 8e6b0 (23:66b0) +_Route10BattleText2:: text "Ha-hahah-ah-ha!" done -_Route10EndBattleText2:: ; 8e6c1 (23:66c1) +_Route10EndBattleText2:: text "Ha-haha!" line "Not laughing!" cont "Ha-hay fever!" cont "Haha-ha-choo!" prompt -_Route10AfterBattleText2:: ; 8e6f5 (23:66f5) +_Route10AfterBattleText2:: text "Haha-ha-choo!" line "Ha-choo!" cont "Snort! Snivel!" done -_Route10BattleText3:: ; 8e71c (23:671c) -IF DEF(_YELLOW) - text "Hi, kid, want to" -ELSE +_Route10BattleText3:: text "Hi kid, want to" -ENDC line "see my #MON?" done -_Route10EndBattleText3:: ; 8e73a (23:673a) +_Route10EndBattleText3:: text "Oh no!" line "My #MON!" prompt -_Route10AfterBattleText3:: ; 8e74b (23:674b) +_Route10AfterBattleText3:: text "I don't like you" line "for beating me!" done -_Route10BattleText4:: ; 8e76c (23:676c) +_Route10BattleText4:: text "I've been to a" line "#MON GYM a few" cont "times. But, I" cont "lost each time." done -_Route10EndBattleText4:: ; 8e7a8 (23:67a8) +_Route10EndBattleText4:: text "Ohh!" line "Blew it again!" prompt -_Route10AfterBattleText4:: ; 8e7bd (23:67bd) +_Route10AfterBattleText4:: text "I noticed some" line "#MANIACs" cont "prowling around." done -_Route10BattleText5:: ; 8e7e7 (23:67e7) +_Route10BattleText5:: text "Ah! This mountain" line "air is delicious!" done -_Route10EndBattleText5:: ; 8e80c (23:680c) +_Route10EndBattleText5:: text "That" line "cleared my head!" prompt -_Route10AfterBattleText5:: ; 8e823 (23:6823) +_Route10AfterBattleText5:: text "I feel bloated on" line "mountain air!" done -_Route10BattleText6:: ; 8e844 (23:6844) +_Route10BattleText6:: text "I'm feeling a bit" line "faint from this" cont "tough hike." done -_Route10EndBattleText6:: ; 8e872 (23:6872) +_Route10EndBattleText6:: text "I'm" line "not up to it!" prompt -_Route10AfterBattleText6:: ; 8e884 (23:6884) +_Route10AfterBattleText6:: text "The #MON here" line "are so chunky!" cont "There should be a" @@ -103,12 +99,11 @@ _Route10AfterBattleText6:: ; 8e884 (23:6884) cont "floral pattern!" done -_Route10Text9:: ; 8e8d4 (23:68d4) -_Route10Text7:: ; 8e8d4 (23:68d4) +_Route10Text9:: +_Route10Text7:: text "ROCK TUNNEL" done -_Route10Text10:: ; 8e8e1 (23:68e1) +_Route10Text10:: text "POWER PLANT" done - diff --git a/text/maps/route_11_1.asm b/text/maps/route_11_1.asm index 0637cad3..13e37bdf 100644 --- a/text/maps/route_11_1.asm +++ b/text/maps/route_11_1.asm @@ -1,123 +1,123 @@ -_Route11BattleText1:: ; 8e8ee (23:68ee) +_Route11BattleText1:: text "Win, lose or draw!" done -_Route11EndBattleText1:: ; 8e902 (23:6902) +_Route11EndBattleText1:: text "Atcha!" line "Didn't go my way!" prompt -_Route11AfterBattleText1:: ; 8e91b (23:691b) +_Route11AfterBattleText1:: text "#MON is life!" line "And to live is to" cont "gamble!" done -_Route11BattleText2:: ; 8e944 (23:6944) +_Route11BattleText2:: text "Competition! I" line "can't get enough!" done -_Route11EndBattleText2:: ; 8e965 (23:6965) +_Route11EndBattleText2:: text "I had" line "a chance!" prompt -_Route11AfterBattleText2:: ; 8e976 (23:6976) +_Route11AfterBattleText2:: text "You can't be a" line "coward in the" cont "world of #MON!" done -_Route11BattleText3:: ; 8e9a2 (23:69a2) +_Route11BattleText3:: text "Let's go, but" line "don't cheat!" done -_Route11EndBattleText3:: ; 8e9bc (23:69bc) +_Route11EndBattleText3:: text "Huh?" line "That's not right!" prompt -_Route11AfterBattleText3:: ; 8e9d3 (23:69d3) +_Route11AfterBattleText3:: text "I did my best! I" line "have no regrets!" done -_Route11BattleText4:: ; 8e9f6 (23:69f6) +_Route11BattleText4:: text "Careful!" line "I'm laying down" cont "some cables!" done -_Route11EndBattleText4:: ; 8ea1c (23:6a1c) +_Route11EndBattleText4:: text "That" line "was electric!" prompt -_Route11AfterBattleText4:: ; 8ea30 (23:6a30) +_Route11AfterBattleText4:: text "Spread the word" line "to save energy!" done -_Route11BattleText5:: ; 8ea51 (23:6a51) +_Route11BattleText5:: text "I just became a" line "trainer! But, I" cont "think I can win!" done -_Route11EndBattleText5:: ; 8ea83 (23:6a83) +_Route11EndBattleText5:: text "My" line "#MON couldn't!" prompt -_Route11AfterBattleText5:: ; 8ea95 (23:6a95) +_Route11AfterBattleText5:: text "What do you want?" line "Leave me alone!" done -_Route11BattleText6:: ; 8eab8 (23:6ab8) +_Route11BattleText6:: text "Fwahaha! I have" line "never lost!" done -_Route11EndBattleText6:: ; 8ead5 (23:6ad5) +_Route11EndBattleText6:: text "My" line "first loss!" prompt -_Route11AfterBattleText6:: ; 8eae5 (23:6ae5) +_Route11AfterBattleText6:: text "Luck of the draw!" line "Just luck!" done -_Route11BattleText7:: ; 8eb03 (23:6b03) +_Route11BattleText7:: text "I have never won" line "before..." done -_Route11EndBattleText7:: ; 8eb1f (23:6b1f) +_Route11EndBattleText7:: text "I saw" line "this coming..." prompt -_Route11AfterBattleText7:: ; 8eb35 (23:6b35) +_Route11AfterBattleText7:: text "It's just luck." line "Luck of the draw." done -_Route11BattleText8:: ; 8eb57 (23:6b57) +_Route11BattleText8:: text "I'm the best in" line "my class!" done -_Route11EndBattleText8:: ; 8eb71 (23:6b71) +_Route11EndBattleText8:: text "Darn!" line "I need to make my" cont "#MON stronger!" prompt -_Route11AfterBattleText8:: ; 8eb99 (23:6b99) +_Route11AfterBattleText8:: text "There's a fat" line "#MON that" cont "comes down from" @@ -127,9 +127,7 @@ _Route11AfterBattleText8:: ; 8eb99 (23:6b99) line "you can get it." done -_Route11BattleText9:: ; 8ebee (23:6bee) +_Route11BattleText9:: text "Watch out for" line "live wires!" done - - diff --git a/text/maps/route_11_2.asm b/text/maps/route_11_2.asm index 7edb3f06..b9b68d6d 100644 --- a/text/maps/route_11_2.asm +++ b/text/maps/route_11_2.asm @@ -1,29 +1,28 @@ -_Route11EndBattleText9:: ; 90000 (24:4000) +_Route11EndBattleText9:: text "Whoa!" line "You spark plug!" prompt -_Route11AfterBattleText9:: ; 90017 (24:4017) +_Route11AfterBattleText9:: text "Well, better get" line "back to work." done -_Route11BattleText10:: ; 90037 (24:4037) +_Route11BattleText10:: text "My #MON should" line "be ready by now!" done -_Route11EndBattleText10:: ; 90058 (24:4058) +_Route11EndBattleText10:: text "Too" line "much, too young!" prompt -_Route11AfterBattleText10:: ; 9006e (24:406e) +_Route11AfterBattleText10:: text "I better go find" line "stronger ones!" done -_Route11Text11:: ; 9008f (24:408f) +_Route11Text11:: text "DIGLETT's CAVE" done - diff --git a/text/maps/route_11_gate.asm b/text/maps/route_11_gate.asm index 46897a38..ef371d06 100644 --- a/text/maps/route_11_gate.asm +++ b/text/maps/route_11_gate.asm @@ -1,4 +1,4 @@ -_Route11GateText1:: ; 8c5f3 (23:45f3) +_Route11GateText1:: text "When you catch" line "lots of #MON," cont "isn't it hard to" @@ -12,4 +12,3 @@ _Route11GateText1:: ; 8c5f3 (23:45f3) para "He'll help you" line "rename them too!" done - diff --git a/text/maps/route_11_gate_upstairs.asm b/text/maps/route_11_gate_upstairs.asm index 70c463ec..10236081 100644 --- a/text/maps/route_11_gate_upstairs.asm +++ b/text/maps/route_11_gate_upstairs.asm @@ -1,4 +1,4 @@ -_Route11GateUpstairsText_494a3:: ; 8c689 (23:4689) +_Route11GateUpstairsText_494a3:: text "There are items on" line "the ground that" cont "can't be seen." @@ -28,7 +28,7 @@ _BinocularsNoSnorlaxText:: line "view!" done -_Route11GateUpstairsText_494d5:: ; 8c78b (23:478b) +_Route11GateUpstairsText_494d5:: text "Looked into the" line "binoculars." @@ -38,4 +38,3 @@ _Route11GateUpstairsText_494d5:: ; 8c78b (23:478b) cont "is by way of the" cont "ROCK TUNNEL." done - diff --git a/text/maps/route_12.asm b/text/maps/route_12.asm index 12925104..82696fda 100644 --- a/text/maps/route_12.asm +++ b/text/maps/route_12.asm @@ -1,144 +1,139 @@ -_Route12Text1:: ; 9009e (24:409e) +_Route12Text1:: text "A sleeping #MON" line "blocks the way!" done -_Route12Text13:: ; 900bf (24:40bf) +_Route12Text13:: text "SNORLAX woke up!" para "It attacked in a" line "grumpy rage!" done -_Route12Text14:: ; 900ef (24:40ef) +_Route12Text14:: text "SNORLAX calmed" line "down! With a big" cont "yawn, it returned" cont "to the mountains!" done -_Route12BattleText1:: ; 90134 (24:4134) +_Route12BattleText1:: text "Yeah! I got a" line "bite, here!" done -_Route12EndBattleText1:: ; 9014f (24:414f) +_Route12EndBattleText1:: text "Tch!" line "Just a small fry!" prompt -_Route12AfterBattleText1:: ; 90167 (24:4167) +_Route12AfterBattleText1:: text "Hang on! My line's" line "snagged!" done -_Route12BattleText2:: ; 90183 (24:4183) +_Route12BattleText2:: text "Be patient!" line "Fishing is a" cont "waiting game!" done -_Route12EndBattleText2:: ; 901ab (24:41ab) +_Route12EndBattleText2:: text "That" line "one got away!" prompt -_Route12AfterBattleText2:: ; 901bf (24:41bf) +_Route12AfterBattleText2:: text "With a better ROD," line "I could catch" cont "better #MON!" done -_Route12BattleText3:: ; 901ee (24:41ee) +_Route12BattleText3:: text "Have you found a" line "MOON STONE?" done -_Route12EndBattleText3:: ; 9020c (24:420c) +_Route12EndBattleText3:: text "Oww!" prompt -_Route12AfterBattleText3:: ; 90212 (24:4212) +_Route12AfterBattleText3:: text "I could have made" line "my #MON evolve" cont "with MOON STONE!" done -_Route12BattleText4:: ; 90245 (24:4245) +_Route12BattleText4:: text "Electricity is my" line "specialty!" done -_Route12EndBattleText4:: ; 90263 (24:4263) +_Route12EndBattleText4:: text "Unplugged!" prompt -_Route12AfterBattleText4:: ; 9026f (24:426f) +_Route12AfterBattleText4:: text "Water conducts" line "electricity, so" cont "you should zap" cont "sea #MON!" done -_Route12BattleText5:: ; 902a8 (24:42a8) +_Route12BattleText5:: text "The FISHING FOOL" line "vs. #MON KID!" done -_Route12EndBattleText5:: ; 902c8 (24:42c8) +_Route12EndBattleText5:: text "Too" line "much!" prompt -_Route12AfterBattleText5:: ; 902d3 (24:42d3) +_Route12AfterBattleText5:: text "You beat me at" line "#MON, but I'm" cont "good at fishing!" done -_Route12BattleText6:: ; 90301 (24:4301) +_Route12BattleText6:: text "I'd rather be" line "working!" done -_Route12EndBattleText6:: ; 90318 (24:4318) +_Route12EndBattleText6:: text "It's" line "not easy..." prompt -_Route12AfterBattleText6:: ; 90329 (24:4329) +_Route12AfterBattleText6:: text "It's all right." line "Losing doesn't" -IF DEF(_YELLOW) - cont "bug me anymore." -ELSE cont "bug me any more." -ENDC done -_Route12BattleText7:: ; 90358 (24:4358) +_Route12BattleText7:: text "You never know" line "what you could" cont "catch!" done -_Route12EndBattleText7:: ; 9037e (24:437e) +_Route12EndBattleText7:: text "Lost" line "it!" prompt -_Route12AfterBattleText7:: ; 90388 (24:4388) +_Route12AfterBattleText7:: text "I catch MAGIKARP" line "all the time, but" cont "they're so weak!" done -_Route12Text11:: ; 903bc (24:43bc) +_Route12Text11:: text "ROUTE 12 " line "North to LAVENDER" done -_Route12Text12:: ; 903d9 (24:43d9) +_Route12Text12:: text "SPORT FISHING AREA" done - diff --git a/text/maps/route_12_gate.asm b/text/maps/route_12_gate.asm index a384c3bc..51d75539 100644 --- a/text/maps/route_12_gate.asm +++ b/text/maps/route_12_gate.asm @@ -1,5 +1,4 @@ -_Route12GateText1:: ; 8c84a (23:484a) +_Route12GateText1:: text "There's a lookout" line "spot upstairs." done - diff --git a/text/maps/route_12_gate_upstairs.asm b/text/maps/route_12_gate_upstairs.asm index 3e8fb60c..1f2af788 100644 --- a/text/maps/route_12_gate_upstairs.asm +++ b/text/maps/route_12_gate_upstairs.asm @@ -1,22 +1,18 @@ -_TM39PreReceiveText:: ; 8c86b (23:486b) +_TM39PreReceiveText:: text "My #MON's" line "ashes are stored" cont "in #MON TOWER." para "You can have this" line "TM. I don't need" -IF DEF(_YELLOW) - cont "it anymore..." -ELSE cont "it any more..." -ENDC prompt -_ReceivedTM39Text:: ; 8c8c6 (23:48c6) +_ReceivedTM39Text:: text $52, " received" line "TM39!@@" -_TM39ExplanationText:: ; 8c8d9 (23:48d9) +_TM39ExplanationText:: text "TM39 is a move" line "called SWIFT." @@ -26,22 +22,21 @@ _TM39ExplanationText:: ; 8c8d9 (23:48d9) cont "afford to lose." done -_TM39NoRoomText:: ; 8c93c (23:493c) +_TM39NoRoomText:: text "You don't have" line "room for this." done -_Route12GateUpstairsText_495b8:: ; 8c95a (23:495a) +_Route12GateUpstairsText_495b8:: text "Looked into the" line "binoculars." para "A man fishing!" done -_Route12GateUpstairsText_495c4:: ; 8c986 (23:4986) +_Route12GateUpstairsText_495c4:: text "Looked into the" line "binoculars." para "It's #MON TOWER!" done - diff --git a/text/maps/route_12_house.asm b/text/maps/route_12_house.asm index 8ec4552b..4cb4beee 100644 --- a/text/maps/route_12_house.asm +++ b/text/maps/route_12_house.asm @@ -1,4 +1,4 @@ -_Route12HouseText_564c0:: ; 8c9b3 (23:49b3) +_Route12HouseText_564c0:: text "I'm the FISHING" line "GURU's brother!" @@ -9,7 +9,7 @@ _Route12HouseText_564c0:: ; 8c9b3 (23:49b3) line "fish?" done -_Route12HouseText_564c5:: ; 8ca00 (23:4a00) +_Route12HouseText_564c5:: text "Grand! I like" line "your style!" @@ -21,7 +21,7 @@ _Route12HouseText_564c5:: ; 8ca00 (23:4a00) TX_RAM wcf4b text "!@@" -_Route12HouseText_564ca:: ; 8ca4f (23:4a4f) +_Route12HouseText_564ca:: db $0 para "Fishing is a way" line "of life!" @@ -32,12 +32,12 @@ _Route12HouseText_564ca:: ; 8ca4f (23:4a4f) cont "one!" done -_Route12HouseText_564cf:: ; 8caa1 (23:4aa1) +_Route12HouseText_564cf:: text "Oh... That's so" line "disappointing..." done -_Route12HouseText_564d4:: ; 8cac2 (23:4ac2) +_Route12HouseText_564d4:: text "Hello there," line $52, "!" @@ -51,11 +51,10 @@ _Route12HouseText_564d4:: ; 8cac2 (23:4ac2) line "wherever you can!" done -_Route12HouseText_564d9:: ; 8cb38 (23:4b38) +_Route12HouseText_564d9:: text "Oh no!" para "I had a gift for" line "you, but you have" cont "no room for it!" done - diff --git a/text/maps/route_13.asm b/text/maps/route_13.asm index 6f31acbd..e2718919 100644 --- a/text/maps/route_13.asm +++ b/text/maps/route_13.asm @@ -1,170 +1,170 @@ -_Route13BattleText2:: ; 903ed (24:43ed) +_Route13BattleText2:: text "My bird #MON" line "want to scrap!" done -_Route13EndBattleText2:: ; 9040a (24:440a) +_Route13EndBattleText2:: text "My" line "bird combo lost?" prompt -_Route13AfterBattleText2:: ; 9041f (24:441f) +_Route13AfterBattleText2:: text "My #MON look" line "happy even though" cont "they lost." done -_Route13BattleText3:: ; 9044a (24:444a) +_Route13BattleText3:: text "I'm told I'm good" line "for a kid!" done -_Route13EndBattleText3:: ; 90466 (24:4466) +_Route13EndBattleText3:: text "Ohh!" line "I lost!" prompt -_Route13AfterBattleText3:: ; 90474 (24:4474) +_Route13AfterBattleText3:: text "I want to become" line "a good trainer." cont "I'll train hard." done -_Route13BattleText4:: ; 904a6 (24:44a6) +_Route13BattleText4:: text "Wow! Your BADGEs" line "are too cool!" done -_Route13EndBattleText4:: ; 904c6 (24:44c6) +_Route13EndBattleText4:: text "Not" line "enough!" prompt -_Route13AfterBattleText4:: ; 904d3 (24:44d3) +_Route13AfterBattleText4:: text "You got those" line "BADGEs from GYM" cont "LEADERs. I know!" done -_Route13BattleText5:: ; 90503 (24:4503) +_Route13BattleText5:: text "My cute #MON" line "wish to make your" cont "acquaintance." done -_Route13EndBattleText5:: ; 90531 (24:4531) +_Route13EndBattleText5:: text "Wow!" line "You totally won!" prompt -_Route13AfterBattleText5:: ; 90548 (24:4548) +_Route13AfterBattleText5:: text "You have to make" line "#MON fight to" cont "toughen them up!" done -_Route13BattleText6:: ; 90579 (24:4579) +_Route13BattleText6:: text "I found CARBOS in" line "a cave once." done -_Route13EndBattleText6:: ; 90599 (24:4599) +_Route13EndBattleText6:: text "Just" line "messed up!" prompt -_Route13AfterBattleText6:: ; 905aa (24:45aa) +_Route13AfterBattleText6:: text "CARBOS boosted" line "the SPEED of my" cont "#MON." done -_Route13BattleText7:: ; 905d0 (24:45d0) +_Route13BattleText7:: text "The wind's blowing" line "my way!" done -_Route13EndBattleText7:: ; 905eb (24:45eb) +_Route13EndBattleText7:: text "The" line "wind turned!" prompt -_Route13AfterBattleText7:: ; 905fd (24:45fd) +_Route13AfterBattleText7:: text "I'm beat. I guess" line "I'll FLY home." done -_Route13BattleText8:: ; 9061d (24:461d) +_Route13BattleText8:: text "Sure, I'll play" line "with you!" done -_Route13EndBattleText8:: ; 90637 (24:4637) +_Route13EndBattleText8:: text "Oh!" line "You little brute!" prompt -_Route13AfterBattleText8:: ; 9064e (24:464e) +_Route13AfterBattleText8:: text "I wonder which is" line "stronger, male or" cont "female #MON?" done -_Route13BattleText9:: ; 90680 (24:4680) +_Route13BattleText9:: text "Do you want to" line "#MON with me?" done -_Route13EndBattleText9:: ; 9069e (24:469e) +_Route13EndBattleText9:: text "It's over" line "already?" prompt -_Route13AfterBattleText9:: ; 906b1 (24:46b1) +_Route13AfterBattleText9:: text "I don't know" line "anything about" cont "#MON. I just" cont "like cool ones!" done -_Route13BattleText10:: ; 906ea (24:46ea) +_Route13BattleText10:: text "What're you" line "lookin' at?" done -_Route13EndBattleText10:: ; 90702 (24:4702) +_Route13EndBattleText10:: text "Dang!" line "Stripped gears!" prompt -_Route13AfterBattleText10:: ; 90719 (24:4719) +_Route13AfterBattleText10:: text "Get lost!" done -_Route13BattleText11:: ; 90724 (24:4724) +_Route13BattleText11:: text "I always go with" line "bird #MON!" done -_Route13EndBattleText11:: ; 90741 (24:4741) +_Route13EndBattleText11:: text "Out" line "of power!" prompt -_Route13AfterBattleText11:: ; 90750 (24:4750) +_Route13AfterBattleText11:: text "I wish I could" line "fly like PIDGEY" cont "and PIDGEOTTO..." done -_Route13Text11:: ; 90781 (24:4781) +_Route13Text11:: text "TRAINER TIPS" para "Look to the left" line "of that post!" done -_Route13Text12:: ; 907ae (24:47ae) +_Route13Text12:: text "TRAINER TIPS" para "Use SELECT to" @@ -172,9 +172,8 @@ _Route13Text12:: ; 907ae (24:47ae) cont "the ITEM window!" done -_Route13Text13:: ; 907eb (24:47eb) +_Route13Text13:: text "ROUTE 13" line "North to SILENCE" cont "BRIDGE" done - diff --git a/text/maps/route_14.asm b/text/maps/route_14.asm index b542274e..18e85ed4 100644 --- a/text/maps/route_14.asm +++ b/text/maps/route_14.asm @@ -1,151 +1,147 @@ -_Route14BattleText1:: ; 9080d (24:480d) +_Route14BattleText1:: text "You need to use" line "TMs to teach good" cont "moves to #MON!" done -_Route14EndBattleText1:: ; 9083f (24:483f) +_Route14EndBattleText1:: text "Not" line "good enough!" prompt -_Route14AfterBattleText1:: ; 90851 (24:4851) -IF DEF(_YELLOW) - text "You have some HMs," -ELSE +_Route14AfterBattleText1:: text "You have some HMs" -ENDC line "right? #MON" cont "can't ever forget" cont "those moves." done -_Route14BattleText2:: ; 9088e (24:488e) +_Route14BattleText2:: text "My bird #MON" line "should be ready" cont "for battle." done -_Route14EndBattleText2:: ; 908b8 (24:48b8) +_Route14EndBattleText2:: text "Not" line "ready yet!" prompt -_Route14AfterBattleText2:: ; 908c8 (24:48c8) +_Route14AfterBattleText2:: text "They need to learn" line "better moves." done -_Route14BattleText3:: ; 908ea (24:48ea) +_Route14BattleText3:: text "TMs are on sale" line "in CELADON!" cont "But, only a few" cont "people have HMs!" done -_Route14EndBattleText3:: ; 90928 (24:4928) +_Route14EndBattleText3:: text "Aww," line "bummer!" prompt -_Route14AfterBattleText3:: ; 90936 (24:4936) +_Route14AfterBattleText3:: text "Teach #MON" line "moves of the same" cont "element type for" cont "more power." done -_Route14BattleText4:: ; 90971 (24:4971) +_Route14BattleText4:: text "Have you taught" line "your bird #MON" cont "how to FLY?" done -_Route14EndBattleText4:: ; 9099d (24:499d) +_Route14EndBattleText4:: text "Shot" line "down in flames!" prompt -_Route14AfterBattleText4:: ; 909b3 (24:49b3) +_Route14AfterBattleText4:: text "Bird #MON are" line "my true love!" done -_Route14BattleText5:: ; 909d0 (24:49d0) +_Route14BattleText5:: text "Have you heard of" line "the legendary" cont "#MON?" done -_Route14EndBattleText5:: ; 909f7 (24:49f7) +_Route14EndBattleText5:: text "Why?" line "Why'd I lose?" prompt -_Route14AfterBattleText5:: ; 90a0a (24:4a0a) +_Route14AfterBattleText5:: text "The 3 legendary" line "#MON are all" cont "birds of prey." done -_Route14BattleText6:: ; 90a37 (24:4a37) +_Route14BattleText6:: text "I'm not into it," line "but OK! Let's go!" done -_Route14EndBattleText6:: ; 90a59 (24:4a59) +_Route14EndBattleText6:: text "I" line "knew it!" prompt -_Route14AfterBattleText6:: ; 90a65 (24:4a65) +_Route14AfterBattleText6:: text "Winning, losing," line "it doesn't matter" cont "in the long run!" done -_Route14BattleText7:: ; 90a99 (24:4a99) +_Route14BattleText7:: text "C'mon, c'mon." line "Let's go, let's" cont "go, let's go!" done -_Route14EndBattleText7:: ; 90ac1 (24:4ac1) +_Route14EndBattleText7:: text "Arrg!" line "Lost! Get lost!" prompt -_Route14AfterBattleText7:: ; 90ad8 (24:4ad8) +_Route14AfterBattleText7:: text "What, what, what?" line "What do you want?" done -_Route14BattleText8:: ; 90afd (24:4afd) +_Route14BattleText8:: text "Perfect! I need to" line "burn some time!" done -_Route14EndBattleText8:: ; 90b21 (24:4b21) +_Route14EndBattleText8:: text "What?" line "You!?" prompt -_Route14AfterBattleText8:: ; 90b2e (24:4b2e) +_Route14AfterBattleText8:: text "Raising #MON" line "is a drag, man." done -_Route14BattleText9:: ; 90b4c (24:4b4c) +_Route14BattleText9:: text "We ride out here" line "because there's" cont "more room!" done -_Route14EndBattleText9:: ; 90b78 (24:4b78) +_Route14EndBattleText9:: text "Wipe out!" prompt -_Route14AfterBattleText9:: ; 90b83 (24:4b83) +_Route14AfterBattleText9:: text "It's cool you" line "made your #MON" cont "so strong!" @@ -154,25 +150,24 @@ _Route14AfterBattleText9:: ; 90b83 (24:4b83) line "And you know it!" done -_Route14BattleText10:: ; 90bcc (24:4bcc) +_Route14BattleText10:: text "#MON fight?" line "Cool! Rumble!" done -_Route14EndBattleText10:: ; 90be7 (24:4be7) +_Route14EndBattleText10:: text "Blown" line "away!" prompt -_Route14AfterBattleText10:: ; 90bf4 (24:4bf4) +_Route14AfterBattleText10:: text "You know who'd" line "win, you and me" cont "one on one!" done -_Route14Text11:: ; 90c1f (24:4c1f) +_Route14Text11:: text "ROUTE 14" line "West to FUCHSIA" cont "CITY" done - diff --git a/text/maps/route_15.asm b/text/maps/route_15.asm index d217c9a4..a23b8500 100644 --- a/text/maps/route_15.asm +++ b/text/maps/route_15.asm @@ -1,15 +1,15 @@ -_Route15BattleText1:: ; 90c3e (24:4c3e) +_Route15BattleText1:: text "Let me try out the" line "#MON I just" cont "got in a trade!" done -_Route15EndBattleText1:: ; 90c6e (24:4c6e) +_Route15EndBattleText1:: text "Not" line "good enough!" prompt -_Route15AfterBattleText1:: ; 90c80 (24:4c80) +_Route15AfterBattleText1:: text "You can't change" line "the nickname of" cont "any #MON you" @@ -19,154 +19,153 @@ _Route15AfterBattleText1:: ; 90c80 (24:4c80) line "Trainer can." done -_Route15BattleText2:: ; 90cdd (24:4cdd) +_Route15BattleText2:: text "You look gentle," line "so I think I can" cont "beat you!" done -_Route15EndBattleText2:: ; 90d0a (24:4d0a) +_Route15EndBattleText2:: text "No," line "wrong!" prompt -_Route15AfterBattleText2:: ; 90d16 (24:4d16) +_Route15AfterBattleText2:: text "I'm afraid of" line "BIKERs, they look" cont "so ugly and mean!" done -_Route15BattleText3:: ; 90d48 (24:4d48) +_Route15BattleText3:: text "When I whistle, I" line "can summon bird" cont "#MON!" done -_Route15EndBattleText3:: ; 90d71 (24:4d71) +_Route15EndBattleText3:: text "Ow!" line "That's tragic!" prompt -_Route15AfterBattleText3:: ; 90d84 (24:4d84) +_Route15AfterBattleText3:: text "Maybe I'm not cut" line "out for battles." done -_Route15BattleText4:: ; 90da7 (24:4da7) +_Route15BattleText4:: text "Hmm? My birds are" line "shivering! You're" cont "good, aren't you?" done -_Route15EndBattleText4:: ; 90ddc (24:4ddc) +_Route15EndBattleText4:: text "Just" line "as I thought!" prompt -_Route15AfterBattleText4:: ; 90df0 (24:4df0) +_Route15AfterBattleText4:: text "Did you know moves" line "like EARTHQUAKE" cont "don't have any" cont "effect on birds?" done -_Route15BattleText5:: ; 90e33 (24:4e33) +_Route15BattleText5:: text "Oh, you're a" line "little cutie!" done -_Route15EndBattleText5:: ; 90e4e (24:4e4e) +_Route15EndBattleText5:: text "You looked" line "so cute too!" prompt -_Route15AfterBattleText5:: ; 90e67 (24:4e67) +_Route15AfterBattleText5:: text "I forgive you!" line "I can take it!" done -_Route15BattleText6:: ; 90e86 (24:4e86) +_Route15BattleText6:: text "I raise #MON" line "because I live" cont "alone!" done -_Route15EndBattleText6:: ; 90eaa (24:4eaa) +_Route15EndBattleText6:: text "I didn't" line "ask for this!" prompt -_Route15AfterBattleText6:: ; 90ec1 (24:4ec1) +_Route15AfterBattleText6:: text "I just like going" line "home to be with" cont "my #MON!" done -_Route15BattleText7:: ; 90eed (24:4eed) +_Route15BattleText7:: text "Hey kid! C'mon!" line "I just got these!" done -_Route15EndBattleText7:: ; 90f0f (24:4f0f) +_Route15EndBattleText7:: text "Why" line "not?" prompt -_Route15AfterBattleText7:: ; 90f19 (24:4f19) +_Route15AfterBattleText7:: text "You only live" line "once, so I live" cont "as an outlaw!" cont "TEAM ROCKET RULES!" done -_Route15BattleText8:: ; 90f59 (24:4f59) +_Route15BattleText8:: text "Fork over all your" line "cash when you" cont "lose to me, kid!" done -_Route15EndBattleText8:: ; 90f8c (24:4f8c) +_Route15EndBattleText8:: text "That" line "can't be true!" prompt -_Route15AfterBattleText8:: ; 90fa0 (24:4fa0) +_Route15AfterBattleText8:: text "I was just joking" line "about the money!" done -_Route15BattleText9:: ; 90fc4 (24:4fc4) +_Route15BattleText9:: text "What's cool?" line "Trading #MON!" done -_Route15EndBattleText9:: ; 90fdf (24:4fdf) +_Route15EndBattleText9:: text "I" line "said trade!" prompt -_Route15AfterBattleText9:: ; 90fee (24:4fee) +_Route15AfterBattleText9:: text "I trade #MON" line "with my friends!" done -_Route15BattleText10:: ; 9100d (24:500d) +_Route15BattleText10:: text "Want to play with" line "my #MON?" done -_Route15EndBattleText10:: ; 91029 (24:5029) +_Route15EndBattleText10:: text "I was" line "too impatient!" prompt -_Route15AfterBattleText10:: ; 9103f (24:503f) +_Route15AfterBattleText10:: text "I'll go train with" line "weaker people.@@" -_Route15Text12:: ; 91062 (24:5062) +_Route15Text12:: text "ROUTE 15" line "West to FUCHSIA" cont "CITY" done - diff --git a/text/maps/route_15_gate.asm b/text/maps/route_15_gate.asm index c1bbd8c9..0a526142 100644 --- a/text/maps/route_15_gate.asm +++ b/text/maps/route_15_gate.asm @@ -1,8 +1,7 @@ -_Route15GateText1:: ; 8cb73 (23:4b73) +_Route15GateText1:: text "Are you working" line "on a #DEX?" para "PROF.OAK's AIDE" line "came by here." done - diff --git a/text/maps/route_15_gate_upstairs.asm b/text/maps/route_15_gate_upstairs.asm index 7207ecdf..ade4a358 100644 --- a/text/maps/route_15_gate_upstairs.asm +++ b/text/maps/route_15_gate_upstairs.asm @@ -1,4 +1,4 @@ -_Route15GateUpstairsText_4968c:: ; 8cbac (23:4bac) +_Route15GateUpstairsText_4968c:: text "EXP.ALL gives" line "EXP points to all" cont "the #MON with" @@ -15,11 +15,10 @@ _Route15GateUpstairsText_4968c:: ; 8cbac (23:4bac) cont "store it via PC." done -_Route15GateUpstairsText_49698:: ; 8cc65 (23:4c65) +_Route15GateUpstairsText_49698:: text "Looked into the" line "binoculars." para "It looks like a" line "small island!" done - diff --git a/text/maps/route_16.asm b/text/maps/route_16.asm index ec77ec6f..45265829 100644 --- a/text/maps/route_16.asm +++ b/text/maps/route_16.asm @@ -1,125 +1,120 @@ -_Route16BattleText1:: ; 91081 (24:5081) +_Route16BattleText1:: text "What do you want?" done -_Route16EndBattleText1:: ; 91094 (24:5094) +_Route16EndBattleText1:: text "Don't you" line "dare laugh!" prompt -_Route16AfterBattleText1:: ; 910aa (24:50aa) +_Route16AfterBattleText1:: text "We like just" line "hanging here," cont "what's it to you?" done -_Route16BattleText2:: ; 910d7 (24:50d7) +_Route16BattleText2:: text "Nice BIKE!" line "Hand it over!" done -_Route16EndBattleText2:: ; 910f1 (24:50f1) -IF DEF(_YELLOW) - text "Knock-" -ELSE +_Route16EndBattleText2:: text "Knock" -ENDC line "out!" prompt -_Route16AfterBattleText2:: ; 910fd (24:50fd) +_Route16AfterBattleText2:: text "Forget it, who" line "needs your BIKE!" done -_Route16BattleText3:: ; 9111e (24:511e) +_Route16BattleText3:: text "Come out and play," line "little mouse!" done -_Route16EndBattleText3:: ; 91140 (24:5140) +_Route16EndBattleText3:: text "You" line "little rat!" prompt -_Route16AfterBattleText3:: ; 91151 (24:5151) +_Route16AfterBattleText3:: text "I hate losing!" line "Get away from me!" done -_Route16BattleText4:: ; 91173 (24:5173) +_Route16BattleText4:: text "Hey, you just" line "bumped me!" done -_Route16EndBattleText4:: ; 9118d (24:518d) +_Route16EndBattleText4:: text "Kaboom!" prompt -_Route16AfterBattleText4:: ; 91196 (24:5196) +_Route16AfterBattleText4:: text "You can also get" line "to FUCHSIA from" cont "VERMILION using a" cont "coastal road." done -_Route16BattleText5:: ; 911d8 (24:51d8) +_Route16BattleText5:: text "I'm feeling" line "hungry and mean!" done -_Route16EndBattleText5:: ; 911f5 (24:51f5) +_Route16EndBattleText5:: text "Bad," line "bad, bad!" prompt -_Route16AfterBattleText5:: ; 91205 (24:5205) +_Route16AfterBattleText5:: text "I like my #MON" line "ferocious! They" cont "tear up enemies!" done -_Route16BattleText6:: ; 91236 (24:5236) +_Route16BattleText6:: text "Sure, I'll go!" done -_Route16EndBattleText6:: ; 91245 (24:5245) +_Route16EndBattleText6:: text "Don't make" line "me mad!" prompt -_Route16AfterBattleText6:: ; 91258 (24:5258) +_Route16AfterBattleText6:: text "I like harassing" line "people with my" cont "vicious #MON!" done -_Route16Text7:: ; 91287 (24:5287) +_Route16Text7:: text "A sleeping #MON" line "blocks the way!" done -_Route16Text10:: ; 912a8 (24:52a8) +_Route16Text10:: text "SNORLAX woke up!" para "It attacked in a" line "grumpy rage!" done -_Route16Text11:: ; 912d8 (24:52d8) +_Route16Text11:: text "With a big yawn," line "SNORLAX returned" cont "to the mountains!" done -_Route16Text8:: ; 9130d (24:530d) +_Route16Text8:: text "Enjoy the slope!" line "CYCLING ROAD" done -_Route16Text9:: ; 9132c (24:532c) +_Route16Text9:: text "ROUTE 16" line "CELADON CITY -" cont "FUCHSIA CITY" done - diff --git a/text/maps/route_16_gate.asm b/text/maps/route_16_gate.asm index 2d3d5c62..f548977f 100644 --- a/text/maps/route_16_gate.asm +++ b/text/maps/route_16_gate.asm @@ -1,23 +1,22 @@ -_Route16GateText_49777:: ; 8cca0 (23:4ca0) +_Route16GateText_49777:: text "No pedestrians" line "are allowed on" cont "CYCLING ROAD!" done -_Route16GateText_4977c:: ; 8cccd (23:4ccd) +_Route16GateText_4977c:: text "CYCLING ROAD is a" line "downhill course" cont "by the sea. It's" cont "a great ride." done -_Route16GateText_49781:: ; 8cd0e (23:4d0e) +_Route16GateText_49781:: text "Excuse me! Wait" line "up please!" done -_Route16GateText2:: ; 8cd2a (23:4d2a) +_Route16GateText2:: text "How'd you get in?" line "Good effort!" done - diff --git a/text/maps/route_16_gate_upstairs.asm b/text/maps/route_16_gate_upstairs.asm index 26767654..d76b70ca 100644 --- a/text/maps/route_16_gate_upstairs.asm +++ b/text/maps/route_16_gate_upstairs.asm @@ -1,15 +1,15 @@ -_Route16GateUpstairsText_49820:: ; 8cd49 (23:4d49) +_Route16GateUpstairsText_49820:: text "I'm going for a" line "ride with my girl" cont "friend!" done -_Route16GateUpstairsText_4982f:: ; 8cd73 (23:4d73) +_Route16GateUpstairsText_4982f:: text "We're going" line "riding together!" done -_Route16GateUpstairsText_4983b:: ; 8cd90 (23:4d90) +_Route16GateUpstairsText_4983b:: text "Looked into the" line "binoculars." @@ -17,11 +17,10 @@ _Route16GateUpstairsText_4983b:: ; 8cd90 (23:4d90) line "STORE!" done -_Route16GateUpstairsText_49847:: ; 8cdc6 (23:4dc6) +_Route16GateUpstairsText_49847:: text "Looked into the" line "binoculars." para "There's a long" line "path over water!" done - diff --git a/text/maps/route_16_house.asm b/text/maps/route_16_house.asm index c3099049..534cee08 100644 --- a/text/maps/route_16_house.asm +++ b/text/maps/route_16_house.asm @@ -1,4 +1,4 @@ -_Route16HouseText3:: ; 8ce02 (23:4e02) +_Route16HouseText3:: text "Oh, you found my" line "secret retreat!" @@ -8,11 +8,11 @@ _Route16HouseText3:: ; 8ce02 (23:4e02) cont "to you with this!" prompt -_ReceivedHM02Text:: ; 8ce66 (23:4e66) +_ReceivedHM02Text:: text $52, " received" line "HM02!@@" -_HM02ExplanationText:: ; 8ce79 (23:4e79) +_HM02ExplanationText:: text "HM02 is FLY." line "It will take you" cont "back to any town." @@ -21,12 +21,11 @@ _HM02ExplanationText:: ; 8ce79 (23:4e79) line "use!" done -_HM02NoRoomText:: ; 8cebe (23:4ebe) +_HM02NoRoomText:: text "You don't have any" line "room for this." done -_Route16HouseText_1e652:: ; 8cee0 (23:4ee0) +_Route16HouseText_1e652:: text "FEAROW: Kyueen!" done - diff --git a/text/maps/route_17.asm b/text/maps/route_17.asm index b053b473..a0affd90 100644 --- a/text/maps/route_17.asm +++ b/text/maps/route_17.asm @@ -1,164 +1,160 @@ -_Route17BattleText1:: ; 91352 (24:5352) +_Route17BattleText1:: text "There's no money" line "in fighting kids!" done -_Route17EndBattleText1:: ; 91375 (24:5375) +_Route17EndBattleText1:: text "Burned" line "out!" prompt -_Route17AfterBattleText1:: ; 91382 (24:5382) +_Route17AfterBattleText1:: text "Good stuff is" line "lying around on" cont "CYCLING ROAD!" done -_Route17BattleText2:: ; 913af (24:53af) +_Route17BattleText2:: text "What do you want," line "kiddo?" done -_Route17EndBattleText2:: ; 913c9 (24:53c9) +_Route17EndBattleText2:: text "Whoo!" prompt -_Route17AfterBattleText2:: ; 913d0 (24:53d0) +_Route17AfterBattleText2:: text "I could belly-" line "bump you outta" cont "here!" done -_Route17BattleText3:: ; 913f5 (24:53f5) +_Route17BattleText3:: text "You heading to" line "FUCHSIA?" done -_Route17EndBattleText3:: ; 9140e (24:540e) +_Route17EndBattleText3:: text "Crash and" line "burn!" prompt -_Route17AfterBattleText3:: ; 9141f (24:541f) +_Route17AfterBattleText3:: text "I love racing" line "downhill!" done -_Route17BattleText4:: ; 91438 (24:5438) +_Route17BattleText4:: text "We're BIKERs!" line "Highway stars!" done -_Route17EndBattleText4:: ; 91455 (24:5455) +_Route17EndBattleText4:: text "Smoked!" prompt -_Route17AfterBattleText4:: ; 9145e (24:545e) +_Route17AfterBattleText4:: text "Are you looking" line "for adventure?" done -_Route17BattleText5:: ; 9147e (24:547e) +_Route17BattleText5:: text "Let VOLTORB" line "electrify you!" done -_Route17EndBattleText5:: ; 9149a (24:549a) +_Route17EndBattleText5:: text "Grounded" line "out!" prompt -_Route17AfterBattleText5:: ; 914a9 (24:54a9) +_Route17AfterBattleText5:: text "I got my VOLTORB" line "at the abandoned" cont "POWER PLANT." done -_Route17BattleText6:: ; 914d9 (24:54d9) +_Route17BattleText6:: text "My #MON won't" line "evolve! Why?" done -_Route17EndBattleText6:: ; 914f4 (24:54f4) +_Route17EndBattleText6:: text "Why," line "you!" prompt -_Route17AfterBattleText6:: ; 914ff (24:54ff) +_Route17AfterBattleText6:: text "Maybe some #MON" line "need element" cont "STONEs to evolve." done -_Route17BattleText7:: ; 9152f (24:552f) +_Route17BattleText7:: text "I need a little" line "exercise!" done -_Route17EndBattleText7:: ; 9154a (24:554a) +_Route17EndBattleText7:: text "Whew!" line "Good workout!" prompt -_Route17AfterBattleText7:: ; 9155f (24:555f) +_Route17AfterBattleText7:: text "I'm sure I lost" line "weight there!" done -_Route17BattleText8:: ; 9157d (24:557d) +_Route17BattleText8:: text "Be a rebel!" done -_Route17EndBattleText8:: ; 9158a (24:558a) +_Route17EndBattleText8:: text "Aaaargh!" prompt -_Route17AfterBattleText8:: ; 91594 (24:5594) +_Route17AfterBattleText8:: text "Be ready to fight" line "for your beliefs!" done -_Route17BattleText9:: ; 915b9 (24:55b9) +_Route17BattleText9:: text "Nice BIKE!" line "How's it handle?" done -_Route17EndBattleText9:: ; 915d5 (24:55d5) +_Route17EndBattleText9:: text "Shoot!" prompt -_Route17AfterBattleText9:: ; 915dd (24:55dd) +_Route17AfterBattleText9:: text "The slope makes" line "it hard to steer!" done -_Route17BattleText10:: ; 91600 (24:5600) -IF DEF(_YELLOW) - text "Get lost, kid!" -ELSE +_Route17BattleText10:: text "Get lost kid!" -ENDC line "I'm bushed!" done -_Route17EndBattleText10:: ; 9161a (24:561a) +_Route17EndBattleText10:: text "Are you" line "satisfied?" prompt -_Route17AfterBattleText10:: ; 9162e (24:562e) +_Route17AfterBattleText10:: text "I need to catch" line "a few Zs!" done -_Route17Text11:: ; 91649 (24:5649) +_Route17Text11:: text "It's a notice!" para "Watch out for" line "discarded items!" done -_Route17Text12:: ; 91677 (24:5677) +_Route17Text12:: text "TRAINER TIPS" para "All #MON are" @@ -170,7 +166,7 @@ _Route17Text12:: ; 91677 (24:5677) cont "different rates." done -_Route17Text13:: ; 916d8 (24:56d8) +_Route17Text13:: text "TRAINER TIPS" para "Press the A or B" @@ -179,13 +175,13 @@ _Route17Text13:: ; 916d8 (24:56d8) cont "slope." done -_Route17Text14:: ; 91721 (24:5721) +_Route17Text14:: text "ROUTE 17" line "CELADON CITY -" cont "FUCHSIA CITY" done -_Route17Text15:: ; 91747 (24:5747) +_Route17Text15:: text "It's a notice!" para "Don't throw the" @@ -193,8 +189,7 @@ _Route17Text15:: ; 91747 (24:5747) cont "BALLs instead!" done -_Route17Text16:: ; 91782 (24:5782) +_Route17Text16:: text "CYCLING ROAD" line "Slope ends here!" done - diff --git a/text/maps/route_18.asm b/text/maps/route_18.asm index f8dc798f..d09caf82 100644 --- a/text/maps/route_18.asm +++ b/text/maps/route_18.asm @@ -1,59 +1,58 @@ -_Route18BattleText1:: ; 917a1 (24:57a1) +_Route18BattleText1:: text "I always check" line "every grassy area" cont "for new #MON." done -_Route18EndBattleText1:: ; 917d1 (24:57d1) +_Route18EndBattleText1:: text "Tch!" prompt -_Route18AfterBattleText1:: ; 917d7 (24:57d7) +_Route18AfterBattleText1:: text "I wish I had a" line "BIKE!" done -_Route18BattleText2:: ; 917ed (24:57ed) +_Route18BattleText2:: text "Kurukkoo!" line "How do you like" cont "my bird call?" done -_Route18EndBattleText2:: ; 91816 (24:5816) +_Route18EndBattleText2:: text "I" line "had to bug you!" prompt -_Route18AfterBattleText2:: ; 91829 (24:5829) +_Route18AfterBattleText2:: text "I also collect sea" line "#MON on" cont "weekends!" done -_Route18BattleText3:: ; 9184f (24:584f) +_Route18BattleText3:: text "This is my turf!" line "Get out of here!" done -_Route18EndBattleText3:: ; 91872 (24:5872) +_Route18EndBattleText3:: text "Darn!" prompt -_Route18AfterBattleText3:: ; 91879 (24:5879) +_Route18AfterBattleText3:: text "This is my fave" line "#MON hunting" cont "area!" done -_Route18Text4:: ; 9189d (24:589d) +_Route18Text4:: text "ROUTE 18" line "CELADON CITY -" cont "FUCHSIA CITY" done -_Route18Text5:: ; 918c3 (24:58c3) +_Route18Text5:: text "CYCLING ROAD" line "No pedestrians" cont "permitted!" done - diff --git a/text/maps/route_18_gate.asm b/text/maps/route_18_gate.asm index 0298465d..f2f51039 100644 --- a/text/maps/route_18_gate.asm +++ b/text/maps/route_18_gate.asm @@ -1,15 +1,14 @@ -_Route18GateText_49928:: ; 8cef1 (23:4ef1) +_Route18GateText_49928:: text "You need a BICYCLE" line "for CYCLING ROAD!" done -_Route18GateText_4992d:: ; 8cf17 (23:4f17) +_Route18GateText_4992d:: text "CYCLING ROAD is" line "all uphill from" cont "here." done -_Route18GateText_49932:: ; 8cf3e (23:4f3e) +_Route18GateText_49932:: text "Excuse me!" done - diff --git a/text/maps/route_18_gate_upstairs.asm b/text/maps/route_18_gate_upstairs.asm index 59b92e6a..0fd2de09 100644 --- a/text/maps/route_18_gate_upstairs.asm +++ b/text/maps/route_18_gate_upstairs.asm @@ -1,4 +1,4 @@ -_Route18GateUpstairsText_49993:: ; 8cf4a (23:4f4a) +_Route18GateUpstairsText_49993:: text "Looked into the" line "binoculars." @@ -6,12 +6,10 @@ _Route18GateUpstairsText_49993:: ; 8cf4a (23:4f4a) line "the west!" done -_Route18GateUpstairsText_4999f:: ; 8cf83 (23:4f83) +_Route18GateUpstairsText_4999f:: text "Looked into the" line "binoculars." para "There are people" line "swimming!" done - - diff --git a/text/maps/route_19.asm b/text/maps/route_19.asm index 9789237c..244e31d0 100644 --- a/text/maps/route_19.asm +++ b/text/maps/route_19.asm @@ -1,158 +1,157 @@ -_Route19BattleText1:: ; 918eb (24:58eb) +_Route19BattleText1:: text "Have to warm up" line "before my swim!" done -_Route19EndBattleText1:: ; 9190c (24:590c) +_Route19EndBattleText1:: text "All" line "warmed up!" prompt -_Route19AfterBattleText1:: ; 9191c (24:591c) +_Route19AfterBattleText1:: text "Thanks, kid! I'm" line "ready for a swim!" done -_Route19BattleText2:: ; 9193f (24:593f) +_Route19BattleText2:: text "Wait! You'll have" line "a heart attack!" done -_Route19EndBattleText2:: ; 91961 (24:5961) +_Route19EndBattleText2:: text "Ooh!" line "That's chilly!" prompt -_Route19AfterBattleText2:: ; 91975 (24:5975) +_Route19AfterBattleText2:: text "Watch out for" line "TENTACOOL!" done -_Route19BattleText3:: ; 9198f (24:598f) +_Route19BattleText3:: text "I love swimming!" line "What about you?" done -_Route19EndBattleText3:: ; 919b1 (24:59b1) +_Route19EndBattleText3:: text "Belly" line "flop!" prompt -_Route19AfterBattleText3:: ; 919be (24:59be) +_Route19AfterBattleText3:: text "I can beat #MON" line "at swimming!" done -_Route19BattleText4:: ; 919dc (24:59dc) +_Route19BattleText4:: text "What's beyond the" line "horizon?" done -_Route19EndBattleText4:: ; 919f7 (24:59f7) +_Route19EndBattleText4:: text "Glub!" prompt -_Route19AfterBattleText4:: ; 919fe (24:59fe) +_Route19AfterBattleText4:: text "I see a couple of" line "islands!" done -_Route19BattleText5:: ; 91a1a (24:5a1a) +_Route19BattleText5:: text "I tried diving" line "for #MON, but" cont "it was a no go!" done -_Route19EndBattleText5:: ; 91a48 (24:5a48) +_Route19EndBattleText5:: text "Help!" prompt -_Route19AfterBattleText5:: ; 91a4f (24:5a4f) +_Route19AfterBattleText5:: text "You have to fish" line "for sea #MON!" done -_Route19BattleText6:: ; 91a6f (24:5a6f) +_Route19BattleText6:: text "I look at the" line "sea to forget!" done -_Route19EndBattleText6:: ; 91a8d (24:5a8d) +_Route19EndBattleText6:: text "Ooh!" line "Traumatic!" prompt -_Route19AfterBattleText6:: ; 91a9e (24:5a9e) +_Route19AfterBattleText6:: text "I'm looking at the" line "sea to forget!" done -_Route19BattleText7:: ; 91ac0 (24:5ac0) +_Route19BattleText7:: text "Oh, I just love" line "your ride! Can I" cont "have it if I win?" done -_Route19EndBattleText7:: ; 91af4 (24:5af4) +_Route19EndBattleText7:: text "Oh!" line "I lost!" prompt -_Route19AfterBattleText7:: ; 91b01 (24:5b01) +_Route19AfterBattleText7:: text "It's still a long" line "way to go to" cont "SEAFOAM ISLANDS." done -_Route19BattleText8:: ; 91b31 (24:5b31) +_Route19BattleText8:: text "Swimming's great!" line "Sunburns aren't!" done -_Route19EndBattleText8:: ; 91b53 (24:5b53) +_Route19EndBattleText8:: text "Shocker!" prompt -_Route19AfterBattleText8:: ; 91b5d (24:5b5d) +_Route19AfterBattleText8:: text "My boy friend" line "wanted to swim to" cont "SEAFOAM ISLANDS." done -_Route19BattleText9:: ; 91b8f (24:5b8f) +_Route19BattleText9:: text "These waters are" line "treacherous!" done -_Route19EndBattleText9:: ; 91bae (24:5bae) +_Route19EndBattleText9:: text "Ooh!" line "Dangerous!" prompt -_Route19AfterBattleText9:: ; 91bbf (24:5bbf) +_Route19AfterBattleText9:: text "I got a cramp!" line "Glub, glub..." done -_Route19BattleText10:: ; 91bdd (24:5bdd) +_Route19BattleText10:: text "I swam here, but" line "I'm tired." done -_Route19EndBattleText10:: ; 91bf9 (24:5bf9) +_Route19EndBattleText10:: text "I'm" line "exhausted..." prompt -_Route19AfterBattleText10:: ; 91c0a (24:5c0a) +_Route19AfterBattleText10:: text "LAPRAS is so big," line "it must keep you" cont "dry on water." done -_Route19Text11:: ; 91c3c (24:5c3c) +_Route19Text11:: text "SEA ROUTE 19" line "FUCHSIA CITY -" cont "SEAFOAM ISLANDS" done - diff --git a/text/maps/route_2.asm b/text/maps/route_2.asm index 51c19737..dd7becc0 100644 --- a/text/maps/route_2.asm +++ b/text/maps/route_2.asm @@ -1,10 +1,9 @@ -_Route2Text3:: ; 8d745 (23:5745) +_Route2Text3:: text "ROUTE 2" line "VIRIDIAN CITY -" cont "PEWTER CITY" done -_Route2Text4:: ; 8d76a (23:576a) +_Route2Text4:: text "DIGLETT's CAVE" done - diff --git a/text/maps/route_20.asm b/text/maps/route_20.asm index 101ef92c..1ccf0b6c 100644 --- a/text/maps/route_20.asm +++ b/text/maps/route_20.asm @@ -1,157 +1,156 @@ -_Route20BattleText1:: ; 91c69 (24:5c69) +_Route20BattleText1:: text "The water is" line "shallow here." done -_Route20EndBattleText1:: ; 91c85 (24:5c85) +_Route20EndBattleText1:: text "Splash!" prompt -_Route20AfterBattleText1:: ; 91c8e (24:5c8e) +_Route20AfterBattleText1:: text "I wish I could" line "ride my #MON." done -_Route20BattleText2:: ; 91cac (24:5cac) +_Route20BattleText2:: text "SEAFOAM is a" line "quiet getaway!" done -_Route20EndBattleText2:: ; 91cc9 (24:5cc9) +_Route20EndBattleText2:: text "Quit it!" prompt -_Route20AfterBattleText2:: ; 91cd3 (24:5cd3) +_Route20AfterBattleText2:: text "There's a huge" line "cavern underneath" cont "this island." done -_Route20BattleText3:: ; 91d01 (24:5d01) +_Route20BattleText3:: text "I love floating" line "with the fishes!" done -_Route20EndBattleText3:: ; 91d23 (24:5d23) +_Route20EndBattleText3:: text "Yowch!" prompt -_Route20AfterBattleText3:: ; 91d2b (24:5d2b) +_Route20AfterBattleText3:: text "Want to float" line "with me?" done -_Route20BattleText4:: ; 91d43 (24:5d43) +_Route20BattleText4:: text "Are you on" line "vacation too?" done -_Route20EndBattleText4:: ; 91d5d (24:5d5d) +_Route20EndBattleText4:: text "No" line "mercy at all!" prompt -_Route20AfterBattleText4:: ; 91d6f (24:5d6f) +_Route20AfterBattleText4:: text "SEAFOAM used to" line "be one island!" done -_Route20BattleText5:: ; 91d8f (24:5d8f) +_Route20BattleText5:: text "Check out my buff" line "physique!" done -_Route20EndBattleText5:: ; 91dac (24:5dac) +_Route20EndBattleText5:: text "Wimpy!" prompt -_Route20AfterBattleText5:: ; 91db4 (24:5db4) +_Route20AfterBattleText5:: text "I should've been" line "buffing up my" cont "#MON, not me!" done -_Route20BattleText6:: ; 91de1 (24:5de1) +_Route20BattleText6:: text "Why are you" line "riding a #MON?" cont "Can't you swim?" done -_Route20EndBattleText6:: ; 91e0c (24:5e0c) +_Route20EndBattleText6:: text "Ouch!" line "Torpedoed!" prompt -_Route20AfterBattleText6:: ; 91e1e (24:5e1e) +_Route20AfterBattleText6:: text "Riding a #MON" line "sure looks fun!" done -_Route20BattleText7:: ; 91e3d (24:5e3d) +_Route20BattleText7:: text "I rode my bird" line "#MON here!" done -_Route20EndBattleText7:: ; 91e58 (24:5e58) +_Route20EndBattleText7:: text "Oh" line "no!" prompt -_Route20AfterBattleText7:: ; 91e60 (24:5e60) +_Route20AfterBattleText7:: text "My birds can't" line "FLY me back!" done -_Route20BattleText8:: ; 91e7c (24:5e7c) +_Route20BattleText8:: text "My boy friend gave" line "me big pearls!" done -_Route20EndBattleText8:: ; 91e9f (24:5e9f) +_Route20EndBattleText8:: text "Don't" line "touch my pearls!" prompt -_Route20AfterBattleText8:: ; 91eb6 (24:5eb6) +_Route20AfterBattleText8:: text "Will my pearls" line "grow bigger" cont "inside CLOYSTER?" done -_Route20BattleText9:: ; 91ee3 (24:5ee3) +_Route20BattleText9:: text "I swam here from" line "CINNABAR ISLAND!" done -_Route20EndBattleText9:: ; 91f06 (24:5f06) +_Route20EndBattleText9:: text "I'm" line "so disappointed!" prompt -_Route20AfterBattleText9:: ; 91f1b (24:5f1b) +_Route20AfterBattleText9:: text "#MON have" line "taken over an" cont "abandoned mansion" cont "on CINNABAR!" done -_Route20BattleText10:: ; 91f53 (24:5f53) +_Route20BattleText10:: text "CINNABAR, in the" line "west, has a LAB" cont "for #MON." done -_Route20EndBattleText10:: ; 91f7f (24:5f7f) +_Route20EndBattleText10:: text "Wait!" prompt -_Route20AfterBattleText10:: ; 91f86 (24:5f86) +_Route20AfterBattleText10:: text "CINNABAR is a " line "volcanic island!" done -_Route20Text12:: ; 91fa7 (24:5fa7) -_Route20Text11:: ; 91fa7 (24:5fa7) +_Route20Text12:: +_Route20Text11:: text "SEAFOAM ISLANDS" done - diff --git a/text/maps/route_21.asm b/text/maps/route_21.asm index 032e7c28..3451953f 100644 --- a/text/maps/route_21.asm +++ b/text/maps/route_21.asm @@ -1,138 +1,137 @@ -_Route21BattleText1:: ; 91fb8 (24:5fb8) +_Route21BattleText1:: text "You want to know" line "if the fish are" cont "biting?" done -_Route21EndBattleText1:: ; 91fe2 (24:5fe2) +_Route21EndBattleText1:: text "Dang!" prompt -_Route21AfterBattleText1:: ; 91fe9 (24:5fe9) +_Route21AfterBattleText1:: text "I can't catch" line "anything good!" done -_Route21BattleText2:: ; 92006 (24:6006) +_Route21BattleText2:: text "I got a big haul!" line "Wanna go for it?" done -_Route21EndBattleText2:: ; 9202a (24:602a) +_Route21EndBattleText2:: text "Darn" line "MAGIKARP!" prompt -_Route21AfterBattleText2:: ; 9203a (24:603a) +_Route21AfterBattleText2:: text "I seem to only" line "catch MAGIKARP!" done -_Route21BattleText3:: ; 9205a (24:605a) +_Route21BattleText3:: text "The sea cleanses" line "my body and soul!" done -_Route21EndBattleText3:: ; 9207e (24:607e) +_Route21EndBattleText3:: text "Ayah!" prompt -_Route21AfterBattleText3:: ; 92085 (24:6085) +_Route21AfterBattleText3:: text "I like the" line "mountains too!" done -_Route21BattleText4:: ; 920a0 (24:60a0) +_Route21BattleText4:: text "What's wrong with" line "me swimming?" done -_Route21EndBattleText4:: ; 920bf (24:60bf) +_Route21EndBattleText4:: text "Cheap" line "shot!" prompt -_Route21AfterBattleText4:: ; 920cc (24:60cc) +_Route21AfterBattleText4:: text "I look like what?" line "A studded inner" cont "tube? Get lost!" done -_Route21BattleText5:: ; 920ff (24:60ff) +_Route21BattleText5:: text "I caught all my" line "#MON at sea!" done -_Route21EndBattleText5:: ; 9211d (24:611d) +_Route21EndBattleText5:: text "Diver!!" line "Down!!" prompt -_Route21AfterBattleText5:: ; 9212d (24:612d) +_Route21AfterBattleText5:: text "Where'd you catch" line "your #MON?" done -_Route21BattleText6:: ; 9214a (24:614a) +_Route21BattleText6:: text "Right now, I'm in" line "a triathlon meet!" done -_Route21EndBattleText6:: ; 9216e (24:616e) +_Route21EndBattleText6:: text "Pant..." line "pant...pant..." prompt -_Route21AfterBattleText6:: ; 92186 (24:6186) +_Route21AfterBattleText6:: text "I'm beat!" line "But, I still have" cont "the bike race and" cont "marathon left!" done -_Route21BattleText7:: ; 921c3 (24:61c3) +_Route21BattleText7:: text "Ahh! Feel the sun" line "and the wind!" done -_Route21EndBattleText7:: ; 921e4 (24:61e4) +_Route21EndBattleText7:: text "Yow!" line "I lost!" prompt -_Route21AfterBattleText7:: ; 921f2 (24:61f2) +_Route21AfterBattleText7:: text "I'm sunburnt to a" line "crisp!" done -_Route21BattleText8:: ; 9220b (24:620b) +_Route21BattleText8:: text "Hey, don't scare" line "away the fish!" done -_Route21EndBattleText8:: ; 9222b (24:622b) +_Route21EndBattleText8:: text "Sorry!" line "I didn't mean it!" prompt -_Route21AfterBattleText8:: ; 92244 (24:6244) +_Route21AfterBattleText8:: text "I was just angry" line "that I couldn't" cont "catch anything." done -_Route21BattleText9:: ; 92275 (24:6275) +_Route21BattleText9:: text "Keep me company" line "'til I get a hit!" done -_Route21EndBattleText9:: ; 92297 (24:6297) +_Route21EndBattleText9:: text "That" line "burned some time." prompt -_Route21AfterBattleText9:: ; 922af (24:62af) +_Route21AfterBattleText9:: text "Oh wait! I got a" line "bite! Yeah!" done - diff --git a/text/maps/route_22.asm b/text/maps/route_22.asm index 9935ce80..ac4141eb 100644 --- a/text/maps/route_22.asm +++ b/text/maps/route_22.asm @@ -1,4 +1,4 @@ -_Route22RivalBeforeBattleText1:: ; 922cd (24:62cd) +_Route22RivalBeforeBattleText1:: text $53, ": Hey!" line $52, "!" @@ -17,7 +17,7 @@ _Route22RivalBeforeBattleText1:: ; 922cd (24:62cd) cont "get any stronger?" done -_Route22RivalAfterBattleText1:: ; 9236f (24:636f) +_Route22RivalAfterBattleText1:: text "I heard #MON" line "LEAGUE has many" cont "tough trainers!" @@ -31,13 +31,13 @@ _Route22RivalAfterBattleText1:: ; 9236f (24:636f) cont "a move on!" done -_Route22RivalDefeatedText1:: ; 923f4 (24:63f4) +_Route22RivalDefeatedText1:: text "Awww!" line "You just lucked" cont "out!" prompt -_Route22Text_511bc:: ; 92410 (24:6410) +_Route22Text_511bc:: text $53, ": What?" line "Why do I have 2" cont "#MON?" @@ -46,7 +46,7 @@ _Route22Text_511bc:: ; 92410 (24:6410) cont "some more too!" prompt -_Route22RivalBeforeBattleText2:: ; 92450 (24:6450) +_Route22RivalBeforeBattleText2:: text $53, ": What?" line $52, "! What a" cont "surprise to see" @@ -59,21 +59,15 @@ _Route22RivalBeforeBattleText2:: ; 92450 (24:6450) line "the BADGEs too?" cont "That's cool!" -IF DEF(_YELLOW) - para "Then I'll whip" - line "you, ", $52, ", as" - cont "a warmup for" -ELSE para "Then I'll whip you" - line $52, " as a" + line "<PLAYER> as a" cont "warm up for" -ENDC cont "#MON LEAGUE!" para "Come on!" done -_Route22RivalAfterBattleText2:: ; 92506 (24:6506) +_Route22RivalAfterBattleText2:: text "That loosened me" line "up! I'm ready for" cont "#MON LEAGUE!" @@ -86,16 +80,16 @@ _Route22RivalAfterBattleText2:: ; 92506 (24:6506) cont "here. Smell ya!" done -_Route22RivalDefeatedText2:: ; 92583 (24:6583) +_Route22RivalDefeatedText2:: text "What!?" para "I was just" line "careless!" prompt -_Route22Text_511d0:: ; 925a0 (24:65a0) - text $53, ": Hahaha!" - line $52, "! That's" +_Route22Text_511d0:: + text "<RIVAL>: Hahaha!" + line "<PLAYER>! That's" cont "your best? You're" cont "nowhere near as" cont "good as me, pal!" @@ -104,8 +98,7 @@ _Route22Text_511d0:: ; 925a0 (24:65a0) line "more! You loser!" prompt -_Route22FrontGateText:: ; 92606 (24:6606) +_Route22FrontGateText:: text "#MON LEAGUE" line "Front Gate" done - diff --git a/text/maps/route_23.asm b/text/maps/route_23.asm index ab73a363..2ecb020e 100644 --- a/text/maps/route_23.asm +++ b/text/maps/route_23.asm @@ -1,4 +1,4 @@ -_VictoryRoadGuardText1:: ; 9261e (24:661e) +_VictoryRoadGuardText1:: text "You can pass here" line "only if you have" cont "the @" @@ -14,7 +14,7 @@ _VictoryRoadGuardText1:: ; 9261e (24:661e) line "it to get to" cont "#MON LEAGUE!@@" -_VictoryRoadGuardText2:: ; 92696 (24:6696) +_VictoryRoadGuardText2:: text "You can pass here" line "only if you have" cont "the @" @@ -26,14 +26,13 @@ _VictoryRoadGuardText2:: ; 92696 (24:6696) TX_RAM wcd6d text "!@@" -_VictoryRoadGuardText_513a3:: ; 926dd (24:66dd) +_VictoryRoadGuardText_513a3:: db $0 para "OK then! Please," line "go right ahead!" done -_Route23Text8:: ; 92700 (24:6700) +_Route23Text8:: text "VICTORY ROAD GATE" line "- #MON LEAGUE" done - diff --git a/text/maps/route_24_1.asm b/text/maps/route_24_1.asm index 84a6d720..25079b2f 100644 --- a/text/maps/route_24_1.asm +++ b/text/maps/route_24_1.asm @@ -1,26 +1,26 @@ -_Route24Text_51510:: ; 92721 (24:6721) +_Route24Text_51510:: text "Congratulations!" line "You beat our 5" cont "contest trainers!@@" -_Route24Text_51515:: ; 92755 (24:6755) +_Route24Text_51515:: db $0 para "You just earned a" line "fabulous prize!" prompt -_Route24Text_5151a:: ; 92779 (24:6779) +_Route24Text_5151a:: text $52, " received" line "a @" TX_RAM wcf4b text "!@@" -_Route24Text_51521:: ; 9278f (24:678f) +_Route24Text_51521:: text "You don't have" line "any room!" done -_Route24Text_51526:: ; 927a8 (24:67a8) +_Route24Text_51526:: text "By the way, would" line "you like to join" cont "TEAM ROCKET?" @@ -46,20 +46,19 @@ _Route24Text_51526:: ; 927a8 (24:67a8) cont "refuse!" done -_Route24Text_5152b:: ; 9288a (24:688a) +_Route24Text_5152b:: text "Arrgh!" line "You are good!" prompt -_Route24Text_51530:: ; 928a0 (24:68a0) +_Route24Text_51530:: text "With your ability," line "you could become" cont "a top leader in" cont "TEAM ROCKET!" done -_Route24BattleText1:: ; 928e2 (24:68e2) +_Route24BattleText1:: text "I saw your feat" line "from the grass!" done - diff --git a/text/maps/route_24_2.asm b/text/maps/route_24_2.asm index 9a7613bb..325dea13 100644 --- a/text/maps/route_24_2.asm +++ b/text/maps/route_24_2.asm @@ -1,75 +1,75 @@ -_Route24EndBattleText1:: ; 94000 (25:4000) +_Route24EndBattleText1:: text "I" line "thought not!" prompt -_Route24AfterBattleText1:: ; 94010 (25:4010) +_Route24AfterBattleText1:: text "I hid because the" line "people on the" cont "bridge scared me!" done -_Route24BattleText2:: ; 94043 (25:4043) +_Route24BattleText2:: text "OK! I'm No. 5!" line "I'll stomp you!" done -_Route24EndBattleText2:: ; 94061 (25:4061) +_Route24EndBattleText2:: text "Whoa!" line "Too much!" prompt -_Route24AfterBattleText2:: ; 94072 (25:4072) +_Route24AfterBattleText2:: text "I did my best, I" line "have no regrets!" done -_Route24BattleText3:: ; 94095 (25:4095) +_Route24BattleText3:: text "I'm No. 4!" line "Getting tired?" done -_Route24EndBattleText3:: ; 940af (25:40af) +_Route24EndBattleText3:: text "I lost" line "too!" prompt -_Route24AfterBattleText3:: ; 940bc (25:40bc) +_Route24AfterBattleText3:: text "I did my best, so" line "I've no regrets!" done -_Route24BattleText4:: ; 940df (25:40df) +_Route24BattleText4:: text "Here's No. 3!" line "I won't be easy!" done -_Route24EndBattleText4:: ; 940fd (25:40fd) +_Route24EndBattleText4:: text "Ow!" line "Stomped flat!" prompt -_Route24AfterBattleText4:: ; 94110 (25:4110) +_Route24AfterBattleText4:: text "I did my best, I" line "have no regrets!" done -_Route24BattleText5:: ; 94133 (25:4133) +_Route24BattleText5:: text "I'm second!" line "Now it's serious!" done -_Route24EndBattleText5:: ; 94150 (25:4150) +_Route24EndBattleText5:: text "How could I" line "lose?" prompt -_Route24AfterBattleText5:: ; 94163 (25:4163) +_Route24AfterBattleText5:: text "I did my best, I" line "have no regrets!" done -_Route24BattleText6:: ; 94186 (25:4186) +_Route24BattleText6:: text "This is NUGGET" line "BRIDGE! Beat us 5" cont "trainers and win" @@ -79,13 +79,12 @@ _Route24BattleText6:: ; 94186 (25:4186) line "what it takes?" done -_Route24EndBattleText6:: ; 941e8 (25:41e8) +_Route24EndBattleText6:: text "Whoo!" line "Good stuff!" prompt -_Route24AfterBattleText6:: ; 941fb (25:41fb) +_Route24AfterBattleText6:: text "I did my best, I" line "have no regrets!" done - diff --git a/text/maps/route_25.asm b/text/maps/route_25.asm index d73611f2..325ab348 100644 --- a/text/maps/route_25.asm +++ b/text/maps/route_25.asm @@ -1,192 +1,156 @@ -IF DEF(_YELLOW) -_Route25DamianText1:: - text "I'm not good at" - line "raising #MON." - - para "I should release" - line "my CHARMANDER" - cont "because I haven't" - cont "raised it well..." - - para "If you promise me" - line "you'll care for" - cont "it, it's yours." - done - -_Route25DamianText2:: - text "Take good care of" - line "my CHARMANDER!@@" - -_Route25DamianText3:: - text "Oh... I'd better" - line "release it then." - done - -_Route25DamianText4:: - text "How's CHARMANDER" - line "doing?" - done -ENDC - -_Route25BattleText1:: ; 9421e (25:421e) +_Route25BattleText1:: text "Local trainers" line "come here to" cont "practice!" done -_Route25EndBattleText1:: ; 94245 (25:4245) +_Route25EndBattleText1:: text "You're" line "decent." prompt -_Route25AfterBattleText1:: ; 94254 (25:4254) +_Route25AfterBattleText1:: text "All #MON have" line "weaknesses. It's" cont "best to raise" cont "different kinds." done -_Route25BattleText2:: ; 94292 (25:4292) +_Route25BattleText2:: text "Dad took me to a" line "great party on" cont "S.S.ANNE at" cont "VERMILION CITY!" done -_Route25EndBattleText2:: ; 942cf (25:42cf) +_Route25EndBattleText2:: text "I'm" line "not mad!" prompt -_Route25AfterBattleText2:: ; 942dc (25:42dc) +_Route25AfterBattleText2:: text "On S.S.ANNE, I" line "saw trainers from" cont "around the world." done -_Route25BattleText3:: ; 94310 (25:4310) +_Route25BattleText3:: text "I'm a cool guy." line "I've got a girl" cont "friend!" done -_Route25EndBattleText3:: ; 94337 (25:4337) +_Route25EndBattleText3:: text "Aww," line "darn..." prompt -_Route25AfterBattleText3:: ; 94345 (25:4345) +_Route25AfterBattleText3:: text "Oh well. My girl" line "will cheer me up." done -_Route25BattleText4:: ; 94369 (25:4369) +_Route25BattleText4:: text "Hi! My boy" line "friend is cool!" done -_Route25EndBattleText4:: ; 94385 (25:4385) -IF DEF(_YELLOW) - text "I'm in" - line "a slump!" -ELSE +_Route25EndBattleText4:: text "I was in" line "bad condition!" -ENDC prompt -_Route25AfterBattleText4:: ; 9439e (25:439e) +_Route25AfterBattleText4:: text "I wish my guy was" line "as good as you!" done -_Route25BattleText5:: ; 943c1 (25:43c1) +_Route25BattleText5:: text "I knew I had to" line "fight you!" done -_Route25EndBattleText5:: ; 943dd (25:43dd) +_Route25EndBattleText5:: text "I knew" line "I'd lose too!" prompt -_Route25AfterBattleText5:: ; 943f2 (25:43f2) +_Route25AfterBattleText5:: text "If your #MON" line "gets confused or" cont "falls asleep," cont "switch it!" done -_Route25BattleText6:: ; 9442a (25:442a) +_Route25BattleText6:: text "My friend has a" line "cute #MON." cont "I'm so jealous!" done -_Route25EndBattleText6:: ; 94455 (25:4455) +_Route25EndBattleText6:: text "I'm" line "not so jealous!" prompt -_Route25AfterBattleText6:: ; 94469 (25:4469) +_Route25AfterBattleText6:: text "You came from MT." line "MOON? May I have" cont "a CLEFAIRY?" done -_Route25BattleText7:: ; 94499 (25:4499) +_Route25BattleText7:: text "I just got down" line "from MT.MOON," cont "but I'm ready!" done -_Route25EndBattleText7:: ; 944c6 (25:44c6) +_Route25EndBattleText7:: text "You" line "worked hard!" prompt -_Route25AfterBattleText7:: ; 944d8 (25:44d8) +_Route25AfterBattleText7:: text "Drat!" line "A ZUBAT bit me" cont "back in there." done -_Route25BattleText8:: ; 944fd (25:44fd) +_Route25BattleText8:: text "I'm off to see a" line "#MON collector" cont "at the cape!" done -_Route25EndBattleText8:: ; 9452a (25:452a) +_Route25EndBattleText8:: text "You" line "got me." prompt -_Route25AfterBattleText8:: ; 94537 (25:4537) +_Route25AfterBattleText8:: text "The collector has" line "many rare kinds" cont "of #MON." done -_Route25BattleText9:: ; 94563 (25:4563) +_Route25BattleText9:: text "You're going to" line "see BILL? First," cont "let's fight!" done -_Route25EndBattleText9:: ; 94590 (25:4590) +_Route25EndBattleText9:: text "You're" line "something." prompt -_Route25AfterBattleText9:: ; 945a2 (25:45a2) +_Route25AfterBattleText9:: text "The trail below" line "is a shortcut to" cont "CERULEAN CITY." done -_Route25Text11:: ; 945d3 (25:45d3) +_Route25Text11:: text "SEA COTTAGE" line "BILL lives here!" done - diff --git a/text/maps/route_2_gate.asm b/text/maps/route_2_gate.asm index e8337a1f..566830f8 100644 --- a/text/maps/route_2_gate.asm +++ b/text/maps/route_2_gate.asm @@ -1,13 +1,12 @@ -_Route2GateText_5d616:: ; 8a7fc (22:67fc) +_Route2GateText_5d616:: text "The HM FLASH" line "lights even the" cont "darkest dungeons." done -_Route2GateText2:: ; 8a82c (22:682c) +_Route2GateText2:: text "Once a #MON" line "learns FLASH, you" cont "can get through" cont "ROCK TUNNEL." done - diff --git a/text/maps/route_2_house.asm b/text/maps/route_2_house.asm index 17028a2a..46fc1062 100644 --- a/text/maps/route_2_house.asm +++ b/text/maps/route_2_house.asm @@ -1,7 +1,6 @@ -_Route2HouseText1:: ; 8a7b8 (22:67b8) +_Route2HouseText1:: text "A fainted #MON" line "can't fight. But, " cont "it can still use " cont "moves like CUT!" done - diff --git a/text/maps/route_3.asm b/text/maps/route_3.asm index 95612425..966a0786 100644 --- a/text/maps/route_3.asm +++ b/text/maps/route_3.asm @@ -1,4 +1,4 @@ -_Route3Text1:: ; 8d779 (23:5779) +_Route3Text1:: text "Whew... I better" line "take a rest..." cont "Groan..." @@ -8,144 +8,138 @@ _Route3Text1:: ; 8d779 (23:5779) cont "lot out of you!" done -_Route3BattleText1:: ; 8d7d5 (23:57d5) +_Route3BattleText1:: text "Hey! I met you in" line "VIRIDIAN FOREST!" done -_Route3EndBattleText1:: ; 8d7f9 (23:57f9) +_Route3EndBattleText1:: text "You" line "beat me again!" prompt -_Route3AfterBattleText1:: ; 8d80d (23:580d) +_Route3AfterBattleText1:: text "There are other" line "kinds of #MON" cont "than those found" cont "in the forest!" done -_Route3BattleText2:: ; 8d84c (23:584c) +_Route3BattleText2:: text "Hi! I like shorts!" line "They're comfy and" cont "easy to wear!" done -_Route3EndBattleText2:: ; 8d87f (23:587f) +_Route3EndBattleText2:: text "I don't" line "believe it!" prompt -_Route3AfterBattleText2:: ; 8d893 (23:5893) +_Route3AfterBattleText2:: text "Are you storing" line "your #MON on" cont "PC? Each BOX can" cont "hold 20 #MON!" done -_Route3BattleText3:: ; 8d8d0 (23:58d0) +_Route3BattleText3:: text "You looked at me," line "didn't you?" done -_Route3EndBattleText3:: ; 8d8ee (23:58ee) +_Route3EndBattleText3:: text "You're" line "mean!" prompt -_Route3AfterBattleText3:: ; 8d8fb (23:58fb) +_Route3AfterBattleText3:: text "Quit staring if" line "you don't want to" cont "fight!" done -_Route3BattleText4:: ; 8d924 (23:5924) +_Route3BattleText4:: text "Are you a trainer?" line "Let's fight!" done -_Route3EndBattleText4:: ; 8d944 (23:5944) +_Route3EndBattleText4:: text "If I" -IF DEF(_YELLOW) - line "had new #MON," - cont "I would've won!" -ELSE line "had new #MON I" cont "would've won!" -ENDC prompt -_Route3AfterBattleText4:: ; 8d966 (23:5966) +_Route3AfterBattleText4:: text "If a #MON BOX" line "on the PC gets" cont "full, just switch" cont "to another BOX!" done -_Route3BattleText5:: ; 8d9a6 (23:59a6) +_Route3BattleText5:: text "That look you" line "gave me, it's so" cont "intriguing!" done -_Route3EndBattleText5:: ; 8d9d1 (23:59d1) +_Route3EndBattleText5:: text "Be nice!" prompt -_Route3AfterBattleText5:: ; 8d9db (23:59db) +_Route3AfterBattleText5:: text "Avoid fights by" line "not letting" cont "people see you!" done -_Route3BattleText6:: ; 8da08 (23:5a08) +_Route3BattleText6:: text "Hey! You're not" line "wearing shorts!" done -_Route3EndBattleText6:: ; 8da28 (23:5a28) +_Route3EndBattleText6:: text "Lost!" line "Lost! Lost!" prompt -_Route3AfterBattleText6:: ; 8da3b (23:5a3b) +_Route3AfterBattleText6:: text "I always wear" line "shorts, even in" cont "winter!" done -_Route3BattleText7:: ; 8da62 (23:5a62) +_Route3BattleText7:: text "You can fight my" line "new #MON!" done -_Route3EndBattleText7:: ; 8da7e (23:5a7e) +_Route3EndBattleText7:: text "Done" line "like dinner!" prompt -_Route3AfterBattleText7:: ; 8da91 (23:5a91) +_Route3AfterBattleText7:: text "Trained #MON" line "are stronger than" cont "the wild ones!" done -_Route3BattleText8:: ; 8dac0 (23:5ac0) +_Route3BattleText8:: text "Eek! Did you" line "touch me?" done -_Route3EndBattleText8:: ; 8dad8 (23:5ad8) +_Route3EndBattleText8:: text "That's it?" prompt -_Route3AfterBattleText8:: ; 8dae3 (23:5ae3) +_Route3AfterBattleText8:: text "ROUTE 4 is at the" line "foot of MT.MOON." done -_Route3Text10:: ; 8db07 (23:5b07) +_Route3Text10:: text "ROUTE 3" line "MT.MOON AHEAD" done - diff --git a/text/maps/route_4.asm b/text/maps/route_4.asm index 15fced31..0a36f4cd 100644 --- a/text/maps/route_4.asm +++ b/text/maps/route_4.asm @@ -1,20 +1,20 @@ -_Route4Text1:: ; 8db1e (23:5b1e) +_Route4Text1:: text "Ouch! I tripped" line "over a rocky" cont "#MON, GEODUDE!" done -_Route4BattleText1:: ; 8db4b (23:5b4b) +_Route4BattleText1:: text "I came to get my" line "mushroom #MON!" done -_Route4EndBattleText1:: ; 8db6c (23:5b6c) +_Route4EndBattleText1:: text "Oh! My cute" line "mushroom #MON!" prompt -_Route4AfterBattleText1:: ; 8db88 (23:5b88) +_Route4AfterBattleText1:: text "There might not" line "be any more" cont "mushrooms here." @@ -23,14 +23,13 @@ _Route4AfterBattleText1:: ; 8db88 (23:5b88) line "them all." done -_Route4Text5:: ; 8dbcd (23:5bcd) +_Route4Text5:: text "MT.MOON" line "Tunnel Entrance" done -_Route4Text6:: ; 8dbe6 (23:5be6) +_Route4Text6:: text "ROUTE 4" line "MT.MOON -" cont "CERULEAN CITY" done - diff --git a/text/maps/route_5.asm b/text/maps/route_5.asm index dca94e1f..54ff0f84 100644 --- a/text/maps/route_5.asm +++ b/text/maps/route_5.asm @@ -1,6 +1,5 @@ -_Route5Text1:: ; 8dc07 (23:5c07) +_Route5Text1:: text "UNDERGROUND PATH" line "CERULEAN CITY -" cont "VERMILION CITY" done - diff --git a/text/maps/route_6.asm b/text/maps/route_6.asm index 3a54f461..c48b5d3d 100644 --- a/text/maps/route_6.asm +++ b/text/maps/route_6.asm @@ -1,134 +1,97 @@ -IF DEF(_YELLOW) _Route6BattleText1:: - text "I'm doing this" - line "out of love." - cont "Leave me alone!" - done - -_Route6EndBattleText1:: - text "No," - line "this can't be..." - prompt - -_Route6AfterBattleText1:: - text "My love will leave" - line "me in disgust." - done - -_Route6BattleText2:: - text "I'm training for" - line "my love. Don't" - cont "bother me!" - done - -_Route6EndBattleText2:: - text "My" - line "textbook never..." - prompt - -_Route6AfterBattleText2:: - text "Now I understand," - line "#MON isn't" - cont "about calculated" - cont "numbers." - done -ELSE -_Route6BattleText1:: ; 8dc38 (23:5c38) text "Who's there?" line "Quit listening in" cont "on us!" done -_Route6EndBattleText1:: ; 8dc5e (23:5c5e) +_Route6EndBattleText1:: text "I" line "just can't win!" prompt -_Route6AfterBattleText1:: ; 8dc70 (23:5c70) +_Route6AfterBattleText1:: text "Whisper..." line "whisper..." done -_Route6BattleText2:: ; 8dc87 (23:5c87) +_Route6BattleText2:: text "Excuse me! This" line "is a private" cont "conversation!" done -_Route6EndBattleText2:: ; 8dcb3 (23:5cb3) +_Route6EndBattleText2:: text "Ugh!" line "I hate losing!" prompt -ENDC -_Route6BattleText3:: ; 8dcc8 (23:5cc8) +_Route6BattleText3:: text "There aren't many" line "bugs out here." done -_Route6EndBattleText3:: ; 8dce9 (23:5ce9) +_Route6EndBattleText3:: text "No!" line "You're kidding!" prompt -_Route6AfterBattleText3:: ; 8dcfd (23:5cfd) +_Route6AfterBattleText3:: text "I like bugs, so" line "I'm going back to" cont "VIRIDIAN FOREST." done -_Route6BattleText4:: ; 8dd30 (23:5d30) +_Route6BattleText4:: text "Huh? You want" line "to talk to me?" done -_Route6EndBattleText4:: ; 8dd4e (23:5d4e) +_Route6EndBattleText4:: text "I" line "didn't start it!" prompt -_Route6AfterBattleText4:: ; 8dd61 (23:5d61) +_Route6AfterBattleText4:: text "I should carry" line "more #MON with" cont "me for safety." done -_Route6BattleText5:: ; 8dd8f (23:5d8f) +_Route6BattleText5:: text "Me? Well, OK." line "I'll play!" done -_Route6EndBattleText5:: ; 8dda8 (23:5da8) +_Route6EndBattleText5:: text "Just" line "didn't work!" prompt -_Route6AfterBattleText5:: ; 8ddba (23:5dba) +_Route6AfterBattleText5:: text "I want to get" line "stronger! What's" cont "your secret?" done -_Route6BattleText6:: ; 8dde6 (23:5de6) +_Route6BattleText6:: text "I've never seen" line "you around!" cont "Are you good?" done -_Route6EndBattleText6:: ; 8de10 (23:5e10) +_Route6EndBattleText6:: text "You" line "are too good!" prompt -_Route6AfterBattleText6:: ; 8de23 (23:5e23) +_Route6AfterBattleText6:: text "Are my #MON" line "weak? Or, am I" cont "just bad?" done -_Route6Text7:: ; 8de49 (23:5e49) +_Route6Text7:: text "UNDERGROUND PATH" line "CERULEAN CITY -" cont "VERMILION CITY" done - diff --git a/text/maps/route_7.asm b/text/maps/route_7.asm index 77c0eb79..6500be96 100644 --- a/text/maps/route_7.asm +++ b/text/maps/route_7.asm @@ -1,6 +1,5 @@ -_Route7Text1:: ; 8de7a (23:5e7a) +_Route7Text1:: text "UNDERGROUND PATH" line "CELADON CITY -" cont "LAVENDER TOWN" done - diff --git a/text/maps/route_8.asm b/text/maps/route_8.asm index 62e2aff3..57a9a5f9 100644 --- a/text/maps/route_8.asm +++ b/text/maps/route_8.asm @@ -1,159 +1,154 @@ -_Route8BattleText1:: ; 8dea9 (23:5ea9) +_Route8BattleText1:: text "You look good at" line "#MON, but" cont "how's your chem?" done -_Route8EndBattleText1:: ; 8ded5 (23:5ed5) +_Route8EndBattleText1:: text "Ow!" line "Meltdown!" prompt -_Route8AfterBattleText1:: ; 8dee4 (23:5ee4) +_Route8AfterBattleText1:: text "I am better at" line "school than this!" done -_Route8BattleText2:: ; 8df06 (23:5f06) +_Route8BattleText2:: text "All right! Let's" line "roll the dice!" done -_Route8EndBattleText2:: ; 8df26 (23:5f26) +_Route8EndBattleText2:: text "Drat!" line "Came up short!" prompt -_Route8AfterBattleText2:: ; 8df3c (23:5f3c) +_Route8AfterBattleText2:: text "Lady Luck's not" line "with me today!" done -_Route8BattleText3:: ; 8df5b (23:5f5b) +_Route8BattleText3:: text "You need strategy" line "to win at this!" done -_Route8EndBattleText3:: ; 8df7e (23:5f7e) +_Route8EndBattleText3:: text "It's" line "not logical!" prompt -_Route8AfterBattleText3:: ; 8df90 (23:5f90) +_Route8AfterBattleText3:: text "Go with GRIMER" line "first...and..." cont "...and...then..." done -_Route8BattleText4:: ; 8dfc0 (23:5fc0) +_Route8BattleText4:: text "I like NIDORAN, so" line "I collect them!" done -_Route8EndBattleText4:: ; 8dfe4 (23:5fe4) +_Route8EndBattleText4:: text "Why? Why??" prompt -_Route8AfterBattleText4:: ; 8dff0 (23:5ff0) +_Route8AfterBattleText4:: text "When #MON grow" line "up they get ugly!" cont "They shouldn't" cont "evolve!" done -_Route8BattleText5:: ; 8e028 (23:6028) +_Route8BattleText5:: text "School is fun, but" line "so are #MON." done -_Route8EndBattleText5:: ; 8e049 (23:6049) +_Route8EndBattleText5:: text "I'll" line "stay with school." prompt -_Route8AfterBattleText5:: ; 8e060 (23:6060) +_Route8AfterBattleText5:: text "We're stuck here" line "because of the" cont "gates at SAFFRON." done -_Route8BattleText6:: ; 8e092 (23:6092) +_Route8BattleText6:: text "MEOWTH is so cute," line "meow, meow, meow!" done -_Route8EndBattleText6:: ; 8e0b8 (23:60b8) +_Route8EndBattleText6:: text "Meow!" prompt -_Route8AfterBattleText6:: ; 8e0bf (23:60bf) +_Route8AfterBattleText6:: text "I think PIDGEY" line "and RATTATA" cont "are cute too!" done -_Route8BattleText7:: ; 8e0e9 (23:60e9) +_Route8BattleText7:: text "We must look" line "silly standing" cont "here like this!" done -_Route8EndBattleText7:: ; 8e116 (23:6116) +_Route8EndBattleText7:: text "Look what" line "you did!" prompt -_Route8AfterBattleText7:: ; 8e12a (23:612a) -if DEF(_YELLOW) - text "SAFFRON's gate-" -ELSE +_Route8AfterBattleText7:: text "SAFFRON's gate" -ENDC line "keeper won't let" cont "us through." cont "He's so mean!" done -_Route8BattleText8:: ; 8e162 (23:6162) +_Route8BattleText8:: text "I'm a rambling," line "gambling dude!" done -_Route8EndBattleText8:: ; 8e181 (23:6181) +_Route8EndBattleText8:: text "Missed" line "the big score!" prompt -_Route8AfterBattleText8:: ; 8e198 (23:6198) +_Route8AfterBattleText8:: text "Gambling and" line "#MON are like" cont "eating peanuts!" cont "Just can't stop!" done -_Route8BattleText9:: ; 8e1d4 (23:61d4) +_Route8BattleText9:: text "What's a cute," line "round and fluffy" cont "#MON?" done -_Route8EndBattleText9:: ; 8e1fa (23:61fa) +_Route8EndBattleText9:: text "Stop!" para "Don't be so mean" line "to my CLEFAIRY!" prompt -_Route8AfterBattleText9:: ; 8e221 (23:6221) +_Route8AfterBattleText9:: text "I heard that" line "CLEFAIRY evolves" cont "when it's exposed" cont "to a MOON STONE." done -_Route8Text10:: ; 8e262 (23:6262) +_Route8Text10:: text "UNDERGROUND PATH" line "CELADON CITY -" cont "LAVENDER TOWN" done - diff --git a/text/maps/route_9.asm b/text/maps/route_9.asm index 353eb779..9975000d 100644 --- a/text/maps/route_9.asm +++ b/text/maps/route_9.asm @@ -1,91 +1,74 @@ -_Route9BattleText1:: ; 8e291 (23:6291) +_Route9BattleText1:: text "You have #MON" line "with you!" cont "You're mine!" done -_Route9EndBattleText1:: ; 8e2b6 (23:62b6) +_Route9EndBattleText1:: text "You" line "deceived me!" prompt -_Route9AfterBattleText1:: ; 8e2c8 (23:62c8) +_Route9AfterBattleText1:: text "You need light to" line "get through that" cont "dark tunnel ahead." done -IF DEF(_YELLOW) -_Route9BattleTextAJ:: - text "I aim to be the" - line "ultimate trainer!" - done - -_Route9EndBattleTextAJ:: - text "My" - line "SANDSHREW lost?" - prompt - -_Route9AfterBattleTextAJ:: - text "I'll restart my" - line "100-win streak" - cont "with SANDSHREW." -ENDC - -_Route9BattleText2:: ; 8e2ff (23:62ff) +_Route9BattleText2:: text "Who's that walking" line "with those good" cont "looking #MON?" done -_Route9EndBattleText2:: ; 8e330 (23:6330) +_Route9EndBattleText2:: text "Out" line "like a light!" prompt -_Route9AfterBattleText2:: ; 8e343 (23:6343) +_Route9AfterBattleText2:: text "Keep walking!" done -_Route9BattleText3:: ; 8e352 (23:6352) +_Route9BattleText3:: text "I'm taking ROCK" line "TUNNEL to go to" cont "LAVENDER..." done -_Route9EndBattleText3:: ; 8e37e (23:637e) +_Route9EndBattleText3:: text "Can't" line "measure up!" prompt -_Route9AfterBattleText3:: ; 8e390 (23:6390) +_Route9AfterBattleText3:: text "Are you off to" line "ROCK TUNNEL too?" done -_Route9BattleText4:: ; 8e3b1 (23:63b1) +_Route9BattleText4:: text "Don't you dare" line "condescend me!" done -_Route9EndBattleText4:: ; 8e3cf (23:63cf) +_Route9EndBattleText4:: text "No!" line "You're too much!" prompt -_Route9AfterBattleText4:: ; 8e3e4 (23:63e4) +_Route9AfterBattleText4:: text "You're obviously" line "talented! Good" cont "luck to you!" done -_Route9BattleText5:: ; 8e411 (23:6411) +_Route9BattleText5:: text "Bwahaha!" line "Great! I was" cont "bored, eh!" done -_Route9EndBattleText5:: ; 8e433 (23:6433) +_Route9EndBattleText5:: text "Keep it" line "coming, eh!" @@ -93,83 +76,82 @@ _Route9EndBattleText5:: ; 8e433 (23:6433) line "of #MON!" prompt -_Route9AfterBattleText5:: ; 8e461 (23:6461) +_Route9AfterBattleText5:: text "You sure had guts" line "standing up to me" cont "there, eh?" done -_Route9BattleText6:: ; 8e491 (23:6491) +_Route9BattleText6:: text "Hahaha!" line "Aren't you a" cont "little toughie!" done -_Route9EndBattleText6:: ; 8e4b6 (23:64b6) +_Route9EndBattleText6:: text "What's" line "that?" prompt -_Route9AfterBattleText6:: ; 8e4c3 (23:64c3) +_Route9AfterBattleText6:: text "Hahaha! Kids" line "should be tough!" done -_Route9BattleText7:: ; 8e4e2 (23:64e2) +_Route9BattleText7:: text "I got up early" line "every day to" cont "raise my #MON" cont "from cocoons!" done -_Route9EndBattleText7:: ; 8e51b (23:651b) +_Route9EndBattleText7:: text "WHAT?" para "What a total" line "waste of time!" prompt -_Route9AfterBattleText7:: ; 8e53e (23:653e) +_Route9AfterBattleText7:: text "I have to collect" line "more than bugs to" cont "get stronger..." done -_Route9BattleText8:: ; 8e573 (23:6573) +_Route9BattleText8:: text "Hahahaha!" line "Come on, dude!" done -_Route9EndBattleText8:: ; 8e58d (23:658d) +_Route9EndBattleText8:: text "Hahahaha!" line "You beat me fair!" prompt -_Route9AfterBattleText8:: ; 8e5aa (23:65aa) +_Route9AfterBattleText8:: text "Hahahaha!" line "Us hearty guys" cont "always laugh!" done -_Route9BattleText9:: ; 8e5d2 (23:65d2) +_Route9BattleText9:: text "Go, my super bug" line "#MON!" done -_Route9EndBattleText9:: ; 8e5ea (23:65ea) +_Route9EndBattleText9:: text "My" line "bugs..." prompt -_Route9AfterBattleText9:: ; 8e5f6 (23:65f6) +_Route9AfterBattleText9:: text "If you don't like" line "bug #MON, you" cont "bug me!" done -_Route9Text11:: ; 8e61e (23:661e) +_Route9Text11:: text "ROUTE 9" line "CERULEAN CITY-" cont "ROCK TUNNEL" done - diff --git a/text/maps/safari_zone_center.asm b/text/maps/safari_zone_center.asm index e12d495f..09918f93 100644 --- a/text/maps/safari_zone_center.asm +++ b/text/maps/safari_zone_center.asm @@ -1,12 +1,11 @@ -_SafariZoneCenterText2:: ; 85807 (21:5807) +_SafariZoneCenterText2:: text "REST HOUSE" done -_SafariZoneCenterText3:: ; 85813 (21:5813) +_SafariZoneCenterText3:: text "TRAINER TIPS" para "Press the START" line "Button to check" cont "remaining time!" done - diff --git a/text/maps/safari_zone_east.asm b/text/maps/safari_zone_east.asm index 0658a09f..eebe5de7 100644 --- a/text/maps/safari_zone_east.asm +++ b/text/maps/safari_zone_east.asm @@ -1,8 +1,8 @@ -_SafariZoneEastText5:: ; 855e0 (21:55e0) +_SafariZoneEastText5:: text "REST HOUSE" done -_SafariZoneEastText6:: ; 855ec (21:55ec) +_SafariZoneEastText6:: text "TRAINER TIPS" para "The remaining time" @@ -10,8 +10,7 @@ _SafariZoneEastText6:: ; 855ec (21:55ec) cont "while you walk!" done -_SafariZoneEastText7:: ; 8562b (21:562b) +_SafariZoneEastText7:: text "CENTER AREA" line "NORTH: AREA 2" done - diff --git a/text/maps/safari_zone_entrance.asm b/text/maps/safari_zone_entrance.asm index 79f70ea4..8a018b2d 100644 --- a/text/maps/safari_zone_entrance.asm +++ b/text/maps/safari_zone_entrance.asm @@ -1,9 +1,9 @@ -_SafariZoneEntranceText1:: ; 9e6c7 (27:66c7) +_SafariZoneEntranceText1:: text "Welcome to the" line "SAFARI ZONE!" done -SafariZoneEntranceText_9e6e4:: ; 9e6e4 (27:66e4) +SafariZoneEntranceText_9e6e4:: text "For just ¥500," line "you can catch all" cont "the #MON you" @@ -12,7 +12,7 @@ SafariZoneEntranceText_9e6e4:: ; 9e6e4 (27:66e4) para "Would you like to" line "join the hunt?@@" -SafariZoneEntranceText_9e747:: ; 9e747 (27:6747) +SafariZoneEntranceText_9e747:: text "That'll be ¥500" line "please!" @@ -23,7 +23,7 @@ SafariZoneEntranceText_9e747:: ; 9e747 (27:6747) para $52, " received" line "30 SAFARI BALLs!@@" -_SafariZoneEntranceText_75360:: ; 9e79f (27:679f) +_SafariZoneEntranceText_75360:: db $0 para "We'll call you on" line "the PA when you" @@ -31,41 +31,41 @@ _SafariZoneEntranceText_75360:: ; 9e79f (27:679f) cont "or SAFARI BALLs!" done -_SafariZoneEntranceText_75365:: ; 9e7e3 (27:67e3) +_SafariZoneEntranceText_75365:: text "OK! Please come" line "again!" done -_SafariZoneEntranceText_7536a:: ; 9e7fb (27:67fb) +_SafariZoneEntranceText_7536a:: text "Oops! Not enough" line "money!" done -SafariZoneEntranceText_9e814:: ; 9e814 (27:6814) +SafariZoneEntranceText_9e814:: text "Leaving early?@@" -_SafariZoneEntranceText_753bb:: ; 9e825 (27:6825) +_SafariZoneEntranceText_753bb:: text "Please return any" line "SAFARI BALLs you" cont "have left." done -_SafariZoneEntranceText_753c0:: ; 9e854 (27:6854) +_SafariZoneEntranceText_753c0:: text "Good Luck!" done -_SafariZoneEntranceText_753c5:: ; 9e860 (27:6860) +_SafariZoneEntranceText_753c5:: text "Did you get a" line "good haul?" cont "Come again!" done -_SafariZoneEntranceText_753e6:: ; 9e886 (27:6886) +_SafariZoneEntranceText_753e6:: text "Hi! Is it your" line "first time here?" done -_SafariZoneEntranceText_753eb:: ; 9e8a7 (27:68a7) +_SafariZoneEntranceText_753eb:: text "SAFARI ZONE has 4" line "zones in it." @@ -87,54 +87,7 @@ _SafariZoneEntranceText_753eb:: ; 9e8a7 (27:68a7) cont "new #MON!" done -_SafariZoneEntranceText_753f0:: ; 9e993 (27:6993) +_SafariZoneEntranceText_753f0:: text "Sorry, you're a" line "regular here!" done - -IF DEF(_OPTION_LOWCOST_SAFARI) -_SafariZoneLowCostText1:: - db 0 - para "Oh, all right, pay" - line "me what you have." - prompt - -_SafariZoneLowCostText2:: - text "But, I can't give" - line "you all 30 BALLs." - done - -_SafariZoneLowCostText3:: - db 0 - para "You're persistent," - line "aren't you?" - - para "OK, you can go in" - line "for free, but" - cont "just this once!@@" - -_SafariZoneLowCostText4:: - db 0 - done - -_SafariZoneLowCostText5:: - text "I'm sorry, but you" - line "have to pay to" - cont "enter." - done - -_SafariZoneLowCostText6:: - text "You can't enter" - line "without paying!" - done - -_SafariZoneLowCostText7:: - text "I said, no money," - line "no entry!" - done - -_SafariZoneLowCostText8:: - text "Read my lips, NO!" - line "Get it?" - done -ENDC diff --git a/text/maps/safari_zone_north.asm b/text/maps/safari_zone_north.asm index cdd46333..1e148f0b 100644 --- a/text/maps/safari_zone_north.asm +++ b/text/maps/safari_zone_north.asm @@ -1,19 +1,19 @@ -_SafariZoneNorthText3:: ; 85646 (21:5646) +_SafariZoneNorthText3:: text "REST HOUSE" done -_SafariZoneNorthText4:: ; 85652 (21:5652) +_SafariZoneNorthText4:: text "TRAINER TIPS" para "The SECRET HOUSE" line "is still ahead!" done -_SafariZoneNorthText5:: ; 85681 (21:5681) +_SafariZoneNorthText5:: text "AREA 2" done -_SafariZoneNorthText6:: ; 85689 (21:5689) +_SafariZoneNorthText6:: text "TRAINER TIPS" para "#MON hide in" @@ -24,11 +24,10 @@ _SafariZoneNorthText6:: ; 85689 (21:5689) cont "flush them out." done -_SafariZoneNorthText7:: ; 856df (21:56df) +_SafariZoneNorthText7:: text "TRAINER TIPS" para "Win a free HM for" line "finding the" cont "SECRET HOUSE!" done - diff --git a/text/maps/safari_zone_rest_house_1.asm b/text/maps/safari_zone_rest_house_1.asm index 7fc2d027..b6c87818 100644 --- a/text/maps/safari_zone_rest_house_1.asm +++ b/text/maps/safari_zone_rest_house_1.asm @@ -1,12 +1,11 @@ -_SafariZoneRestHouse1Text1:: ; 85851 (21:5851) +_SafariZoneRestHouse1Text1:: text "SARA: Where did" line "my boy friend," cont "ERIK, go?" done -_SafariZoneRestHouse1Text2:: ; 8587b (21:587b) +_SafariZoneRestHouse1Text2:: text "I'm catching" line "#MON to take" cont "home as gifts!" done - diff --git a/text/maps/safari_zone_rest_house_2.asm b/text/maps/safari_zone_rest_house_2.asm index a93838bb..94802b13 100644 --- a/text/maps/safari_zone_rest_house_2.asm +++ b/text/maps/safari_zone_rest_house_2.asm @@ -1,4 +1,4 @@ -_SafariZoneRestHouse2Text1:: ; 85a2f (21:5a2f) +_SafariZoneRestHouse2Text1:: text "Tossing ROCKs at" line "#MON might" cont "make them run," @@ -6,15 +6,14 @@ _SafariZoneRestHouse2Text1:: ; 85a2f (21:5a2f) cont "easier to catch." done -_SafariZoneRestHouse2Text2:: ; 85a7a (21:5a7a) +_SafariZoneRestHouse2Text2:: text "Using BAIT will" line "make #MON" cont "easier to catch." done -_SafariZoneRestHouse2Text3:: ; 85aa6 (21:5aa6) +_SafariZoneRestHouse2Text3:: text "I hiked a lot, but" line "I didn't see any" cont "#MON I wanted." done - diff --git a/text/maps/safari_zone_rest_house_3.asm b/text/maps/safari_zone_rest_house_3.asm index c424014a..d5f7abc8 100644 --- a/text/maps/safari_zone_rest_house_3.asm +++ b/text/maps/safari_zone_rest_house_3.asm @@ -1,10 +1,10 @@ -_SafariZoneRestHouse3Text1:: ; 85ad9 (21:5ad9) +_SafariZoneRestHouse3Text1:: text "How many did you" line "catch? I'm bushed" cont "from the work!" done -_SafariZoneRestHouse3Text2:: ; 85b0b (21:5b0b) +_SafariZoneRestHouse3Text2:: text "I caught a" line "CHANSEY!" @@ -12,8 +12,7 @@ _SafariZoneRestHouse3Text2:: ; 85b0b (21:5b0b) line "all worthwhile!" done -_SafariZoneRestHouse3Text3:: ; 85b40 (21:5b40) +_SafariZoneRestHouse3Text3:: text "Whew! I'm tired" line "from all the fun!" done - diff --git a/text/maps/safari_zone_rest_house_4.asm b/text/maps/safari_zone_rest_house_4.asm index 1b510bd8..93f02c8f 100644 --- a/text/maps/safari_zone_rest_house_4.asm +++ b/text/maps/safari_zone_rest_house_4.asm @@ -1,4 +1,4 @@ -_SafariZoneRestHouse4Text1:: ; 85b62 (21:5b62) +_SafariZoneRestHouse4Text1:: text "You can keep any" line "item you find on" cont "the ground here." @@ -9,14 +9,14 @@ _SafariZoneRestHouse4Text1:: ; 85b62 (21:5b62) cont "of them at once!" done -_SafariZoneRestHouse4Text2:: ; 85bd5 (21:5bd5) +_SafariZoneRestHouse4Text2:: text "Go to the deepest" line "part of the" cont "SAFARI ZONE. You" cont "will win a prize!" done -_SafariZoneRestHouse4Text3:: ; 85c17 (21:5c17) +_SafariZoneRestHouse4Text3:: text "My EEVEE evolved" line "into FLAREON!" @@ -25,4 +25,3 @@ _SafariZoneRestHouse4Text3:: ; 85c17 (21:5c17) cont "a VAPOREON!" cont "I wonder why?" done - diff --git a/text/maps/safari_zone_secret_house.asm b/text/maps/safari_zone_secret_house.asm index 67b677be..1bbe89fd 100644 --- a/text/maps/safari_zone_secret_house.asm +++ b/text/maps/safari_zone_secret_house.asm @@ -1,4 +1,4 @@ -_SecretHouseText_4a350:: ; 858a4 (21:58a4) +_SecretHouseText_4a350:: text "Ah! Finally!" para "You're the first" @@ -14,13 +14,13 @@ _SecretHouseText_4a350:: ; 858a4 (21:58a4) line "You have won!" prompt -_ReceivedHM03Text:: ; 85943 (21:5943) +_ReceivedHM03Text:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_HM03ExplanationText:: ; 85957 (21:5957) +_HM03ExplanationText:: text "HM03 is SURF!" para "#MON will be" @@ -37,9 +37,8 @@ _HM03ExplanationText:: ; 85957 (21:5957) cont "fabulous prize!" done -_HM03NoRoomText:: ; 85a02 (21:5a02) +_HM03NoRoomText:: text "You don't have" line "room for this" cont "fabulous prize!" done - diff --git a/text/maps/safari_zone_west.asm b/text/maps/safari_zone_west.asm index ea8d2425..dcb2fe6c 100644 --- a/text/maps/safari_zone_west.asm +++ b/text/maps/safari_zone_west.asm @@ -1,8 +1,8 @@ -_SafariZoneWestText5:: ; 85719 (21:5719) +_SafariZoneWestText5:: text "REST HOUSE" done -_SafariZoneWestText6:: ; 85725 (21:5725) +_SafariZoneWestText6:: text "REQUEST NOTICE" para "Please find the" @@ -15,7 +15,7 @@ _SafariZoneWestText6:: ; 85725 (21:5725) line "Contact: WARDEN" done -_SafariZoneWestText7:: ; 857a3 (21:57a3) +_SafariZoneWestText7:: text "TRAINER TIPS" para "Zone Exploration" @@ -25,8 +25,7 @@ _SafariZoneWestText7:: ; 857a3 (21:57a3) line "the SECRET HOUSE!" done -_SafariZoneWestText8:: ; 857ed (21:57ed) +_SafariZoneWestText8:: text "AREA 3" line "EAST: CENTER AREA" done - diff --git a/text/maps/saffron_city.asm b/text/maps/saffron_city.asm index cc2c684e..a0422c8c 100644 --- a/text/maps/saffron_city.asm +++ b/text/maps/saffron_city.asm @@ -1,60 +1,60 @@ -_SaffronCityText1:: ; a62e7 (29:62e7) +_SaffronCityText1:: text "What do you want?" line "Get lost!" done -_SaffronCityText2:: ; a6304 (29:6304) +_SaffronCityText2:: text "BOSS said he'll" line "take this town!" done -_SaffronCityText3:: ; a6324 (29:6324) +_SaffronCityText3:: text "Get out of the" line "way!" done -_SaffronCityText4:: ; a6339 (29:6339) +_SaffronCityText4:: text "SAFFRON belongs" line "to TEAM ROCKET!" done -_SaffronCityText5:: ; a635a (29:635a) +_SaffronCityText5:: text "Being evil makes" line "me feel so alive!" done -_SaffronCityText6:: ; a637e (29:637e) +_SaffronCityText6:: text "Ow! Watch where" line "you're walking!" done -_SaffronCityText7:: ; a639e (29:639e) +_SaffronCityText7:: text "With SILPH under" line "control, we can" cont "exploit #MON" cont "around the world!" done -_SaffronCityText8:: ; a63df (29:63df) +_SaffronCityText8:: text "You beat TEAM" line "ROCKET all alone?" cont "That's amazing!" done -_SaffronCityText9:: ; a640f (29:640f) +_SaffronCityText9:: text "Yeah! TEAM ROCKET" line "is gone!" cont "It's safe to go" cont "out again!" done -_SaffronCityText10:: ; a6445 (29:6445) +_SaffronCityText10:: text "People should be" line "flocking back to" cont "SAFFRON now." done -_SaffronCityText11:: ; a6475 (29:6475) +_SaffronCityText11:: text "I flew here on my" line "PIDGEOT when I" cont "read about SILPH." @@ -64,16 +64,16 @@ _SaffronCityText11:: ; a6475 (29:6475) cont "media action." done -_SaffronCityText12:: ; a64d6 (29:64d6) +_SaffronCityText12:: text "PIDGEOT: Bi bibii!@@" -_SaffronCityText13:: ; a64eb (29:64eb) +_SaffronCityText13:: text "I saw ROCKET" line "BOSS escaping" cont "SILPH's building." done -_SaffronCityText14:: ; a6518 (29:6518) +_SaffronCityText14:: text "I'm a security" line "guard." @@ -81,7 +81,7 @@ _SaffronCityText14:: ; a6518 (29:6518) line "don't allow in!" done -_SaffronCityText15:: ; a654f (29:654f) +_SaffronCityText15:: text "..." line "Snore..." @@ -89,17 +89,17 @@ _SaffronCityText15:: ; a654f (29:654f) line "a snooze!" done -_SaffronCityText16:: ; a6577 (29:6577) +_SaffronCityText16:: text "SAFFRON CITY" line "Shining, Golden" cont "Land of Commerce" done -_SaffronCityText17:: ; a65a6 (29:65a6) +_SaffronCityText17:: text "FIGHTING DOJO" done -_SaffronCityText18:: ; a65b5 (29:65b5) +_SaffronCityText18:: text "SAFFRON CITY" line "#MON GYM" cont "LEADER: SABRINA" @@ -108,7 +108,7 @@ _SaffronCityText18:: ; a65b5 (29:65b5) line "Psychic #MON!" done -_SaffronCityText20:: ; a65f8 (29:65f8) +_SaffronCityText20:: text "TRAINER TIPS" para "FULL HEAL cures" @@ -120,7 +120,7 @@ _SaffronCityText20:: ; a65f8 (29:65f8) cont "more convenient." done -_SaffronCityText21:: ; a6667 (29:6667) +_SaffronCityText21:: text "TRAINER TIPS" para "New GREAT BALL" @@ -132,21 +132,20 @@ _SaffronCityText21:: ; a6667 (29:6667) cont "#MON." done -_SaffronCityText22:: ; a66c7 (29:66c7) +_SaffronCityText22:: text "SILPH CO." line "OFFICE BUILDING" done -_SaffronCityText24:: ; a66e2 (29:66e2) +_SaffronCityText24:: text "MR.PSYCHIC's" line "HOUSE" done -_SaffronCityText25:: ; a66f5 (29:66f5) +_SaffronCityText25:: text "SILPH's latest" line "product!" para "Release to be" line "determined..." done - diff --git a/text/maps/saffron_gates.asm b/text/maps/saffron_gates.asm index b7db1751..c16e880e 100644 --- a/text/maps/saffron_gates.asm +++ b/text/maps/saffron_gates.asm @@ -1,17 +1,13 @@ -_SaffronGateText_1dfe7:: ; 8aa5c (22:6a5c) +_SaffronGateText_1dfe7:: text "I'm on guard duty." line "Gee, I'm thirsty," cont "though!" -IF DEF(_YELLOW) - para "Oh, wait there," -ELSE para "Oh wait there," -ENDC line "the road's closed." done -_SaffronGateText_8aaa9:: ; 8aaa9 (22:6aa9) +_SaffronGateText_8aaa9:: text "Whoa, boy!" line "I'm parched!" cont "..." @@ -19,14 +15,10 @@ _SaffronGateText_8aaa9:: ; 8aaa9 (22:6aa9) cont "this drink?" cont "Gee, thanks!@@" -_SaffronGateText_1dff1:: ; 8aaef (22:6aef) +_SaffronGateText_1dff1:: db $0 para "..." -IF DEF(_YELLOW) - line "Glug, glug..." -ELSE line "Glug glug..." -ENDC cont "..." cont "Gulp..." cont "If you want to go" @@ -38,8 +30,7 @@ ENDC cont "the other guards!" done -_SaffronGateText_1dff6:: ; 8ab74 (22:6b74) +_SaffronGateText_1dff6:: text "Hi, thanks for" line "the cool drinks!" done - diff --git a/text/maps/saffron_gym.asm b/text/maps/saffron_gym.asm index 3236c7b2..ba57e35d 100644 --- a/text/maps/saffron_gym.asm +++ b/text/maps/saffron_gym.asm @@ -1,4 +1,4 @@ -_SaffronGymText_5d162:: ; a1bb4 (28:5bb4) +_SaffronGymText_5d162:: text "I had a vision of" line "your arrival!" @@ -16,7 +16,7 @@ _SaffronGymText_5d162:: ; a1bb4 (28:5bb4) cont "you my powers!" done -_SaffronGymText_5d167:: ; a1c73 (28:5c73) +_SaffronGymText_5d167:: text "I'm" line "shocked!" cont "But, a loss is a" @@ -29,14 +29,14 @@ _SaffronGymText_5d167:: ; a1c73 (28:5c73) para "You earned the" line "MARSHBADGE!@@" -_SaffronGymText_5d16e:: ; a1cdc (28:5cdc) +_SaffronGymText_5d16e:: text "Everyone has" line "psychic power!" cont "People just don't" cont "realize it!" done -_SaffronGymText_5d173:: ; a1d16 (28:5d16) +_SaffronGymText_5d173:: text "The MARSHBADGE" line "makes #MON up" cont "to L70 obey you!" @@ -54,11 +54,11 @@ _SaffronGymText_5d173:: ; a1d16 (28:5d16) line "this TM with you!" done -ReceivedTM46Text:: ; a1dcd (28:5dcd) +ReceivedTM46Text:: text $52, " received" line "TM46!@@" -_TM46ExplanationText:: ; a1de0 (28:5de0) +_TM46ExplanationText:: db $0 para "TM46 is PSYWAVE!" line "It uses powerful" @@ -66,12 +66,12 @@ _TM46ExplanationText:: ; a1de0 (28:5de0) cont "inflict damage!" done -_TM46NoRoomText:: ; a1e25 (28:5e25) +_TM46NoRoomText:: text "Your pack is full" line "of other items!" done -_SaffronGymText_5d1e6:: ; a1e48 (28:5e48) +_SaffronGymText_5d1e6:: text "Yo! Champ in" line "making!" @@ -88,7 +88,7 @@ _SaffronGymText_5d1e6:: ; a1e48 (28:5e48) cont "even aim a punch!" done -_SaffronGymText_5d1eb:: ; a1ef0 (28:5ef0) +_SaffronGymText_5d1eb:: text "Psychic power," line "huh?" @@ -97,18 +97,18 @@ _SaffronGymText_5d1eb:: ; a1ef0 (28:5ef0) cont "at the slots!" done -_SaffronGymBattleText1:: ; a1f33 (28:5f33) +_SaffronGymBattleText1:: text "SABRINA is younger" line "than I, but I" cont "respect her!" done -_SaffronGymEndBattleText1:: ; a1f62 (28:5f62) +_SaffronGymEndBattleText1:: text "Not" line "good enough!" prompt -_SaffronGymAfterBattleText1:: ; a1f74 (28:5f74) +_SaffronGymAfterBattleText1:: text "In a battle of" line "equals, the one" cont "with the stronger" @@ -119,27 +119,23 @@ _SaffronGymAfterBattleText1:: ; a1f74 (28:5f74) cont "focus on winning!" done -_SaffronGymBattleText2:: ; a1fe0 (28:5fe0) +_SaffronGymBattleText2:: text "Does our unseen" line "power scare you?" done -_SaffronGymEndBattleText2:: ; a2002 (28:6002) +_SaffronGymEndBattleText2:: text "I never" line "foresaw this!" prompt -_SaffronGymAfterBattleText2:: ; a2019 (28:6019) +_SaffronGymAfterBattleText2:: text "Psychic #MON" -IF DEF(_YELLOW) - line "fear only bugs!" -ELSE line "fear only ghosts" cont "and bugs!" -ENDC done -_SaffronGymBattleText3:: ; a2042 (28:6042) +_SaffronGymBattleText3:: text "#MON take on" line "the appearance of" cont "their trainers." @@ -148,52 +144,52 @@ _SaffronGymBattleText3:: ; a2042 (28:6042) line "be tough, then!" done -_SaffronGymEndBattleText3:: ; a2091 (28:6091) +_SaffronGymEndBattleText3:: text "I knew" line "it!" prompt -_SaffronGymAfterBattleText3:: ; a209d (28:609d) +_SaffronGymAfterBattleText3:: text "I must teach" line "better techniques" cont "to my #MON!" done -_SaffronGymBattleText4:: ; a20c9 (28:60c9) +_SaffronGymBattleText4:: text "You know that" line "power alone isn't" cont "enough!" done -_SaffronGymEndBattleText4:: ; a20f1 (28:60f1) +_SaffronGymEndBattleText4:: text "I don't" line "believe this!" prompt -_SaffronGymAfterBattleText4:: ; a2107 (28:6107) +_SaffronGymAfterBattleText4:: text "SABRINA just wiped" line "out the KARATE" cont "MASTER next door!" done -_SaffronGymBattleText5:: ; a213c (28:613c) +_SaffronGymBattleText5:: text "You and I, our" line "#MON shall" cont "fight!" done -_SaffronGymEndBattleText5:: ; a215e (28:615e) +_SaffronGymEndBattleText5:: text "I lost" line "after all!" prompt -_SaffronGymAfterBattleText5:: ; a2171 (28:6171) +_SaffronGymAfterBattleText5:: text "I knew that this" line "was going to take" cont "place." done -_SaffronGymBattleText6:: ; a219c (28:619c) +_SaffronGymBattleText6:: text "SABRINA is young," line "but she's also" cont "our LEADER!" @@ -202,12 +198,12 @@ _SaffronGymBattleText6:: ; a219c (28:619c) line "her easily!" done -_SaffronGymEndBattleText6:: ; a21e4 (28:61e4) +_SaffronGymEndBattleText6:: text "I lost" line "my concentration!" prompt -_SaffronGymAfterBattleText6:: ; a21fe (28:61fe) +_SaffronGymAfterBattleText6:: text "There used to be" line "2 #MON GYMs in" cont "SAFFRON." @@ -219,7 +215,7 @@ _SaffronGymAfterBattleText6:: ; a21fe (28:61fe) cont "creamed them!" done -_SaffronGymBattleText7:: ; a2277 (28:6277) +_SaffronGymBattleText7:: text "SAFFRON #MON" line "GYM is famous for" cont "its psychics!" @@ -229,13 +225,12 @@ _SaffronGymBattleText7:: ; a2277 (28:6277) cont "I can tell!" done -_SaffronGymEndBattleText7:: ; a22ca (28:62ca) +_SaffronGymEndBattleText7:: text "Arrrgh!" prompt -_SaffronGymAfterBattleText7:: ; a22d3 (28:62d3) +_SaffronGymAfterBattleText7:: text "That's right! I" line "used telepathy to" cont "read your mind!" done - diff --git a/text/maps/saffron_house.asm b/text/maps/saffron_house.asm index 9741303a..214bf089 100644 --- a/text/maps/saffron_house.asm +++ b/text/maps/saffron_house.asm @@ -1,4 +1,4 @@ -_SaffronHouse1Text1:: ; a2305 (28:6305) +_SaffronHouse1Text1:: text "Thank you for" line "writing. I hope" cont "to see you soon!" @@ -7,16 +7,16 @@ _SaffronHouse1Text1:: ; a2305 (28:6305) line "at my letter!" done -_SaffronHouse1Text2:: ; a2352 (28:6352) +_SaffronHouse1Text2:: text "PIDGEY: Kurukkoo!@@" -_SaffronHouse1Text3:: ; a2366 (28:6366) +_SaffronHouse1Text3:: text "The COPYCAT is" line "cute! I'm getting" cont "her a # DOLL!" done -_SaffronHouse1Text4:: ; a2395 (28:6395) +_SaffronHouse1Text4:: text "I was given a PP" line "UP as a gift." @@ -24,4 +24,3 @@ _SaffronHouse1Text4:: ; a2395 (28:6395) line "increasing the PP" cont "of techniques!" done - diff --git a/text/maps/saffron_mart.asm b/text/maps/saffron_mart.asm index 703e9b0a..a43b0d94 100644 --- a/text/maps/saffron_mart.asm +++ b/text/maps/saffron_mart.asm @@ -1,4 +1,4 @@ -_SaffronMartText2:: ; a23e3 (28:63e3) +_SaffronMartText2:: text "MAX REPEL lasts" line "longer than SUPER" cont "REPEL for keeping" @@ -6,9 +6,8 @@ _SaffronMartText2:: ; a23e3 (28:63e3) cont "away!" done -_SaffronMartText3:: ; a242a (28:642a) +_SaffronMartText3:: text "REVIVE is costly," line "but it revives" cont "fainted #MON!" done - diff --git a/text/maps/saffron_pokecenter.asm b/text/maps/saffron_pokecenter.asm index 71aad5e6..6548aff8 100644 --- a/text/maps/saffron_pokecenter.asm +++ b/text/maps/saffron_pokecenter.asm @@ -1,13 +1,12 @@ -_SaffronPokecenterText1:: ; a248e (28:648e) +_SaffronPokecenterText2:: text "#MON growth" line "rates differ from" cont "specie to specie." done -_SaffronPokecenterText3:: ; a24bf (28:64bf) +_SaffronPokecenterText3:: text "SILPH CO. is very" line "famous. That's" cont "why it attracted" cont "TEAM ROCKET!" done - diff --git a/text/maps/school.asm b/text/maps/school.asm index 9bdd9004..f6041e0d 100644 --- a/text/maps/school.asm +++ b/text/maps/school.asm @@ -1,18 +1,10 @@ -_SchoolText1:: ; 95d15 (25:5d15) +_SchoolText1:: text "Whew! I'm trying" line "to memorize all" cont "my notes." done -IF DEF(_YELLOW) -_SchoolText3:: - text "Sis says #MON" - line "will become tame" - cont "if you treat them" - cont "nicely." -ENDC - -_SchoolText2:: ; 95d40 (25:5d40) +_SchoolText2:: text "Okay!" para "Be sure to read" diff --git a/text/maps/seafoam_islands_1f.asm b/text/maps/seafoam_islands_1f.asm deleted file mode 100644 index 139597f9..00000000 --- a/text/maps/seafoam_islands_1f.asm +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/text/maps/seafoam_islands_b1f.asm b/text/maps/seafoam_islands_b1f.asm deleted file mode 100644 index 139597f9..00000000 --- a/text/maps/seafoam_islands_b1f.asm +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/text/maps/seafoam_islands_b2f.asm b/text/maps/seafoam_islands_b2f.asm deleted file mode 100644 index 139597f9..00000000 --- a/text/maps/seafoam_islands_b2f.asm +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/text/maps/seafoam_islands_b3f.asm b/text/maps/seafoam_islands_b3f.asm deleted file mode 100644 index 139597f9..00000000 --- a/text/maps/seafoam_islands_b3f.asm +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/text/maps/seafoam_islands_b4f.asm b/text/maps/seafoam_islands_b4f.asm index 429f426b..608d165f 100644 --- a/text/maps/seafoam_islands_b4f.asm +++ b/text/maps/seafoam_islands_b4f.asm @@ -1,14 +1,13 @@ -_SeafoamIslands5BattleText2:: ; 88075 (22:4075) +_ArticunoBattleText:: text "Gyaoo!@@" -_SeafoamIslands5Text4:: ; 8807e (22:407e) +_SeafoamIslands5Text4:: text "Boulders might" line "change the flow" cont "of water!" done -_SeafoamIslands5Text5:: ; 880a8 (22:40a8) +_SeafoamIslands5Text5:: text "DANGER" line "Fast current!" done - diff --git a/text/maps/silph_co_10f.asm b/text/maps/silph_co_10f.asm index 75aa6003..e916c64a 100644 --- a/text/maps/silph_co_10f.asm +++ b/text/maps/silph_co_10f.asm @@ -1,68 +1,42 @@ -_SilphCo10Text_5a1d3:: ; 84d8d (21:4d8d) +_SilphCo10Text_5a1d3:: text "Waaaaa!" cont "I'm scared!" done -_SilphCo10Text_5a1d8:: ; 84da1 (21:4da1) +_SilphCo10Text_5a1d8:: text "Please keep quiet" line "about my crying!" done -_SilphCo10BattleText1:: ; 84dc5 (21:4dc5) +_SilphCo10BattleText1:: text "Welcome to the" line "10F! So good of" cont "you to join me!" done -_SilphCo10EndBattleText1:: ; 84df5 (21:4df5) +_SilphCo10EndBattleText1:: text "I'm" line "stunned!" prompt -_SilphCo10AfterBattleText1:: ; 84e02 (21:4e02) +_SilphCo10AfterBattleText1:: text "Nice try, but the" line "boardroom is up" cont "one more floor!" done -_SilphCo10BattleText2:: ; 84e35 (21:4e35) +_SilphCo10BattleText2:: text "Enough of your" line "silly games!" done -_SilphCo10EndBattleText2:: ; 84e52 (21:4e52) +_SilphCo10EndBattleText2:: text "No" line "continues left!" prompt -_SilphCo10AfterBattleText2:: ; 84e66 (21:4e66) +_SilphCo10AfterBattleText2:: text "Are you satisfied" line "with beating me?" cont "Then go on home!" done - -IF DEF(_YELLOW) -_SilphCoJessieJamesText1:: - text "Hold it right" - line "there, brat!@@" - -_SilphCoJessieJamesText2:: - text "Our BOSS is in a" - line "meeting!" - - para "You better not" - line "disturb him!" - done - -_SilphCoJessieJamesText3:: - text "Like" - line "always..." - prompt - -_SilphCoJessieJamesText4:: - text "TEAM ROCKET, blast" - line "off at the speed" - cont "of light!" - - para "Again...@@" -ENDC diff --git a/text/maps/silph_co_11f.asm b/text/maps/silph_co_11f.asm index 3dbeee95..8e7a3848 100644 --- a/text/maps/silph_co_11f.asm +++ b/text/maps/silph_co_11f.asm @@ -1,4 +1,4 @@ -_SilphCoPresidentText:: ; 84e9b (21:4e9b) +_SilphCoPresidentText:: text "PRESIDENT: Thank" line "you for saving" cont "SILPH!" @@ -19,13 +19,13 @@ _SilphCoPresidentText:: ; 84e9b (21:4e9b) line "will do!" prompt -_ReceivedSilphCoMasterBallText:: ; 84f63 (21:4f63) +_ReceivedSilphCoMasterBallText:: text $52, " got a" line "@" TX_RAM wcf4b text "!@@" -_SilphCo10Text_6231c:: ; 84f74 (21:4f74) +_SilphCo10Text_6231c:: text "PRESIDENT: You" line "can't buy that" cont "anywhere!" @@ -43,12 +43,12 @@ _SilphCo10Text_6231c:: ; 84f74 (21:4f74) cont "it, though." done -_SilphCoMasterBallNoRoomText:: ; 85013 (21:5013) +_SilphCoMasterBallNoRoomText:: text "You have no" line "room for this." done -_SilphCo11Text2:: ; 8502f (21:502f) +_SilphCo11Text2:: text "SECRETARY: Thank" line "you for rescuing" cont "all of us!" @@ -57,12 +57,8 @@ _SilphCo11Text2:: ; 8502f (21:502f) line "courage." done -_SilphCo11Text3:: ; 85075 (21:5075) -IF DEF(_YELLOW) - text "Ah, ", $52, "!" -ELSE - text "Ah ", $52, "!" -ENDC +_SilphCo11Text3:: + text "Ah <PLAYER>!" line "So we meet again!" para "The PRESIDENT and" @@ -74,20 +70,16 @@ ENDC line "out of grown-up" cont "matters..." -IF DEF(_YELLOW) - para "or, experience a" -ELSE para "Or, experience a" -ENDC line "world of pain!" done -_SilphCo10Text_62330:: ; 85119 (21:5119) +_SilphCo10Text_62330:: text "Arrgh!!" line "I lost again!?" prompt -_SilphCo10Text_62335:: ; 85131 (21:5131) +_SilphCo10Text_62335:: text "Blast it all!" line "You ruined our" cont "plans for SILPH!" @@ -104,40 +96,39 @@ _SilphCo10Text_62335:: ; 85131 (21:5131) line "shall return!" done -_SilphCo11BattleText1:: ; 851d6 (21:51d6) +_SilphCo11BattleText1:: text "Stop right there!" line "Don't you move!" done -_SilphCo11EndBattleText1:: ; 851f8 (21:51f8) +_SilphCo11EndBattleText1:: text "Don't..." line "Please!" prompt -_SilphCo11AfterBattleText1:: ; 85209 (21:5209) +_SilphCo11AfterBattleText1:: text "So, you want to" line "see my BOSS?" done -_SilphCo11BattleText2:: ; 85227 (21:5227) +_SilphCo11BattleText2:: text "Halt! Do you have" line "an appointment" cont "with my BOSS?" done -_SilphCo11EndBattleText2:: ; 85257 (21:5257) +_SilphCo11EndBattleText2:: text "Gaah!" line "Demolished!" prompt -_SilphCo11AfterBattleText2:: ; 8526a (21:526a) +_SilphCo11AfterBattleText2:: text "Watch your step," line "my BOSS likes his" cont "#MON tough!" done -_SilphCo10Text_6237b:: ; 8529a (21:529a) +_SilphCo10Text_6237b:: text "The monitor has" line "#MON on it!" done - diff --git a/text/maps/silph_co_1f.asm b/text/maps/silph_co_1f.asm index fb25635d..1ef80189 100644 --- a/text/maps/silph_co_1f.asm +++ b/text/maps/silph_co_1f.asm @@ -1,8 +1,7 @@ -_SilphCo1Text1:: ; a245a (28:645a) +_SilphCo1Text1:: text "Welcome!" para "The PRESIDENT is" line "in the boardroom" cont "on 11F!" done - diff --git a/text/maps/silph_co_2f.asm b/text/maps/silph_co_2f.asm index 4437880c..a48ebd23 100644 --- a/text/maps/silph_co_2f.asm +++ b/text/maps/silph_co_2f.asm @@ -1,4 +1,4 @@ -_SilphCo2Text_59ded:: ; 82454 (20:6454) +_SilphCo2Text_59ded:: text "Eeek!" line "No! Stop! Help!" @@ -9,13 +9,13 @@ _SilphCo2Text_59ded:: ; 82454 (20:6454) cont "please take this!" prompt -_ReceivedTM36Text:: ; 824ba (20:64ba) +_ReceivedTM36Text:: text $52, " got" line "@" TX_RAM wcf4b text "!@@" -_TM36ExplanationText:: ; 824c9 (20:64c9) +_TM36ExplanationText:: text "TM36 is" line "SELFDESTRUCT!" @@ -25,58 +25,54 @@ _TM36ExplanationText:: ; 824c9 (20:64c9) cont "Be careful." done -_TM36NoRoomText:: ; 8251c (20:651c) +_TM36NoRoomText:: text "You don't have any" line "room for this." done -_SilphCo2BattleText1:: ; 8253e (20:653e) +_SilphCo2BattleText1:: text "Help! I'm a SILPH" line "employee." done -_SilphCo2EndBattleText1:: ; 8255a (20:655a) +_SilphCo2EndBattleText1:: text "How" line "did you know I" cont "was a ROCKET?" prompt -_SilphCo2AfterBattleText1:: ; 8257c (20:657c) +_SilphCo2AfterBattleText1:: text "I work for both" line "SILPH and TEAM" cont "ROCKET!" done -_SilphCo2BattleText2:: ; 825a4 (20:65a4) +_SilphCo2BattleText2:: text "It's off limits" line "here! Go home!" done -_SilphCo2EndBattleText2:: ; 825c3 (20:65c3) +_SilphCo2EndBattleText2:: text "You're" line "good." prompt -_SilphCo2AfterBattleText2:: ; 825d0 (20:65d0) +_SilphCo2AfterBattleText2:: text "Can you solve the" line "maze in here?" done -_SilphCo2BattleText3:: ; 825f1 (20:65f1) +_SilphCo2BattleText3:: text "No kids are" line "allowed in here!" done -_SilphCo2EndBattleText3:: ; 8260f (20:660f) +_SilphCo2EndBattleText3:: text "Tough!" prompt -_SilphCo2AfterBattleText3:: ; 82617 (20:6617) -IF DEF(_YELLOW) - text "Diamond-shaped" -ELSE +_SilphCo2AfterBattleText3:: text "Diamond shaped" -ENDC line "tiles are" cont "teleport blocks!" @@ -84,18 +80,17 @@ ENDC line "transporters!" done -_SilphCo2BattleText4:: ; 8265f (20:665f) +_SilphCo2BattleText4:: text "Hey kid! What are" line "you doing here?" done -_SilphCo2EndBattleText4:: ; 82682 (20:6682) +_SilphCo2EndBattleText4:: text "I goofed!" prompt -_SilphCo2AfterBattleText4:: ; 8268d (20:668d) +_SilphCo2AfterBattleText4:: text "SILPH CO. will" line "be merged with" cont "TEAM ROCKET!" done - diff --git a/text/maps/silph_co_3f.asm b/text/maps/silph_co_3f.asm index 25d68018..a514d3ef 100644 --- a/text/maps/silph_co_3f.asm +++ b/text/maps/silph_co_3f.asm @@ -1,42 +1,42 @@ -_SilphCo3Text_59ff9:: ; 826b9 (20:66b9) +_SilphCo3Text_59ff9:: text "I work for SILPH." line "What should I do?" done -_SilphCo3Text_59ffe:: ; 826de (20:66de) +_SilphCo3Text_59ffe:: text $52, "! You and" line "your #MON" cont "saved us!" done -_SilphCo3BattleText1:: ; 826fe (20:66fe) +_SilphCo3BattleText1:: text "Quit messing with" line "us, kid!" done -_SilphCo3EndBattleText1:: ; 8271a (20:671a) +_SilphCo3EndBattleText1:: text "I give" line "up!" prompt -_SilphCo3AfterBattleText1:: ; 82726 (20:6726) +_SilphCo3AfterBattleText1:: text "A hint? You can" line "open doors with a" cont "CARD KEY!" done -_SilphCo3BattleText2:: ; 82753 (20:6753) +_SilphCo3BattleText2:: text "I support TEAM" line "ROCKET more than" cont "I support SILPH!" done -_SilphCo3EndBattleText2:: ; 82785 (20:6785) +_SilphCo3EndBattleText2:: text "You" line "really got me!" prompt -_SilphCo3AfterBattleText2:: ; 82799 (20:6799) +_SilphCo3AfterBattleText2:: text "Humph..." para "TEAM ROCKET said" @@ -44,4 +44,3 @@ _SilphCo3AfterBattleText2:: ; 82799 (20:6799) cont "them, they'd let" cont "me study #MON!" done - diff --git a/text/maps/silph_co_4f.asm b/text/maps/silph_co_4f.asm index 309da28c..5b484ec7 100644 --- a/text/maps/silph_co_4f.asm +++ b/text/maps/silph_co_4f.asm @@ -1,57 +1,56 @@ -_SilphCo4Text_19de0:: ; 827e4 (20:67e4) +_SilphCo4Text_19de0:: text "Sssh! Can't you" line "see I'm hiding?" done -_SilphCo4Text_19de5:: ; 82803 (20:6803) +_SilphCo4Text_19de5:: text "Huh? TEAM ROCKET" line "is gone?" done -_SilphCo4BattleText2:: ; 8281e (20:681e) +_SilphCo4BattleText2:: text "TEAM ROCKET has" line "taken command of" cont "SILPH CO.!" done -_SilphCo4EndBattleText2:: ; 8284b (20:684b) +_SilphCo4EndBattleText2:: text "Arrgh!" prompt -_SilphCo4AfterBattleText2:: ; 82853 (20:6853) +_SilphCo4AfterBattleText2:: text "Fwahahaha!" line "My BOSS has been" cont "after this place!" done -_SilphCo4BattleText3:: ; 82882 (20:6882) +_SilphCo4BattleText3:: text "My #MON are my" line "loyal soldiers!" done -_SilphCo4EndBattleText3:: ; 828a2 (20:68a2) +_SilphCo4EndBattleText3:: text "Darn!" line "You weak #MON!" prompt -_SilphCo4AfterBattleText3:: ; 828b8 (20:68b8) +_SilphCo4AfterBattleText3:: text "The doors are" line "electronically" cont "locked! A CARD" cont "KEY opens them!" done -_SilphCo4BattleText4:: ; 828f5 (20:68f5) +_SilphCo4BattleText4:: text "Intruder spotted!" done -_SilphCo4EndBattleText4:: ; 82908 (20:6908) +_SilphCo4EndBattleText4:: text "Who" line "are you?" prompt -_SilphCo4AfterBattleText4:: ; 82916 (20:6916) +_SilphCo4AfterBattleText4:: text "I better tell the" line "BOSS on 11F!" done - diff --git a/text/maps/silph_co_5f_1.asm b/text/maps/silph_co_5f_1.asm index 7435c910..dab42539 100644 --- a/text/maps/silph_co_5f_1.asm +++ b/text/maps/silph_co_5f_1.asm @@ -1,56 +1,51 @@ -_SilphCo5Text_1a010:: ; 82936 (20:6936) +_SilphCo5Text_1a010:: text "TEAM ROCKET is" line "in an uproar over" cont "some intruder." cont "That's you right?" done -_SilphCo5Text_1a015:: ; 82978 (20:6978) +_SilphCo5Text_1a015:: text "TEAM ROCKET took" line "off! You're our" cont "hero! Thank you!" done -_SilphCo5BattleText2:: ; 829aa (20:69aa) +_SilphCo5BattleText2:: text "I heard a kid was" line "wandering around." done -_SilphCo5EndBattleText2:: ; 829cf (20:69cf) +_SilphCo5EndBattleText2:: text "Boom!" prompt -_SilphCo5AfterBattleText2:: ; 829d6 (20:69d6) +_SilphCo5AfterBattleText2:: text "It's not smart" line "to pick a fight" cont "with TEAM ROCKET!" done -_SilphCo5BattleText3:: ; 82a07 (20:6a07) +_SilphCo5BattleText3:: text "We study #" line "BALL technology" cont "on this floor!" done -_SilphCo5EndBattleText3:: ; 82a32 (20:6a32) +_SilphCo5EndBattleText3:: text "Dang!" line "Blast it!" prompt -_SilphCo5AfterBattleText3:: ; 82a43 (20:6a43) +_SilphCo5AfterBattleText3:: text "We worked on the" line "ultimate #" cont "BALL which would" cont "catch anything!" done -_SilphCo5BattleText4:: ; 82a81 (20:6a81) +_SilphCo5BattleText4:: text "Whaaat? There" line "shouldn't be any" -IF DEF(_YELLOW) - cont "children here!" -ELSE cont "children here?" -ENDC done - diff --git a/text/maps/silph_co_5f_2.asm b/text/maps/silph_co_5f_2.asm index bb94eb6b..3c1b8ead 100644 --- a/text/maps/silph_co_5f_2.asm +++ b/text/maps/silph_co_5f_2.asm @@ -1,32 +1,32 @@ -_SilphCo5EndBattleText4:: ; 84000 (21:4000) +_SilphCo5EndBattleText4:: text "Oh" line "goodness!" prompt -_SilphCo5AfterBattleText4:: ; 8400e (21:400e) +_SilphCo5AfterBattleText4:: text "You're only on 5F." line "It's a long way" cont "to my BOSS!" done -_SilphCo5BattleText5:: ; 8403c (21:403c) +_SilphCo5BattleText5:: text "Show TEAM ROCKET" line "a little respect!" done -_SilphCo5EndBattleText5:: ; 84060 (21:4060) +_SilphCo5EndBattleText5:: text "Cough..." line "Cough..." prompt -_SilphCo5AfterBattleText5:: ; 84073 (21:4073) +_SilphCo5AfterBattleText5:: text "Which reminds me." para "KOFFING evolves" line "into WEEZING!" done -_SilphCo5Text9:: ; 840a4 (21:40a4) +_SilphCo5Text9:: text "It's a #MON" line "REPORT!" @@ -36,7 +36,7 @@ _SilphCo5Text9:: ; 840a4 (21:40a4) cont "reality #MON." done -_SilphCo5Text10:: ; 840f2 (21:40f2) +_SilphCo5Text10:: text "It's a #MON" line "REPORT!" @@ -45,7 +45,7 @@ _SilphCo5Text10:: ; 840f2 (21:40f2) cont "been confirmed." done -_SilphCo5Text11:: ; 84134 (21:4134) +_SilphCo5Text11:: text "It's a #MON" line "REPORT!" @@ -53,4 +53,3 @@ _SilphCo5Text11:: ; 84134 (21:4134) line "only when traded" cont "by link-cable." done - diff --git a/text/maps/silph_co_6f.asm b/text/maps/silph_co_6f.asm index b3bf71b6..90456b5c 100644 --- a/text/maps/silph_co_6f.asm +++ b/text/maps/silph_co_6f.asm @@ -1,77 +1,77 @@ -_SilphCo6Text_1a24a:: ; 84176 (21:4176) +_SilphCo6Text_1a24a:: text "The ROCKETs came" line "and took over the" cont "building!" done -_SilphCo6Text_1a24f:: ; 841a4 (21:41a4) +_SilphCo6Text_1a24f:: text "Well, better get" line "back to work!" done -_SilphCo6Text_1a261:: ; 841c4 (21:41c4) +_SilphCo6Text_1a261:: text "Oh dear, oh dear." line "Help me please!" done -_SilphCo6Text_1a266:: ; 841e7 (21:41e7) +_SilphCo6Text_1a266:: text "We got engaged!" line "Heheh!" done -_SilphCo6Text_1a278:: ; 841ff (21:41ff) +_SilphCo6Text_1a278:: text "Look at him! He's" line "such a coward!" done -_SilphCo6Text_1a27d:: ; 84220 (21:4220) +_SilphCo6Text_1a27d:: text "I feel so sorry" line "for him, I have" cont "to marry him!" done -_SilphCo6Text_1a28f:: ; 8424f (21:424f) +_SilphCo6Text_1a28f:: text "TEAM ROCKET is" line "trying to conquer" cont "the world with" cont "#MON!" done -_SilphCo6Text_1a294:: ; 84286 (21:4286) +_SilphCo6Text_1a294:: text "TEAM ROCKET ran" line "because of you!" done -_SilphCo6Text_1a2a6:: ; 842a7 (21:42a7) +_SilphCo6Text_1a2a6:: text "They must have" line "targeted SILPH" cont "for our #MON" cont "products." done -_SilphCo6Text_1a2ab:: ; 842dd (21:42dd) +_SilphCo6Text_1a2ab:: text "Come work for" line "SILPH when you" cont "get older!" done -_SilphCo6BattleText2:: ; 84306 (21:4306) +_SilphCo6BattleText2:: text "I am one of the 4" line "ROCKET BROTHERS!" done -_SilphCo6EndBattleText2:: ; 8432a (21:432a) +_SilphCo6EndBattleText2:: text "Flame" line "out!" prompt -_SilphCo6AfterBattleText2:: ; 84336 (21:4336) +_SilphCo6AfterBattleText2:: text "No matter!" line "My brothers will" cont "avenge me!" done -_SilphCo6BattleText3:: ; 8435e (21:435e) +_SilphCo6BattleText3:: text "That rotten" line "PRESIDENT!" @@ -80,29 +80,28 @@ _SilphCo6BattleText3:: ; 8435e (21:435e) cont "TIKSI BRANCH!" done -_SilphCo6EndBattleText3:: ; 843a4 (21:43a4) +_SilphCo6EndBattleText3:: text "Shoot!" prompt -_SilphCo6AfterBattleText3:: ; 843ac (21:43ac) +_SilphCo6AfterBattleText3:: text "TIKSI BRANCH?" line "It's in Russian" cont "no man's land!" done -_SilphCo6BattleText4:: ; 843d8 (21:43d8) +_SilphCo6BattleText4:: text "You dare betray" line "TEAM ROCKET?" done -_SilphCo6EndBattleText4:: ; 843f6 (21:43f6) +_SilphCo6EndBattleText4:: text "You" line "traitor!" prompt -_SilphCo6AfterBattleText4:: ; 84404 (21:4404) +_SilphCo6AfterBattleText4:: text "If you stand for" line "justice, you" cont "betray evil!" done - diff --git a/text/maps/silph_co_7f.asm b/text/maps/silph_co_7f.asm index 5b56ad43..e6ad11c1 100644 --- a/text/maps/silph_co_7f.asm +++ b/text/maps/silph_co_7f.asm @@ -78,82 +78,78 @@ _SilphCo7Text_51e4b:: line "Oh thank you!" done -_SilphCo7BattleText1:: ; 846ff (21:46ff) -IF DEF(_YELLOW) - text "Aha! I smell a" -ELSE +_SilphCo7BattleText1:: text "Oh ho! I smell a" -ENDC line "little rat!" done -_SilphCo7EndBattleText1:: ; 8471d (21:471d) +_SilphCo7EndBattleText1:: text "Lights" line "out!" prompt -_SilphCo7AfterBattleText1:: ; 8472a (21:472a) +_SilphCo7AfterBattleText1:: text "You won't find my" line "BOSS by just" cont "scurrying around!" done -_SilphCo7BattleText2:: ; 8475b (21:475b) +_SilphCo7BattleText2:: text "Heheh!" para "You mistook me for" line "a SILPH worker?" done -_SilphCo7EndBattleText2:: ; 84786 (21:4786) +_SilphCo7EndBattleText2:: text "I'm" line "done!" prompt -_SilphCo7AfterBattleText2:: ; 84790 (21:4790) +_SilphCo7AfterBattleText2:: text "Despite your age," line "you are a skilled" cont "trainer!" done -_SilphCo7BattleText3:: ; 847be (21:47be) +_SilphCo7BattleText3:: text "I am one of the 4" line "ROCKET BROTHERS!" done -_SilphCo7EndBattleText3:: ; 847e2 (21:47e2) +_SilphCo7EndBattleText3:: text "Aack!" line "Brothers, I lost!" prompt -_SilphCo7AfterBattleText3:: ; 847fb (21:47fb) +_SilphCo7AfterBattleText3:: text "Doesn't matter." line "My brothers will" cont "repay the favor!" done -_SilphCo7BattleText4:: ; 8482d (21:482d) +_SilphCo7BattleText4:: text "A child intruder?" line "That must be you!" done -_SilphCo7EndBattleText4:: ; 84852 (21:4852) +_SilphCo7EndBattleText4:: text "Fine!" line "I lost!" prompt -_SilphCo7AfterBattleText4:: ; 84861 (21:4861) +_SilphCo7AfterBattleText4:: text "Go on home" line "before my BOSS" cont "gets ticked off!" done -_SilphCo7Text_51ebe:: ; 8488d (21:488d) +_SilphCo7Text_51ebe:: text $53, ": What" line "kept you ", $52, "?" done -_SilphCo7Text_51ec3:: ; 848a2 (21:48a2) +_SilphCo7Text_51ec3:: text $53, ": Hahaha!" line "I thought you'd" cont "turn up if I" @@ -170,17 +166,13 @@ _SilphCo7Text_51ec3:: ; 848a2 (21:48a2) cont "you got better!" done -_SilphCo7Text_51ec8:: ; 8494a (21:494a) -IF DEF(_YELLOW) - text "Oh-oh!" -ELSE +_SilphCo7Text_51ec8:: text "Oh ho!" -ENDC line "So, you are ready" cont "for BOSS ROCKET!" prompt -_SilphCo7Text_51ecd:: ; 84975 (21:4975) +_SilphCo7Text_51ecd:: text $53, ": How can" line "I put this?" @@ -189,7 +181,7 @@ _SilphCo7Text_51ecd:: ; 84975 (21:4975) cont "with us big boys!" prompt -_SilphCo7Text_51ed2:: ; 849bd (21:49bd) +_SilphCo7Text_51ed2:: text "Well, ", $52, "!" para "I'm moving on up" @@ -215,4 +207,3 @@ _SilphCo7Text_51ed2:: ; 849bd (21:49bd) cont "Don't sweat it!" cont "Smell ya!" done - diff --git a/text/maps/silph_co_8f.asm b/text/maps/silph_co_8f.asm index 900e134f..fabae5e6 100644 --- a/text/maps/silph_co_8f.asm +++ b/text/maps/silph_co_8f.asm @@ -1,57 +1,56 @@ -_SilphCo8Text_565be:: ; 84ac4 (21:4ac4) +_SilphCo8Text_565be:: text "I wonder if SILPH" line "is finished..." done -_SilphCo8Text_565c3:: ; 84ae6 (21:4ae6) +_SilphCo8Text_565c3:: text "Thanks for saving" line "us!" done -_SilphCo8BattleText1:: ; 84afd (21:4afd) +_SilphCo8BattleText1:: text "That's as far as" line "you'll go!" done -_SilphCo8EndBattleText1:: ; 84b18 (21:4b18) +_SilphCo8EndBattleText1:: text "Not" line "enough grit!" prompt -_SilphCo8AfterBattleText1:: ; 84b2a (21:4b2a) +_SilphCo8AfterBattleText1:: text "If you don't turn" line "back, I'll call" cont "for backup!" done -_SilphCo8BattleText2:: ; 84b57 (21:4b57) +_SilphCo8BattleText2:: text "You're causing us" line "problems!" done -_SilphCo8EndBattleText2:: ; 84b73 (21:4b73) +_SilphCo8EndBattleText2:: text "Huh?" line "I lost?" prompt -_SilphCo8AfterBattleText2:: ; 84b81 (21:4b81) +_SilphCo8AfterBattleText2:: text "So, what do you" line "think of SILPH" cont "BUILDING's maze?" done -_SilphCo8BattleText3:: ; 84bb1 (21:4bb1) +_SilphCo8BattleText3:: text "I am one of the 4" line "ROCKET BROTHERS!" done -_SilphCo8EndBattleText3:: ; 84bd5 (21:4bd5) +_SilphCo8EndBattleText3:: text "Whoo!" line "Oh brothers!" prompt -_SilphCo8AfterBattleText3:: ; 84be9 (21:4be9) +_SilphCo8AfterBattleText3:: text "I'll leave you up" line "to my brothers!" done - diff --git a/text/maps/silph_co_9f.asm b/text/maps/silph_co_9f.asm index 6854b081..fd1aa91c 100644 --- a/text/maps/silph_co_9f.asm +++ b/text/maps/silph_co_9f.asm @@ -1,63 +1,62 @@ -_SilphCo9Text_5d8e5:: ; 84c0b (21:4c0b) +_SilphCo9Text_5d8e5:: text "You look tired!" line "You should take a" cont "quick nap!" prompt -_SilphCo9Text_5d8ea:: ; 84c39 (21:4c39) +_SilphCo9Text_5d8ea:: text "Don't give up!" done -_SilphCo9Text_5d8ef:: ; 84c48 (21:4c48) +_SilphCo9Text_5d8ef:: text "Thank you so" line "much!" done -_SilphCo9BattleText1:: ; 84c5c (21:4c5c) +_SilphCo9BattleText1:: text "Your #MON seem" line "to adore you, kid!" done -_SilphCo9EndBattleText1:: ; 84c7f (21:4c7f) +_SilphCo9EndBattleText1:: text "Ghaaah!" prompt -_SilphCo9AfterBattleText1:: ; 84c88 (21:4c88) +_SilphCo9AfterBattleText1:: text "If I had started" line "as a trainer at" cont "your age..." done -_SilphCo9BattleText2:: ; 84cb6 (21:4cb6) +_SilphCo9BattleText2:: text "Your #MON have" line "weak points! I" cont "can nail them!" done -_SilphCo9EndBattleText2:: ; 84ce4 (21:4ce4) +_SilphCo9EndBattleText2:: text "You" line "hammered me!" prompt -_SilphCo9AfterBattleText2:: ; 84cf6 (21:4cf6) +_SilphCo9AfterBattleText2:: text "Exploiting weak" line "spots does work!" cont "Think about" cont "element types!" done -_SilphCo9BattleText3:: ; 84d33 (21:4d33) +_SilphCo9BattleText3:: text "I am one of the 4" line "ROCKET BROTHERS!" done -_SilphCo9EndBattleText3:: ; 84d57 (21:4d57) +_SilphCo9EndBattleText3:: text "Warg!" line "Brothers, I lost!" prompt -_SilphCo9AfterBattleText3:: ; 84d70 (21:4d70) +_SilphCo9AfterBattleText3:: text "My brothers will" line "avenge me!" done - diff --git a/text/maps/ss_anne_1.asm b/text/maps/ss_anne_1.asm index 2236ca52..2bbdcbac 100644 --- a/text/maps/ss_anne_1.asm +++ b/text/maps/ss_anne_1.asm @@ -1,4 +1,4 @@ -_SSAnne1Text1:: ; 80c70 (20:4c70) +_SSAnne1Text1:: text "Bonjour!" line "I am le waiter on" cont "this ship!" @@ -11,7 +11,7 @@ _SSAnne1Text1:: ; 80c70 (20:4c70) line "silent type!" done -_SSAnne1Text2:: ; 80ce6 (20:4ce6) +_SSAnne1Text2:: text "The passengers" line "are restless!" @@ -19,4 +19,3 @@ _SSAnne1Text2:: ; 80ce6 (20:4ce6) line "challenged by the" cont "more bored ones!" done - diff --git a/text/maps/ss_anne_10.asm b/text/maps/ss_anne_10.asm index cf1d0ce5..7df629b5 100644 --- a/text/maps/ss_anne_10.asm +++ b/text/maps/ss_anne_10.asm @@ -1,88 +1,88 @@ -_SSAnne10Text8:: ; 81aaa (20:5aaa) +_SSAnne10Text8:: text "MACHOKE: Gwoh!" line "Goggoh!@@" -_SSAnne10BattleText1:: ; 81ac3 (20:5ac3) +_SSAnne10BattleText1:: text "You know what they" line "say about sailors" cont "and fighting!" done -_SSAnne10EndBattleText1:: ; 81af7 (20:5af7) +_SSAnne10EndBattleText1:: text "Right!" line "Good fight, mate!" prompt -_SSAnne10AfterBattleText1:: ; 81b11 (20:5b11) +_SSAnne10AfterBattleText1:: text "Haha! Want to be" line "a sailor, mate?" done -_SSAnne10BattleText2:: ; 81b33 (20:5b33) +_SSAnne10BattleText2:: text "My sailor's pride" line "is at stake!" done -_SSAnne10EndBattleText2:: ; 81b52 (20:5b52) +_SSAnne10EndBattleText2:: text "Your" line "spirit sank me!" prompt -_SSAnne10AfterBattleText2:: ; 81b68 (20:5b68) +_SSAnne10AfterBattleText2:: text "Did you see the" line "FISHING GURU in" cont "VERMILION CITY?" done -_SSAnne10BattleText3:: ; 81b99 (20:5b99) +_SSAnne10BattleText3:: text "Us sailors have" line "#MON too!" done -_SSAnne10EndBattleText3:: ; 81bb4 (20:5bb4) +_SSAnne10EndBattleText3:: text "OK, " line "you're not bad." prompt -_SSAnne10AfterBattleText3:: ; 81bc9 (20:5bc9) +_SSAnne10AfterBattleText3:: text "We caught all our" line "#MON while" cont "out at sea!" done -_SSAnne10BattleText4:: ; 81bf3 (20:5bf3) +_SSAnne10BattleText4:: text "I like feisty" line "kids like you!@@" -_SSAnne10EndBattleText4:: ; 81c12 (20:5c12) +_SSAnne10EndBattleText4:: text "Argh!" line "Lost it!" prompt -_SSAnne10AfterBattleText4:: ; 81c22 (20:5c22) +_SSAnne10AfterBattleText4:: text "Sea #MON live" line "in deep water." cont "You'll need a ROD!" done -_SSAnne10BattleText5:: ; 81c52 (20:5c52) +_SSAnne10BattleText5:: text "Matey, you're" line "walking the plank" cont "if you lose!" done -_SSAnne10EndBattleText5:: ; 81c7f (20:5c7f) +_SSAnne10EndBattleText5:: text "Argh!" line "Beaten by a kid!" prompt -_SSAnne10AfterBattleText5:: ; 81c97 (20:5c97) +_SSAnne10AfterBattleText5:: text "Jellyfish some-" line "times drift into" cont "the ship." done -_SSAnne10BattleText6:: ; 81cc3 (20:5cc3) +_SSAnne10BattleText6:: text "Hello stranger!" line "Stop and chat!" @@ -90,19 +90,19 @@ _SSAnne10BattleText6:: ; 81cc3 (20:5cc3) line "are from the sea!" done -_SSAnne10EndBattleText6:: ; 81d01 (20:5d01) +_SSAnne10EndBattleText6:: text "Darn!" line "I let that one" cont "get away!" prompt -_SSAnne10AfterBattleText6:: ; 81d21 (20:5d21) +_SSAnne10AfterBattleText6:: text "I was going to" line "make you my" cont "assistant too!" done -_SSAnne10Text7:: ; 81d4c (20:5d4c) +_SSAnne10Text7:: text "My buddy, MACHOKE," line "is super strong!" @@ -110,4 +110,3 @@ _SSAnne10Text7:: ; 81d4c (20:5d4c) line "STRENGTH to move" cont "big rocks!" done - diff --git a/text/maps/ss_anne_2.asm b/text/maps/ss_anne_2.asm index 0a29f8e6..ba231ac5 100644 --- a/text/maps/ss_anne_2.asm +++ b/text/maps/ss_anne_2.asm @@ -1,4 +1,4 @@ -_SSAnne2Text1:: ; 80d34 (20:4d34) +_SSAnne2Text1:: text "This ship, she is" line "a luxury liner" cont "for trainers!" @@ -8,7 +8,7 @@ _SSAnne2Text1:: ; 80d34 (20:4d34) cont "invited trainers!" done -_SSAnneRivalBeforeBattleText:: ; 80d9a (20:4d9a) +_SSAnneRivalBeforeBattleText:: text $53, ": Bonjour!" line $52, "!" @@ -31,7 +31,7 @@ _SSAnneRivalBeforeBattleText:: ; 80d9a (20:4d9a) line "grassy areas!" done -_SSAnneRivalDefeatedText:: ; 80e57 (20:4e57) +_SSAnneRivalDefeatedText:: text "Humph!" para "At least you're" @@ -39,7 +39,7 @@ _SSAnneRivalDefeatedText:: ; 80e57 (20:4e57) cont "#MON!" prompt -_SSAnneRivalWonText:: ; 80e81 (20:4e81) +_SSAnneRivalWonText:: text $52, "! What are" line "you, seasick?" @@ -47,7 +47,7 @@ _SSAnneRivalWonText:: ; 80e81 (20:4e81) line "up, pal!" prompt -_SSAnneRivalCaptainText:: ; 80eb6 (20:4eb6) +_SSAnneRivalCaptainText:: text $53, ": I heard" line "there was a CUT" cont "master on board." @@ -61,4 +61,3 @@ _SSAnneRivalCaptainText:: ; 80eb6 (20:4eb6) para "You should go see" line "him! Smell ya!" done - diff --git a/text/maps/ss_anne_3.asm b/text/maps/ss_anne_3.asm index de2c070d..76490594 100644 --- a/text/maps/ss_anne_3.asm +++ b/text/maps/ss_anne_3.asm @@ -1,8 +1,7 @@ -_SSAnne3Text1:: ; 80f4b (20:4f4b) +_SSAnne3Text1:: text "Our CAPTAIN is a" line "sword master!" para "He even teaches" line "CUT to #MON!" done - diff --git a/text/maps/ss_anne_4.asm b/text/maps/ss_anne_4.asm deleted file mode 100644 index 139597f9..00000000 --- a/text/maps/ss_anne_4.asm +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/text/maps/ss_anne_5.asm b/text/maps/ss_anne_5.asm index 2fdc5dd8..76cd5631 100644 --- a/text/maps/ss_anne_5.asm +++ b/text/maps/ss_anne_5.asm @@ -1,53 +1,52 @@ -_SSAnne5Text1:: ; 80f88 (20:4f88) +_SSAnne5Text1:: text "The party's over." line "The ship will be" cont "departing soon." done -_SSAnne5Text2:: ; 80fbb (20:4fbb) +_SSAnne5Text2:: text "Scrubbing decks" line "is hard work!" done -_SSAnne5Text3:: ; 80fda (20:4fda) +_SSAnne5Text3:: text "Urf. I feel ill." para "I stepped out to" line "get some air." done -_SSAnne5BattleText1:: ; 8100b (20:500b) +_SSAnne5BattleText1:: text "Hey matey!" para "Let's do a little" line "jig!" done -_SSAnne5EndBattleText1:: ; 8102d (20:502d) +_SSAnne5EndBattleText1:: text "You're" line "impressive!" prompt -_SSAnne5AfterBattleText1:: ; 81040 (20:5040) +_SSAnne5AfterBattleText1:: text "How many kinds of" line "#MON do you" cont "think there are?" done -_SSAnne5BattleText2:: ; 81070 (20:5070) +_SSAnne5BattleText2:: text "Ahoy there!" line "Are you seasick?" done -_SSAnne5EndBattleText2:: ; 8108e (20:508e) +_SSAnne5EndBattleText2:: text "I was" line "just careless!" prompt -_SSAnne5AfterBattleText2:: ; 810a4 (20:50a4) +_SSAnne5AfterBattleText2:: text "My Pa said there" line "are 100 kinds of" cont "#MON. I think" cont "there are more." done - diff --git a/text/maps/ss_anne_6.asm b/text/maps/ss_anne_6.asm index 59828a51..7fcc9973 100644 --- a/text/maps/ss_anne_6.asm +++ b/text/maps/ss_anne_6.asm @@ -1,20 +1,20 @@ -_SSAnne6Text1:: ; 810e5 (20:50e5) +_SSAnne6Text1:: text "You, mon petit!" line "We're busy here!" cont "Out of the way!" done -_SSAnne6Text2:: ; 81116 (20:5116) +_SSAnne6Text2:: text "I saw an odd ball" line "in the trash." done -_SSAnne6Text3:: ; 81137 (20:5137) +_SSAnne6Text3:: text "I'm so busy I'm" line "getting dizzy!" done -_SSAnne6Text4:: ; 81155 (20:5155) +_SSAnne6Text4:: text "Hum-de-hum-de-" line "ho..." @@ -23,7 +23,7 @@ _SSAnne6Text4:: ; 81155 (20:5155) cont "Hum-hum..." done -_SSAnne6Text5:: ; 8118e (20:518e) +_SSAnne6Text5:: text "Did you hear about" line "SNORLAX?" @@ -31,7 +31,7 @@ _SSAnne6Text5:: ; 8118e (20:518e) line "eat and sleep!" done -_SSAnne6Text6:: ; 811c9 (20:51c9) +_SSAnne6Text6:: text "Snivel...Sniff..." para "I only get to" @@ -39,36 +39,31 @@ _SSAnne6Text6:: ; 811c9 (20:51c9) cont "Snivel..." done -_SSAnne6Text_61807:: ; 81203 (20:5203) +_SSAnne6Text_61807:: text "Er-hem! Indeed I" line "am le CHEF!" para "Le main course is" prompt -_SSAnne6Text_6180c:: ; 81233 (20:5233) -IF DEF(_YELLOW) - text "Salade de Salmon!" -ELSE +_SSAnne6Text_6180c:: text "Salmon du Salad!" -ENDC para "Les guests may" line "gripe it's fish" cont "again, however!" done -_SSAnne6Text_61811:: ; 81273 (20:5273) +_SSAnne6Text_61811:: text "Eels au Barbecue!" para "Les guests will" line "mutiny, I fear." done -_SSAnne6Text_61816:: ; 812a6 (20:52a6) +_SSAnne6Text_61816:: text "Prime Beef Steak!" para "But, have I enough" line "fillets du beef?" done - diff --git a/text/maps/ss_anne_7.asm b/text/maps/ss_anne_7.asm index 2a770464..bb8ca042 100644 --- a/text/maps/ss_anne_7.asm +++ b/text/maps/ss_anne_7.asm @@ -1,4 +1,4 @@ -_SSAnne7RubText:: ; 812dd (20:52dd) +_SSAnne7RubText:: text "CAPTAIN: Ooargh..." line "I feel hideous..." cont "Urrp! Seasick..." @@ -10,7 +10,7 @@ _SSAnne7RubText:: ; 812dd (20:52dd) para "Rub-rub..." line "Rub-rub...@@" -_ReceivingHM01Text:: ; 81347 (20:5347) +_ReceivingHM01Text:: text "CAPTAIN: Whew!" line "Thank you! I" cont "feel much better!" @@ -27,45 +27,36 @@ _ReceivingHM01Text:: ; 81347 (20:5347) para "Teach it to your" line "#MON and you" cont "can see it CUT" -IF DEF(_YELLOW) - cont "anytime!" -ELSE cont "any time!" -ENDC prompt -_ReceivedHM01Text:: ; 8140d (20:540d) +_ReceivedHM01Text:: text $52, " got" line "@" TX_RAM wcf4b text "!@@" -_SSAnne7Text_61932:: ; 8141c (20:541c) +_SSAnne7Text_61932:: text "CAPTAIN: Whew!" para "Now that I'm not" -IF DEF(_YELLOW) - line "sick anymore, I" -ELSE line "sick any more, I" -ENDC cont "guess it's time." done -_HM01NoRoomText:: ; 8145d (20:545d) +_HM01NoRoomText:: text "Oh no! You have" line "no room for this!" done -_SSAnne7Text2:: ; 81480 (20:5480) +_SSAnne7Text2:: text "Yuck! Shouldn't" line "have looked!" done -_SSAnne7Text3:: ; 8149d (20:549d) +_SSAnne7Text3:: text "How to Conquer" line "Seasickness..." cont "The CAPTAIN's" cont "reading this!" done - diff --git a/text/maps/ss_anne_8.asm b/text/maps/ss_anne_8.asm index c44ad605..7a09303e 100644 --- a/text/maps/ss_anne_8.asm +++ b/text/maps/ss_anne_8.asm @@ -1,8 +1,8 @@ -_SSAnne8Text8:: ; 814d7 (20:54d7) +_SSAnne8Text8:: text "WIGGLYTUFF: Puup" line "pupuu!@@" -_SSAnne8BattleText1:: ; 814f1 (20:54f1) +_SSAnne8BattleText1:: text "I travel alone" line "on my journeys!" @@ -10,42 +10,42 @@ _SSAnne8BattleText1:: ; 814f1 (20:54f1) line "only friends!" done -_SSAnne8EndBattleText1:: ; 8152e (20:552e) +_SSAnne8EndBattleText1:: text "My, my" line "friends..." prompt -_SSAnne8AfterBattleText1:: ; 81541 (20:5541) +_SSAnne8AfterBattleText1:: text "You should be" line "nice to friends!" done -_SSAnne8BattleText2:: ; 81561 (20:5561) +_SSAnne8BattleText2:: text "You pup! How dare" line "you barge in!" done -_SSAnne8EndBattleText2:: ; 81582 (20:5582) +_SSAnne8EndBattleText2:: text "Humph!" line "You rude child!" prompt -_SSAnne8AfterBattleText2:: ; 8159a (20:559a) +_SSAnne8AfterBattleText2:: text "I wish to be left" line "alone! Get out!" done -_SSAnne8BattleText3:: ; 815bd (20:55bd) +_SSAnne8BattleText3:: text "I love #MON!" line "Do you?" done -_SSAnne8EndBattleText3:: ; 815d3 (20:55d3) +_SSAnne8EndBattleText3:: text "Wow! " line "You're great!" prompt -_SSAnne8AfterBattleText3:: ; 815e7 (20:55e7) +_SSAnne8AfterBattleText3:: text "Let me be your" line "friend, OK?" @@ -53,19 +53,19 @@ _SSAnne8AfterBattleText3:: ; 815e7 (20:55e7) line "#MON!" done -_SSAnne8BattleText4:: ; 8161b (20:561b) +_SSAnne8BattleText4:: text "I collected these" line "#MON from all" cont "around the world!" done -_SSAnne8EndBattleText4:: ; 8164e (20:564e) +_SSAnne8EndBattleText4:: text "Oh no!" line "I went around the" cont "world for these!" prompt -_SSAnne8AfterBattleText4:: ; 81679 (20:5679) +_SSAnne8AfterBattleText4:: text "You hurt my poor" line "worldly #MON!" @@ -74,32 +74,31 @@ _SSAnne8AfterBattleText4:: ; 81679 (20:5679) cont "#MON CENTER!" done -_SSAnne8Text5:: ; 816c7 (20:56c7) +_SSAnne8Text5:: text "Waiter, I would" line "like a cherry pie" cont "please!" done -_SSAnne8Text6:: ; 816f2 (20:56f2) +_SSAnne8Text6:: text "A cruise is so" line "elegant yet cozy!" done -_SSAnne8Text7:: ; 81714 (20:5714) +_SSAnne8Text7:: text "I always travel" line "with WIGGLYTUFF!" done -_SSAnne8Text9:: ; 81736 (20:5736) +_SSAnne8Text9:: text "We are cruising" line "around the world." done -_SSAnne8Text11:: ; 81759 (20:5759) +_SSAnne8Text11:: text "Ssh! I'm a GLOBAL" line "POLICE agent!" para "I'm on the trail" line "of TEAM ROCKET!" done - diff --git a/text/maps/ss_anne_9.asm b/text/maps/ss_anne_9.asm index c96a7581..a9be8cee 100644 --- a/text/maps/ss_anne_9.asm +++ b/text/maps/ss_anne_9.asm @@ -1,9 +1,5 @@ -_SSAnne9Text_61bf2:: ; 81799 (20:5799) -IF DEF(_YELLOW) - text "In all my travels," -ELSE +_SSAnne9Text_61bf2:: text "In all my travels" -ENDC line "I've never seen" cont "any #MON sleep" cont "like this one!" @@ -12,19 +8,19 @@ ENDC line "like this!" prompt -_SSAnne9Text_61c01:: ; 817f5 (20:57f5) +_SSAnne9Text_61c01:: text "Ah yes, I have" line "seen some #MON" cont "ferry people" cont "across the water!" done -_SSAnne9Text_61c10:: ; 81833 (20:5833) +_SSAnne9Text_61c10:: text "#MON can CUT" line "down small bushes." done -_SSAnne9Text_61c1f:: ; 81854 (20:5854) +_SSAnne9Text_61c1f:: text "Have you gone to" line "the SAFARI ZONE" cont "in FUCHSIA CITY?" @@ -33,51 +29,51 @@ _SSAnne9Text_61c1f:: ; 81854 (20:5854) line "kinds of #MON!!" done -_SSAnne9Text_61c2e:: ; 818a8 (20:58a8) +_SSAnne9Text_61c2e:: text "Me and my Daddy" line "think the SAFARI" cont "ZONE is awesome!" done -_SSAnne9Text_61c3d:: ; 818db (20:58db) +_SSAnne9Text_61c3d:: text "The CAPTAIN looked" line "really sick and" cont "pale!" done -_SSAnne9Text_61c4c:: ; 81905 (20:5905) +_SSAnne9Text_61c4c:: text "I hear many people" line "get seasick!" done -_SSAnne9BattleText1:: ; 81926 (20:5926) +_SSAnne9BattleText1:: text "Competing against" line "the young keeps" cont "me youthful." done -_SSAnne9EndBattleText1:: ; 81956 (20:5956) +_SSAnne9EndBattleText1:: text "Good" line "fight! Ah, I feel" cont "young again!" prompt -_SSAnne9AfterBattleText1:: ; 8197b (20:597b) +_SSAnne9AfterBattleText1:: text "15 years ago, I" line "would have won!" done -_SSAnne9BattleText2:: ; 8199c (20:599c) +_SSAnne9BattleText2:: text "Check out what I" line "fished up!" done -_SSAnne9EndBattleText2:: ; 819b9 (20:59b9) +_SSAnne9EndBattleText2:: text "I'm" line "all out!" prompt -_SSAnne9AfterBattleText2:: ; 819c6 (20:59c6) +_SSAnne9AfterBattleText2:: text "Party?" para "The cruise ship's" @@ -85,34 +81,33 @@ _SSAnne9AfterBattleText2:: ; 819c6 (20:59c6) cont "over by now." done -_SSAnne9BattleText3:: ; 819fc (20:59fc) +_SSAnne9BattleText3:: text "Which do you like," line "a strong or a" cont "rare #MON?" done -_SSAnne9EndBattleText3:: ; 81a29 (20:5a29) +_SSAnne9EndBattleText3:: text "I must" line "salute you!" prompt -_SSAnne9AfterBattleText3:: ; 81a3d (20:5a3d) +_SSAnne9AfterBattleText3:: text "I prefer strong" line "and rare #MON." done -_SSAnne9BattleText4:: ; 81a5d (20:5a5d) +_SSAnne9BattleText4:: text "I never saw you" line "at the party." done -_SSAnne9EndBattleText4:: ; 81a7c (20:5a7c) +_SSAnne9EndBattleText4:: text "Take" line "it easy!" prompt -_SSAnne9AfterBattleText4:: ; 81a8b (20:5a8b) +_SSAnne9AfterBattleText4:: text "Oh, I adore your" line "strong #MON!" done - diff --git a/text/maps/underground_path_route_5_entrance.asm b/text/maps/underground_path_route_5_entrance.asm deleted file mode 100644 index 139597f9..00000000 --- a/text/maps/underground_path_route_5_entrance.asm +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/text/maps/underground_path_route_6_entrance.asm b/text/maps/underground_path_route_6_entrance.asm index 67a33b6d..dacc44f7 100644 --- a/text/maps/underground_path_route_6_entrance.asm +++ b/text/maps/underground_path_route_6_entrance.asm @@ -1,6 +1,5 @@ -_UndergrdTunnelEntRoute6Text1:: ; 8c0cb (23:40cb) +_UndergrdTunnelEntRoute6Text1:: text "People often lose" line "things in that" cont "UNDERGROUND PATH." done - diff --git a/text/maps/underground_path_route_7_entrance.asm b/text/maps/underground_path_route_7_entrance.asm index bb35935d..5cde3614 100644 --- a/text/maps/underground_path_route_7_entrance.asm +++ b/text/maps/underground_path_route_7_entrance.asm @@ -1,6 +1,5 @@ -_UndergroundPathEntRoute7Text1:: ; 8c0ff (23:40ff) +_UndergroundPathEntRoute7Text1:: text "I heard a sleepy" line "#MON appeared" cont "near CELADON CITY." 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..4e0dc3ca 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:: 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:: text "TEAM ROCKET had a" line "secret hideout in" cont "CELADON CITY?" done -_UnnamedText_5d77d:: ; 8c1c8 (23:41c8) +_UGPathRoute7EntranceUnusedText_5d77d:: 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:: text "The UNDERGROUND" line "PATH goes beneath" cont "SAFFRON and leads" @@ -33,4 +33,3 @@ _UnnamedText_5d782:: ; 8c209 (23:4209) cont "to the building" cont "across the road." done - diff --git a/text/maps/underground_path_route_8_entrance.asm b/text/maps/underground_path_route_8_entrance.asm index 8c546cb0..da785c8e 100644 --- a/text/maps/underground_path_route_8_entrance.asm +++ b/text/maps/underground_path_route_8_entrance.asm @@ -1,6 +1,5 @@ -_UndergroundPathEntRoute8Text1:: ; 8c28d (23:428d) +_UndergroundPathEntRoute8Text1:: text "The dept. store" line "in CELADON has a" cont "great selection!" done - diff --git a/text/maps/unknown_dungeon_1f.asm b/text/maps/unknown_dungeon_1f.asm deleted file mode 100644 index 139597f9..00000000 --- a/text/maps/unknown_dungeon_1f.asm +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/text/maps/unknown_dungeon_2f.asm b/text/maps/unknown_dungeon_2f.asm deleted file mode 100644 index 139597f9..00000000 --- a/text/maps/unknown_dungeon_2f.asm +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/text/maps/unknown_dungeon_b1f.asm b/text/maps/unknown_dungeon_b1f.asm index 9af3a6bf..0918a3ce 100644 --- a/text/maps/unknown_dungeon_b1f.asm +++ b/text/maps/unknown_dungeon_b1f.asm @@ -1,3 +1,2 @@ -_UnknownDungeon3MewtwoText:: ; 85c72 (21:5c72) +_MewtwoBattleText:: text "Mew!@@" - diff --git a/text/maps/vermilion_city.asm b/text/maps/vermilion_city.asm index 9c27bf64..b060a123 100644 --- a/text/maps/vermilion_city.asm +++ b/text/maps/vermilion_city.asm @@ -1,4 +1,4 @@ -_VermilionCityText1:: ; a5668 (29:5668) +_VermilionCityText1:: text "We're careful" line "about pollution!" @@ -7,13 +7,13 @@ _VermilionCityText1:: ; a5668 (29:5668) cont "toxic sludge!" done -_VermilionCityText_198a7:: ; a56b5 (29:56b5) +_VermilionCityText_198a7:: text "Did you see S.S." line "ANNE moored in" cont "the harbor?" done -_VermilionCityText_198ac:: ; a56e2 (29:56e2) +_VermilionCityText_198ac:: text "So, S.S.ANNE has" line "departed!" @@ -21,12 +21,12 @@ _VermilionCityText_198ac:: ; a56e2 (29:56e2) line "about a year." done -_SSAnneWelcomeText4:: ; a571d (29:571d) +_SSAnneWelcomeText4:: text "Welcome to S.S." line "ANNE!" done -_SSAnneWelcomeText9:: ; a5734 (29:5734) +_SSAnneWelcomeText9:: text "Welcome to S.S." line "ANNE!" @@ -34,16 +34,16 @@ _SSAnneWelcomeText9:: ; a5734 (29:5734) line "have a ticket?" prompt -_SSAnneFlashedTicketText:: ; a576c (29:576c) - text $52, " flashed" +_SSAnneFlashedTicketText:: + text "<PLAYER> flashed" line "the S.S.TICKET!" para "Great! Welcome to" line "S.S.ANNE!" done -_SSAnneNoTicketText:: ; a57a3 (29:57a3) - text $52, " doesn't" +_SSAnneNoTicketText:: + text "<PLAYER> doesn't" line "have the needed" cont "S.S.TICKET." @@ -53,11 +53,11 @@ _SSAnneNoTicketText:: ; a57a3 (29:57a3) line "to get aboard." done -_SSAnneNotHereText:: ; a57f1 (29:57f1) +_SSAnneNotHereText:: text "The ship set sail." done -_VermilionCityText4:: ; a5805 (29:5805) +_VermilionCityText4:: text "I'm putting up a" line "building on this" cont "plot of land." @@ -66,18 +66,18 @@ _VermilionCityText4:: ; a5805 (29:5805) line "tamping the land." done -_VermilionCityText5:: ; a5852 (29:5852) +_VermilionCityText5:: text "MACHOP: Guoh!" line "Gogogoh!@@" -_VermilionCityText14:: ; a586b (29:586b) - db $0 +_VermilionCityText14:: + text "" para "A MACHOP is" line "stomping the land" cont "flat." done -_VermilionCityText6:: ; a5891 (29:5891) +_VermilionCityText6:: text "S.S.ANNE is a" line "famous luxury" cont "cruise ship." @@ -86,13 +86,13 @@ _VermilionCityText6:: ; a5891 (29:5891) line "once a year." done -_VermilionCityText7:: ; a58db (29:58db) +_VermilionCityText7:: text "VERMILION CITY" line "The Port of" cont "Exquisite Sunsets" done -_VermilionCityText8:: ; a5909 (29:5909) +_VermilionCityText8:: text "NOTICE!" para "ROUTE 12 may be" @@ -106,13 +106,13 @@ _VermilionCityText8:: ; a5909 (29:5909) para "VERMILION POLICE" done -_VermilionCityText11:: ; a5980 (29:5980) +_VermilionCityText11:: text "#MON FAN CLUB" line "All #MON fans" cont "welcome!" done -_VermilionCityText12:: ; a59a6 (29:59a6) +_VermilionCityText12:: text "VERMILION CITY" line "#MON GYM" cont "LEADER: LT.SURGE" @@ -121,7 +121,6 @@ _VermilionCityText12:: ; a59a6 (29:59a6) line "American!" done -_VermilionCityText13:: ; a59e9 (29:59e9) +_VermilionCityText13:: text "VERMILION HARBOR" done - diff --git a/text/maps/vermilion_dock.asm b/text/maps/vermilion_dock.asm index 17436742..5d998e82 100644 --- a/text/maps/vermilion_dock.asm +++ b/text/maps/vermilion_dock.asm @@ -1,3 +1,3 @@ -_VermilionDockText1:: ; 9c50e (27:450e) - db $0, $57 - +_VermilionDockText1:: + text "" + done diff --git a/text/maps/vermilion_fishing_house.asm b/text/maps/vermilion_fishing_house.asm index b1377252..0fa28cae 100644 --- a/text/maps/vermilion_fishing_house.asm +++ b/text/maps/vermilion_fishing_house.asm @@ -1,4 +1,4 @@ -_VermilionHouse2Text_560b1:: ; 9c510 (27:4510) +_VermilionHouse2Text_560b1:: text "I'm the FISHING" line "GURU!" @@ -9,7 +9,7 @@ _VermilionHouse2Text_560b1:: ; 9c510 (27:4510) line "fish?" done -_VermilionHouse2Text_560b6:: ; 9c554 (27:4554) +_VermilionHouse2Text_560b6:: text "Grand! I like" line "your style!" @@ -21,7 +21,7 @@ _VermilionHouse2Text_560b6:: ; 9c554 (27:4554) TX_RAM wcf4b text "!@@" -_VermilionHouse2Text_560bb:: ; 9c5a4 (27:45a4) +_VermilionHouse2Text_560bb:: db $0 para "Fishing is a way" line "of life!" @@ -32,12 +32,12 @@ _VermilionHouse2Text_560bb:: ; 9c5a4 (27:45a4) cont "one, young one!" done -_VermilionHouse2Text_560c0:: ; 9c601 (27:4601) +_VermilionHouse2Text_560c0:: text "Oh... That's so" line "disappointing..." done -_VermilionHouse2Text_560c5:: ; 9c622 (27:4622) +_VermilionHouse2Text_560c5:: text "Hello there," line $52, "!" @@ -45,10 +45,9 @@ _VermilionHouse2Text_560c5:: ; 9c622 (27:4622) line "biting?" done -_VermilionHouse2Text_560ca:: ; 9c64c (27:464c) +_VermilionHouse2Text_560ca:: text "Oh no!" para "You have no room" line "for my gift!" done - diff --git a/text/maps/vermilion_gym_1.asm b/text/maps/vermilion_gym_1.asm index dfa45279..f718d899 100644 --- a/text/maps/vermilion_gym_1.asm +++ b/text/maps/vermilion_gym_1.asm @@ -1,25 +1,4 @@ -_VermilionGymText_5cb6d:: ; 9aaa5 (26:6aa5) -IF DEF(_YELLOW) - text "Ten-hut! Welcome" - line "to VERMILION GYM!" - - para "Will you look at" - line "that, a pint-size" - cont "challenger!" - - para "Hahaha! You've got" - line "big and brassy" - cont "nerves to take me" - cont "on with your puny" - cont "power!" - - para "A #MON battle" - line "is war! I'll show" - cont "you, civilian!" - - para "I'll shock you" - line "into surrender!" -ELSE +_VermilionGymText_5cb6d:: text "Hey, kid! What do" line "you think you're" cont "doing here?" @@ -39,5 +18,4 @@ ELSE para "The same as I'll" line "do to you!" -ENDC done diff --git a/text/maps/vermilion_gym_2.asm b/text/maps/vermilion_gym_2.asm index ee7d14ee..4fd5e159 100644 --- a/text/maps/vermilion_gym_2.asm +++ b/text/maps/vermilion_gym_2.asm @@ -1,4 +1,4 @@ -_VermilionGymText_5cb72:: ; 9c000 (27:4000) +_VermilionGymText_5cb72:: text "A little word of" line "advice, kid!" @@ -10,30 +10,26 @@ _VermilionGymText_5cb72:: ; 9c000 (27:4000) cont "type #MON!" done -_VermilionGymText_5cb77:: ; 9c069 (27:4069) +_VermilionGymText_5cb77:: text "The THUNDERBADGE" line "cranks up your" cont "#MON's SPEED!" para "It also lets your" -IF DEF(_YELLOW) - line "#MON FLY any-" -ELSE line "#MON FLY any" -ENDC cont "time, kid!" para "You're special," line "kid! Take this!" done -_ReceivedTM24Text:: ; 9c0e0 (27:40e0) +_ReceivedTM24Text:: text $52, " received " line "@" TX_RAM wcf4b text "!@@" -_TM24ExplanationText:: ; 9c0f5 (27:40f5) +_TM24ExplanationText:: db $0 para "TM24 contains" line "THUNDERBOLT!" @@ -42,12 +38,12 @@ _TM24ExplanationText:: ; 9c0f5 (27:40f5) line "electric #MON!" done -_TM24NoRoomText:: ; 9c130 (27:4130) +_TM24NoRoomText:: text "Yo kid, make room" line "in your pack!" done -_ReceivedThunderbadgeText:: ; 9c151 (27:4151) +_ReceivedThunderbadgeText:: text "Whoa!" para "You're the real" @@ -57,18 +53,18 @@ _ReceivedThunderbadgeText:: ; 9c151 (27:4151) line "the THUNDERBADGE!" prompt -_VermilionGymBattleText1:: ; 9c194 (27:4194) +_VermilionGymBattleText1:: text "When I was in the" line "Army, LT.SURGE" cont "was my strict CO!" done -_VermilionGymEndBattleText1:: ; 9c1c8 (27:41c8) +_VermilionGymEndBattleText1:: text "Stop!" line "You're very good!" prompt -_VermilionGymAfterBattleText1:: ; 9c1e0 (27:41e0) +_VermilionGymAfterBattleText1:: text "The door won't" line "open?" @@ -76,17 +72,17 @@ _VermilionGymAfterBattleText1:: ; 9c1e0 (27:41e0) line "was cautious!" done -_VermilionGymBattleText2:: ; 9c213 (27:4213) +_VermilionGymBattleText2:: text "I'm a lightweight," line "but I'm good with" cont "electricity!" done -_VermilionGymEndBattleText2:: ; 9c244 (27:4244) +_VermilionGymEndBattleText2:: text "Fried!" prompt -_VermilionGymAfterBattleText2:: ; 9c24c (27:424c) +_VermilionGymAfterBattleText2:: text "OK, I'll talk!" para "LT.SURGE said he" @@ -94,17 +90,17 @@ _VermilionGymAfterBattleText2:: ; 9c24c (27:424c) cont "inside something!" done -_VermilionGymBattleText3:: ; 9c290 (27:4290) +_VermilionGymBattleText3:: text "This is no place" line "for kids!" done -_VermilionGymEndBattleText3:: ; 9c2ac (27:42ac) +_VermilionGymEndBattleText3:: text "Wow!" line "Surprised me!" prompt -_VermilionGymAfterBattleText3:: ; 9c2c0 (27:42c0) +_VermilionGymAfterBattleText3:: text "LT.SURGE set up" line "double locks!" cont "Here's a hint!" @@ -115,7 +111,7 @@ _VermilionGymAfterBattleText3:: ; 9c2c0 (27:42c0) cont "next to it!" done -_VermilionGymText_5cbf4:: ; 9c32b (27:432b) +_VermilionGymText_5cbf4:: text "Yo! Champ in" line "making!" @@ -141,8 +137,7 @@ _VermilionGymText_5cbf4:: ; 9c32b (27:432b) cont "get to him!" done -_VermilionGymText_5cbf9:: ; 9c429 (27:4429) +_VermilionGymText_5cbf9:: text "Whew! That match" line "was electric!" done - diff --git a/text/maps/vermilion_house.asm b/text/maps/vermilion_house.asm index f05f9487..91c18708 100644 --- a/text/maps/vermilion_house.asm +++ b/text/maps/vermilion_house.asm @@ -1,14 +1,14 @@ -_VermilionHouse1Text1:: ; 9c449 (27:4449) +_VermilionHouse1Text1:: text "I'm getting my" line "PIDGEY to fly a" cont "letter to SAFFRON" cont "in the north!" done -_VermilionHouse1Text2:: ; 9c488 (27:4488) +_VermilionHouse1Text2:: text "PIDGEY: Kurukkoo!@@" -_VermilionHouse1Text3:: ; 9c49c (27:449c) +_VermilionHouse1Text3:: text "Dear PIPPI, I hope" line "to see you soon." @@ -19,4 +19,3 @@ _VermilionHouse1Text3:: ; 9c49c (27:449c) para "VERMILION appears" line "to be safe." done - diff --git a/text/maps/vermilion_mart.asm b/text/maps/vermilion_mart.asm index 0fcfbcbb..10743989 100644 --- a/text/maps/vermilion_mart.asm +++ b/text/maps/vermilion_mart.asm @@ -1,4 +1,4 @@ -_VermilionMartText2:: ; 9a9c1 (26:69c1) +_VermilionMartText2:: text "There are evil" line "people who will" cont "use #MON for" @@ -15,10 +15,9 @@ _VermilionMartText2:: ; 9a9c1 (26:69c1) cont "useful." done -_VermilionMartText3:: ; 9aa67 (26:6a67) +_VermilionMartText3:: text "I think #MON" line "can be good or" cont "evil. It depends" cont "on the trainer." done - diff --git a/text/maps/vermilion_pokecenter.asm b/text/maps/vermilion_pokecenter.asm index fce00e35..c9e9a581 100644 --- a/text/maps/vermilion_pokecenter.asm +++ b/text/maps/vermilion_pokecenter.asm @@ -1,5 +1,4 @@ -_VermilionPokecenterText2:: ; 9a4b2 (26:64b2) -_VermilionPokecenterText1:: ; 9a4b2 (26:64b2) +_VermilionPokecenterText2:: text "Even if they are" line "the same level," cont "#MON can have" @@ -12,10 +11,9 @@ _VermilionPokecenterText1:: ; 9a4b2 (26:64b2) cont "in the wild." done -_VermilionPokecenterText3:: ; 9a539 (26:6539) +_VermilionPokecenterText3:: text "My #MON was" line "poisoned! It" cont "fainted while we" cont "were walking!" done - diff --git a/text/maps/victory_road_1f.asm b/text/maps/victory_road_1f.asm index b6892f43..1523db88 100644 --- a/text/maps/victory_road_1f.asm +++ b/text/maps/victory_road_1f.asm @@ -1,32 +1,31 @@ -_VictoryRoad1BattleText1:: ; 85c79 (21:5c79) +_VictoryRoad1BattleText1:: text "I wonder if you" line "are good enough" cont "for me!" done -_VictoryRoad1EndBattleText1:: ; 85ca2 (21:5ca2) +_VictoryRoad1EndBattleText1:: text "I" line "lost out!" prompt -_VictoryRoad1AfterBattleText1:: ; 85caf (21:5caf) +_VictoryRoad1AfterBattleText1:: text "I never wanted to" line "lose to anybody!" done -_VictoryRoad1BattleText2:: ; 85cd3 (21:5cd3) +_VictoryRoad1BattleText2:: text "I can see you're" line "good! Let me see" cont "exactly how good!" done -_VictoryRoad1EndBattleText2:: ; 85d07 (21:5d07) +_VictoryRoad1EndBattleText2:: text "I" line "had a chance..." prompt -_VictoryRoad1AfterBattleText2:: ; 85d1a (21:5d1a) +_VictoryRoad1AfterBattleText2:: text "I concede, you're" line "better than me!" done - diff --git a/text/maps/victory_road_2f.asm b/text/maps/victory_road_2f.asm index 5becd811..cdcf6e36 100644 --- a/text/maps/victory_road_2f.asm +++ b/text/maps/victory_road_2f.asm @@ -1,86 +1,85 @@ -_VictoryRoad2BattleText6:: ; 8d06e (23:506e) +_MoltresBattleText:: text "Gyaoo!@@" -_VictoryRoad2BattleText1:: ; 8d077 (23:5077) +_VictoryRoad2BattleText1:: text "VICTORY ROAD is" line "the final test" cont "for trainers!" done -_VictoryRoad2EndBattleText1:: ; 8d0a5 (23:50a5) +_VictoryRoad2EndBattleText1:: text "Aiyah!" prompt -_VictoryRoad2AfterBattleText1:: ; 8d0ad (23:50ad) +_VictoryRoad2AfterBattleText1:: text "If you get stuck," line "try moving some" cont "boulders around!" done -_VictoryRoad2BattleText2:: ; 8d0e1 (23:50e1) +_VictoryRoad2BattleText2:: text "Ah, so you wish" line "to challenge the" cont "ELITE FOUR?" done -_VictoryRoad2EndBattleText2:: ; 8d10f (23:510f) +_VictoryRoad2EndBattleText2:: text "You" line "got me!" prompt -_VictoryRoad2AfterBattleText2:: ; 8d11c (23:511c) +_VictoryRoad2AfterBattleText2:: text $53, " also came" line "through here!" done -_VictoryRoad2BattleText3:: ; 8d137 (23:5137) +_VictoryRoad2BattleText3:: text "Come on!" line "I'll whip you!" done -_VictoryRoad2EndBattleText3:: ; 8d14f (23:514f) +_VictoryRoad2EndBattleText3:: text "I got" line "whipped!" prompt -_VictoryRoad2AfterBattleText3:: ; 8d15f (23:515f) +_VictoryRoad2AfterBattleText3:: text "You earned the" line "right to be on" cont "VICTORY ROAD!" done -_VictoryRoad2BattleText4:: ; 8d18c (23:518c) +_VictoryRoad2BattleText4:: text "If you can get" line "through here, you" cont "can go meet the" cont "ELITE FOUR!" done -_VictoryRoad2EndBattleText4:: ; 8d1ca (23:51ca) +_VictoryRoad2EndBattleText4:: text "No!" line "Unbelievable!" prompt -_VictoryRoad2AfterBattleText4:: ; 8d1dd (23:51dd) +_VictoryRoad2AfterBattleText4:: text "I can beat you" line "when it comes to" cont "knowledge about" cont "#MON!" done -_VictoryRoad2BattleText5:: ; 8d214 (23:5214) +_VictoryRoad2BattleText5:: text "Is VICTORY ROAD" line "too tough?" done -_VictoryRoad2EndBattleText5:: ; 8d230 (23:5230) +_VictoryRoad2EndBattleText5:: text "Well" line "done!" prompt -_VictoryRoad2AfterBattleText5:: ; 8d23c (23:523c) +_VictoryRoad2AfterBattleText5:: text "Many trainers give" line "up the challenge" cont "here." done - diff --git a/text/maps/victory_road_3f.asm b/text/maps/victory_road_3f.asm index 01a5841e..07e0be70 100644 --- a/text/maps/victory_road_3f.asm +++ b/text/maps/victory_road_3f.asm @@ -1,64 +1,63 @@ -_VictoryRoad3BattleText2:: ; 81d9b (20:5d9b) +_VictoryRoad3BattleText2:: text "I heard rumors of" line "a child prodigy!" done -_VictoryRoad3EndBattleText2:: ; 81dbf (20:5dbf) +_VictoryRoad3EndBattleText2:: text "The" line "rumors were true!" prompt -_VictoryRoad3AfterBattleText2:: ; 81dd6 (20:5dd6) +_VictoryRoad3AfterBattleText2:: text "You beat GIOVANNI" line "of TEAM ROCKET?" done -_VictoryRoad3BattleText3:: ; 81df9 (20:5df9) +_VictoryRoad3BattleText3:: text "I'll show you just" line "how good you are!" done -_VictoryRoad3EndBattleText3:: ; 81e1e (20:5e1e) +_VictoryRoad3EndBattleText3:: text "I'm" line "furious!" prompt -_VictoryRoad3AfterBattleText3:: ; 81e2b (20:5e2b) +_VictoryRoad3AfterBattleText3:: text "You showed me just" line "how good I was!" done -_VictoryRoad3BattleText4:: ; 81e4f (20:5e4f) +_VictoryRoad3BattleText4:: text "Only the chosen" line "can pass here!" done -_VictoryRoad3EndBattleText4:: ; 81e6f (20:5e6f) +_VictoryRoad3EndBattleText4:: text "I" line "don't believe it!" prompt -_VictoryRoad3AfterBattleText4:: ; 81e83 (20:5e83) +_VictoryRoad3AfterBattleText4:: text "All trainers here" line "are headed to the" cont "#MON LEAGUE!" cont "Be careful!" done -_VictoryRoad3BattleText5:: ; 81ec1 (20:5ec1) +_VictoryRoad3BattleText5:: text "Trainers live to" line "seek stronger" cont "opponents!" done -_VictoryRoad3EndBattleText5:: ; 81eec (20:5eec) +_VictoryRoad3EndBattleText5:: text "Oh!" line "So strong!" prompt -_VictoryRoad3AfterBattleText5:: ; 81efc (20:5efc) +_VictoryRoad3AfterBattleText5:: text "By fighting tough" line "battles, you get" cont "stronger!" done - diff --git a/text/maps/viridian_city.asm b/text/maps/viridian_city.asm index 7ff2d71d..17b2ec91 100644 --- a/text/maps/viridian_city.asm +++ b/text/maps/viridian_city.asm @@ -1,4 +1,4 @@ -_ViridianCityText1:: ; a43cc (29:43cc) +_ViridianCityText1:: text "Those # BALLs" line "at your waist!" cont "You have #MON!" @@ -9,7 +9,7 @@ _ViridianCityText1:: ; a43cc (29:43cc) cont "time, anywhere!" done -_ViridianCityText_19122:: ; a4437 (29:4437) +_ViridianCityText_19122:: text "This #MON GYM" line "is always closed." @@ -17,23 +17,23 @@ _ViridianCityText_19122:: ; a4437 (29:4437) line "LEADER is?" done -_ViridianCityText_19127:: ; a4474 (29:4474) +_ViridianCityText_19127:: text "VIRIDIAN GYM's" line "LEADER returned!" done -_ViridianCityText_1914d:: ; a4494 (29:4494) +_ViridianCityText_1914d:: text "You want to know" line "about the 2 kinds" cont "of caterpillar" cont "#MON?" done -_ViridianCityText_19152:: ; a44cd (29:44cd) +_ViridianCityText_19152:: text "Oh, OK then!" done -_ViridianCityText_19157:: ; a44db (29:44db) +_ViridianCityText_19157:: text "CATERPIE has no" line "poison, but" cont "WEEDLE does." @@ -42,14 +42,14 @@ _ViridianCityText_19157:: ; a44db (29:44db) line "POISON STING!" done -_ViridianCityText_19175:: ; a4525 (29:4525) +_ViridianCityText_19175:: text "Oh Grandpa! Don't" line "be so mean!" cont "He hasn't had his" cont "coffee yet." done -_ViridianCityText_1917a:: ; a4560 (29:4560) +_ViridianCityText_1917a:: text "When I go shop in" line "PEWTER CITY, I" cont "have to take the" @@ -57,7 +57,7 @@ _ViridianCityText_1917a:: ; a4560 (29:4560) cont "VIRIDIAN FOREST." done -_ViridianCityText_19191:: ; a45b5 (29:45b5) +_ViridianCityText_19191:: text "You can't go" line "through here!" @@ -65,7 +65,7 @@ _ViridianCityText_19191:: ; a45b5 (29:45b5) line "property!" done -_ViridianCityText_191ca:: ; a45ea (29:45ea) +_ViridianCityText_191ca:: text "Yawn!" line "I must have dozed" cont "off in the sun." @@ -82,22 +82,22 @@ _ViridianCityText_191ca:: ; a45ea (29:45ea) cont "have this TM." prompt -_ReceivedTM42Text:: ; a469a (29:469a) +_ReceivedTM42Text:: text $52, " received" line "TM42!@@" -_TM42Explanation:: ; a46ad (29:46ad) +_TM42Explanation:: text "TM42 contains" line "DREAM EATER..." cont "...Snore..." done -_TM42NoRoomText:: ; a46d7 (29:46d7) +_TM42NoRoomText:: text "You have too much" line "stuff already." done -_ViridianCityText_1920a:: ; a46f9 (29:46f9) +_ViridianCityText_1920a:: text "Ahh, I've had my" line "coffee now and I" cont "feel great!" @@ -109,7 +109,7 @@ _ViridianCityText_1920a:: ; a46f9 (29:46f9) line "hurry?" done -_ViridianCityText_1920f:: ; a4754 (29:4754) +_ViridianCityText_1920f:: text "I see you're using" line "a #DEX." @@ -126,24 +126,24 @@ _ViridianCityText_1920f:: ; a4754 (29:4754) line "how to then." done -_ViridianCityText_19214:: ; a47e6 (29:47e6) +_ViridianCityText_19214:: text "Time is money..." line "Go along then." done -_ViridianCityText_19219:: ; a4807 (29:4807) +_ViridianCityText_19219:: text "First, you need" line "to weaken the" cont "target #MON." done -_ViridianCityText8:: ; a4833 (29:4833) +_ViridianCityText8:: text "VIRIDIAN CITY " line "The Eternally" cont "Green Paradise" done -_ViridianCityText9:: ; a4860 (29:4860) +_ViridianCityText9:: text "TRAINER TIPS" para "Catch #MON" @@ -155,7 +155,7 @@ _ViridianCityText9:: ; a4860 (29:4860) cont "to fight!" done -_ViridianCityText10:: ; a48c3 (29:48c3) +_ViridianCityText10:: text "TRAINER TIPS" para "The battle moves" @@ -169,13 +169,12 @@ _ViridianCityText10:: ; a48c3 (29:48c3) cont "#MON CENTER!" done -_ViridianCityText13:: ; a4949 (29:4949) +_ViridianCityText13:: text "VIRIDIAN CITY" line "#MON GYM" done -_ViridianCityText14:: ; a4961 (29:4961) +_ViridianCityText14:: text "The GYM's doors" line "are locked..." done - diff --git a/text/maps/viridian_forest.asm b/text/maps/viridian_forest.asm index aa6ab4ab..813b193a 100644 --- a/text/maps/viridian_forest.asm +++ b/text/maps/viridian_forest.asm @@ -1,4 +1,4 @@ -_ViridianForestText1:: ; 8031d (20:431d) +_ViridianForestText1:: text "I came here with" line "some friends!" @@ -6,57 +6,53 @@ _ViridianForestText1:: ; 8031d (20:431d) line "#MON fights!" done -_ViridianForestBattleText1:: ; 80359 (20:4359) +_ViridianForestBattleText1:: text "Hey! You have" line "#MON! Come on!" -IF DEF(_YELLOW) - cont "Let's battle 'em!" -ELSE cont "Let's battle'em!" -ENDC done -_ViridianForestEndBattleText1:: ; 80387 (20:4387) +_ViridianForestEndBattleText1:: text "No!" line "CATERPIE can't" cont "cut it!" prompt -_ViridianFrstAfterBattleText1:: ; 803a2 (20:43a2) +_ViridianFrstAfterBattleText1:: text "Ssh! You'll scare" line "the bugs away!" done -_ViridianForestBattleText2:: ; 803c3 (20:43c3) +_ViridianForestBattleText2:: text "Yo! You can't jam" line "out if you're a" cont "#MON trainer!" done -_ViridianForestEndBattleText2:: ; 803f2 (20:43f2) +_ViridianForestEndBattleText2:: text "Huh?" line "I ran out of" cont "#MON!" prompt -_ViridianFrstAfterBattleText2:: ; 8040b (20:440b) +_ViridianFrstAfterBattleText2:: text "Darn! I'm going" line "to catch some" cont "stronger ones!" done -_ViridianForestBattleText3:: ; 80438 (20:4438) +_ViridianForestBattleText3:: text "Hey, wait up!" line "What's the hurry?" done -_ViridianForestEndBattleText3:: ; 80458 (20:4458) +_ViridianForestEndBattleText3:: text "I" line "give! You're good" cont "at this!" prompt -_ViridianFrstAfterBattleText3:: ; 80475 (20:4475) +_ViridianFrstAfterBattleText3:: text "Sometimes, you" line "can find stuff on" cont "the ground!" @@ -66,43 +62,7 @@ _ViridianFrstAfterBattleText3:: ; 80475 (20:4475) cont "dropped!" done -if DEF(_YELLOW) -_ViridianForestBattleTextPikaGirl:: - text "Hi, do you have a" - line "PIKACHU?" - done - -_ViridianForestEndBattleTextPikaGirl:: - text "Oh no," - line "really?" - prompt - -_ViridianForestAfterBattleTextPikaGirl:: - text "I looked forever," - line "but I never found" - cont "a PIKACHU here!" - done - -_ViridianForestBattleTextSamurai:: - text "I'm gonna be the" - line "best. You just" - cont "can't beat me!" - done - -_ViridianForestEndBattleTextSamurai:: - text "After" - line "all I did..." - prompt - -_ViridianForestAfterBattleTextSamurai:: - text "A METAPOD is cool" - line "because its" - cont "attack is its" - cont "defense!" - done -ENDC - -_ViridianForestText8:: ; 804c7 (20:44c7) +_ViridianForestText8:: text "I ran out of #" line "BALLs to catch" cont "#MON with!" @@ -111,7 +71,7 @@ _ViridianForestText8:: ; 804c7 (20:44c7) line "extras!" done -_ViridianForestText9:: ; 8050a (20:450a) +_ViridianForestText9:: text "TRAINER TIPS" para "If you want to" @@ -120,13 +80,13 @@ _ViridianForestText9:: ; 8050a (20:450a) cont "grassy areas!" done -_ViridianForestText10:: ; 80553 (20:4553) +_ViridianForestText10:: text "For poison, use" line "ANTIDOTE! Get it" cont "at #MON MARTs!" done -_ViridianForestText11:: ; 80584 (20:4584) +_ViridianForestText11:: text "TRAINER TIPS" para "Contact PROF.OAK" @@ -135,7 +95,7 @@ _ViridianForestText11:: ; 80584 (20:4584) cont "evaluated!" done -_ViridianForestText12:: ; 805c6 (20:45c6) +_ViridianForestText12:: text "TRAINER TIPS" para "No stealing of" @@ -145,7 +105,7 @@ _ViridianForestText12:: ; 805c6 (20:45c6) cont "#MON!" done -_ViridianForestText13:: ; 80613 (20:4613) +_ViridianForestText13:: text "TRAINER TIPS" para "Weaken #MON" @@ -156,9 +116,8 @@ _ViridianForestText13:: ; 80613 (20:4613) line "they may escape!" done -_ViridianForestText14:: ; 80667 (20:4667) +_ViridianForestText14:: text "LEAVING" line "VIRIDIAN FOREST" cont "PEWTER CITY AHEAD" done - diff --git a/text/maps/viridian_forest_entrance.asm b/text/maps/viridian_forest_entrance.asm index 770f2b5b..c1a8df22 100644 --- a/text/maps/viridian_forest_entrance.asm +++ b/text/maps/viridian_forest_entrance.asm @@ -1,24 +1,13 @@ -_ViridianForestEntranceText1:: ; 8a868 (22:6868) +_ViridianForestEntranceText1:: text "Are you going to" line "VIRIDIAN FOREST?" cont "Be careful, it's" cont "a natural maze!" done -_ViridianForestEntranceText2:: ; 8a8ab (22:68ab) -IF DEF(_YELLOW) - text "You have to roam" - line "far to get new" - cont "kinds of #MON." - - para "Look for other" - line "types outside of" - cont "VIRIDIAN FOREST." - done -ELSE +_ViridianForestEntranceText2:: text "RATTATA may be" line "small, but its" cont "bite is wicked!" cont "Did you get one?" done -ENDC diff --git a/text/maps/viridian_forest_exit.asm b/text/maps/viridian_forest_exit.asm index e74474e9..ab6a5a1d 100644 --- a/text/maps/viridian_forest_exit.asm +++ b/text/maps/viridian_forest_exit.asm @@ -1,4 +1,4 @@ -_ViridianForestExitText1:: ; 8a6fd (22:66fd) +_ViridianForestExitText1:: text "Many #MON live" line "only in forests " cont "and caves." @@ -8,7 +8,7 @@ _ViridianForestExitText1:: ; 8a6fd (22:66fd) cont "different kinds!" done -_ViridianForestExitText2:: ; 8a75d (22:675d) +_ViridianForestExitText2:: text "Have you noticed" line "the bushes on the" cont "roadside?" @@ -17,4 +17,3 @@ _ViridianForestExitText2:: ; 8a75d (22:675d) line "down by a special" cont "#MON move." done - diff --git a/text/maps/viridian_gym.asm b/text/maps/viridian_gym.asm index 10a2a597..df04e6d6 100644 --- a/text/maps/viridian_gym.asm +++ b/text/maps/viridian_gym.asm @@ -1,4 +1,4 @@ -_ViridianGymText_74ace:: ; 95e09 (25:5e09) +_ViridianGymText_74ace:: text "Fwahahaha! This is" line "my hideout!" @@ -18,7 +18,7 @@ _ViridianGymText_74ace:: ; 95e09 (25:5e09) cont "greatest trainer!" done -_ViridianGymText_74ad3:: ; 95ed5 (25:5ed5) +_ViridianGymText_74ad3:: text "Ha!" line "That was a truly" cont "intense fight!" @@ -26,7 +26,7 @@ _ViridianGymText_74ad3:: ; 95ed5 (25:5ed5) cont "As proof, here is" cont "the EARTHBADGE!@@" -_ViridianGymText_74ad9:: ; 95f2b (25:5f2b) +_ViridianGymText_74ad9:: text "Having lost, I" line "cannot face my" cont "underlings!" @@ -38,14 +38,10 @@ _ViridianGymText_74ad9:: ; 95f2b (25:5f2b) cont "of #MON!" para "Let us meet again" -IF DEF(_YELLOW) - line "someday!" -ELSE line "some day!" -ENDC cont "Farewell!@@" -_ViridianGymText12:: ; 95fcc (25:5fcc) +_ViridianGymText12:: text "The EARTHBADGE" line "makes #MON of" cont "any level obey!" @@ -63,11 +59,11 @@ _ViridianGymText12:: ; 95fcc (25:5fcc) cont "LEAGUE challenge!" done -_ReceivedTM27Text:: ; 96082 (25:6082) +_ReceivedTM27Text:: text $52, " received" line "TM27!@@" -_TM27ExplanationText:: ; 96095 (25:6095) +_TM27ExplanationText:: db $0 para "TM27 is FISSURE!" line "It will take out" @@ -79,147 +75,143 @@ _TM27ExplanationText:: ; 96095 (25:6095) cont "too long ago..." done -_TM27NoRoomText:: ; 96104 (25:6104) +_TM27NoRoomText:: text "You do not have" line "space for this!" done -_ViridianGymBattleText1:: ; 96125 (25:6125) +_ViridianGymBattleText1:: text "Heh! You must be" line "running out of" cont "steam by now!" done -_ViridianGymEndBattleText1:: ; 96154 (25:6154) +_ViridianGymEndBattleText1:: text "I" line "ran out of gas!" prompt -_ViridianGymAfterBattleText1:: ; 96167 (25:6167) +_ViridianGymAfterBattleText1:: text "You need power to" line "keep up with our" cont "GYM LEADER!" done -_ViridianGymBattleText2:: ; 96197 (25:6197) +_ViridianGymBattleText2:: text "Rrrroar! I'm" line "working myself" cont "into a rage!" done -_ViridianGymEndBattleText2:: ; 961c0 (25:61c0) +_ViridianGymEndBattleText2:: text "Wargh!" prompt -_ViridianGymAfterBattleText2:: ; 961c8 (25:61c8) +_ViridianGymAfterBattleText2:: text "I'm still not" line "worthy!" done -_ViridianGymBattleText3:: ; 961de (25:61de) +_ViridianGymBattleText3:: text "#MON and I, we" line "make wonderful" cont "music together!" done -_ViridianGymEndBattleText3:: ; 9620d (25:620d) +_ViridianGymEndBattleText3:: text "You are in" line "perfect harmony!" prompt -_ViridianGymAfterBattleText3:: ; 9622a (25:622a) +_ViridianGymAfterBattleText3:: text "Do you know the" line "identity of our" cont "GYM LEADER?" done -_ViridianGymBattleText4:: ; 96257 (25:6257) +_ViridianGymBattleText4:: text "Karate is the" line "ultimate form of" cont "martial arts!" done -_ViridianGymEndBattleText4:: ; 96285 (25:6285) +_ViridianGymEndBattleText4:: text "Atcho!" prompt -_ViridianGymAfterBattleText4:: ; 9628d (25:628d) +_ViridianGymAfterBattleText4:: text "If my #MON" line "were as good at" cont "Karate as I..." done -_ViridianGymBattleText5:: ; 962b8 (25:62b8) +_ViridianGymBattleText5:: text "The truly talented" line "win with style!" done -_ViridianGymEndBattleText5:: ; 962dc (25:62dc) +_ViridianGymEndBattleText5:: text "I" line "lost my grip!" prompt -_ViridianGymAfterBattleText5:: ; 962ed (25:62ed) +_ViridianGymAfterBattleText5:: text "The LEADER will" line "scold me!" done -_ViridianGymBattleText6:: ; 96308 (25:6308) +_ViridianGymBattleText6:: text "I'm the KARATE" line "KING! Your fate" cont "rests with me!" done -_ViridianGymEndBattleText6:: ; 96336 (25:6336) +_ViridianGymEndBattleText6:: text "Ayah!" prompt -_ViridianGymAfterBattleText6:: ; 9633d (25:633d) +_ViridianGymAfterBattleText6:: text "#MON LEAGUE?" line "You? Don't get" cont "cocky!" done -_ViridianGymBattleText7:: ; 96360 (25:6360) +_ViridianGymBattleText7:: text "Your #MON will" line "cower at the" cont "crack of my whip!" done -_ViridianGymEndBattleText7:: ; 9638f (25:638f) +_ViridianGymEndBattleText7:: text "Yowch!" line "Whiplash!" prompt -_ViridianGymAfterBattleText7:: ; 963a1 (25:63a1) +_ViridianGymAfterBattleText7:: text "Wait! I was just" line "careless!" done -_ViridianGymBattleText8:: ; 963bd (25:63bd) +_ViridianGymBattleText8:: text "VIRIDIAN GYM was" line "closed for a long" cont "time, but now our" cont "LEADER is back!" done -_ViridianGymEndBattleText8:: ; 96403 (25:6403) +_ViridianGymEndBattleText8:: text "I" line "was beaten?" prompt -_ViridianGymAfterBattleText8:: ; 96412 (25:6412) -IF DEF(_YELLOW) - text "You can go on to" -ELSE +_ViridianGymAfterBattleText8:: text "You can go onto" -ENDC line "#MON LEAGUE" cont "only by defeating" cont "our GYM LEADER!" done -_ViridianGymText_74bd4:: ; 96451 (25:6451) +_ViridianGymText_74bd4:: text "Yo! Champ in" line "making!" @@ -237,9 +229,8 @@ _ViridianGymText_74bd4:: ; 96451 (25:6451) cont "#MON!" done -_ViridianGymText_74bd9:: ; 964fb (25:64fb) +_ViridianGymText_74bd9:: text "Blow me away!" line "GIOVANNI was the" cont "GYM LEADER here?" done - diff --git a/text/maps/viridian_house.asm b/text/maps/viridian_house.asm index eec10c59..757f597a 100644 --- a/text/maps/viridian_house.asm +++ b/text/maps/viridian_house.asm @@ -1,4 +1,4 @@ -_ViridianHouseText1:: ; 95d71 (25:5d71) +_ViridianHouseText1:: text "Coming up with" line "nicknames is fun," cont "but hard." @@ -8,17 +8,16 @@ _ViridianHouseText1:: ; 95d71 (25:5d71) cont "remember." done -_ViridianHouseText2:: ; 95dc7 (25:5dc7) +_ViridianHouseText2:: text "My Daddy loves" line "#MON too." done -_ViridianHouseText_1d5b1:: ; 95de1 (25:5de1) +_ViridianHouseText_1d5b1:: text "SPEARY: Tetweet!" done -_ViridianHouseText4:: ; 95df3 (25:5df3) +_ViridianHouseText4:: text "SPEAROW" line "Name: SPEARY" done - diff --git a/text/maps/viridian_mart.asm b/text/maps/viridian_mart.asm index ed3343f1..aa199335 100644 --- a/text/maps/viridian_mart.asm +++ b/text/maps/viridian_mart.asm @@ -1,32 +1,14 @@ -_ViridianPokeCenterText2:: ; 95ba1 (25:5ba1) -_ViridianPokeCenterText1:: ; 95ba1 (25:5ba1) - text "You can use that" - line "PC in the corner." - - para "The receptionist" - line "told me. So kind!" - done - -_ViridianPokeCenterText3:: ; 95be8 (25:5be8) - text "There's a #MON" - line "CENTER in every" - cont "town ahead." - - para "They don't charge" - line "any money either!" - done - -_ViridianMartText1:: ; 95c36 (25:5c36) +_ViridianMartText1:: text "Okay! Say hi to" line "PROF.OAK for me!" done -_ViridianMartText4:: ; 95c58 (25:5c58) +_ViridianMartText4:: text "Hey! You came from" line "PALLET TOWN?" done -ViridianMartParcelQuestText:: ; 95c79 (25:5c79) +ViridianMartParcelQuestText:: text "You know PROF." line "OAK, right?" @@ -37,24 +19,12 @@ ViridianMartParcelQuestText:: ; 95c79 (25:5c79) para $52, " got" line "OAK's PARCEL!@@" -_ViridianMartText2:: ; 95cd5 (25:5cd5) -IF DEF(_YELLOW) - text "This shop sells a" - line "lot of PARLYZ" - cont "HEALs." -ELSE +_ViridianMartText2:: text "This shop sells" line "many ANTIDOTEs." -ENDC done -_ViridianMartText3:: ; 95cf6 (25:5cf6) -IF DEF(_YELLOW) - text "The shop finally" - line "has some POTIONs" - cont "in stock." -ELSE +_ViridianMartText3:: text "No! POTIONs are" line "all sold out." -ENDC done diff --git a/text/maps/viridian_pokecenter.asm b/text/maps/viridian_pokecenter.asm new file mode 100644 index 00000000..4ac18bf6 --- /dev/null +++ b/text/maps/viridian_pokecenter.asm @@ -0,0 +1,16 @@ +_ViridianPokeCenterText2:: + text "You can use that" + line "PC in the corner." + + para "The receptionist" + line "told me. So kind!" + done + +_ViridianPokeCenterText3:: + text "There's a #MON" + line "CENTER in every" + cont "town ahead." + + para "They don't charge" + line "any money either!" + done diff --git a/text/maps/wardens_house.asm b/text/maps/wardens_house.asm index a215da34..d4da3781 100644 --- a/text/maps/wardens_house.asm +++ b/text/maps/wardens_house.asm @@ -1,4 +1,4 @@ -_WardenGibberishText1:: ; 9e444 (27:6444) +_WardenGibberishText1:: text "WARDEN: Hif fuff" line "hefifoo!" @@ -7,28 +7,28 @@ _WardenGibberishText1:: ; 9e444 (27:6444) cont "hee fwee!" done -_WardenGibberishText2:: ; 9e48b (27:648b) +_WardenGibberishText2:: text "Ah howhee ho hoo!" line "Eef ee hafahi ho!" done -_WardenGibberishText3:: ; 9e4b0 (27:64b0) +_WardenGibberishText3:: text "Ha? He ohay heh" line "ha hoo ee haheh!" done -_WardenTeethText1:: ; 9e4d2 (27:64d2) +_WardenTeethText1:: text $52, " gave the" line "GOLD TEETH to the" cont "WARDEN!@@" -_WardenTeethText2:: ; 9e4f9 (27:64f9) +_WardenTeethText2:: db $0 para "The WARDEN popped" line "in his teeth!" prompt -_WardenThankYouText:: ; 9e51b (27:651b) +_WardenThankYouText:: text "WARDEN: Thanks," line "kid! No one could" cont "understand a word" @@ -41,13 +41,13 @@ _WardenThankYouText:: ; 9e51b (27:651b) cont "your trouble." prompt -_ReceivedHM04Text:: ; 9e5a2 (27:65a2) +_ReceivedHM04Text:: text $52, " received" line "@" TX_RAM wcf4b text "!@@" -_HM04ExplanationText:: ; 9e5b6 (27:65b6) +_HM04ExplanationText:: text "WARDEN: HM04" line "teaches STRENGTH!" @@ -67,18 +67,17 @@ _HM04ExplanationText:: ; 9e5b6 (27:65b6) line "rare SURF HM." done -_HM04NoRoomText:: ; 9e67a (27:667a) +_HM04NoRoomText:: text "Your pack is" line "stuffed full!" done -_FuchsiaHouse2Text_75176:: ; 9e696 (27:6696) +_FuchsiaHouse2Text_75176:: text "#MON photos" line "and fossils." done -_FuchsiaHouse2Text_7517b:: ; 9e6b0 (27:66b0) +_FuchsiaHouse2Text_7517b:: text "Old #MON" line "merchandise." done - diff --git a/text/monster_names.asm b/text/monster_names.asm index c7e0226f..a62b1bd9 100755 --- a/text/monster_names.asm +++ b/text/monster_names.asm @@ -1,4 +1,4 @@ -MonsterNames: ; 1c21e (7:421e) +MonsterNames: db "RHYDON@@@@" db "KANGASKHAN" db "NIDORAN♂@@" diff --git a/text/move_names.asm b/text/move_names.asm index 92760d45..f8706ee3 100644 --- a/text/move_names.asm +++ b/text/move_names.asm @@ -1,4 +1,4 @@ -MoveNames:: ; b0000 (2c:4000) +MoveNames:: db "POUND@" db "KARATE CHOP@" db "DOUBLESLAP@" diff --git a/text/oakspeech.asm b/text/oakspeech.asm index 91aaf5c3..5911092c 100644 --- a/text/oakspeech.asm +++ b/text/oakspeech.asm @@ -53,4 +53,3 @@ _OakSpeechText3:: cont "with #MON" cont "awaits! Let's go!" done - diff --git a/text/trainer_names.asm b/text/trainer_names.asm index 6a3cf8f7..7736738b 100755 --- a/text/trainer_names.asm +++ b/text/trainer_names.asm @@ -1,4 +1,4 @@ -TrainerNames: ; 399ff (e:59ff) +TrainerNames: db "YOUNGSTER@" db "BUG CATCHER@" db "LASS@" diff --git a/text/unused_names.asm b/text/unused_names.asm new file mode 100644 index 00000000..4aca7ca2 --- /dev/null +++ b/text/unused_names.asm @@ -0,0 +1,20 @@ +UnusedNames:: + db "かみなりバッヂ@" + db "かいがらバッヂ@" + db "おじぞうバッヂ@" + db "はやぶさバッヂ@" + db "ひんやりバッヂ@" + db "なかよしバッヂ@" + db "バラバッヂ@" + db "ひのたまバッヂ@" + db "ゴールドバッヂ@" + db "たまご@" + db "ひよこ@" + db "ブロンズ@" + db "シルバー@" + db "ゴールド@" + db "プチキャプテン@" + db "キャプテン@" + db "プチマスター@" + db "マスター@" + db "エクセレント" @@ -50,6 +50,7 @@ battle_struct: MACRO \1Moves:: ds NUM_MOVES \1DVs:: ds 2 \1Level:: db +\1Stats:: \1MaxHP:: dw \1Attack:: dw \1Defense:: dw @@ -59,72 +60,154 @@ battle_struct: MACRO ENDM -SECTION "WRAM Bank 0", WRAM0 - -wc000:: ds 1 -wc001:: ds 1 -wc002:: ds 1 -wc003:: ds 1 -wc004:: ds 1 -wc005:: ds 1 -wc006:: ds 8 -wc00e:: ds 4 -wc012:: ds 4 -wc016:: ds 16 -wc026:: ds 1 -wc027:: ds 1 -wc028:: ds 2 -wc02a:: ds 1 -wc02b:: ds 1 -wc02c:: ds 1 -wc02d:: ds 1 -wc02e:: ds 8 -wc036:: ds 8 -wc03e:: ds 8 -wc046:: ds 8 -wc04e:: ds 8 -wc056:: ds 8 -wc05e:: ds 8 -wc066:: ds 8 -wc06e:: ds 8 -wc076:: ds 8 -wc07e:: ds 8 -wc086:: ds 8 -wc08e:: ds 8 -wc096:: ds 8 -wc09e:: ds 8 -wc0a6:: ds 8 -wc0ae:: ds 8 -wc0b6:: ds 8 -wc0be:: ds 8 -wc0c6:: ds 8 -wc0ce:: ds 1 -wc0cf:: ds 1 -wc0d0:: ds 1 -wc0d1:: ds 1 -wc0d2:: ds 1 -wc0d3:: ds 1 -wc0d4:: ds 1 -wc0d5:: ds 1 -wc0d6:: ds 8 -wc0de:: ds 8 -wc0e6:: ds 1 -wc0e7:: ds 1 -wc0e8:: ds 1 -wc0e9:: ds 1 -wc0ea:: ds 1 -wc0eb:: ds 1 -wc0ec:: ds 1 -wc0ed:: ds 1 -wc0ee:: ds 1 -wc0ef:: ds 1 -wc0f0:: ds 1 -wc0f1:: ds 1 -wc0f2:: ds 14 +SECTION "WRAM Bank 0", WRAM0 [$c000] + +wUnusedC000:: ; c000 + ds 1 + +wSoundID:: ; c001 + ds 1 + +wMuteAudioAndPauseMusic:: ; c002 +; bit 7: whether sound has been muted +; all bits: whether the effective is active +; Store 1 to activate effect (any value in the range [1, 127] works). +; All audio is muted and music is paused. Sfx continues playing until it +; ends normally. +; Store 0 to resume music. + ds 1 + +wDisableChannelOutputWhenSfxEnds:: ; c003 + ds 1 + +wStereoPanning:: ; c004 + ds 1 + +wSavedVolume:: ; c005 + ds 1 + +wChannelCommandPointers:: ; c006 + ds 16 + +wChannelReturnAddresses:: ; c016 + ds 16 + +wChannelSoundIDs:: ; c026 + ds 8 + +wChannelFlags1:: ; c02e + ds 8 + +wChannelFlags2:: ; c036 + ds 8 + +wChannelDuties:: ; c03e + ds 8 + +wChannelDutyCycles:: ; c046 + ds 8 + +wChannelVibratoDelayCounters:: ; c04e +; reloaded at the beginning of a note. counts down until the vibrato begins. + ds 8 + +wChannelVibratoExtents:: ; c056 + ds 8 + +wChannelVibratoRates:: ; c05e +; high nybble is rate (counter reload value) and low nybble is counter. +; time between applications of vibrato. + ds 8 + +wChannelFrequencyLowBytes:: ; c066 + ds 8 + +wChannelVibratoDelayCounterReloadValues:: ; c06e +; delay of the beginning of the vibrato from the start of the note + ds 8 + +wChannelPitchBendLengthModifiers:: ; c076 + ds 8 + +wChannelPitchBendFrequencySteps:: ; c07e + ds 8 + +wChannelPitchBendFrequencyStepsFractionalPart:: ; c086 + ds 8 + +wChannelPitchBendCurrentFrequencyFractionalPart:: ; c08e + ds 8 + +wChannelPitchBendCurrentFrequencyHighBytes:: ; c096 + ds 8 + +wChannelPitchBendCurrentFrequencyLowBytes:: ; c09e + ds 8 + +wChannelPitchBendTargetFrequencyHighBytes:: ; c0a6 + ds 8 + +wChannelPitchBendTargetFrequencyLowBytes:: ; c0ae + ds 8 + +wChannelNoteDelayCounters:: ; c0b6 +; Note delays are stored as 16-bit fixed-point numbers where the integer part +; is 8 bits and the fractional part is 8 bits. + ds 8 + +wChannelLoopCounters:: ; c0be + ds 8 + +wChannelNoteSpeeds:: ; c0c6 + ds 8 + +wChannelNoteDelayCountersFractionalPart:: ; c0ce + ds 8 + +wChannelOctaves:: ; c0d6 + ds 8 + +wChannelVolumes:: ; c0de +; also includes fade for hardware channels that support it + ds 8 + +wMusicWaveInstrument:: + ds 1 + +wSfxWaveInstrument:: + ds 1 + +wMusicTempo:: ; c0e8 + ds 2 + +wSfxTempo:: ; c0ea + ds 2 + +wSfxHeaderPointer:: ; c0ec + ds 2 + +wNewSoundID:: ; c0ee + ds 1 + +wAudioROMBank:: ; c0ef + ds 1 + +wAudioSavedROMBank:: ; c0f0 + ds 1 + +wFrequencyModifier:: ; c0f1 + ds 1 + +wTempoModifier:: ; c0f2 + ds 1 + + ds 13 SECTION "Sprite State Data", WRAM0[$c100] +wSpriteDataStart:: + wSpriteStateData1:: ; c100 ; data for all sprites on the current map ; holds info for 16 sprites with $10 bytes each @@ -145,10 +228,42 @@ wSpriteStateData1:: ; c100 ; C1xD ; C1xE ; C1xF - ds $10 * $10 - - -SECTION "Sprite State Data 2", WRAM0[$c200] +spritestatedata1: MACRO +\1SpriteStateData1:: +\1PictureID:: db +\1MovementStatus:: db +\1SpriteImageIdx:: db +\1YStepVector:: db +\1YPixels:: db +\1XStepVector:: db +\1XPixels:: db +\1IntraAnimFrameCounter:: db +\1AnimFrameCounter:: db +\1FacingDirection:: db + ds 6 +\1SpriteStateData1End:: +endm + + spritestatedata1 Player + spritestatedata1 Sprite01 + spritestatedata1 Sprite02 + spritestatedata1 Sprite03 + spritestatedata1 Sprite04 + spritestatedata1 Sprite05 + spritestatedata1 Sprite06 + spritestatedata1 Sprite07 + spritestatedata1 Sprite08 + spritestatedata1 Sprite09 + spritestatedata1 Sprite10 + spritestatedata1 Sprite11 + spritestatedata1 Sprite12 + spritestatedata1 Sprite13 + spritestatedata1 Sprite14 + spritestatedata1 Sprite15 + ; ds $10 * $10 + + +;SECTION "Sprite State Data 2", WRAM0[$c200] wSpriteStateData2:: ; c200 ; more data for all sprites on the current map @@ -170,7 +285,42 @@ wSpriteStateData2:: ; c200 ; C2xD ; C2xE: sprite image base offset (in video ram, player always has value 1, used to compute c1x2) ; C2xF - ds $10 * $10 +spritestatedata2: MACRO +\1SpriteStateData2:: +\1WalkAnimationCounter:: db + ds 1 +\1YDisplacement:: db +\1XDisplacement:: db +\1MapY:: db +\1MapX:: db +\1MovementByte1:: db +\1GrassPriority:: db +\1MovementDelay:: db + ds 5 +\1SpriteImageBaseOffset:: db + ds 1 +\1SpriteStateData2End:: +endm + + spritestatedata2 Player + spritestatedata2 Sprite01 + spritestatedata2 Sprite02 + spritestatedata2 Sprite03 + spritestatedata2 Sprite04 + spritestatedata2 Sprite05 + spritestatedata2 Sprite06 + spritestatedata2 Sprite07 + spritestatedata2 Sprite08 + spritestatedata2 Sprite09 + spritestatedata2 Sprite10 + spritestatedata2 Sprite11 + spritestatedata2 Sprite12 + spritestatedata2 Sprite13 + spritestatedata2 Sprite14 + spritestatedata2 Sprite15 + ; ds $10 * $10 + +wSpriteDataEnd:: SECTION "OAM Buffer", WRAM0[$c300] @@ -203,9 +353,9 @@ wTempPic:: wOverworldMap:: ; c6e8 ds 1300 -wScreenEdgeTiles:: ; cbfc -; the tiles of the row or column to be redrawn by RedrawExposedScreenEdge - ds 20 * 2 +wRedrawRowOrColumnSrcTiles:: ; cbfc +; the tiles of the row or column to be redrawn by RedrawRowOrColumn + ds SCREEN_WIDTH * 2 ; coordinates of the position of the cursor for the top menu item (id 0) wTopMenuItemY:: ; cc24 @@ -236,14 +386,32 @@ wLastMenuItem:: ; cc2a ; id of previously selected menu item ds 1 -wcc2b:: ds 1 -wcc2c:: ds 1 -wcc2d:: ds 1 +wPartyAndBillsPCSavedMenuItem:: ; cc2b +; It is mainly used by the party menu to remember the cursor position while the +; menu isn't active. +; It is also used to remember the cursor position of mon lists (for the +; withdraw/deposit/release actions) in Bill's PC so that it doesn't get lost +; when you choose a mon from the list and a sub-menu is shown. It's reset when +; you return to the main Bill's PC menu. + ds 1 + +wBagSavedMenuItem:: ; cc2c +; It is used by the bag list to remember the cursor position while the menu +; isn't active. + ds 1 + +wBattleAndStartSavedMenuItem:: ; cc2d +; It is used by the start menu to remember the cursor position while the menu +; isn't active. +; The battle menu uses it so that the cursor position doesn't get lost when +; a sub-menu is shown. It's reset at the start of each battle. + ds 1 wPlayerMoveListIndex:: ; cc2e ds 1 wPlayerMonNumber:: ; cc2f +; index in party of currently battling mon ds 1 wMenuCursorLocation:: ; cc30 @@ -265,15 +433,22 @@ wListScrollOffset:: ; cc36 ; keeps track of what section of the list is on screen ds 1 -wcc37:: ds 1 +wMenuWatchMovingOutOfBounds:: ; cc37 +; If non-zero, then when wrapping is disabled and the player tries to go past +; the top or bottom of the menu, return from HandleMenuInput. This is useful for +; menus that have too many items to display at once on the screen because it +; allows the caller to scroll the entire menu up or down when this happens. + ds 1 wTradeCenterPointerTableIndex:: ; cc38 ds 1 ds 1 -wcc3a:: ds 1 -wcc3b:: ds 1 +wTextDest:: ; cc3a +; destination pointer for text output +; this variable is written to, but is never read from + ds 2 wDoNotWaitForButtonPressAfterDisplayingText:: ; cc3c ; if non-zero, skip waiting for a button press after displaying text in DisplayTextID @@ -288,8 +463,7 @@ wSerialExchangeNybbleTempReceiveData:: ; cc3d wLinkMenuSelectionReceiveBuffer:: ; cc3d ; two byte buffer ; the received menu selection is stored twice - -wcc3d:: ds 1 + ds 1 wSerialExchangeNybbleReceiveData:: ; cc3e ; the final received nybble is stored here by Serial_ExchangeNybble @@ -312,22 +486,40 @@ wLinkTimeoutCounter:: ; cc47 wUnknownSerialCounter:: ; cc47 ; 2 bytes -wcc47:: ds 1 -wcc48:: ds 1 +wEnteringCableClub:: ; cc47 + ds 1 + + ds 1 wWhichTradeMonSelectionMenu:: ; cc49 ; $00 = player mons ; $01 = enemy mons -wcc49:: ds 1 +wMonDataLocation:: ; cc49 +; 0 = player's party +; 1 = enemy party +; 2 = current box +; 3 = daycare +; 4 = in-battle mon +; +; AddPartyMon uses it slightly differently. +; If the lower nybble is 0, the mon is added to the player's party, else the enemy's. +; If the entire value is 0, then the player is allowed to name the mon. + ds 1 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 +wCheckFor180DegreeTurn:: ; cc4b +; whether to check for 180-degree turn (0 = don't, 1 = do) + ds 1 + + ds 1 + +wMissableObjectIndex:: ; cc4d + ds 1 wPredefID:: ; cc4e ds 1 @@ -350,18 +542,60 @@ wNPCMovementScriptBank:: ; cc58 ds 2 +wUnusedCC5B:: ; cc5b + +wVermilionDockTileMapBuffer:: ; cc5b +; 180 bytes + +wOaksAideRewardItemName:: ; cc5b + +wDexRatingNumMonsSeen:: ; cc5b + +wFilteredBagItems:: ; cc5b +; List of bag items that has been filtered to a certain type of items, +; such as drinks or fossils. + +wElevatorWarpMaps:: ; cc5b + +wMonPartySpritesSavedOAM:: ; cc5b +; Saved copy of OAM for the first frame of the animation to make it easy to +; flip back from the second frame. +; $60 bytes + +wTrainerCardBlkPacket:: ; cc5b +; $40 bytes + +wSlotMachineSevenAndBarModeChance:: ; cc5b +; If a random number greater than this value is generated, then the player is +; allowed to have three 7 symbols or bar symbols line up. +; So, this value is actually the chance of NOT entering that mode. +; If the slot is lucky, it equals 250, giving a 5/256 (~2%) chance. +; Otherwise, it equals 253, giving a 2/256 (~0.8%) chance. + wHallOfFame:: ; cc5b wBoostExpByExpAll:: ; cc5b wAnimationType:: ; cc5b ; values between 0-6. Shake screen horizontally, shake screen vertically, blink Pokemon... -wcc5b:: ds 1 -wcc5c:: ds 1 -wcc5d:: ds 1 -wcc5e:: ds 13 +wNPCMovementDirections:: ; cc5b + ds 1 + +wDexRatingNumMonsOwned:: ; cc5c + ds 1 + +wDexRatingText:: ; cc5d + ds 1 + +wSlotMachineSavedROMBank:: ; cc5e +; ROM back to return to when the player is done with the slot machine + ds 1 + + ds 26 + +wAnimPalette:: ; cc79 + ds 1 -wcc6b:: ds 14 -wcc79:: ds 30 + ds 29 wNPCMovementDirections2:: ; cc97 @@ -369,18 +603,33 @@ wSwitchPartyMonTempBuffer:: ; cc97 ; temporary buffer when swapping party mon data ds 10 -wcca1:: ds 49 +wNumStepsToTake:: ; cca1 +; used in Pallet Town scripted movement + ds 49 wRLEByteCount:: ; ccd2 ds 1 +wAddedToParty:: ; ccd3 +; 0 = not added +; 1 = added + wSimulatedJoypadStatesEnd:: ; ccd3 ; this is the end of the joypad states ; the list starts above this address and extends downwards in memory until here ; overloaded with below labels -wccd3:: ds 1 -wccd4:: ds 1 +wParentMenuItem:: ; ccd3 + +wCanEvolveFlags:: ; ccd3 +; 1 flag for each party member indicating whether it can evolve +; The purpose of these flags is to track which mons levelled up during the +; current battle at the end of the battle when evolution occurs. +; Other methods of evolution simply set it by calling TryEvolvingMon. + ds 1 + +wForceEvolution:: ; ccd4 + ds 1 ; if [ccd5] != 1, the second AI layer is not applied wAILayer2Encouragement:: ; ccd5 @@ -393,7 +642,12 @@ wPlayerSubstituteHP:: ; ccd7 wEnemySubstituteHP:: ; ccd8 ds 1 -wccd9:: ds 2 +wTestBattlePlayerSelectedMove:: ; ccd9 +; The player's selected move during a test battle. +; InitBattleVariables sets it to the move Pound. + ds 1 + + ds 1 wMoveMenuType:: ; ccdb ; 0=regular, 1=mimic, 2=above message box (relearn, heal pp..) @@ -416,8 +670,11 @@ wAICount:: ; ccdf wEnemyMoveListIndex:: ; cce2 ds 1 -wcce3:: ds 1 -wcce4:: ds 1 +wLastSwitchInEnemyMonHP:: ; cce3 +; The enemy mon's HP when it was switched in or when the current player mon +; was switched in, which was more recent. +; It's used to determine the message to print when switching out the player mon. + ds 2 wTotalPayDayMoney:: ; cce5 ; total amount of money made using Pay Day during the current battle @@ -430,25 +687,41 @@ wSafariBaitFactor:: ; cce9 ds 1 -wcceb:: ds 1 -wccec:: ds 1 -wMonIsDisobedient:: ds 1 -wccee:: ds 1 -wccef:: ds 1 -wccf0:: ds 1 -wPlayerUsedMove:: ds 1 -wEnemyUsedMove:: ds 1 -wccf3:: ds 1 -wMoveDidntMiss:: ds 1 +wTransformedEnemyMonOriginalDVs:: ; cceb + ds 2 + +wMonIsDisobedient:: ds 1 ; cced + +wPlayerDisabledMoveNumber:: ds 1 ; ccee +wEnemyDisabledMoveNumber:: ds 1 ; ccef + +wInHandlePlayerMonFainted:: ; ccf0 +; When running in the scope of HandlePlayerMonFainted, it equals 1. +; When running in the scope of HandleEnemyMonFainted, it equals 0. + ds 1 + +wPlayerUsedMove:: ds 1 ; ccf1 +wEnemyUsedMove:: ds 1 ; ccf2 + +wEnemyMonMinimized:: ds 1 ; ccf3 -wPartyFoughtCurrentEnemyFlags:: +wMoveDidntMiss:: ds 1 ; ccf4 + +wPartyFoughtCurrentEnemyFlags:: ; ccf5 ; flags that indicate which party members have fought the current enemy mon flag_array 6 -wccf6:: ds 1 -wccf7:: ds 14 +wLowHealthAlarmDisabled:: ; ccf6 +; Whether the low health alarm has been disabled due to the player winning the +; battle. + ds 1 -wUnknownSlotVar:: ; cd05 +wPlayerMonMinimized:: ; ccf7 + ds 1 + + ds 13 + +wLuckySlotHiddenObjectIndex:: ; cd05 wEnemyNumHits:: ; cd05 ; number of hits by enemy in attacks like Double Slap, etc. @@ -456,11 +729,11 @@ wEnemyNumHits:: ; cd05 wEnemyBideAccumulatedDamage:: ; cd05 ; the amount of damage accumulated by the enemy while biding (2 bytes) -ds 10 + ds 10 wInGameTradeGiveMonSpecies:: ; cd0f -wPlayerMonUnmodifiedLevel:: ; cd0f +wPlayerMonUnmodifiedLevel:: ; cd0f ds 1 wInGameTradeTextPointerTablePointer:: ; cd10 @@ -551,7 +824,11 @@ wInGameTradeReceiveMonSpecies:: wNPCMovementDirections2Index:: ; cd37 -wcd37:: ds 1 +wUnusedCD37:: ; cd37 + +wFilteredBagItemsCount:: ; cd37 +; number of items in wFilteredBagItems list + ds 1 wSimulatedJoypadStatesIndex:: ; cd38 ; the next simulated joypad state is at wSimulatedJoypadStatesEnd plus this value minus 1 @@ -573,6 +850,93 @@ wOverrideSimulatedJoypadStatesMask:: ; cd3b ds 1 +wFallingObjectsMovementData:: ; cd3d +; up to 20 bytes (one byte for each falling object) + +wSavedY:: ; cd3d + +wTempSCX:: ; cd3d + +wBattleTransitionCircleScreenQuadrantY:: ; cd3d +; 0 = upper half (Y < 9) +; 1 = lower half (Y >= 9) + +wBattleTransitionCopyTilesOffset:: ; cd3d +; 2 bytes +; after 1 row/column has been copied, the offset to the next one to copy from + +wInwardSpiralUpdateScreenCounter:: ; cd3d +; counts down from 7 so that every time 7 more tiles of the spiral have been +; placed, the tile map buffer is copied to VRAM so that progress is visible + +wHoFTeamIndex:: ; cd3d + +wSSAnneSmokeDriftAmount:: ; cd3d +; multiplied by 16 to get the number of times to go right by 2 pixels + +wRivalStarterTemp:: ; cd3d + +wBoxMonCounts:: ; cd3d +; 12 bytes +; array of the number of mons in each box + +wDexMaxSeenMon:: ; cd3d + +wPPRestoreItem:: ; cd3d + +wWereAnyMonsAsleep:: ; cd3d + +wCanPlaySlots:: ; cd3d + +wNumShakes:: ; cd3d + +wDayCareStartLevel:: ; cd3d +; the level of the mon at the time it entered day care + +wWhichBadge:: ; cd3d + +wPriceTemp:: ; cd3d +; 3-byte BCD number + +wTitleMonSpecies:: ; cd3d + +wPlayerCharacterOAMTile:: ; cd3d + +wMoveDownSmallStarsOAMCount:: ; cd3d +; the number of small stars OAM entries to move down + +wChargeMoveNum:: ; cd3d + +wCoordIndex:: ; cd3d + +wOptionsTextSpeedCursorX:: ; cd3d + +wBoxNumString:: ; cd3d + +wTrainerInfoTextBoxWidthPlus1:: ; cd3d + +wSwappedMenuItem:: ; cd3d + +wHoFMonSpecies:: ; cd3d + +wFieldMoves:: ; cd3d +; 4 bytes +; the current mon's field moves + +wBadgeNumberTile:: ; cd3d +; tile ID of the badge number being drawn + +wRodResponse:: ; cd3d +; 0 = no bite +; 1 = bite +; 2 = no fish on map + +wWhichTownMapLocation:: ; cd3d + +wStoppingWhichSlotMachineWheel:: ; cd3d +; which wheel the player is trying to stop +; 0 = none, 1 = wheel 1, 2 = wheel 2, 3 or greater = wheel 3 + wTradedPlayerMonSpecies:: ; cd3d wTradingWhichPlayerMon:: ; cd3d @@ -587,15 +951,44 @@ wPlayerSpinWhileMovingUpOrDownAnimDeltaY:: ; cd3d wHiddenObjectFunctionArgument:: ; cd3d -wSubtrahend:: ; cd3d -; subtract (BCD) wSubtrahend, wSubtrahend+1, wSubtrahend+2 - wWhichTrade:: ; cd3d ; which entry from TradeMons to select wTrainerSpriteOffset:: ; cd3d + +wUnusedCD3D:: ; cd3d ds 1 +wHUDPokeballGfxOffsetX:: ; cd3e +; difference in X between the next ball and the current one + +wBattleTransitionCircleScreenQuadrantX:: ; cd3e +; 0 = left half (X < 10) +; 1 = right half (X >= 10) + +wSSAnneSmokeX:: ; cd3e + +wRivalStarterBallSpriteIndex:: ; cd3e + +wDayCareNumLevelsGrown:: ; cd3e + +wOptionsBattleAnimCursorX:: ; cd3e + +wTrainerInfoTextBoxWidth:: ; cd3e + +wHoFPartyMonIndex:: ; cd3e + +wNumCreditsMonsDisplayed:: ; cd3e +; the number of credits mons that have been displayed so far + +wBadgeNameTile:: ; cd3e +; first tile ID of the name being drawn + +wFlyLocationsList:: ; cd3e +; 11 bytes plus $ff sentinel values at each end + +wSlotMachineWheel1Offset:: ; cd3e + wTradedEnemyMonSpecies:: ; cd3e wTradingWhichEnemyMon:: ; cd3e @@ -611,6 +1004,27 @@ wHiddenObjectFunctionRomBank:: ; cd3e wTrainerEngageDistance:: ; cd3e ds 1 +wHUDGraphicsTiles:: ; cd3f +; 3 bytes + +wDayCareTotalCost:: ; cd3f +; 2-byte BCD number + +wJigglypuffFacingDirections:: ; cd3f + +wOptionsBattleStyleCursorX:: ; cd3f + +wTrainerInfoTextBoxNextRowOffset:: ; cd3f + +wHoFMonLevel:: ; cd3f + +wBadgeOrFaceTiles:: ; cd3f +; 8 bytes +; a list of the first tile IDs of each badge or face (depending on whether the +; badge is owned) to be drawn on the trainer screen + +wSlotMachineWheel2Offset:: ; cd3f + wNameOfPlayerMonToBeTraded:: ; cd3f wFlyAnimBirdSpriteImageIndex:: ; cd3f @@ -622,50 +1036,160 @@ wPlayerSpinWhileMovingUpOrDownAnimFrameDelay:: ; cd3f wHiddenObjectIndex:: ; cd3f wTrainerFacingDirection:: ; cd3f -wcd3f:: ds 1 +wHoFMonOrPlayer:: ; cd40 +; show mon or show player? +; 0 = mon +; 1 = player + +wSlotMachineWheel3Offset:: ; cd40 + wPlayerSpinInPlaceAnimSoundID:: ; cd40 wHiddenObjectY:: ; cd40 wTrainerScreenY:: ; cd40 + +wUnusedCD40:: ; cd40 ds 1 +wDayCarePerLevelCost:: ; cd41 +; 2-byte BCD number (always set to $0100) + +wHoFTeamIndex2:: ; cd41 + +wHiddenItemOrCoinsIndex:: ; cd41 + wTradedPlayerMonOT:: ; cd41 wHiddenObjectX:: ; cd41 +wSlotMachineWinningSymbol:: ; cd41 +; the OAM tile number of the upper left corner of the winning symbol minus 2 + +wNumFieldMoves:: ; cd41 + +wSlotMachineWheel1BottomTile:: ; 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 +wHoFTeamNo:: ; cd42 + +wSlotMachineWheel1MiddleTile:: ; cd42 + +wFieldMovesLeftmostXCoord:: ; cd42 + ds 1 + +wLastFieldMoveID:: ; cd43 +; unused + +wSlotMachineWheel1TopTile:: ; cd43 + ds 1 + +wSlotMachineWheel2BottomTile:: ; cd44 + ds 1 + +wSlotMachineWheel2MiddleTile:: ; cd45 + ds 1 + +wTempCoins1:: ; cd46 +; 2 bytes +; temporary variable used to add payout amount to the player's coins + +wSlotMachineWheel2TopTile:: ; cd46 + ds 1 + +wBattleTransitionSpiralDirection:: ; cd47 +; 0 = outward, 1 = inward + +wSlotMachineWheel3BottomTile:: ; cd47 + ds 1 + +wSlotMachineWheel3MiddleTile:: ; cd48 + +wFacingDirectionList:: ; cd48 +; 4 bytes (also, the byte before the start of the list (cd47) is used a temp +; variable when the list is rotated) +; used when spinning the player's sprite + ds 1 + +wSlotMachineWheel3TopTile:: ; cd49 + +wTempObtainedBadgesBooleans:: +; 8 bytes +; temporary list created when displaying the badges on the trainer screen +; one byte for each badge; 0 = not obtained, 1 = obtained + ds 1 + +wTempCoins2:: ; cd4a +; 2 bytes +; temporary variable used to subtract the bet amount from the player's coins + +wPayoutCoins:: ; cd4a +; 2 bytes + ds 2 wTradedPlayerMonOTID:: ; cd4c -wcd4c:: ds 1 -wcd4d:: ds 1 +wSlotMachineFlags:: ; cd4c +; These flags are set randomly and control when the wheels stop. +; bit 6: allow the player to win in general +; bit 7: allow the player to win with 7 or bar (plus the effect of bit 6) + ds 1 + +wSlotMachineWheel1SlipCounter:: ; cd4d +; wheel 1 can "slip" while this is non-zero + +wCutTile:: ; cd4d +; $3d = tree tile +; $52 = grass tile + ds 1 + +wSlotMachineWheel2SlipCounter:: ; cd4e +; wheel 2 can "slip" while this is non-zero wTradedEnemyMonOT:: ; cd4e + ds 1 + +wSavedPlayerScreenY:: ; cd4f + +wSlotMachineRerollCounter:: ; cd4f +; The remaining number of times wheel 3 will roll down a symbol until a match is +; found, when winning is enabled. It's initialized to 4 each bet. + +wEmotionBubbleSpriteIndex:: ; cd4f +; the index of the sprite the emotion bubble is to be displayed above + ds 1 + +wWhichEmotionBubble:: ; cd50 -wcd4e:: ds 1 -wcd4f:: ds 1 -wcd50:: ds 9 +wSlotMachineBet:: ; cd50 +; how many coins the player bet on the slot machine (1 to 3) + +wSavedPlayerFacingDirection:: ; cd50 + +wWhichAnimationOffsets:: ; cd50 +; 0 = cut animation, 1 = boulder dust animation + ds 9 wTradedEnemyMonOTID:: ; cd59 ds 2 -wcd5b:: ds 1 -wcd5c:: ds 1 +wStandingOnWarpPadOrHole:: ; cd5b +; 0 = neither +; 1 = warp pad +; 2 = hole + +wOAMBaseTile:: ; cd5b + +wGymTrashCanIndex:: ; cd5b + ds 1 + +wSymmetricSpriteOAMAttributes:: ; cd5c + ds 1 wMonPartySpriteSpecies:: ; cd5d ds 1 @@ -681,24 +1205,49 @@ wRightGBMonSpecies:: ; cd5f wFlags_0xcd60:: ; cd60 ; bit 0: is player engaged by trainer (to avoid being engaged by multiple trainers simultaneously) ; bit 1: boulder dust animation (from using Strength) pending +; bit 3: using generic PC ; bit 5: don't play sound when A or B is pressed in menu ; bit 6: tried pushing against boulder once (you need to push twice before it will move) ds 1 ds 9 -wcd6a:: ds 1 +wActionResultOrTookBattleTurn:: ; cd6a +; This has overlapping related uses. +; When the player tries to use an item or use certain field moves, 0 is stored +; when the attempt fails and 1 is stored when the attempt succeeds. +; In addition, some items store 2 for certain types of failures, but this +; cannot happen in battle. +; In battle, a non-zero value indicates the player has taken their turn using +; something other than a move (e.g. using an item or switching pokemon). +; So, when an item is successfully used in battle, this value becomes non-zero +; and the player is not allowed to make a move and the two uses are compatible. + ds 1 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 +wDownscaledMonSize:: ; cd6c +; size of downscaled mon pic used in pokeball entering/exiting animation +; $00 = 5×5 +; $01 = 3×3 + +wNumMovesMinusOne:: ; cd6c +; FormatMovesString stores the number of moves minus one here + ds 1 + +wcd6d:: ds 4 ; buffer for various data + +wStatusScreenCurrentPP:: ; cd71 +; temp variable used to print a move's current PP on the status screen + ds 1 + + ds 6 + +wNormalMaxPPList:: ; cd78 +; list of normal max PP (without PP up) values + ds 9 wSerialOtherGameboyRandomNumberListBlock:: ; cd81 ; buffer for transferring the random number list generated by the other gameboy @@ -707,34 +1256,86 @@ wTileMapBackup2:: ; cd81 ; second buffer for temporarily saving and restoring current screen's tiles (e.g. if menus are drawn on top) ds 20 * 18 +wNamingScreenNameLength:: ; cee9 + +wEvoOldSpecies:: ; cee9 + wBuffer:: ; cee9 ; Temporary storage area of 30 bytes. + +wTownMapCoords:: ; cee9 +; lower nybble is x, upper nybble is y + +wLearningMovesFromDayCare:: ; cee9 +; whether WriteMonMoves is being used to make a mon learn moves from day care +; non-zero if so + +wChangeMonPicEnemyTurnSpecies:: ; cee9 + wHPBarMaxHP:: ; cee9 - ds 2 + ds 1 + +wNamingScreenSubmitName:: ; ceea +; non-zero when the player has chosen to submit the name + +wChangeMonPicPlayerTurnSpecies:: ; ceea + +wEvoNewSpecies:: ; ceea + ds 1 + +wAlphabetCase:: ; ceeb +; 0 = upper case +; 1 = lower case + +wEvoMonTileOffset:: ; ceeb + wHPBarOldHP:: ; ceeb - ds 2 + ds 1 + +wEvoCancelled:: ; ceec + ds 1 + +wNamingScreenLetter:: ; ceed + wHPBarNewHP:: ; ceed ds 2 wHPBarDelta:: ; ceef ds 1 -wcef0:: ds 1 -wcef1:: ds 12 +wHPBarTempHP:: ; cef0 + ds 2 + + ds 11 wHPBarHPDifference:: ; cefd ds 1 ds 7 -wcf05:: ds 1 -wcf06:: ds 1 +wAIItem:: ; cf05 +; the item that the AI used + ds 1 + +wUsedItemOnWhichPokemon:: ; cf05 + ds 1 wAnimSoundID:: ; cf07 ; sound ID during battle animations ds 1 -wcf08:: ds 1 -wcf09:: ds 1 -wcf0a:: ds 1 +wBankswitchHomeSavedROMBank:: ; cf08 +; used as a storage value for the bank to return to after a BankswitchHome (bankswitch in homebank) + ds 1 + +wBankswitchHomeTemp:: ; cf09 +; used as a temp storage value for the bank to switch to + ds 1 + +wBoughtOrSoldItemInMart:: ; cf0a +; 0 = nothing bought or sold in pokemart +; 1 = bought or sold something in pokemart +; this value is not used for anything + ds 1 + wBattleResult:: ; cf0b ; $00 - win ; $01 - lose @@ -745,16 +1346,23 @@ 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) + +wTilePlayerStandingOn:: ; cf0e +; used in CheckForTilePairCollisions2 to store the tile the player is on + ds 1 + +wNPCNumScriptedSteps:: ds 1 ; cf0f wNPCMovementScriptFunctionNum:: ; cf10 ; which script function within the pointer table indicated by ; wNPCMovementScriptPointerTableNum ds 1 -wcf11:: ds 1 +wTextPredefFlag:: ; cf11 +; bit 0: set when printing a text predef so that DisplayTextID doesn't switch +; to the current map's bank + ds 1 wPredefParentBank:: ; cf12 ds 1 @@ -771,7 +1379,10 @@ wNPCMovementScriptSpriteOffset:: ; cf17 ; sprite offset of sprite being controlled by NPC movement script ds 1 -wcf18:: ds 2 +wScriptedNPCWalkCounter:: ; cf18 + ds 1 + + ds 1 wGBC:: ; cf1a ds 1 @@ -780,46 +1391,80 @@ 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 +wDefaultPaletteCommand:: ; cf1c + ds 1 + +wPlayerHPBarColor:: ; cf1d + +wWholeScreenPaletteMonSpecies:: ; cf1d +; species of the mon whose palette is used for the whole screen + ds 1 + +wEnemyHPBarColor:: ; cf1e + ds 1 + +; 0: green +; 1: yellow +; 2: red +wPartyMenuHPBarColors:: ; cf1f + ds 6 + +wStatusScreenHPBarColor:: ; cf25 + ds 1 + + ds 7 + +wCopyingSGBTileData:: ; cf2d + +wWhichPartyMenuHPBar:: ; cf2d + +wPalPacket:: ; cf2d + ds 1 + +wPartyMenuBlkPacket:: ; cf2e +; $30 bytes + ds 29 + +wExpAmountGained:: ; cf4b +; 2-byte big-endian number +; the total amount of exp a mon gained + +wcf4b:: ds 2 ; storage buffer for various strings + wGainBoostedExp:: ; cf4d - ds 1 + ds 1 + ds 17 wGymCityName:: ; cf5f -wStringBuffer1:: ; cf5f - ds 16 + 1 + ds 17 + wGymLeaderName:: ; cf70 -wStringBuffer2:: ; cf70 - ds 16 + 1 -wStringBuffer3:: ; cf81 - ds 9 + 1 + ds NAME_LENGTH -wList:: ; cf8b +wItemList:: ; cf7b + ds 16 + +wListPointer:: ; cf8b ds 2 -wcf8d:: ds 1 -wcf8e:: ds 1 +wUnusedCF8D:: ; cf8d +; 2 bytes +; used to store pointers, but never read + ds 2 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 +wPrintItemPrices:: ; cf93 +; if non-zero, then print item prices when displaying lists + ds 1 wHPBarType:: ; cf94 ; type of HP bar @@ -831,9 +1476,22 @@ wListMenuID:: ; cf94 ; ID used by DisplayListMenuID ds 1 -wcf95:: ds 1 -wcf96:: ds 1 -wcf97:: ds 1 +wRemoveMonFromBox:: ; cf95 +; if non-zero, RemovePokemon will remove the mon from the current box, +; else it will remove the mon from the party + +wMoveMonType:: ; cf95 +; 0 = move from box to party +; 1 = move from party to box +; 2 = move from daycare to party +; 3 = move from party to daycare + ds 1 + +wItemQuantity:: ; cf96 + ds 1 + +wMaxItemQuantity:: ; cf97 + ds 1 ; LoadMonData copies mon data here wLoadedMon:: party_struct wLoadedMon ; cf98 @@ -853,41 +1511,66 @@ wTileInFrontOfPlayer:: ; cfc6 ; background tile number in front of the player (either 1 or 2 steps ahead) ds 1 -wMusicHeaderPointer:: ; cfc7 -; (the current music channel address - $4000) / 3 +wAudioFadeOutControl:: ; cfc7 +; The desired fade counter reload value is stored here prior to calling +; PlaySound in order to cause the current music to fade out before the new +; music begins playing. Storing 0 causes no fade out to occur and the new music +; to begin immediately. +; This variable has another use related to fade-out, as well. PlaySound stores +; the sound ID of the music that should be played after the fade-out is finished +; in this variable. FadeOutAudio checks if it's non-zero every V-Blank and +; fades out the current audio if it is. Once it has finished fading out the +; audio, it zeroes this variable and starts playing the sound ID stored in it. ds 1 -wcfc8:: ds 1 -wcfc9:: ds 1 -wcfca:: ds 1 +wAudioFadeOutCounterReloadValue:: ; cfc8 + ds 1 + +wAudioFadeOutCounter:: ; cfc9 + ds 1 + +wLastMusicSoundID:: ; cfca +; This is used to determine whether the default music is already playing when +; attempting to play the default music (in order to avoid restarting the same +; music) and whether the music has already been stopped when attempting to +; fade out the current music (so that the new music can be begin immediately +; instead of waiting). +; It sometimes contains the sound ID of the last music played, but it may also +; contain $ff (if the music has been stopped) or 0 (because some routines zero +; it in order to prevent assumptions from being made about the current state of +; the music). + ds 1 wUpdateSpritesEnabled:: ; cfcb -; $01 enables UpdateSprites; anything else disables it +; $00 = causes sprites to be hidden and the value to change to $ff +; $01 = enabled +; $ff = disabled +; other values aren't used ds 1 -W_ENEMYMOVENUM:: ; cfcc +wEnemyMoveNum:: ; cfcc ds 1 -W_ENEMYMOVEEFFECT:: ; cfcd +wEnemyMoveEffect:: ; cfcd ds 1 -W_ENEMYMOVEPOWER:: ; cfce +wEnemyMovePower:: ; cfce ds 1 -W_ENEMYMOVETYPE:: ; cfcf +wEnemyMoveType:: ; cfcf ds 1 -W_ENEMYMOVEACCURACY:: ; cfd0 +wEnemyMoveAccuracy:: ; cfd0 ds 1 -W_ENEMYMOVEMAXPP:: ; cfd1 +wEnemyMoveMaxPP:: ; cfd1 ds 1 -W_PLAYERMOVENUM:: ; cfd2 +wPlayerMoveNum:: ; cfd2 ds 1 -W_PLAYERMOVEEFFECT:: ; cfd3 +wPlayerMoveEffect:: ; cfd3 ds 1 -W_PLAYERMOVEPOWER:: ; cfd4 +wPlayerMovePower:: ; cfd4 ds 1 -W_PLAYERMOVETYPE:: ; cfd5 +wPlayerMoveType:: ; cfd5 ds 1 -W_PLAYERMOVEACCURACY:: ; cfd6 +wPlayerMoveAccuracy:: ; cfd6 ds 1 -W_PLAYERMOVEMAXPP:: ; cfd7 +wPlayerMoveMaxPP:: ; cfd7 ds 1 @@ -896,7 +1579,7 @@ wEnemyMonSpecies2:: ; cfd8 wBattleMonSpecies2:: ; cfd9 ds 1 -wEnemyMonNick:: ds 11 ; cfda +wEnemyMonNick:: ds NAME_LENGTH ; cfda wEnemyMon:: ; cfe5 ; The wEnemyMon struct reaches past 0xcfff, @@ -927,36 +1610,50 @@ wEnemyMonDefense:: dw wEnemyMonSpeed:: dw wEnemyMonSpecial:: dw wEnemyMonPP:: ds 2 ; NUM_MOVES - 2 -SECTION "WRAM Bank 1", WRAMX, BANK[1] +SECTION "WRAM Bank 1", WRAMX[$d000], BANK[1] ds 2 ; NUM_MOVES - 2 wEnemyMonBaseStats:: ds 5 wEnemyMonCatchRate:: ds 1 wEnemyMonBaseExp:: ds 1 -wBattleMonNick:: ds 11 ; d009 +wBattleMonNick:: ds NAME_LENGTH ; d009 wBattleMon:: battle_struct wBattleMon ; d014 -W_TRAINERCLASS:: ; d031 +wTrainerClass:: ; d031 + ds 1 + + ds 1 + +wTrainerPicPointer:: ; d033 + ds 2 ds 1 +wTempMoveNameBuffer:: ; d036 + +wLearnMoveMonName:: ; d036 +; The name of the mon that is learning a move. + ds 16 + +wTrainerBaseMoney:: ; d046 +; 2-byte BCD number +; money received after battle = base money × level of highest-level enemy mon + ds 2 + +wMissableObjectCounter:: ; d048 ds 1 -wd033:: ds 1 -wd034:: ds 2 -wd036:: ds 16 -wd046:: ds 1 -wd047:: ds 1 -wd048:: ds 2 + ds 1 -W_TRAINERNAME:: ; d04a +wTrainerName:: ; d04a ; 13 bytes for the letters of the opposing trainer ; the name is terminated with $50 with possible ; unused trailing letters ds 13 -W_ISINBATTLE:: ; d057 +wIsInBattle:: ; d057 +; lost battle, this is -1 ; no battle, this is 0 ; wild battle, this is 1 ; trainer battle, this is 2 @@ -966,12 +1663,12 @@ wPartyGainExpFlags:: ; d058 ; flags that indicate which party members should be be given exp when GainExperience is called flag_array 6 -W_CUROPPONENT:: ; d059 +wCurOpponent:: ; d059 ; in a wild battle, this is the species of pokemon -; in a trainer battle, this is the trainer class + $C8 +; in a trainer battle, this is the trainer class + 200 ds 1 -W_BATTLETYPE:: ; d05a +wBattleType:: ; d05a ; in normal battle, this is 0 ; in old man battle, this is 1 ; in safari battle, this is 2 @@ -984,14 +1681,14 @@ wDamageMultipliers:: ; d05b ; $a = neutral ; $14 = super-effective ; bit 7: STAB - ds 1 + ds 1 -W_LONEATTACKNO:: ; d05c +wLoneAttackNo:: ; d05c ; which entry in LoneAttacks to use -W_GYMLEADERNO:: ; d05c +wGymLeaderNo:: ; d05c ; it's actually the same thing as ^ ds 1 -W_TRAINERNO:: ; d05d +wTrainerNo:: ; d05d ; which instance of [youngster, lass, etc] is this? ds 1 @@ -1002,7 +1699,7 @@ wCriticalHitOrOHKO:: ; d05e ; $ff = failed OHKO ds 1 -W_MOVEMISSED:: ; d05f +wMoveMissed:: ; d05f ds 1 wPlayerStatsToDouble:: ; d060 @@ -1013,7 +1710,7 @@ wPlayerStatsToHalve:: ; d061 ; always 0 ds 1 -W_PLAYERBATTSTATUS1:: ; d062 +wPlayerBattleStatus1:: ; d062 ; bit 0 - bide ; bit 1 - thrash / petal dance ; bit 2 - attacking multiple times (e.g. double kick) @@ -1024,7 +1721,7 @@ W_PLAYERBATTSTATUS1:: ; d062 ; bit 7 - confusion ds 1 -W_PLAYERBATTSTATUS2:: ; d063 +wPlayerBattleStatus2:: ; d063 ; bit 0 - X Accuracy effect ; bit 1 - protected by "mist" ; bit 2 - focus energy effect @@ -1034,7 +1731,7 @@ W_PLAYERBATTSTATUS2:: ; d063 ; bit 7 - leech seeded ds 1 -W_PLAYERBATTSTATUS3:: ; d064 +wPlayerBattleStatus3:: ; d064 ; bit 0 - toxic ; bit 1 - light screen ; bit 2 - reflect @@ -1049,37 +1746,43 @@ wEnemyStatsToHalve:: ; d066 ; always 0 ds 1 -W_ENEMYBATTSTATUS1:: ; d067 +wEnemyBattleStatus1:: ; d067 ds 1 -W_ENEMYBATTSTATUS2:: ; d068 +wEnemyBattleStatus2:: ; d068 ds 1 -W_ENEMYBATTSTATUS3:: ; d069 +wEnemyBattleStatus3:: ; d069 ds 1 wPlayerNumAttacksLeft:: ; when the player is attacking multiple times, the number of attacks left ds 1 -W_PLAYERCONFUSEDCOUNTER:: ; wd06b +wPlayerConfusedCounter:: ; d06b ds 1 -W_PLAYERTOXICCOUNTER:: ; d06c +wPlayerToxicCounter:: ; d06c ds 1 -W_PLAYERDISABLEDMOVE:: ; d06d + +wPlayerDisabledMove:: ; d06d +; high nibble: which move is disabled (1-4) +; low nibble: disable turns left ds 1 ds 1 -wEnemyNumAttacksLeft:: +wEnemyNumAttacksLeft:: ; d06f ; when the enemy is attacking multiple times, the number of attacks left ds 1 -W_ENEMYCONFUSEDCOUNTER:: ; wd070 +wEnemyConfusedCounter:: ; d070 ds 1 -W_ENEMYTOXICCOUNTER:: ; d071 +wEnemyToxicCounter:: ; d071 ds 1 -W_ENEMYDISABLEDMOVE:: ; d072 + +wEnemyDisabledMove:: ; d072 +; high nibble: which move is disabled (1-4) +; low nibble: disable turns left ds 1 ds 1 @@ -1093,62 +1796,113 @@ wPlayerBideAccumulatedDamage:: ; d074 wUnknownSerialCounter2:: ; d075 ; 2 bytes -ds 4 + ds 4 wEscapedFromBattle:: ; non-zero when an item or move that allows escape from battle was used ds 1 -wd079:: ds 1 -wd07a:: ds 1 -wd07b:: ds 1 +wAmountMoneyWon:: ; d079 +; 3-byte BCD number + +wObjectToHide:: ; d079 + ds 1 + +wObjectToShow:: ; d07a + ds 1 + + ds 1 + +wDefaultMap:: ; d07c +; the map you will start at when the debug bit is set + +wMenuItemOffset:: ; d07c -W_ANIMATIONID:: ; d07c +wAnimationID:: ; d07c ; ID number of the current battle animation ds 1 -wd07d:: ds 1 -wd07e:: ds 3 +wNamingScreenType:: ; d07d + +wPartyMenuTypeOrMessageID:: ; d07d + +wTempTilesetNumTiles:: ; d07d +; temporary storage for the number of tiles in a tileset + ds 1 + +wSavedListScrollOffset:: ; d07e +; used by the pokemart code to save the existing value of wListScrollOffset +; so that it can be restored when the player is done with the pokemart NPC + ds 1 + + ds 2 ; base coordinates of frame block -W_BASECOORDX:: ; d081 +wBaseCoordX:: ; d081 ds 1 -W_BASECOORDY:: ; d082 +wBaseCoordY:: ; d082 ds 1 ; low health alarm counter/enable ; high bit = enable, others = timer to cycle frequencies wLowHealthAlarm:: ds 1 ; d083 -W_FBTILECOUNTER:: ; d084 +wFBTileCounter:: ; d084 ; counts how many tiles of the current frame block have been drawn ds 1 -wd085:: ds 1 +wMovingBGTilesCounter2:: ; d085 + ds 1 -W_SUBANIMFRAMEDELAY:: ; d086 +wSubAnimFrameDelay:: ; d086 ; duration of each frame of the current subanimation in terms of screen refreshes ds 1 -W_SUBANIMCOUNTER:: ; d087 +wSubAnimCounter:: ; d087 ; counts the number of subentries left in the current subanimation ds 1 -wd088:: ds 1 +wSaveFileStatus:: ; d088 +; 1 = no save file or save file is corrupted +; 2 = save file exists and no corruption has been detected + ds 1 -W_NUMFBTILES:: ; d089 +wNumFBTiles:: ; d089 ; number of tiles in current battle animation frame block ds 1 +wFlashScreenLongCounter:: ; d08a + +wSpiralBallsBaseY:: ; d08a + +wFallingObjectMovementByte:: ; d08a +; bits 0-6: index into FallingObjects_DeltaXs array (0 - 8) +; bit 7: direction; 0 = right, 1 = left + +wNumShootingBalls:: ; d08a + wTradedMonMovingRight:: ; d08a ; $01 if mon is moving from left gameboy to right gameboy; $00 if vice versa -wd08a:: ds 1 +wOptionsInitialized:: ; d08a + +wNewSlotMachineBallTile:: ; d08a + +wCoordAdjustmentAmount:: ; d08a +; how much to add to the X/Y coord + +wUnusedD08A:: ; d08a + ds 1 + +wSpiralBallsBaseX:: ; d08b -wTownMapSpriteBlinkingCounter:: ; d08b +wNumFallingObjects:: ; d08b -wPartyMonAnimCounter:: ; d08b +wSlideMonDelay:: ; d08b -W_SUBANIMTRANSFORM:: ; d08b +wAnimCounter:: ; d08b +; generic counter variable for various animations + +wSubAnimTransform:: ; d08b ; controls what transformations are applied to the subanimation ; 01: flip horizontally and vertically ; 02: flip horizontally and translate downwards 40 pixels @@ -1169,92 +1923,119 @@ wEndBattleTextRomBank:: ; d092 ds 1 -W_SUBANIMADDRPTR:: ; d094 +wSubAnimAddrPtr:: ; d094 ; the address _of the address_ of the current subanimation entry ds 2 -W_SUBANIMSUBENTRYADDR:: ; d096 + +wSlotMachineAllowMatchesCounter:: ; d096 +; If non-zero, the allow matches flag is always set. +; There is a 1/256 (~0.4%) chance that this value will be set to 60, which is +; the only way it can increase. Winning certain payout amounts will decrement it +; or zero it. + +wSubAnimSubEntryAddr:: ; d096 ; the address of the current subentry of the current subanimation ds 2 ds 2 -wd09a:: ds 1 +wOutwardSpiralTileMapPointer:: ; d09a + ds 1 + +wPartyMenuAnimMonEnabled:: ; d09b 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 +wUnusedD09B:: ; d09b + ds 1 -W_FBDESTADDR:: ; d09c +wFBDestAddr:: ; d09c ; current destination address in OAM for frame blocks (big endian) ds 2 -W_FBMODE:: ; d09e +wFBMode:: ; d09e ; controls how the frame blocks are put together to form frames ; specifically, after finishing drawing the frame block, the frame block's mode determines what happens ; 00: clean OAM buffer and delay ; 02: move onto the next frame block with no delay and no cleaning OAM buffer ; 03: delay, but don't clean OAM buffer -; 04: delay, without cleaning OAM buffer, and do not advance [W_FBDESTADDR], so that the next frame block will overwrite this one -; sprite data is written column by column, each byte contains 8 columns (one for ech bit) -; for 2bpp sprites, pairs of two consecutive bytes (i.e. pairs of consecutive rows of sprite data) -; contain the upper and lower bit of each of the 8 pixels, respectively +; 04: delay, without cleaning OAM buffer, and do not advance [wFBDestAddr], so that the next frame block will overwrite this one ds 1 +wLinkCableAnimBulgeToggle:: ; d09f +; 0 = small +; 1 = big + +wIntroNidorinoBaseTile:: ; d09f + +wOutwardSpiralCurrentDirection:: ; d09f + +wDropletTile:: ; d09f + wNewTileBlockID:: ; d09f -wd09f:: ds 1 -wd0a0:: ds 1 +wWhichBattleAnimTileset:: ; d09f -W_SPRITECURPOSX:: ; d0a1 +wSquishMonCurrentDirection:: ; d09f +; 0 = left +; 1 = right + +wSlideMonUpBottomRowLeftTile:: ; d09f +; the tile ID of the leftmost tile in the bottom row in AnimationSlideMonUp_ ds 1 -W_SPRITECURPOSY:: ; d0a2 + +wDisableVBlankWYUpdate:: ds 1 ; if non-zero, don't update WY during V-blank + +wSpriteCurPosX:: ; d0a1 ds 1 -W_SPRITEWITDH:: ; d0a3 +wSpriteCurPosY:: ; d0a2 ds 1 -W_SPRITEHEIGHT:: ; d0a4 +wSpriteWidth:: ; d0a3 ds 1 -W_SPRITEINPUTCURBYTE:: ; d0a5 +wSpriteHeight:: ; d0a4 + ds 1 +wSpriteInputCurByte:: ; d0a5 ; current input byte ds 1 -W_SPRITEINPUTBITCOUNTER:: ; d0a6 +wSpriteInputBitCounter:: ; d0a6 ; bit offset of last read input bit ds 1 -W_SPRITEOUTPUTBITOFFSET:: ; d0a7; determines where in the output byte the two bits are placed. Each byte contains four columns (2bpp data) +wSpriteOutputBitOffset:: ; d0a7; determines where in the output byte the two bits are placed. Each byte contains four columns (2bpp data) ; 3 -> XX000000 1st column ; 2 -> 00XX0000 2nd column ; 1 -> 0000XX00 3rd column ; 0 -> 000000XX 4th column ds 1 -W_SPRITELOADFLAGS:: ; d0a8 +wSpriteLoadFlags:: ; d0a8 ; bit 0 determines used buffer (0 -> $a188, 1 -> $a310) ; bit 1 loading last sprite chunk? (there are at most 2 chunks per load operation) ds 1 -W_SPRITEUNPACKMODE:: ; d0a9 +wSpriteUnpackMode:: ; d0a9 ds 1 -W_SPRITEFLIPPED:: ; d0aa +wSpriteFlipped:: ; d0aa ds 1 -W_SPRITEINPUTPTR:: ; d0ab +wSpriteInputPtr:: ; d0ab ; pointer to next input byte ds 2 -W_SPRITEOUTPUTPTR:: ; d0ad +wSpriteOutputPtr:: ; d0ad ; pointer to current output byte ds 2 -W_SPRITEOUTPUTPTRCACHED:: ; d0af +wSpriteOutputPtrCached:: ; d0af ; used to revert pointer for different bit offsets ds 2 -W_SPRITEDECODETABLE0PTR:: ; d0b1 +wSpriteDecodeTable0Ptr:: ; d0b1 ; pointer to differential decoding table (assuming initial value 0) ds 2 -W_SPRITEDECODETABLE1PTR:: ; d0b3 +wSpriteDecodeTable1Ptr:: ; 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 @@ -1262,64 +2043,69 @@ wNameListType:: ; d0b6 wPredefBank:: ; d0b7 ds 1 -W_MONHEADER:: ; d0b8 -W_MONHDEXNUM:: ; d0b8 +wMonHeader:: ; d0b8 + +wMonHIndex:: ; d0b8 +; In the ROM base stats data stucture, this is the dex number, but it is +; overwritten with the internal index number after the header is copied to WRAM. ds 1 -W_MONHBASESTATS:: ; d0b9 -W_MONHBASEHP:: ; d0b9 +wMonHBaseStats:: ; d0b9 +wMonHBaseHP:: ; d0b9 ds 1 -W_MONHBASEATTACK:: ; d0ba +wMonHBaseAttack:: ; d0ba ds 1 -W_MONHBASEDEFENSE:: ; d0bb +wMonHBaseDefense:: ; d0bb ds 1 -W_MONHBASESPEED:: ; d0bc +wMonHBaseSpeed:: ; d0bc ds 1 -W_MONHBASESPECIAL:: ; d0bd +wMonHBaseSpecial:: ; d0bd ds 1 -W_MONHTYPES:: ; d0be -W_MONHTYPE1:: ; d0be +wMonHTypes:: ; d0be +wMonHType1:: ; d0be ds 1 -W_MONHTYPE2:: ; d0bf +wMonHType2:: ; d0bf ds 1 -W_MONHCATCHRATE:: ; d0c0 +wMonHCatchRate:: ; d0c0 ds 1 -W_MONHBASEXP:: ; d0c1 +wMonHBaseEXP:: ; d0c1 ds 1 -W_MONHSPRITEDIM:: ; d0c2 +wMonHSpriteDim:: ; d0c2 ds 1 -W_MONHFRONTSPRITE:: ; d0c3 +wMonHFrontSprite:: ; d0c3 ds 2 -W_MONHBACKSPRITE:: ; d0c5 +wMonHBackSprite:: ; d0c5 ds 2 -W_MONHMOVES:: ; d0c7 - ds 4 +wMonHMoves:: ; d0c7 + ds NUM_MOVES -W_MONHGROWTHRATE:: ; d0cb +wMonHGrowthRate:: ; d0cb ds 1 -W_MONHLEARNSET:: ; d0cc +wMonHLearnset:: ; d0cc ; bit field flag_array 50 + 5 ds 1 -wd0d4:: ds 3 +wSavedTilesetType:: ; d0d4 +; saved at the start of a battle and then written back at the end of the battle + ds 1 -W_MONHPADDING:: ; d0d7 + ds 2 -W_DAMAGE:: ; d0d7 +wDamage:: ; d0d7 ds 2 -ds 2 + ds 2 -wRepelRemainingSteps:: ; wd0db - ds 1 +wRepelRemainingSteps:: ; d0db + ds 1 -wMoves:: ; wd0dc +wMoves:: ; d0dc ; list of moves for FormatMovesString ds 4 @@ -1329,50 +2115,139 @@ wMoveNum:: ; d0e0 wMovesString:: ; d0e1 ds 56 -wd119:: ds 1 +wUnusedD119:: ; d119 + ds 1 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 +wInitListType:: ; d11b +; the type of list for InitList to init + ds 1 + +wCapturedMonSpecies:: ; d11c +; 0 if no mon was captured + ds 1 + +wFirstMonsNotOutYet:: ; d11d +; Non-zero when the first player mon and enemy mon haven't been sent out yet. +; It prevents the game from asking if the player wants to choose another mon +; when the enemy sends out their first mon and suppresses the "no will to fight" +; message when the game searches for the first non-fainted mon in the party, +; which will be the first mon sent out. + ds 1 + +wPokeBallCaptureCalcTemp:: ; d11e + +; lower nybble: number of shakes +; upper nybble: number of animations to play +wPokeBallAnimData:: ; d11e + +wUsingPPUp:: ; d11e + +wMaxPP:: ; d11e + +; 0 for player, non-zero for enemy +wCalculateWhoseStats:: ; d11e + +wTypeEffectiveness:: ; d11e + +wMoveType:: ; d11e + +wNumSetBits:: ; d11e + +wd11e:: ds 1 ; used as a Pokemon and Item storage value. Also used as an output value for CountSetBits + +wForcePlayerToChooseMon:: ; d11f +; When this value is non-zero, the player isn't allowed to exit the party menu +; by pressing B and not choosing a mon. + ds 1 wNumRunAttempts:: ; number of times the player has tried to run from battle ds 1 -wd121:: ds 1 -wd122:: ds 2 -wd124:: ds 1 +wEvolutionOccurred:: ; d121 + ds 1 + +wVBlankSavedROMBank:: ; d122 + ds 1 + + ds 1 + +wIsKeyItem:: ; d124 + ds 1 wTextBoxID:: ; d125 ds 1 -wd126:: ds 1 +wCurrentMapScriptFlags:: ds 1 ; not exactly sure what this is used for, but it seems to be used as a multipurpose temp flag value -W_CURENEMYLVL:: ; d127 +wCurEnemyLVL:: ; d127 ds 1 -wd128:: ds 1 -wd129:: ds 1 -wd12a:: ds 1 +wItemListPointer:: ; d128 +; pointer to list of items terminated by $FF + ds 2 + +wListCount:: +; number of entries in a list + ds 1 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 +wTwoOptionMenuID:: ; d12c + ds 1 + +wChosenMenuItem:: ; d12d +; the id of the menu item the player ultimately chose + +wOutOfBattleBlackout:: ; d12d +; non-zero when the whole party has fainted due to out-of-battle poison damage + ds 1 + +wMenuExitMethod:: ; d12e +; the way the user exited a menu +; for list menus and the buy/sell/quit menu: +; $01 = the user pressed A to choose a menu item +; $02 = the user pressed B to cancel +; for two-option menus: +; $01 = the user pressed A with the first menu item selected +; $02 = the user pressed B or pressed A with the second menu item selected + ds 1 + +wDungeonWarpDataEntrySize:: ; d12f +; the size is always 6, so they didn't need a variable in RAM for this + +wWhichPewterGuy:: ; d12f +; 0 = museum guy +; 1 = gym guy + +wWhichPrizeWindow:: ; d12f +; there are 3 windows, from 0 to 2 + +wGymGateTileBlock:: ; d12f +; a horizontal or vertical gate block + ds 1 + +wSavedSpriteScreenY:: ; d130 + ds 1 + +wSavedSpriteScreenX:: ; d131 + ds 1 + +wSavedSpriteMapY:: ; d132 + ds 1 + +wSavedSpriteMapX:: ; d133 + ds 1 + + ds 5 + +wWhichPrize:: ; d139 + ds 1 wIgnoreInputCounter:: ; d13a ; counts downward each frame @@ -1387,11 +2262,11 @@ wNumberOfNoRandomBattleStepsLeft:: ; d13c ; after a battle, you have at least 3 steps before a random battle can occur ds 1 -W_PRIZE1:: ; d13d +wPrize1:: ; d13d ds 1 -W_PRIZE2:: ; d13e +wPrize2:: ; d13e ds 1 -W_PRIZE3:: ; d13f +wPrize3:: ; d13f ds 1 ds 1 @@ -1399,9 +2274,16 @@ W_PRIZE3:: ; d13f wSerialRandomNumberListBlock:: ; d141 ; the first 7 bytes are the preamble -wd141:: ds 2 -wd143:: ds 2 -wd145:: ds 3 +wPrize1Price:: ; d141 + ds 2 + +wPrize2Price:: ; d143 + ds 2 + +wPrize3Price:: ; d145 + ds 2 + + ds 1 wLinkBattleRandomNumberList:: ; d148 ; shared list of 9 random numbers, indexed by wLinkBattleRandomNumberListIndex @@ -1410,14 +2292,29 @@ wLinkBattleRandomNumberList:: ; d148 wSerialPlayerDataBlock:: ; d152 ; the first 6 bytes are the preamble -wd152:: ds 1 -wd153:: ds 3 -wd156:: ds 1 -wd157:: ds 1 +wPseudoItemID:: ; d152 +; When a real item is being used, this is 0. +; When a move is acting as an item, this is the ID of the item it's acting as. +; For example, out-of-battle Dig is executed using a fake Escape Rope item. In +; that case, this would be ESCAPE_ROPE. + ds 1 + +wUnusedD153:: ; d153 + ds 1 + ds 2 + +wEvoStoneItemID:: ; d156 + ds 1 + +wSavedNPCMovementDirections2Index:: ; d157 + ds 1 wPlayerName:: ; d158 - ds 11 + ds NAME_LENGTH + + +wPartyDataStart:: wPartyCount:: ds 1 ; d163 wPartySpecies:: ds PARTY_LENGTH ; d164 @@ -1431,10 +2328,14 @@ wPartyMon4:: party_struct wPartyMon4 ; d1ef wPartyMon5:: party_struct wPartyMon5 ; d21b wPartyMon6:: party_struct wPartyMon6 ; d247 -wPartyMonOT:: ds 11 * PARTY_LENGTH ; d273 -wPartyMonNicks:: ds 11 * PARTY_LENGTH ; d2b5 +wPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d273 +wPartyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH ; d2b5 + +wPartyDataEnd:: +wMainDataStart:: + wPokedexOwned:: ; d2f7 flag_array NUM_POKEMON wPokedexOwnedEnd:: @@ -1448,16 +2349,16 @@ wNumBagItems:: ; d31d ds 1 wBagItems:: ; d31e ; item, quantity - ds 20 * 2 + ds BAG_ITEM_CAPACITY * 2 ds 1 ; end wPlayerMoney:: ; d347 ds 3 ; BCD -W_RIVALNAME:: ; d34a - ds 11 +wRivalName:: ; d34a + ds NAME_LENGTH -W_OPTIONS:: ; d355 +wOptions:: ; d355 ; bit 7 = battle animation ; 0: On ; 1: Off @@ -1470,141 +2371,195 @@ W_OPTIONS:: ; d355 ; 5: Slow ds 1 -W_OBTAINEDBADGES:: ; d356 - ds 1 +wObtainedBadges:: ; d356 + flag_array 8 ds 1 -wd358:: ds 1 +wLetterPrintingDelayFlags:: ; d358 +; bit 0: If 0, limit the delay to 1 frame. Note that this has no effect if +; the delay has been disabled entirely through bit 1 of this variable +; or bit 6 of wd730. +; bit 1: If 0, no delay. + ds 1 wPlayerID:: ; d359 ds 2 -wd35b:: ds 1 -wd35c:: ds 1 +wMapMusicSoundID:: ; d35b + ds 1 + +wMapMusicROMBank:: ; d35c + ds 1 wMapPalOffset:: ; d35d ; offset subtracted from FadePal4 to get the background and object palettes for the current map ; normally, it is 0. it is 6 when Flash is needed, causing FadePal2 to be used instead of FadePal4 ds 1 -W_CURMAP:: ; d35e +wCurMap:: ; d35e ds 1 wCurrentTileBlockMapViewPointer:: ; d35f ; pointer to the upper left corner of the current view in the tile block map ds 2 -W_YCOORD:: ; d361 +wYCoord:: ; d361 ; player’s position on the current map ds 1 -W_XCOORD:: ; d362 +wXCoord:: ; d362 ds 1 -W_YBLOCKCOORD:: ; d363 +wYBlockCoord:: ; d363 ; player's y position (by block) ds 1 -W_XBLOCKCOORD:: ; d364 +wXBlockCoord:: ; d364 ds 1 wLastMap:: ; d365 ds 1 -wd366:: ds 1 +wUnusedD366:: ; d366 + ds 1 -W_CURMAPTILESET:: ; d367 +wCurMapTileset:: ; d367 ds 1 -W_CURMAPHEIGHT:: ; d368 +wCurMapHeight:: ; d368 ; blocks ds 1 -W_CURMAPWIDTH:: ; d369 +wCurMapWidth:: ; d369 ; blocks ds 1 -W_MAPDATAPTR:: ; d36a +wMapDataPtr:: ; d36a ds 2 -W_MAPTEXTPTR:: ; d36c +wMapTextPtr:: ; d36c ds 2 -W_MAPSCRIPTPTR:: ; d36e +wMapScriptPtr:: ; d36e ds 2 -W_MAPCONNECTIONS:: ; d370 +wMapConnections:: ; d370 ; connection byte ds 1 -W_MAPCONN1PTR:: ; d371 +wMapConn1Ptr:: ; d371 + ds 1 + +wNorthConnectionStripSrc:: ; d372 + ds 2 + +wNorthConnectionStripDest:: ; d374 + ds 2 + +wNorthConnectionStripWidth:: ; d376 + ds 1 + +wNorthConnectedMapWidth:: ; d377 + ds 1 + +wNorthConnectedMapYAlignment:: ; d378 + ds 1 + +wNorthConnectedMapXAlignment:: ; d379 + ds 1 + +wNorthConnectedMapViewPointer:: ; d37a + ds 2 + +wMapConn2Ptr:: ; d37c ds 1 -wd372:: ds 1 -wd373:: ds 1 -wd374:: ds 1 -wd375:: ds 1 -wd376:: ds 1 -wd377:: ds 1 -wd378:: ds 1 -wd379:: ds 1 -wd37a:: ds 1 -wd37b:: ds 1 +wSouthConnectionStripSrc:: ; d37d + ds 2 + +wSouthConnectionStripDest:: ; d37f: + ds 2 + +wSouthConnectionStripWidth:: ; d381 + ds 1 -W_MAPCONN2PTR:: ; d37c +wSouthConnectedMapWidth:: ; d382 ds 1 -wd37d:: ds 1 -wd37e:: ds 1 -wd37f:: ds 1 -wd380:: ds 1 -wd381:: ds 1 -wd382:: ds 1 -wd383:: ds 1 -wd384:: ds 1 -wd385:: ds 1 -wd386:: ds 1 +wSouthConnectedMapYAlignment:: ; d383 + ds 1 -W_MAPCONN3PTR:: ; d387 +wSouthConnectedMapXAlignment:: ; d384 ds 1 -wd388:: ds 1 -wd389:: ds 1 -wd38a:: ds 1 -wd38b:: ds 1 -wd38c:: ds 1 -wd38d:: ds 1 -wd38e:: ds 1 -wd38f:: ds 1 -wd390:: ds 1 -wd391:: ds 1 +wSouthConnectedMapViewPointer:: ; d385 + ds 2 -W_MAPCONN4PTR:: ; d392 +wMapConn3Ptr:: ; d387 ds 1 -wd393:: ds 1 -wd394:: ds 1 -wd395:: ds 1 -wd396:: ds 1 -wd397:: ds 1 -wd398:: ds 1 -wd399:: ds 1 -wd39a:: ds 1 -wd39b:: ds 1 -wd39c:: ds 1 +wWestConnectionStripSrc:: ; d388 + ds 2 -W_SPRITESET:: ; d39d +wWestConnectionStripDest:: ; d38a + ds 2 + +wWestConnectionStripHeight:: ; d38c + ds 1 + +wWestConnectedMapWidth:: ; d38d + ds 1 + +wWestConnectedMapYAlignment:: ; d38e + ds 1 + +wWestConnectedMapXAlignment:: ; d38f + ds 1 + +wWestConnectedMapViewPointer:: ; d390 + ds 2 + +wMapConn4Ptr:: ; d392 + ds 1 + +wEastConnectionStripSrc:: ; d393 + ds 2 + +wEastConnectionStripDest:: ; d395 + ds 2 + +wEastConnectionStripHeight:: ; d397 + ds 1 + +wEastConnectedMapWidth:: ; d398 + ds 1 + +wEastConnectedMapYAlignment:: ; d399 + ds 1 + +wEastConnectedMapXAlignment:: ; d39a + ds 1 + +wEastConnectedMapViewPointer:: ; d39b + ds 2 + +wSpriteSet:: ; d39d ; sprite set for the current map (11 sprite picture ID's) ds 11 -W_SPRITESETID:: ; d3a8 +wSpriteSetID:: ; d3a8 ; sprite set ID for the current map ds 1 -wd3a9:: ds 1 -wd3aa:: ds 3 -wd3ad:: ds 1 +wObjectDataPointerTemp:: ; d3a9 + ds 2 + + ds 2 + +wMapBackgroundTile:: ; d3ad +; the tile shown outside the boundaries of the map + ds 1 wNumberOfWarps:: ; d3ae ; number of warps in current map @@ -1620,11 +2575,19 @@ wDestinationWarpID:: ; d42f ds 128 -wd4b0:: ds 1 -wd4b1:: ds 32 -wd4d1:: ds 16 +wNumSigns:: ; d4b0 +; number of signs in the current map (up to 16) + ds 1 + +wSignCoords:: ; d4b1 +; 2 bytes each +; Y, X + ds 32 + +wSignTextIDs:: ; d4d1 + ds 16 -W_NUMSPRITES:: ; d4e1 +wNumSprites:: ; d4e1 ; number of sprites on the current map ds 1 @@ -1635,43 +2598,62 @@ wYOffsetSinceLastSpecialWarp:: ; d4e2 wXOffsetSinceLastSpecialWarp:: ; d4e3 ds 1 -W_MAPSPRITEDATA:: ; d4e4 +wMapSpriteData:: ; d4e4 ; two bytes per sprite (movement byte 2, text ID) ds 32 -W_MAPSPRITEEXTRADATA:: ; d504 +wMapSpriteExtraData:: ; d504 ; two bytes per sprite (trainer class/item ID, trainer set ID) ds 32 -wd524:: ds 1 -wd525:: ds 1 +wCurrentMapHeight2:: ; d524 +; map height in 2x2 meta-tiles + ds 1 + +wCurrentMapWidth2:: ; d525 +; map width in 2x2 meta-tiles + ds 1 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 +; In the comments for the player direction variables below, "moving" refers to +; both walking and changing facing direction without taking a step. + +wPlayerMovingDirection:: ; d528 +; if the player is moving, the current direction +; if the player is not moving, zero +; map scripts write to this in order to change the player's facing direction + ds 1 + +wPlayerLastStopDirection:: ; d529 +; the direction in which the player was moving before the player last stopped + ds 1 + +wPlayerDirection:: ; d52a +; if the player is moving, the current direction +; if the player is not moving, the last the direction in which the player moved + ds 1 -W_TILESETBANK:: ; d52b +wTilesetBank:: ; d52b ds 1 -W_TILESETBLOCKSPTR:: ; d52c +wTilesetBlocksPtr:: ; d52c ; maps blocks (4x4 tiles) to tiles ds 2 -W_TILESETGFXPTR:: ; d52e +wTilesetGfxPtr:: ; d52e ds 2 -W_TILESETCOLLISIONPTR:: ; d530 +wTilesetCollisionPtr:: ; d530 ; list of all walkable tiles ds 2 -W_TILESETTALKINGOVERTILES:: ; d532 +wTilesetTalkingOverTiles:: ; d532 ds 3 -W_GRASSTILE:: ; d535 +wGrassTile:: ; d535 ds 1 ds 4 @@ -1680,247 +2662,264 @@ wNumBoxItems:: ; d53a ds 1 wBoxItems:: ; d53b ; item, quantity - ds 50 * 2 + ds PC_ITEM_CAPACITY * 2 ds 1 ; end -wd5a0:: ds 2 -wd5a2:: ds 1 -wd5a3:: ds 1 +wCurrentBoxNum:: ; d5a0 +; bits 0-6: box number +; bit 7: whether the player has changed boxes before + ds 2 + +wNumHoFTeams:: ; d5a2 +; number of HOF teams + ds 1 + +wUnusedD5A3:: ; d5a3 + ds 1 wPlayerCoins:: ; d5a4 ds 2 ; BCD -W_MISSABLEOBJECTFLAGS:: ; d5a6 +wMissableObjectFlags:: ; d5a6 ; bit array of missable objects. set = removed - ds 39 + ds 32 +wMissableObjectFlagsEnd:: + + ds 7 -wd5cd:: ds 1 +wd5cd:: ds 1 ; temp copy of c1x2 (sprite facing/anim) -W_MISSABLEOBJECTLIST:: ; d5ce +wMissableObjectList:: ; d5ce ; each entry consists of 2 bytes ; * the sprite ID (depending on the current map) -; * the missable object index (global, used for W_MISSABLEOBJECTFLAGS) +; * the missable object index (global, used for wMissableObjectFlags) ; terminated with $FF ds 17 * 2 -W_GAMEPROGRESSFLAGS:: ; d5f0 +wGameProgressFlags:: ; d5f0 ; $c8 bytes ds 0 -W_OAKSLABCURSCRIPT:: ; d5f0 +wOaksLabCurScript:: ; d5f0 ds 1 -W_PALLETTOWNCURSCRIPT:: ; d5f1 +wPalletTownCurScript:: ; d5f1 ds 1 ds 1 -W_BLUESHOUSECURSCRIPT:: ; d5f3 +wBluesHouseCurScript:: ; d5f3 ds 1 -W_VIRIDIANCITYCURSCRIPT:: ; d5f4 +wViridianCityCurScript:: ; d5f4 ds 1 ds 2 -W_PEWTERCITYCURSCRIPT:: ; d5f7 +wPewterCityCurScript:: ; d5f7 ds 1 -W_ROUTE3CURSCRIPT:: ; d5f8 +wRoute3CurScript:: ; d5f8 ds 1 -W_ROUTE4CURSCRIPT:: ; d5f9 +wRoute4CurScript:: ; d5f9 ds 1 ds 1 -W_VIRIDIANGYMCURSCRIPT:: ; d5fb +wViridianGymCurScript:: ; d5fb ds 1 -W_PEWTERGYMCURSCRIPT:: ; d5fc +wPewterGymCurScript:: ; d5fc ds 1 -W_CERULEANGYMCURSCRIPT:: ; d5fd +wCeruleanGymCurScript:: ; d5fd ds 1 -W_VERMILIONGYMCURSCRIPT:: ; d5fe +wVermilionGymCurScript:: ; d5fe ds 1 -W_CELADONGYMCURSCRIPT:: ; d5ff +wCeladonGymCurScript:: ; d5ff ds 1 -W_ROUTE6CURSCRIPT:: ; d600 +wRoute6CurScript:: ; d600 ds 1 -W_ROUTE8CURSCRIPT:: ; d601 +wRoute8CurScript:: ; d601 ds 1 -W_ROUTE24CURSCRIPT:: ; d602 +wRoute24CurScript:: ; d602 ds 1 -W_ROUTE25CURSCRIPT:: ; d603 +wRoute25CurScript:: ; d603 ds 1 -W_ROUTE9CURSCRIPT:: ; d604 +wRoute9CurScript:: ; d604 ds 1 -W_ROUTE10CURSCRIPT:: ; d605 +wRoute10CurScript:: ; d605 ds 1 -W_MTMOON1CURSCRIPT:: ; d606 +wMtMoon1CurScript:: ; d606 ds 1 -W_MTMOON3CURSCRIPT:: ; d607 +wMtMoon3CurScript:: ; d607 ds 1 -W_SSANNE8CURSCRIPT:: ; d608 +wSSAnne8CurScript:: ; d608 ds 1 -W_SSANNE9CURSCRIPT:: ; d609 +wSSAnne9CurScript:: ; d609 ds 1 -W_ROUTE22CURSCRIPT:: ; d60a +wRoute22CurScript:: ; d60a ds 1 ds 1 -W_REDSHOUSE2CURSCRIPT:: ; d60c +wRedsHouse2CurScript:: ; d60c ds 1 -W_VIRIDIANMARKETCURSCRIPT:: ; d60d +wViridianMarketCurScript:: ; d60d ds 1 -W_ROUTE22GATECURSCRIPT:: ; d60e +wRoute22GateCurScript:: ; d60e ds 1 -W_CERULEANCITYCURSCRIPT:: ; d60f +wCeruleanCityCurScript:: ; d60f ds 1 ds 7 -W_SSANNE5CURSCRIPT:: ; d617 +wSSAnne5CurScript:: ; d617 ds 1 -W_VIRIDIANFORESTCURSCRIPT:: ; d618 +wViridianForestCurScript:: ; d618 ds 1 -W_MUSEUM1FCURSCRIPT:: ; d619 +wMuseum1fCurScript:: ; d619 ds 1 -W_ROUTE13CURSCRIPT:: ; d61a +wRoute13CurScript:: ; d61a ds 1 -W_ROUTE14CURSCRIPT:: ; d61b +wRoute14CurScript:: ; d61b ds 1 -W_ROUTE17CURSCRIPT:: ; d61c +wRoute17CurScript:: ; d61c ds 1 -W_ROUTE19CURSCRIPT:: ; d61d +wRoute19CurScript:: ; d61d ds 1 -W_ROUTE21CURSCRIPT:: ; d61e +wRoute21CurScript:: ; d61e ds 1 -W_SAFARIZONEENTRANCECURSCRIPT:: ; d61f +wSafariZoneEntranceCurScript:: ; d61f ds 1 -W_ROCKTUNNEL2CURSCRIPT:: ; d620 +wRockTunnel2CurScript:: ; d620 ds 1 -W_ROCKTUNNEL1CURSCRIPT:: ; d621 +wRockTunnel1CurScript:: ; d621 ds 1 ds 1 -W_ROUTE11CURSCRIPT:: ; d623 +wRoute11CurScript:: ; d623 ds 1 -W_ROUTE12CURSCRIPT:: ; d624 +wRoute12CurScript:: ; d624 ds 1 -W_ROUTE15CURSCRIPT:: ; d625 +wRoute15CurScript:: ; d625 ds 1 -W_ROUTE16CURSCRIPT:: ; d626 +wRoute16CurScript:: ; d626 ds 1 -W_ROUTE18CURSCRIPT:: ; d627 +wRoute18CurScript:: ; d627 ds 1 -W_ROUTE20CURSCRIPT:: ; d628 +wRoute20CurScript:: ; d628 ds 1 -W_SSANNE10CURSCRIPT:: ; d629 +wSSAnne10CurScript:: ; d629 ds 1 -W_VERMILIONCITYCURSCRIPT:: ; d62a +wVermilionCityCurScript:: ; d62a ds 1 -W_POKEMONTOWER2CURSCRIPT:: ; d62b +wPokemonTower2CurScript:: ; d62b ds 1 -W_POKEMONTOWER3CURSCRIPT:: ; d62c +wPokemonTower3CurScript:: ; d62c ds 1 -W_POKEMONTOWER4CURSCRIPT:: ; d62d +wPokemonTower4CurScript:: ; d62d ds 1 -W_POKEMONTOWER5CURSCRIPT:: ; d62e +wPokemonTower5CurScript:: ; d62e ds 1 -W_POKEMONTOWER6CURSCRIPT:: ; d62f +wPokemonTower6CurScript:: ; d62f ds 1 -W_POKEMONTOWER7CURSCRIPT:: ; d630 +wPokemonTower7CurScript:: ; d630 ds 1 -W_ROCKETHIDEOUT1CURSCRIPT:: ; d631 +wRocketHideout1CurScript:: ; d631 ds 1 -W_ROCKETHIDEOUT2CURSCRIPT:: ; d632 +wRocketHideout2CurScript:: ; d632 ds 1 -W_ROCKETHIDEOUT3CURSCRIPT:: ; d633 +wRocketHideout3CurScript:: ; d633 ds 1 -W_ROCKETHIDEOUT4CURSCRIPT:: ; d634 +wRocketHideout4CurScript:: ; d634 ds 2 -W_ROUTE6GATECURSCRIPT:: ; d636 +wRoute6GateCurScript:: ; d636 ds 1 -W_ROUTE8GATECURSCRIPT:: ; d637 +wRoute8GateCurScript:: ; d637 ds 2 -W_CINNABARISLANDCURSCRIPT:: ; d639 +wCinnabarIslandCurScript:: ; d639 ds 1 -W_MANSION1CURSCRIPT:: ; d63a +wMansion1CurScript:: ; d63a ds 2 -W_MANSION2CURSCRIPT:: ; d63c +wMansion2CurScript:: ; d63c ds 1 -W_MANSION3CURSCRIPT:: ; d63d +wMansion3CurScript:: ; d63d ds 1 -W_MANSION4CURSCRIPT:: ; d63e +wMansion4CurScript:: ; d63e ds 1 -W_VICTORYROAD2CURSCRIPT:: ; d63f +wVictoryRoad2CurScript:: ; d63f ds 1 -W_VICTORYROAD3CURSCRIPT:: ; d640 +wVictoryRoad3CurScript:: ; d640 ds 2 -W_FIGHTINGDOJOCURSCRIPT:: ; d642 +wFightingDojoCurScript:: ; d642 ds 1 -W_SILPHCO2CURSCRIPT:: ; d643 +wSilphCo2CurScript:: ; d643 ds 1 -W_SILPHCO3CURSCRIPT:: ; d644 +wSilphCo3CurScript:: ; d644 ds 1 -W_SILPHCO4CURSCRIPT:: ; d645 +wSilphCo4CurScript:: ; d645 ds 1 -W_SILPHCO5CURSCRIPT:: ; d646 +wSilphCo5CurScript:: ; d646 ds 1 -W_SILPHCO6CURSCRIPT:: ; d647 +wSilphCo6CurScript:: ; d647 ds 1 -W_SILPHCO7CURSCRIPT:: ; d648 +wSilphCo7CurScript:: ; d648 ds 1 -W_SILPHCO8CURSCRIPT:: ; d649 +wSilphCo8CurScript:: ; d649 ds 1 -W_SILPHCO9CURSCRIPT:: ; d64a +wSilphCo9CurScript:: ; d64a ds 1 -W_HALLOFFAMEROOMCURSCRIPT:: ; d64b +wHallOfFameRoomCurScript:: ; d64b ds 1 -W_GARYCURSCRIPT:: ; d64c +wGaryCurScript:: ; d64c ds 1 -W_LORELEICURSCRIPT:: ; d64d +wLoreleiCurScript:: ; d64d ds 1 -W_BRUNOCURSCRIPT:: ; d64e +wBrunoCurScript:: ; d64e ds 1 -W_AGATHACURSCRIPT:: ; d64f +wAgathaCurScript:: ; d64f ds 1 -W_UNKNOWNDUNGEON3CURSCRIPT:: ; d650 +wUnknownDungeon3CurScript:: ; d650 ds 1 -W_VICTORYROAD1CURSCRIPT:: ; d651 +wVictoryRoad1CurScript:: ; d651 ds 1 ds 1 -W_LANCECURSCRIPT:: ; d653 +wLanceCurScript:: ; d653 ds 1 ds 4 -W_SILPHCO10CURSCRIPT:: ; d658 +wSilphCo10CurScript:: ; d658 ds 1 -W_SILPHCO11CURSCRIPT:: ; d659 +wSilphCo11CurScript:: ; d659 ds 1 ds 1 -W_FUCHSIAGYMCURSCRIPT:: ; d65b +wFuchsiaGymCurScript:: ; d65b ds 1 -W_SAFFRONGYMCURSCRIPT:: ; d65c +wSaffronGymCurScript:: ; d65c ds 1 ds 1 -W_CINNABARGYMCURSCRIPT:: ; d65e +wCinnabarGymCurScript:: ; d65e ds 1 -W_CELADONGAMECORNERCURSCRIPT:: ; d65f +wCeladonGameCornerCurScript:: ; d65f ds 1 -W_ROUTE16GATECURSCRIPT:: ; d660 +wRoute16GateCurScript:: ; d660 ds 1 -W_BILLSHOUSECURSCRIPT:: ; d661 +wBillsHouseCurScript:: ; d661 ds 1 -W_ROUTE5GATECURSCRIPT:: ; d662 +wRoute5GateCurScript:: ; d662 ds 1 -W_POWERPLANTCURSCRIPT:: ; d663 +wPowerPlantCurScript:: ; d663 ; overload ds 0 -W_ROUTE7GATECURSCRIPT:: ; d663 +wRoute7GateCurScript:: ; d663 ; overload ds 1 ds 1 -W_SSANNE2CURSCRIPT:: ; d665 +wSSAnne2CurScript:: ; d665 ds 1 -W_SEAFOAMISLANDS4CURSCRIPT:: ; d666 +wSeafoamIslands4CurScript:: ; d666 ds 1 -W_ROUTE23CURSCRIPT:: ; d667 +wRoute23CurScript:: ; d667 ds 1 -W_SEAFOAMISLANDS5CURSCRIPT:: ; d668 +wSeafoamIslands5CurScript:: ; d668 ds 1 -W_ROUTE18GATECURSCRIPT:: ; d669 +wRoute18GateCurScript:: ; d669 ds 1 - ds 134 + ds 78 +wGameProgressFlagsEnd:: + + ds 56 + +wObtainedHiddenItemsFlags:: + ds 14 -wd6f0:: ds 14 -wd6fe:: ds 2 +wObtainedHiddenCoinsFlags:: + ds 2 wWalkBikeSurfState:: ; d700 ; $00 = walking @@ -1930,36 +2929,36 @@ wWalkBikeSurfState:: ; d700 ds 10 -W_TOWNVISITEDFLAG:: ; d70b +wTownVisitedFlag:: ; d70b flag_array 13 wSafariSteps:: ; d70d ; starts at 502 ds 2 -W_FOSSILITEM:: ; d70f +wFossilItem:: ; d70f ; item given to cinnabar lab ds 1 -W_FOSSILMON:: ; d710 +wFossilMon:: ; d710 ; mon that will result from the item ds 1 ds 2 -W_ENEMYMONORTRAINERCLASS:: ; d713 -; trainer classes start at $c8 +wEnemyMonOrTrainerClass:: ; d713 +; trainer classes start at 200 ds 1 wPlayerJumpingYScreenCoordsIndex:: ; d714 ds 1 -W_RIVALSTARTER:: ; d715 +wRivalStarter:: ; d715 ds 1 ds 1 -W_PLAYERSTARTER:: ; d717 +wPlayerStarter:: ; d717 ds 1 wBoulderSpriteIndex:: ; d718 @@ -1973,7 +2972,8 @@ wDestinationMap:: ; d71a ; destination map (for certain types of special warps, not ordinary walking) ds 1 -wd71b:: ds 1 +wUnusedD71B:: ; d71b + ds 1 wTileInFrontOfBoulderAndBoulderCollisionResult:: ; d71c ; used to store the tile in front of the boulder when trying to push a boulder @@ -1988,28 +2988,66 @@ wWhichDungeonWarp:: ; d71e ; which dungeon warp within the source map was used ds 1 -wd71f:: ds 9 +wUnusedD71F:: ; d71f + ds 1 -wd728:: + ds 8 + +wd728:: ; d728 ; bit 0: using Strength outside of battle +; bit 1: set by IsSurfingAllowed when surfing's allowed, but the caller resets it after checking the result +; bit 3: received Old Rod +; bit 4: received Good Rod +; bit 5: received Super Rod +; bit 6: gave one of the Saffron guards a drink +; bit 7: set by ItemUseCardKey, which is leftover code from a previous implementation of the Card Key + ds 1 + ds 1 +wBeatGymFlags:: ; d72a +; redundant because it matches wObtainedBadges +; used to determine whether to show name on statue and in two NPC text scripts ds 1 -wd72a:: ds 2 + ds 1 wd72c:: ; d72c ; bit 0: if not set, the 3 minimum steps between random battles have passed +; bit 1: prevent audio fade out ds 1 -wd72d:: ds 1 -wd72e:: ds 2 +wd72d:: ; d72d +; This variable is used for temporary flags and as the destination map when +; warping to the Trade Center or Colosseum. +; bit 0: sprite facing directions have been initialised in the Trade Center +; bit 3: do scripted warp (used to warp back to Lavender Town from the top of the pokemon tower) +; bit 4: on a dungeon warp +; bit 5: don't make NPCs face the player when spoken to +; Bits 6 and 7 are set by scripts when starting major battles in the storyline, +; but they do not appear to affect anything. Bit 6 is reset after all battles +; and bit 7 is reset after trainer battles (but it's only set before trainer +; battles anyway). + ds 1 + +wd72e:: ; d72e +; bit 0: the player has received Lapras in the Silph Co. building +; bit 1: set in various places, but doesn't appear to have an effect +; bit 2: the player has healed pokemon at a pokemon center at least once +; bit 3: the player has a received a pokemon from Prof. Oak +; bit 4: disable battles +; bit 5: set when a battle ends and when the player blacks out in the overworld due to poison +; bit 6: using the link feature +; bit 7: set if scripted NPC movement has been initialised + ds 1 + + ds 1 -wd730:: +wd730:: ; d730 ; bit 0: NPC sprite being moved by script ; bit 5: ignore joypad input ; bit 6: print text with no delay between each letter -; bit 7: set if joypad states are being simulated in the overworld +; bit 7: set if joypad states are being simulated in the overworld or an NPC's movement is being scripted ds 1 ds 1 @@ -2028,18 +3066,26 @@ wd732:: ; d732 ; bit 6: map destination is [wLastBlackoutMap] (usually the last used pokemon center, but could be the player's house) ds 1 -W_FLAGS_D733:: ; d733 -; bit 4: use variable [W_CURMAPSCRIPT] instead of the provided index for next frame's map script (used to start battle when talking to trainers) +wFlags_D733:: ; d733 +; bit 0: running a test battle +; bit 1: prevent music from changing when entering new map +; bit 2: skip the joypad check in CheckWarpsNoCollision (used for the forced warp down the waterfall in the Seafoam Islands) +; bit 3: trainer wants to battle +; bit 4: use variable [wCurMapScript] instead of the provided index for next frame's map script (used to start battle when talking to trainers) ; bit 7: used fly out of battle ds 1 -wd734:: ds 2 +wBeatLorelei:: ; d734 +; bit 1: set when you beat Lorelei and reset in Indigo Plateau lobby +; the game uses this to tell when Elite 4 events need to be reset + ds 2 wd736:: ; d736 ; bit 0: check if the player is standing on a door and make him walk down a step if so ; bit 1: the player is currently stepping down from a door ; bit 2: standing on a warp -; bit 6: jumping down a ledge +; bit 6: jumping down a ledge / fishing animation +; bit 7: player sprite spinning due to spin tiles (Rocket hidehout / Viridian Gym) ds 1 wCompletedInGameTradeFlags:: ; d737 @@ -2047,8 +3093,13 @@ wCompletedInGameTradeFlags:: ; d737 ds 2 -wd73b:: ds 1 -wd73c:: ds 3 +wWarpedFromWhichWarp:: ; d73b + ds 1 + +wWarpedFromWhichMap:: ; d73c + ds 1 + + ds 2 wCardKeyDoorY:: ; d73f ds 1 @@ -2058,158 +3109,39 @@ wCardKeyDoorX:: ; d740 ds 2 -wd743:: ds 1 -wd744:: ds 3 -wd747:: ds 3 -wd74a:: ds 1 - -wd74b:: ; d74b -; bit 0: Prof. Oak has lead the player to the north end of his lab -; bit 1: Prof. Oak has asked the player to choose a pokemon -; bit 2: the player and the rival have received their pokemon -; bit 3: the player has battled the rival in Oak's lab -; bit 4: Prof. Oak has given the player 5 pokeballs -; bit 5: received pokedex - ds 1 - -wd74c:: ds 2 -wd74e:: ds 3 -wd751:: ds 1 -wd752:: ds 2 -wd754:: ds 1 -wd755:: ds 5 -wd75a:: ds 1 -wd75b:: ds 3 -wd75e:: ds 1 -wd75f:: ds 5 -wd764:: ds 1 -wd765:: ds 1 -wd766:: ds 1 -wd767:: ds 1 -wd768:: ds 1 -wd769:: ds 3 -wd76c:: ds 5 -wd771:: ds 2 -wd773:: ds 4 -wd777:: ds 1 -wd778:: ds 4 -wd77c:: ds 1 -wd77d:: ds 1 -wd77e:: ds 5 -wd783:: ds 11 -wd78e:: ds 2 -wd790:: ds 2 -wd792:: ds 4 -wd796:: ds 2 -wd798:: ds 2 -wd79a:: ds 1 -wd79b:: ds 1 -wd79c:: ds 5 -wd7a1:: ds 2 -wd7a3:: ds 12 -wd7af:: ds 2 -wd7b1:: ds 2 -wd7b3:: ds 1 -wd7b4:: ds 5 -wd7b9:: ds 4 -wd7bd:: ds 2 -wd7bf:: ds 3 -wd7c2:: ds 1 -wd7c3:: ds 2 -wd7c5:: ds 1 -wd7c6:: ds 3 -wd7c9:: ds 4 -wd7cd:: ds 2 -wd7cf:: ds 2 -wd7d1:: ds 1 -wd7d2:: ds 1 -wd7d3:: ds 2 -wd7d5:: ds 1 -wd7d6:: ds 1 -wd7d7:: ds 1 -wd7d8:: ds 1 -wd7d9:: ds 2 -wd7db:: ds 2 -wd7dd:: ds 2 -wd7df:: ds 1 -wd7e0:: ds 1 -wd7e1:: ds 2 -wd7e3:: ds 2 -wd7e5:: ds 2 -wd7e7:: ds 1 -wd7e8:: ds 1 -wd7e9:: ds 2 -wd7eb:: ds 2 -wd7ed:: ds 1 -wd7ee:: ds 1 -wd7ef:: ds 1 -wd7f0:: ds 1 -wd7f1:: ds 1 -wd7f2:: ds 1 -wd7f3:: ds 2 -wd7f5:: ds 1 -wd7f6:: ds 9 -wd7ff:: ds 4 -wd803:: ds 2 -wd805:: ds 2 -wd807:: ds 2 -wd809:: ds 10 -wd813:: ds 2 -wd815:: ds 1 -wd816:: ds 1 -wd817:: ds 2 -wd819:: ds 2 -wd81b:: ds 10 -wd825:: ds 1 -wd826:: ds 1 -wd827:: ds 1 -wd828:: ds 1 -wd829:: ds 1 -wd82a:: ds 1 -wd82b:: ds 1 -wd82c:: ds 1 -wd82d:: ds 1 -wd82e:: ds 1 -wd82f:: ds 1 -wd830:: ds 1 -wd831:: ds 1 -wd832:: ds 1 -wd833:: ds 1 -wd834:: ds 1 -wd835:: ds 1 -wd836:: ds 1 -wd837:: ds 1 -wd838:: ds 15 -wd847:: ds 2 -wd849:: ds 2 -wd84b:: ds 12 -wd857:: ds 8 -wd85f:: ds 4 -wd863:: ds 1 -wd864:: ds 1 -wd865:: ds 1 -wd866:: ds 1 -wd867:: ds 2 -wd869:: ds 20 -wd87d:: ds 2 -wd87f:: ds 1 -wd880:: ds 1 -wd881:: ds 1 -wd882:: ds 5 +wFirstLockTrashCanIndex:: ; d743 + ds 1 + +wSecondLockTrashCanIndex:: ; d743 + ds 1 + + ds 2 +wEventFlags:: ; d747 + ds 320 wLinkEnemyTrainerName:: ; d887 ; linked game's trainer name -W_GRASSRATE:: ; d887 +wGrassRate:: ; d887 ds 1 -W_GRASSMONS:: ; d888 - ds 20 +wGrassMons:: ; d888 + ;ds 20 + ds 11 +; Overload wGrassMons +wSerialEnemyDataBlock:: ; d893 + ds 9 wEnemyPartyCount:: ds 1 ; d89c wEnemyPartyMons:: ds PARTY_LENGTH + 1 ; d89d +; Overload enemy party data +wWaterRate:: db ; d8a4 +wWaterMons:: db ; d8a5 + + ds wWaterRate - @ + wEnemyMons:: ; d8a4 wEnemyMon1:: party_struct wEnemyMon1 wEnemyMon2:: party_struct wEnemyMon2 @@ -2218,75 +3150,79 @@ wEnemyMon4:: party_struct wEnemyMon4 wEnemyMon5:: party_struct wEnemyMon5 wEnemyMon6:: party_struct wEnemyMon6 -wEnemyMonOT:: ds 11 * PARTY_LENGTH ; d9ac -wEnemyMonNicks:: ds 11 * PARTY_LENGTH ; d9ee +wEnemyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d9ac +wEnemyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH ; d9ee -W_TRAINERHEADERPTR:: ; da30 +wTrainerHeaderPtr:: ; da30 ds 2 ds 6 -wda38:: ds 1 +wOpponentAfterWrongAnswer:: ; da38 +; the trainer the player must face after getting a wrong answer in the Cinnabar +; gym quiz -W_CURMAPSCRIPT:: ; da39 +wUnusedDA38:: ; da38 + ds 1 + +wCurMapScript:: ; da39 ; index of current map script, mostly used as index for function pointer array ; mostly copied from map-specific map script pointer and wirtten back later ds 1 - ds 6 + ds 7 -W_PLAYTIMEHOURS:: ; da40 - ds 2 -W_PLAYTIMEMINUTES:: ; da42 - ds 2 -W_PLAYTIMESECONDS:: ; da44 +wPlayTimeHours:: ; da41 + ds 1 +wPlayTimeMaxed:: ; da42 ds 1 -W_PLAYTIMEFRAMES:: ; da45 +wPlayTimeMinutes:: ; da43 + ds 1 +wPlayTimeSeconds:: ; da44 + ds 1 +wPlayTimeFrames:: ; da45 ds 1 wSafariZoneGameOver:: ; da46 ds 1 -W_NUMSAFARIBALLS:: ; da47 +wNumSafariBalls:: ; da47 ds 1 -W_DAYCARE_IN_USE:: ; da48 +wDayCareInUse:: ; da48 ; 0 if no pokemon is in the daycare ; 1 if pokemon is in the daycare ds 1 -W_DAYCAREMONNAME:: ds 11 ; da49 -W_DAYCAREMONOT:: ds 11 ; da54 +wDayCareMonName:: ds NAME_LENGTH ; da49 +wDayCareMonOT:: ds NAME_LENGTH ; da54 wDayCareMon:: box_struct wDayCareMon ; da5f +wMainDataEnd:: + -W_NUMINBOX:: ds 1 ; da80 +wBoxDataStart:: + +wNumInBox:: ds 1 ; da80 wBoxSpecies:: ds MONS_PER_BOX + 1 wBoxMons:: wBoxMon1:: box_struct wBoxMon1 ; da96 wBoxMon2:: ds box_struct_length * (MONS_PER_BOX + -1) ; dab7 -wBoxMonOT:: ds 11 * MONS_PER_BOX ; dd2a -wBoxMonNicks:: ds 11 * MONS_PER_BOX ; de06 +wBoxMonOT:: ds NAME_LENGTH * MONS_PER_BOX ; dd2a +wBoxMonNicks:: ds NAME_LENGTH * MONS_PER_BOX ; de06 wBoxMonNicksEnd:: ; dee2 +wBoxDataEnd:: + SECTION "Stack", WRAMX[$dfff], BANK[1] wStack:: ; dfff ds -$100 -SECTION "Sprite Buffers", SRAM, BANK[0] - -S_SPRITEBUFFER0:: ds SPRITEBUFFERSIZE ; a000 -S_SPRITEBUFFER1:: ds SPRITEBUFFERSIZE ; a188 -S_SPRITEBUFFER2:: ds SPRITEBUFFERSIZE ; a310 - - ds $100 - -sHallOfFame:: ds HOF_TEAM * NUM_HOF_TEAMS ; a598 - +INCLUDE "sram.asm" diff --git a/yellow.asm b/yellow.asm deleted file mode 100644 index 3edffe01..00000000 --- a/yellow.asm +++ /dev/null @@ -1,4 +0,0 @@ -_YELLOW EQU 1 -_OPTION_BEACH_HOUSE EQU 1 -_OPTION_LOWCOST_SAFARI EQU 1 -INCLUDE "charmap.asm" diff --git a/yellow/audio.asm b/yellow/audio.asm deleted file mode 100644 index e94c7db5..00000000 --- a/yellow/audio.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "yellow.asm" -INCLUDE "audio.asm" diff --git a/yellow/main.asm b/yellow/main.asm deleted file mode 100644 index 36c88720..00000000 --- a/yellow/main.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "yellow.asm" -INCLUDE "main.asm" diff --git a/yellow/text.asm b/yellow/text.asm deleted file mode 100644 index a84a633d..00000000 --- a/yellow/text.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "yellow.asm" -INCLUDE "text.asm" diff --git a/yellow/wram.asm b/yellow/wram.asm deleted file mode 100644 index c0b7f781..00000000 --- a/yellow/wram.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "yellow.asm" -INCLUDE "wram.asm" |